« first day (2319 days earlier)      last day (2621 days later) » 

12:04 AM
@MadaraUchiha <canvas> ?
I actually wrote something where I needed to get the color of the pixels that the user clicked on.
I used a <canvas> tag.
 
12:30 AM
Is it possible to make Java execute JavaScript code in a web browser's console and then retrieve the corresponding message logged to the browser's console?
 
12:48 AM
morn
 
I don't think so. Why would you want to do that?
Hey @Tavo
 
@Michael Why not?
 
Java has its own Javascript engine, if you're trying to run Javascript code from Java.
 
It's like trying to build a bridge out of dirt.
 
1:05 AM
@JonahSloan Smells like a security issue.
 
 
2 hours later…
3:05 AM
@JonahSloan Why create a web browser if you just want a script engine? You can create a headless JS engine, I think it comes packed with Rhino JS (I had to use it once)
"Rhino is an open-source implementation of JavaScript written entirely in Java. It is typically embedded into Java applications to provide scripting to end users. It is embedded in J2SE 6 as the default Java scripting engine."
if you're using >=se6 then it's embedded
 
3:47 AM
I am feeling horrible
I should probably sleep, but I want to write code.
 
sleeping is a waste of time
unless you're a human
 
I have a body that is human
 
too bad
go to sleep
 
 
3 hours later…
6:48 AM
Good morning o/
 
7:02 AM
o/
 
7:33 AM
morn
 
Hey Nicktar :)
 
"Outspoken"?!?!?! You're starring the stuff I'm writing?
 
7:50 AM
@Michael That's one way, yes.
 
@Nicktar gg
 
Hey @Unihedron sorry for "ignoring" the invitation but I was offline and asked to move the discussion to another room because I didn't want to participate.
 
@Nicktar I'm fairly sure the invitation was automatic due to the moving.
 
@MadaraUchiha ok...
 
@Nicktar Do you know a website for German Streetnames that is longer than 200? I wanted to test around with JavaFX a bit and decided to do a TestDataGenerator and I wanted to use German data for it (we only need that here) and I am not able to find a longer list with more than 200 entries. The OSM wiki tells that one may not use theirs as long as it is not of use by OSM....
 
8:08 AM
@geisterfurz007 koeln.de/apps/strassen you'd need to concat those from the sublists and I didn't count but I'm pretty sure it's > 200
 
@Nicktar be glad, you didn't lose an hour
 
Huh.. Might take a while, but hey :P I am getting paid for it ^^
 
@geisterfurz007 Does Wikipedia have one? There are lots of helpful lists
 
Only some sublists that are seperated by the strangest categories...
@Nicktar Top find! Thanks a lot :)
 
yw
 
8:19 AM
Can a java servlet question being asked here ?
 
can
 
@geisterfurz007 you mean "Veedel"
 
(I'm so integrated in the Singaporean culture already...)
 
@Unihedron ARE*
 
@MadaraUchiha (((the method of) using) [...])
 
9:04 AM
What do I need to change to remove the "cant convert String to String[]" error in this?:

shoppingList.listItem newItem = myList.new listItem("123", 3);
 
give definition of myList.listItem constructor and shopppingList.listitem attribut to give information please ;)
 
Here or in pastebin?
 
here no mattr
 
because "123" is not a String array
it's String and not String[]
 
9:13 AM
What do I change it to?
 
you need to do : {"123"}
if you want to add others : {"123", "toto", "blaba"}
 
Ohhh
Thanks!
 
but you name it "itemName", so its just a word ?
 
Yea I must have picked it up wrong from somewhere hehe
 
because you can just use String and not String[]
 
9:14 AM
Thank you!
Yea I'll just use String :)
 
yep ;)
 
@azro Can I create new subclass instances from within the outer class?
class myclass() {
class innerClass() {
}
createclass() { }
}
 
yrp
yep
 
Oh ok thanks
 
@Unihedron Subject is the CAPS, which is an ARE, and not IS.
 
9:28 AM
Like this? pastebin.com/6SY3t3V6 @azro
 
there not really sense in what you made sorry ^^
first this.ListItem, what is it ?
and you shoppingList have a String[] but better have a item[] not ?
 
@MadaraUchiha change it then
 
@azro I want to make a new listItem object from inside the shoppingList class :S
Sorry I messed up the caps in there
 
why specially inside ?
you don't need to
 
Ohhh wait I think I got it
shoppingList.listItem newItem = this.new listItem("123", 3);
 
