Time Management System

Oct 27, 2014

I'm in the middle of building A time management system for myself.I'm currently using JodaTime for timing in java. I just can't figure out who to save my data like, the starttime, stoptime and day time.

public void save() throws SQLException {
String checkSql = "select count(*) as count from Time where id=?";
PreparedStatement checkStmt = con.prepareStatement(checkSql);
String insertSql = "insert into Time (id, day, starttime, stoptime, overtime, exception, hours) values (?, ?, ?, ?, ?, ?, ?)";
PreparedStatement insertStatement = con.prepareStatement(insertSql);

String updateSql = "update Time set day=?, starttime=?, stoptime=?, overtime=?, exception=?, hours=? where id=?";
PreparedStatement updateStatement = con.prepareStatement(updateSql);

[code]....

View Replies


ADVERTISEMENT

Hospital Management System - Generating Report On Daily Basis

Sep 30, 2014

Hospital management system in java. I have designed Hospital, Doctor, Patient, Appointment classes. I am able to add doctor list and patient list and show the doctor list and patient list. How to take new appointment from a patient and assign it to a particular doctor and how to generate a report for inpatient and outpatient on a daily basis.

View Replies View Related

Servlets :: Large File Upload From Client To Content Management System

Sep 3, 2009

I have a requirement where a large file (100 -200MB) is uploaded from the client to a content management system. I am using a servlet with Apache Commons File Upload API. Apache FileUpload has 2 ways of handling files,

1) Non-Streaming
2) Streaming

Currently I use the Non-Streaming approach where the servlet stores the file in a temp location and upload the same into the content management system - This is taking lot of time so I am trying to implement Streaming API.

Content Management API supports streaming in 2 methods,

a) SetContent - Takes the file's ByteArrayOutputStream as input -> This gives OutOfMemoryException because the file being large
b) AppendContent - Takes the file's ByteArrayOutputStream as input -> This method can be called multiple times to upload the large file but I dont know how to do this. The Apache File Upload gives InputStream of the file and I need to split that into chuncks and append into the content management system.

How to convert InputStream to 4KB ByteArrayOutputStream so that I can use the AppendContent method in content management API?

View Replies View Related

How To Get System Time In Java

Jun 1, 2014

I just want to calculate search time for my algorithm . How to get system time in java other than System.nanotime() and System.currenttimemillis() as these methods does not returns consistent time for same input is their another option to get system time???

View Replies View Related

Servlets :: Restrict User To Login From One System At A Time

Apr 23, 2014

In My application I want to implement functionality to let user login from only one system at a time. I am searching for something that can Identify the system uniquely (Like IP address or Mac address ). I am using servlet and I don't know how to access Mac in servelt

View Replies View Related

Java Caching System - Set Expire Time For Object Using Predefined Method

Jul 22, 2014

When we are caching an object, how to set expire time for that object by using pre defined methods?

View Replies View Related

GUI And Multiple Run Management

Nov 19, 2014

I am trying to launch a GUI to my agent-based model (Repast and Eclipse) so that being able to run the model for many times. I am going to produce input parameters based on different distributions for different runs from GUI. Usually we should use batch file for different runs. However, I want to use GUI for this reason because I have GUI that can take care for one run but not for many runs.

View Replies View Related

Thread And Clock Management

Dec 19, 2014

I have objects (baddies in a game) that have individual clocks/counters assigned to them (when I make an object, I fill an integer based array list with a new digit entry at a value of one) that all happens in threads. then in another thread, I am checking the whole list of clocks, to see if any are equal to a wanted value , then I am taking an action and reseting the clock at that point on the array list.

now, the problem is:even though my code says " yes, I've taken that action because the value of array position x was >= specified value and I will now reset the clock" it doesn't reset the clock. Here is what it looks like

*these are excerpts taken from a really big program, however they should stand on their own as they are individual classes

Java Code:

