Click here to Skip to main content
15,920,111 members
Home / Discussions / Java
   

Java

 
GeneralRe: Problems Implementing Functions into Main.java Pin
Richard MacCutchan23-Sep-09 5:43
mveRichard MacCutchan23-Sep-09 5:43 
GeneralRe: Problems Implementing Functions into Main.java Pin
David Skelly23-Sep-09 6:24
David Skelly23-Sep-09 6:24 
GeneralRe: Problems Implementing Functions into Main.java [modified] Pin
wkid8723-Sep-09 16:59
wkid8723-Sep-09 16:59 
GeneralRe: Problems Implementing Functions into Main.java Pin
David Skelly24-Sep-09 3:35
David Skelly24-Sep-09 3:35 
AnswerRe: Problems Implementing Functions into Main.java Pin
427748023-Sep-09 18:22
427748023-Sep-09 18:22 
QuestionN Queens Problem help Pin
shiggedyshwa21-Sep-09 19:20
shiggedyshwa21-Sep-09 19:20 
AnswerRe: N Queens Problem help Pin
427748021-Sep-09 20:27
427748021-Sep-09 20:27 
GeneralRe: N Queens Problem help Pin
shiggedyshwa21-Sep-09 21:15
shiggedyshwa21-Sep-09 21:15 
right, i have read the algorithm from there, but the place i got the one im using is from our sheet of paper the professor gave us.
and i have been to that page that you sent me in the second link
i see, i suppose, how to do it
but is there a way to do it without having to make enumarate twice, printQueens, and isConsistent?
i am asking if there is a way i can do it in just one public NQueensProblemSingleSolution(int n)
and then a toString() method,

and also i have come across a new discovery since i posted this i have tried:

if (n % 6 == 2) {
    for (int m=1; m<=n/2; m++) {
        for(int k = 0; k<2; k++) {
            if(k == 0) {
                j = 1 + (2*(m-1) + n/2 - 1) % n;
                i = m;
            }
            else {
                j = n - (2*(m-1) + n/2 - 1) % n;
                i = n + 1 - m;
            }
  solutionVector[--j] = --i;
  }
    }
}

(this is for the case where n is even but not of the form 6k + 2)
and i declared int i, j above now.
but i am sort of confused with this, would it be right?
i mean
ugh i cant ask it correctly,
QuestionRead a file and find text Pin
Mbu00720-Sep-09 22:28
Mbu00720-Sep-09 22:28 
AnswerRe: Read a file and find text Pin
427748021-Sep-09 4:31
427748021-Sep-09 4:31 
QuestionHow do i get all values from a JTextfields that is located on another JInternalFrame? Pin
miceisland20-Sep-09 20:36
miceisland20-Sep-09 20:36 
AnswerRe: How do i get all values from a JTextfields that is located on another JInternalFrame? Pin
427748021-Sep-09 4:37
427748021-Sep-09 4:37 
QuestionHaving trouble with recursion (kind of long, but please read) Pin
KingLane20-Sep-09 12:48
KingLane20-Sep-09 12:48 
AnswerI got the code to work Pin
KingLane20-Sep-09 14:06
KingLane20-Sep-09 14:06 
QuestionJava projects Pin
prietycool19-Sep-09 0:29
prietycool19-Sep-09 0:29 
AnswerRe: Java projects Pin
Richard MacCutchan20-Sep-09 9:29
mveRichard MacCutchan20-Sep-09 9:29 
QuestionJava web Project using Springs Pin
prietycool19-Sep-09 0:27
prietycool19-Sep-09 0:27 
AnswerRe: Java web Project using Springs Pin
427748021-Sep-09 5:22
427748021-Sep-09 5:22 
QuestionMerge Sort problem Pin
snssewell18-Sep-09 18:02
snssewell18-Sep-09 18:02 
AnswerRe: Merge Sort problem Pin
427748018-Sep-09 18:13
427748018-Sep-09 18:13 
GeneralRe: Merge Sort problem Pin
snssewell18-Sep-09 18:25
snssewell18-Sep-09 18:25 
GeneralResolved Pin
snssewell18-Sep-09 18:29
snssewell18-Sep-09 18:29 
GeneralRe: Merge Sort problem Pin
427748018-Sep-09 18:30
427748018-Sep-09 18:30 
GeneralRe: Another Problem now Pin
snssewell18-Sep-09 18:46
snssewell18-Sep-09 18:46 
AnswerRe: Merge Sort problem Pin
427748018-Sep-09 18:59
427748018-Sep-09 18:59 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.