« first day (2346 days earlier)      last day (2588 days later) » 

12:56 AM
what does <T> mean when used with return type? <T> T[] toArray(...)
 
/help unsummon
 
@Michael Makes the bot leave a room.
 
1:12 AM
I thought List<Integer> = methodThatReturnsAList(); was illegal b/c List is an interface...?
but I just compiled a little test file with that line and had no problems
 
congrats you just proved your past self wrong
now learn it properly instead of guessing wrong things
 
but why does that work? I thought you couldnt instantiate an interface?
 
you aren't instantiating any
 
just did newList.getClass() and it knows I passed it in as an ArrayList
then what did I do @unihedron
 
1:51 AM
the the List that is returned knows that it was originally an ArrayList, so is that why this works? Because the compiler knows that the returned List is an ArrayList?
 
/shutdown
 
Shutting down. See you later.
OakBot Online.
 
 
2 hours later…
4:13 AM
Never mind. I figured it out. I'm just really, really, really stupid.
 
4:37 AM
@Ungeheuer Good
That you figured it out, that is.
 
I forgot how return types work
i feel so stupid
 
feel am
 
omfg
 
@Ungeheuer You could program in Assembly Language instead
 
you always show up at the worst times
I'm guessing that's hard af
 
4:44 AM
Yeah, Assembly is confusing. That's why I write code to generate it for me.
What's the best way to turn an array of Strings into and array on ints?
 
@JennaSloan write code
 
int[] ints= new int[strings.length];
for(int i=0;i<ints.length;++i)
ints[i] = Integer.parseInt(strings[i]);
^ that's what I have
 
5:04 AM
Which is better: "public abstract" or "abstract public"?
 
5:32 AM
visibility modifier first, always. Unless your team decides on another convention. @jenna sloan
@JennaSloan Don't forget to include a try-catch in case the string can't be parsed by Integer.parseInt
 
 
3 hours later…
8:18 AM
@JennaSloan no one cares, they're the same
 
 
4 hours later…
12:31 PM
Morning, Java!
 
Morning Michael!
 
Hey @geisterfurz!
 
Damn this time change in Germany is so dumb >.>
 
Heya!
 
@ItachiUchiha o/
 
12:34 PM
Time change in Germany?
 
Yeah every 6 month the time is change by one hour
 
Hey @Itachi!
 
This morning at 2 o'clock it got moved to 3 o'clock
 
Daylight saving?
 
No clue why but everyone hates it
Only advantage is 1 hour more sleep when it is set back one hour, but now I am missing one -.-
 
12:51 PM
Is it just Germany which does it?
 
USA does it
 
@ItachiUchiha No clue, but I think the minority of countries does it.
 
Wow
we don't and I am happy that we don;t
 
1:11 PM
Ok more countries do it than expected by me, but still not all :D
 
1:26 PM
NZ follows it.. Interesting..
 
1:59 PM
Hey, does someone know a document with a nice explanation about the Java Virtual Machine? I'd like to have some insight about how it works frames, registers, isstructions stack what it's made of
 
2:18 PM
There's 149 different instructions in the JVM instruction set. I counted.
 
Thank you..I already saw this...seems o me as being very incomplete...also I like to have some images to get a rough overview of what components are involved...found this...http://cs.au.dk/~mis/dOvs/slides/39a-javavirtualmachine.pdf
but was looking for something better
@JennaSloan Ohh I saw this:
For example, the memory layout of run-time data areas, the garbage-collection algorithm used, and any internal optimization of the Java Virtual Machine instructions (for example, translating them into machine code) are left to the discretion of the implementor.
No understand why there are no nice pictures...
 
2:34 PM
Specifications usually don't have much pictures.
 
I wanted to say.."Now I know why..." :), Yeah you're right
 
 
1 hour later…
3:39 PM
Much better. OakBot now has a centralized JSON data store for persistance.
 
 
2 hours later…
5:16 PM
2 messages moved to bin
2 messages moved to bin
 
@Unihedron Why?
 
 
2 hours later…
7:21 PM
does anyone by chance know the opposite expression for a quadratic scale? I am just using square root to calculate my scale value... just wondering if there is a specific expression for such a scale
 
7:32 PM
if a catch go out of a for, when catch is finished it go back to the for?
 
@QuicoLlinaresLlorens no
 
@motaa thanks!
 
when an exception occurs in your loop means that sth went wrong and you have the choice of dealing with it
when there is something that always needs to be carried out, even if an exception occrus you can make use of the "finally" block
 
But you also could have an exception inside the loop, and when finish the catch, it continues with the loop, no?
 
@QuicoLlinaresLlorens no
try this @QuicoLlinaresLlorens
https://hastebin.com/ocajugevox.cs
 
7:47 PM
yes, but that go outside the loop
but if you have the catch inside the loop
when it finishes the catch it will continue the loop
 
if it inside the loop it continues
but the case where i=3 the exception is thrown
but the try/catch in the loop of course lets the loop finish
because you are not "trying" the whole loop :D
you should get the output 0, 1, 2, exception, 4
 
@motaa yes I have understood all
thanks! :)
 
no prob, I was shortly in the wrong movie though hehe
 
8:03 PM
If I am merging two sorted lists into one single list, would it make sense and be efficient to check and see if one list, call it firstList, can have secList appended onto the end of it, and if not, then check to see if firstList can be appended onto the end of secList?
e.g. firstList = {3, 4, 5} secList = {1, 2} I would check secList.get(0) against firstList.get(2) to see if I can append secList after the third element in firstList
if not, I compare secList.get(1) and firstList.get(0), to see if firstList can be appended to secList after second element
 

« first day (2346 days earlier)      last day (2588 days later) »