9:35 AM
there is ot "this"
it's not an attribute
the easier seems to be : pastebin.com/xBCJRkGt
Then you'll leanr that it's hard to work with array because you have to specify a size AT the construction and you can't change after, so you'll use List interface , and arrayList class for example
 
Ohh
I'm very new to java so I still have to try everything hehe
 
Arrays have their purpose, but you generally want to work with an ArrayList, which is an object wrapping an array
With a nicer interface
A good exercise for you a bit later down the road is to implement an ArrayList
 
Will do :)
 
public class MyArrayList<T> implements List<T> {
  private T[] arr;
  MyArrayList(T[] arr) {
    this.arr = arr;
  }

  // Good luck!
}
 
This should be added to the list of best comments found :D Unfortunate that it got closed :(
 
9:43 AM
man that's hardcore
 
Oh, do I have to import that? @MadaraUchiha
/add that class?
 
it doesn't even extend AbstractList, you have to do it from scratch, even I might not get that done :)
 
@Pigman168 No
 
There are things the almighty Unihedron would not get done O-O
Heyyo Uni btw :3
 
@Unihedron Hmm, right, forgot that Java had that
 
9:46 AM
are we even talking about java anymore, the weird this.new syntax was ticking me off, that's why I wasn't responding to that
@geisterfurz007 well, I'm good at identifying things that would take me over 90 minutes to do and avoiding the hell away at all my costs
 
isn't that this evil pseudo langage with a syntax like this?
 
this evil pseudo language?
 
yeah right
this evil pseudo language that should not be named in here
 
@MadaraUchiha Yea ArrayLists do seem easier hehe
 
dunno what's so don't-name-it about it, isn't that just JAVA?
 
9:57 AM
this.new isn't Java
new is a keyword and keywords can't be members of 'this'
 
But really... what pseudo language are you talking about if about any at all
 
@geisterfurz007 cough JS cough
 
Oh I see :D
 
@Nicktar does it cause a problem? And is it a new thing? (no pun intended)
 
@Pigman168 only if you call compile errors 'a problem' and Java 1.0 'new'
 
10:07 AM
Mkay
 
How can it be so hard to find a variable name O_O
!!break
 
morn
 
@Nicktar JAVA is not Java ;) ;)
 
10:22 AM
@Unihedron then it's off topic here
 
Hey guys, any of you work in Berlin?
 
@ivanthescientist why?
 
Well I'm thinking of relocating there, just wanted to ask a couple of questions
Namely, is it possible to live there comfortably on 55-60k gross income?
Also wanted to ask what good companies you guys know there.
 
I'd say yes... Berlin is one of the cheaper cities in .de but it largely depends on your definition of 'comfortably'
 
There are a lot of interesting points you may find concerning with regards to finding work after relocating that applies to many cities, for example on The Workplace
 
10:28 AM
Thanks, I'll look there I guess. So how much should I be expecting to spend there each month? Like 1500 eur per month, given that rent is going to be 1000 eur?
I'm just doing math at this point, I reckon by net income there would be around 2700 a month, so after living expenses it should be around 1200 going into savings account.
 
11:07 AM
for your first year, you're probably not going to save that much
you'll have moving expenses and anything else to make you align with your surrounding (depending on whether you were a student)
such as work clothes etc...
 
and a suit (helps with most desk jobs
 
 
1 hour later…
12:28 PM
"If I agree with you, we’d both be wrong." - Unihedron 0
 
12:38 PM
"This isn't something you can discuss, I'm right and you're wrong." Hans Rosling
 
1:03 PM
hey thats a good answer
from now on I will always answer like that
 
>good answer
unicode_thinking_emoji
 
;)
 
@Unihedron 🤔
 
@MadaraUchiha awesome! I'm not on a mac so I only see squares :p
I can only imagine that this is the emoji I need
for all situations
 
1:07 PM
hey thats me
\o/
 
after a mediation session on game development, I've finally realized why I keep losing fire on my game-related projects
the designs I have for games that I would try to make are playable, interesting to others and I would be indifferent about having made, while the games I actually really want to make never gets on the chopping board because I'm 100% sure no one would be on it for over 5 minutes even if I finished them
 
why is that?
 
well yeah, I'm starting the plans of a game I would actually enjoy building and playing but unfortunately I'm fairly certain everyone who picks it up is going to reach the inevitable destination of "lol this sucks" within half an hour
screw designing a game for the player, I make what I want
 
