|
Interesting, but I didn't ask the question.
Use the best guess
|
|
|
|
|
Oops. My mistake.
yikes he has multiple posts.
Q. Hey man! have you sorted out the finite soup machine?
A. Why yes, it's celery or tomato.
|
|
|
|
|
how we stored the data into collection class in java
|
|
|
|
|
|
Hey guys & gals.
I'm just asking a quick question about my end of year college project.
I've written an Android application which scans student ID's, gets the information from the barcode, sends that to a server which shows on screen via WiFi.
Now currently I have it set so when it receives the info it saves to a txt file.
I allready have an excel file with details in it e.g Student Number, days present, Submission.
Is it possible for me to use a button press on the Server GUI that will take the string e.g "ABC12345" from the txt file and run a check against "ABC12345" in the Excel file containing the students info? which will then do checks using "fuzzy" logic, e.g if they missed 4 days out of 20 they're OK and if they miss 15 out of 20 they're in trouble?
If it is possible to do, could you give me some guidance on how to go about checking the txt file string against the Excel and any tutorials I can read up on?
Thanks in advance!
Mark.
|
|
|
|
|
There is a Java library (see here[^]) which allows you to read Excel files.
Use the best guess
|
|
|
|
|
Will give it a look and get back to you, cheers!
|
|
|
|
|
hi every one
I need some help with my android app
I have been searching for tutorials to fined the nearest places
at my country and details about them ..
but I was surprised I haven't getting any useful results
would some one please help : (
|
|
|
|
|
|
thanks for your help
I have seen the androidHive tutorial and have been working on it
but Google places api returns no results when i use my own lat & lon
I am searching to use other web-providers like yahoo or something but still
face issues in learning
|
|
|
|
|
Would someone please give me an example of a program that increments and decrements values with just the use of combo box and buttons, no other stuffs like a JDialog or even JTable. I'm having a hard time trying to understand complicated programs after all I'm just a newbie in java, so I need a very simple one that is easy to understand.
the code is this:
import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
import java.util.Scanner;
public class EditStack {
private JComboBox comboBox = new JComboBox();
private JButton button = new JButton("Add Order");
private JButton button_1 = new JButton("Decrease Order");
JComboBox combo;
private static String z = "";
private static String w = "";
private static String x = "";
private static String a = "";
private int numClick = 0;
public EditStack() {
String mgaPagkainTo[] = {"PM1 (Paa/ Spicy Paa with Thigh part)","PM2 (Pecho)","PM3 (Pork Barbeque 4 pcs.)","PM4 (Bangus Sisig)","PM5 (Pork Sisig)","PM6 (Bangus Inihaw)","SM1 (Paa)","SM2 (Pork Barbeque 2 pcs.)","Pancit Bihon","Dinuguan at Puto","Puto","Ensaladang Talong","Softdrinks","Iced Tea","Halo-Halo","Leche Flan","Turon Split"};
JFrame frame = new JFrame("Mang Inasal Ordering System");
JPanel panel = new JPanel();
combo = new JComboBox(mgaPagkainTo);
combo.setBackground(Color.gray);
combo.setForeground(Color.red);
panel.add(combo);
panel.add(button);
panel.add(button_1);
frame.add(panel);
combo.addActionListener(new ActionListener(){
public void actionPerformed(ActionEvent e){
String str = (String)combo.getSelectedItem();
a = str;
EditLang messageOrder1 = new EditLang();
messageOrder1.ShowOrderPo();
}
});
button.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
String selectedItem = (String) comboBox.getSelectedItem();
numClick++
}
}
);
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.setSize(300,250);
frame.setVisible(true);
}
public static void main(String[] args) {
Scanner inp = new Scanner(System.in);
boolean ulitinMoPows = true;
boolean tryAgain = true;
System.out.print("\nInput Customer Name: ");
String customerName = inp.nextLine();
w = customerName;
System.out.print("\nInput Cashier Name: ");
String user = inp.nextLine();
z = user;
do{
System.out.print("\nInput either Dine In or Take Out: ");
String dInDOut = inp.nextLine();
x = dInDOut;
if (x.equals("Dine In") || x.equals("Take Out")){
System.out.print("");
ulitinMoPows = false;
}
else{
JOptionPane.showMessageDialog(null, "Try again! Please input Dine In or Take Out only!","Error", JOptionPane.ERROR_MESSAGE);
ulitinMoPows = true;
System.out.print ("\f");
}
}while(ulitinMoPows);
do{
System.out.print("\nInput password: ");
String pass = inp.nextLine();
if(pass.equals("admin")){
EditLang messageShowMenu = new EditLang();
messageShowMenu.ShowMo();
tryAgain = false;
}
if(!pass.equals("admin")){
JOptionPane.showMessageDialog(null, "Try again! Invalid password!","Error Logging-In", JOptionPane.ERROR_MESSAGE);
tryAgain = true;
System.out.print ("\f");
}
}while(tryAgain);
EditStack j = new EditStack();
}
public static String kuhaOrder()
{
return a;
}
public static String kuhaUserName()
{
return z;
}
public static String kuhaCustomerName()
{
return w;
}
public static String kuhaSanKainPagkain()
{
return x;
}
}
public class EditLang {
public void ShowMo(){
String user = EditStack.kuhaUserName();
System.out.print("\n\n\t\tCashier: " +user);
String dInDOut = EditStack.kuhaSanKainPagkain();
System.out.print(" "+dInDOut);
String customerName = EditStack.kuhaCustomerName();
System.out.print("\n\t\tCustomer Name: " +customerName);
}
public void ShowOrderPo() {
String order = EditStack.kuhaOrder();
System.out.print("\t\t\t\t\n " +order);
}
}
|
|
|
|
|
Member 9829536 wrote: Would someone please give me an example of a program that increments and decrements values with just the use of combo box and buttons, Why would you need a ComboBox to increment values, and what is the code above supposed to represent?
Use the best guess
|
|
|
|
|
How to mosaic the splitted Images in java ???
|
|
|
|
|
I'd really like to discuss scala issues without clogging up the Java threads.
Thanks.
[no doubt opening the door to Java Threading jokes]
Q. Hey man! have you sorted out the finite soup machine?
A. Why yes, it's celery or tomato.
|
|
|
|
|
There is a forum specific for forum issues - such as adding a new forum.
|
|
|
|
|
Okey dokey.
Q. Hey man! have you sorted out the finite soup machine?
A. Why yes, it's celery or tomato.
|
|
|
|
|
Hello,
I am at the beginning of an end-of study, and I decided to work with JAVA / JEE, and since the web application that I will develop is an entreprise application that contains several features and will require several treatments CRUD and databases .... and stock management, staff, commission, leave ....... and will require well rich GUIs
So I decided to use JSF2 with primefaces components, and I want to integrate other frameworks such as Spring because only use JSF2 and Hibernate is somewhat underestimated for end-of study
In your opinion what he can give me the use of spring
and if you have any tips or suggestions and feedback of experiences
and even if you have other technologies that you can suggest me
knowing that the society has a tomcat server
thank you very much
|
|
|
|
|
Hello,
Please have a look at this tutorial[^].
Regards,
Prasad P. Khandekar
Knowledge exists, man only discovers it.
|
|
|
|
|
please l want to make program to stage lexel
in StringTokenizer class
in java language
thank u
|
|
|
|
|
|
How to use "list();" in hibernate ....?
my website: http://www.thevivek.pro
or
my website: http://thevivek.pro
|
|
|
|
|
This article[^] should be help.
Can I ask you to move any links to your homepage in your post to your signature?
It does irritate if personal & question information gets mixed.
|
|
|
|
|
Hello everyone! I'm currently having a problem with my program it doesn't loop properly please help me with it. The code is below. Thanks in advance!
import java.util.Scanner;
import javax.swing.JOptionPane;
import javax.swing.*;
public class Wewe{
public static void main(String[]args){
Scanner inp = new Scanner(System.in);
boolean tryAgain;
do{
System.out.print("\nInput username: ");
String user = inp.nextLine();
System.out.print("\nInput password: ");
String pass = inp.nextLine();
if(user.equals("admin") && pass.equals("admin")){
System.out.print("Success!");
tryAgain = true;
}
if(user!="admin" && pass!="admin"){
JOptionPane.showMessageDialog(null, "Try again! Invalid username or password!","Error Logging-In", JOptionPane.ERROR_MESSAGE);
tryAgain = false;
}
}while(tryAgain = true);
}
}
What I want to happen is that once the user entered wrong username or password the program will then loop. But if the user entered the correct username or password, it wont loop asking the user for the correct one.
|
|
|
|
|
}while(tryAgain = true);
The above code will always set tryAgain to true ; you should be using the logical == operator.
|
|
|
|
|
I'm new on this site but i know Core Java And Adv. Java very well.. So here is solution to u r problem if u have not got it yet.
First use assigment operator == in while loop
In your code loop will keep executing till the value of tryAgain is true . if u want loop to stop right after correct value of username and password u need to make tryAgain false in first if block and make tryAgain true in second if block. it will work properly
|
|
|
|