• cheeser
  • ernimril
  • joed
  • kinabalu
  • lunk
  • ojacobson
  • r0bby
  • ThaDon
  • ricky_clarkson
  • topriddy

« 2018-04-23


2018-04-25 »

Nick Message Date
t2mkn [t2mkn!~t2mkn@] has joined ##java [12:04]
G3nka1 [G3nka1!~hubatrix@unaffiliated/hubatrix] has joined ##java [12:18]
kooldavi [kooldavi!] has joined ##java [12:22]
djhworld [djhworld!~djhworld@] has joined ##java [12:25]
j1nn [j1nn!] has joined ##java [12:32]
jready [jready!~residentb@unaffiliated/residentbiscuit] has joined ##java [12:34]
bjpenn [bjpenn!~bjpenn@unaffiliated/brucelee] has joined ##java [12:47]
bjpenn working with spring framework, is jpa more popular than hibernate? [12:47]
bjpenn or is hibernate still pretty popular [12:48]
bjpenn (for the purposes of getting employed) [12:48]
bjpenn upon further reading, it seems hibernation is just an implementation of JPA [12:48]
bjpenn P [12:48]
deebo hibernate is a jpa implementation, but it has some things that make people use it as hibernate instead of jpa [12:49]
dangertools [dangertools!] has joined ##java [12:50]
bjpenn thanks [12:51]
bjpenn so is hibernate still fairly popular? [12:55]
bjpenn or do people mainly create JPA custom stuff? [12:55]
deebo no idea, havent used either in ages, guess they still have heavy use all over [12:59]
n35xdxb0 [n35xdxb0!~n35xdxb0@] has joined ##java [12:59]
deebo but i personally at least prefer jooq/querydsl [12:59]
isomorph [isomorph!~isomorph@gateway/tor-sasl/isomorph] has joined ##java [01:01]
xzeqkm0 [xzeqkm0!] has joined ##java [01:03]
led1 [led1!Thunderbir@nat/ibm/x-spyfnrsrrofhprbt] has joined ##java [01:10]
acidjnk [acidjnk!~acid@] has joined ##java [01:14]
led1 [led1!Thunderbir@nat/ibm/x-ezjiabrbvzfljxck] has joined ##java [01:16]
grim001 [grim001!] has joined ##java [01:17]
xzeqkm0 So I'm converting the user's input to Morse code. [01:19]
xzeqkm0 I'm not sure how i would add a space between every character in the converted output? [01:19]
xzeqkm0 I could just add a space in each replaceAll("A", ".- ") like that but was wondering if there was another way? [01:19]
xzeqkm0 Any input would be much appreciated. Hope everyone's doing well. [01:19]
bjpenn [bjpenn!~bjpenn@unaffiliated/brucelee] has joined ##java [01:20]
borkr [borkr!] has joined ##java [01:22]
di0_ [di0_!~di0_@unaffiliated/di0-/x-5053590] has joined ##java [01:24]
n35xdxb0 [n35xdxb0!~n35xdxb0@] has joined ##java [01:25]
OtakuSenpai [OtakuSenpai!~OtakuSenp@] has joined ##java [01:26]
bjpenn did anyone ever give an answer about whether hibernate is something a spring developer should most likely learn? [01:26]
bjpenn i got disconnected.. had to leave a cafe because it was closing [01:27]
t2mkn_ [t2mkn_!~t2mkn@] has joined ##java [01:27]
Diablo-D3 bjpenn: what do you plan on using to access your sql db without hibernate or some other jpa impl [01:28]
snql [snql!~snql@unaffiliated/snql] has joined ##java [01:29]
bjpenn i heard theres spring data [01:34]
bjpenn i guess that runs on top of something like hibernate [01:34]
Diablo-D3 I havent used it, but there isnt a lot of options for them to do anything [01:39]
n35xdxb0 [n35xdxb0!~n35xdxb0@] has joined ##java [01:40]
yawkat spring-data-jpa is their jpa wrapper and it's certainly sensible to learn hibernate to use it [01:45]
yawkat Spring has adapters for almost any persistence framework but jpa is probably the most popular one. [01:45]
n35xdxb0 [n35xdxb0!~n35xdxb0@] has joined ##java [01:51]
pythonick [pythonick!] has joined ##java [01:52]
liste [liste!~ilmoeuro@unaffiliated/liste] has joined ##java [01:58]
n35xdxb0 [n35xdxb0!~n35xdxb0@] has joined ##java [02:01]
coalado [coalado!~Thomas@unaffiliated/coalado] has joined ##java [02:13]
n35xdxb0 [n35xdxb0!~n35xdxb0@] has joined ##java [02:13]
ShadowWarrior [ShadowWarrior!0e8ee28d@gateway/web/cgi-irc/] has joined ##java [02:14]
apetresc [apetresc!~apetresc@2607:fea8:57a0:bb:52e5:49ff:fec9:2339] has joined ##java [02:14]
ShadowWarrior Hey guys... I have an issue with fork join pool ... [02:14]
ShadowWarrior (bear with me. I cannot share code so I am narrating the jist of its logic) [02:15]
BluesBoy [BluesBoy!] has joined ##java [02:15]
Stummi Testcase [02:17]
Stummi ShadowWarrior, sscce is a minimal independently runnable program, which demonstrates the problem; see for details and a HOWTO [02:17]
Stummi so yes, you probably can share code [02:17]
ShadowWarrior So I am using forkjoinpool with recursive task to divide a workload. Inside compute(provided workload is not further divisible), I am constructing objects of the same class and putting them in a list. The, I am calling another method of the same class from compute to get the ball rolling so to speak. But, when I am printing this in that method, it [02:17]
ShadowWarrior shows object's hash to be the last object in the list and not the object that called compute [02:17]
ShadowWarrior Stummi : thanks for that.. but I am aftraid my problem is to do with java basics and not fork join.. idk.. lemme try to whip up a test code [02:18]
yawkat Make a test case. All we can do is guess [02:18]
yawkat "your code is wrong" [02:18]
Stummi ShadowWarrior, well, in the proecess of writing a test case you would find out exactly this ;) [02:19]
ShadowWarrior ok.. workin on it [02:19]
Stummi object's hash as in x.hashCode()? [02:19]
yawkat Already starting with the guessing :p [02:20]
Stummi right, I will stop ;) [02:21]
t2mkn [t2mkn!~t2mkn@] has joined ##java [02:21]
immibis [immibis!] has joined ##java [02:26]
ShadowWarrior Ok imma share the code.. cuz I cant reproduce the problem in the test code [02:27]
ShadowWarrior [02:27]
ShadowWarrior Object calling compute is bitbnsDAO.BitBnsDAOv2@1f [02:29]
ShadowWarrior Object constructed is bitbnsDAO.BitBnsDAOv2@23b649 [02:29]
ShadowWarrior Object calling test is bitbnsDAO.BitBnsDAOv2@236f2c [02:29]
ShadowWarrior Object calling init is bitbnsDAO.BitBnsDAOv2@236f2c [02:29]
ShadowWarrior The last call to init should be from the object with the hash 1f [02:29]
Stummi (meh, why is the concept of "SSCCE" so hard to grasp for people?) [02:30]
sliekas99 [sliekas99!~mantas@] has joined ##java [02:30]
ShadowWarrior / [02:32]
Stummi ShadowWarrior, SSCCE means, "a small piece of code I can copy into my IDE and hit the run button to see your problem" [02:32]
OtakuSenpai [OtakuSenpai!~OtakuSenp@] has joined ##java [02:32]
ShadowWarrior I cant reproduce it in an SSCCE [02:32]
ShadowWarrior ( [02:32]
Stummi ShadowWarrior, heres the step-by-step approach: Make a fully copy of your project. Remove anything unrelated (which also means calls to unrelated classes in your actual code). Step by Step until either a) the problem disappears. Than you know where to do further research or b) you hava a minimal shareable class demonstrating your issue [02:34]
ShadowWarrior ok.. [02:34]
ShadowWarrior lemme try [02:34]
Stummi which means, rerun your code after every change [02:34]
Stummi You invest a little bit more time but save time for people voluntary helping you (and you are less likely to frustrate them into refusing to help) [02:35]
ShadowWarrior hmm ok [02:37]
bjpenn [bjpenn!~bjpenn@unaffiliated/brucelee] has joined ##java [02:38]
t2mkn [t2mkn!~t2mkn@] has joined ##java [02:39]
led1 [led1!Thunderbir@nat/ibm/x-gahuqxdyleazrius] has joined ##java [02:41]
n35xdxb0 [n35xdxb0!~n35xdxb0@] has joined ##java [02:45]
bjpenn [bjpenn!~bjpenn@unaffiliated/brucelee] has joined ##java [02:47]
ShadowWarrior Solved it! [02:48]
ShadowWarrior p [02:48]
ShadowWarrior Thanks for introducing me to the concept of SSCCE [02:50]
ShadowWarrior cheers! [02:50]
Tichodroma [Tichodroma!~lutz@fsf/member/Tichodroma] has joined ##java [02:51]
Stummi you are welcome. Share the word! [02:52]
Stummi or, *spread the word [02:52]
bjpenn [bjpenn!~bjpenn@unaffiliated/brucelee] has joined ##java [02:53]
OtakuSenpai [OtakuSenpai!~OtakuSenp@] has joined ##java [03:00]
n35xdxb0 [n35xdxb0!~n35xdxb0@] has joined ##java [03:08]
Matthijs [Matthijs!~quassel@unaffiliated/matthijs] has joined ##java [03:12]
bjpenn [bjpenn!~bjpenn@unaffiliated/brucelee] has joined ##java [03:15]
n35xdxb0 [n35xdxb0!~n35xdxb0@] has joined ##java [03:16]
j1nn Hello I am having problems implementing a doubly linked list in Java [03:17]
j1nn [03:17]
j1nn I have tried everything I can think of but I can't seem to figure out what to do here [03:17]
j1nn Any HINTS would be good, no spoon feeding pls :) [03:17]
dangertools [dangertools!~dangertoo@] has joined ##java [03:18]
bvn13 [bvn13!~bvn13@] has joined ##java [03:20]
tangatools [tangatools!] has joined ##java [03:22]
[twisti] j1nn: looks like a homework assignment. we arent going to do the assignment for you, but are generally willing to help you with specific issues [03:22]
[twisti] the file is full of instructions, surely you arent incapable of doing any of them ? [03:22]
odinsbane It is really odd that insertAfter is a method of DNode. [03:25]
j1nn I didn't ask ya to do it I am just very confused as to how it's supposed to work. So curr refers to THIS node, right? So I would do = blah blah blah and set the previous node to equal curr, and set the next node to equal curr, and then set curr to equal newNode [03:25]
j1nn but I try to do that but it just flat out doesn't work [03:25]
j1nn Let me try and get the code I had written back [03:25]
bjpenn [bjpenn!~bjpenn@unaffiliated/brucelee] has joined ##java [03:25]
light2yellow [light2yellow!~l2y@] has joined ##java [03:26]
[twisti] doesnt work [03:28]
[twisti] j1nn, doesn't work is useless. Tell us what it is, what you want it to do, and what it is doing. Consider putting some code and any errors on a pastebin. (use ~pastebin for suggestions) [03:28]
[twisti] Maldivia: thank you for your answers yesterday re: my stateful stream question. i was called away rigth after asking and then went straight home from the meeting, so, sorry for not responding [03:30]
Maldivia np [03:31]
Stummi j1nn, the method head is wrong after all. You just need DNode.insertAfter(Dnode newNode) [03:32]
Maldivia this is irc, very async, I'm used to picking up conversations after hours, even days :) [03:32]
j1nn Stummi well my assignment said I can't change the method heads. I know the problem, it's that I am not doing anything with curr, but I am not entirely sure what to do with it after I perform all the logic in the steps. [03:33]
[twisti] it always bothers me when i take my time to answer someone and then they just vanish, so i figured i ought to respond even after a day ;) [03:33]
Stummi j1nn, ask whoever gave you the assignment. They probably know better what was in their mind [03:33]
Stummi j1nn, what would you do if I just tell you "please implement this method: Set<JFrame> foobar(String bla, int blub);" [03:34]
[twisti] for what its worth, it was about the last element in the stream, and the for loop + iterator solution was what i went with, but i wondered if there was something more stream-y (because in the for loop, i build another collection, which i then after the loop turn into a stream and do more stream stuff to) [03:34]
v01d4lph4 [v01d4lph4!~silent_fr@] has joined ##java [03:34]
apetresc [apetresc!] has joined ##java [03:35]
Stummi j1nn, then again, maybe the method is just meant to be a static one [03:35]
[twisti] im building journeys from point records, so my for loop essentially looks like "if lastpoint != thispoint && lastLicensePlate != thisLicensePlate && thisTime - lastTime < 60m then journeys.add(new journey(last, this))" [03:36]
n35xdxb0 [n35xdxb0!~n35xdxb0@] has joined ##java [03:36]
j1nn Stummi this is pretty much where I am stuck at. I have no idea if my logic is right either but I think it migth be. [03:37]
bjpenn [bjpenn!~bjpenn@unaffiliated/brucelee] has joined ##java [03:37]
Stummi j1nn, you just sent me the pastebin homepage [03:37]
j1nn whoops [03:37]
j1nn [03:37]
j1nn its late [03:37]
Stummi ) [03:37]
j1nn its late and i aint had no sleep!! [03:38]
j1nn c [03:38]
j1nn i REALLY dont wanna go to bed without understanding this [03:38]
Stummi j1nn, looks fine for me. Maybe you want to check for null [03:38]
j1nn Stummi maybe. I have a list of tests I am supposed to implement and I decided to start with the first one, [03:39]
j1nn [03:39]
j1nn this keeps telling me this: [03:39]
j1nn Expected :z [03:39]
j1nn Actual :c [03:39]
j1nn so it is implying that the element isnt being inserted at all [03:39]
sakhd [sakhd!~sakhd@] has joined ##java [03:40]
Stummi I don't see any insertation in the test you pasted [03:42]
odinsbane Why are you storing your linked list elements in an arraylist? [03:42]
Stummi heh, good question [03:42]
j1nn odinsbane \o/ that's just the test I was told to make work [03:42]
j1nn lol [03:42]
Stummi thats why we don't like to help with homework [03:43]
Stummi it just doesn't make any sense [03:43]
j1nn Stummi well I am assuming that it wants to insert 'z' after the current position using the insertAfter method, but apparently my method isn't doing anything at all! [03:43]
j1nn im very very confused [03:43]
odinsbane j1nn: You don't have a "z" in your list at all, what is telling you this Actual/Expected eg what line. [03:44]
j1nn i feel like screaming ive been messing with this for like 2 hours now. still havent given up, and i imagine the answer to this is going to make me feel liek an idiot [03:44]
teralaser [teralaser!~teralaser@unaffiliated/teralaser] has joined ##java [03:44]
Stummi j1nn, in your test I neither see "z", nor an insertAfter call, nor anything related to your question [03:44]
j1nn wait wait [03:45]
j1nn OH MY GOD LOL [03:45]
j1nn im a fucking dumbass [03:45]
j1nn how the fuck did i make that mistake [03:45]
j1nn [03:45]
j1nn THIS is the test [03:45]
j1nn not that one [03:45]
j1nn i REALLY need sleep apparently [03:45]
j1nn god thats embarassing [03:45]
n35xdxb0 [n35xdxb0!~n35xdxb0@] has joined ##java [03:46]
bjpenn [bjpenn!~bjpenn@unaffiliated/brucelee] has joined ##java [03:47]
odinsbane So line 16 is where it fails? [03:47]
j1nn like that for loop just compares the original array with the expected array it should be after that insert call. i just dont know why the method wont work. it is so damn confusing [03:47]
j1nn yep [03:47]
odinsbane Did you ever paste your actual implementation of insertAfter? [03:48]
odinsbane nvm found it. [03:49]
j1nn ye [03:49]
j1nn i just updated it with what i think is the null comparison too (it of course still wont work) [03:49]
odinsbane The insert seems fine. [03:51]
j1nn !!!!! [03:51]
j1nn C [03:51]
odinsbane The null comparison, you should probably just check if next is null, not the contents of next. [03:51]
selckin sscce [03:51]
selckin selckin, sscce is a minimal independently runnable program, which demonstrates the problem; see for details and a HOWTO [03:51]
j1nn odinsbane aye. when I do that Intellij gripes at me telling me is always null [03:52]
j1nn ... [03:53]
j1nn ........ [03:53]
j1nn .................... [03:53]
j1nn im going [03:53]
odinsbane j1nn: The logic is a bit flawed. What if curr is the last element. [03:53]
j1nn to fucking smash my monitor [03:53]
j1nn im so angry [03:53]
j1nn ok [03:53]
j1nn so [03:53]
j1nn i restarted intellij [03:53]
j1nn rebuilt it [03:53]
j1nn and now the fucking test passes [03:53]
j1nn ... [03:54]
j1nn \o/ whatever! [03:54]
j1nn odinsbane as for the logic [03:55]
j1nn if curr is the last element, well if it snull then i make the new dnode and i putset to equal it [03:55]
bjpenn [bjpenn!~bjpenn@unaffiliated/brucelee] has joined ##java [03:55]
j1nn or i think that is what im doing. after this mindfuck of an issue i dont even know what to say. [03:55]
j1nn my mind feels like it has been exploded [03:55]
j1nn why did that test fail over and over again and get fixed by rebuilding [03:55]
Maldivia enter [03:59]
Maldivia Enter is not punctuation. Please don't press your Enter or Return key until you're finished typing your question, sentence, or idea. It is annoying to see that and hard to follow. [03:59]
n35xdxb0 [n35xdxb0!~n35xdxb0@] has joined ##java [04:00]
j1nn sorry [04:01]
tyx [tyx!~tyx@] has joined ##java [04:02]
croo [croo!] has joined ##java [04:02]
bjpenn [bjpenn!~bjpenn@unaffiliated/brucelee] has joined ##java [04:04]
fabiim [fabiim!~fabiim@2a00:23c5:b307:8500:250c:400e:9e30:3150] has joined ##java [04:08]
light2yellow [light2yellow!~l2y@] has joined ##java [04:10]
j1nn ah! and now i just finished the insertbackwards one. thank you all very much for entertaining my exhausted stupidity. [04:10]
n35xdxb0 [n35xdxb0!~n35xdxb0@] has joined ##java [04:15]
waterCreature [waterCreature!~waterCrea@] has joined ##java [04:15]
bjpenn [bjpenn!~bjpenn@unaffiliated/brucelee] has joined ##java [04:16]
Vurtatoo [Vurtatoo!~Vurtatoo@] has joined ##java [04:17]
fabiim [fabiim!~fabiim@2a00:23c5:b307:8500:1100:d712:f05e:3f2d] has joined ##java [04:28]
bjpenn [bjpenn!~bjpenn@unaffiliated/brucelee] has joined ##java [04:29]
neonpastor [neonpastor!] has joined ##java [04:30]
n35xdxb0 [n35xdxb0!~n35xdxb0@] has joined ##java [04:33]
mek42 [mek42!~quassel@2604:6000:1418:c19b:6a12:78c3:1046:4ac5] has joined ##java [04:35]
strainwrld [strainwrld!] has joined ##java [04:36]
bjpenn [bjpenn!~bjpenn@unaffiliated/brucelee] has joined ##java [04:41]
Anticom [Anticom!~Anticom@2001:67c:2184:410:501e:12be:b80f:b21f] has joined ##java [04:42]
farmer [farmer!c3ca9322@gateway/web/cgi-irc/] has joined ##java [04:47]
nokdoot [nokdoot!~nokdoot@] has joined ##java [04:48]
farmer pastebin [04:49]
farmer Please paste your code and any errors online. For runnable main-classes, try . For general code and errors, use for instance [04:49]
draget [draget!~laptop@2a03:4000:6:e0e1::1] has joined ##java [04:51]
draget I have a library (jxmapviewer2) that uses download-threads in the background to download resources from the internet. Sometimes those throw exceptions ( I have a reference to the class called tileloader that is responsible as far as I understood). Can I somehow catch those exceptions? Since they are in a different thread, I do not really know how to catch them. [04:54]
draget The threads are triggered by the painComponent method, which I tried wrapping in a try/catch block, which would obviously not work. =/ [04:54]
n35xdxb0 [n35xdxb0!~n35xdxb0@] has joined ##java [04:54]
bjpenn [bjpenn!~bjpenn@unaffiliated/brucelee] has joined ##java [04:58]
yawkat i think you could extend the tile factory and override createTileRunner with something that catches exceptions. [04:58]
draget I will try something like this, thanks for the idea. [04:59]
shirafuno [shirafuno!~shirafuno@] has joined ##java [04:59]
amelliaa [amelliaa!~amelliaa@] has joined ##java [05:03]
dangertools [dangertools!] has joined ##java [05:04]
bjpenn [bjpenn!~bjpenn@unaffiliated/brucelee] has joined ##java [05:08]
n35xdxb0 [n35xdxb0!~n35xdxb0@] has joined ##java [05:10]
shirafuno [shirafuno!~shirafuno@] has joined ##java [05:12]
acidjnk [acidjnk!] has joined ##java [05:14]
bjpenn [bjpenn!~bjpenn@unaffiliated/brucelee] has joined ##java [05:16]
rawtaz [rawtaz!~rawtaz@unaffiliated/rawtaz] has joined ##java [05:18]
rawtaz hi there [05:18]
beatzz o/ [05:19]
mparisi [mparisi!] has joined ##java [05:19]
yohji [yohji!~yohji@] has joined ##java [05:21]
adsa [adsa!5eea24c7@gateway/web/freenode/ip.] has joined ##java [05:24]
n35xdxb0 [n35xdxb0!~n35xdxb0@] has joined ##java [05:24]
adsa I want to create an eco system with a lot of different "small worlds" and when i update for example the amount of water in one world i want all other worlds to update concurrently. So they all depend on eachother. Is this possible in java with threads? [05:26]
Maldivia adsa: sure... has nothing to do with threads though [05:26]
adsa Maldivia:We have to use threads for this project(its school), how do u mean? [05:27]
deebo homework [05:28]
deebo We don't answer homework-style questions here. Homework assignments intentionally ask you to produce bad code: You generally HAVE to use some mechanism even though it isn't the best tool for the job, and '.. just use this library that does all that in a very nice way!' is usually not acceptable. That makes them VERY frustrating questions. [05:28]
Maldivia adsa: good, but updating something in multiple objects has nothing to do with threads... sure, you have to take some extra care when doing the updates when you have multiple threads [05:29]
bjpenn [bjpenn!~bjpenn@unaffiliated/brucelee] has joined ##java [05:29]
Maldivia adsa: what I assume is, that you need to update all your worlds as an atomic operation, meaning you need to use some kind of lock, so another thread doesn't try to update while you're updating [05:30]
adsa Maldivia: We mean like each "world" is a thread [05:30]
red-001 [red-001!red@gateway/shell/elitebnc/x-cihobjpsxcspfnvy] has joined ##java [05:31]
adsa But yea i guess we would have to use some kind of lock, but im just wondering if its possible to do this [05:31]
Maldivia ofcourse it is [05:32]
Maldivia but a threads is not a world [05:32]
Maldivia You should probably read up on what a thread actually is then :) [05:33]
shirafuno [shirafuno!~shirafuno@] has joined ##java [05:33]
j1nn ugh [05:35]
j1nn so now I have an issue with a double linked sorted list where I keep getting nullpointer exceptions. im not sure why the nodes are not being set here, [05:37]
j1nn the dnode class: [05:37]
j1nn im so tired i could die [05:37]
j1nn i already got all the DNode methods written atleast :3 [05:37]
Maldivia j1nn: well, where are you getting the NPE? [05:38]
j1nn right on the system.console.printf line [05:38]
j1nn i've also tried head.contents.printf and that gives me a null pointer as well [05:38]
Maldivia j1nn: also, you're never assigning anything to head [05:38]
Maldivia j1nn: meaning head is always null, meaning lastVisited is null [05:39]
n35xdxb0 [n35xdxb0!~n35xdxb0@] has joined ##java [05:39]
j1nn this is the test [05:39]
j1nn Maldivia it worked out fine this way for the DNode class [05:39]
psychicist__ [psychicist__!] has joined ##java [05:40]
draget asgs: You us multiple threads to run things in parallel? for example instances of a world where things happen. But when you update the water, you need to create a lock - an object that is checked by each thread. Keywords also include 'mutex' and such. Try some basic threading examples online to get a feeling for threads. [05:40]
Maldivia draget: he's long gine [05:41]
Maldivia gone* [05:41]
draget Ops, wrong hilight? sorry. [05:41]
draget Thought he was still around. [05:41]
j1nn actually even newNode.content is null too [05:41]
j1nn what is happening [05:42]
Maldivia j1nn: head / lastVisited / numNodes -- those are all very internal properties of the List, nothing that you shoudl be able to set directly from outside, the List should be in full control of those, meaning they should be private and only that class be able to modify them [05:43]
Maldivia j1nn: And what does createList do? [05:43]
j1nn Maldivia [05:44]
dangertools [dangertools!~dangertoo@] has joined ##java [05:45]
bjpenn [bjpenn!~bjpenn@unaffiliated/brucelee] has joined ##java [05:46]
Maldivia j1nn: use System.out.println -- don't use System.console() <-- this is probably your null [05:49]
j1nn Maldivia that did it thanks [05:50]
eliasr [eliasr!uid27497@gateway/web/] has joined ##java [05:51]
j1nn now I can move onto to the rest of this - reassembling the thing only sorted [05:51]
Maldivia j1nn: then you can fix your addNode, which isn't implemented... also why do you have an ArrayList there at all? [05:51]
j1nn Maldivia i need to add an element to a sorted double linked list so I thought the easiest thing to do would be to just put all the nodes' content into a list, then add the newnode's content into the list, sort that list, and then rebuild the node list from that list [05:52]
dangertools [dangertools!~dangertoo@] has joined ##java [05:53]
n35xdxb0 [n35xdxb0!~n35xdxb0@] has joined ##java [05:54]
Maldivia j1nn: and you will get a 0 for that in your homework [05:55]
j1nn ? [05:55]
j1nn well what else am i to do [05:55]
Maldivia j1nn: the point of the exercise is to loop through your nodes, compare the value you're trying to insert with the your existing nodes, and then relink the list inserting where it fits [05:55]
yawkat j1nn++ if it works, it isnt stupid [05:56]
yawkat j1nn has a karma level of 1, yawkat [05:56]
yawkat (but yea, probably not the intended solution, and might not get points for it...) [05:56]
j1nn and now im getting a nullpointer on this... fuck im about to just go to sleep [05:57]
Maldivia j1nn: say you have the nodes [A, E, M, R], and you want to add L -- you loop over your nodes "is A >= L", no, "is E >= L", no, "is M >= L", yes, ok, need to insert before M, so L.prev = M.prev, = L, = M [05:57]
dangertools [dangertools!~dangertoo@] has joined ##java [05:58]
j1nn Maldivia that seems simple [05:58]
Maldivia j1nn: because your ArrayList is now N+1 long, but your linked list is only N, meaning you reach the end of your link, where next = null [05:58]
bjpenn [bjpenn!~bjpenn@unaffiliated/brucelee] has joined ##java [05:59]
j1nn Maldivia but I changed the linked lists size with numNodes = ar.size() to match the size of the array? [06:03]
coolcustomer [coolcustomer!~coolcusty@unaffiliated/coolcusty] has joined ##java [06:03]
yawkat numNodes changing does not actually add a node. [06:04]
j1nn yawkat but im trying to add the node, and numnodes has to be adjusted to equal the number of nodes, so numnodes+=1? [06:06]
n35xdxb0 [n35xdxb0!~n35xdxb0@] has joined ##java [06:06]
Maldivia j1nn: but you were looping over the new node count before having added the node, meaning you'll end up trying to access the new node before it exists :D [06:08]
bjpenn [bjpenn!~bjpenn@unaffiliated/brucelee] has joined ##java [06:11]
j1nn Maldivia fuck it i will just do it the right way [06:11]
j1nn TOMORROW though [06:11]
j1nn goodnight [06:11]
j1nn ty ty [06:11]
n35xdxb0 [n35xdxb0!~n35xdxb0@] has joined ##java [06:14]
Farore [Farore!~Farore@2a00:801:320:9a43:4124:ec75:a521:b042] has joined ##java [06:15]
shirafuno [shirafuno!~shirafuno@] has joined ##java [06:15]
bjpenn [bjpenn!~bjpenn@unaffiliated/brucelee] has joined ##java [06:17]
dangertools [dangertools!~dangertoo@] has joined ##java [06:23]
n35xdxb0 [n35xdxb0!~n35xdxb0@] has joined ##java [06:24]
markong [markong!~marco@] has joined ##java [06:30]
dangertools [dangertools!~dangertoo@] has joined ##java [06:32]
bjpenn [bjpenn!~bjpenn@unaffiliated/brucelee] has joined ##java [06:33]
warri0rr [warri0rr!~warri0rr@unaffiliated/warri0rr] has joined ##java [06:33]
Anticom [Anticom!~Anticom@2001:67c:2184:410:501e:12be:b80f:b21f] has joined ##java [06:34]
kirua [kirua!~kirua@unaffiliated/kirua] has joined ##java [06:34]
qwedfg [qwedfg!~adam@] has joined ##java [06:41]
n35xdxb0 [n35xdxb0!~n35xdxb0@] has joined ##java [06:42]
qwedfg [qwedfg!~adam@] has joined ##java [06:42]
mohsen_1 [mohsen_1!uid289573@gateway/web/] has joined ##java [06:46]
bjpenn [bjpenn!~bjpenn@unaffiliated/brucelee] has joined ##java [06:47]