« first day (1379 days earlier)      last day (3566 days later) » 

1:15 AM
Hey guys I have a question. I have a HashMap (key is String, value is TreeSet<Item>). Each Item object has multiple keywords associated with it. My HashMap has 1 entry for each keyword and it maps to a TreeSet of Items that contain that keyword. Since each Item contains multiple keywords, each Item is in multiple TreeSets (since each keyword maps to a TreeSet). My Question is do I actually have multiple "copies" of the same Item? Or do I have multiple references to the Item?
 
 
5 hours later…
6:40 AM
@chillpenguin I may not have the best answer, but you likely have multiple references to the Item. This is because new objects are only created when new T() is called. As such, when you're add()ing a Value extends Item object into TreeSet<Item>, you just tell the Set to remember this reference for now.
Though you could test with TreeSet<MyClass> set, anotherSet; set.add(myItem); anotherSet.add(myItem); and test if the two items are the same (with println(set.iterator().next()) and println(anotherSet.iterator().next()))
 
my eclipse always shows "terminated hello(1)[Java Application]"
while i try to run the program.
 
Your program automatically terminates when it reaches end of main.
 
What i need to do?
 
Have some logic and codework statements in the main function so they get executed. If main is empty, your program terminates itself doing nothing.
 
my code
package foo;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
public class hello {
public static void main (String[] args) throws java.lang.Exception
	{
    System.out.println(validateusername("$asd123"));

}

static boolean validateusername(String s)
{
    if(s.matches("[a-zA-Z]+[0-9]*"))
        return true;
    else return false;
}
}
 
6:56 AM
Maybe it worked fine?
 
i'll post the full eclipse screenshot.
 
OK.
 
plz check if there is any error in package and java class creation.
 
