« first day (1475 days earlier)      last day (3690 days later) » 

03:17
#pooruni
04:01
@Unihedron You are developing chat bot from scratch? Even I wanted to but couldn't do it due to time factor, now I am not feeling much interested. But still good to hear that you are doing it.
04:37
hi guys
05:12
@Appu :)
hello hello
sup!
At school enjoying my lunch vreak ;)
*break :P
On mobile can't do much about spellchecking ;)
06:07
It would have been better if we had an app for this.
@Appu oh? There is an SE Chat app.
Link?
Eh, it's for Android.
Oh hi @maveň :P
@Unihedron hi again
06:23
Oh, the world is a remix :)
Everything just keeps happening over and over :P
Ago
Ago
06:41
why shouldn't I use ReadOnlyObjectWrapper within an array (JavaFX)? e.g. ReadOnlyObjectWrapper<MyObj>[] myStuff = new ReadOnlyObjectWrapper[10];
@Ago Eh... The statement itself is faulty.
Ago
Ago
@Unihedron faulty? it kind of works. gives a warning about unchecked conversion (no type stated)
if I do new R...<MyObj>[10]; this one if faulty
I mean, I could just have a list. but wanted to understand, why array is not allowed
@Ago Yes, that's the problem. You're casting a type erasure for ReadOnlyObjectWrapper[] and ReadOnlyObjectWrapper<MyObj>[].
@Ago Have you tried new ReadOnlyObjectWrapper<>[10]?
I didn't know this, but I think it's been recently developed.
@Appu Generic type parameter implication from left hand variable declared generic type.
06:54
o_O I am not Ago
Ago
Ago
:)
indeed
Is that your real name?
But you asked :p
Ago
Ago
@Unihedron tried also <>, still get an exception: Cannot create a generic array of ReadOnlyObjectWrapper
@Ago I was saying that I didn't know regarding SE chat app, because I searched an year ago and found that wasn't there.
Ago
Ago
06:58
@Appu yes, Ago is my real name :)
What does that mean? Ago means past, doesn't it?
Ago
Ago
in english yes
in estonian (where I'm from) it doesn't mean anything
I can't cv, but done negative
You can flag =)
Ago
Ago
07:06
well, I shouldn't use array for generics: stackoverflow.com/questions/1817524/generic-arrays-in-java
@Ago Arrays.newInstance(new ReadOnlyObjectWrapper[0].getClass(), length)
@AshishAgarwal wth?
I'll be back soon. Heading home :)
 
2 hours later…
09:03
hello every one ...
Is there any one working on Blaze Advisor
Not me..
09:37
1
Q: How work with blaze advisor in eclipse?

GokuHello Every one I am about to start work with the Blaze advisor but i m beginner for that. I need a quick start tutorial or step by step guide lines for working with a Blaze Advisor in Eclipse IDE. I am using eclipse Rad for my project and I had done with the installing Blaze Plugin for my IDE.

please have a look of my question
any one
@Goku Don't ask for tutorials. Your question will get closed.
@Unihedron thanks for the edit
@Goku You still have to fix the part about asking for tutorials.
but actually i am looking for the tutorial and guide-lines
I edit @Unihedron is it fine now ...??
@Goku I do realize, but those questions are off-topic. Take a tour:
09:47
@Unihedron is there any thing else i need to change in my question ?
dunno
 
4 hours later…
13:36
yo!
@uni you're a map king, aren't you?
@miniHessel Huh?
You know your hash maps?
Just wanted to change a hash map a little.
but can't figure out how.
13:40
void addNewDataPoint(String name, double value) {
    data.merge(name, value, Double::sum);
}
this map sums up all the values if the name already exists
for each time a name is merged, I instead want +1 on value
Ohh, java8
Continue?
I do addNewDataPoint(myName,myValue)
but instead of the map summing up all the values for the merged names, I instead want it to count how many times a value is inside a name
so say I have Name "QQ" with value 1,2,3
and another name "QQ" with value 4,5,6
So I want the map to be QQ : 6
And how is that possible with what you have?
13:44
sorry, bad explained
I want the map to count how many values it has, instead of summing them.
fge
fge
Eh?
.values().size()?
Actually, what's data?
private Map<String, Double> data = new HashMap<>();
    ObservableList<PieChart.Data> pieChartData2
            = data.entrySet().stream()
            .map(entry -> new PieChart.Data(entry.getKey(), entry.getValue()))
            .collect(Collectors.toCollection(() -> FXCollections.observableArrayList()));
    pieChart.getData().addAll(pieChartData2);
