« first day (1418 days earlier)      last day (3530 days later) » 

5:03 AM
Hail java and deadchat.
 
Hail presence of Unihedron, @BlackWhite
 
I need the sleep i am in 17+ hours
 
5:30 AM
haha
 
5:42 AM
Bye
 
hi guys
I'm new to java
i have deployed a war file in tomcat yesterday it is worked fine.today i have started the server and clicked on the project then it is showing 404 error @ALL'
 
 
1 hour later…
6:54 AM
@Harish
nice work
it happens, try to clean
and re-run
if you are running it on eclipse
 
7:16 AM
Hi all :)
@ItachiUchiha Harro
 
7:55 AM
Harro ?
 
8:25 AM
Hallo then
 
8:45 AM
hi
 
helo
Look a wild @Unihedron appears
Throws pokeball
 
I'm sorry, it doesn't work that way.
Punches you in the face
 
cries
 
@Unihedron I got a logic problem with my GUI
 
8:48 AM
Oh?
 
I made a class with my board and its functions and I added it in another class
Let's put it this way:
- Board class - contains my grid and the functions to play
- play class - contains a JPanel(Call it outOfGame) and my Board
so in my play class I add my board to the left and I add a JPanel to the right to display pawns out of the game
 
With you so far.
 
but the problem is the jump happens in the Board class and I'm not sure how to use that in the JPanel(ouOfGame) of the play class
I cannot extend the board in the play class since I am extending the JPanel
So in summary I need to update the values of my outOfGame JPanel everytime I do a jump in my Board Class
 
Great, if the classes are in the same package, you can access the field if it's of public / default visibility. From there you can modify the field directly. Or you can use a getter.
 
so basically I add a counter for the jump in my Board class, make it public
and everytime i jump the counter updates
here is the funky part
how will the outOfGame get updated everytime?
 
8:55 AM
Hey guys ssup ?
 
since in my play class I just did this:
Board myBoard = new Board();
setLayout(new BorderLayout);
add(myBoard, BorderLayoutWEST);
After I added my Board I just created a JPanel and put it East
Hey @Itachi I'm trying to figure out how to access my panels and grids to count jumps
Read the previous chat and see if you got an idea :)
 
@Sabಠ_ಠ well a possibility is that instead of setting your declared field with Type.field = value, use setFieldValue(value) and within setFieldValue method, compute and update outOfGame every time the value is set.
 
Aha
But outOfGame is in play class
and so is Board
so basically when i fire up my play class the board and outOfGame are created as Jpanels
 
Well you can make your counter field private and force field write to use the enclosing method setter. From the setter you handle the value.
Instead of placing the field there and have no idea when it's set.
 
I'm thinking of something else
use the setFieldValue idea
I just make a panel in the board class
in setFieldValue
and everytime a jump happens
in my play class I simply do Board.setFieldValue();
will this work?
 
9:01 AM
Isn't that practically what I just suggested? :P
 
xD
lemme try this :D
 
in The SO Tavern (Free Snacks), yesterday, by Unihedron
Have anyone here worked with .ms scripts? I'm porting one of these scripts to Java.
 
@Unihedron why .ms ?
 
@ItachiUchiha I just happened to have a ms script to port to java. Jobs are weird.
And bind() is insane to follow.
 
Hi everyone
 
9:16 AM
Heya @PaperThick
 
@Unihedron what are you using exactly ?
 
@ItachiUchiha MethodScript, a minimal turing complete language.
 
@Unihedron doesn't work ;S
 
wait :3
 
9:24 AM
Nice ;)
 
What does Component do in Java?
eclipse forces me to turn a method to a component
 
method to component ?
 
9:57 AM
nvm it doesn't work
I dunno how to get around it
@Unihedron the method we tried is not workgin
 
"It no works" is not how you go about getting help.
 
I tried to make a ethod
setOufOtGame which creates the panel
when I do the jump I add it to the panel
but it doesn;t work
Play contains the Grid and the PanelOutOfGame
I tried to make the PanelOutOfGame in the Grid class with no luck
Basically the Jump happens in the Grid class so I need to use the value obtained in that class in the PanelOutOfGame and update the Play to reflec this
 
11:00 AM
and the problem is calling the method in PanelOutOfGame?
 
11:19 AM
Greetings
 
hi
 
heya
Today @kiheru missed ya !
 
:)
I feel special!
 
12:09 PM
Hiya
 
12:24 PM
I didn't do it!!!!!!!!!
 
12:35 PM
Dead chat...
 
1:32 PM
in RegEx, 7 mins ago, by Unihedron
I'm writing a book!
https://docs.google.com/document/d/1lQpXdFPN2xRIljGnCYeEsmsWLr0XDVvp9e5dn7kkGDA/edit?usp=sharing
 
1:43 PM
@Unihedron hey man what's up
 
Heya @Bruno
 
isn't this piece of code supposed to be ConcurrentModificationException safe?
	while(it.hasNext()) {
			int e = it.next();
			GameActivity.getComponent(e).disconnect();
			li.add(e);
			it.remove();
		}
 
