« first day (835 days earlier)      last day (4112 days later) » 

12:00 AM
@Doorknob I wonder if the OP thought "white" space was actually spaces that were white.
@javawarrior I need help too. You go first!
 
It's still the same problem
 
the sockets?
 
yes
passing a class between them
WHEN 2 players connect to the same server
the source code is posted
 
I don't follow, the source code is posted? You mean both players now see public class Foo?
 
12:07 AM
Don't link me to code, I never run it. If you want to send two ints, (and I haven't messed with sockets that much), send them as strings then parse them back to ints in the client
 
12:21 AM
-1
Q: Why don't my photos download with enough pixels on my Windows?

LisaWhen I download my photos to my Windows PC, the photos come out to small. There is not enough pixels. Why is this?

I like the title.
 
12:51 AM
hello I'm back
@A--C Lol :P
 
@Doorknob you have missed absolutely nothing.
 
ok :P
I was going to do my math homework, but I got distracted and looked at lawn gnomes.
 
But you're 93..
 
Lol
 
1:16 AM
ok
i have a problem
I want to create an object on the grid, but i don't want to waste too much
 
what grid @javawarrior ?
and waste too much what?
 
oh
nevermind
if i have a color in int rgb form
how do i make it darker
 
I see this question, filled with downvotes, step away for dinner, and when I come back, suddenly upvotes. It's still not a good question
-1
Q: how to send data from android to server then from server to android

Marco DinatsoliI want to build an application to send data from Android client to Java localhost server, then return the replay from server to client, how can i build server? and to send the data pelase?

 
@A--C ...I closed it
@javawarrior Increase R G and B
 
1:32 AM
@Doorknob thanks. Broad questions without code trials and "upvote me" attitudes don't have a place here.
 
indeed
 
LOL
HALF THE POWER IS OUT
IN THE STADIUM
 
Haha
 
Hahahaha this is messed up
power out in the middle of the game
 
the players are yawning
 
1:47 AM
how many angry people on twitter?
 
OVER 9000
probably it actually is
 
@Doorknob you're definitely right
 
Lol I searched
and 1 minute later
25 new tweets
oh now 40 :O
 
akwldw
 
akwldw?
 
1:53 AM
yes
i'm working on a minigame
called you die in a fire
 
okay...
 
You have to soak wood
and put out spreading fires
 
Bonus: for every fire they put out, two new ones appear!
 
2:14 AM
I'm a lawn gnome! I'm a lawn gnome! I'm a gnome! gnomey gnome! I'm a lawn gnome!
 
Beyonce, Turn the lights on!
 
I'm making a song about lawn gnomes. Sign of incredible boredom... :P
 
Exception in thread "AWT-EventQueue-1" java.lang.ArrayIndexOutOfBoundsException: Coordinate out of bounds!
at sun.awt.image.IntegerInterleavedRaster.setDataElements(IntegerInterleavedRaster.java:291)
at java.awt.image.BufferedImage.setRGB(BufferedImage.java:981)
at Viewer.getImage(Viewer.java:38)
at Viewer.paintComponent(Viewer.java:89)
at javax.swing.JComponent.paint(JComponent.java:1029)
at javax.swing.JComponent._paintImmediately(JComponent.java:5098)
at javax.swing.JComponent.paintImmediately(JComponent.java:4882)
 
@javawarrior Oh the power's back? :O
 
2:15 AM
@javawarrior Looks like a coordinate is out of bounds
 
yeees
 
Lol
copy/paste ftw
grid[x][y] instanceof Wood not a good idea
 
Please don't post stack traces in chat.
 
@javawarrior What's the line that exception was on?
@A--C why not
 
2:17 AM
@javawarrior yes what is that line?
 
i fixed
i basically said
 
oh ok
 
it's in bad taste (it's almost spam). That's why we have pastebin
 
line was this
bi.setRGB(w.location.x, w.location.y, 0x00FFFF);
changed to this
 
w.location must have been out of bounds
 
2:20 AM
if (w.location.y<=399){
bi.setRGB(w.location.x, w.location.y, 0x00FFFF);
}
 
So some water fell off the screen, I guess?
 
yes
basically
 
darn it my website is down D:
 
you use water to dampen wood
i have a couple of websites
all free
I use the gregahony method
 