and I use this code to add the data to an observableList.. So ,ye :p
so the entry.getValue returns the summed up Values.. but Instead I would want it to return the number of values
for that specific key
fge
fge
*sniff* *sniff* Lambda abuse detected!
My eyes are bleeding.
@fge Surprise challenge! Can you convert this method into a lambda?
public static SESite fromUrl(URL url) {
    for (SESite site : values())
        if (url.toString().contains(site.dir))
            return site;
    return null;
}
fge
fge
13:48
@Unihedron I can, but do you actually need it? ;)
Not really. Just something I asked since I tried converting it into LAMBDA EXPRESSION for fun, but didn't manage to.
fge
fge
Also, why URL? Why not URI?
There's a very dangerous trap with URL
(I'll be honest, that method was unused. :P)
fge
fge
Well, anyway -- use Arrays.stream() to convert values() to a Stream<SESite>, then use .findFirst()
Arrays.stream(values()).findFirst()
Linear search is gone.
fge
fge
13:53
But you won't get any benefit from using lambdas here anyway
Yep, 'cuz in-method capture
fge
fge
No, not because of that
It is because the stream is not lazily populated
(since it is backed by an array)
I found a good solution. :)
fge
fge
That would be something like (UNTESTED!) return Arrays.stream(values()).findFirst(site -> url.toString().contains(site.dir)).orElse(null);
But the existing code is just fine
(in fact, it even performs better than the stream version, I suspect, since you avoid the creation of the Stream instance)
(and of the Optional to boot)
14:05
testmsg
fge
fge
(anyway -- I knew that some day I'd see lambda abuse; I'm not surprised)
@miniHessel really, you shouldn't be using lambdas here
But then, that's just my opinion
@fge , thank you, but really, James_D helped me with that lambda list, and I respect him entirely :P
wonders who James_D is
in RegEx - Regular Expressions, Oct 29 at 3:09, by Unihedron
fools rush to where angels fear to tread
testmsh
fge
fge
@miniHessel your call, but just think over it a little; you build a list using convoluted lambda code, all this to .addAll() to another list. A much more straightforward approach would just have been to loop over the elements to be added and .add() each element if it fits
Lambdas are a waste here
@miniHessel just for reference, you could have just replaced your .collect() statement with .forEach(pieChart.getData()::add)
Good morning, Java!
14:20
Morning!
Hey @Uni
fge
fge
Good morning milord
lol hey @fge
14:31
@fge could you show me an example? Thanks
@miniHessel um... you are aware he just did, are you?
I have a question, how to get Attribute from target JSP page. In initial page: `<% request.setAttribute("name", "hi"); %>
`
like... exactly that??
Nope, gets that error in the sandbox as well.
testmsg
testmsg2
this is.. strange
14:38
it is
also.. please don't stretch our debug session through.. 4 rooms at once ;)
Sorry, habit :P
I'll talk to you later, I'll see if I can figure this out.
@fge that actually didn't work o.O
Void cannot be converted to ObservableList<Data>
surprise..
drop the collect statement
    ObservableList<PieChart.Data> pieChartData2
            = data.entrySet().stream()
            .map(entry -> new PieChart.Data(entry.getKey(), entry.getValue()))
            .forEach(pieChart.getData()::add);
    pieChart.getData().addAll(pieChartData2);
fge
fge
14:45
@miniHessel oh dear...
so drop the pieChart.getData().addAll(pieChartData2);, right?
fge
fge
You didn't read the javadoc for .forEach(), right?
sorry, @fge
fge
fge
The whole interest of using .forEach() here is to avoid creating the unnecessary collection to start with
Your whole code should be data.entrySet().stream().map(entry -> new PieChart.Data(entry.getKey(), entry.getValue()).forEach(pieChart.getData()::add)
and that's it.
let's just ... leave it at that.
fge
fge
14:48
And you can even shorten it: data().forEach((k, v) -> { pieChart.getData().add(new PieChart.Data(k, v); });
But really, don't use lambdas if you don't actually need to
You end up with convoluted, useless code which is moreover very hard to debug
(since most call sites are static)
Sorry for the newb question, but isn't data.entrySet().stream().map(entry -> new PieChart.Data(entry.getKey(), entry.getValue()).forEach(pieChart.getData()::add) lambda as well?
you missed a parentheses, so I managed to fix that at least...
:p
Since I can't override compareTo in an enum, can I expect the enum with implements Comparable<EnumType> to behave itself on compareTo()?
Thanks @fge
fge
fge
@Unihedron define "behave itself"... By default, enum values are compared using their .ordinal() result -- that is, their index in values()
Oh, that's what I want, thanks!
fge
fge
15:03
Therefore the comparison result depends on the order in which you declared the enums
Hmm, ok.
Is there a way to combine all Ts into a single collection / list in Stream<List<T>>?
fge
fge
Nothing prevents you from writing a custom Comparator, of course ;)
Yes there is ;)
theCollection.stream().map(Collections::singletonList)
:p
fge
fge
Hmmwell, this is what you want, right?
Erm... It gives an immutable list instead :P
I wanted Stream<List<T>> -> Stream<T>
fge
fge
15:08
Aah, OK
Or even better, List<T>
'Cause I somehow ended with a stream of collection after some operations
and needed to merge them into one
fge
fge
Well, you can create a List<T> list and use .forEach(list::addAll); but with Guava you also have Iterables.concat()
fge
fge
But how on Earth did you manage do generate a Stream of Collections?
(note: Stream also has .concat())
Do you really want to know? You might hate me if I show you this
/**
 * @return An immutable list containing all message handlers.
 */
