« first day (2053 days earlier)      last day (2875 days later) » 
08:00 - 20:0020:00 - 21:00

8:35 AM
morn
 
Yay in my current project I'm allowed to use IceFaces pleasekillme
I have no clue how anything works.
 
morn
 
@wonderb0lt welcome to my usual day :P
 
8:50 AM
:D :(
 
9:14 AM
o/
 
 
1 hour later…
10:16 AM
is there a difference between
public static void main(String[]args)
and
public static void main(String args[])
 
fge
There is none, but the first form is preferred
It's a syntax Java offers out of convenience for programmers migrating from C
 
ok thank you
im used to the first form aswell
but recently i saw someone using the second
 
fge
The second one is actually quite misleading
Since the type of "args" in this declaration really is a String[]
 
hm true
well i wont use it anyway
since im so used to the first one
i was actually suprised someone writes it different
 
 
2 hours later…
12:19 PM
can anyone help me?
im trying to connect to postgreSQL with eclipse
i get org.postgresql.util.PSQLException
connection failed
java.io.IOException invalid utf-8 sequence: the first byte is blah blah blah..
i already googled for solutions
 
fge
Stack trace?
 
org.postgresql.util.PSQLException: Der Verbindungsversuch schlug fehl.
at org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:262)
at org.postgresql.core.ConnectionFactory.openConnection(ConnectionFactory.java:66)
at org.postgresql.jdbc.PgConnection.<init>(PgConnection.java:215)
at org.postgresql.Driver.makeConnection(Driver.java:406)
at org.postgresql.Driver.connect(Driver.java:274)
at java.sql.DriverManager.getConnection(Unknown Source)
at java.sql.DriverManager.getConnection(Unknown Source)
heres my code:
public class PostgresSQLJDBC {

public static void main(String[] args) {
Connection c = null;
try {
Class.forName("org.postgresql.Driver");
c = DriverManager.getConnection("jdbc:postgresql://localhost:5432/testdb", "user", "user");
} catch (Exception e) {
e.printStackTrace();
System.err.println(e.getClass().getName() + ": " + e.getMessage());
System.exit(0);
}
System.out.println("Opened database succesfully");

}

}
 
fge
12:34 PM
Erm
Pastebin, please
 
oops sry
 
fge
But the error is strange
Also, you should do Class.forName() separately
 
its just a simple connection
 
fge
In another try block, I mean
 
i checked the port
its the right port
i dont get it
 
fge
12:35 PM
Yes, but you have to catch Exception
 
It's an IOException inside the openConnection method, so Class.forName shouldn't be the issue here as it found the correct class. Using a separate try is a good idea non the less...
 
fge
Class.forName() will throw an unchecked exception
Basically, you don't separate the error causes well enough
Catching Exception is a sin
 
1:07 PM
i solved it with some help from my advisor
thx for your help guys
i had to add another user in pgAdmin first
and my driver was in the wrong location in eclipse :/
but thx
 
 
1 hour later…
2:22 PM
Morning, Java!
 
hey
 
Hey @Hans.
 
!!:3
 
@Hans1984 Hey cat!
 
2:28 PM
!!cat
 
@Hans1984 :3
 
i teached her those two
hehe
 
2:42 PM
Mornin
 
hey
 
3:03 PM
 
:o
 
 
1 hour later…
4:29 PM
I'll have you know that I went to a cat cafe on Saturday :D
 
eee
There's one in toronto I wanna try
Kitties are the best
First business trip was a success by the way haha
 
they were sooooo cute
 
hectic, but also fun.. mostly just super exhausting
 
congrats!
 
The hectic message was suppsoed to be after that one lol
looks like it went first for some reason.. network must be iffy right now
 
4:32 PM
kittens are also hectic
 
but thanks man
I'm going to go for lunch though I'm dying of hunger
glad you had fun at the cat cafe haha
 
fge
5:10 PM
sigh
I'm impatient to get my hands on my Model S
 
 
1 hour later…
6:25 PM
Hey anyone around? I'd like some best practice advice on how to open a new Window up using Swing?
I keep reading about JDialogue but it seems inappropriate for an information window (That doesn't need to be closed ) and apparently just spawning a new Frame is bad practice.
 
fge
Swing? In 2016?
 
6:59 PM
Yes.
It's an academic thing. Not for commercial use or anything.
 
So, unless I just typed it out incorrectly, it's not possible to use a ternary operator inside a diamond operator is it?
Like, the list might be made of an array, or maybe just a single object instead of arrays of objects...
 
7:30 PM
@Owatch Use JFrame. JDialog is generally used for modal "alert" messages.
And be sure to use java.io.File too...just to make @fge angry. xD
@blahfunk Mmm, no...
 
Can I just spawn a new JPanel?
As a separate "Window"?
 
7:45 PM
@Michael I read an Application should only have one JFrame though.
I'll do it anyway. It's not that important.
 
08:00 - 20:0020:00 - 21:00

« first day (2053 days earlier)      last day (2875 days later) »