« first day (1508 days earlier)      last day (3441 days later) » 

fge
2:06 PM
Embarrassing keyboard typos: writing a mail to someone you respect and want to have a good relationships, and mistype "Retards" instead of "Regards" at the end
 
You're a winner!
 
fge
(I nearly did that a couple of times... Fortunately I always re-read myself before sending)
 
~JavaBot at your service
you keep using that word....
hmm... it doesn't work the way I wanted it to..
**help
 
Guys, I have an interface that defines a function. I have a class that implements this interface but when I use @Override annotation on the overridden function, it doesn't let the class compile but once I remove it, it compiles fine. Why does this happen? Any thoughts?
 
fge
@Mr.777 you are probably not implementing that method... Code please (on a pastebin)
 
2:13 PM
The implementing function isn't the one you're overriding
 
Because you don't override it, but implementing
 
Isn't there any other utility for pasting the code? Coz pastebin is not authorized by my ISP
 
if it's short, you can paste it here
 
or pastie, github gists...
 
2:15 PM
StackOverflow should have it's very own code-pasting service :P
 
**shutdown
 
public is not required in the interface
 
~JavaBot at your service
 
2:19 PM
Those colours..
 
@Juxhin You liked the syntax coloring? Such good lad with a good taste of colors! You want the theme?
 
I'd get a nervous breakdown in ~5 minutes with that theme
 
ehh?? why that??
 
fge
@Mr.777 strange, it should work
 
2:20 PM
Hurts my eyes haha
 
@Unihedro Cool theme :)
 
@Mr.777 what IDE are you using?
 
What does it say when you hover over the text wrapped in red lines?
 
@Unihedro could you share it?
 
2:21 PM
@fge I agree, it should work but it's not
 
@Vogel612 it's a default eclipse theme...
 
oh i get it now, i could use the jdk to run the program afterwards, but the jre is for desktops... or wait for eclipse to just update
 
@Vogel612 I am using STS
 
@Juxhin why that? for me the light themes kill me...
 
fge
@Vogel612 this looks like bona fide Eclipse
 
2:21 PM
Good morning, Java!
 
I like mine more..
 
fge
Good morning milord
 
**help help
help command: Get additional info about a command of your choice, syntax:**help [commandName]
 
@OlegKuznetsov Of course! Hang tight..
 
@Michael Good Morning, sire
 
2:21 PM
Each to themself, I work with both light and dark themes, though the colours just hurt
 
now i can sleep
 
@Juxhin but compeletely light screens are just...
meh..
 
Depends on my enivornment
In the morning I work with dark theme
Evening with light
 
White hurts the eyes.
 
Whatever settles with my eyes at the time
Works fine with me
 
2:23 PM
You'll realize that when you (have to) code as much like we do.
 
Dark theme with f.lux on 3.4k kelvin color temperature
 
Morning @Michael!
 
Hey @Uni :)
 
Like I said, I transition between light and dark
 
at least in evening.. at day it's 6.5k kelvin
 
2:24 PM
For me it's dark all along.
 
Last time I tried the dark theme in Eclipse, it didn't work that well.
 
I just bolted together my own...
 
Currently using Obsidian on Eclipse, that seems to work
 
fge
I use IDEA's default
It's pretty good
 
That's also good yea
All boils down to personal preference really
 
2:27 PM
sure it does..
okay small test:
how do I write my own code?
I am a retard...
 
Rent somone.
 
I really should've started the Interactions bot...
~JavaBot at your service
 
@Unihedro I'll ask again, when I'll come back home :)
 
@OlegKuznetsov I'll ping you when I get it :)
 
how do I write my own code?
 
2:30 PM
It's gotta be in one of these .pref files...
 
~ Write code
 
how do I stop the bot?
 
that's more like it, but you keep using that word
 
@Unihedro Ok. Thanks! :)
 
2:30 PM
how do I ask questions?
 
~ Write code
yea it's not that refined yet...
but it kinda works..
 
2:45 PM
@Oleg Right click this and select "Save as...", then save it to somewhere you like. Optionally scan it for viruses if you're on a Windows, just in case you're in a MITM. Go to %your_workspace%/.metadata/.plugins/org.eclipse.core.runtime/.settings and open org.eclipse.jdt.ui.prefs with a favourite editor of yours. Copy the lines from my file into relevant lines of your file. Save and restart Eclipse.
Disclaimer: Make backups.
I am not responsible for any harm caused by using my theme. I am not responsible for any dangers introduced by the theme, and anyone using the theme for illegal purposes is of no relationship to me.
 
Anyone here with spring development experience?
 
none worth mentioning
 
@Mr.777 shoot
 
