« first day (841 days earlier)      last day (4118 days later) » 

3:04 AM
ping
 
3:26 AM
meh, nobody I know is here :/
 
@Doorknob I know you!
 
oh hello @user1690130
You just arrived :P
 
yes, i was instlling C#
it logged me off and i logged back in
 
ok
 
ping
 
3:29 AM
@msangel ?
 
newfags here
noone know about pong in my chat
 
@msangel You are much newer than I am.
 
@Doorknob do you know anything about scraping, in generl?
 
no @user1690130
 
i need help with internet terminology
i don't even know what to google for the next step
 
3:30 AM
what step?
 
by the way, i solved one of my own postings! it was so exciting
 
haha
 
i input data and get a website
i don't want to scrape that page
instead, i want to click on the link, and scrape from the follow up page
 
what library u use for http browsing?
 
use HTML::DOM; ?
use JSON; ?
 
3:33 AM
perl
cool
 
oh ok
yes perl
that link I find because of the data based on the person's name, race, gender, birth year, and birth state (or country)
 
so where problem is?
 
u just take all links as DOM elements
 
that second website i'd never guess from the data
 
3:36 AM
and take that u need by link content
 
i'm not sure how to start with the data that produces the first link nd then get to the escond
i'm not sure what you mean?
 
see examples in oficial documentation
http://search.cpan.org/~sprout/HTML-DOM-0.053/lib/HTML/DOM.pm
 
i'm not sure what to search. what is the term for a link within a link?
 
Hey guys
 
3:39 AM
Does anyone here know about json, I'm a complete noob I guess and cant get my parsing script to work without crashing :(
 
i'm having json probs too!
 
what library u use for json parsing?
ok
 
None.
 
use google gson
its cool
 
wouldnt that complicate things even more
 
3:41 AM
@msangel "its cool" Wow, that's a really great argument! :P
 
ok
i tryed few
and this is most powerful
in feautures
 
Cant you do it manually? Ive done it before with less complicated stuff..
 
and simple in usage
BY GOOGLE
https://sites.google.com/site/gson/gson-user-guide
 
@msangel Okay... what's the point of that?
 
3:43 AM
^
 
^
^
 
Can someone take a look at this..? stackoverflow.com/questions/14794235/…
 
@Jon NOOO you broke the pattern :P
 
i like it more then org.json
 
ok
 
3:44 AM
lol
 
meh, I don't know obj-c
 
@JonSullivan We were making the Fibonacci sequence :P
 
What json problem are you having
at the other dude lol
 
perl i'm using
 
3:47 AM
what?
 
i want to webscrape
i don' tknow how to tell perl to click on a link
 
oh
why are you webscraping anyway
 
@user1690130 just take link addres and get that page
 
@msangel i don't understand what you mean
i only know the first url
 
3:49 AM
the second url i don't know except by manual inspection
 
but there is some site structure
 
i can't figure it out, i guess
 
and link is always in same place
 
yes
 
u can navigate in DOM tree and take link DOM object and take "href" attribute
in perl DOM navigation is simular to javascript's one
 
3:52 AM
@msangel i'm not sure what you mean.
what is the DOM tree?
 
google it
 
$tree->elem_handler($elem_name => sub { ... }) ?
 
there are a lot of way to do this
 
right now, i have:
 
this can be one of them
 
3:53 AM
my $dom_tree = new HTML::DOM;
$dom_tree->write($response->content);
$dom_tree->close;

my $str = $dom_tree->getElementsByTagName('table')->[0]->getElementsByTagName("td")->[9]->as_text();
 
u go correct way
continue
 
huh? continue what?
 
searching correct path in DOM tree for finding link element
 
@msangel i think i am confused by your english
 
Maybe Chinese is better
 
4:04 AM
@user1690130 sory )))
Russian?
 
wing ching wong long bong cong my jsonong long webbrowerong webongscrapong fong ching bing?
 
яннп, но это нормально. наверное.
 
I think he just called me a retard in russian
 
I think he just called me a retard in chinese two messages above.
 
Calm down, your english is fine to me
 
4:09 AM
plonk
what language is that? latin?
 
its baby talk
 
perl?
 
4:55 AM
can someone help me format a number?
I've been looking for code on how to do this
convert the int 1000 to display as 1,000
 
