« first day (1845 days earlier)      last day (3110 days later) » 
00:00 - 21:0021:00 - 23:00

12:11 AM
any scala peeps in hurr?
0
Q: generic SortByValue based on Numeric

Walrus the CatHow do I create one implicit class for both use cases? implicit class SortableByIntValue(seq:Seq[(String,Int)]){ def sortByValue = seq.sortBy(_._2) } implicit class SortableByDoubleValue(seq:Seq[(String,Double)]){ def sortByValue = seq.sortBy(_._2) }

 
12:52 AM
Is Scala even counted as Java?
 
 
4 hours later…
5:18 AM
@BerndErnst It runs on JVM..
 
@ItachiUchiha But it's an entirely different language...
@Unihedron The thing is that I can't even test the deployed application... I've even followed the Oracle basic example that's supposed to pring "Hello World" but gassfish crashes when I click the generated link in the admin console...
 
5:38 AM
@gem yes it is
 
I'd say Scala is not Java, but it's a language that's using the JVM.
 
Morning Java
Scala is just another nail that we could use for Java Hammer :D
I need a favor
I want to initialize an int[] arr with some value
how could i do that?
I tried Arrays.fill(arr,val);
int[] markupArr = null;
Arrays.fill(markupArr, Integer.parseInt(rs.getString("markup")));
results.add(markupArr);// 9 - Array
getting a NPE
 
5:55 AM
@Gemtastic Yes that is another way to put it. I was just referring to Java Virtual Machine :)
 
Yes, but technically it's just a Virtual Machine that's made for Java, but doesn't stop it from run things made not with Java
 
valid point
 
Also, I'm pretty sure Scala enthusiasts would chop you off by the ankles if they heard you saying Java = Scala XD
I think you could say Java extends JVM and Scala extends JVM :P
 
I never said that :P
Both the languages (in fact many others) run on JVM, that is the similarity
 
No but you implied that Scala Extends Java
 
6:05 AM
When did I say that?
 
Since the question was "Is scala counted as Java"
 
and my answer was "It runs on JVM"
I think @gem has no work to do early in the morning and is picking on me :P
 
Well, it's only 7am
 
@Unihedron Nice one!
@crawlingvx Seek and you shall find !
@gem why are you even trying to make a soap service?
 
One word: School
And today is presentation day so I hope this is good enough >_>
 
6:12 AM
Q : What does school always teach old stuff?
A : Because they like to be old school.
 
Because you have to make at least two different API integration in the integration class
Also, watching fairly odd parents in English is a lot more hilarious than the dub
Cosmo is 100 times more intelligent in the dub
Which kinda ruins the fun
 
6:37 AM
I have no idea what you are talking about
 
@Gemtastic use something like restinsoap
@WalrustheCat yes but this is fundamental, you should look up the net yourself before asking
 
7:17 AM
@Gemtastic Java doesn't extend the JVM.
after all this time Scala still doesn't have a chat room

Java Sucks!

JavaScript Sucks!
it ded
 
7:54 AM
@Unihedron Too late! Already delivered it to the teacher. Let's hope I at least pass >_>
 
 
1 hour later…
8:56 AM
hi in my external storage png file there .in my task read image file getting all text and store txt file .please help me urgent
 
@Gemtastic aren't you going to at least figure out the problem was so you don't make the same mistake again ever? O.o
you are planning to become a developer right?
 
What do you mean byt "problem" here?
 
glassfish
@GopiSankar cat image.png > out.txt
 
9:10 AM
^ hahaha that's funny
 
if suppose there is a class C inside a class B which is inside a class A then I can refer to class A object from within class C by saying A.this and same applies for class B also, am I right?
 
define inside
 
something like this
class A{}
inside this is class B
and inside class B is class C
 
makes no sense whatsoever.
 
how can I send code here
 
9:20 AM
G'Morning
 
@RishabhGour paste it on hastebin.com and post the link here
 
I was typing it ^
 
ok wait a minute. and thanks
 
@wonderb0lt morning!
 
please someone explain this.
 
9:25 AM
it compiles?
 
just open that link you'll get what I wanted to say.
 
Morning
@RishabhGour why would you need to and why the crap are you nesting classes to the third level??
 
oh right, inner classes
 
@RishabhGour If you instantiate C and C is not a static class, it's bound to an instance of B. Same goes for A, so you could call methods from A and B instances that are bound to C
 
fge
@RishabhGour that looks like an XY problem but anyway -- since your inner classes are not static, it means that the first argument of class B will be an instance of A and that the first argument of C will be an instance of B, which you should create instance variables for
 
