@# Quotes DB     useful, funny, interesting





Google
 
Web www.quotesdb.info
Undernet  |  EFnet  |  Quakenet  |  Freenode  |  Dalnet  |  Ircnet  |  Galaxynet
Page: 1 2 3 4 5 6 7



Comments:

<0> anyone who can take a look at my code and give me a fast answer?
<1> raki: if you want help, you should at least post the url of the code.
<1> And ask the question, ***uming it's short, in channel
<0> :D
<1> That way, people can take-it-or-leave-it
<0> true..
<0> ok, this is my issue
<0> main cl*** uses addData()
<0> addData(String [][] posts, int i);
<0> i want it to send back i after it has changed it :o
<0> but it doesnt want to
<0> can u help me with that LLyric?
<2> is there something faster than Collection.contains which would about the same?
<2> raki



<2> what do you want to "send back" ?
<0> Int i;
<2> why dont you use "return i;" ?
<0> i tried return i; but little luck :)
<0> public static int addPost (String [][] posts, int i) {
<0> ..
<2> public int addData(String [][] posts, int i)
<0> return i;
<0> }
<2> and you can't return i;
<0> maybe the static ****s up?
<2> what kind of error do you get?
<0> none
<0> but i cant seem to catch it
<2> ok so why do you say it doesnt work?
<0> cause hmm
<0> when i check if (i == 0) at the end of the main process
<0> it says it is
<0> and it shouldnt be
<0> since its increased..
<2> ok
<0> how do u printout integers?
<2> where you call addData()
<0> u need to make them strings?
<0> in the main process..
<0> err main thingie
<0> the head program whatever
<2> use System.out.println("return value : " + addData(posts, i));
<2> it will print
<2> and you'll see what value is returned
<0> hmm
<0> in the main progrma?
<2> wherever you are calling addData
<0> ay
<0> u gave me 45 errors :)
<3> if addData isn't static....
<3> I ***ume he's trying this stuff from the main method /without/ creating a new instance.
<0> addData is static :e
<0> and it was addPost actually..
<0> addPost(posts, i);
<0> System.out.println("return value : " + addPost(posts, i));
<0> }
<3> well, without the code and an actual question/problem its just guessing anyway
<0> }
<0> public static int addPost (String [][] posts, int i) {
<0> whats url to that pasting site?
<2> try looking in the topic
<3> checked the /topic of this channel?
<2> .//topic $chan
<0> i see no topic sry
<0> The page cannot be displayed
<3> uh huh
<2> he's right =)
<3> oh well, seems the channel is closed for the night then. Cool! ;)
<0> http://rafb.net/p/rCG0a015.html
<0> thats the code..
<0> please dont laugh :(
<2> ok
<3> this is silly
<2> #1 dont name your cl*** "List" as there is another cl*** from Java called "List"



<3> if addPost is creating output why call it twice?
<3> thats not even done in c++ in which you said to be somewhat familiar.
<0> err
<0> i never said that lion..
<3> why even call it out of the blue?
<0> and i dont call it twice?
<3> lessee
<0> that line system.out.println(return: ...) thing
<0> is what i added that Zarathushtra told me to add
<0> didnt have that before :o
<0> without that it does what i want it to do..
<3> aaah, gotcha. Mixed it up with someone else. My mistake.
<0> except that i want to get the i back..
<0> after its manipulated..
<3> anyway... Its still an issue of thinking things over.
<0> to keep track of where in the array i am..
<3> Why call/use a method which produces output out of the blue?
<0> output of the blue? :e
<0> i just want it to add to my array..
<3> never mind.
<0> and keep track of the index..
<2> lol
<2> System.out.println(Color.blue);
<0> ^^
<3> To end this thread for me I'll repeat what I said earlier on: it helps to actually read up on your basics instead of forcefully trying to dive into it. This is not going to work and will eventually turn out to be a waste of time. Yours and ours.
<3> at least IMO.
<0> Lion-O, well it works already.. except for the matter of getting the i sent back..
<0> it does what i want it to do atleast..
<0> maybe not in the proper way..
<3> raki: "it works" doesn't get you through an exam.
<2> omfg
<2> you would get fired from my last job with comments like that
<3> And having read up the entire thead that was what you were after.
<0> indeed..
<0> but nor does writing another bunch of hello world..
<3> Zarathushtra: lol
<2> ok Lion-O it's my turn now
<0> shoot!
<2> i must confess now, it's for homework
<0> oh i thought u ment like.. my turn to flame raki!
<0> crap.. :(
<2> i'm writing a sudoku solver
<2> in fact, it's already working and all
<3> if you call my comments flaming them you really have a problem. Thats not even coming close.
<0> Lion-O didnt mean flaming in a "bad" way..
<0> =)
<2> it solves the sudoku in about 100 millisecs and i'm aiming at about 50 millisecs
<0> i appriciate all comments i get..
<2> so i've used JProfiler which tells me that it's Collection.contains() which takes up most of the time
<2> 2/3 of that time is with the actual contains() and 1/3 is for my custom made .equals() method which actually allows me to call the .contains()
<2> so, my question is : is there any way to check if an element is inside a LinkedList which whould be faster than using LinkedList.contains()
<2> my LinkedList have exactly 9 elements all the time
<0> hope ur not looking at me..
<2> Lion-O stopped reading at the line : " [19:45:01] <2> i must confess now, it's for homework "
<0> ^^
<0> Zarathushtra help me solve my problem instead =)
<2> instead, i should have said "i'll make mad cash with my algo, help me"
<0> ^^^
<2> ok
<2> #1 rename the cl***
<2> #2 in the main, use "myList ml = new myList()"
<2> and call ml.addPosts();
<2> #3 remove the "static" keyword
<0> ok
<2> statics are usually evil
<2> also, this is just for style, but it's usually clearer when you ***ign values directly when you declare them
<2> for example, use 2 lines for "boolean add = true;" and another one for "boolean ok = false;"
<0> oh.. the error b4 btw.. was because of a } to much.. oops :P
<0> just noticed..
<2> finaly you dont need to declare String[][] temp = new String[1][7], String[] temp = new String[7] would be enough since you never use the other array
<0> but i see ur point with the first thing..
<2> do you use eclipse ?


Name:

Comments:

Please enter the result of the sum 63 + 46 (to avoid spam):






Return to #java
or
Go to some related logs:

soul.f2o.org
compare 2 arrays java
Scottish quotes on stubborness
www.vreausafut
#skype
#chatzone
#linux
java script can we create a file
Pid=76487270
#java



Home  |  disclaimer  |  contact  |  submit quotes