« first day (1861 days earlier)      last day (3073 days later) » 

12:25 AM
Computer Science is more theoretical, I think. Software Engineering is more practical.
 
 
1 hour later…
fge
1:50 AM
You can always hone your skills in software engineering by yourself; learning theoretical CS is another matter
I'd go with CS
Especially since the concepts you learn there can be pretty useful
 
2:04 AM
That's kinda the great thing about programming--you can learn and do pretty much everything from your home computer. Surgeons don't have that luxury. xD
 
 
2 hours later…
3:48 AM
I have a small question, Asking here because its not of SO standard.
How is my DAO mocked when i am using spring runner in junit?

Lets say I have orderTblDaoImpl with insert(returning int)/select(returning object).

So whats returned on call to ordertblDaoImpl.select(orderid);
 
4:47 AM
hello guys this is the room for java so i want to learn some knowledge for annotation how it works with java will anyone suggest me ? plzz
 
 
3 hours later…
8:11 AM
Annotations are a general java concept used for many different things. Some of the most basic and useful things that use annotations are JAX-RS/WS (for creating web services) and maybe Enterprise Java Beans (they make use of A LOT of annotations) for managing your application objects. Once you read up on those topics you'll probably have a good idea of what annotations are and how they can be used.
 
@Konstantine you might want to ping Hardy with that
so. use @Hardy in your message. They'll receive a notification then
also: welcome to chat :D
 
Thanks :) @Ko
@Konstantine
 
First time using the chat was so obvious. Thanks for the tip
 
I recommend you read the faq
It has a lot of nifty tips and tricks in it :)
 
I also have a question: I'm trying to deploy a web application on Weblogic 12.1.3 using JAX-RS 2. I've managed to make it work apart from 1 small thing that breaks everything. It seems that I am unable to inject @Context HttpServletRequest into a filtering class implementing ContainerRequestFilter interface. I am able to inject the request in all the other resources but when I try to do it there weblogic throws an exception.
i've looked everywhere on SO, on the internet no answers. There is a question here on SO detailing the exact problem but there are no answers there either. If anyone has any ideas that would be really helpful. Question link: stackoverflow.com/questions/33400142/…
 
8:31 AM
morn
 
Hello, i need a guidence
i have already created Spring Project in eclipse
even i have added Amazon AWS SNS dependency in pom.xml
i have sample code for it.
but I don want to keep AwsCredentials at server side.
like accessKey and secretKey
how to create role for it so using role i can access AwsCredentials
???
 
9:07 AM
posted on November 27, 2015 by Artist

I've been rather busy with school and work while trying to find me an internship that's gonna lead to a job and so far it seems like I've had a huge success. Out of all the courses I've completed so far 8/9 I've got the highest grade in, and the 9th one is a passing grade. I know school and real life are two different things but it still feels good to do well in school. If I can't even do that

 
 
2 hours later…
10:40 AM
ah, the joys of Spring day after day
 
fge
@Tavo if only that were a lowercase S
 
@fge main reason why I want to move to Singapore :P
 
fge
10:59 AM
@Tavo why have you even left Spain for UK, for Pete's sake?
 
yeah about that... in one word... work
 
11:27 AM
greetings
 
howdy
 
hey tova
toav
Mr. T
 
Morning
 
morning
 
Congrats on your new job @Gemtastic
 
Thanks, though it's not a "new job" just yet; we only have an agreement for the internship, but if all goes well they want to hire me. :)
 
fge
12:00 PM
faces a design problem
 
12:34 PM
o/
 
12:51 PM
\o
 
1:14 PM
Morning, Java!
 
o/
 
fge
Java trap... You have a List<Integer> named list with contents [1, 3, 2]; you do list.remove(3); what happens?
 
quick answer: NPE
 
fge
@wonderb0lt I suppose they're on a bed where they were not supposed to be in the first place
Well, they're cats
 
1:21 PM
now I'll think
 
fge
@Tavo no
 
remove(int) is called as this is the most specific overload
?
 
fge
Yes; which means?
 
IndexOutOfBoundException
 
fge
Yes
 
1:22 PM
since index >= size
 
fge
Missing the 's' after the 'd' but yes, that is what happens
 
oh, yes
^_^
 
Yes I win at java
 
fge
Now, side question: what is the correct way to actually remove 3 from that list? :)
 
3 as in the element with value 3 or the third element in the list?
 
fge
1:24 PM
3 as in the element
 
Not sure, but I'd say casting Integer(3) to Object
 
fge
@wonderb0lt nearly there -- the solution is to list.remove(Integer.valueOf(3))
 
Fair enough
 
oh
I was going to say list.remove(new Integer(3))
 
fge
1:25 PM
@Tavo that would work too
But Integer.valueOf() is more efficient
 
fair enough
 
fge
By contract, the JDK requires that the Integer class have a cache for all int values between -128 and 127
So using the static factory method is your best bet
And this is how boxing is done for primitives
 
another alternative: list.remove((Integer) 3);
 
fge
All primitives have a static factory method named valueOf()
 
not sure how efficient though
 
fge
1:27 PM
And that is how autoboxing works
 
I'd say list.stream().map(Integer::toString).filter(x => x.equalsIgnoreCase("3")).collectToList();
thats efficient
 
fge
@Tavo that would generate code like (Integer) Integer.valueOf(3) :p A no-op, basically
 
@wonderb0lt and unreadable
@fge but still would work :P
 
fge
@wonderb0lt that would be .collect(Collectors.toList()) :p
 