shoots down ItachiUchiha with a machine gun
We should totally make a combat-like coding game. :P
 
I can't find any scenario where I can have the two beans with same name or id @Ita
 
2:55 PM
hmm.. another interaction...
shoot -> Boom
 
fge
Grrr, full content is written to the PipedOutputStream yet the PipedInputStream doesn't seem to acknowledge it ;(
 
@Mr.777 wht wud you want it?
 
@ItachiUchiha I know it's not preferred, neither recommended but since it's allowed, I want to know the use case
 
Well I would say, its lame to declare two beans with same id
its just bean overloading
 
No, it's not overloading but overriding
And that's why I am confused, if this overridden behaviour works like OOP overridden concept?
 
3:04 PM
You mean polymorphism?
 
fge
@ItachiUchiha still waiting for that no-op WatchService :p
 
@fge I am still waiting for my broadband connection, though I went through the whole doc while i was at my workplace :)
 
@Unihedro Yes
 
@fge possibly interesting for you: stackoverflow.com/questions/27382099
 
@Vog! I just had an idea!
 
3:09 PM
@Uni out with it then ;)
 
When we migrate JavaBot to use JCE as its core, we should announce the project on Stack Apps!
Like Sam did with Phamhilator.
 
fge
@Vogel612 indeed... I'll try that code
 
@Unihedro sure one ;)
 
Actually, never mind that. Too lazy to.
 
@Unihedro ?? oh?
 
3:10 PM
You can do it if you want later.
 
kk...
 
lol
 
@Mr.777 this might be of use to you stackoverflow.com/a/5849483/1759128
 
@ItachiUchiha Thanks
 
you put it there??ß
I don't get the problem...
 
3:16 PM
@miniHessel what?
 
@ItachiUchiha I updated my question
 
you removed it
 
String.format("This item is popular because we found that out of your %d transactions, this item is sold %.0f times.", numberOfTransactionsFound, soldTogether);

How can I make a % appear behind %d ?
 
That's not updating, that's invalidating parts of the transcript!
 
@miniHessel use an escape character
 
3:20 PM
\ ?
I thought I could use \'%'
 
\\
 
\\% only?
actually it's %%
not \%, not \\% but %%
 
The formatter is hard to use.
 
3:58 PM
@Ita May be you can answer? stackoverflow.com/questions/27383245/…
 
4:16 PM
why is ecplise not recognizing what I have as a project
 
@WalleCyril you gotta import it as one
otherwise, it's a "simple project", not a "java project"
> This code is licensed under a do-not-use-me-or-you-will-be-sued license.
 
- Syntax error, annotations are only available if source level is 1.5 or greater
what should I do to try my @Test
 
Why are you using Java 4?
You can switch to Java 6 / Java 7 / Java 8 by having the corresponding JDK installed and adding it through your build path settings.
So:
Right click on your Project in the Project Explorer
In the context menu, select "Build Path"
Add JDK 7 or something to the "systems library" tab or alike.
 
@Unihedro sometimes kepler is unfriendly with jdk 8..
why?? no idea, but it seems to guess the source level as 4...
 
@Vogel612 It makes me shiver that the default compliance level is below 1.5.
 
4:27 PM
and you need to manually lift it to 8...
 
there is no systems library and I m completly lost
 
fge
@WalleCyril set your Java language level to what you want (1.5 or later)
 
I don t know how
 
choose your project, press Alt+Enter and then search for compiler
 
Anyone know of a LINQ structure library for Java?
 
4:39 PM
@fge ah cool
 
Night!
 
night @Unihedro
 
Night mate
 
how can I define a minimal new exception
I have this public class NumberTooBigException extends Exception {

}
 
@WalleCyril public class MyException extends Exception { }
yea that should be fine....
 
4:47 PM
is that it ?
 
yea that's it..
keep in mind that you shouldn't use exceptions for control flow
I'm off for today anyways ;)
 
5:07 PM
hey guys, given two string arrays, what's the quickest way to create a HashMap<String, String>?
 
5:48 PM
Anyone around?
 
fge
Sort of
 
Thanks God you are here
I have a question
I was asked during an interview few days back
Java Sets usually don't preserve order of insertion
How can one develop a solution to keep the insertion in order?
 
fge
Develop?
Well, there's LinkedHashSet which does preserve insertion order
 
develop = Write code
 
fge
Ohwell, you can do it, sure -- you'd have to have a linked list of elements
 
5:53 PM
Why Linked list?
 
fge
A doubly linked list, even
Hmmno, maybe not if you don't need to implement NavigableSet
 
okay
 
you can use LinkedHashSet
@Mr.777
 
