« first day (2459 days earlier)      last day (2496 days later) » 

12:18 AM
@simeg What? They added time travel to Java 8? Didn't see that on the changelog.
 
1:02 AM
@Michael you read the changelog?
 
1:34 AM
@Michael in Java9 they are even solving the problem with broken timelines, haven't you heard?
Java10 won't even let you kill Hitler :/
 
 
2 hours later…
3:39 AM
o/
 
\o
 
howdy
 
I am doing good. hbu?
 
good as well. Started the week by going to my boxing class, and I have a very socially-packed week. Can't complain :)
also, my parents are coming a week on tomorrow
they are bringing yummy Spanish food! \o/
 
Woah!
Lucky you!
 
3:47 AM
I'm also from the region where all the famous Spanish food (except paella) comes from
can't wait!
also, I want to see my parents :P
 
haha
You sound home sick to me :P
 
not yet, not yet :D
also, I'm not sure what to call home anymore. I think that'd be London
 
"One voice can change a room, and if one voice can change a room, then it can change a city, and if it can change a city, it can change a state, and if it change a state, it can change a nation, and if it can change a nation, it can change the world. Your voice can change the world." -Barack Obama (source)
 
4:06 AM
morning
 
@motaa o/
 
@ItachiUchiha how would you reduce points in a linechart? I was thinking about this github.com/LukaszWiktor/series-reducer
 
Aren't you up early today?
 
o/
 
\o
 
4:11 AM
@ItachiUchiha no got an exam tomorrow and I yet prefer to do my practical stuff for the same teacher... but my arduino project is due next week :D
 
@motaa Never used it but if it works for you, go ahead..
 
I am currtently working on a lambda for that
I am working on a stream that takes based on a List of Data<Number,Number> elements. and I gotta map those Number values into a List of Points (interface) and collect it to a list
that's how it currently without any styling looks :D imgur.com/a/fhEy7
 
Not bad. But, since the charts are small, I would have preferred a thinner line on it
 
ye the layouting comes when the functionality works :D
I need to be able to keep everything smooth at at least 100Hz
so getting everything up and running with my different tasks/threads
but I kinda feel stuck right now on this stream
let me explain
 
I do not think you can achieve 100 frames per second with JavaFX 8
 
4:25 AM
it actually updates fine
 
The current renderer supports a max of 60 frames per second.
But, that changes in JavaFX 9 where the support has improved > 100 FPS
 
it might just be rednering at 60fps but for me it was important that nothing is blocking the flow
 
@ItachiUchiha so we might be able to create a call of duty FX completely written in jfx? :D
 
haha, sure.
I am more excited to run 4K videos using the MediaPlayer API
 
4:36 AM
true didnt think about that
 
hi guys
 
@Mathur Welcome to the Java Chat, the room for Java enthusiasts! Please use a code snippet tool when posting code snippets. If you have an Android question, you're in the wrong place! And remember: this is not tech support! Thanks for visiting and have fun! :D
 
@Mathur o/
 
i have confusion in spring core module.
what is default classes being used of collection interfaces while using Collection dependency in Spring
 
4:53 AM
what is wrong with this stream? I know it does not really look right but I don't know why that is... paste.ofcode.org/cgxq4MUF3CaQKuy8Ac972Y
compiler says: The method map(Function<? super capture#2-of ? extends XYChart.Data<Number,Number>,? extends R>) in the type Stream<capture#2-of ? extends
XYChart.Data<Number,Number>> is not applicable for the arguments ((<no type> i) -> {})
ok I get that I have different types on each side of the lambda
 
5:13 AM
@motaa it'd be nice if we knew the type of variable e
 
@MadaraUchiha Any idea about this anime: Noblesse: Pamyeol-ui Sijak ?
 
@JennaSloan paste.ofcode.org/CmwTmsDPZaCv7xbBzzVNRK I added the surrounding listener to it :D
it's an ObservableList of type Data<Number,Number>
 
5:28 AM
@motaa shouldn't there be a return somewhere in the inner lambda?
 
@JennaSloan mh that makes sense
my idea is that I want a Data<Number,Number> object converted to a Point object and these point objects should then be collected to a list
 
5:53 AM
@JennaSloan I just changed it to sth simpler paste.ofcode.org/67xqNVXHSEGeZsiDTKXs5S :D
 
6:17 AM
hey
i have a question
 
@AceVez just go ahead and ask :)
@ItachiUchiha the linesimplification works great :D
 
Are you referring to the series-reducer project?
 
@ItachiUchiha yes
 
here is an example of my code
as you can see i could make a new method to parse and send data
so i don't have to repeat it for every other method that use it
is it a good practice to put the "parse and send data" method inside the ApiController
 