hahaha! good thinking :D
 
@Unihedron When you look at the most successful indies lately the common theme is that they have excellent story, and excellent storytelling.
Undertale being a prime example
No graphics, no real gameplay, no real puzzles, good+ music, and excellent+++ story.
 
1:14 PM
@MadaraUchiha at this point I'm less for "I want to make a game that someone would like" and more for "anything that I'd actually finish and not drop out of boredom"
 
@Unihedron Are you developing the engine too? Or just the game?
 
I love good stories and I have many to tell, I haven't found games as a good medium since I've never used it as one, but we'll see!
 
@Unihedron Have you played "To the Moon"?
 
@MadaraUchiha I use the engines I see fit, I am familiar with many so I can pretty much hop over to the one I need.
 
(I'm not familiar with Game development, so that may sound like a dumb question)
How do you say this engine fits for this game and this one not?
 
1:18 PM
@MadaraUchiha I haven't, which is unfortunate, although it (this one) seems relatively old so I'll try to pick it up when I have time, but I've probably played a few indie games you're trying to outline
The Beginner's Guide for example really moved me, but I felt the narrator's attempts to shed his wisdom with the constant music being blinding and obfuscating my view of the big picture most of the time
@MehdiB. like picking a programming language, some languages have a better ecosystem or toolkit that is better suited for your tasks, Java for when you want to write fast code, Javascript for prepackaged DOM, Scala or typescript or the likes if the task benefits from FP, &c
 
I see, That's interesting, I should start with one relatively easy to understand the overall picture of Game Development, and develop something small. So far I only code in Java - JS - recently Python
so I'll be looking for one using one of these 3
 
Any talented Java person here that knows the Scanner class in detail?
I am so done with it, as I cannot get it to work...
 
I know nothing about it but I might still be able to solve your problem?
 
I have a Scanner that will take in a file that has 2948 numbers that may be 4 or 5 digits long and I am trying to loop over it using

while(myScanner.hasNext())

However the loop does not do anything. I doublechecked and that method always returns false eventhough the file is not empty
 
Have you tried hasNextInt()?
assuming you're using nextint
 
1:31 PM
Yup as well as hasNextLine()
both return false as well
I do not get a FileNotFoundException or anything like that.
 
wait, why not a bufferedreader? I'm not sure how scanners works with files
 
13
Q: How to get a random line of a text file in Java?

FluffySay there is a file too big to be put to memory. How can I get a random line from it? Thanks. Update: I want to the probabilities of getting each line to be equal.

Because I copied >.<
Or do you think that the second one is better or this one with a BufferedReader?
 
my iphone has an issue and needs to be restored and updated. Does I don't want the latest IOS on it as it'll slow down my iPhone 4s. Is there a way to update the phone but keep the older IOS version?
not a java question i know but I'm stuck here
 
This is a Java chat and has nothing to do with Apple/iOS/iPhones
darn to slow
 
OMFG
IM SO TRIGGERED
java7fs.wikia.com/wiki/Why_File_sucks @geisterfurz007 pls don't use javaiofile
 
1:42 PM
I see.... Will take a bit longer to get this finished I guess.
 
yeah that example might have worked and it's great if it did but once it fails there's nothing to do to fix it xD
bufferedreaders are kinda easier to use, has its problems, but easier to follow through
 
Yup now I am at least getting some values in my TableView... However it sometimes throws out nothing. Like empty lines. I tried changing the default value I had from null to "something" to check if the loop is done inconsistently, but those are just empty lines...
I know why that stuff happens! Not really, but a bit! I ran a powershell command over it! That increased the file size and I wondered why... maybe that is the issue!
This would as well explain why the output of only these two files are messed up.
 
2:01 PM
is powershell a windows thing?
 
yup
Yeah I know it makes sense then that it causes something like that :D
 
I don't have an excuse, so pretend I just gave one if you want. I'm staying out of this as long as windows is involved :)
idk how anything in windows works :thinking:
 
Yup I can understand ;) I found the problem in the meantime. It seems that redirecting the output of the command from the powershell resulted in the output file beeing encoded with UTF-8-BOM which seems to cause the problem. Which is interesting and is something I will read about in a second, but I will have to fix this first ^^
Boom there we go \o/
 
you installed a different OS?
 
What? No this is my work laptop unfortunately.
However on my home device I do have windows as well...
I have no problem with it...
except for some randomness here and there
 