@ItachiUchiha Yep thanks
I have got one more question.
It's not that I have never used collections. I have used them but I can't remember things like you guys do. So, what is the best thing to remember things like difference between two things, why to do this & not this, what this particular thing exactly do etc?
 
Read about them, practice. Even I tend to forget things, but practice keeps you going!
 
6:05 PM
@ItachiUchiha Okay I always get the same answer "Practice". What to practice & how to? Let's assume, I want to practice Collections framework or java.nio.file (@fge's favorite) what exactly should I do?
I can make things done. Like you ask me to do some task, I can do it but even a fresh programmer can do it. So, the main thing is, what exactly & how exactly to practice?
 
Practice writing code snippets. See how each class behaves in a diff way than the other.
 
Hello Guys
 
Hi
 
Yeah, Thanks for the reply, please have a look at this question:
0
Q: Amazon RDS + Spring MVC + Flyway - Getting no database selected

Vishal PawaleI'm trying to integrate Amazon RDS with webapp developed in Spring MVC. I'm using Flyway as db migration tool. I'm able to connect to the RDS but the thing is whenever flyway starts the migration, it tries to create schema_version table without firing use database_name query. And that's where RDS...

@Mr.777: Do you work on Spring? Did you check the question?
 
6:28 PM
Yes, I do work on spring and I checked the question but don't know anything about flyway
 
ohh okay
even same issue happens if I go with creating tables using JPAVendorAdapter
any idea, if we can somehow get workaround using HibernateJPAVendorAdapter?
@Mr.777 No idea?
 
HibernateJPAVendorAdapter doesn't provide any implementation to specify schema but looking into it
 
no, I was talking about generating ddl using HibernateJPAAdapter
We will create schema manually, but the task of generating tables can be done by HJA
 
Did you try hbm2ddl.auto?
 
nope, what is that?
oh waot, I'll google
*wait
 
6:41 PM
If you are using hibernate as provider, setting hbm2ddl.auto to createordrop , update etc will take care of DDL generation
 
yeah, got that
 
BTW, flyway has very poor javadocs
 
hmmm, I don't find it that bad :P
 
Really? Share the link
 
