« first day (1637 days earlier)      last day (3303 days later) » 
00:00 - 11:0011:00 - 00:00

2 mins ago, by Mr.777
Which language is when we do javap -c SomeClass
 
@Mr.777 Which language is what when the command?
 
@Uni ^^^
@Unihedro No, the instructions that appear as output
 
Java bytecodes.
 
public class basics.PolicyToolDemo {
  public basics.PolicyToolDemo();
    Code:
       0: aload_0
       1: invokespecial #1                  // Method java/lang/Object."<init>":()V
       4: return

  public static void main(java.lang.String...);
    Code:
       0: new           #2                  // class java/net/Socket
       3: dup
       4: ldc           #3                  // String 173.194.78.99
       6: bipush        80
       8: invokespecial #4                  // Method java/net/Socket."<init>":(Ljava/lang/String;I)V
Ops
 
11:04 AM
@Mr.777 Those are bytecodes - notice that this isn't what the machine runs on
 
Okay
 
11:31 AM
@fge I found you
 
^^
one of my favourite CommitStrip's :D
 
11:49 AM
@Mr.777 If you get delete privileges on CodeReview, I'll show you the backstory
 
@Vogel612 Hmm? What happened?
 
^^
also "Call of duty we're on a mission" started it, iirc
 
no. actually not
 
aww
 
11:55 AM
this one links to a deleted answer...
 
@SecondRikudo totally uninteresting backstory, isn't it??
 
12:07 PM
On a completely unrelated note @SecondRikudo do you also think that low-quality s are getting more on anime?
 
@Vogel612 Yes, and we're currently in the making of a new policy proposal
Well, krazer is mostly.
 
@Vogel612 I noticed too
 
maybe something like a popup for the tag might help? similar to the SO popups for certain tags?
 
There is one about using Reverse Image Search.
Doubt any of the askers read it.
 
also Gao started a Toolbox for id-requests
 
12:21 PM
Hey guys How would you modify a FXML file at runtime and save it's changes everytime you unload a old FXML file and load a new FXML file?
 
@Vogel612 Someday may be :P
 
@LuisAverhoff this sounds like an XY-Problem
 
@Mr.777 reputation doesn't grow on trees. Go work it up!
 
@Unihedro I do my best when I have time
 
yes there is more than just that I'm afraid. I left a detail question yesterday pertaining to this question. Here it is if you want to read it stackoverflow.com/questions/29690239/…
 
12:36 PM
@Unihedro Spring Is Awesome :) \
 
@Adio In an alternate universe.
Where things that suck are appreciated.
 
@Unihedro what do you use instead ?
 
@Adio Frameworks right for my tasks which doesn't suck.
 
sounds about right..
 
12:52 PM
@Unihedro Ok mention some ... I've worked with EJB :X Guice Framework .. What do you use ? And What is your task ?
 
@Adio what are you doing?? What is your task ?
that's the interesting part required to answer the question
 
@Adio webapp -> efficiency: spark, maintainability: tomcat, sanity: NOT WITH JAVA. phone -> android: ndk, ios: phonegap, windows phone: kidding I'll never develop anything for Microsoft
 
@Unihedro "maintainability: tomcat" you are aware that tomcat is not a framework by any sane definition?
 
@Vogel612 meh
question's fault
 
@Unihedro , windows phone: kidding I'll never develop anything for Microsoft :D :D :D :D
 
1:02 PM
You must have a rather low sense of humor. :p
 
I may or may not have failed to create a trigger correctly in postgresql...
dammit
 
:O
 
1:25 PM
@Gemtastic Aaaaaand I am just a retard...
 
@Unihedro Until they pay you twice the competitor :)
 
1:40 PM
@Unihedro ok. What Java-based stack of technologies would you take for development of a highload financing system?
 
@OlegKuznetsov What type of financing system? A desktop, web or mobile?
 
@Mr.777 web
 
Now, he can answer :D
 
hibernate
 
@fge is there any reason why any program would insert BOMs into my text-files? at multiple places?
 
1:42 PM
@Unihedro What else?
 
@Mr.777 It's financing, what else would you take?
I'd probably not use Java though...
 
@Unihedro And it's web too
@Vogel612 Just for the knowledge, what is BOMs?
 
The byte order mark (BOM) is a Unicode character used to signal the endianness (byte order) of a text file or stream. It is encoded at U+FEFF byte order mark (BOM). BOM use is optional, and, if used, should appear at the start of the text stream. Beyond its specific use as a byte-order indicator, the BOM character may also indicate which of the several Unicode representations the text is encoded in. Because Unicode can be encoded as 16-bit or 32-bit integers, a computer receiving these encodings from arbitrary sources needs to know which byte order the integers are encoded in. The BOM gives the...
 
@Unihedro Why not java?
@Vogel612 Thanks
 
@Mr.777 cuz its not general purpose
 
1:44 PM
@Unihedro What else is?
 
F# if Windows Server, Clojure or Go would be my choices otherwise, depending on specific case
Node or iojs even
 
Don't know any of the above mentioned, so not sure what to say
 
@OlegKuznetsov depends on where exactly you want to go. Probably a postgresql-db with JooQ adapter...
and then most probably a jsf / primefaces frontend on jboss webserver
 
@Vogel612 Why JBoss AS?
 
JSF using primefaces :O
 
1:49 PM
@OlegKuznetsov because I'm already comfortable with it
and Glassfish is a royal PITA, Tomcat isn't an actual webserver and Jetty doesn't run properly without eclipse
well I should say wildfly webserver, right?
 
@Vogel612 Can't we run jetty with maven?
 
meh...
 
I am not sure if it needs eclipse though?
 
After hearing Vogel's answer you might have a rough idea on why I said I wouldn't use java :)
 
@Vogel612 Sorry, jetty is an eclipse plugin
 
1:54 PM
Game, Set and Match
 
@Mr.777 yes we can
I actually never had any problem with jetty
 
Yeah I was talking some other context
I thought, jetty doesn't require eclipse. But jetty is actually an eclipse plugin
 
2:16 PM
Has it been written twice?
 
Yep.
 
@Uni any interesting project you are working now a days?
 
@Mr.777 surviving
Kidding. Been busy with exams lately.
 
Oh okay... How are the exams been so far?
 
@Mr.777 eh? o_O No!
 
2:31 PM
@OlegKuznetsov Yes
 
No, it is not an eclipse plugin
Jetty is a Java HTTP (Web) server and Java Servlet container. While Web Servers are usually associated with serving documents to people, Jetty is now often used for machine to machine communications, usually within larger software frameworks. Jetty is developed as a free and open source project as part of the Eclipse Foundation. The web server is used in products such as Apache ActiveMQ, Alfresco, Apache Geronimo, Apache Maven, Apache Spark, Google App Engine, Eclipse, FUSE, iDempiere, Twitter's Streaming API and Zimbra. Jetty is also the server in open source projects such as Lift, Eucalyptus...
 
Stable
Deprecated
Deprecated
Ancient
Fossilized
Legendary
Mythical
 
Deprecated appears twice...
also you missed Rotten
 
no status rotten in that wikipedia article
 
So @Vogel isn't jetty an eclipse plugin?
 
2:42 PM
well... a little, maybe?
 
I think it totally is now
 
@Mr.777 no, that's jetty eclipse
Just like m2 isn't an eclipse plugin.
(m2eclipse...)
 
m2e actually..
 
Hmm but then that means, it doesn't require eclipse?
 
which is an adapter used by an eclipse plugin
sure it doesn't
 
2:51 PM
@Unihedro hi buddy.... is moderator election is still open for voting ?
 
@JudeNiroshan Likely.
 
i got all my signed up forums with each 100 rep. That freaky awesome...
@Unihedro now i can offer you my vore :D
vote
 
:D Thanks! ^~^
 
@JudeNiroshan assoc bonus?
seems Jason C isn't going to be eligible :/
 
:(
 
2:58 PM
@Vogel612 i really don't have any idea about how did i got that rep.... but i asked an question on workplace forum with many viewers and many upvotes ... have you ever received this ?
 
200 rep on any SE site -> network account gets +100 to overcome new user restrictions
 
see the latest entry of your reputation history ^
 
Hi All! I have created this Job (which is a `Callable`):
class Job implements Callable<String> {

private volatile Long started = null;

public Long getStarted() {
return started;
}

@Override
public String call() throws Exception {
started = System.currentTimeMillis();
while (System.currentTimeMillis() - started < 10000) { /* wait here! */}
System.out.println("OOPS!");
return "OK";
}
}
and I want to cancel it, so I wrote this code:
@Test
public void test() throws Exception {

ExecutorService exe = Executors.newFixedThreadPool(2);
Job j = new Job();
Future<String> future = exe.submit(j);

while (j.getStarted()==null){ /* wait until it starts */ }

assertTrue(future.cancel(true)); // cancel

long start = System.currentTimeMillis();
while (System.currentTimeMillis() - start < 10000) { /* wait here! */}
}
 
3:06 PM
ummm cool cool
 
Now, I know that future.cancel doesn't really kill the thread
 
@Vogel612 that guy using JUnit ... lol :P
 
it merely sets the flag Thead.isInterrupted to true. I would normally have to check whether Thead.currentThread.isInterrupted() inside my Job's call method.
But, what if I cannot access the method call?
 
@PantelisSopasakis Then you're screwed because your design requires you to.
 
@Unihedro So, there is absolutely no way to kill that thread?
 
3:09 PM
Not that. There's no sane way to.
You can kill it directly I guess, but that's just wrong.
 
Yes, especially if you're working with an executor service that doesn't automagically ressurect dead threads...
Are there any standard ways to deal with this common problem?
 
The straightforward solution to deal with a threading problem is to get rid of multithreading altogether.
Or you can throw the design out and start over; or you can do it like you're already doing and use the workaround with isInterrupted().
 
I see...
By the way, what I want to do is execute various jobs each one of which has a different timeout
and I want to remove them from the executor service and stop them as well
 
fge
3:25 PM
Wee
More than 3 hours without the net
 
@JudeNiroshan what's wrong with that??
@fge welcome back then :)
 
@Vogel612 didn't you argued that JUnit is dead today? :D
 
Nope
Also it isn't
 
fge
@Vogel612 what program does that?? And are you sure it's the BOM?
JUnit is not dead but it should die
Use TestNG instead
 
<ffef> in blue font when opening in vi
 
3:29 PM
neverheard it before.... i'm living in a cave :(
 
fge
ffef?
 
And some undefined scramble when not viewed as utf-8
 
fge
The bom is feff
 
Hmm memory leakage
 
fge
As to "undefined", do you mean this?
 
3:31 PM
@fge how'd you survive??
 
fge
@Unihedro coding; I didn't see the time fly by
 
True :)
 
@fge no. I mean a BOM
It's just that I mixed up the order earlier
Definitely not the replacement char
'Twas 2 characters when viewed as windows cp 1252
 
are you guys are watching scorpion TV series ?
 
no
 
fge
3:43 PM
@Vogel612 that's really weird; what program generates such broken stuff?
 
Def worth the -1 points for downvoting :) — AmitApollo 4 mins ago
Downvote more, downvote early :p
 
fge
@SecondRikudo meh :p
 
You get minus points now for downvoting?
 
@Gemtastic in the past you lose 1 rep for down downvoting anything; it's changed since, cost is only for answers
 
3:46 PM
Hmm
I must have missed that
 
@fge well i cleaned it up now...
I have the suspicion that gedit was at fault when I copied the first line of the file to duplicate it...
 
fge
Huh
confused
Ohwell, you fixed it so that's what matters ultimately
 
Exactly :)
 
4:35 PM
Hi @durron597
 
@Unihedro bonk
@Unihedro Can you this one too please: stackoverflow.com/questions/29704576/…
 
@durron597 done + upvoted your comment
=javadoc String#split
 
Which one do you mean? (type the number)
1. java.lang.String#split(String, int)
2. java.lang.String#split(String)
 
1
 
@Unihedro String split(String regex, int limit): Splits this string around matches of the given regular expression. (1/6)
 
4:40 PM
=javadoc Pattern
 
Which one do you mean? (type the number)
1. java.util.regex.Pattern
2. javax.validation.constraints.Pattern
 
1
 
@Unihedro java.util.regex.Pattern: A compiled representation of a regular expression. (1/65)
 
fge
=javadoc Charset#newDecoder()
 
@fge CharsetDecoder newDecoder(): Constructs a new decoder for this charset.
 
fge
4:41 PM
^^^ super powerful
 
@fge If you want to dupe nuke the linked post above I'd appreciate it
 
does not exist room for Scala or Play framework -_-
read the accepted response you will understand the ugly Scala with eclipse
0
Q: the method render(String) in the type index is not applicable for the arguments in play 2.2.x

sitwaheed9Hi i am new in play framework for java i am following the this tutorial http://www.playframework.com/documentation/2.2.x/JavaTodoList under the heading " Rendering the first page " public static Result tasks() { return ok( views.html.index.render(Task.all(), taskForm) ); } i am usi...

I have the same problem and I refreshed the file
but still doesn't not work
-_-
 
@fahdijbeli There was one.
Eventually, developers on Stack Overflow decided to use something more helpful, so people stopped using it.
Long lived Scala. (No one loved it anyway)
 
yes
it's very ugly it gets in my nervous
I lost 1 hour for an stupid problem
 
fge
No, you lost more than that -- you tried and used Scala :p
 
4:48 PM
My sympathies. ;)
 
requierement of the stupid Client
 
fge
@Michael I want Oakbot in my room :(
 
To gain something (money), you loose something (time) but eventually you learnt that why scala is bad :P
 
in fge's java.nio.file corner, 9 secs ago, by OakBot
OakBot v0.0.2 by Michael | source code | built: About 5 days ago. | started up: About 5 days ago.
It's there, watching always :) It just doesn't show up after rebooting until it gets triggered.
 
fge
@Unihedro OK, good to know
 
4:51 PM
I'm patiently waiting for Michael to rush in after getting your inbox notification.
prepares popcorn
Cool, I got Stack Overflow Careers invitations.
 
<<< thinks someday @fge will shoot me
 
fge
I won't
One of the fundamentals of teaching is the art of repetition :)
 
:D
 
One of the fundamentals of pounding nails into a wall is the art of repetition :)
 
5:06 PM
Wait, and not like getting a hammer?
 
5:31 PM
http://www.commitstrip.com/en/2015/04/17/unresponsive-design/
CommitStrip - Blog relating the daily life of web agencies developers
Unresponsive design
CommitStrip
1429291893
 
me
and you?
tea
for two?
hehe
 
