« first day (1495 days earlier)      last day (3449 days later) » 
02:00 - 12:0012:00 - 23:00

12:00 PM
obtw, mapCommands() smells like a static initializer block..
 
I hear you
 
I suggest you get that out of your main
 
It's exactly that
And where would I put it?
 
outside..
you just go:
 
static {
 mapCommands();
}
gotcha
 
12:00 PM
or even inline the mapCommands()...
depending on how much it is..
 
@Vogel612 Will be around 15 or so commands
 
That could definitely use a method then..
it doesn't justify the hiding of intent for <= 5 commands IMO..
 
@Unihedron How's that different from putting it in the main?
 
@SecondRikudo It's... static, it's optimized away during compilation, things in main are JIT'd
 
Also note that mapCommands() throws ClassNotFoundException
 
12:02 PM
@SecondRikudo it will get invoked whenever you start up the Namepool
 
JIT = Just In Time (compiled)
 
--> it will be ready before you can even invoke main, since it happens on loading the class.
 
private static void mapCommands() throws ClassNotFoundException {
    commands = new HashMap<String, Class<? extends Command>>();

    commands.put("help", Help.class);
}
 
something's wrong there..
 
TBH it's all static, there's no logic here, so ClassNotFoundException should never be thrown
 
12:03 PM
it's close to absolutely impossible to throw a ClassNotFoundException there..
 
I'll just handle it inline
 
there is none.
remove the throws declaration and leave the rest as is.
 
@SecondRikudo What's the import for Help?
 
@Unihedron Yes
import com.taboola.clientproperties.commands.Help;
 
Your package?
 
12:05 PM
Yes
 
hi to all
pls help me
i hav an issue in android studio
while i adding itextpdf-5.5.3.jar
library
 
Virtually the only time you'll get to care about ClassNotFoundExceptions are when you're using external libraries.
If everything comes from your own library, you can ditch that throws declaration.
 
@uni
 
@Sethu you could start by putting a little more effort in your spelling and try to explain from beginning.
 
@Sethu What?
 
12:06 PM
@unihedron how are you??
 
I am fine!
 
did u remember me
ok wait i ll explain u clearly
 
Maybe.
Hold on, I thought that subclasses of Z$1 can access Z$1.get() where get() is protected?
 
@Unihedron they definitely should be able to, yes
 
I am doing pdf conversion by using itextpdf-5.5.3.jar for my application in android studio, but i got following error:

Error:Execution failed for task ':app:dexDebug'.
> com.android.ide.common.internal.LoggedErrorException: Failed to run command:
E:\Android\Android Studio\sdk\build-tools\21.1.1\dx.bat --dex --output E:\Android\Workspace_ReceiptORG\ExpenseManager\app\build\intermediates\dex\debug --input-list=E:\Android\Workspace_ReceiptORG\ExpenseManager\app\build\intermediates\tmp\dex\debug\libraryList.txt
0
Q: iText pdf Library unsupport on Android studio

MSSI am doing pdf conversion by using itextpdf-5.5.3.jar for my application in android studio, but i got following error: Error:Execution failed for task ':app:dexDebug'. > com.android.ide.common.internal.LoggedErrorException: Failed to run command: E:\Android\Android Studio\sdk\build-tools\21....

 
12:09 PM
^ There, @Vog
getContent is a protected method.
 
its ma post on stackoverflow @uni
 
@Unihedron you're not accessing it from inside the class..
 
Well... I kind of am.
 
might be buggy behavior... mind calling this.getContent(type); for me?
 
@uni
 
12:12 PM
It points to itself.
Yay Infinite Recursion!
 
please help me
 
super.getContent(type);: Cannot directly invoke the abstract method getContent(FactoryMeta.MessageType) for the type ChatMessage
 
staaahp... wut did you do?
getContent is abstract?
 
Yeah.
 
y u make it protected then?
 
12:14 PM
I don't know.
 
I am too confused...
I don't understand..
 
Well, I'll make it public then.
There goes encapsulation. :P
 
@Unihedron I get the impression you have the wrong image of encapsulation..
 
Maybe I do. I should pick up an actual book or something.
 
books?? who needs that..
 
12:18 PM
Though I skimmed the library and didn't find the books about compilers / java 8.
To be honest, those computer science books in the public library are so new and untouched, I doubt they'd be adding anything onto that shelf lol.
 
That looks really weird. I wrote a similar snippet to eclipse and it does not complain about anything there
 
@kiheru Using eclipse juno, java 8 here..
 
juno???
 
The project where I typed it into compiles it as java 6. Dunno if that makes a difference
 
you sure it's juno??
 
12:20 PM
Oh, luna.
They're in different packages if that matters, @kiheru
 
@Unihedron shouldn't matter much... might be a Luna-bug..
 