fge
Well, the box java sdk makes things difficult :(
 
so instead of hbm2ddl, I am using HibernateJPAVendorAdapter.setGenerateDdl(true);, it creates ddl for me
just a sec
Yeah, you have right link to the java docs
 
So, you still think, these are not poor? :D
 
@fge: didnt get you
@Mr.777: Yeah, I think these are not that poor, I've seen worst man :)
I guess above link might help me
I can specify initSqls
 
fge
@VishalPawale didn't get what?
 
@VishalPawale Seems so. Try this.
 
6:54 PM
@fge: "Well, the box java sdk makes things difficult :("
 
fge
Nevermind
 
@fge can not import java-fs-dropbox into eclipse
 
@Mr.777: Yeah, let me try it.
@Mr.777 @fge: Looks like I'm missing something, what is "box java sdk"?
 
fge
@Mr.777 oh? What's the error?
 
@fge couldn't find com.github.fge:java7-fs-base
 
fge
7:06 PM
Hmm, curious
@Mr.777 my bad, I did not publish it, heh
 
When are you planning to publish it then?
Or is there any other way around temporarily?
 
fge
@Mr.777 in progress
 
Okay, can you please ping me once done?
 
fge
Yes, there is a way around it -- clone -base and install it locally (./gradlew clean test install)
OK, SonaType tells me it is published; not sure when it will be available for download however, it may take some time
 
Okay, I will go with the local install.
 
7:16 PM
haha
 
Do I need to comment out the java7-fs-base from build? @fge
 
I needed to read docs on Collectors
 
fge
@Mr.777 from build.gradle you mean?
 
and ofc oracle decided that the page needs to be down
 
yep
 
7:16 PM
does this work for anyone else?
 
fge
@Mr.777 well, no; and by the way you want to depend on 0.0.2-SNAPSHOT (no API changes yet from 0.0.1 so you're safe)
 
@AnttiHaapala Yep it's working
 
grr so must be a stale cache snapshot here or sth
 
i have installed base but still the same error on ./gradlew eclipse
 
403 error
 
7:19 PM
 
all others that I clicked seemed to work, only java.util.streams.Collectors does not :D
 
@AnttiHaapala Funny. Seems like, oracle knows your intention
 
yes
maybe bc I clicked there through google :D
"omg that guy came here from google, that's a no no"
"now record his ip and give some 403s"
 
fge
@Mr.777 so, does it work now?
 
Nope, not yet @fge
4 mins ago, by Mr.777
i have installed base but still the same error on ./gradlew eclipse
 
7:22 PM
Hi Everyone
 
Hello
 
I have a JSONArray like this:
[{"login_fail": {"onsite_notice": "1","feeds": "2","object_feed":"2"}},{"login_success": {"onsite_notice": "1","feeds": "2","object_feed":"2"}}]
I want to retireve each of object from this array but it gives exception
 
hi guys!
@Unihedro Thanks!
 
fge
@Mr.777 how did you try and build -base?
 
java.lang.ClassCastException: com.google.gson.internal.LinkedTreeMap cannot be cast to org.json.simple.JSONObject
 
7:24 PM
@fge ./gradlew clean test install
 
fge
Well, that did work, didn't it?
 
@fge Yep it worked but now on dropbox ./gradlew eclipse doesn't work
 
fge
Ah
I have never used this
Try and open it directly with Eclipse
Since it supports gradle it should do things correctly, I surmise (don't use Eclipse, can't tell)
 
directly? You mean as filesystem?
 
fge
No, I mean open the directory with the project
Since there's a build.gradle it should recognize it, right?
 
7:26 PM
@fge Do I need to integrate gradle into eclipse?
 
fge
Doesn't it have gradle support by default?
 
@fge Nope, it's not idea :P
 
fge
Hmm, I thought it had
Anyway, can you open an issue with the error you get when you ./gradlew eclipse?
Or you can install gradle integration -- there are plugins available from what I can see
 
@fge Yes, I am installing plugins, but do you still need me to open issue?
 
wonder if there is a bug in eclipse compiler or in java 8 spec:
		List<String> solvingOrder =
			sectionNeighbors
				.entrySet()
				.stream()
				.sorted(Comparator.comparingInt((Map.Entry<String, Set<String>> e) -> e.getValue().size()).reversed())
need to have argument type for lambda there in "comparingInt", otherwise does not compile.
 
fge
7:48 PM
@Mr.777 please do -- not sure whether I'll solve it though ;)
 
fge
@Mr.777 can you paste the content as text instead of a screenshot?
@Mr.777 strange; it works for me
 
8:04 PM
@fge Yes, let me do that
@fge Really? :O
 
fge
(first time I've ever tried, heh)
 
wow it happened now for me as well
 
Evening all
 
fge
Mmeh
@Mr.777 when did you clone -dropbox-fs?
Err, fs-dropbox, I mean
 
@fge Two days ago
 
fge
8:10 PM
Aah
Well, git pull
 
8:23 PM
Can I have everyone's opinion

If a user passes an invalid/ unrecognized argument to my java application from the command line.
Should I throw an exception or just exit gracefully?
This is what I am doing
System.out.println(e.getLocalizedMessage() + ", please check the document for accepted command arguments.");
System.exit(-1);
 
you really shouldn't interrupt your program like this
 
What should I do then....
They have given invalid arguments when calling my .jar
 
Exception is better, imho
 
That's what I am doing

catch (ParseException e)
{
System.out.println(e.getLocalizedMessage() + ", please check the document for accepted command arguments.");
System.exit(-1);
}
 
fge
9:05 PM
@loosebruce I'd avoid a -1 return code if I were you
 
9:47 PM
My shell script looks for return codes from the jar
 
Then you can print a nice message
 
fge
@loosebruce still, -1 is not a good idea
@loosebruce use 2 or upper, and less than 127
(also, don't use 1 -- this is what the JVM uses when an uncaught exception makes it up to the main thread)
Guava rocks
 
10:43 PM
getting a consistent glitch with scanner. Anyone mind looking at a short bit of code?
public int prompt() {
  Scanner s = new Scanner(System.in);
  System.out.println("Please choose one of the following:");
  // print out choices here
  int choice = s.nextInt();
  return choice;
}
public static void main(String[] args) {
  while(true) {
    MyClass r = new MyClass("/path/to/file.txt");
    int choice = r.prompt();
    switch(choice) { ... };
    r.writeToFile();
  }
}
on the second iteration, it breaks within prompt
 
fge
@corvid you need to swallow the newline
 
what do you mean by that?
 
fge
Scanner will read an int; then the next time, it will read the newline you entered
Which is not an int --> boom
Rather than .nextInt(), use .nextLine() and Integer.parseInt()
 
11:01 PM
Hey guys, question: Spring MVC with springboot starter web expects a template, but I want to return an XML string. How can I override this? I've tried to manipulate the RequestMapping @RequestMapping(value="/response", produces="application/xml")
My co-worker said it's gotta be something simple but it's late and he had to go so I'm trying to research it. Nadda
Shoot, innactive. If anybody knows, ping me. I gotta run.
 

« first day (1508 days earlier)      last day (3441 days later) »