9:30 AM
inner classes are broken by design
 
I am just asking if I can do that @wonderb
 
@RishabhGour Yes you can, but you can only instantiate the inner class from it's respective parent (how else is Java supposed to know what instance the inner instance is bound to?)
However nested classes to the third level, as @Vogel mentioned are a code smell
 
ok.. that helps. thank you :)
 
 
1 hour later…
11:00 AM
@Vogel612 there?
 
11:34 AM
@Unihedron Yeah, I'm thinking about that but I didn't have the for the due-date today
 
Somewhat
 
12:09 PM
I'll be off for lecture... back in ... something like 2 hours
 
12:22 PM
waves
 
12:59 PM
^^ Happy Diwali
 
and armistice day in the Commonwealth and beginning of the carnival season in Germany :P
 
@ItachiUchiha Happy Diwali to you too ^^
 
 
2 hours later…
2:49 PM
I'm available now...
as in.. I got nothing to do :DD
 
Well, wb then :D
 
@Vogel612 I was asking you about the standard pay in germany. How much is the standard monthly pay?
 
can't really say... I was probably underpaid back then with my 2.3k €
 
Meanwhile in sweden; the ministry in charge of mapping sweden is releasing a minecraft map of sweden.
 
one of my colleages said to me when I left "Next time you go for a 3 in front and more than a 5 at the second digit"
 
2:58 PM
as in 3,5k?
 
I think so :P
 
@Vogel612 brutto or netto?
 
brutto
 
Sounds like the same amount we get in sweden.
 
3.5 or 2.3?
 
3:00 PM
Trainee wage should be at €2,700
A few years experience = €3,500
 
fge
@Gemtastic seriously?
 
Taxes are pretty high in germany I guess!
 
What about in the UK, anyone got any ideas ? Just wondering how underpaid I am at the moment :D
 
@fge Yup
 
brutto or netto? I'm guessing that's pre and post tax?
 
3:02 PM
You can't possibly get a more accurate copy of sweden than through what they have.
 
@Ballbreaker Gross and Net :)
 
Ahh
I'm 3500 net, but it's not euros, so lol
 
@fge Do you pay tax to the spain govt or french govt ? :P
 
ACtually I guess it'd be like 3750 now after my raise
 
And you have worked for how many years?
 
3:04 PM
Not too bad for about a year and a half though, but I suppose you always kind of need to factor in price of living in your area too
Salary is weird though, if I wasn't iffy about landing a job I would have asked for more originally
 
I will take any wage they give me at first
 
Eventually I'll probably just tell my company if I don't make more I'll leave for somewhere else
@Gemtastic Yeah exactly
Once you have experience you can start haggling
 
Exactly
 
Toronto is a really expensive place to live unfortunately :\
For an engineer (Which is in the upper tier of pay-grade) it's even somewhat of a struggle
For starting wage at least..
I have no idea how someone like a teacher, or part time, etc survive in this city
 
@fge ??
 
fge
3:09 PM
@ItachiUchiha on the salary, none; in Spain you always have your net salary
Same as in Italy
 
Ohh, you don't have taxes on your income? wow !
 
3,500 canadian dollars translates to 22,939, and the trainee wage should be 25000 so you are getting less paid than you would here. Living is expensive but I don't think toronto is cheaper than here
 
@Gemtastic Probably not
Although its 60k canadian before taxes
We get taxed out the bung
 
Wait, 3,5k is AFTER taxes?!
 
Yeaa
Except its more like 3750 now
 
3:13 PM
I'm talking BEFORE tax
 
Ahhh
 
faints
 
Then its like 4.6k or something
teehee
@Gemtastic What is your tuition costs like in Sweden?
I'm something like 40k in debt currently lol if it makes you feel better (half is from my car though)
Might not have been the smartest thing going for a ~40k car right away :p but I took it over from my mom and got it for 29k.. so couldn't really refuse that deal
 
@Vogel612 phew I was seriously worried I'm grossly underpaid
 
@wonderb0lt It's so hard to tell sometimes :\
I could have went into the oil and gas industry and started at like 85k a year ...
I feel underpaid in comparison to that, but then again. I did make a concious decision not to sell my soul
 
3:22 PM
what soul?
 
Yeah, fair lol
I guess it would be more like, going against what I believe in
That's a slippery slope
 
@Ballbreaker Free
You still have to pay your living costs and all that so most people still have loans
 