public class levelclock extends Thread {
public void run() {
while (Run2 == true) {
if (Run == false) {
try {
Thread.sleep(100);
} catch (InterruptedException e) {
// TODO Auto-generated catch block
e.printStackTrace();

[code]....

(Attached, just open up the zip and read the .txt)

View Replies View Related

Program For Shopping Mall Management

Nov 4, 2014

My program is basically on mall management ,here have to give details to customer of mall on a screen so, they can easily get that particular shop exact location . Infact they can get offer details that is given by that shop . Customer can even get alternate options of shop for their demand for eg: if someone want sports wear then he/she may get many options of shop like PUMA,NIKE,REEBOK etc.

View Replies View Related

Custom Input Management Class - No Output

Aug 25, 2014

My input class

package core;
import java.util.ArrayList;
import org.lwjgl.input.Keyboard;
public class Input{
public static final int num_key = 78;
private static ArrayList<Integer> currrentkeys = new ArrayList<Integer>();
private static ArrayList<Integer> downkeys= new ArrayList<Integer>();
private static ArrayList<Integer> upkeys = new ArrayList<Integer>();

[Code] ....

View Replies View Related

Modern Gems - Two Dimensional Tile-management Game

Feb 20, 2014

package modern.gems;
public class Board {
// will need to add params where required ...
private Gem[][] gems;
private int[][] array;
private int rows;
private int cols;

[Code] ....

View Replies View Related

Military Time - Adding Minutes Displaying Correct Time

Feb 9, 2015

I am working on an assignment that I can't seem to figure out the final part to. The program takes in course data such as the time the class starts and how long it lasts. The time is in military time (0000 - 2400)

I need the output time to be the time the class started, plus the length of the class, and displayed in military time.

for example,

Start Time = 0930
Length = 50 minutes
Endtime = 1020

I can't for the life of me figure out how to do this. I have gotten a program that works for this time and minutes, and displays the correct 1020. But when I change the information to say

Start time: 0700
Length = 90 minutes

I get:

Endtime = 90

90 is technically correct, the way the formula is setup, but I need it to display 0900 not 90.

Here is the code that I have. Be easy, I'm still learning, and this is just the file I created to get the formula to work. Also, the verbose in here is just for my own debugging to make sure values should be what I'm expecting them to be.

public class calc
{
public static void main(String[] args) {
double hours, minutes, length;
double temp;
int time = 2400;
hours = time / 100;
System.out.println("Hours are: " + hours);

[Code] ....

View Replies View Related

Converting Military Time To Standard Time?

Jan 29, 2014

I have two classes. time_runner is used for testing my code.

This is what I'm using to test my code:
 
class time_runner
{
 public static void main(String str[]) throws IOException {
 Time time1 = new Time(14, 56);
System.out.println("time1: " + time1);
System.out.println("convert time1 to standard time: " + time1.convert());
System.out.println("time1: " + time1);
System.out.print("increment time1 five times: ");
time1.increment();

[code]....

The two constructors are "Time()", which is the default constructor that sets the time to 1200, and "Time(int h, int m)" Which says If h is between 1 and 23 inclusive, set the hour to h. Otherwise, set the hour to 0. If m is between 0 and 59 inclusive, set the minutes to m. Otherwise, set the minutes to 0. Those are my two constructors that I pretty much have down. The three methods however I'm having trouble with. The "String toString()" Returns the time as a String of length 4. The "String convert()" Returns the time as a String converted from military time to standard time. The "void increment()" Advances the time by one minute.

public class Time {
private int hour;
private int minute;
  public Time(int h, int m) {
if(h > 1 && h < 23)
hour = h;

[code]....

View Replies View Related

The System Cannot Find The Path Specified

Feb 25, 2015

I have the Java Development Kit downloaded in my C file and my book tells me to compile the program I need to open command windowand change the directory where the program is stored. I tried the command cd to change directory and received this message "The system cannot find the path specified."

I checked the Environment Variables on Windows 7 and the Path says: C:Program Files (x86)Javajre1.8.0_31in

This is after many tries and i still can't change directory and i keep getting the same message.

View Replies View Related

Stock System In Java

Jan 6, 2015

I'm making a stock system for the heck of it,so everything was going great until I hit the loop I am trying to use a for loop to add stock to the stock system,any way the question is maily about loops.How come I cannot declare a variable outside a loop and assign a value to it,for example I can declare as follows and I will not get an error,

for(int i=0;i<10;i++){
System.out.println("example");

}

but in my code(and yes its the only error I get I tested it) I get an error and can only declare and assign a value inside the loop,the reason for this is because I wanted to get the value from another class and use it in the loop ok so heres the code from both classes.

public class mainn{

public static void main(String [] args){
stock first = new stock();
int internal;
internal = first.wanted;

[code]....

View Replies View Related

Ordering System In Eclipse?

Jul 22, 2014

it gives me an error at the end class part some syntax error insert "}"..

* Course: IT110 - Introduction to Programming
* Filename: MyCustomShirtsPhase1.java
*
* Purpose: Created a simple online ordering system for My Custom Shirts customers
*/
import javax.swing.JOptionPane;

[code]....

View Replies View Related

System Cannot Find Path Specified

Feb 24, 2015

I have the Java Development Kit downloaded in my C file and my book tells me to compile the program I need to open command windowand change the directory where the program is stored. I tried the command cd to change directory and received this message "The system cannot find the path specified." I checked the Environment Variables on Windows 7 and the Path says: C:Program Files (x86)Javajre1.8.0_31in

This is after many tries and i still can't change directory and i keep getting the same message.The book I am using to learn Java is "Java How to Program: Tenth Edition" from Paul and Harvey Deitel.

View Replies View Related

Building A Registration System

Jan 18, 2015

I'm assigned along with two others to make this program for a project.

We need to store data to the program by adding them such as user_id among the 5 criterias that are needed. Lets say I want a new user, I need the program to give me that option and then I would type in the user id and the program would store that data information

As far as I'm aware, boolean, screentokenizer and scanner is involved in the making of this program.

View Replies View Related

How To Find IP Address Of System

Dec 5, 2013

In my java program I'm changing my IP(using proxy) and sending the request to some sites. Later some point of time, I want to know my current IP address through java program itself. How to get hold of my current IP address? Also which IP address will it show? The proxy one or the original IP ?

View Replies View Related

Banking System Using Access DB

Mar 13, 2015

I have designed a code that is aimed at simulating a banking environment using access database. However, there are errors and i am not able to create a new account.

import java.awt.*;
import java.awt.event.*;
import java.awt.FlowLayout;
import java.sql.*;
import javax.swing.*;
public class Bank extends JFrame implements ActionListener

[Code] ......

View Replies View Related

Number System Converter

Feb 15, 2013

This program requires knowledge of manipulation of Java String objects and methods. It also requires knowledge of Number System Conversions.

// Lab16MATH05st.java
// The Number System Converter
// This is the student, starting version of the Lab16MATH05 assignment.

import java.util.Scanner;
public class Lab16MATH05st
{
public static void main (String args[])
{
System.out.println("Lab16MATH05 - Number Conversion Program

[code]....

90-Point Version Specifics: The 90-point version requires that you write both the fromHexToBin and fromBinToDec methods.

90-Point Version Output

95-Point Version Specifics {The 95-point version requires everything from the 90-point version and adds the fromBinToHex method. For this version, you may assume that the binary number will have a multiple of 4 bits.

95-Point Version Output

100-Point Version Specifics: The 100-point version requires the same methods as the 95-point version; however, the fromBinToHex method needs to be improved so it can convert regardless of the number of bits.

100-Point Version Output

105-Point Version Specifics: The 105-point version requires everything from the 100-point version and adds the fromDecToAny method. For this version, the method needs to be able to convert from decimal to any base between 2 and 10. Base 16 is not required for this version.

105-Point Version Output

110-Point Version Specifics: The 110-point version requires the same methods as the 105-point version; however, the fromDecToAny method needs to be improved so it can also convert to base-16.

View Replies View Related

Digital Signage System

Jul 1, 2014

I am going to try and write a server-client based system.The server will be the design of what I want (e.g: daily advertisements that will be displayed on big monitors connected to the client, with like a slideshow looping). The client will just be receiving information from the server and not doing anything with it except displaying it and perhaps a networking element of the client reporting back to the server if the connection is dropped etc. The administrator can use the server to change the look of the advertisement.

I need the server to PUSH OUT to the client computers.I am on a networking degree so there has to be some elements to networking connections going on and programming is not my strong point. Would I write the server and clients in Java or another program? Will there need to be a "middle" program such as a web server?

View Replies View Related

Grading System Program

Aug 20, 2014

Ok so this is a grading program. I have it so the user can input 2 students and then at the end using an if statement it is suppose to compare them and print out who had the higher grade. Seems simple but it never runs the line of code to print out whos grade is higher:

if (stuAverage > stuAverage2 ){
System.out.println(student + " has the highest grade of all students entered!");
}
else if (stuAverage2> stuAverage){
System.out.println(student2 + " has the highest grade of all students entered!!");
}

Here is the Main class:

import java.util.Scanner;
public class Main2 {
int stuAverage;
static String student;
 
[code]....

View Replies View Related

Printer Access Login System

Mar 22, 2014

How to hold/cancel print job once it has already been put into the queue in windows with java code?

View Replies View Related

GUI Cash Register System For Saloon

Apr 12, 2014

Gui java cash register

I have to make cash register system for saloon. it will look like this but I dont know how to do it.

Example : if customer come to make a hair cut. I will click on c button and choose her hair length then the price will come out. Each hair length will have different price. The customer will give the money and the total will show the customer money and the balance will come out after the total is deduct with the price.

View Replies View Related

Java Dicing System With Currency

Jul 31, 2014

I have been working on making a Java application for the Game RuneScape. My goal is to make an Application to where you register on the application and it saves the information in a file. I am also looking to make it so you can transfer money from Runescape to your Account on my Application by submitting a ticket. When you submit a ticket you get assisted by one of the moderators, they trade you in the game and take the money, and then they take that money out of their current account. Admins are allowed to give moderators money via their account or another method. My issue is creating the ticket system. I want to be able to do this all via the application. So basically what i have currently for the application is a chat room, with different rooms available to go into by the users. So I need to make the tickets show up only to Moderators and Admins in the general chat room.

View Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved