« first day (1464 days earlier)      last day (3477 days later) » 
00:00 - 17:0017:00 - 21:00

12:00 AM
I'm VERY beginner in Android [XML]...
I have to learn flexible layouts
The Android rooms are active while I'm sleeping...
I have a flexible 2 dimensional array in the java half, I need to make buttons based on them...
 
fge
Uh
 
Yeah...
I don't know if I want to lock position, if I do, I don't know how
 
12:46 AM
anyone for mjsip??
need help..
 
fge
1:08 AM
@user3275095 what is mjsip anyway?
Is that mjsip.org?
 
:).. excatly
 
fge
And SIP as in Session Initiation Protocol?
 
yes
 
fge
OK well, this is a result of x seconds of googling around, so what is the problem here?
 
actually it is very foolish from my side.. I am very new to SIP application development..
..and found mjsip as easy API
but don't know where to deploy...
 
fge
1:12 AM
Uh, err
Have you actually tested this API yet?
 
fge
Well, you should start with that
 
I am sorry, but testing API means?
I believe I need to deploy the code in some container
 
fge
Well, you should ensure that the API can do what you want, in a simple main() for starters
 
oh.. ok
 
fge
1:17 AM
SIP is not simple as a protocol as well; you should test the behaviour of this API when errors occur etc; I have not had a look at the Javadoc for it but if you can "mock it away", this makes testing it all the easier
 
well I'll start with that..
thank you
 
1:59 AM
In Android room the access is only for the chosen ones. And I can see here, in Java room, people are talking Android :)
 
2:37 AM
You can request to enter that room, but I dunno if they let you in :')
There's another Android room though
Though the other ones seem to be empty atm...
 
fge
3:01 AM
Hmm, it appears that JSR 305's @ParametersAreNonNullByDefault also applies to inner classes
 
 
2 hours later…
5:23 AM
Morning!
 
Morning Uni ^^
slept in today since it's sunday?
 
nice ^^
 
aw it's my first time in here and this looks kinda empty :(
 
@Payam It's a quiet hour. Welcome anyway!
 
yeah well my timezone sucks I guess lol. thanks !
 
*mericans are sleeping, europeans are still drunk and sleeping it off. Asians are working towards world domination. SO yeah, it's quiet around now :P
 
6:48 AM
@Unihedron i'm trying to develop a simulator. I have finished almost everything but then my interface is only a mixture of tables/textboxes. Is it possible to add some awesome graphs like (pie charts/bar charts) which are dynamic during the time you are running the program?
 
@Payam Try OpenGL?
 
never tried before hmmm...
@Gemtastic I'm an European who's happen to live in Asia and I totally approve your statement.
 
@Payam That explains why you're awake at this time :P
Me? I just have a weird day-rhythm :P
 
well... tbh I didn't sleep last night. I faced an ugly memory leak which took me around 10 hours to fix. sobz
 