public Iterable<MessageListener> getListeners() {
    return Iterables.concat(listeners.asMap().entrySet().stream().sorted(this::compareEntryByKey).map(entry -> entry.getValue()).collect(Collectors.toList()));
}
And the value of a Multimap.asMap() value is Collection<MessageListener>, so...
fge
fge
15:15
Err
Do you know that Map has .values()?
Yeah, but I gotta sort it first.
I don't think EnumMaps behave like TreeMaps.
fge
fge
Yes, but you can write a comparator by value instead of mapping your entry to get the values
fge
fge
Ah, so listeners is what exactly?
An EnumMultimap?
listeners is a Multimap<Priority, MessageListener> with an underlying ListMultimap based on supplier ArrayList<>().
Supplier<ArrayList<MessageListener>> supplier = Suppliers.ofInstance(new ArrayList<>());
EnumMap<Priority, Collection<MessageListener>> map = new EnumMap<>(Priority.class);
listeners = Multimaps.newListMultimap(map, supplier);
fge
fge
15:19
Uuh, a Suppliers.ofInstance(); this is basically a singleton
Is this what you want?
It's the only method out of the parts I've seen in Guava that gives me a Supplier to create a new multimap with :/
fge
fge
That is not what I mean here
Should I be using something else, other than the singleton?
fge
fge
OK, maybe my choice of words was not wise; what I do mean is that your Supplier will always return the same ArrayList instance
If you want it to return a new list each time it is called, you could replace it with ArrayList::new instead
Huh, it does, you're correct
Is this the right way to do it?
EnumMap<Priority, Collection<MessageListener>> map = new EnumMap<>(Priority.class);
listeners = Multimaps.newListMultimap(map, ArrayList::new);
Yay I learned something new today!
Thanks so much! :D
fge
fge
15:26
@Unihedron no idea, I never used the Multimaps factory methods -- I have to check
It looks correct in syntax.
I'm going to have to devote some time to learn about this Java8 stuff :)
fge
fge
Well, a cursory look at the javadoc tells me that you have it right; not sure about a guaranteed key iteration order of EnumMaps though
Ok, I'll change it to a TreeMap then!
fge
fge
Uhno, wait
You don't need to
Oh?
Are enummaps automatically sorted?
fge
fge
15:28
From the javadoc of EnumMap: "[...]Enum maps are maintained in the natural order of their keys (the order in which the enum constants are declared). This is reflected in the iterators returned by the collections views (keySet(), entrySet(), and values()). "
! :D
So instead of return Iterables.concat(listeners.asMap().entrySet().stream().sorted().map(entry -> entry.getValue()).collect(Collectors.toList())); I can safely use return listeners.values(); and it will work perfectly right?
fge
fge
Yup
Oh my god.
fge
fge
Glad I could help :p
Mind = blown
fge
fge
15:34
Gee, I guess I could find a job as a Java dev
@fge You'll be an amazing java dev :P
@fge it's like.. reading helps ;)
Too much to read, so little time / motivation :)
fge
fge
@Vogel612 yes, and writing too -- I happen to love writing documentation, unlike many people
It's difficult to write really good documentation
15:41
@fge I like writing javadoc bars too! I also found a plugin that inserts automated unit tested output and source code snippets into javadocs where special tags are present. It's called Codelet. I haven't gotten to messing with it though.
fge
fge
@Unihedron well, I have to try ;) Zero professional experience is a problem where I live
@Unihedron oh, I know this library
Great! :P
@fge Well, good luck! :)
fge
fge
@Unihedron I even "know" the guy who wrote it (I was the one who suggested that he use the name "codelet" as well), he used to lurk in this room quite often; @Michael knows him too
@fge Ohh, I think I saw him here once as well :P
and in RegEx room
fge
fge
/me has been away for too long
15:46
/me should had joined SO sooner
Heya @skiwi
16:02
hey
hello
I had an adventure today
Ohai
I went on surprise murder today
I watched someone go for a darwin award, luckily though, everyone else in traffic did not.
guy turned left across the road, running a red light.
Oh?
Hi @Oli!
Normally everyone are speeding in that intersection, so he could have taken a car to the side with the other car going 60 or 70km/h. So glad he lucked out, mostly because of the other people; why should they get injured in accidents because he ran a red light? :/
fge
fge
16:18
@Gemtastic trying to understand the mind of a human being at the wheel is a lost cause
@fge A lot of people really shouldn't be behind the wheels. :/
It's a loss for rep change for today for me :P
Are all of those yours?
16:23
@Gemtastic who elses?
@Gemtastic yep
fge
fge
Uuh, learning something new here
How are exceptions dealt with in try-with-resources statements, and throwable suppression
@fge The resource is first closed, and then the exception is brought the the catch block if it's caught, otherwise the block is terminated the the exception is brought to the nearest scope.
The try-with-resources statement contains declarations. When the block of code that directly follows it terminates, either normally or because of an exception, the close methods of the objects are automatically called in the order they are declared. Note that the close methods of resources are called in the opposite order of their creation.
fge
fge
16:41
@Unihedron that is precisely the page I am reading at the moment
fge
fge
@Unihedron have you noticed? Even though this documents a Java 7 feature, none of the examples use java.nio.file
fge
fge
In particular, in the zip example, they don't use FileSystems.newFileSystem() to "open" the zip file
16:55
@fge Can you help close this question? stackoverflow.com/q/24841579/3622940
fge
fge
@Unihedron meh, I have to read the whole question? :p
@fge Tl;dr: No minimal code and too much to read, close as lack of MCVE ;)
Aaand I'm out of close votes, clean up act complete
Have you seen this @fge?
Well, good night! :)
17:23
hey there!!
i have to give a presentation on object cloning on Monday at my class can anyone help me what topics i have to cover in it.
fge
fge
Eh, easy topic: clone() sucks, don't use it
And anyway, what is "object cloning"? Is that all there is as a content to the title?
what topics it can have , as some of the topics related with this is intro. exception handling ,singleton class as it can breach the laws of it
topic is object cloning faculty said it is very important topic so i have to cover all the related thing
it can be use as copy constructor alternative
fge
fge
17:38
But nearly nobody nowadays uses Cloneable
I can't even understand why your "faculty" views it as a "very important topic"
Well, that is with Java
because she told us it is good topic for interview.
18:20
Hello...
 
