« first day (2636 days earlier)      last day (2529 days later) » 
01:00 - 23:0023:00 - 00:00

01:05
coughs
01:40
morn
 
3 hours later…
04:43
@Tavo Morning lad!
clears throat
Slaps @OakBot on the head!
@ItachiUchiha Type /help to see all my commands.
Don't argue with me, you shit head
05:04
@ItachiUchiha howdy!
how's it going?
Just bashing Oak with my hammer
05:18
you might do better with and axe though
user9182841
05:28
hi can some tell how can you make a value equal to integer ?
@John 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
user9182841
is someone available . . .!!
@John could you please elaborate?
user9182841
if i want x.value = integer, how can i do that in code
if (x.value == integer)
05:42
^
Zoe
Zoe
^
Morning
Hey
Executors.newCachedThreadPool()
@Zoe howdy
What about amortization of memory/processing over head? Don't you think this is a problem for on-demand creation of new threads based on client-load?
Zoe
Zoe
06:20
Hey @Tavo
07:20
Yes it is morning.
It's always morning on the internet
That's too profound for me before my morning coffee. One second..
Has morning chocolate
07:37
ClashTracker
@SteephanSelvaraj 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
@SteephanSelvaraj Heck of a first thing to say in Java chat, man. Welcome
Hello everyone..
07:44
\o
o/
ccccccombobreaker
08:09
optimistic locking is a difficult concept to explain to the client
The client understands and even accepts being prevented from editing something because it is being "locked" by another user, but nobody expects an update to fail because it is already updated by another user
It makes it look like your program failed, not that you were preventing inconsistent data to be written to the database.
morn
expectorates
08:25
Surprisingly it is morning
Zoe
Zoe
@eFox hey eFox
@Zoe hello
08:52
is talking about Android super prohibited here :) ?
well my guess is that they don't really care unless you're here to ask questions specifically about android
but I'm not a room owner
if we talk about aliens in this room, we can talk about androids imho ;)
I just have an issue that no one ever seems to find a solution to. It's been bothering me for a long time and made me hate working with Android :(
Zoe
Zoe
@someone only if it is android specific
@someone what's the issue?
It is android specific :) https://stackoverflow.com/questions/48183363/why-soundeffectsenabled-false-does‌​-not-work-in-a-recylerview
It seems so simple, yet nothing works
Zoe
Zoe
09:07
You could request media focus, but that would break music from e.g spotify too
What is bothering me is that I've seen some apps who have successfully disabled it
Zoe
Zoe
Could it be an appcompat field?
As in use appcompat to get it to work
I'm actually using Appcompat so no
Zoe
Zoe
Is it properly applied to the recyclerview?
What do you mean by properly applied? in the App theme I added the property. I also added it in the <RecylerView... tag android:soundEffectsEnabled="false"
and also in the items layout
09:16
And the RecyclerView has a property called soundEffectsEnabled?
Zoe
Zoe
You could try calling it programmatically and see if that makes a difference
I also tried that
In the Youtube App in Android TV the sound effects go away when I scroll quickly any idea how did they implement that? They also use custom sound effects. may I could try somehow play a custom sound that is already muted
Or I could implement a custom selection in RecylcerView that does not use focus. It is very stupid that such a simple thing is so complicated.
In situations like these where I don't understand what the heck is going on, I download the source
You mean decompile it?
If it isn't clear from the source, you could always extend RecyclerView and debug it
do they not have the source available for RecyclerView?
Zoe
Zoe
09:27
@Neil RecyclerView is an integrated layout, but specific apps can still implement it in a custom way
I have no idea how sound effects work it is probably something unrelated to recyclerview. When the OS detects a focus change it plays them (At least that is how I think it is)
well admittedly I'm no Android expert, but I do know they have sound bars controlling volume of certain types of sounds
Because a ListView works beautifully when disabling them
maybe it is simply another sound "type" that is muted?
@Neil yes that's true STREAM_SYSTEM is what controls the sound effects
but I can't mute it because some devices implement fixed volume policy
Amazon FireTV does that
IMO the fixed volume policy should only affect STREAM_MUSIC but the implementation is stupid.
so it disables access to every stream
09:33
I wish I could help you, but this goes over my head
I'm gonna try to submit a bug report. Even If they don't think its a bug maybe someone can give me a helpful solution.
sometimes you get lucky and they actually respond
and sometimes you get even luckier still and it's actually useful information :)
@Neil :) Hopefully. My friend has high rep in SO so I'm gonna convince him to start a bounty as well because there are many great android developers here so I might get an answer.
good luck to you then :)
10:30
well you're a lively bunch, aren't you?
I read bunch as "butch"
@eFox Freud would like to have a word with you
A Freudian slip is when you say one thing but mean your mother..
I think Freud wants to have a word with you since you think "butch" is a freudian slip
@wonderb0lt yo dawg!
Yo dawg, I heard you like yo momma so we put yo momma in yo mamma so you can yo momma while you yo momma
Zoe
Zoe
10:39
Lol
Zoe
Zoe
11:14
@Neil occationally
@Zoe seldomly
Zoe
Zoe
@Tavo oftenly :p
11:31
@Zoe from time to timely
Zoe
Zoe
Fromly?
Truly
@Tavo ohai
Zoe
Zoe
I feel sorry for the english language xD
I found this tongue twister the other day:

Betty Botta bought some butter;
“But,” she said, “this butter's bitter!
If I put it in my batter
It will make my batter bitter.
But a bit o’ better butter
Will but make my batter better.”
Then she bought a bit o’ butter
Better than the bitter butter,
Made her bitter batter better.
So ’twas better Betty Botta
Bought a bit o’ better butter.
12:00
wheezes
12:19
gives oakbot an inhaler
12:33
@Neil izi pizi
Fuzzy Wuzzy was a bear. Fuzzy Wuzzy had no hair. Fuzzy Wuzzy wasn't fuzzy, was he?
Zoe
Zoe
@Neil easy
@Neil easy :D
Hmm
How much wood would a woodchuck chuck if a woodchuck could chuck wood?
izi pizi
How much wood would wood a woodchuck chuck if wood a woodchuck could chuck wood?
perfectly fine
Peter Piper picked a peck of pickled peppers.
A peck of pickled peppers Peter Piper picked.
If Peter Piper picked a peck of pickled peppers,
Where's the peck of pickled peppers Peter Piper picked?
12:48
Now we know we're bored
The sixth sick Sheikh ate six sick sheep
 
1 hour later…
14:02
Hi everyone
Does anyone know how to "hide" null value nodes on a JavaFX linechart? When I add a null value on a series, the chart behavior is to link previous node to next node, just as if there was something at the null time on the chart.. but it should not, there should be an empty space
You could just recreate the chart without null values
you need the actual space where it was?
Hi
Does java.nio provide API for a sync IO as well?
@Neil yes I do
I need to see on my chart that, at time X there was nothing
When I put things on my chart, it goes fine till time X. From time X to time Y i have null values, they DON'T appear. That's fine. At time Z I start to have new values again, actual behavior is that the chart traces a straight line between last X value to first Z value...
I'd like the chart to keep empty space between last X value and first Z value...
I don't know if that's possible
it's a line chart afterall.. it wants to draw a line between the points :)
maybe if you used two series?
or one for each segment?
might be a pain but it's one solution at any rate
i would try that just to see if I get the results I wanted
you could probably change the color too
what I actually tried is set node visible (false) on each node with null values, but that does not solve the problem since it still traces that "imaginary" line
14:17
1
Q: JAVAFX LineChart Hide/Show lines

to4dyIs it possible to show/hide certain lines in a linechart by click on the legend or does it have to be implemented manually? Sincerely.

you can do this
you have two series, one is "hidden" series which isn't shown
I don't get it
You can plot multiple series on a line chart
they can have whatever color you choose
you plot a 2nd series on top of the first whose line is invisible
so it looks like there is no line connecting them
I think that's what it's doing anyway
confusing to me.
actually I have my series, 3 series on a chart
You just need to create a 4th to draw over the places you want to be hidden
you have to imagine how it's drawn.. it draws the axes and the background if there is one. It then draws the series one at a time and one point at a time
so, 1st series goes to 1:00, 2nd series start at 1:00 and goes to 2:00 and 3rd goes from 2:00 to 3:00. at 3:01 my 1st series goes again with new values, and default it "draws over" 2nd & 3rd series
what if there is no background?
14:26
doesn't matter if there is a background
it's just fine tuning the control you have to be able to draw all the lines, essentially
I don't think there's a "setLineVisible(false)" method if that's what you're looking for
@overexchange Doesn't look like it
However the java.nio.channels package seems to support asynchronous IO for example through implementors of AsynchronousChannel
Haven't worked with the java.nio package so I'm just guessing based on the JavaDoc :)
14:41
I've only used java.nio.Charset honestly
@Neil Not sure I understand
that means that I should put the "hiding" line over the 3 series at particular places only
that cannot work
@Julo0sS Actually I misunderstood the solution initially
You could convert every line in a series containing lines you wish to render invisible to an individual series
Hmm
Reason am asking is..
or rather every segment.. you wouldn't have to do it for every line, just every group of lines that are visible and/or hidden
@Neil turn every segment in a series? oO
14:50
Non blocking IO always fits into this programming model, no matter whatever language or package you use....
-1
Q: Non blocking IO - Programming model

overexchangeIn non blocking IO programming model, a thread blocked on data available channels, as shown below, in python, while True: readers, _, _ = select.select([sys.stdin, sock], [], []) # blocked select() for reader in readers: if reader is sock: print(sock.recv(1000).deco...

Zoe
Zoe
@Neil easy :D
Wonderbolt, I completed JCIP part 1 and 2
It was a good journey
Part 1 was very interesting
@Zoe ಠ_ಠ
@Julo0sS Just a suggestion. If the solution stinks for you, you're welcome to try out your own solution ;)
Zoe
Zoe
@Neil easy :D
Part 2 was about structuring concurrent application that most programmers know
Part 1 is like a privilege to know and learn
Btw, I will be in Canada, by end of this month
Not sure, how this winter would pass on
14:55
@Zoe ಠಗಠ
Zoe
Zoe
@overexchange some times I wonder if you run on a seoarate thread
@Neil izi pizi :D
It's very easy once you get the flow in it
I'd have to hear you try to know for sure
ರ_ರ
Zoe
Zoe
Add me on discord then :D
Sorry, I did not get u
If I weren't at work, I might even double dog dare ya to
Zoe
Zoe
14:59
@overexchange welp, you tend to pop into conversations and usually say something on a completely different topic but that (at least to me) looks targeted at the existing discussion
@Neil what timezone are you in?
Rome o'clock
@Neil I appreciate the suggestion, but I'm really confused with it...
@Julo0sS Each series in the line chart can have its own color..
So make a series for each invisible line (and consequently a series for the drawn points inbetween) and give it a class whose color is invisible / not drawn
maybe if you told me what you don't understand I could elaborate..
I'll give it a try now
I wouldn't be thrilled about that solution either, because it isn't that clean
But it's still better than writing your own LineChart class
15:10
@overexchange good for you
I haven't killed myself at work today so I'm counting that as a success
You should...
Douglas Schmidt has also placed good lectures on concurrency
He is a concurrency and parallel ism expert
@Zoe that is why prefixed as Btw... otherwise it would be too late to inform before moving to Canada
Honestly java will never be as close as python. It is for job reasons am making such decisions
I wish, I could only stay in C and Python world
but enterprise apps are rarely written in python
Zoe
Zoe
@overexchange earlier than that
oh the jcip?
Zoe
Zoe
the non-blocking IO
Hmmm good question
reason is am good in nio using C and python
Zoe
Zoe
15:25
@Neil europe? Me too :D
now what the hell is nio in java? Because my next learning is ....
To read a book on java IO, nio 2 by Jeff blah blah
before jcip I completed java IO package...
before landing in Canada, I need to complete that book
Anybody read a good book on nio?
Zoe
Zoe
Yes
It's called "documentation"
U mean javadoc?
Am not sure, what documentation are you referring to?
15:38
Is there a way to attach a label beside a TextField in JavaFX?
So I won't need to instanitiate 2 things for a number input field
Yay europe!
wheezes
May we not all die a fiery violent death! Amen
16:01
Nio.charset is for Unicode
17:00
The sound of crunching adds to the pleasure of eating chips. Snackers who eat chips with headphones on report becoming bored with chips more quickly. (source)
17:16
@Neil I came to a working solution considering your suggestion. thx
 
