I just can't see what is wrong ...Help!
Hi All,
I have almost completed the recoding of my website after a crash which caused me to lose all my actions.
Now I'm running scared a bit...:(
I am having problems with my contact form and I can't for the life of me see why.
I have some jquery code in the stage which SHOULD connect me with the php file but instead my program goes nuts!
If I upload the site can someone PLEASE take a look for me and find out what is wrong?
Regards
David
Link: https://workspaces.acrobat.com/?d=6Mikob5Qo8-DQC7ny12cqg
Message was edited by: david hatton
link added
Help!
I'm gonna fall off the bottom in a minute!
39 views and no one can help?
Oh the pain of rejection....
Similar Messages
-
When I set up my mail I could send emails now a day later I can not send them but can still receive them ... I can't see what is wrong .. Any answers .
It's not a good idea to use a network disk for both Time Machine backups and other things. By design Time Machine will eventually consume all the space on its output disk, which will then cause problem for your other files. I'd store those other files on an external disk connected to the Time Capsule. The problem with that is that Time Machine will only back up files that are local to your Mac. That means that you'll only have one copy of the files on or attached to your Time Capsule.
By the way, you've been misled by poor field labeling on this forum into typing a large part of your message into the field intended for the subject. In the future just type a short summary of your post into that field and type the whole message into the field below that. -
Can anybody see what is wrong with this SQL statement?
Hey guys, just a quick question. Can anybody tell me what is wrong with this line of SQL? I keep getting a syntax error message. I've been trying for ages and I can't see any problem at all!"
{code}prepStat = connection.prepareStatement("INSERT INTO WeatherHistory (Date, Location, Overview, Temperature, WindDirection, WindSpeed, Pressure) VALUES ('"+date+"','"+location+"','"+temp+"','"+windDir+"','"+windSpd+"','"+pressure+"')");{code}
All the field names and variables definitely exist so I can't see what the problem is!DHD wrote:
Thanks for the replies.
I've matched the correct number of column names and variables, but still no luck.
And how exactly am I misusing Prepared Statements here?As noted above, not according to the code you posted. I didn't just pluck something out of my @ss and throw it out there. There was a reason behind what I said. And, if you mean you changed it, and you still got an exception, then post that exception (completely), and your new code, which is, hopefully, using PreparedStatement, (properly). -
I don't know why my code isn't working, Can you see what is wrong?
I'm putting together a program that reads input from a text file and then decides what type of input it is (male or female) and then calculates the final sum for both.
m=male and f=female. The numbers after the letter are GPAs. Here is the input file:
m 2.4
f 3.2
m 3.7
m 4.0
f 2.9
f 1.8
f 3.8
m 1.7
m 3.4
f 2.6
m 2.8
m 1.7
f 3.7
m 3.9
f 4.0
f 3.6
m 2.3
f 2.9
m 3.0
m 2.7now here is my code:
import java.io.*;
import java.util.*;
public class gradecalc {
* @param args the command line arguments
public static void main(String[] args)
throws FileNotFoundException{
// TODO code application logic here
double sumMale=0;
int numMale=0;
double sumFemale=0;
int numFemale=0;
char gender;
double gpa;
Scanner inFile= new Scanner(new FileReader("gpa.txt"));
PrintWriter outFile= new PrintWriter("gpaResult.txt");
while (inFile.hasNext())
gender= inFile.next().charAt(0);
gpa= inFile.nextDouble();
switch (gender)
case 'M':
case 'm':
sumMale= sumMale + gpa;
numMale++;
break;
case 'F':
case 'f':
sumFemale= sumFemale + gpa;
numFemale++;
break;
default:
System.out.println("Invalid gender code: "+gender);
outFile.print("Sum of male students GPAs: " + sumMale);
outFile.print("Sum of female students GPAs: " + sumFemale);
outFile.close();
}and this is the error message I get when I build and then try to run the program:
init:
deps-jar:
compile:
run:
Exception in thread "main" java.util.NoSuchElementException
at java.util.Scanner.throwFor(Scanner.java:838)
at java.util.Scanner.next(Scanner.java:1461)
at java.util.Scanner.nextDouble(Scanner.java:2387)
at gradecalc.main(gradecalc.java:32)
Java Result: 1
BUILD SUCCESSFUL (total time: 0 seconds)I feel like I have the code right, yet it doesn't output anything to my file and gives me the above exception. What's the problem here??I actually figured it out. I think some of you programmers out there would be proud of me if you saw this completed code. This forum has really helped me out, but I still make some stupid mistakes. Like the one I realized I made on this program seconds after I made this pose. I realized that I had an unknown character at the end of my input document, which you can't see in my post because I must have not copied and pasted that part. I would delete this post, but don't know how.
-
Can someone see what is wrong with this? Im stumped
public class Card {
int suit;
int value;
static int isStraight = 0;
static int isFlush = 0;
static int handCounter = 0;
static int cardCounter = 0;
boolean inUse = false;
public int getSuit() {
return suit;
public void setSuit(int suit) {
this.suit = suit;
public int getValue() {
return value;
public void setValue(int value) {
this.value = value;
public boolean isInUse() {
return inUse;
public void setInUse(boolean inUse) {
this.inUse = inUse;
public static int checkPairs(int[] handValues){
for (int x = 0; x<5; x++ ){
for (int y = 0; y<5; y++ ){
if(handValues[x]==handValues[y]){
cardCounter ++;
handCounter = handCounter + (cardCounter - 1);
cardCounter = 0;
System.out.println(handCounter);
return handCounter;
public static int checkStraight(int[] handValues){
if(handValues[0] == (handValues[1]-1)){
if (handValues[1] == (handValues[2]-1)){
if (handValues[2] == (handValues[3]-1)){
if (handValues[3] == (handValues[4]-1)){
///System.out.println("straight");
isStraight = 1;
if (handValues[4] == 12){
isStraight = 2;
return isStraight;
public static int checkFlush(Card[]inputHand){
if (inputHand[0].suit == inputHand[1].suit){
if (inputHand[1].suit == inputHand[2].suit){
if (inputHand[2].suit == inputHand[3].suit){
if (inputHand[3].suit == inputHand[4].suit){
isFlush = 1;
return isFlush;
//handCheckerApp ,
import tcdIO.*;
public class handCheckerApp {
///these string arrays just hold the names of the values
static String[] suitsArray = {"hearts" , "spades" , "diamonds" , "clubs" };
static String[] valuesArray = {"two" , "three" , "four" , "five" , "six" , "seven" , "eight" , "nine" , "ten" , "jack" , "queen" , "king" ,"ace" };
public static void main (String arguments []) {
Terminal terminal = new Terminal();
Card[] inputHand = new Card[5];
Card[] deck = new Card[52];
Card currentCard = new Card();
for(int number = 0 ; number <= 12 ; number++){
deck[number]= new Card();
deck[number].suit = 0;
deck[number].value = number;
for(int number = 13 ; number <= 25 ; number++){
deck[number]= new Card();
deck[number].suit = 1;
deck[number].value = (number - 13);
for(int number = 26 ; number <= 38 ; number++){
deck[number]= new Card();
deck[number].suit = 2;
deck[number].value = (number - 26);
for(int number = 39 ; number <= 51 ; number++){
deck[number]= new Card();
deck[number].suit = 3;
deck[number].value = (number - 39);
terminal.println("Poker Hand Checker");
terminal.println("~~~~~~~~~~~~~~~~~~");
terminal.println("Suits key:..Hearts = 1");
terminal.println("...................Spades = 2");
terminal.println("...................Diamonds = 3");
terminal.println("...................Clubs = 4");
terminal.println(".............................");
terminal.println("Values key:.Twos = 2");
terminal.println("......................Threes = 3");
terminal.println("......................Fours = 4");
terminal.println("......................Fives = 5");
terminal.println("......................Sixes = 6");
terminal.println("......................Sevens = 7");
terminal.println("......................Eights = 8");
terminal.println("......................Nines = 9");
terminal.println("......................Tens = 10");
terminal.println("......................Jacks = 11");
terminal.println("......................Queens = 12");
terminal.println("......................Kings = 13");
terminal.println("......................Aces = 14");
///this block of code marks cards in the deck as in use and adds them to the hand
for(int i = 0; i < 5; i++){///for1
currentCard.value = (terminal.readInt("please enter card " + (i+1) + " value: " )-2);
currentCard.suit = (terminal.readInt("please enter card " + (i+1) + " suit: " )-1);
for (int x = 0; x< 52; x++){///for2
if (deck[x].value == currentCard.value){///if1
if (deck[x].suit == currentCard.suit){///if2
if (deck[x].inUse == true){///elseif1
terminal.println("you chose that card already");
i--;
}///if3
else if(deck[x].inUse == false){///if3
deck[x].inUse = true;
inputHand[i] = deck[x];
terminal.println("this card is the " + valuesArray[(inputHand.value)] + " of " + suitsArray[(inputHand[i].suit )]);
}///elseif1
}///if2
}///if1
}///for2
}///for1
int handValues[] = {inputHand[0].value, inputHand[1].value, inputHand[2].value, inputHand[3].value, inputHand[4].value};
java.util.Arrays.sort(handValues);
///this method checks for pairs, two pairs, three of a kind, full house & four of a kind
Card.checkPairs(handValues);
if (Card.handCounter == 2) {
terminal.println("You have a pair");
if (Card.handCounter == 4) {
terminal.println("You have two pair");
if (Card.handCounter == 6) {
terminal.println("You three of a kind");
if (Card.handCounter == 8) {
terminal.println("You have a full house");
if (Card.handCounter == 12) {
terminal.println("You have four of a kind");
} else {
terminal.println("");
Card.checkStraight(handValues);
Card.checkFlush(inputHand);
if (Card.isStraight == 1 && Card.isFlush == 0){
terminal.println("You have a straight");
if (Card.isStraight == 1 && Card.isFlush == 1){
terminal.println("You have a straight flush");
if (Card.isStraight == 2 && Card.isFlush == 0){
terminal.println("You have a royal straight");
if (Card.isStraight == 2 && Card.isFlush == 1){
terminal.println("You have a royal straight flush");
if (Card.isStraight == 0 && Card.isFlush == 1){
terminal.println("You have a flush");
if (Card.isStraight == 0 && Card.isFlush == 0){
terminal.println("");
Okay it's not recognising deck.inUse....i can't see why.
Can someone possibly point out some suggestions. Thanks, much appreciated.> if (deck[x].inUse == true){///elseif1
>
it's giving me an error on this If else statement...
sorry ....
How about going the extra mile and actually posting the error message you receive rather than expecting everyone to guess? The more pertinent information you can provide, the easier it is to answer your question. And you want your question answered easily and quickly, right?
~ -
Can you see what's wrong with my sql clause?
Select afkogltri sum( afpowemng ) as yqty
from ( afpo inner join afko on afpoaufnr = afkoaufnr )
into ( d_gltri , d_wemng )
where afpo~matnr = wa_pir-matnr
and year( afko~gltri ) = year( sy-datum )
group by afko~gltri.
The above is my sql clause, when I do a syntax check, it said:"Comma without preceding colon (after SELECT ?)"
Can you tell me what's wrong with this sql clause?
Thank you very much!Hi,
Select Bgltri sum( Awemng ) <b>as yqty</b> (????)
into ( d_gltri , d_wemng )
from afpo as A inner join afko as B
on Aaufnr = Baufnr
where A~matnr = wa_pir-matnr
and year( B~gltri ) = year( sy-datum )
group by B~gltri.
ENDSELECT.
eg<b>:... INTO (f1, ..., fn</b>)
Places the result set in the target area (f1, ..., fn). The fields of the result set are transported to the target fields fi from left to right. INTO (f1, ..., fn) is allowed only if a list with n elements is also specified in the SELECT clause.
<b>If the result of a selection is a table, the data is retrieved in a processing loop introduced by SELECT and concluded by ENDSELECT. The processing passes through the loop once for each line read. If the result is a single record, the closing ENDSELECT is omitted.</b>
Example
Output a list of all airlines (with short description and name):
TABLES SCARR.
DATA: CARRID LIKE SCARR-CARRID,
CARRNAME LIKE SCARR-CARRNAME,
SELECT CARRID CARRNAME
INTO (CARRID, CARRNAME)
FROM SCARR.
WRITE: / CARRID, CARRNAME.
ENDSELECT
Thanks & Regards,
Judith. -
Pictures - post update... can you see what is wrong?
We spilled beer on our 13" black Macbook and lost use of the 1-9 keys. We took it apart to clean it... do you see any more that we can do before we have to buy a new top case?
http://picasaweb.google.com/Miranda.Whitman/MacbookBlack13#
Thank you!If any of the alph-nymeric keys were shorted then many more of the keys would also not work. It sounds more likely that the keys' electrical contacts are insulated with dried beer and thus preventing electrical contact.
Put the entire keyboard in a deep dish or sink filled with warm water. Slosh it around thoroughly for a while. Next dump all the water and refill with distilled water and do the same sloshing and key pressing. Hopefully this will flush out the beer. Let it dry for a long time (days) and even use mild heat, but not so much as to warp it. Shake it, whatever you can do to dry the water out.
This was a common practice way of cleaning spills on keyboards with some models powerbook computers. Hopefully it will fix you. If not, you are no worse off for trying unless you were willing to accept it as is without the number keys. -
Can anyone see what is wrong here?
Here we go.....I am working on an assessment at Uni. I have written the following code. It compiles with no errors.....it starts to run (ie it asks for the 2 file names to impliment the equi-join) but it doesnt seem to pass a return value. The program produces no output!!! HELP!!!
private static Map equiJoin(Map relation1, Map relation2)
Map resultRelation = new TreeMap();
Iterator keys1Iterator = relation1.keySet().iterator();
Iterator values1Iterator = relation1.values().iterator();
Iterator keys2Iterator = relation2.keySet().iterator();
Iterator values2Iterator = relation2.values().iterator();
while (keys1Iterator.hasNext()) //loop through relation1
String primaryKey1 = (String)keys1Iterator.next();
String foreignKey1 = (String)values1Iterator.next();
while (keys2Iterator.hasNext())//loop through realtion2
String primaryKey2 = (String)keys2Iterator.next();
String foreignKey2 = (String)values2Iterator.next();
if (foreignKey1 == primaryKey2)
resultRelation.put(primaryKey1, primaryKey2 + "\t" + foreignKey2);
return resultRelation;
}You have to construct the second iterators inside the first while loop, otherwise you will always check against the value of the last key in the first iterator.
private static Map equiJoin(Map relation1, Map relation2){
Map resultRelation = new TreeMap();
Iterator keys1Iterator = relation1.keySet().iterator();
Iterator values1Iterator = relation1.values().iterator();
while (keys1Iterator.hasNext()){
String primaryKey1 = (String)keys1Iterator.next();
String foreignKey1 = (String)values1Iterator.next();
Iterator keys2Iterator = relation2.keySet().iterator();
Iterator values2Iterator = relation2.values().iterator();
while (keys2Iterator.hasNext()){
String primaryKey2 = (String)keys2Iterator.next();
String foreignKey2 = (String)values2Iterator.next();
if (foreignKey1 == primaryKey2)
resultRelation.put(primaryKey1, primaryKey2 + "\t" + foreignKey2);
return resultRelation;
} -
Could somebody see what is wrong that does not come to my eyes?
Hello,
I can't see what is wrong with this code:
I have eleminated excessive codes to make it easier to read... When this code is run I can see the first 3 dialog of app.alert but nothing after than... I can see p is not equal to nP... or at least I should have fallen one time into the do While loop? shouldn't I? The red app.alert is not displayed why?
var inch = 72;
try
{ nP = this.numPages;
var p = 0;
var x = 0.5;
app.alert ('p='+ p);
app.alert ('nP='+ nP);
app.alert ('this.numPages='+ nP);
do
switch (nP)
case 1:
{app.alert ('case 1 nP = '+ nP);
Add2LastPage();
p += 1;
break;}
case nP > 1:
{app.alert ('case nP > 1 = '+ nP);
switch (p)
case 0:
x += 0.3;
p += 1;
break;}
default:
x += 0.3;
x += 0.3;
x += 0.3;
p += 1;
break;}
while (p != nP);
Add2LastPage();
catch (e)
app.alert(e);Why not use a for loop to go thorugh your pages?
You can use the switch within the for loop.
Some comments within your code will show others what you are trying to accomplish. -
Can't see whats wrong? help
Hi i've made an applet that has 12 buttons on it, and when the user presses 4 buttons it is stored in an array called myList. Each time a button is pressed sequenceCheck method i created gets called. This has a list of the possible correct combinations that the user could press the buttons in. I have 23 solutions so far. Most of them are working fine however any solution that has the button10, button11 or button 12 in it doesn't seem to work? And i'm not sure why? I've looked at the code over and over and can't see what i've done wrong.
Solutions that don't seem to work are: solution 3, solution 7, solution 8, solution 9, solution 11, solution 13, solution 16, solution 17, solution 18, solution 18, solution 19, solution 20, solution 22 and solution 23. Sll of which have ethier button 10, button 11 or button 12 in it?
If anyone can see what i've done it would really appreciate the help.
package stampGame;
// Description:
// Directory: c:\myjava\teaching
// Date: 5/4/00
// Uses:
// Comments: note the convenient use of the Point object for
// manipulating coordinates
import java.applet.*;
import java.awt.*;
import java.awt.event.*;
import java.lang.*;
import java.util.*;
import javax.swing.JOptionPane;
public class StampGame extends Applet implements ActionListener{
final int N= 12;
final int P = 3;
final int Q = 3;
String[] buttonLabel = {"1","2","3","4","5","6","7","8","9","10","11","12"};
Button[] button = new Button[N];
private int combinationsFound = 0;
ArrayList<String> myList = new ArrayList<String>();
ArrayList<String> solutionsFound = new ArrayList<String>();
public void init(){
setBackground(Color.blue); // Applet background color
setLayout(null);
System.out.println(myList);
for(int i=0; i<N; ++i)
button[i] = new Button(buttonLabel);
button[i].setFont(new java.awt.Font("Dialog", 1, 24));
button[i].setBackground(Color.white); // buttons colour
button[i].addActionListener(this);
add(button[i]);
public void paint (Graphics g){
Insets a = insets();
button[0].reshape(10+a.left,10+a.top, 100,100);
button[1].reshape(110+a.left,10+a.top, 100,100);
button[2].reshape(210+a.left,10+a.top, 100,100);
button[3].reshape(310+a.left,10+a.top, 100,100);
button[4].reshape(10+a.left,100+a.top, 100,100);
button[5].reshape(110+a.left,100+a.top, 100,100);
button[6].reshape(210+a.left,100+a.top, 100,100);
button[7].reshape(310+a.left,100+a.top, 100,100);
button[8].reshape(10+a.left,200+a.top, 100,100);
button[9].reshape(110+a.left,200+a.top, 100,100);
button[10].reshape(210+a.left,200+a.top, 100,100);
button[11].reshape(310+a.left,200+a.top, 100,100);
g.drawString("Number of combinations found: " + combinationsFound, 500, 100);
public void actionPerformed(ActionEvent e) {
// TODO Auto-generated method stub
if(e.getSource() == button[0]){
System.out.println("one");
myList.add("button1");
System.out.println(myList);
sequenceCheck();
if(e.getSource() == button[1]){
System.out.println("two");
myList.add("button2");
System.out.println(myList);
sequenceCheck();
if(e.getSource() == button[2]){
System.out.println("three");
myList.add("button3");
System.out.println(myList);
sequenceCheck();
if(e.getSource() == button[3]){
System.out.println("four");
myList.add("button4");
System.out.println(myList);
sequenceCheck();
if(e.getSource() == button[4]){
System.out.println("five");
myList.add("button5");
System.out.println(myList);
sequenceCheck();
if(e.getSource() == button[5]){
System.out.println("six");
myList.add("button6");
System.out.println(myList);
sequenceCheck();
if(e.getSource() == button[6]){
System.out.println("seven");
myList.add("button7");
System.out.println(myList);
sequenceCheck();
if(e.getSource() == button[7]){
System.out.println("eight");
myList.add("button8");
System.out.println(myList);
sequenceCheck();
if(e.getSource() == button[8]){
System.out.println("nine");
myList.add("button9");
System.out.println(myList);
sequenceCheck();
if(e.getSource() == button[9]){
System.out.println("ten");
myList.add("button10");
System.out.println(myList);
sequenceCheck();
if(e.getSource() == button[10]){
System.out.println("eleven");
myList.add("button11");
System.out.println(myList);
sequenceCheck();
if(e.getSource() == button[11]){
System.out.println("twelve");
myList.add("button12");
System.out.println(myList);
sequenceCheck();
public void sequenceCheck(){
//ArrayList<String> solutionsFound = new ArrayList<String>();
ArrayList<String> solution1 = new ArrayList<String>();
ArrayList<String> solution2 = new ArrayList<String>();
ArrayList<String> solution3 = new ArrayList<String>();
ArrayList<String> solution4 = new ArrayList<String>();
ArrayList<String> solution5 = new ArrayList<String>();
ArrayList<String> solution6 = new ArrayList<String>();
ArrayList<String> solution7 = new ArrayList<String>();
ArrayList<String> solution8 = new ArrayList<String>();
ArrayList<String> solution9 = new ArrayList<String>();
ArrayList<String> solution10 = new ArrayList<String>();
ArrayList<String> solution11 = new ArrayList<String>();
ArrayList<String> solution12 = new ArrayList<String>();
ArrayList<String> solution13 = new ArrayList<String>();
ArrayList<String> solution14 = new ArrayList<String>();
ArrayList<String> solution15 = new ArrayList<String>();
ArrayList<String> solution16 = new ArrayList<String>();
ArrayList<String> solution17 = new ArrayList<String>();
ArrayList<String> solution18 = new ArrayList<String>();
ArrayList<String> solution19 = new ArrayList<String>();
ArrayList<String> solution20 = new ArrayList<String>();
ArrayList<String> solution21 = new ArrayList<String>();
ArrayList<String> solution22 = new ArrayList<String>();
ArrayList<String> solution23 = new ArrayList<String>();
Collections.sort(myList);
// SOLUTION ONE
solution1.add("button1");
solution1.add("button2");
solution1.add("button3");
solution1.add("button4");
System.out.println("Solution 1 = " + solution1);
// SOLUTION 2
solution2.add("button5");
solution2.add("button6");
solution2.add("button7");
solution2.add("button8");
System.out.println("Solution2 = " + solution2);
// SOLUTION 3
solution3.add("button9");
solution3.add("button10");
solution3.add("button11");
solution3.add("button12");
System.out.println("Solution3 = " + solution3);
// SOLUTION 4
solution4.add("button1");
solution4.add("button2");
solution4.add("button5");
solution4.add("button6");
System.out.println("Solution4 = " + solution4);
// SOLUTION 5
solution5.add("button3");
solution5.add("button4");
solution5.add("button7");
solution5.add("button8");
System.out.println("Solution5 = " + solution5);
// SOLUTION 6
solution6.add("button2");
solution6.add("button3");
solution6.add("button6");
solution6.add("button7");
System.out.println("Solution6 = " + solution6);
// SOLUTION 7
solution7.add("button5");
solution7.add("button6");
solution7.add("button9");
solution7.add("button10");
System.out.println("Solution7 = " + solution7);
// SOLUTION 8
solution8.add("button7");
solution8.add("button8");
solution8.add("button11");
solution8.add("button12");
System.out.println("Solution8 = " + solution8);
// SOLUTION 9
solution9.add("button6");
solution9.add("button7");
solution9.add("button10");
solution9.add("button11");
System.out.println("Solution9 = " + solution9);
// SOLUTION 10
solution10.add("button1");
solution10.add("button2");
solution10.add("button6");
solution10.add("button7");
System.out.println("Solution10 = " + solution10);
// SOLUTION 11
solution11.add("button5");
solution11.add("button6");
solution11.add("button10");
solution11.add("button11");
System.out.println("Solution11 = " + solution11);
// SOLUTION 12
solution12.add("button2");
solution12.add("button3");
solution12.add("button7");
solution12.add("button8");
System.out.println("Solution12 = " + solution12);
// SOLUTION 13
solution13.add("button6");
solution13.add("button7");
solution13.add("button11");
solution13.add("button12");
System.out.println("Solution13 = " + solution13);
// SOLUTION 14
solution14.add("button2");
solution14.add("button3");
solution14.add("button5");
solution14.add("button6");
System.out.println("Solution14 = " + solution14);
// SOLUTION 15
solution15.add("button3");
solution15.add("button4");
solution15.add("button6");
solution15.add("button7");
System.out.println("Solution15 = " + solution15);
// SOLUTION 16
solution16.add("button6");
solution16.add("button7");
solution16.add("button9");
solution16.add("button11");
System.out.println("Solution16 = " + solution16);
// SOLUTION 17
solution17.add("button7");
solution17.add("button8");
solution17.add("button10");
solution17.add("button11");
System.out.println("Solution17 = " + solution17);
// SOLUTION 18
solution18.add("button1");
solution18.add("button5");
solution18.add("button6");
solution18.add("button10");
System.out.println("Solution18 = " + solution18);
// SOLUTION 19
solution19.add("button2");
solution19.add("button6");
solution19.add("button7");
solution19.add("button11");
System.out.println("Solution19 = " + solution19);
// SOLUTION 20
solution20.add("button3");
solution20.add("button7");
solution20.add("button8");
solution20.add("button12");
System.out.println("Solution20 = " + solution20);
// SOLUTION 21
solution21.add("button2");
solution21.add("button5");
solution21.add("button6");
solution21.add("button9");
System.out.println("Solution21 = " + solution21);
// SOLUTION 22
solution22.add("button3");
solution22.add("button6");
solution22.add("button7");
solution22.add("button10");
System.out.println("Solution22 = " + solution22);
// SOLUTION 23
solution23.add("button4");
solution23.add("button7");
solution23.add("button8");
solution23.add("button11");
System.out.println("Solution23 = " + solution23);
System.out.println("buttons pressed = " + myList);
System.out.println("solutions found = " + solutionsFound);
Collections.sort(myList);
if(myList.equals(solution1)){
if(solutionsFound.contains("solution1")){
JOptionPane.showMessageDialog(null, "Combinations already found");
myList.clear();
else {
combinationsFound++;
JOptionPane.showMessageDialog(null, "Winner");
myList.clear();
repaint();
solutionsFound.add("solution1");
System.out.println("solutions found = " + solutionsFound);
else if(myList.equals(solution2)){
if(solutionsFound.contains("solution2")){
JOptionPane.showMessageDialog(null, "Combinations already found");
myList.clear();
else {
combinationsFound++;
JOptionPane.showMessageDialog(null, "Winner");
myList.clear();
repaint();
solutionsFound.add("solution2");
System.out.println("solutions found = " + solutionsFound);
else if(myList.equals(solution3)){
if(solutionsFound.contains("solution3")){
JOptionPane.showMessageDialog(null, "Combinations already found");
myList.clear();
else {
combinationsFound++;
JOptionPane.showMessageDialog(null, "Winner");
myList.clear();
repaint();
solutionsFound.add("solution3");
System.out.println("solutions found = " + solutionsFound);
else if(myList.equals(solution4)){
if(solutionsFound.contains("solution4")){
JOptionPane.showMessageDialog(null, "Combinations already found");
myList.clear();
else {
combinationsFound++;
JOptionPane.showMessageDialog(null, "Winner");
myList.clear();
repaint();
solutionsFound.add("solution4");
System.out.println("solutions found = " + solutionsFound);
else if(myList.equals(solution5)){
if(solutionsFound.contains("solution5")){
JOptionPane.showMessageDialog(null, "Combinations already found");
myList.clear();
else {
combinationsFound++;
JOptionPane.showMessageDialog(null, "Winner");
myList.clear();
repaint();
solutionsFound.add("solution5");
System.out.println("solutions found = " + solutionsFound);
else if(myList.equals(solution6)){
if(solutionsFound.contains("solution6")){
JOptionPane.showMessageDialog(null, "Combinations already found");
myList.clear();
else {
combinationsFound++;
JOptionPane.showMessageDialog(null, "Winner");
myList.clear();
repaint();
solutionsFound.add("solution6");
System.out.println("solutions found = " + solutionsFound);
else if(myList.equals(solution7)){
if(solutionsFound.contains("solution7")){
JOptionPane.showMessageDialog(null, "Combinations already found");
myList.clear();
else {
combinationsFound++;
JOptionPane.showMessageDialog(null, "Winner");
myList.clear();
repaint();
solutionsFound.add("solution7");
System.out.println("solutions found = " + solutionsFound);
else if(myList.equals(solution8)){
if(solutionsFound.contains("solution8")){
JOptionPane.showMessageDialog(null, "Combinations already found");
myList.clear();
else {
combinationsFound++;
JOptionPane.showMessageDialog(null, "Winner");
myList.clear();
repaint();
solutionsFound.add("solution8");
System.out.println("solutions found = " + solutionsFound);
else if(myList.equals(solution9)){
if(solutionsFound.contains("solution9")){
JOptionPane.showMessageDialog(null, "Combinations already found");
myList.clear();
else {
combinationsFound++;
JOptionPane.showMessageDialog(null, "Winner");
myList.clear();
repaint();
solutionsFound.add("solution9");
System.out.println("solutions found = " + solutionsFound);
else if(myList.equals(solution10)){
if(solutionsFound.contains("solution10")){
JOptionPane.showMessageDialog(null, "Combinations already found");
myList.clear();
else {
combinationsFound++;
JOptionPane.showMessageDialog(null, "Winner");
myList.clear();
repaint();
solutionsFound.add("solution10");
System.out.println("solutions found = " + solutionsFound);
else if(myList.equals(solution11)){
if(solutionsFound.contains("solution11")){
JOptionPane.showMessageDialog(null, "Combinations already found");
myList.clear();
else {
combinationsFound++;
JOptionPane.showMessageDialog(null, "Winner");
myList.clear();
repaint();
solutionsFound.add("solution11");
System.out.println("solutions found = " + solutionsFound);
else if(myList.equals(solution12)){
if(solutionsFound.contains("solution12")){
JOptionPane.showMessageDialog(null, "Combinations already found");
myList.clear();
else {
combinationsFound++;
JOptionPane.showMessageDialog(null, "Winner");
myList.clear();
repaint();
solutionsFound.add("solution12");
System.out.println("solutions found = " + solutionsFound);
else if(myList.equals(solution13)){
if(solutionsFound.contains("solution13")){
JOptionPane.showMessageDialog(null, "Combinations already found");
myList.clear();
else {
combinationsFound++;
JOptionPane.showMessageDialog(null, "Winner");
myList.clear();
repaint();
solutionsFound.add("solution13");
System.out.println("solutions found = " + solutionsFound);
else if(myList.equals(solution14)){
if(solutionsFound.contains("solution14")){
JOptionPane.showMessageDialog(null, "Combinations already found");
myList.clear();
else {
combinationsFound++;
JOptionPane.showMessageDialog(null, "Winner");
myList.clear();
repaint();
solutionsFound.add("solution14");
System.out.println("solutions found = " + solutionsFound);
else if(myList.equals(solution15)){
if(solutionsFound.contains("solution15")){
JOptionPane.showMessageDialog(null, "Combinations already found");
myList.clear();
else {
combinationsFound++;
JOptionPane.showMessageDialog(null, "Winner");
myList.clear();
repaint();
solutionsFound.add("solution15");
System.out.println("solutions found = " + solutionsFound);
else if(myList.equals(solution16)){
if(solutionsFound.contains("solution16")){
JOptionPane.showMessageDialog(null, "Combinations already found");
myList.clear();
else {
combinationsFound++;
JOptionPane.showMessageDialog(null, "Winner");
myList.clear();
repaint();
solutionsFound.add("solution16");
System.out.println("solutions found = " + solutionsFound);
else if(myList.equals(solution17)){
if(solutionsFound.contains("solution17")){
JOptionPane.showMessageDialog(null, "Combinations already found");
myList.clear();
else {
combinationsFound++;
JOptionPane.showMessageDialog(null, "Winner");
myList.clear();
repaint();
solutionsFound.add("solution17");
System.out.println("solutions found = " + solutionsFound);
else if(myList.equals(solution18)){
if(solutionsFound.contains("solution18")){
JOptionPane.showMessageDialog(null, "Combinations already found");
myList.clear();
else {
combinationsFound++;
JOptionPane.showMessageDialog(null, "Winner");
myList.clear();
repaint();
solutionsFound.add("solution18");
System.out.println("solutions found = " + solutionsFound);
else if(myList.equals(solution19)){
if(solutionsFound.contains("solution19")){
JOptionPane.showMessageDialog(null, "Combinations already found");
myList.clear();
else {
combinationsFound++;
JOptionPane.showMessageDialog(null, "Winner");
myList.clear();
repaint();
solutionsFound.add("solution19");
System.out.println("solutions found = " + solutionsFound);
else if(myList.equals(solution20)){
if(solutionsFound.contains("solution20")){
JOptionPane.showMessageDialog(null, "Combinations already found");
myList.clear();
else {
combinationsFound++;
JOptionPane.showMessageDialog(null, "Winner");
myList.clear();
repaint();
solutionsFound.add("solution20");
System.out.println("solutions found = " + solutionsFound);
else if(myList.equals(solution21)){
if(solutionsFound.contains("solution21")){
JOptionPane.showMessageDialog(null, "Combinations already found");
myList.clear();
else {
combinationsFound++;
JOptionPane.showMessageDialog(null, "Winner");
myList.clear();
repaint();
solutionsFound.add("solution21");
System.out.println("solutions found = " + solutionsFound);
else if(myList.equals(solution22)){
if(solutionsFound.contains("solution22")){
JOptionPane.showMessageDialog(null, "Combinations already found");
myList.clear();
else {
combinationsFound++;
JOptionPane.showMessageDialog(null, "Winner");
myList.clear();
repaint();
solutionsFound.add("solution22");
System.out.println("solutions found = " + solutionsFound);
else if(myList.equals(solution23)){
if(solutionsFound.contains("solution23")){
JOptionPane.showMessageDialog(null, "Combinations already found");
myList.clear();
else {
combinationsFound++;
JOptionPane.showMessageDialog(null, "Winner");
myList.clear();
repaint();
solutionsFound.add("solution23");
System.out.println("solutions found = " + solutionsFound);
From [How To Ask Questions The Smart Way|http://www.catb.org/~esr/faqs/smart-questions.html]
[Volume is not precision|http://www.catb.org/~esr/faqs/smart-questions.html#volume] :
You need to be precise and informative. This end is not served by simply dumping huge volumes of code or data into a help request. If you have a large, complicated test case that is breaking a program, try to trim it and make it as small as possible.
This is useful for at least three reasons. One: being seen to invest effort in simplifying the question makes it more likely you'll get an answer, Two: simplifying the question makes it more likely you'll get a useful answer. Three: In the process of refining your bug report, you may develop a fix or workaround yourself.
Also please read up on god-objects (wikipedia has a write up on this) which is cured by dividing and conquering. Finally, you really need to simplify this code by using loops with your arrays. You can shorten this beast by over 70%, easy making it much, much easier to debug.
Edited by: Encephalopathic on Mar 30, 2008 6:59 AM -
My iPod is not connecting to the Wi-Fi and it is grayed out, so i can't click it to see what is wrong. I tried what apple says to do if this happens, but it still is not working. What do I do?
See:
iOS: Wi-Fi or Bluetooth settings grayed out or dim
It is frequently a hardware problem and an appointment at the genius bar of an Apple store is in order. -
How can I see what is on my cloud?
How can I see what is on my cloud? Also, I keep getting asked to manage storage when I am watching videos that I have bought through the store. I have bought lots of cloud space only half of which is used. Is my device too full of pictures or videos and how do I know if they are on the cloud or stored on the I tunes store where I bought them from?
Managing (iCloud Data) on Your iPad
http://www.peachpit.com/articles/article.aspx?p=1899113
How much space is used by your Other? You may be able to reduce.
How Do I Get Rid Of The “Other” Data Stored On My iPad Or iPhone?
http://tinyurl.com/85w6xwn
With an iOS device, the “Other” space in iTunes is used to store things like documents, settings, caches, and a few other important items. If you sync lots of documents to apps like GoodReader, DropCopy, or anything else that reads external files, your storage use can skyrocket. With iOS 5/6/7, you can see exactly which applications are taking up the most space. Just head to Settings > General > Usage, and tap the button labeled Show All Apps. The storage section will show you the app and how much storage space it is taking up. Tap on the app name to get a description of the additional storage space being used by the app’s documents and data. You can remove the storage-hogging application and all of its data directly from this screen, or manually remove the data by opening the app. Some applications, especially those designed by Apple, will allow you to remove stored data by swiping from left to right on the item to reveal a Delete button.
Cheers, Tom -
How can i see what devices are connected to my icloud?
I want to know if pictues from my mac are on any other devices. How can i see what other devices i have connected to my icloud?
My brother asked me for my account one day but i don't know if he used it to connect icloud or to just download an app. I just want to see if his device is connected to my icloud and if so, i want to disconnect him. So is there any site or anything i can do to see what devices are connected?
-
Where can i see what photos are stored on icloud
Hi i have lost some photo's from my computers hard drive!!!! arrrgh! the photo's were taken with my old iphone and orginally shared on my icloud account! How can i see what my icloud is storing????
HELP PLEASE!!!!Photo stream photos can only been seen on devices connected to your photo stream, not on icloud.com. Also, be aware that photos are only kept in photo stream for 30 days. After that they are removed from photo stream but will remain on any device that has already received them. In other words, if the photos you are looking for are older than 30 days they won't be in photo stream any longer. They would only be in the photo stream album of a device that has already received these older photos from photo stream.
The only other place iCloud stores photos is in a device backup. If your old phone was backed up to iCloud and if the backup is still in iCloud, the backup should contain the photos. However, the ony way to acces them would be to restore a device to the entire backup, including all its data, not just the photos.
Finally, if you backed up your old phone to your computer by syncing it with iTunes, this backup would also include camera roll photos. If the backup is on your computer you can use 3rd party software such as iPhone Backup Extractor to extract the photos from this backup and avoid having to restore the entire backup to another device to access them. -
My iPhone 4S won't turn on it's been off for two days now. I tried charging it but it makes a noise every 8 seconds,holding the buttons down and also plugging it to a computer. I need help on what to do or if anybody can tell me what's wrong with my phone
Yes ive tried a different charger and it also nothing shows when i plug it in just makes a noise
Maybe you are looking for
-
Ndivia 320m video card getting very hot
I have a 13 inch Macbook Pro from mid 2010 with the nvidia 320m graphics card and lattely the computer has been very warm. Namely, during normal work in Mac with iTunes, Safari, iCal etc. open the computer performs well (at roughly 2000-3000 rps for
-
after writing an html report on a floppy disk and removing it, labview shows an error message window: disk not present. My pc is based on asus motherboard. Labview 7 and Windows 2000 sp4 installed. The error message continue also if i stop the applic
-
Error message FI 759: Fund does not exist in FM area
Hill! I have to make a distribution in CO-OM (tr KSV5) according to fund But if I customize fund as sender, choose fund from the fund catalog and make a formal chek of cycle I see an error message FI 759: Fund does not exist in FM area. How can I ma
-
Stop sales order replication from CRM to R/3
Hi friends, How can we stop the sales order Replication from CRM to R/3? Pls Guide me. Thanking u in advance.
-
I am trying to reset password, but I did not receive the promised email that should allow me to reset. Can you help?