You should bring up the console. Between the text area and the area with multiple tabs there is a gray bar. Drag it up.
You can see a red dot indicating that the console is hidden.
Your program is fine (except for the unnecessary imports, but they're OK)
 
you mean i have to set the console at the start.
 
7:08 AM
The console is hidden because you didn't allocate enough area for it to display the text.
like this:
You can give it more area by resizing the box using the bar between the text area and the area with a lot of tabs. For me the bar is blue. For your eclipse it seems it's the gray bar.
Eh:
By the way, good luck on your path of becoming a gold Regex member. :P
 
GM Java !
 
Good morning! (It's 15:20 here.)
 
so you are from china :P
 
Maybe
 
lolz
the location is a mystery :P
 
7:24 AM
I lied. The UI fooled me.
 
OMG. is this the problem?
Thank you so much...
 
You're welcome. Thank god you didn't post that as a question. Someone might murder you.
 
yep. For this type of small questions, i should go for chat rooms.
 
8:07 AM
Twix Java. :)
 
8:19 AM
lol
 
 
1 hour later…
9:48 AM
@Unihedron ssup ?
 
@ItachiUchiha I'm well, you got anything planned for the weekends?
 
nope
nuffin as such
 
Hi there. Is there someone who knows how to use DatagramSockets over the internet?
I'm having problems getting my UDP Chat to work. When I try localhost etc it works but not over internet
Is there something special to do for the sockets to also listen for connections coming from outside localhost?
 
You might have a problem with portforwarding instead, I believe.
But truth to be told I have no experience in using DatagramSockets.
 
well its not only me but also a friend
who opened the ports for udp
i cant do it here though... don't have the password for the router
 
10:01 AM
neither do i
 
 
2 hours later…
12:28 PM
@Unihedron
 
@sathia Hey there! Did you get it to work yet?
 
if you want to know how it got fixed: stackoverflow.com/questions/25087983/…
hi
 
Hello all
 
so, now I'm all set and I'll try to show bikes details on my intent
 
Well done! It's also pretty interesting.
Hello @Karl!
 
12:30 PM
yes
I wanted to show you for this reason and of course to say thanks for your help
 
Anybody here use a tablet with the new Intel CloverTrail chip?
 
Ah, no worries! To be honest, that's why I'm even on StackOverflow...
Intel chips are everywhere now?
 
Yeah....My daughter's tablet got messed up, so we are working on a replacement. Her old one had a 1.6Ghz dual core, the intel has a 1.2 dual core. I'm worried that the slowdown would be too much of a step back...
 
Thanks @Ondkloss
 
@Unihedron hehe, I was about to comment on the awesomeness of that edit (and comment).
 
12:38 PM
looks good to me, but I can't approve it yet
also, I've submitted the same fix yesterday about bike instead of Bike
 
Usually you would fix more and leave a more descriptive comment. What I've learned about being a 2k- user is that the better your edit / comment is, the quicker it gets through, the less to worry about having it rejected.
 
I see...
 
This was one of my first edits... The non-descriptive comment got someone to reject it.
 
eh, won't pass :)
 
 
1 hour later…
2:09 PM
hi @uni
is anybody there?
 
@Sethu yes
 
I'm not
 
Ha, I just threw a party with myself.
I went out and bought a large packet of chips for no reason, then ate them all alone.
Well, whatever.
 
Why didn't you invite me? I woulda been here
 
2:25 PM
I tried. Couldn't. You were offline.
 
Oh...That was when I had my server issues...
 
Yep. :(
I considered building a proxy server (like engineering it hardware-to-software by myself), but I know if I screw it up I will be doomed.
Also, pizza flavoured chips tastes like bacon.
 
That's why you make backups [of the software, not the chips]
 
3:02 PM
@Unihedron I had some drink ! Even my party is over
 
Ah nice. What are you doing now? I'm hunting for good questions again - Two upvotes today so far.
Might post something on meta since I found a bug it seems.
 
@Unihedron I am waiting for the rain to stop, will head for a movie !
 
Oh nice, enjoy the movies!
 
here is a nice question on polymorphism
0
Q: Is Scene.getWindow() Always a Stage?

Sarah SzaboComing from How to reference primaryStage I learned that I can get the Stage of a particular control by using control.getScene.getWindow(), but this returns a Window instead of a Stage. I know that Stage is a type of Window, but my question is will the returned object always be a Stage, or will i...

getWindow returns an reference to object to Window class
 
Very nice, but I don't think I'll be able to add any more than the existing answer, so eh.
 
3:20 PM
Err, I didn't see that being answered already
 
hi there
 
@MarcdeVerdelhan Hey!
 
I need just one more upvote: meta.stackoverflow.com/questions/260377/…
hey @Unihedron
I hope I will get lots of contributors when my project will be publicized
 
@MarcdeVerdelhan which project are you working on ?
 
3:56 PM
@ItachiUchiha ta4j
a java library for financial trading
I use it to trade bitcoins and some altcoins
but it can be used to trade on forex
 
any JPA/Hibernate exert here ?
exper*
expert*
 
@ItachiUchiha so don't hesitate to upvote it: meta.stackoverflow.com/questions/260377/… Then I could get new contributing devs.
@dotnetcoder Not an "expert" but ask or give the link anyway
(you can even vote for my open source project on meta.stackoverflow.com/questions/260377/… for the SO advertising program)
 
You've posted the same link three times, if anyone wants to visit it they can look through your previous messages.
Just pointing it out so you wouldn't be surprised if the chat does something automatically.
 
@Unihedron You're right! I just thank about that. I'll restrain my enthusiam.
 
Haha.
Have a comic about enthusiasm, instead:
 
4:11 PM
huhu ^^
 
 
1 hour later…
5:34 PM
is it possible to import System to somehow shorten things so I don't have to do System.out.println ?
 
You mean importing out?
 
I suppose so, i'll give that a try
 
You can do: import static System.out;
 
I tried import system; and import system.* and it didn't work
ok i'llt ry with static
 
Then you can use out.println()
But it's not good for code style. I strongly recommend use of a custom log() method or Log.print() (inner class method) over importing the static printstream.
@barlop It's import static java.lang.System.out;, actually.
 
5:38 PM
thanks that works
 
You're welcome.
 
Spreading that knowledge.
 
What do you mean? Static imports aren't a new find - Some IDEs even allows you to "favourite" members to prompt for static imports in content assist. ;)
 
6:15 PM
anybody want to give this one a shot?
0
Q: Why do these classes only compile when in the same file?

barlopI have this directory `c:\abcd` it has no files in it, but has a subdirectory efgh. C:\abcd>dir Volume in drive C has no label. Volume Serial Number is B411-D580 Directory of C:\abcd 02/08/2014 06:57 PM <DIR> . 02/08/2014 06:57 PM <DIR> .. ...

 
@barlop Please create a sscce
 
heh, it's a pretty short example..
very little code
but there are 3 files involved minimal
 
Your code isn't very well formatted. Would you mind if I send an edit?
Too late, already on it.
 
heh thanks
code formatting isn't that significant, because the complexity is not in the code
 
That's what you think, but then when the code indenting isn't unified...
 
6:22 PM
I could click edit and fix that but if you're on the case and I click edit then it may clash with your edit
 
Hi Jon Skeet.
 
heh
 
Good afternoon, Java!
 
6:37 PM
Good afternoon, @Michael!
 
Hi @Unihedron.
 
I think he read the question so fast, that he went back in time and read it while I was writing it, and so his answer takes into account rather late, that I was aware the classpath wasn't set correctly
nevertheless he did still answer it correctly despite that!
 
Jon Skeet does not read a question. The question reads itself. ;)
 
Do you think I could've made the question more sscce?
I had to do the DIR, to show exactly what files there were..and what the structure was, as it was somewhat about packages.
 
6:49 PM
Maybe. The formatting fooled me. It actually looks alright.
Aha! The daily unanswered regex and java questions has arrived into my inbox. I'll be back soon.
 
7:29 PM
Hey @ItachiUchiha
 
HEYA
@Unihedron
The Jedi seems to be ofc on weekends
 
It seems so. He had a busy week.
 
7:45 PM
yeah true
what are you upto ?
 
my hand hurts
 
8:16 PM
...From all the programming?
 
no, i fell off from my chair
to the right if you were wondering
 
I'm not sure if "to the right" explains how one would fall of a chair
 
I switched browser tabs too quickly, so I hit my bottle. I tried to fetch it, but fell with it. Hit pretty hard, but I'm better now.
That about describes what I've been doing for the past few minutes, whimpering about my poor hand.
YEOOWW
 
8:39 PM
@fge The only good thing about France: It's the home of parkour. xD (jk)
 
I probably wouldn't have attempted some of those roof-jumps, but that's just me.
 
 
2 hours later…
10:27 PM
hey
 
 
1 hour later…
11:55 PM
0
Q: Java screenshot capture - JFrame paints old component for a second & disappears even though all components were removed & repainted

Ben BeriBefore you read, this will be informative: Java JFrame won't show up after using .setVisible(true) after being invisible Hello I am working on a library API that let's you capture an area of the screen, and it returns you a class that contains the ByteArrayInputStream and utility methods like cr...

I am very unlucky!
 

« first day (1379 days earlier)      last day (3566 days later) »