:(
 
6:55 AM
The life of a programmer
 
hello
 
hay
 
@Unihedron i just added this query in codereview may be you want to have a look
0
Q: Optimizing smoosh() method further

overexchangeHere is the below code written for smoosh(), in more than 14 lines. Modular testing is done for this method smoosh(). public class Homework3 { /** * smoosh() takes an array of ints. On completion the array contains * the same numbers, but wherever the array had two or more consecutiv...

because i need your comments
 
Eh, fine.
 
7:08 AM
readability of code vs optimization of code
@Unihedron am bit excited to share a news with you
am currently going thru java course and once am done with this, i am taking specialisation course on android_programming_using_java
and earn a specialisation certif
 
Please stop constantly editing that question. It distracts me from writing the answer.
 
7:28 AM
@Unihedron sorry about that, i was changinf variable name cP to currentPointer
am done
go ahead
 
0
A: Optimizing smoosh() method further

UnihedronYour flag variable practically will only be 0 and 1. You can switch to using a boolean instead: boolean flag = false; for(j = cP; j < a.length; j++){ if(a[j] != a[i]) { a[i+1] = a[j]; cP = ++j; flag = true; break; } } if(j == a.length)...

You have so much reputation points on Code Review, @overexchange :P
 
 
4 hours later…
Sooo
You got me reading a tutorial on RegEx now
 
Great!
Let me know if you have any questions!
 
I just started reading it and so far I feel like "this makes sense"
 
hello
 
11:45 AM
hi
 
12:03 PM
chat.Out.println("HEllo All!");
 
GrammarOverflowException
 
:)
 
12:25 PM
Good morning, Java!
 
Morning @Michael!
Anyone want to help a rookie coder (spoiler alert: me) fix his SQL query?
 
@Payam Try JFreeChart: jfree.org/jfreechart
@Unihedron Me! xD
 
Ok, I'm trying to query SEDE with the query:
DECLARE @Items TABLE (Id int, Score int, Views int, Length int, Tags nvarchar(150))

INSERT INTO @Items (Id, Score, Views, Length, Tags)
  SELECT Id
    Score,
    ViewCount AS Views,
    LEN(Body) AS Length,
    Tags
  FROM Posts
  WHERE OwnerUserId = ##UserId:int##
    AND PostTypeId = 2

DECLARE @Tags TABLE (Tag nvarchar(50), TScore int, TViews int, TLength int)

INSERT INTO @Tags (TScore, TViews, TLength)
  SELECT SUM(Score) AS TScore,
    SUM(Views) AS TViews,
    SUM(Length) AS TLength
  FROM @Items
It says The select list for the INSERT statement contains fewer items than the insert list. The number of SELECT values must match the number of INSERT columns..
Basically, I want to compose one that tells you your CpS (Characters per Score) for every tag.
The first INSERT generates the data into a temp table, the second creates a "total" record with NULL tag, where the last iterates through an array table and dumps in stuff.
Wait, i'm stupid. I left out a comma next to SELECT Id.
 
Should this include the "Tag" column? INSERT INTO @Tags (TScore, TViews, TLength)
 
@Michael No, that INSERT is for a "total" record, so I left out the tag intentionally. It's going to be NULL.
The meaningful records with an actual tag is done within the BEGIN END block.
 
12:33 PM
Hmm not sure. That's some pretty complicated SQL though.
 
Greetings
 
I've been trying to debug this for 3 hours. It didn't work, so I google and dump more relevant code. This is where I'm at.
Hey @Joe'sMorgue!
 
Hey @Joe
 
How are the two of you?
 
Not bad.
 
12:35 PM
Shouldn't this be "Tag"? WHERE Tags LIKE '%' + @Tag + '%'
 
Ongoing burnination :)
@Michael I want to select the posts with the tag though. The Tags column looks like this:
 
Does XML work with arrays?
 
java javafx-2.0 file-io
 
Ah, ok.
 
I'm trying to get: LIKE '%java%' WHERE @Tag = java
 
12:36 PM
But won't that include all tags that have the substring "java" in their names?
 
There's no way to avoid that.
 
Dang.
 
Well I guess I could INNER JOIN PostTags ON (stupid condition) INNER JOIN Tags ON (another stupid condition), but I bank on that SEDE will time me out.
Yeah, and then check the Tag ID.
This is where I'm at:
DECLARE @Items TABLE (Id int, Score int, Views int, Length int, Tags nvarchar(150))

INSERT INTO @Items (Id, Score, Views, Length, Tags)
  SELECT Id,
    Score,
    ViewCount AS Views,
    LEN(Body) AS Length,
    Tags
  FROM Posts
  WHERE OwnerUserId = ##UserId:int##
    AND PostTypeId = 2

DECLARE @Tags TABLE (Tag nvarchar(30), TScore int, TViews int, TLength int)

INSERT INTO @Tags (TScore, TViews, TLength)
  SELECT SUM(Score) AS TScore,
    SUM(Views) AS TViews,
    SUM(Length) AS TLength
  FROM @Items
Invalid column name 'Tag'.
Invalid column name 'Tag'.
 
My Java_Home variable doesn't seem to workā€¦When I'm done on this, I will probably be asking for help there
 
I'm not that much of a SQL guru, sorry.
 
12:40 PM
Actually, I guess there's a way to avoid the premature substring.
Maybe:
 
@Joe'sMorgue What happens when you type "echo %JAVA_HOME%"
 
WHERE (Tags LIKE @Tag + '%' OR Tags LIKE ' ' + @Tag + '%')
AND (Tags LIKE '%' + @Tag OR Tags LIKE '%' + @Tag + ' ')
 
Ah, that might work.
 
Still booting...
I have it pointing to the jdk folder [99% sure that one) but it's telling me the jre inside is supposed to have files in it, but it doesn't
It's on Windowsā€¦.
 
@Joe'sMorgue "echo" is a valid Windows CLI command.
 
12:55 PM
JAVA_HOME is C:\Program Files\Java\jdk
My Mac is acting so slow
 
@Joe'sMorgue Does that directory exist?
 
Of course
I went to it, then copied/pasted the path to it.
 
Is that good?
 
1:00 PM
The empty blocks are what I gotta fix now.
 
Ah.
 
The problem is with:
WHERE (Tags LIKE (@Tag + '%') OR Tags LIKE (' ' + @Tag + '%'))
  AND (Tags LIKE ('%' + @Tag) OR Tags LIKE ('%' + @Tag + ' '))
So I'm going to use an EXISTS() statement. Thanks for all the help anyway!
 
It ran yesterday...Then it wanted to do an update, now it don't want to load...
 
What won't load?
 
I'm wondering if I got only part of the update, or if it's bad...
Android studio...
[MIGHT be an important detail]
 
1:09 PM
Maybe it can't find your Java VM.
 
As long as JAVA_HOME points to the JRE folder, shouldn't I be all set?
 
Are you sure the path is correct? Usually, there is a version number in the directory name.
 
Yeah, like jdk1.7.0_u25
 
And it shouldn't point to the JRE folder. It should point to the JDK folder.
@Unihedron ^
 
I always remove ver numbers from folder names....
Typo, it points to the jdk folder, inside it is a jre folder that is pretty much empty...
 
1:14 PM
@Joe'sMorgue What happens when you type "java -version"?
 
I compared it to the other jre folder [the regular java folder] and there is much more
 
I don't think that folder should be empty.
 
interesting....
That's the problem!
Error occurred during initialization of VM
java.lang.UnsatisfiedLinkError: java.lang.Class.getClassLoader0()Ljava/lang/Clas
sLoader;
<<no stack trace available>>
That's the response for typing java - version, or java /version
 
@Michael Thanks a lot. I actually came across that during my search time xD
 
1:30 PM
@Payam Haha, you're welcome!
 
If I install the JDK, do I need to install the JRE too?
 
fge
@Joe'sMorgue no, the JRE comes with the JDK
 
Does the JDK install different if the JRE was existing at installation?
 
@Joe'sMorgue I don't think so.
 
Installing now...
I can't wait until I get my main computer back... [I'm going to be very busy installing/updating]
 
1:44 PM
:)
 
I'm going to add Winders 10 to the multi-boot...
Backing up a subject, I hate how everything puts ver numbers on the folders now, you will have a dozen installs of the same program because nothing ever does it's own cleanup
The newest java does not like my machine! :( Damn netbook! ):
It's running XP. "Microsoft doesn't support it" but I got several updates for it just yesterday.
I think it's installing.
 
@Joe'sMorgue I personally download and isntall JRE/JDK separately from oracle.
 
That's where I got it from. I always go to the source when I can. I also tell all my friends/neighbors/customers to never use the install disk that comes with whatever they buy, but to go to the manu's website and download the newest drivers, as they are ALWAYS more recent, and 99% of the time better.
 
1:59 PM
Agreed.
 
The JRE, I see two folders, three readme's, a html, and three that are just FILE...
Is that typical?
 
Is there a "bin" folder?
 
Yes, and a lib.
Is there supposed to be any .DLL's IN the JRE folder?
 
This is what mine looks like:
 
Hey ^^
 
2:06 PM
I have no plugins, I guess I will get that if I ever get one...
 
@Trevi Welcome @Trevi :D
@Joe'sMorgue Not sure.
 
A.S. still not loading, complaining about a missing .DLL. Going to uninstall/reinstall A.S.
Does XML do arrays, and castings?
 
@Joe'sMorgue What do you mean?
 
My engine does int's. The buttons need to show a string of a single char, so I need to do a cast
They are stored in a two dim int arrray...
 
2:20 PM
Huh?
 
My game's engine
 
Oh another indie dev :O
 
@Trevi He made an interesting word game.
 
@Joe'sMorgue oh can i get a link?
 
I'm wanting to put it on Android, but....
I don't have a link...I don't have a release ver...
 
2:26 PM
ah ok
 
The Android will be the first release ver
 
Post your .gif here then :)
 
looks interesting!
 
@Unihedron Thanks for the nice comment about it.
It IS the most challenging word game out there...
 
2:29 PM
@Joe'sMorgue It's not bad, really. Eagerly waiting for the release! :)
Though be warned, I'm good at games, I nail most difficult games :P
like super hexagon
 
IF your lucky, 40% of the letters are vowels, usually, its around 1/3rd to start with...
And that drops fast if you don't do it right!
 
 
Yeah...Like that
 
it does have great graphics :P
 
Great graphics are overrated. :)
 
2:34 PM
I don't get it. That is SUPPOSED to be the animated .GIF...
 
You can't have "arrays" in XML per say.
You would need to do something like:
<numbers>
  <number>1</number>
  <number>2</number>
</numbers>
 
That's going to be a pita
 
Switch to yaml.
 
yaml?
 
2:37 PM
@Joe'sMorgue It stands for "YAML Ain't Markup Language"
Head recursion FTW
 
For Android?
 
Tag burnination in progress, feel free to help close some questions!
 
@Joe'sMorgue it has potential for android
exited to see it ported ^^
 
Do you program for Android?
 
2:45 PM
I have done some android apps but no game yet
Probably going to port my game to android as well whenever its done in java.
 
I don't have a screenshot of the worst one [to code]
I have a puzzle that has over 250 buttons on it, all come out of the array
 
o.O
 
That's why it's all stored in an array...
Keeps it SIMPLE...All I need is a nested loop...
Then again, the Swing ver doesn't name each button by itself...
 
3:06 PM
So like i'm using try-with-resources... but still my profiler insist that there is a leak from preparedStatment class...
String sql1 = "select ... ";
try (Connection con1 = datasource.getConnection();
PreparedStatement pst3 = con1.prepareStatement(sql1);
ResultSet rs3 = pst3.executeQuery(sql1);){
if (rs3.next()) {
F = rs3.getDouble("F") + wfa;
C = rs3.getDouble("C");
}
} catch (SQLException e) {
JOptionPane.showMessageDialog(null, e);
}
Is it even possible?!! I'm using 5-6 SQL statements for over 170k times in a loop. But it's getting slower and slower :( Even if I reset my VM it won't get faster.
 
@Trevi Do you skype?
 
@Joe'sMorgue yeah: dalthow
 
are you gonna go play alone in skype?
 
mwha feel free to add me @Gemtastic
 
:D
done~
 
3:19 PM
@Payam You shouldn't be re-creating the database connection for every database call.
 
A.S. still won't run!
New install of the dang thing too.
Let me try a reboot...
 
Did you re-install your JDK properly?
 
3:35 PM
I like to think I did
It looks like I did something wrong
It's still complaining about a missing DLL
MSVCR100.DLL
Should JVM.DLL being in Java/JDK/JRE, or deeper?
 
No idea.
 
Where is JVM.DLL in your Java?
 
I'm not running Windows.
DLL files are a Windows thing.
 
Tim
what ide is best for java?
emacs + some emacs package?
 
3:45 PM
@Tim Use an IDE!
Eclipse, IDEA, ...
 
Tim
which is better, eclipse, idea?
 
IntellIJ IDEA is the best!
... That is, if you can afford it.
 
Tim
idea isn't free?
 
The community edition is free.
 
Does IDEA do Android?
 
Tim
3:53 PM
For free versions only, which is better then, elcipse or idea?
 
@Tim Eclipse
 
Tim
thanks but why?
 
God, do your own research.
Sep 8 at 19:37, by kiheru
emacs is a fine editor, but it does not quite measure up in code completion and other niceties IDEs offer. Language like java is particularly suitable for tooling, and for some other languages where static analysis does not work as well a good editor may even be better than an IDE
Sep 13 at 9:20, by Unihedron
I've created a poll related to which IDE our developers use for coding in Java.
Sep 8 at 18:23, by mlwn
@user2736704 Ok.. I think now I get what you mean... many people use different IDE's to help them draw their frames/buttons ... etc... but I prefer to write the code yourself, that way, you have better control over your Controls... therefore, I use a text editor, not an IDE (ex. Eclipse)
Aug 27 at 9:57, by Unihedron
Nordehinu has discovered that whether one codes in a productive environment on their IDE has no positive relationship with whether someone is happy.
Aug 27 at 9:52, by Unihedron
Pro Tip: Get Eclipse, or IntelliJ if you would like to invest in a better IDE
 
Tim
:)
 
4:11 PM
Heyā€¦I got A.S. running!
 
good
 
Too bad I cheated
 
:)
Too bad I'm on my Macā€¦[Can I keep the Seal?]
 
:P no
 
4:13 PM
<Sniff>
Dead chat
 
don't blame me, I'm trying to fix my desktop
 
4:28 PM
And I'm trying to get reputation points, but just gave up and am back to burnination
 
@Gemtastic Why did you break it?
Better yet, how?
 
What are the rules in this Chatroom if I may ask
 
Shut up.
Learn
 
Okay
 
Don't spill crumbs...
:P
 
4:29 PM
@SebastianA Just ignore Joe.
 
I think that's it...
 
Will do :)
 
Play nice, respect everyone and enjoy your time.
 
Geeā€¦Thanks
 
And try to roughly stay on topic.
 
4:30 PM
So, it's OK to get crumbs all over?
 
Could I link to a post of mine and ask for help?
 
Sure
 
0
A: Not recognising Color from different class

MadProgrammerWithout a runnable example that demonstrates your problem, it is impossible to 100% sure, but from the sounds of it, you have created two more instances of TestProjectJPanel and/or paint panel, so what you think you're drawing to isn't actually on the screen. However, it also sounds like you're ...

I don't really get what he meant
 
@SebastianA There's no problem in doing that. However linking to your own answers are considered blatant self promotion and others may downvote in dismay.
 
Ah yeah
 
4:30 PM
Unless for good reason.
 
if anyone could simpllify what the answer is, or make your own answer. I'd be hapy
Because I to be honest, don't get what he means
For sure! Like if it's part of the current topic
 
@Joe'sMorgue no I need to re-install windows, and preferably wipe the HDD too
Because it's flooded with my better half's games and stuff from before I built the new desktop for my beloved
 
Thanks for formatting it, Unihedro
 
Which Windows?
 
@SebastianA What don't you understand about it?
 
4:36 PM
7 I don't wanna do anything else atm
 
@Uni
 
10 is free, you can download it direct from Microsoft.
SUPPOSEDLY, the LAST Windows Microsoft will ever release.
 
@unihedron I don't understand about what he said into my code, for example. I've put repaint(); after the JColorChooser, if that is what he meant, but it still doesn't work :/
I mean, I don't understand about how I can implement what he said into my code*
 
From then on, they will only release updates as necessary, but it will always be 10.
Kinda what Apple is doing with OS X...
 
Do you not understand his critique, or the stuff he said about code?
 
4:39 PM
I don't understand the stuff he said about the code to be honest
 
@Gemtastic It's claimed to be the best parts of Windows 7, and Windows 8, combined. [Basically Windows 7, supporting Live Tiles]
 
claimed
 
I'm not going to test it until I get my motherboard from Asus. At they rate they are going, It won't be until after Windows 12 is out...
Today, it's been two months! This is a warranty exchange!
 
@unihedron Could you explain what he wants me to put into the code? Or if you have another answer about how to make it work, I'd love it :)
 
I don't know what he's trying to convey either, and it's too late to write another chapter in < Practical Why You Should Not Do Java > (It's 00:54, school tomorrow)
 
4:54 PM
Ah right :( You don't want me to do java D:
 
We want you to do java!
 
What do you mean by < Practical Why You Should Not Do Java > ?
I was guessing you wanted to write a chapter to me about why I shouldn't do Java haha
 
It's the generic list of why programmers fail to code in Java. In this case it's conveying an idea clearly.
 
Ah right! Bananas
 
Practical because Java is too theoretical - and insanity is what glues everything together.
:P
Unless, that is, you know some of C and bother browsing the JDK source code, which most doesn't.
Just think about this for a second: Which other programming language compiles newer versions with older versions?
Java 8 is built with Java 7, which is built with Java 6.
 
4:58 PM
Woah you can edit
Ah yeah
 
I can also do with room stuff because I have room owner privileges.
 
I know a tiny bit of C++
You were talking about C so I thought I'd add that
 
Unihedron edited in new tag(s):
Unihedron removed tag:
 
I'm comic relief for this room
[I need a raise!]
 
00:00 - 17:0017:00 - 21:00

« first day (1464 days earlier)      last day (3477 days later) »