« first day (3555 days earlier)      last day (1400 days later) » 

12:03 AM
picks nose
 
 
6 hours later…
6:03 AM
reads a book
 
 
3 hours later…
9:25 AM
morn
 
morn
 
morn
 
in a concurrent environment would one still use a concurrenthashmap or synchronize on the map when one knows that keys will never change and thei value is an AtomicInteger?
would a normal hashmap not be sufficient in this scenario?
 
a concurrent hash map is only useful if you have writes and reads or writes and writes possibly at the same time
when reading only, it should be fine, iirc
you could always just test it ;)
 
@motaa play safeā„¢
both have their own strategies to prevent concurrency related issues. And "keys will never change" might become not true in the future, if modifications got made around that spot
or put a readonly wrapper around it
 
9:48 AM
@KarelG good point
@Wietlol how would I test it? In my case I have a hashmap that stores locations and their capacity as an atomicinteger
now I would have to make a scenario where 2 persons are requesting a spot at the exact same time and I only on is available
 
@motaa like that?
 
Zoe
1 message moved to Trash can
Paste site
 
dang it Zoe
 
@Wietlol :D well you are the boss :P
dang it Zoe! :P
 
Zoe
9:53 AM
:p
 
haha
 
that message move is justified tho
 
the --> operator was new to me though ^^
 
*in Seagal's voice* You guys think you're above the rules. Well, you ain't...
 
--> is fancy, yes
 
10:01 AM
ah I see now that it isn't an operator :D
 
it is the "down-to operator"
 
isn't it just -- and >? :D
 
ofcourse it is an operator! how dareth thee!?
@motaa ssssh, keep it down
 
:P
 
no one knows
 
10:03 AM
→
 
hrhr
it works though :D
I mean the concurrency seems to work
 
ye, the code is expected to count it to 10000, 16 times, so 160000 in total
which is the correct answer
however, when using map.put("test", ...); it breaks almost immediately
with concurrency exceptions
 
ye
 
10:18 AM
@Wietlol then the developer that does that would know that there is a reason for that :P
 
in my keys dont change because they represent locations that are fix throughout the simulation
 
wait... not concurrency related exceptions :D
a HashMap appears to not have any concurrency issues related to overwriting
probably only with structure mutations
now I am confused, I dont know how to börk hashmap
 
haha
hashmap 1 - 0 Wietlol
 
oh no
 
10:26 AM
HashMap over 9000 - 0 Wietlol
 
hihi
 
HashMap keeps surprising me
I use a linked list
I think the most common case for me is in my logging framework
 
I rarely use it
 
it is a filtered logger, which filters logs but keeps them in memory
 
but often I could also go for sth else
 
10:28 AM
when the filter changes (or when the filter parameters change), it iterates over the previous logs and also logs them if they do pass the filter now
so, for example, when an error occurs, I lower the log level to trace, so all logs related to that error will be logged as well
the implementation for that collection of logs in memory is a linked list
 
ye there I see a good fit for it
 
I need node removal from the middle (on iteration) and appends on the end
and preferably in order
so, yea, I couldnt find a better collection
maybe I should make a twitter account and thank Josh for making it
 
haha
gogo :D
 
10:52 AM
@motaa that's' because of its contract
 
Hello, I need some help. I'm stuck here for 3 days now.
java.lang.NullPointerException at jdk.compiler/com.sun.tools.javac.comp.Flow$FlowAnalyzer.visitApply(Flow.java:1370)
 
@KarelG hehe I am currently watching this youtube.com/watch?v=Y4XkWSAm2XU
 
I have tried Java 11, and 14
This is working on Java 8 though
 
its about Array Linked to a List, the full story! by José Paumard
@SajalGupta didn't the Flow api got introduced with java9?
 
The project is working perfectly on Java 8. i'm trying to upgrade it to Java 11. But facing this error
 
10:57 AM
maybe you just have a mixup in dependencies
 
I think this has something to do with maven-compiler-plugin.
 
17
Q: java 10 compilaton Null Pointer Exception