http://docs.oracle.com/javase/tutorial/i18n/format/decimalFormat.html
try this tutorial
 
thank you
 
 
7 hours later…
12:26 PM
Is anyone able to take a look at my thread stackoverflow.com/questions/14768533/… and maybe give me some insight? Seems the thread has gone stale :) cheers
 
1:21 PM
Does anyone else think that Java is going downhill from here?
 
I dont think it'll necessarily go downhill, I just think it can't go much further
 
I referring to the exploit
 
What?
 
Google it
 
1:39 PM
hi
how can I underline things in my answers?
 
I dunno, but I second that
 
I think you're allowed basic HTML so just use <i>text</i>
 
2:15 PM
@poitroae @ShaunWild <u>text here</u>
 
That's really nice
 
oh yeah... I was doing italics... oops
 
Can anyone explain why my graphics objects seem to be shifting around slightly, even though they're double buffered?
 
:P
@ShaunWild Not without some code
 
hmm, I don't know what to give you
I'm making a game
And the camera follows the player
 
2:16 PM
Why don't you ask on Stack Overflow?
 
I don't want to. This, hopefully, is something fixable on chat
And chat is easier anyway.
 
ok
 
It's weird; If my player turns too sharply and heads in the opposite direction, the overlays on the screen and his health bar shift over slightly
 
Well we can't help without code
 
indeed
 
2:18 PM
What part of my code are you looking for?
 
The part where the problem is perhaps?
 
not here
 
That's my rendering code
 
Blah! Don't post code in chat!
 
use pastebin or something
 
2:18 PM
Alright alright, calm down
 
If you did that in , for example the C++ chatroom, you'd probably have got kicked out
 
ok
 
Can you see any inefficiencies in my rendering code?
 
What is renderer?
 
2:21 PM
It's a class which stores stuff such as the camera x and y offset and controls all the rendering
 
ok
 
Well put that class up as well
 
so when the player turns sharply the health bar does what?
gets offset?
 
Like stuff wobbles a bit out of sync
I'll try and printscreen it. bare with me
 
ok
 
2:22 PM
Ok, theres no chance i'm gonna printscreen it.
It's too quick
 
ok
um
I have no idea where the problem is :(
everything looks right
 
same I see nothing wrong
 
Well, can you see any general inefficiencies with the rendering, maybe a way to invoke better hardware acceleration/
because I have low fps for what the canvas is rendering
 
you should ask a question on stack overflow
 
I'll probably get down votes :( I always do
No matter what question I ask, however well i ask it, It just gets un productive comments and downvotes
I'll try it anyhow.
Be back in 10 minutes.
 
2:29 PM
@ShaunWild Only 17% of your questions even have downvotes at all...
 
2:42 PM
The question has been asked.
Is this well structured?
That isn't what I meant to paste.
1
Q: Canvas - good rendering practices?

Shaun WildI've been using the Canvas a lot lately for little Java games and i've noticed a lot of strange things can happen. For example, earlier today I created a little game in which the objective is to shoot enemy ships and get points. The game draws tiny 32x32 images on the screen (sometimes slightly b...

 
 
1 hour later…
3:47 PM
I got a new avatar!
it's not updating :(
yay it updated
 
4:36 PM
@LewsTherin Try the lounge: we greet eachother with "Ohai" and proceed to argue to death. Everybody is a grumpy, biased, pedant, obnoxious, ignorant foolish dumbshit nitwit troll :)
 
@sehe forgot "sanctimonious fuckwits".
ok, bye
 
Thanks for contributing. I'll argue about that in the lounge.
 
Hi dudes!
 
@sehe Hahaha xD. However, that beats an empty room any day ;)
@AgusDG Hi
 
long time since last connection here
hahaha
 
4:48 PM
@Doorknob Rofl, fitting ;)
@AgusDG How long?
 
mm maybe 2 month
# months
or so
 
Good to have you back ;) ha
Quite empty today.. not surprising
 
haha with a bit more of knowdlege of java
Im going to ask you a question
to know what would you do
its okey?
 
Yeah.
 
Imagine you need a class Person, and two subclasses Man and Woman
 
4:51 PM
Um..
 
Man and Woman have atributes in common
 
Why not have a gender field?
 
wait wait, its an exercise
haha
 
Ok, sorry :P
 