test project incoming
 
oh, it does seem to make a difference. I don't have any idea why though
 
Well... That sucks. My awesome design is not going to work then. In that case...
Make ALL the methods public!! :D
 
@kiheru if your extending class is in the same package, default allows access. if not, it denies..
 
12:27 PM
(also when compiling from command line)
 
that's what protected is there for...
 
@Vogel612 the classes are in different packages, does that disallow protected access?
 
The method is protected though, that's looser than the default
 
@Unihedron no, quite the contrary
This could use an illustration...
the whole point of protected is to make the method available to extending classes in outside packages
 
Your illustrator is unsure of WTF is going on with "protected".
 
12:30 PM
I know my illustrator had some illustrations that were correct (at least to my knowledge) about 2 days ago
 
I'm writing a script to download the transcript of the previous two days, then query it with regex for where the word "protected" was mentioned near a oneboxed image.
 
The JLS has an example of that unintuitive protected behaviour: docs.oracle.com/javase/specs/jls/se8/html/… (the second example). So, apparently it can't be called a bug
Depends on the wording of 6.2.6, (I would not have understood it that way, but I'm not a native speaker. It certainly can be read that way, and knowing the expected behaviour makes the interpretation feel natural now)
Good reminder to never expect to know something. I thought I understood the access modifiers :-P
 
12:45 PM
Well... That sucks. But eh.
 
protected seems to be somewhat... messy..
 
18 mins ago, by Unihedron
Make ALL the methods public!! :D
^ That's the plan! :D
 
while it's not a good plan... I APPROVE!
 
Or I could rip reflection code everywhere.
Nah, just kidding. ;)
 
interesting..
 
12:49 PM
Hello
 
The limitation certainly makes protected unusable in a lot of situations where public is overkill
 
I have a question
 
@kiheru I do realize.
 
Integer value1 = 5;
Integer value2 = 5;
System.out.println(value1==value2);//true
Integer iRef1 = 1000;
Integer iRef2 = 1000;
System.out.println(iRef1 == iRef2);//false
 
23 mins ago, by Unihedron
Well... That sucks. My awesome design is not going to work then. In that case...
 
12:50 PM
Why value1==value2 returns true but iRef1==iRef2 returns false?
 
(quote redacted)
 
@Unihedron how do you move to that room with the title of "Please use a paste service"?
I can't find it with the search.
 
@Mr.777 wat?
 
@Mr.777 that's a quirk in the language specification
 
@SecondRikudo Search for "trash".
I own that room, if you want ownership to salvage anything.
 
12:51 PM
**eval:Integer value1 = 5; Integer value2 = 5; value1 == value2;
 
@Unihedron Not finding it.
 