Akshay DarekarI recently installed jdk10. I was doing normal code and it is not working. Am I doing something wrong here? Please see the code and Exception stacktrace. As far as I understand there should be no reason for such behaviour. import com.bean.College; public class Student { interface Club { ...

 
If I use maven-compiler-plugin 3.8.1, I get this error. But if I use 2.3.2, it compiles, but only a few classes.
I cannot update parameterizedType. It is in more than 10,000 places in the project.
 
arent most of the sun packages removed in Java 11?
 
USM
Hey Guts
*Guys
 
11:00 AM
hi
 
@PeteYthong Welcome to the Java Chat, the room for Java enthusiasts! I'm Oak, one of the room's bots. If you want to ask a question, just ask it and someone will respond if they feel like it. But remember that this room is not a help desk or tutoring service! If you want to just hang out, then welcome aboard! Oh, and the room's full list of rules are posted here.
 
USM
why do we put @CrossOrigin in spring boot rest api?
what is significance of it?
 
@motaa <groupId>com.sun.jersey</groupId>
This could be the issue?
 
USM
and what is CORS
 
Cross-origin resource sharing
is a mechanism that allows restricted resources on a web page to be requested from another domain outside the domain
 
USM
11:05 AM
Ahhh
In our Dev environment , for a PUT API , it was working
But in Production it was not.
 
new user to the rescue!
 
USM
getting 403 Forbidden exception
@wietlol
Green Lion.
eco freindly lion.
carbon free lion.
Ignoring lion.
 
yep
 
USM
Who did you vote for moderator? @Wietlol
 
I didnt
 
11:17 AM
Hey all, quick design question. I'm designing a panel with different types of buttons; momentary, toggle, and a few custom types like a button you hold for a few seconds before it actions.

I have a main button class, would you make a subclass for each type of button or would you have a parameter in the main button class to specify a type from an enum?
 
@JacobWood Welcome to the Java Chat, the room for Java enthusiasts! I'm Oak, one of the room's bots. If you want to ask a question, just ask it and someone will respond if they feel like it. But remember that this room is not a help desk or tutoring service! If you want to just hang out, then welcome aboard! Oh, and the room's full list of rules are posted here.
 
I would make subclasses for most of them
a toggle is not a button tho, it is a checkbox
or even a radio button (which is not a button)
 
@JacobWood well I would use less inheritence and use more behaviour classes
 
Cheers, they're actually physical buttons
 
USM
@motaa Fat guy
 
11:19 AM
more like strategies
 
11:34 AM
@USM others would say that I have a lot of muscles
 
USM
@motaa Don't listen to the blind people.
 
 
2 hours later…
1:10 PM
posted on July 17, 2020

archive - contact - sexy exciting merchandise - search - about ← previousJuly 17th, 2020nextJuly 17th, 2020: Hey, I've got a mailing list for SECRET PALS! If you'd like to be a SECRET PAL, baby, now is your chance. I only send out a message like once a month!– Ryan

 
 
2 hours later…
3:22 PM
1
A: How to do a recursive search for a word in the Boggle game board?

leigeroAssuming you have a word list available somewhere, likely stored in a Trie data structure (I've created a working Trie with comments on improving its efficiency here). Once you have a Trie structure (a prefix tree) which allows you to search for words based on their prefixes, you would want to u...

 
Zoe
ok
 
Wouldn't this lead to reading the same letter more than once, which isn't allowed?
 
 
2 hours later…
5:37 PM
hi java codes
 
@YusufT. Welcome to the Java Chat, the room for Java enthusiasts! I'm Oak, one of the room's bots. If you want to ask a question, just ask it and someone will respond if they feel like it. But remember that this room is not a help desk or tutoring service! If you want to just hang out, then welcome aboard! Oh, and the room's full list of rules are posted here.
 
 
hi java friends
 
 
5 hours later…
Zoe
11:03 PM
:GWChadThinkEyes:
 

« first day (3555 days earlier)      last day (1400 days later) »