the class woman has own atributes, same as man
I can do an interface, or extend the class Person
that wont be a problem
the problem comes here,
I need another class, called File that needs to call methods from the 3 classes listed before
what would you do?
 
4:54 PM
The methods are they in all 3 classes?
 
yes
some common in Person, and others in Man and Woman
 
An interface should be fine
Implement the interface as it sees fit
Example method?
 
And if I need to create the object File, Man and Woman?
being and interface I cant?
I cant#
 
You said File needs to call methods in either of this classes
 
yes
 
4:58 PM
I will assume File.DoSomething(IInterface person)
That is a possible signature
 
hey @Lews !
 
6
Q: Canvas - good rendering practices?

Shaun WildI've been using the Canvas a lot lately for little Java games and i've noticed a lot of strange things can happen. For example, earlier today I created a little game in which the objective is to shoot enemy ships and get points. The game draws tiny 32x32 images on the screen (sometimes slightly b...

Can someone take a look please?
 
let me check my code ;)
 
@Doorknob Hiya :P
 
My avatar is a doorknob now :P
Woah this room just got a bunch more people
 
4:59 PM
Lol, that's why I said "Fitting" :P
@Doorknob Good enough for a typical Sunday
 
hahaa
 
 
3 hours later…
8:09 PM
Hello, Java!
@Adude11 Howdy!
 
hi
 
How goes it?
 
How goes what?
 
it
 
erm ok I suppose
 
8:10 PM
;-)
Are you working on anything today?
 
My splash screen, can you see why pastebin.com/sKEwa4tj won't work?
 
What about it doesn't work?
 
The drawing doesn't work, it doesn't appear
 
How are you running your app?
 
In eclipse, but it doesn't output any errors and loops successfully.
The splash screen does appear
 
8:15 PM
Did you set the command line args for the JVM?
 
yes
 
Just so I'm on the same page, please copy and paste what you set here.
 
-splash:Main.jpg
 
And the file is named "Main.jpg", not "main.jpg"?
 
yes, the image appears, it's just the progressbar
 
8:19 PM
Not sure if that will make a difference. Java just has its own case-sensitivity rules.
@Adude11 ahh...I had a parse error on your earlier message lol
 
lol
 
Your Splash class implements Runnable. Who tells the Runnable to actually execute?
 
new Thread(new Splash()).start();
 
Is that in your main()?
 
yes
 
8:23 PM
mkay
I've never made a splash screen before. I'm just looking at the tutorial you linked yesterday. I don't see any problems. I suggest scattering some SOPs throughout your run() method to trace the execution path.
maybe using the Eclipse debugger will help, but SOPs are probably better since you want to see what happens in real-time.
 
Thats why I output "Start" at the beginning, to make sure it starts
 
I'd add some more. Perhaps print out the height and width vars.
And print out the percent var in the loop.
Also, you might consider changing percent to an int which counts from 0 to 100. Comparing equality with doubles is problematic as you probably know.
(And <= counts as comparing for equality).
 
The width and height are correct, changing to an int makes no difference.
 
I should have clarified. I don't expect declaring percent as a double causes the problem. That was a piece of advice unrelated to your problem that, IMO, makes your code a little cleaner ;-)
Now you have me curious. I need a pic to use so I can compile and run this myself ;-)
 
Hey folks
What exactly does "in place" mean? No extra memory?
 
8:35 PM
That's what I'm using
 
@Adude11 hey
 
@KodeSeeker hi
 
@KodeSeeker Howdy!
 
@Code-Guru Hey
 
@KodeSeeker In what context?
 
8:36 PM
It may actually be drawing to it once... Can you see the rectangle just below the image:
 
@Adude11 Not there yet...
I see some code behind your screen shot ;-)
 
I know
 
@Code-Guru In context of an implementation.. For instance , if I say , I need to reverse a string w/o using extra memory , is that the same as in place implementation?
?
 
@KodeSeeker In that context, "in place" means you are using the same memory that the original string already occupies.
So yes, no extra memory
 
@Code-Guru Any luck?
 
8:45 PM
@Adude11 I changed the position and size of the white bar and removed the code that draws the black bar. Still don't even see the white one...
 
@Code-Guru Exactly! And it's evident that neither the splashscreen or the graphics object are null.
 
yup
 
Should I ask on SO?
 
@Code-Guru gotcha
 