@Tavo and not a serious proposal
 
1:29 PM
@wonderb0lt anything people write here is serious
 
fge
@Tavo still, it can be interesting to pinpoint and accurately explain all the flaws in such non serious proposals :)
The first of which is: you have no idea about the characteristics of a List returned by Collectors.toList()
Will it be immutable? Can you .remove() from it? Can you add new elements? Can you replace elements?
All questions that this particular method leave basically unanswered
Hence Collectors.toCollection() :p
 
on a similar topic: today I was trying to remove a set of keys from a map
and turns out there's not a method in the map interface to do that
 
fge
Yes there is, but indirectly
 
so I had to use guava
and create a predicate
is there?
 
fge
theMap.keySet().removeAll(collectionOfKeys)
 
1:33 PM
oh, there's the iterable I was looking for
 
fge
There you are :p
 
my solution was a lot worse (sorry, I can't access pastebin from here, it's restricted):
Maps.filterKeys(formatters, new Predicate<String>() {
@Override
public boolean apply(String s) {
return !templatesToBeRuledOut.contains(s); } })
horrible solution and I was not happy with it
thanks @fge
 
fge
Well, the advantage of Guava is that the predicate needs not be only .equals()
 
@fge I was just about to see if the keyset is mutable
 
fge
If you use Java 8 you can use theMap.keySet().removeIf(somepredicate)
@wonderb0lt it is; by contract it reflects the keys of the map, so any modification to that set modifies the underlying map
 
1:36 PM
@fge I figured it is seeing as you proposed it right there :P
 
2:03 PM
Good morning
 
hey
 
How's it going? Happy friday
 
great. and happy friday to you
 
noice!
 
fge
2:08 PM
I have nothing to do for work :(
 
fge
I want to teach
 
@JohnnyCoder I would go as SE but I'm biased being a software engineer myself. You can't become an engineer without a degree, you literally cannot call yourself an engineer legally otherwise.
 
fge
@Ballbreaker seriously go for CS; SE you can improve by yourself much more easily
 
2:09 PM
So it really depends what you want to do.
@fge Depends how easy of a time you want to have too I guess lol
Arts degrees = a joke
Anyways, I'm not trying to have an argument here, just trying to give him my advice on it
@Hans1984 Apparently there's a cat pic for everything isn't there
This one's classic, I used to love this picture ten years ago:
 
yes
 
haha
yeah i remember that one
its a good one
 
hahaha this ones good
 
;)
 
fge
2:24 PM
Classic Java trap, 2: how do you store text contents to disk?
 
2:44 PM
@fge With FileOutputStream! Duh!
 
fge
...
 
@fge You gotta be a bit more specific
 
fge
That's the point here
Specific about what?
In other words: do you actually believe there is only one way to store text data into files?
 
In what format does the text exist, in what encoding, to what disk do you want to write it to, what filesysstem, etc.
 
fge
Format? There's nothing as "format" in text
Text is text
Similarly, "to what disk" is irrelevant
The key here is in fact the encoding
 
2:49 PM
 
that's what I meant by format
we were talking about it earlier
in the end it's gonna come down to fopen, fwrite etc. anyway
 
fge
Which are of no relevance if you use Java
FWIW the JVM implementation could very well use sendfile(2) in the background
That is not a problem to you as a Java programmer
 
3:11 PM
im leaving
bye
 
/javadoc Files#newBufferedWriter
 
Which one do you mean? (type the number)
1. java.nio.file.Files#newBufferedWriter(Path, Charset, OpenOption[])
2. java.nio.file.Files#newBufferedWriter(Path, OpenOption[])
 
1
 
@Michael BufferedWriter newBufferedWriter(Path path, Charset cs, OpenOption[] options): Opens or creates a file for writing, returning a BufferedWriter that may be used to write text to the file in an efficient manner. The options parameter specifies how the the file is created or opened. If no options are ...
present then this method works as if the CREATE, TRUNCATE_EXISTING, and WRITE options are present. In other words, it opens the file for writing, creating the file if it doesn't exist, or initially truncating an existing regular-file to a size of 0 if it exists. (1/2)
 
Bye @Hans!
 
3:23 PM
Any gradle expert here ? I fail to add a dependency to a plugin task and I don't get what happens.
 
fge
3:35 PM
@DenysSéguret I do use gradle but I'm not an expert; have you asked the question on SO yet?
 
@fge yes, and I got a good answer
2
Q: Adding a dependency to a gretty task

Denys SéguretI'm using the gretty plugin in Gradle. It works, I can list the tasks, for example appRun, and execute them. But the tasks aren't found when I try to add a dependency with apply plugin 'war' apply from: 'https://raw.github.com/akhikhl/gretty/master/pluginScripts/gretty.plugin' transpileScss <<...

thanks anyway
There's about 5 seconds left to make an answer so much better I accept it in place of the existing one
 
 
2 hours later…
fge
5:46 PM
Ah, so Java 8 dropped support for EBCDIC :p
 
6:25 PM
posted on November 27, 2015 by CommitStrip

Pirate avoids lawsuit after hitting 200,000 video views

 
6:38 PM
greetings can i ask about Jasper reports , some one who know ireport
 
 
1 hour later…
7:40 PM
Need some to understand interfaces and events
which are not raised by the system
 
8:13 PM
hi all anybody can help with question stackoverflow.com/questions/33945027/…
may be in privete chat
 

« first day (1861 days earlier)      last day (3073 days later) »