@AceVez since you are doing work on the model I would not put it into the controller
 
6:27 AM
do i need to make a new controller?
or what should i do?
i'm using spring btw
 
assuming you are using jfx... whenever there comes data in, create a Task that handles it. On setOnSucceed() pull the data and go on from there
 
i was going to make a new controller (some kind of utility controller) but instantiating the controller everytime i want to use its method feels off to me
@motaa
 
He ain't using jfx. He is using Spring.
 
@motaa Task?
 
ye i saw that too late :D
@AceVez Task is JFX specific... ignore my comment :) Spring I have no clue about though
 
6:31 AM
i see
i'll put it inside ApiController for now
 
otherwise you put it into a Thread as a Runnable and keep it in your controller
go "dirty" first and beautify later hehe
 
@geisterfurz007 o/
 
6:46 AM
o/
 
\o
 
guys, what do you think about the comment of using a class here? stackoverflow.com/questions/45134675/sentence-builder-java/…
 
@TheLittleNaruto Heard of it, haven't watched
 
I could use a second opinion
 
6:57 AM
@Tavo a simple class?
 
@Tavo Currently writing ^^
 
yes, just a class storing the subject, adverb... instead of storing it in a map
I disagree, as it overcomplicates the solution. But I would like to hear another opinion
 
i agree with you
and less flexible to
too
 
Understandable... I doubt that there is a huge difference in this particular case though. In either case you have to add either fields in the class or more entries in the Map. Now you can choose which of the ways is the one you like more: Add fields or add entries.
However there is one thing you can do with the Map way better: Loop. Put the keys/requests in seperate arrays and loop over them to shorten the code. So I would go for the map one as well I think
 
at least for me
 
7:00 AM
ok, thanks guys. I did see the point, but what actually made me very confused was that the guy felt so strongly against it that he downvoted the answer
but then again, I still think that people don't know what a downvote means :D
 
Yeah that is really idiotic :D
 
wasn't paying attention to the downvote
he really did it
wow
 
@Tavo You should really ask the guy to explain why he thinks class is the way to go.
 
I doubt he will explain. But I'll ask. Good idea @ItachiUchiha
 
However, if the OP takes the input more than once, I would be inclined to create a List<T> instead of creating a List<Map<String, String>>
 
7:04 AM
yes, that would probably be a simpler approach
but then again, we are speculating. The question was simple. I have 5 inputs, I want to store them and then print them in a certain order
 
Right, according to the question, the answer seems pretty fair to me.
 
the Map solution provides flexibility (changing order, adding more elements) and simple, clean code
a class seems like an overkill to me
 
also, he could have written his own solution, rather than a comment
and argue that his was better
 
Relax private. We don't want to start a war here.
 
7:09 AM
ahah
 
csv parser library recommendation anyone?
 
One needs a library for that? O_O
 
i guess
 
without library what i do right now: getByte > to string > split > split
 
7:15 AM
I read a line with BufferedWriter and split that :D
 
seems like i need to get the content with header
i have no idea how to do that without a library
 
@ItachiUchiha he replied. Pretty much what we had discussed
also, I think he feels very strongly about it :/
 
Yeah he really wants your answer dead...
 
I really don't know why he doesn't write his own answer...
isn't that what SO is about?
if you have a better answer, write it
help people learn
 
7:30 AM
Nah better mock other answers
Seems more reasonable to me
 
these things upset me quite a bit. Why so much hate? :/
 
(>^-^)> <3
 
*^_^*
 
</3
HATE!
 
i don't know why but those faces make me laugh. considering this conversation
 
7:34 AM
<(°-°<) calm down @Julo0sS
 
@AceVez coz you are human
 
@ItachiUchiha oh, am i?
 
@AceVez I went to the cinema last night to watch Kedi. I spent the whole movie like this :3
 
@geisterfurz007 :D The guy convinced me with his class solution :P
I should write his own answer...
 
ahahah
 
7:36 AM
@Julo0sS May I ask you to leave the room? :P
 
/react are you kidding me?
 
@geisterfurz007 oooooor we can make him :P
 
whispers "kick him" at @Tavo
:>
 
spot on.
he explains it good
he should post it as an answer
 
7:41 AM
Hi In Android App Admob Ads are showing but impressions are not showing on admod dashboard. The app has 100+ download and have 10 days before live on play store.
 
@TarunSachdeva Welcome to the Java Chat, the room for Java enthusiasts! Please use a code snippet tool when posting code snippets. If you have an Android question, you're in the wrong place! And remember: this is not tech support! Thanks for visiting and have fun! :D
 

 Android Era with Kotlin and Java

Important: Read dos and don'ts here: androidera.github.io . Ma...
 