8:48 PM
@Adude11 sure. I'll still keep looking at it...
NSFW
@Adude11 The demo from the tutorial doesn't use a separate thread.
 
@Code-Guru I don't think it should make any difference
but i'll mention it in my question
 
The reason I mention it is I know that Swing uses at least two threads behind the scenese.
But I tried SwingUtilities.invokeLater(new ADudeSplashScreen()); and still the same result
 
Well it's not actually swing that's rendering it I don't think, it's just AWT.
 
Interestingly, the JavaDocs for invokeLater() state that it runs the Runnable on the AWT event dispatch thread.
 
:p
 
8:57 PM
And for giggles g.drawRect(0, 0, width, height);. But that doesn't work, either...
I thought I might be missing something, so I wanted to make it completely obvious
 
I despise writing questions with code on SO!
 
@Code-Guru I see butt-ugly colours and "font" rendering in front of his (Java?) code..
 
@sehe Mine?
 
I don't know whose code it is
 
why is @sehe in teh java room?
 
9:09 PM
@CCInc Good question. I just had the tab still open :) On habit I read the last page(s), and yeah I wondered why the regular crowed wasn't debiting snappy comments :)
But Code-Guru and KodeSeeker (Oh, and you) aren't unusual names so... <grin>I hadn't noticed I'm out of my biotope</grin>
 
@KodeSeeker java now? WHY!?
Anyone think I have too many tabs open?
 
@CCInc nah!
 
@CCInc well like I said I will be there with both. One is my passion and the other is my work
:)
 
@KodeSeeker Which one was which again?
 
@CCInc figure :P
 
@Code-Guru WTF
that was weird
I literally JUST went into the android room and looked at that
 
hillariously weird
That's one happy cat!
 
@Adude11 Does Alt-PrntScrn work with your splash screen. Normally it captures only the window in focus, but I'm not sure if it works with splash screens...
 
It doesn't work in ubuntu anyway, let alone on splash screens.
 
9:22 PM
If it does, you can get a cleaner screen shot to check if that bar is really part of your splash screen.
ahh...it works on Windows. Can't remember if I've tried it under Linux.
 
10:01 PM
Got quiet in here...
@Adude11 Any luck?
 
Still no. And no useful answers either.
 
@Adude11 I was just looking at that.
@Adude11 Did you try the suggestion in the last paragraph of the only answer? I'm uncertain that it will make a difference since running on the EDT doesn't seem to do anything anyway.
It might be helpful to try, though.
 
@Code-Guru I'm just having a go
 
@Adude11 Good luck ;-)
I'm making two Android apps that use ContentProviders. Man this takes a lot of code...
 
10:22 PM
Are primitive types thread safe?
 
@Adude11 Not at all. You can easily create a race condition by changing the value of a primitive variable from two different threads.
 
10:41 PM
Hello, World!
 
Howdy
 
user1174868
Hey gang
 
yesterday, by Lews Therin
I love this room.. we all greet each other with the hi hi's and conversation halts :(
^ my thoughts right now
 
@Doorknob hey sexy ladies
 
meh, I was going to plonk you really soon anyway
will do now
 
user1174868
10:56 PM
I broke java
 
@user1690130 you seem to be annoying many people
maybe you should limit yourself to one room?
 
user1174868
Quick question, when I want to compile a java file in cmd I type javac, when I want to run it what do I do?
 
@Jordan I think you just execute the file
 
@Jordan java <classname>
 
user1174868
not working :(
 
user1174868
10:57 PM
the class file or the java file?
 
user1174868
I can't believe none of the text books i have cover this
 
@Jordan What text books do you have?
 
javac has created the HelloWorld.class file.  You should see HelloWorld.java and HelloWorld.class among the files.
C:\mywork> java HelloWorld
 
user1174868
I do
 
user1174868
10:58 PM
but it says that it can not find the main class
 
@Jordan What do you type? And what is the exact error message?
 
are you running the file that has the main class?
DISCLAIMER: I KNOW NOTHING ABOUT JAVA
 
user1174868
how do I run it with the main class, and what is the main class?
 
public class HelloWorld
{
  public static void main(String[] args) <=============
  {
    System.out.println("Hello, World!");
  }
}
 
user1174868
yes
 

« first day (841 days earlier)      last day (4118 days later) »