Ugh... Stupid emulators, stupid old phone >:(
 
5:51 PM
and this day is so stupid
 
Without knowing what the intent of the code is, it's impossible to give helpful advice on what's required to "fix" it. Format and comment through your code. Run a debugger. If you don't know what that is, read a book. — Unihedro 49 secs ago
 
6:22 PM
and if you don't own books, buy some of them
 
and if you don't have money to buy books, go to a fucking library
 
and if you're too lazy to even go to the library, google an ebook
 
but if you can't buy books, then you're probably not paying for phone or Internet.
unless you're a kid living at home and your shit is paid for you
even then, go ride your goddamn bike or take a bus to a library and plop down at the computers there.
 
@ShotgunNinja Where did all this hatred came from?
 
@Mr.777 My seething fury in dealing with people who don't write proper SSCCEs.
 
6:30 PM
@ShotgunNinja And? You still don't need to hate that much.
 
@Mr.777 Watching this endless list of crap questions is beyond frustrating.
 
@Unihedro I can understand your pain but do you still think to talk like this behind someone's back?
 
@Mr.777 Yes.
 
You wrote the comment, that's perfectly fine.
@Unihedro Then my point is useless for you and people who think like you. Sorry
 
You're forgiven.
 
7:11 PM
hi folks
 
Night!
 
there is no way i can sum an integer with a float, without casting one or the other first? note: this makes totally sense to me, just trying to understand how java type conversion works
apparently conversion is only allowed between integers byte short integer long and between float and double. whose conversion is "compatible", correct?
sorry for the poor english. i'm very tired :P
 
7:32 PM
@Worf According to this link, you need to cast one first.
23
Q: How can I convert integer into float in Java?

RomanI have two integers x and y. I need to calculate x/y and as outcome I would like to get float. For example as an outcome of 3/2 I would like to have 1.5. I thought that easiest (or the only) way to do it is to convert x and y into float type. Unfortunately, I cannot find an easy way to do it. Cou...

 
that's what i thought. but i wonder why cast is not required instead for compareTo
 
comparing what? two integers or an integer to a float?
 
integer with a float or vice versa
Integer foo = 200;
Double baz = 40.10;
System.out.println(foo > baz);
 
fge
7:47 PM
In this case unboxing takes place
And int is "upcast" to a double
Comparable does not enter the picture here
 
Automatic conversions are done basically when they're "safe". Integer types can be widened to larger integers without losing data, but not the other way around. Similarly an int can be converted to a float, but the other way requires a cast
 
foo.doubleVal() > baz ?
 
fge
No
foo is unboxed to an int
And baz is unboxed to a double
 
sorry i meant that :P
 
fge
Therefore you end up with int > double; an in this case, the int is cast do a double
 
7:49 PM
but not all integers are exactly representable with doubles
 
fge
int to float no; int to double, yes
This is why it is allowed
The mantissa of double covers all values of ints
 
so you are saying that instead i'm not allowed to compare a long with a double
 
fge
No you aren't
 
since a long may be not representable with a double
makes sense
autoboxing and unboxing must be a mess to understand :D
any good read?
 
I get so confused seeing @Worf in here @_@
 
fge
7:53 PM
Not really... I discovered all of that with experimentation :p
 
stfu @Gemtastic :D
 
I thought I was in the "wrong" room XD
Seriously though... I think I might go out and buy me a new phone tomorrow; Android studio can't find my current old phone and the emulator just doesn't launch properly >_<
 
The language spec still allows some unsafe (in the sense of losing precision) conversions. docs.oracle.com/javase/specs/jls/se7/html/jls-5.html#jls-5.1.2
 
8:46 PM
New edition of Java Magazine is out. Worth a read. Irritating that you need to subscribe though. oraclejavamagazine-digital.com/javamagazine
 
 
2 hours later…
10:50 PM
trying to create an arraylist im getting this error:
Incorrect number of arguments for type ArrayList<E>; it cannot be parameterized with arguments <String, Config.SettingValue>
on this following line: ArrayList<String,SettingValue> setting;
the SettingValue<T> class is generic
cant find any resources to handle this error
anyone have any idea?
 
11:11 PM
@somefolk ArrayList is not key, value
So, it will never accept that format
 
11:29 PM
@Mr.777 what about returning a couple of values from a method
i had this as an idea but it wont work
 
couple of values?
You can use an array or List or whatever
 
yeah im trying
i want to return boolean and int altogether
i was thinoing about something like: private Object,Object myMethod(){}
 
Well, may be you are trying to solve your problem in a wrong way
No, this is not possible at all.
 
what can you suggest?
 
Not in java. Not in any other language atleast i know of
Depends what is your problem, you are trying to achieve
 
11:32 PM
i have a method that check if item exist from an arraylist , if it exist i want a bollean to flag it, and if it xist i want the index of it
boolean*
 
So, if you return a value, that means it already finds value and you can use boolean as true
 
thats actually pretty much solves my problem
 
:)
 
how the hell i havent though of that
 
Sometimes, this happens
 
11:34 PM
i like to get everything over complicated
 
11:50 PM
@Mr.777 may i get a quick help once again?
 
Say it
 
i get this following warrning: Config.Setting is a raw type. References to generic type Config.Setting<T> should be parameterized
 
@somefolk Can you paste the line of code here?
 
on this line: private ArrayList<Setting> setting;
idk how to code tag here
 
Yes, and how is your Setting class created?
 
11:51 PM
class Setting<T>
 
And what datatype you want it to use now?
 
i made it generic because i don't know what type of data goes in there
 
Is it a list of String, Integer or what?
But what type of data you intend to send into?
 
hmmm it be easier if you see the code i guess
how do i code tag in here?
 
Okay
You can use hastebin.com to paste code
 
11:54 PM
 
Alright, so the code will always compile but will throw a warning
 
i have another question if you may.. if i make that subclass private, can i access it from its parent class?
yeah but how can i make the warning disapear
 
From parent class, yes
Alright so here is a little about generics
Compiler erases all the types at compile time that is called Type erasure
So, in order to avoid warning you need to tell the datatype you want the arraylist of
Or if you want it to be of anytype you can use wildcard
wild card is ?
 
well
the master will tell
 
wildcard can be bounded too
By bounded I mean, if you want to set the bounds, e.g. you want to consider all types which are type of Number you can do <? extends Number>
 
11:59 PM
ok i know some about that
 
Perfect
 
00:00 - 11:0011:00 - 00:00

« first day (1637 days earlier)      last day (3303 days later) »