2:30 PM
@Unihedron And heck faster! That difference is impressive :O
At least it feels faster
 
2:50 PM
..ooO(OMFG? Oh My Fucking God? I can't imagine any realworld significant religion to endorse that statement) grins ducks runs away
 
what
 
3:07 PM
just a runaway train of thoughts
 
trainwreck
 
@Nicktar "grins ducks" How do I have to imagine that? ;)
 
hey, for computer science I'm making a little airline reservation system. At some point, it displays a boarding ticket on the screen. However, I want to impress my computer science teacher by having it literally print a piece of paper that has the correct stuff on it. I have no idea how to do that, and the stuff I googled doesn't show anything like a simple "hello world" for printing paper. Anybody know how to do that?
 
Happy Monday, Java!
 
Happy Java, @Michael
 
3:13 PM
Hey @wonderb0lt
 
Michael Java, Happy!
 
@mdlp0716 You can use a PDF library to generate a PDF, then send that to the printer.
I did that for a project.
Hey @geisterfurz
 
@mdlp0716 The displaying is as an image?
 
I just want to display some text honestly
on the paper
So when I generate the pdf, how do I send it to the printer?
 
Hello Michael
 
3:17 PM
I don't remember, google it.
Hey @Hans
 
@Michael Heyya Michael ^^
 
@Michael how do i generate a pdf with java?
 
you need external librarys
 
Seriously... I think the easiest way without libraries would be:

Create a BufferedImage, write your text on that image and send it to a printer.
 
i recommend Apache FOP
used it in my vaadin prototype
its neat
 
3:23 PM
vaadin
 
yep
vaadin=java
 
I know ^^
 
vaadin
TRIGGERED
 
Oh yeah that one is better!
Heck that gives a headache when looking on it!
Perfect timing to get off work ;)
Bye ya all o/
 
bye
 
3:33 PM
@wonderb0lt hey dude
 
@ballBreaker yo
 
How's it goin?
 
Professionally: Still without a project which I find annoying.
Personally: Let's not talk about it. :P
 
well if you do want to talk about it..whatsapp me
Also damn, how long without a project now?
 
So I just got bitten because I was comparing Integers with !=
and of course, my coworker with a much more expansive database had records where that Integer was greater than 256
 
3:57 PM
@ballBreaker 3 months
 
leaving
 
byebye
 
@wonderb0lt jeepers
what are you doing instead? Some sort of training?
 
4:32 PM
Yeah, this and that. More or less sensible internal projects etc
Basically they try keep me busy until a project becomes reality
 
ahhh I see I see
Yeah I'm in the same boat right now as well
 
4:48 PM
jeez
 
I would love to have a few months of resting without a project..
Enjoy it and learn new stuffs
these periods are rare
 
ha ha
 
5:05 PM
Good morning or afternoon or evening or whatever
 
5:18 PM
Chart comparing the different types of Collections: github.com/JonahSloan/Advanced-Java-Tools/blob/master/src/utils/…
 
Nice. I think a table with red and green would be more user friendly
 
That's a good idea, I might do that
 
6:06 PM
can one change a a cellrenderer dynamicaly on a jtable?
 
6:18 PM
posted on February 27, 2017 by CommitStrip

 
on a specific cell i mean... usually it gets updated by a boolean
if the boolean is false the cell's background is red, if true the background is green
that works as expected :D
but now during the transition between red and green I want it to flash :D
so I could code a new renderer with the flashing stuff and replace the old one with the new one
 
6:56 PM
@JonahSloan LinkedList and Vector have no order? o.O
 
@Michael You think it should say "Insert"?
I mean like, you can add and remove items wherever you want in a Vector, so does it really have an order?
 
7:43 PM
o/
 
Anyone used Grafana with ElasticSearch?
o/
 
8:17 PM
Hello
 
hello
 
8:31 PM
@JonahSloan To me, order means "iteration order".
 
guys when i implementing a design pattern should I stick to the name of the methods as the pattern used to have it. for instance, if i want implement the observer pattern the observable class will have a method called addObserver() OK! can I call something else like addTrafficLight() since i am doing a traffic light system and implementing the observer pattern
anyone here could answer me please
 
8:58 PM
@FaisalJulaidan You could have a method called addTrafficLight() that just calls addObserver()
 
9:41 PM
Wouldn't be a bad practice?
 

« first day (2319 days earlier)      last day (2621 days later) »