« first day (1419 days earlier)      last day (3521 days later) » 

12:28 AM
hi
can somebody help me answer this question?
7
Q: Query on usage of this variable in Recursion - Java

overexchangeAfter calling method, node.nth(5) in below code, public class List_Node{ int item; List_Node next; public List_Node(){ this.item = 0; this.next = null; } public List_Node(int item, List_Node next){ this.item = item; this.next = next; } ...

 
12:48 AM
pls
 
1:12 AM
hi @overexchange
 
1:24 AM
What about me? I'm not worth saying hi to? Sniff
 
1:35 AM
@Unihedron hai
 
hia @karl
 
am on chat with Rp-
i just saw your msg
 
2:07 AM
What's the good word?
 
bird
 
What's the price?
 
 
3 hours later…
5:09 AM
@Karl what If I code in IDE rather then text editor
 
6:00 AM
@user2736704 you can code in whatever you want, as long as you code :)
 
@ItachiUchiha ok Thanks
 
@overexchange This is already answered
 
 
4 hours later…
10:05 AM
Dead Chat
 
I'm in awe of the *mad skillz* of the windows update developers. I mean, how is it even possible to use over two and half hours doing an update on a system with an SSD?

First I considered they must be accessing their data structures in some ways I would not even dream of. That's creativity. I wish though, that they'd show their brilliance on some other field, such as music, where their unusual talents would be easier to appreciate.

Then I thought that maybe the master programmers, given the mundane task of writing an updater, thought it was not challenging enough. And so they decided to w
3
Sorry about the off-topic rant. I'm just not very used to run windows. Seeing that there something under a Gb worth of updates, I, knowing the windows updater's reputation of being slow, was mentally prepared that the task might take even half an hour.
 
Mining BitCoins part was Hilarious ! :P
Sad, it took only 2 hours more than your expectation
 
10:22 AM
Normally, on Linux, for that amount updates I would have guessed something between 5-10 minutes. I was expecting slow, but not that slow.
 
yeah, windows sucks when it updates
 
@kiheru Thank god I use Linux.
 
The time used would be probably enough to write the entire drive full a couple of hundred times
 
SSD's are fast, really fast
and if it takes that amount of time (excluding download) to install, its seriously mining BitCoins :P
 
I booted windows only so that it could do the updates. So that it would not take forever doing updates in case I ever actually need to use windows...
 
10:25 AM
You should have just used it without the update
I really hit a wall today !
 
then I'd need to turn off the network for safety
 
I wasn't aware that you can run a javafx application without the main()
Can you believe, I have been using it for nearly 2 years without knowing that
 
@ItachiUchiha So the free candy truck actually had free candy?
 
kinda
 
10:40 AM
how to set layout null in Swing?
of frame?
 
The short answer is don't do that.
The longer answer is call setLayout(null) on the content pane. But if you think you should do that, you're almost certainly wrong. Think again.
(repeat the thinking loop until you no longer think of using null layout)
 
@kiheru i am coding in notepad..
 
How does that relate to layout managing in any way?
 
How to set Background color of JFrame?
 
11:36 AM
Greetings
 
greets
 
hi
 
How u?
 
I did something unusual and booted windows today. Not anymore on that, of course
 
So, mentally, you are unstable...
I see...
 
11:51 AM
A bit, still recovering :-D I ranted here a bit once I got back to sane system
 
Why do you have Winders on it if you're so against it?
 
Just in case I need it. I paid it with the laptop so it can eat the space on the hd at least until I need it for something else.
I wanted to update the system so that it would not be horribly insecure if I actually need the system. I was not prepared to meet the windows updater
(the experience is described at the starred comment at the top of the right side panel)
 
(unstars the post)
 
I also may some day to want to test on windows
 
Already read it
 
11:57 AM
(I have at least once managed to put code in release that was quite broken on windows. None of the devs had tested on such obscure legacy systems :-P)
 
The Xbox One doesn't even download it until you power up the system. Then it updates.
Every update is mandatory on that thing, I've seen it take over a half hour just updating stuff...
Nobody else bothers to test on Winders, why should you?
 
hi
 
@TimB Heya
 
12:14 PM
That was a special situation. Those that usually use windows had been busy
 
 
1 hour later…
1:32 PM
I'm back!
 
 
1 hour later…
2:36 PM
so m I
few days back we were talking about how serious this room is n today again its dead serious..
 
True, but I can't start the R&D of activities until I have time. Surely having a tab open to talk with users occasionally is OK, but I have tasks on my hand as well.
Until then, here's a cool soundtrack: bleepstreet.bandcamp.com/album/a-for-amiga
 
2:50 PM
hii guys
 
conversation burninated for no redeeming value.
 
thanks lol
 
Welcome
 
3:01 PM
Hello [again]
 
Hello, hello!
 
Are we scheduled for a serious conversation, or a humorous one?
 
Ugh, there's a typo in the Java documentation.
 
I don't see any issues with it! Iff you do, will you tell me. :P
 
4:09 PM
hi guys, when reading a file, which is the more efficient way:
BufferedReader reader = new BufferedReader(new FileReader("/home/eggy/Desktop/HelloWorld.txt"));
String textFile = null;
while ((textFile = reader.readLine()) != null) {
System.out.println(textFile);
}
reader.close();
or
File myFile = new File("/home/eggy/Desktop/HelloWorld.txt");
FileReader fileReader = new FileReader(myFile);
BufferedReader reader = new BufferedReader(fileReader);
String textFile = null;
while ((textFile = reader.readLine()) != null) {
System.out.println(textFile);
}
reader.close();
 
Before I comment, I would like to point out that it's unsafe and you'll get a resource leak when theres an exception.
 