Is it the iterator of li?
 
nope
li is to keep track of the components being disconnected
to update them on the view
it is a LinkedList<Integer> iterator
public LinkedList<Integer> delete() {
		LinkedList<Integer> li = new LinkedList<Integer>();
		Iterator<Integer> it = points.iterator();
		while(it.hasNext()) {
			int e = it.next();
			GameActivity.getComponent(e).disconnect();
			li.add(e);
			it.remove();
		}
		return li;
	}
btw should I do it List<Integer> li = new LinkedList<Integer>?
 
As long as list points is of does not get a modification as it.next() is called, that exception should not be thrown..
no, if you do, the method header will change
 
1:49 PM
yeah right.... im pretty sure I used this some times before
time to restart eclipse
 
haha, Eclipse is a megaderp, sometimes.
 
its true but now he is just being stubborn and I hate it
 
hi guys i have the following statemnt in c# var array = new short[] {4, 4, 5, 6};
var sum = array.Select(x=> (int)x).Sum(); how do i do the same in java8 ?
using lambda
?
 
Lambda in java? are you in java8?
 
wow now I debugged better, when use it.remove() it removes all the data from de list jesus lord
 
2:01 PM
Maybe you don't have to invoke remove since you're iterating anyway. :P
 
I need to because that points list is where the connected components are
maybe I will just clear it at the bottom without removing
it keeps launching the exception lol
public LinkedList<Integer> delete() {
		LinkedList<Integer> li = new LinkedList<Integer>();
		for(int i : points) {
			li.add(i);
			GameActivity.getComponent(i).disconnect();
		}
		points.clear();
		return li;
	}
even this is launching the goddam exception
 
What does GameActivity.getComponent(int).disconnect() do? it modify points?
 
ahhh now I know!
I was looking to the wrong place!
Have 3 classes deriving from component
disconnect() is an abstract method overrided in all of them
and I was just looking at one, thank you (:
 
cool glad to help
 
2:18 PM
found
int sum = shapes.stream().mapToInt(s -> s).sum();
 
Great!
 
Wow
int sum = Arrays.asList(1,2,3,4,5,6).stream().mapToInt(s -> s).sum();
 
One-liner! :o
 
:D
j8
 
#stuckwithjava7
 
2:35 PM
0
Q: How to roll calendar to the next given weekday?

NezamI am fetching a number of weekdays from the server,which correspond to Calendar.DAY_OF_WEEK.That is SUNDAY=1;MONDAY=2; so on and so forth.I am working on a way to roll the current calendar to the next weekday from the array of weekdays fetched from the server. Here is what i have been through: ...

 
3:03 PM
@Nezam 1. Format your code. 2. Don't post code with // TODO auto-generated blocks. 3. Improve the semantics of your code. I'm editing it at the moment.
 
@Unihedron I can't understand why it's getting downvoted.I explained what i want to know and even showed what i have tried.Thats supposed to be praiseworthy right ?
 
What's praiseworthy?
It took me > stackoverflow.com/posts/25768175/revisions < that much ink, I beg to differ.
 
Like instead of asking a vague question i explained with code
 
Yeah but no one could understand what you were asking, unfortunately.
> I am fetching a number of weekdays from the server, which correspond to Calendar.DAY_OF_WEEK. That is SUNDAY=1;MONDAY=2; and so forth. I am working on a way to roll the current calendar to the next closest weekday from the array of weekdays fetched from the server.
> I need a way to find the next closest weekday from the array of weekdays I have.
 
Why dont you look at the title header thats bigger and bold
How to roll calendar to the next given weekday?
 
3:09 PM
Please roll a calender.
 
@Unihedron yeah and i need an answer too.
 
Wait, is English your native language? Honestly, one does not "roll" a calender. Calender rolls are another thing.
 
@Unihedron i though you program in Java . Calendar.roll
 
What are the commented lines for?
 
3:13 PM
Whatever, auto-commented.
> Calender rolls are another thing.
That other user who commented on your post wasn't really an experienced java coder, btw.
 
@Unihedron please help .
Dire need of a solution
 
3:30 PM
Why Java does not have sizeof() operator?
 
@M.S. ?
 
@Unihedron Hi! :)
 
\o
 
3:45 PM
hey
Guys, doesnt objectoutputstream changes the bytes order or something?
Because I have a game client, I basically saved it's cache files through ObjectOutputStream by spliting it into byte[] arrays, each one has 1kb.
So basically i reduced the size from 104mb to 967kb
but when I read it, it reads 104mb but the game client says error loading, not sure why
 
4:02 PM
hello
 
 
2 hours later…
5:34 PM
@Unihedron you there?
 
no
 
5:52 PM
Hail Java
 
6:20 PM
I have returned!
 
 
2 hours later…
8:20 PM
My next door neighbor lives three houses away from me….
 
9:11 PM
Hi
 
 
2 hours later…
11:09 PM
Any survivors?
 

« first day (1418 days earlier)      last day (3530 days later) »