Click here to Skip to main content
       

Java

 
AnswerRe: Java code Convert to C# PinmemberDave Doknjas17-Nov-12 3:17 
QuestionTower of hanoi in java Pinmemberprog.sidra11-Nov-12 21:19 
AnswerRe: Tower of hanoi in java PinmvpRichard MacCutchan11-Nov-12 21:49 
AnswerRe: Tower of hanoi in java PinmemberTorstenH.12-Nov-12 0:22 
GeneralRe: Tower of hanoi in java Pinmemberprog.sidra12-Nov-12 19:58 
QuestionIf element in diagonal is 1 then its unit matrix , else it's not unit matrix [modified] PinmemberAsad JOgi11-Nov-12 19:26 
AnswerRe: If element in diagonal is 1 then its unit matrix , else it's not unit matrix PinmemberTorstenH.11-Nov-12 21:15 
AnswerRe: If element in diagonal is 1 then its unit matrix , else it's not unit matrix PinmemberBobJanova13-Nov-12 0:06 
That's not the complete rule for an identity matrix. The complete rule is that the matrix contains only 1s on the leading diagonal.
 
Don't hand this in, your teacher won't like the code style, but ...
 
boolean isIdentity(int[][] m) {
 boolean isIdentity = true;
 for(int i = 0; i < m.length; i++) for(j = 0; j < m[i].length; j++)
  isIdentity &= m[i][j] == (i == j ? 1 : 0);
 return isIdentity;
}
 
... I need to get my crazy coding instincts out in a controlled environment now and then Smile | :)
QuestionError show ImageIcon ??? Pinmembernghia09t39-Nov-12 19:34 
AnswerRe: Error show ImageIcon ??? PinmvpRichard MacCutchan9-Nov-12 23:32 
AnswerRe: Error show ImageIcon ??? PinmemberTorstenH.10-Nov-12 14:02 
GeneralRe: Error show ImageIcon ??? PinmemberGowtham Gutha15-Nov-12 6:46 
GeneralRe: Error show ImageIcon ??? PinmemberTorstenH.15-Nov-12 9:00 
GeneralRe: Error show ImageIcon ??? PinmemberGowtham Gutha16-Nov-12 7:08 
GeneralRe: Error show ImageIcon ??? PinmemberTorstenH.18-Nov-12 19:10 
AnswerRe: Error show ImageIcon ??? PinmemberGowtham Gutha15-Nov-12 6:43 
Questionhow to create digital survey android and php?? PinmemberLuis Antonio Mantilla9-Nov-12 12:22 
QuestionAny Java Book Recommend Pinmemberwaylife7-Nov-12 19:14 
AnswerRe: Any Java Book Recommend PinmemberPeter_in_27808-Nov-12 1:13 
GeneralRe: Any Java Book Recommend Pinmemberwaylife12-Nov-12 22:07 
AnswerRe: Any Java Book Recommend PinmemberGowtham Gutha9-Nov-12 9:02 
GeneralRe: Any Java Book Recommend Pinmemberwaylife12-Nov-12 22:08 
GeneralRe: Any Java Book Recommend PinmemberGowtham Gutha15-Nov-12 0:22 
GeneralRe: Any Java Book Recommend Pinmemberwaylife15-Nov-12 3:10 
GeneralRe: Any Java Book Recommend Pinmemberwaylife14-Nov-12 0:54 

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

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


Advertise | Privacy | Mobile
Web03 | 2.8.140415.2 | Last Updated 18 Apr 2014
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Use
Layout: fixed | fluid