The values are cached up to a certain value. (128 iirc, but I don't remember for sure. But it is specified)
 
@Unihedron Exactly that
 
@Vogel612 Yeah, this will return true but if i have Integer value1=1000; Integer value2=1000; it will return false
 
Junior's hanging it seems.
 
12:53 PM
 
Maybe you need access to see it. I don't know.
 
@kiheru is that the same mechanism as the reference equality thing of interned Strings?
 
@Unihedron I see only the first two :o
Maybe, try to give me please
 
I added write access. Does it work?
 
12:54 PM
Yup, that was it.
Thanks
 
@Vogel612 Boxing conversion. The answer to the question is good (and references JLS)
 
@Vogel612 not really, it's the cache of common values
/**
 * Returns an {@code Integer} instance representing the specified
 * {@code int} value.  If a new {@code Integer} instance is not
 * required, this method should generally be used in preference to
 * the constructor {@link #Integer(int)}, as this method is likely
 * to yield significantly better space and time performance by
 * caching frequently requested values.
 *
 * This method will always cache values in the range -128 to 127,
 * inclusive, and may cache other values outside of this range.
Integer.valueOf() since JDK 1.5
I like how @Max's avatar always points to someone...
 
not when he's the last in one row..
 
ha
 
the edge-cases are always ;)
 
12:57 PM
By the way, there's sun.misc.VM.getSavedProperty("java.lang.Integer.IntegerCache.high"); for IntegerCache, so you can actually change the range for values to cache if you bother wrenching VM arguments.
 
Hi , I am new here. Can any one please help me with this issue stackoverflow.com/questions/27144131/…
its related to libgdx 3d camera
 
##eval:"I'm still alive!"
 
: I'm still alive!
 
...
##eval: 45 + 45 - 17 - 25 - 9-3-9-12-17
 
1:02 PM
##eval:17+9+10+11+2-45
 
waait... ##??
##javadoc:Integer
 
**eval:32
 
@Vogel612 Sorry, I never heard of that class. :(
 
Ha!
 
Ohh... I seem to have changed it..
 
1:05 PM
@SecondRikudo Just saw ur profile, I guess Obito is the second Rikudo, not Madara.
 
somewhen...
 
@berserk Wrong.
 
@berserk um... where in the manga / anime are you?
 
Obito never achieved Rikudo, he cheated.
I was the one who awakened the Rinnegan.
 
@Vogel612 Anime.
@SecondRikudo haha "I" xD
 
1:06 PM
@SecondRikudo I'd say Rikudo != Rinnegan
 
Rikudo means juubi's host, right?
 
@Vogel612 Rinnegan is half of the Rikudo
 
@Vogel612 me too
 
@berserk not even remotely..
 
Rikudo means sage of six paths.
 
1:06 PM
The other half being the Rikudo Senjutsu
One who has both is dubbed Rikudo
 
while the Rikudo was the Juubi's Jinchuuriki that's not what makes him the Rikudo
 
I have no idea what on earth is being discussed.
 
which is why neither Sasuke nor Naruto are dubbed Rikudo..
 
But just like Danzo was never really dubbed "Sixth", Obito is not dubbed Rikudo either.
 
Do you mean obitio is 3rd Rikudo?
 
1:07 PM
even though SPOILER!!!
 
@berserk Obito doesn't count as Rikudo.
 
@Vogel612 LOL
 
@berserk it's boring having to hold back when I already know the end..
 
Technically speaking, Kaguya was the first Rikudo
 
Ok ok
 
1:08 PM
Hagoromo is the second
 
calling topic-change
 
And I am the Third.
 
I am leaving @Vogel612
 
nah it's k
 
No spoilers.
 
1:08 PM
@Vogel612 Notion accepted.
@berserk Only Vogel introduced spoilers so far :P
 
@Unihedron as the last remaining sane around here, mind defining a topic for us?
 
Ya i was saying to him lol.
 
Nah.
Actually, sure.
How about hitchhiker's guide to the galaxy?
 
Let's talk about why Java Sucks.
 
@SecondRikudo u sound pro in narutopedia :P Lets discuss in anime stack exchange :P
 
1:09 PM
@Unihedron 42.
 
@SecondRikudo haah cool topic :)
 
@berserk You are aware that he's a mod over there??
 
@berserk Waiting for you there
 

Java Sucks!

JavaScript Sucks!
 
@Vogel612 Yes, I saw him in many posts.
 
1:10 PM
I've seen Mirai Nikki recently
 
hmm I didn't see you around there.. but that may be because I'm mostly just lurking
 
head = blown
 
@SecondRikudo quick question, you know about the current status of that on Appleseed, but not appleseed?
 
@SecondRikudo same
 
@Vogel612 Link?
 
1:12 PM
@SecondRikudo here
 
1:22 PM
@Vogel612 What's wrong with it?
OP says it's not Appleseed, you can put it in an answer and get votes, show the similarities, but it probably wouldn't be accepted.
 
I'm still kinda wondering... OP seems to be mixing up different anime there..
additionally he completely restarted from scratch in the comments to the answer...
 
there we go again!
 
Right. @Vogel612 move to Maid Cafe?
 
hmm.. fine by me ;)
 
@Vogel612 Why? :(
 
1:33 PM
@korima the question's premise is wrong.
every structure is allowed, as long as you stick to it..
some structures are less "intelligent" than others, but that's about it..
 
##eval:168/7
 
##eval:84/7/4
 
@Vogel612 That has sense. My idea was modelate all entities of my problem in "domain". This entities communicates with services to expose a kind of work and in business layer, code all low details
 
1:37 PM
##eval:120/6
 
##eval:120/5
 
Yay for JavaBot! Homework assistant for life!
##eval:84/3/2/7
 
1:40 PM
##eval:42/2/3/1
 
1:57 PM
@korima usually people call that "model"
@Unihedron too lazy to open a new tab, eh?
^^^That's documentation at it's finest..
 
@Vogel612 That's.... documentation.
 
I think it was a change of some 500LoC...
 
Too much documentation is often worse than too little, you know.
 
urk it's just this once..
mostly because I intend on using it a "graduation project"
that's why there's a lot of boilerplate information around there..
like... the first ~10 pages are an explanation of the project architecture..
 
2:25 PM
Hi Everyone!
Is making a HashMap of HashMaps a bad idea? I want map to have more than one value?
 
hello
sounds like you need a multimap
from guava
 
That will be another library and I already have too many. What if I don't want to use guava?
 
thennn... make a Map<K, Map<K2, V>> at least..
program against interfaces and not implementations
 
What exactly do you have to do though? If you have to nest maps, at least build a proper map for it.
HashMap's hashcode sucks, and nesting HashMaps isn't always a good idea. At least use something better within where relevant.
 
"If you have to nest maps, at least build a proper map for it." what does that mean? Should I use another implementation of Map other than HashMap?
 
2:37 PM
Has to do for your specific scenario, but nesting hashmaps are almost always a bad idea, for various reasons. If you care about the good code, that is.
 
@Unihedron not that Multimaps make it easier...
 
@LifeH2O That's... a multimap
 
@Unihedron I do want a good code, that is the reason for asking. Someone suggested to use List in Map to store multiple values.
 
@LifeH2O Yeah, try that!
That idea is A++.
If you want it automatically sorted, try TreeSet instead of List.
 
2:42 PM
@Unihedron Thanks. Looks like I can rely on his suggestions. :)
 
 
1 hour later…
fge
3:50 PM
A Set won't allow duplicates, however
 
4:35 PM
@fge but depending on implementation may allow ordering..
 
Me: Hi
Person is typing...
Person is typing...
Person is typing...
Person is typing...
Person is typing...

Person says: hi
 
Hello Hi hey Hey! 'sup hi
 
Hello..
 
##eval:"Greetings, Human"
: Greetings, Human
 
Meh, I don't like this new prefix for evaluation thing.
 
4:45 PM
##eval:javaBot.broadcast("why that?");
why that?
: no result
 
It makes me think there's a cv stream.
Hey look, stuff to close!
@LeeJeong Oh hi!
 
oh noes it's just someone playing with eval??
meh..
I think prefixing is a good idea, but I wouldn't insist on tag-prefix..
just something to show "Where is this coming from??"
 
Hmm.
I would love to set up a hastebin server, then have the bot post to the hastebin server with the result in here or something.
 
If you can get it done... why not?
 
The problem is that hastebin servers runs on ruby.
hmm...
 
4:57 PM
~response
 
testmsg
 
.equals() ftw
 
!!eval "Hello" + ' ' + "World"
Nope. :P
!!eval "Hello" + ' ' + "World"
Execution$1 Hello32World
Or something like that.
 
/me confused
 
fge
5:20 PM
@Vogel612 yeah, a SortedSet behaves differently from a Set if you inject objects implementing Comparable which is not compatible with equals()
That's some tricky stuff
 
/me feels completely dumbfounded now
anyways.. tracking time, saving the last docs-status and sending to review and then off to home!
 
5:33 PM
Hi guys , check my post please .. without voting down :p stackoverflow.com/questions/27154362/…
 
@Lana this code shouldn't even compile.. also it's messily indented and contains dead code.
make a proper MCVE and start doing something in your EventListener instead of just writing a comment there..
 
5:51 PM
##shutdown
damn you 409
 
@Vogel612 I searched the web for tutorials about spinner, all were too beginner. I am working by guess and try now. If you have a good tutorial or explanation please share it with me
 
 
2 hours later…
fge
7:44 PM
0
A: how to use command line to check abnormal termination of Java Class

fgeThere are many causes of abnormal termination. There is a heuristic that you can adopt here: an exception finding its way up to the main thread and which is not caught causes the JVM to terminate with an exit code of 1; by exception above, this includes such abnormalities as OutOfMemoryError; ...

Comments and adjustments, please!
 
 
1 hour later…
9:13 PM
Good Morning
 
9:23 PM
Hey @mlwn.
 
9:44 PM
How are you @Michael... /?\
 
10:03 PM
Hi All
I am trying to sort ArrayList of custom Objects by property which is a float type.
 
you can use Float.compare for the comparison
 
public class DataComparator implements Comparator<myData> {
    public int compare(myData v1, myData v2)
    {
        return (int)(v2.no - v1.no);
    }
}
it does not sort, why?
 
` public int compare(myData v1, myData v2)
{
return Float.compare(v2.no, v1.no);
}`
 
@ZouZou, so i just replace my compare method with yours?
 
This is the usual way to do it
 
10:07 PM
public int compare(myData v1, myData v2) OR public float compare(myData v1, myData v2)
 
public int, you need to respect the contract. compare returns an int.
 
it gives an error: compare (float,float) in Float cannot be applied to float
 
How did you write it ? What's the return type of v2.no and v1.no?
 
public class DataComparator implements Comparator<myData> {
    public int compare(myData v1, myData v2)
    {
        return Float.compare(v2.no, v1.no);
    }
}
 
compiles fine for me
 
10:16 PM
It does not compile in Android Studio, :(
Error:(11, 21) error: method compare in class Float cannot be applied to given types;
required: float,float
found: float
reason: actual and formal argument lists differ in length
found it, stupid mistake I made
@ZouZou, thanks.
 
@CoKoder You're welcome
 
02:00 - 12:0012:00 - 23:00

« first day (1495 days earlier)      last day (3449 days later) »