Mine has never went down before
now it is at the exact time when I need it :(
 
2:22 AM
I know why
It's powered by the superbowl
 
Haha
lights went back on
 
ig
i'm confused
 
?
Argh register.com wants me to make a secret question and I DON'T WANT TO!
 
9ers are winning
 
Wait, WHAT?
 
2:34 AM
they turned around
i have another problem
in that same class
 
?
 
some water particles go faster than others
 
ok
 
why is that?
 
...how would I know without seeing code?
 
2:36 AM
you want the new code?
 
no the code for the Water class
 
water class is nothing
it contains one item, a point
 
when is the point updated?
 
line 77
that's where it starts
 
line 77 is sleep(1000 / 30);
 
2:40 AM
yes
i think that's the problem
 
I must leave now, hope you solve your problem soon
 
2:56 AM
awddw
@Crowz
@QuickDanger
@AntrikshVerma
 
eh?
 
Help me out man?
I'd appreciate it
 
i you have a min, can you guys help me with this issue?
0
Q: FTP file upload over SSL c#

pibcatTopic: FTP file transfer over SSL im trying to upload file to one of the ftp servers I have but im getting exception while reaching the server server listening on port 990 i think the problem is with implicit/explicit settings can anyone suggest me how to do the ftp over SSL using implicit setti...

 
wait nevermind
 
its c# but thought of asking it here as well
any help is appreciated
thank you
 
3:05 AM
BTW
 
3:18 AM
hi
 
hey
you again!
 
Im back
duh duh duuuuh
 
haha
i'm making awesomeness
 
And that would be? @javawarrior
 
It's called
You Die In A Fire
 
3:28 AM
lolwut ok
 
i can't think of a better name
you basically save blocks of wood
 
Ok
Im working on some of my compiler
somethings going wrong with the SKI machine grrr
 
heereherr
cool
 
I don't get it... Booleans are just K and KI... wheres the problem.. compilers are more finicky then interpreters...
 
i'm testing out my project
it includes realistic water and fire
 
3:37 AM
JUnit all the things
Oh you have a game
is it online?
 
no
it's applet
 
Want to ping me a copy? Im curious
 
oh?
sure
let me finish up this beta first
 
otay
danny.gratzer@gmail.com
 
i
i'm actually really stunned with the results; i've learned about threads more, and i've learned how much data java can process at one time
 
3:42 AM
java's ok for that, I was playing with go recently and it's speedy
java has one of the nicest concurrency libraries ive seen though
 
it's a treat really
what i love about it is that everyone can enjoy it
 
You should look at Haskells concurrency, its kinda cool
running 2 things at the same time is just par foo bar
The only unfortunate thing is that Java isn't really built for concurrency
 
import java.awt.event.KeyAdapter;
import java.awt.event.KeyEvent;

public class MyListener extends KeyAdapter {
	public boolean[] keyCommands = new boolean[100];

	public MyListener() {

	}

	@Override
	public void keyPressed(KeyEvent e) {
		super.keyPressed(e);
		keyCommands[0] = (e.getKeyCode() == KeyEvent.VK_SPACE);
	}

	@Override
	public void keyReleased(KeyEvent e) {
		super.keyReleased(e);
		keyCommands[0] = (e.getKeyCode() == KeyEvent.VK_SPACE);
	}
}
ok
i have a demo for you
 
Alright send it on over
 
errr
errors
 
3:56 AM
Hm?
 
i'm getting concurrent modexception
for (Iterator ity = fire.iterator(); ity.hasNext();) {
Fire f = (Fire)ity.next();
int translate = (f.location.y > 0) ? -1 : 0;
int xtran = (int) (Math.sin(new Random().nextInt(100)) * 2);
f.location.translate(xtran, translate);
if (grid[f.location.x][f.location.y] instanceof Wood) {
Wood wood = (Wood) grid[f.location.x][f.location.y];
if (!wood.wet&&!wood.burned) {
wood.burned = true;

fire.add(f.scatter());
fire.add(f.scatter());
ity.remove();
}
}
}
 
are you altering that anywhere else in the code concurrently? that usually does it
ps range-based for loops are usually nicer then iterating
 
you mean for (String s:string[])?
 
Yes
 
well, they are nice
but i can't make the edits i want to
this code allows me to make really cool stuff
 
4:01 AM
not while its throwing exceptions
 
well, i can use water
 
true oh and !a && !b == ! (a || b)
 
how much water poser you want
 
Um however much you feel is good
your code your choice
 
how much longer you gonna be here
 
4:11 AM
A few hours, I'd like to finish lambda lifting so I'll be online till im done
 
lambada lifting
 
lambda lifting, its a step in compiling functional languages
 
how would i add something to an array list while iterating it
 
You usually don't, youd have to iterate with indices I believe
 
4:27 AM
@all Hi!
 
awwww
;(
i need a solution for that
 
just use indices?
 
what are indices
 
in a[x] x is an indice, same with foo.get(x)
 
i found 2 solutions
use a queue or listiterator
i'm fixing an error
 
4:40 AM
Yay
 
if you help it'll go faster
 
first fix your brain :P
 
ok
here's a simple question
how do i get an array list into a queue
 
5:01 AM
none helps me D:
 
priority queue has a constructor to take an arbitrary collection
 
someone fix meh code for meh?
nevermind
ok
i have a working prototype
 
5:17 AM
feel free to send it
 
ok
do you want jar or applet
 
jar please
 
ok
well you'll have to connect to my personal server to use it
as I don't trust anyone with my work
 
Um sure whatever floats your boat
 
ok
ur connected
 
5:22 AM
Where should I go?
 
problem
i can't fine my main in my config
 
5:47 AM
danmnit
sorry
t won't compuke
 
user868935
Hey all
 
user868935
0
Q: Time-based rotation

SpicyWeenieI have a 3D cube that I'm trying to rotate smoothly along the Y-axis. As of now, when I click my mouse button, the cube rotates to the new value instantly (like Tetris), but would like to show it gradually rotate to the new rotational value over a specific. Here is the code I'm working with: // ...

 
hey
 
6:39 AM
Hi Rohit
 
@Real. Hello
So, here's the regex: -
.(?=[^*]*[*][^*]*$)
 
ok
 
Any good book or reference about regex?
 
Let's start from the beginning: -
. will match any character
 
ok
 
6:41 AM
what is regex
 
@Real. Then you have (?= sompattern )
 
right
 
these kinds of patterns are called - Look-ahead.
Similarly, you have look-behind, which looks like this: -(?<= somepattern)
 
ok\
 
So, your pattern: - .(?=somecharacter), will match anycharacter that is followed by somecharacter.
That is what look-ahead does.
 
6:43 AM
ok
 
Now, in the current regex, we have: - (?=[^*]*[*][^*]*$) as look-ahead.
 
ok
 
So, the regex matches any character (.) followed by a string that matches the pattern - [^*]*[*][^*]*$
@javawarrior.. @PaulVargas. More info on look arounds - regular-expressions.info/lookaround.html
 
Ok what there are four star(*)
why there are four star(*)
 
@javawarrior.. Regex is a pattern matching language, which is used to form some pattern, which matches a variety of string.
@javawarrior.. You would get an idea, if you go through the SO, Wiki page.
@Real. Now let's see that that pattern in look-ahead does.
[^*]*[*][^*]*$ ->
 
6:46 AM
k
 
Brackets - [] are used to create character class.
 
k
 
Inside character class, any regex metacharacter loose their meaning.
 
k
 
For e.g, * in general is a quantifier, which means - Match 0 or more repetition of pattern preceding it. So, a* will match 0 or more a.
But, in character class - [*], a star is a star.
So, [*] matches just *.
And when we use Caret(^) at the beginning of a character class, it negates the whole character class.
 
6:49 AM
I created a very simple application to test my expressions with NetBeans and Swing.
 
So, [^*], matches anything but *.
 
ok
 
So, breaking the pattern we get: -
[^*]* -> // Match 0 or more repetition of any character but *.
[*] -> // Then a single *
 
ok
 
6:50 AM
[^*]* -> // then again 0 or more reperition of any character but *, till the end ($)
$ denotes the end of the string.
Similarly, ^ when used at the front of the pattern matches that pattern at the beginning of the string.
 
ok
 
So, the pattern inside look-ahead means - > Match a sequence of string containing just a single *``
 
ok
 
So, .(?=[^*]*[*][^*]*$) matches any character followed by a sequence of string containing a single *.
 
@all Here anyone has idea on Android?
 
6:52 AM
So, let's take the example in the original question: -
@Appu.. Nope.
 
ok
 
There exists a word *random*.
In the above sentence, think which substring will match the above pattern.
 
ok assume i want to create a pattern which matches between two @
 
I leave it to you.
 
@RohitJain Okay. But I do have doubt even on Java generally.
 
6:54 AM
.(?=[^@]*[*][^@]*$) is that correct
 
@Appu.. Sure you can ask. I'll try to clear it.
No. That pattern is just used to match a single character followed by such a pattern.
 
Ok then what will be correct patter
 
To match somestring between two @, you can simply do: -
@(.*?)@
The two problems are completely different.
The one you are asking and the one in that question.
 
they are similar only i changed * to @
 
Look, replacing a string, and matching a string is two different things.
In that problem, you wanted to replace each character inside two *.
That is why I have to match single character at a time, and replace each one of them individually.
If you simply want to match and extract complete string between two @, or two *, then you can simply use: -
@(.*?)@
[*](.*?)[*]
And get the group 1.
or
() is used to create capture group.
 
6:58 AM
@RohitJain Here is my code.
 
@Appu.. What you want to do?
And what is the problem?
 

« first day (835 days earlier)      last day (4112 days later) »