2 hours later…
19:17
groans
19:32
morn! :D
Zoe
Zoe
@motaa Good evening :D
hey @Zoe :D
Zoe
Zoe
Hey @motaa :D
:D
Zoe
Zoe
:D
19:34
I really am struggling in whether I should start to develop the front end first or the back end first :D
Zoe
Zoe
What about both?
the problem is that I don't think that I can wrap both into one master thesis
we only have 5 months :D
Zoe
Zoe
You don't think, but that doesn't mean ya can't :D
true :D
back end would be sth in spring
and front end will be web
Zoe
Zoe
ah
19:48
@motaa first make the functionality, then make the website that calls the service for halpz
what are you making?
it goes into the direction of airbnb
the front end will definitely have a unit that is based on Mapbox overlayed with information from a database
for those who don't know mapbox :D
20:13
How can I detect the transition of a value in Java? The value is streaming online. (value range is 1, 2, 3, 4). I want to detect a change from 4 to 1
Zoe
Zoe
keep a duplicate of the value and check for changes between the two
@Zoe but the old value would also be updated
observe the value
Zoe
Zoe
if you have value x, create a vale xA that's linked to x (meaning when x changes, check if they have changed by comparing the two and update it)
20:17
I'm rather n00b. I should create a doubleObserver?
you have a value streaming online and have no idea on how to implement an observer? :)
@motaa Actually I have something like 10 listeners...but I'm lazy to check out how did I do it
I mostly use book examples and SO questions
:)
Zoe
Zoe
Google it
@Zeta.Investigator at one point of your program the value gets changed
@motaa Yeah I was reading that...I hoped someone provided a simple answer
20:23
your stream is running in a separate thread I guess
@motaa There is a COM port listener. Data arrives in. I process it and show it in some charts (3 stages actually)
you got an arduino on that COM? :D
@motaa You got that :)
HC05 Bluetooth SPP profile to be exact
haha cool! I did sth in javafx and an arduino too for university
@motaa Yeah I know, someone mentioned it, and I asked you sth about that about a month ago
@motaa While we are at it, actually the plots update slowly as the size of charts increase. I maintain a constant size of Series<>() by deleting the oldest entry
All my processing and updating GUI (charts, textFields) are done in a Platform.runLater()
20:27
@Zeta.Investigator mine looked like this :D
@Zeta.Investigator I implemented a Douglas Peucker algorithm for the long term charts
@motaa Most of my knowledge comes from Dea Heckler's Intro to JavaFX by examples book
At the end of that book, there was an example of plotting some sensor values
are you reading your sensor data asynchronically?
They also update GUI and do all processing in a single Platform.runLater() call. I guess this is the reason of my software's slowness when data-rate is high?
:40759774 private void setUpSerialListener() {
        listener = (ov, t, t1) -> {
            Platform.runLater(() -> {
                String[] packet = t1.split(Serial.SEPARATOR);
                System.out.println(packet[0] + packet[1]);
                if (packet[1].charAt(0) == '^') {
@motaa Is using a listener count as asynch?
do you know de wey
i can show you de wey
@Zeta.Investigator well I created my own ComConnector that handles all
20:33
@motaa Nice:)
and made it extend the Task-class
@motaa I'm using a popular Serial (the one Arduino itself uses I think, jSerial?)... The problem is, once I get the data packet, I do all processing and updating charts and GUIs in the single Platform.runLater()... Do you think this method causes delay and latency?
@Zeta.Investigator I don't see all of the Platform.runLater
check this @Zeta.Investigator paste.ofcode.org/37jvu6EKPqHyZi5rcT6kADT
this is my simple com-connector
@motaa Its long...verrrryyy long! :(
Using currentMillis() as a stopwatch, all my codes in Platform.runLater() takes ~15 ms...Is it much?
as you can see in line 59, I use the updateMessage method from the Task class
@Zeta.Investigator can't tell when I don't see the class :D
and in my controller I obviously have a reference to my ComConnector
this.connection = new ComConnector(port, baud);
and the important part
connection.messageProperty().addListener((o, oldv, newv) -> handleData(newv));
public void handleData(String sensordata){
//execute a new thread to process incoming data
executor.execute(new DataHandler(sensordata));
}
the executor here is a chached thread pool
@Zeta.Investigator this is the private DataHandler class paste.ofcode.org/zjrsmHTVhfj4axPYDViXfq
java is not de wey
spits
That was the jssc Serial class (like your ComConnector Class)
@motaa Seems like you also do your things in a Platform.runLater()
for(Sensors sens : sensors){
    			if(sensor.equals(sens.getValue()))
    	        	sensordata.get(sens).add(value);
    	        	Platform.runLater(() -> addDataToSeries());
    		}
well the good thing is, you are working with jfx Properties
@Zeta.Investigator no I am just adding the prepared data to the Series
@motaa Actually Dea-Heckler works with Properties (I learned that from that book) :D
20:50
that is good so you can bind stuff
@motaa Thing is, I'm also using openCV and webcam in the same application. That stage also uses the data coming from the serial port
And I also control a varying-balance MediaPlayer in the same Platform.runLater()
I fear the problem of "race condition" is showing itself in my scenario :(
@Zeta.Investigator at what rate is your arduino sending data?
@motaa 50 hz
Bluetooth SPP (COM port) link is 50 hz actually
Is it too fast? (~20 ms)?
no its not
well javafx updates the gui at 60hz
does your code compile?
@motaa Yes. If I make my Series (about 15 of them) lighter (by reducing their size), GUI seem to update faster
I really think that I should not do all my processing + GUI codes in that Platform.runLater(). I guess I should create another Runnable (I'm not that pro and I'm not sure if that solves my problem)
21:02
this is strange to read :D
String s = sb.toString();
if (s.endsWith("\n")) {
line.set(Long.toString(System.currentTimeMillis())
.concat(SEPARATOR)
.concat(s.substring(0, s.indexOf("\n"))));
sb = new StringBuilder();
@motaa My data packet from Arduino-side comes like this: ^%d,%d,...%d\n
because you use sb.toString and later sb = new Stringbuilder()
@motaa I guess that creates a clear string builder
It is not my code ( it is JSSC, a rather famous Serial Class for Java)
@Zeta.Investigator in the method you didn't declare a StringBuilder but you did as class variable
that's why I was asking if it is compiling since I did not see a declaration in you method :D
@motaa But in line 17, sb is created
Yes, It treats sb as an instance variable
21:11
@Zeta.Investigator thats why I always use this.sb to refer to the class variable :)
I am receiving the data, the console prints are fast enough...
can you paste your controller class on pastofcode?
@motaa Actually I can't. It's 2000 lines and ugly mess anyway :(
valStateProperty.addListener(new ChangeListener<Number>() {

            @Override
            public void changed(ObservableValue<? extends Number> observable, Number oldValue,
                    Number newValue) {
                if (oldValue.doubleValue() == 4 && newValue.doubleValue() == 1) {
                    count++;
                    System.out.println("transition, count = " + count);
                }
            }

        });
Seems like I implemented the transition detector...
21:28
@motaa Thanks for sharing your experience :)
Now Imma put an observer over that count variable lol
But I could have used state-machines, couldn't I?
Zoe
Zoe
@ndugger it sure beats JS
21:51
^
@ndugger java is love, java is life
Shouldn't you be sleeping?
me?
why?
its only... 23:49
22:48
Because you are 8
if I am 8, will you be 4?
ok, then no, im not 8
Your ageProperty is not bound to any other ageProperty.
yes it is
22:49
Just because you are 8 that doesn't men anything
i redeclared it
You are too young for that
i can redeclare anythin
i use jabba
on a side note, you happen to have experience with finite automatum?
and implementing an engine for it?
@geisterfurz007 ?
First yes because I just wrote an exam about it, second not really
-_-
im kinda lost on how to implement it
i did for some simple expressions, but now i get to more complex ones, it starts falling short on functionality
22:55
Map<String, Map<Character, String>>
0.o?
coughs
You shut up Oak
Map<CharSequence, Map<CharSequence, CharSequence>>
save current and index of input + string representing acceptances states
get(currentState).get(inputChar) -> new State
put in while until word out of chars
22:56
is that supposed to be related to me? or are you talking about something of yourself?
Finite automata, no?
implementing a parser engine
slightly more complex than that im afraid
A parser is simply a finite state machine
01:00 - 23:0023:00 - 00:00

« first day (2636 days earlier)      last day (2529 days later) »