so, using a try catch?
 
Close, see:
try (FileReader fileReader = new FileReader(myFile)) {
  // code
} catch(Exception ex) {
  // Ignore
}
Aside from that, there really isn't a specific preference over those two options. You should use the one that is easier for you to manage and maintain, I believe.
 
ok
thanks
for ur help :)
 
Anytime :)
 
4:32 PM
Hello world :)
harro @Unihedron
 
heya @sab
 
:D
My game works now :D
 
But hey I got a question
 
ask
 
4:34 PM
Step 1. Never Use word to write a book
There is no step 2 actually :P
Back to my question, I made a class with my grid and it extends JPanel
 
I would use a gist but that's a pain to fork.
 
use Latex
due to this fact I had to put my board functions inside the same class as my grid
is there a way to make a class with my board functions and use in my grid class without extending it?
 
? what makes you think there's a way to use it without extending it?
 
I don't know
i have my layout my functions and everything in 1 class which doesn't make it very OOP
:/
 
Yeah.
 
4:37 PM
So is there a way to put the functions inside another class and use them?
 
ctrl + c, ctrl + v
 
but I can't extend oO
 
just
copy the methods from the source code of this class to the other side directly
otherwise no there is not
 
but how will the class know the functions are there -_-
if i just paste them -_-
 
Welcome to the world of Java @Rawxy, where your dreams may or may not come true!
@Sabಠ_ಠ don't know - make an interface and have both classes extend?
 
4:40 PM
interface, what that?
implements?
oh can I use implements?
co board class extends JPanel and implements functions
 
class Ball implements Bouncy {
  @Override
  void bounce() {
    // ...
  }
}
interface Bouncy {
  void bounce();
}
 
dude that's dope
class Board implements boardFunctions
interface  boardFunctions{
    pasted code
}
:O
trying this right now
 
Eh, interfaces have the method header, the implementation is in the class itself.
 
what
?
 
As you can see bounce() in Bouncy has a ; instead of a code block {}. If you want to put methods, you have to put it in a class.
 
4:46 PM
yep
so there is no way to use my functions outside the class then
so what's the purpose of Java then?
It's going to be a cock tail of methods and layouts
 
Java improves your inheritance designs by enforcing proper composition.
 
but in the case of my game, what;s the best method to do things?
 
use interface
the signature of the method is specified in the interface, implement it in your class
 
so i just paste my methods in my interface?
.
 
no
 
4:49 PM
but what does the interface contain?
CheckerBoard extends JPanel
this is my class
 
class GoldVault extends ValuableHolder {
  @Override
  Object open() {
    return giveGold();
  }
}
class SilverVault implements ValuableHolder {
  @Override
  Object open() {
    return giveSilver();
  }
}
interface ValuableHolder {
  Object open();
}
this ^ declare a signature signature in interfaces, post the code in the methods in the classes overriding
 
okay
I get the idea
I'll try this now :D
thanks :)
 
then when both class has the method
you can store as ValuableHolder instead of Object so you can access open()
 
aha!
thi is genius :O
 
no it's not
it's elementary
and i'm tired
 
4:54 PM
haha
lol
it's weird java doesn't allow multiple classes though
life would be easier
 
5:39 PM
hey, I'm having a very weird problem with a 3rd party Java Spring application.
I'm running it with a config that's working on another box in a RHEL 6.5 vagrant container.
Inside the box, app dies.
In the production system, the exact same JDK version, tomcat version, RHEL version, app version works
So it has to be something else than a Java config issue, sadly I'm out of ideas where to look.
 
5:53 PM
any log erros?
errors*
 
none that help, sadly. spring just craps out if a NullPointerException in 3rd Party static initializer code.
It's consistently the same line though.
Increasing log levels didn't do much good, as fas as I was able to tell all the bean creation went along as it should.
SELinux = permissive on the box BTW
 
any database connections on startup?
 
Kind of. I switched them to h2 dbs (supported by the app).
 
check memory usage? app may be running out of memory?
 
no OOM Killer, no OOMException.
PermSize, HeapSize and System RAM are the same as on the prod box.
512M, 1G, and 4G.
the prod box runs 3 tomcat instances, I disabled the other 2.
Those are working fine BTW, spring apps too.
 
6:03 PM
i would expect something to be in the logs
 
I'm sure that if I recreate the template from scratch it will work with one and the same config. I had this problem with this app before, but never was able to figure it out.
I'll show you the backtrace, but I don't think it helps much.
 
anyone here from android field
 
http://pastebin.com/ch2Pg8cF catalina.out
http://pastebin.com/x8sUaB3q app.log
The lines up to line 6 are normal.
 
@fuero are you from android
 
nope.
 
6:20 PM
a quick question:
is there a way to have n threads wait for something? and each of them getting notified when that "something" happens? I dont think synchronized block can help as it would only allow one thread to resume execution. Iw ant that all the n threads resume execution parallely
 
Check out java.util.concurrent.CountDownLatch. That may help. It is "A synchronization aid that allows one or more threads to wait until a set of operations being performed in other threads completes."
 
@fuero thanks
I saw that cyclic barrier
but again it uses synchronized block
hence on , only one thread will resume execution
 
what about java.util.concurrent.Phaser then?
 
not sure about that
let me chk
 
7:02 PM
first time here. Are there any desktop clients for SO chat? (Mac OSX preferred)
 
7:19 PM
@Unihedron Are you sure that's a typo? "iff" is used, especially by mathematicians, as a shorthand for "if, and only if"
 
7:38 PM
Hi
 
 
1 hour later…
9:04 PM
heya..
anyone out here
 
9:16 PM
I;m here
 

« first day (1419 days earlier)      last day (3521 days later) »