@Gemtastic That makes sense
Not bad though, saves you around 40k ish? Unsure of how expensive tuition would be otherwise
I suppose its program dependent too
Mine was ~13k per year
Not bad compared to the states... highway robbery over there
 
Yeah. We used to have free tuition for all, but now it's not free for foreigners. I'm not sure if it costs money for EU citizens too
 
Ahhhh, I was going to say.... I almost regret not using my saved up money for just living costs in Sweden and then getting that free education!
Makes sense though.. people must have been abusing that system
 
3:36 PM
Not abuse it, but it got a bit too expensive
There are lots of commercial educations you can attend though (like hairdresser, makeup artist, coding schools and bartender) and they cost money for everyone
 
@Gemtastic Yeah I suppose it doesn't exactly make sense for Swedish citizens to pay for foreigner's to come in and bank on that free university with their tax money
 
It makes sense because they might stay and feed that competence into our nation
However it started to cost more than it paid back (people didn't get a job - in sweden at least - and stayed to pay taxes)
 
Hmm yeah I see your point
 
3:52 PM
@gem how is the job hunt?
 
Nothing new for now; waiting for a reply from the C# job/internship and meeting the other company on monday
 
@gem looking for new job?
why C#?
 
@ItachiUchiha Looking for A job
 
What happened to your current (last) job?
 
@ItachiUchiha Because they were hiring Juniors and were willing to teach C# during the internship period of my education.
 
3:54 PM
@Gemtastic That's not too bad, at least you have some work experience to build on now, I'm sure you'll find something soon
 
Nothing, Nothing at all, and that's why they advised me to look for another job because they are not gonna adopt me as a "real" dev when whatever I have now runs out
@Ballbreaker I have to; the internship starts on december 14
 
@Gemtastic Oh yeah, I forgot it was for an internship
 
I can have the internship at my current job, but they thought it's a waste of a chance to show a company my worth
 
@Gemtastic So can you use it as a fallback at least?
 
Yeah, so I can get the grade; the internship are graded and count towards my graduation
 
3:58 PM
Does anyone know how feasible it is to use Java JMX library, to make a Java application somewhat "failsafe " ? . is that the purpose of Java JMX? I just curious about perspective about it
 
@Gemtastic That's not too bad then, so the pressure there to land something else isn't overwhelming
 
The school is still nagging me about it
 
Ahh :/
 
4:49 PM
Our examination project is supposed to be held and worked on in february, and they're already grilling us on what we're gonna do and if we're gonna combine it with the internship or not. the later wouldn't be so bad if it weren't for that we have to answer what to do even if we're gonna do it during the internship...
 
Hey guys, are technical questions allowed in here?
 
@Gemtastic Yikes :/
@Spiderix Yes
 
As long as they're java
 
@Spiderix this is an extension of SO. Duh!
 
Ok thanks!
Well I have an issue with JPanel. This JPanel I have contains components but they will simply not stack vertically. I am using a FlowLayout and even when I restrict the JPanel to a certain size it simply won't let the components flow downwards
Here is an example: imgur.com/NRHUrKa
This is the result when I run it imgur.com/pnNP2IC
 
4:59 PM
So you want them to be like
ScrollPanel
ToolPanel
RandomPanel for example?
I don't quite understand what you mean stack vertically
Oh, do you mean stack vertically, as in ... The panels would be like a column in a table
 
Well in this image imgur.com/pnNP2IC for example the View, Canvas, Actions, Tools are horizontal
I want them to be Vertical
 
OHHH those okay
 
but I can simply not find a way to do that
 
How do you actually place those components in there?
 
fge
"Using File in 2015 is like using an ox cart when you have a car (Path)" (me)
 
5:02 PM
You could embed a panel inside the panel
that is one column by x rows
Then place the components in that embedded panel
 
I already have that. I have ToolsPane which is inside another JPanel the toolsPanel
and my components are inside the ToolsPane
One sec, I will show you the structure
 
Is that View, Canvas, Actions component just one component
Or is it 5 separate things
 
That is the structure of the gui
and those are seperate components
 
Ahh ok
I've never used flowlayout before, so I'm not sure if that's the issue or not here
It would help if you selected ToolPane in your builder, then took a screenshot of that
Just so I could see that it is indeed one column and multiple rows
 
I can try that
but what do you mean by Builder?
 
5:07 PM
One seec
 
I am on netbeans btw
 
I use Jformdesigner so it might be different
 
oh, I might have to try that maybe
 
See how when panel3 is selected that it actually shows that on the form it's one row by multiple columns
 
hm I do not get that option at all.
 
5:10 PM
Hmm so yeah, possibly a feature of jfd then
Just a heads up you need a license for jformdesigner so dunno if that's worth it for what you're doing
 
I can try downloading Jformdesigner
 
there is a trial for it
but if theres an example of something working you should be able to get it going
 
hmm not sure about that
 
Orr you can not learn a deprecated tool and learn FX instead
 
Yeah or that
 
5:12 PM
yea I wish I had control over that
but if I used FX would it have any big impact on the program
 
@Spiderix Is this the tools you're using? imgur.com/NRHUrKa
 
you see we are 30 something people working on this piece of code
 
If they have it in the example it should be possible
 
yes, that is the one
Any idea what the alternative could be, like code wise?
also not sure what you mean by "Example"
 
@Spiderix You said that picture was an example of it working, if it can be done there, it will be possible to do in yours with your existing tools
It's a longshot, but in your code you could find where they have things defined like
toolPane.add(component, CC.xy(1, 1));
 
5:16 PM
sadly it is a 60k line of code and finding around in it is a nightmare
 
And try playing around with the .xy coordinates... but I'm not sure if once you rebuild it will just switch it back
 
also this is the option I get if I change from FlowLayout to GridBagLayout imgur.com/xLSzywD
I just think it is hardcoded somewhere which is causing all kinds of issues
 
See I'm assuming flowlayout might be the issue, you definitely would want a grid layout for what you're doing
 
ehh... wait you're rebuilding StackPanel?
let me check a second, I answered a CR question on that thing..
something like this? @Spiderix
5
Q: Vertical JButton allignment

Matthias BraunI have created a simple component in Swing that lets me place other components such as buttons on top of each other. They fill their parent horizontally but not vertically, which is exactly as I want it. I called this parent component VerticalPanel and this is how it looks: I can't shake the ...

 
Yea, I looked at that one a few days ago and sadly it didn't work out for me.
 
5:21 PM
Eh I guess while we're at it, if anyone feels like taking a crack at this let me know what you think... or atleast an upvote if you deem it worthy so I can get more attention to it
5
Q: Hibernate - Partial Transaction Rollback and Session Handling

BallbreakerI am using a stateless EJB class to update a persistence entity located in a database. A method within the EJB calls an implementation class where the work is done. I believe what is causing the issue is that an entity called Foo, has a oneToMany relationship with an entity Bar. Things are done, ...

 
Here is when I use a gridbaglayout imgur.com/fZE5lg9
and the result is the same, the components (View, Canvas, Tools etc) are still alligned horizontally
 
Lol :/
 
yea, it is really frustrating
worst part is I am not the one who wrote this code so makes it just better :D
 
You should be able to align these properly in the GridBag layout..
just use constraints.gridy = GridBagLayout.RELATIVE
 
I think the issue is, somewhere in the code there is something that is overriding the default stuff?
for example
 
5:26 PM
yea that looks like a good candidate for a culprit..
 
hehe
I can try changing a few things, because if I comment that part out non of the components get shown when I run the program
 
don't you have a properly modularized UI setup??
yuck
 
again, this is not something I have made it is the opensource program called JHotDraw 7.7
and the goal for us is to implement our features, where my feature is to be able to dock the toolbar vertically
which I am having some issues with
 
opensource? I'm interested. Would you mind dropping me a link?
 
hmm can't seem to find it now, lol it is called JHotDraw 77
one moment
 
5:32 PM
@Spiderix This seems like the issue lol
If it's hardcoding a contsraint for gridx = 1
doesn't that basically mean it will always only have 1 row
 
@Spiderix are you looking for this -> sourceforge.net/projects/jhotdraw
 
Yes, that is the one Itachi!
 
@revolutionary Ew, you spelled "because" as "becoz"
 
@Ballbreaker gridx is the position in the grid. You need to specify columns and rows when constructing the LayoutManager if you need to.
 
5:34 PM
Also this isn't the android room
 
But the project is almost dead -> Last update: 11.08.2007
 
also: urk. sourceforge
@Ballbreaker you should ping
 
Yes Itachi, I am really hating it.
everything is so scattered
 
1 message moved to Trash
 
@Vogel612 That bit of code looks like it assigns every component to x position 1 though
(If my assumption that it's a loop is right) Otherwise I have no idea what's going on there, and why just one component would be defined like that
 
5:36 PM
@Ballbreaker which means it gets everything to 1 column
 
Yeah exactly
which is his problem
 
well actually into the second column, but hey
 
yep
 
Lol what if you just switched that to a gridy = 1 for curiousity sake
It might break something else, but just to try it to see what happens and switch it back :p
Unsure if that code is affecting all gridbaglayouts or just one in particular
 
usually gridy defaults to RELATIVE.
in this case that's what gridx should be..
 
5:38 PM
Eh, you probably know more than me in this instance, I'm just guessing here
 
so.. yea gridy = 0 sounds like a fix
 
hmm didn't do much, it just messed the way it looks
if I remove gridx = 1 it ruins it
one sec I will pastebin the whole class, might make more sense
 
I'm going to defer this one to Vogel lol
 
haha, I understand
been sitting with this problem for weeks and the longer I look at it the more confused I get
 
You're GUI is just massively different than what I use, so I'm not of much help is all
 
5:44 PM
yea, I normally use FX for this stuff
but sadly I am not the one who made the program. I am simply trying to add additional feature to it
 
@Spiderix that code is terrible...
 
@Spiderix Yeah a common problem indeed
 
indeed
 
only initComponents() makes me want to cry already
 
I don't know if you downloaded the source code of JHotDraw
but good lord that mess is everywhere
 
5:47 PM
soo.. what VCS is sourceforge using and could I open a fork on GitHub with you?
 
not sure if that is possible since the version of Jhotdraw I have is slightly different + you need an invite but that I cannot provide you
however I can send you a zip of the project?
 
that's a little problematic...
 
mhm, understandable
 
@Vogel612 I think you can do that
@Spiderix you can apply a patch to it, wont be very difficult
I think you can import the issues as well
 
5:57 PM
hmm I wouldn't know where to start :D
 
@ItachiUchiha I'm not sure that's even remotely legal...
and the repo seems active..
the last change was 11 hours ago
 
@Vogel612 then we need to raise a ticket :)
 
6:50 PM
Back
 
fge
I've just found a cricital bug in SonarQube :/
 
I have managed to get some progress :D
 
@Spiderix Awesome!
 
hehe thanks
anyway I am off. Thanks for the help guys.
 
7:36 PM
@Ballbreaker concerning your SO question... You are modifying a collection while iterating over it. That could be a little bit... interesting
 
7:50 PM
@Vogel612 Yeah :/
The code worked fine before, so something when updating the hibernate or Java JDK from 5 -> 7 broke it
Possibly the new JBoss version upgrade
The only time it breaks is if someone modifies any of the entries DURING the cutoff lol
So it's actually quite rare, but decently damaging when it happens
 
oh fun, someone else working with JBoss
also, are you sure it's not something to do with the change from 5 to 7?
 
It's possible
But I have no idea how I would fix it
I can't really fundamentally change the code to get this one (out of 54) methods to work
I'm thinking I have to work with what I have
My worst case scenario here is to track the new records that are inserted and return a list of their ID's
if it fails and the rollback doesn't fully work, then I'll go in and delete those records out
This method is on a 2 minute schedule, so then it will atleast come in and try it again, and hopefully no one changes anything
This should work since the original (updated) entries roll back fine... but it seems very brute force to me.. would like to avoid the problem instead of working around it, ya kno?
 
yeah, I know
 
Ahh well, I was kind of hoping someone would stumble upon it running into the issue before and be like !! AH YES. Then give me a quick fix lmao
Three months later...
Do you think if I changed the name from "Hibernate- Partial transaction rollback and session handling" to "Hibernate - Non-Consensual Flushing" it will get more views? muaha
 
fge
8:07 PM
twitch Hibernate
Use JooQ
 
I'm probably going to have to learn Spring and Hibernate sooner than later
 
@fge Not helpful lol
 
but for right now I'm porting a bunch of old servlets and portlets from WAS to JBoss
and they're all built atop EJB 3.x
 
@ShotgunNinja WAS?
 
WebSphere Application Server
 
8:13 PM
Oo never actually heard of that
Actually maybe I have
 
it's OLD.
IBM made it.
The browser-based management console uses <frame>s.
(if that's any indication)
The only problem is, this client still hasn't given my network profile access to the SVN
 
stop stop stop..
let me get this straight..
you are payed money for porting crap to an older infrastructure???
 
No.
We're porting FROM WebSphere TO JBoss.
JBoss is actively maintained. Websphere is not.
 
8:57 PM
Fuck it. Going for a 50 rep bounty on my question lol. I need more views on this bad boy
 
right
 
00:00 - 21:0021:00 - 23:00

« first day (1845 days earlier)      last day (3110 days later) »