2 hours later…
20:22
Does anyone know the answer to this question: stackoverflow.com/questions/26788260/…
Sorry, can't help you :/
(And everyone else seem afk)
I'm AFK
GET BACK IN THE KITCHEN KYLAR!
;P
Grab yourself something tasty, you've earned it
Does AFK mean At the Friggin Keyboard?
/me is confused
AFK is either away from keyboard or away from kitchen
;P
21:27
Hi there.
Can someone give me the What is the Definition of a class in Java
21:40
give me the answer on:*
What do you think it is? :)
I you had to guess
I thought something related to:
A class is a sort of blueprint of a group of objects and methods
javaChannel.Out.println("Hello All!");
Hello mlwn :)
Am I correct in some way?
21:41
how you doin Gem ???
@MikeM. Yes, that's pretty much it.
(parteh) xD
Sorry for asking such questions I need to get an 8,5+ tomorrow if I want to pass this college period ...
All code in java must be within a class, else it won't compile or run.
Good luck tomorrow then
I know that but it's theory
so ye xD
The theory is good to know, helps in knowing why your code does and doesn't work
21:45
Well ye but it took me a year to understand what a method was while I thought it wasn't a programming word for function XD
I was also confused about that
Well, it's good that you know that now :)
well ye I basicly always used methods but I just called them functions
now I always call them methods xD
I pretty much never call them functions, unless it's a method that actually performs functions :P
Huh?
oh wait
a method for calling methods?
I was thinking about the more mathematical term. When my method performs math I call it a function. I dunno if that's a valid way of calling them, but I think it makes more sense
21:52
mvi  c, 00 ; initialize C reg. to 00
lda  0000  ; load the value to the acc.
mov  b, a  ; move the value of acc. to B reg.
lda  0001  ; load the value to the acc.
ohhh got it ( I sound so stupid)
mlwn {no brainfucks PLZ} :(
Interesting to know: Brainfuck is a real programming language xD
sorry.. was trying something else, and those fell out of my clipboard... :(
I have a hole in my clipboard, I need to weld some patching on top of it..
Brainfuck is an esoteric programming language noted for its extreme minimalism. The language consists of only eight simple commands and an instruction pointer. It is designed to challenge and amuse programmers, and was not made to be suitable for practical use. It was created in 1993 by Urban Müller. == Language design == Urban Müller created brainfuck in 1993 with the intention of designing a language which could be implemented with the smallest possible compiler, inspired by the 1024-byte compiler for the FALSE programming language. Several brainfuck compilers have been made smaller than 200...
21:54
At least it was just asm. More typical is to accidentally write a password for the world to see
@kiheru I don't keep passwords in my clipboard..
or anywhere else..
:p
not in memory either? darn, that must make life difficult :-P
I keep them in a txt file on my computer? XD
(joke)
I put them literally on pastebin!!!
passwords...
lol
@kiheru, what about your house keys.. they are like passwords.. where do you keep them ??
I have a password on my house
21:58
jokin or real?
My kids can remember a passcode, but they're hopeless with keys
wait what?
how old are they?
With that system you can't get home too drunk...
13, 10, 4
and each of them can remember a passcode?
22:00
They can remember their own passcode
0000? xD
They spell out things, like POOP or something
-.-
obvious tho'
man when I was 13 I always forgot passcode stuff xD
And if they get in they still need the alarm code
login on websites {uhm what was my pw?}
22:00
so, practically, each person has a passcode to your house @Kylar, ??
happy brute force XD
Each of the 4 oldest people in our house each has 2 separate passcodes
one for the front door, one for the alarm
this might be funny.. but I have no key.. I employed a security guy, and leave the door open...
:p
A person would need both, or the police automagically show up
Happy bruteforcing you've got 4 possibilities for the front door and 8 passcodes for the alarm :)
@Kylar you live in a mansion or something?
22:03
You've got 45 seconds to brute force my alarm
Have at it!
And if you are smart enough to get past that while my dogs are attacking you - you're welcome to my 6 year old TV and my coffee maker
I guess you might find an old iPod, and a PS2 as well
FrontDoor.Out.Println("Front: " + passcode);
Alarm.Out.Println("Alarm: " + passcode);
oh, no! I could get past the dogs, but I'm afraid of being attacked by a TV
And on top of that, you'd have to find a time when there's no-body in the house as well.. and that's a challenge lately
"while my dogs are attacking you" I am used in training dogs even though I am 17, I am pretty much used to get bitten by dogs :)
is the PS2 that big ass one?
The PlayStation 2 (PS2) is a home video game console that was manufactured by Sony Computer Entertainment. It is Sony's second installment in the PlayStation Series. It was released on March 4, 2000, in Japan followed by North America and Europe later the same year. The sixth-generation console competed with the Sega Dreamcast, Microsoft Xbox, and Nintendo GameCube. The PlayStation 2 went on to become the best-selling video game console in history, selling over 155 million units. More than 3,870 game titles have been released for the PS2 since launch, and more than 1.5 billion copies have been...
22:06
ye which one
the big ass one or damn small one
(the left one or the right one in that picture)?
22:38
Is a JFrame a container?
I think it is.
23:00
Yes
23:59
Thanks
I am going to sleep now
tomorrow morning I go on with Chapter 9
Poliomorphy or so

« first day (1475 days earlier)      last day (3690 days later) »