@TarunSachdeva just read the room description
 
Ohh Okay
 
I want to "emulate" a serial connection, need to run a function that will do something every X seconds. How would you do it
 
7:45 AM
scheduler?
 
ScheduledExecutorService
Because it is the only thing I know for such purpose xD
 
there's a method called scheduleAtFixedRate or something like that
 
I'm sure there's another one to schedule at a non-fixed rate, but I've never used it :P
 
what about "runnable"?
 
7:47 AM
what about it?
 
You will need a runnable to put in the ExecutorService
You could use a Thread with delay, but that delay will sooner or later not be accurate because it will be executed after runtime of previous commands
 
guys how to run a program if integer has comma in the number
 
Not at all
change integer to double or float
 
something that implements Runnable is just something you can execute in a thread
@SusHill it's not an Integer
 
But integer with comma is contradictory ^^
ScheduledExecutorService executorService = Executors.newSingleThreadScheduledExecutor(); is the declaration of the one I am using
 
7:49 AM
unless they are comma-separated integers, which makes a list/array
 
This will opnly have space for one Thread/one Runnable
 
@Tavo is there any trick to return some value if it has comma
 
@SusHill return double or float
 
@SusHill no tricks. An Integer doesn't have "commas". Look at Double of Float types
 
@geisterfurz007 question doesn't allow me to put number in double or float
 
7:50 AM
define "question"
 
^
Tavo would beat me for using the double colon there O_O
 
what does "decrease"
 
You should rather use () -> decrease() there
 
wait a minute
 
but seriously, Integer by definitions don't have commas: en.wikipedia.org/wiki/Integer
 
7:51 AM
@Julo0sS It is a method of your choice you want to execute
I just took it from a code I have that decreases a countdown every second :D
 
@geisterfurz007 just slap you around with a large trout
1 message moved to Trash can
@SusHill don't post code here. Use pastebin, hastebin or whatever other tool you like
 
that is a question
 
what if you dont like tools?
 
@Wietlol build your own one
 
you misunderstood my question
 
7:53 AM
maybe?
 
i didnt ask "what if you dont like the existing tools?"
 
So you would write a (private) method and access that in the scheduleAtFixedRate (sAFR) method @Julo0sS So if your example is sendPackage you do sAFR(() -> sendPackage(), 0, 1, TimeUnit.Seconds); to run that every second
 
Write a function named maxOccurDigit that returns the digit that occur the most. If there is no such digit, it will return -1. For example maxOccurDigit(327277) would return 7 because 7 occurs three times in the number and all other digits occur less than three times.
 
I asked, "what if you dont like tools?"
 
@Wietlol a computer is a tool
2 messages moved to Trash can
@SusHill last warning
I was very clear before
 
7:54 AM
okay
sorry for that
 
@SusHill if the signature says you require an int, you cannot provide it a double or a float
maybe there are double/float overloads for it
but I doubt it
if it is a method you created yourself, just make an overload with the double or float parameter
 
morn
 
good man
 
Hey Gem ^^
 
7:55 AM
hey @Gem
 
Hey :)
 
question gives a method in int
 
"question"?
 
I can't change that
 
is it a school assignment?
 
7:56 AM
@SusHill Where comes the comma in then?
 
it was a question asked in exam
 
@ItachiUchiha the result of linesmoothing
moisture total longterm data points: 70
moisture post simple: 45
temperature total longterm data points: 70
temperature post simple: 9
relhumidity total longterm data points: 70
relhumidity post simple: 10
 
@motaa...
 
and the question specified that you were not allowed to use floats?
 
7:57 AM
@geisterfurz007 maxOccurDigit(3232, 6) will returns -1
@Wietlol yes
 
@SusHill I highly doubt that this will be a testcase :)
 
then you cannot have decimals
 
Because that makes no sense at all
 
but what does this "(3232, 6)" mean?
 
@Tavo that wasn't code :)
 
7:58 AM
those are 2 numbers
not 1
 
yea I was also saying this but some says theres a way
 
@motaa still an output
 
those are 2 integers
 
a decimal number notation uses a dot, not a comma
what do you want to do with those 2 numbers?
 
you all basterds! (╯°□°)╯︵ ┻━┻
 
7:59 AM
Duh
 
@Wietlol basically what question means is that, we need to return the max occur number of a integer value
 
"a(n) integer value" is not 2 integer values
 
@Tavo ye I thought 6 lines could be fine :D
 
if the numbers in comma then we need to return 0
 
@Tavo ಠ_ಠ Put. ಠ__ಠ The tables. ಠ___ಠ Back.
 
7:59 AM
there are no numbers in comma
 

« first day (2459 days earlier)      last day (2496 days later) »