« first day (3033 days earlier)      last day (2132 days later) » 

00:00
"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)
 
3 hours later…
03:23
reads a book
 
2 hours later…
05:36
Can anyone help me understand this? Java 6 docs for ConcurrentHashMap reads : Retrieval operations (including get) generally do not block, so may overlap with update operations (including put and remove). Does that mean it is not thread safe? link : docs.oracle.com/javase/6/docs/api/java/util/concurrent/…
Zoe
Zoe
05:48
Why would you use Java 6?
But yeah. You can theoretically get an object while a set call is in progress.
Unfortunately I am updating a legacy code written in Java 6
Mornin'
> However, even though all operations are thread-safe, retrieval operations do not entail locking, and there is not any support for locking the entire table in a way that prevents all access. This class is fully interoperable with Hashtable in programs that rely on its thread safety but not on its synchronization details.
06:07
@geisterfurz007 morning! Which means it ensures deadlock safety but not Synchronization. Am I right?
06:17
That would be my understanding, yes.
 
1 hour later…
07:24
Ok I think if I used java 6 I will keep running into issues. Should I back port it from java 8? Has anyone done this before? Is there any basic tutorial to do so?
Zoe
Zoe
No one has ported your code to Java 8, no.
07:53
@TBag what they mean by "block" here is that the thread making the call doesn't have to generally wait in order to read a value
generally you'll use a read lock for reading and a write lock for writing. A read lock, contrary to a write block, is compatible with other read locks, so nothing is blocked if they're all reads
once a write happens, then even the read locks get blocked, but that doesn't happen often also because the write operation is probably fairly quick about it
it is most certainly thread safe :P
08:13
squints
goood morning
mornin'
Who wants a headache to last a lifetime
a maths headache lol
The Fibonacci sequence is encoded in the number 1/89 Dont @ me, am not here to argue hahahaha
Yeah nope, I am out of this :D
08:24
Good strategy but i know you are going to test it
Of course I do :)
haha,me thinks @neil is currently scratching his head in awesome wonder
@objectiveME I have a hard time visualizing what that's suppose to mean :)
@neil hahaha, i know how to stoke your curiosity
@Neil Put 1/89 in your calculator O-O
I get to 34; after that I am too unconcentrated to continue ._.
08:29
If you take the difference between each fibonacci number, you'll get the fibonacci sequence :P
Maybe that seems obvious to some of you, but I found that fascinating
Oh yeah, i observed that as well
Space and the deep seas are not the only peculiar things
1/89 is some alien stuff
@objectiveME Have you seen 1/109?!
@geisterfurz007 wow, haven't seen that. hahaha, i am just gonna leave this here inverse.com/article/… and if you dare say i read this article, then consider yourself cancelled.
> “If I’m right, the universe is just like an elaborate version of the digits of pi.”
Mkay.
morn
08:37
morn
Lets drop maths all together, its not sparking joy and its the recommended way according to Marie Kondo
Zoe
Zoe
@geisterfurz007 seems legit
@objectiveME I've seen that (maybe you gave it to me?)
/cat
Kind of crazy to think in those terms, but I suppose it isn't much different than say, simulating the interworkings of a human brain
me on mondays at work
if you could do that, than even if it is deterministic, you're potentially processing what would be the equivalent of that human brain wondering where he is what he's doing
@Neil yes i did. i am beginning to understand why Stephen Wolfram was saying that
calls asylum
08:56
Hi Everyone
@SameerPradhan 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
Good day too
@SameerPradhan I think the file must be written sequentially
that said, I think you could still make it work in parallel assuming you kept the bytes to write in memory
Please don't use chat as fastlane for your questions. Instead, wait a few days before asking here to give the people on the main site some time. If we want to answer questions there, we will look for them on our own.
08:58
okay sorry. :-)
just do it in two passes.. first pass is to zip and convert to bytes which can be done in parallel
the second pass must be sequential and simply takes the bytes and writes it
Zoe
Zoe
09:37
2 messages moved to Trash
@geisterfurz007 tr4sh3d uwu
why are oaks gifs not getting auto editted anymore?
@Hans1984 What do you mean? The cat falling into the box?
yes
shouldnt the gif link be edited
It'd edited for me.
F5?
indeed cache
f5 solved it
09:41
Schrodinger is hard at work
Yeah the link was edited and not edited.
In a superposition between both states
.
.
Z̴̡̠̗͇̜̦͎̥̍́̊̂̊̍ò̶͙͕̜̤̦̪̟̾̓͂̽̂͒e̢̫̩͖͓̔̉̽͑̓̿̕̚͝ i̛̲̤̳̩̺̤͍͇̮͋͒͒̕ͅs̶̢̳̘͍͕̺̬̖̝̣̉̈̄̓̎̈́͝ a̧̜͇̖̦̱͇̅͊͋̽͜͝͞ ņ̶̠͕̣̥̼̠̃͂̕͢͠͠ͅȭ̶͓̹̥͎̱̅̈̾̑̓̉͝o̞̫̥͖͍͖̎̎̐̄̂̈́̿̚͢b̡͍̺̯̝̻͕̣͌̄̉͊̚͟͢͡ l̶̳̼͚͚̄́̓̀̏́̏͂͟͢͞͠o̧̡̙̲͓̮̥͆͋͐̆̀͑l͚̖̥̤̦͇͇̣̼̎́͋̓̋̒́͘̚z̛̹͉͇̯̭͙̪̦̭͉͊̃̆̒́̀̄̕͠
.
.
There are websites that I should never find...
she is indeed
like youtube
09:43
Exactly!
Worst thing! 1 in the morning and I am just about to go to sleep after one last video...
Suppose I have a table of msg_notif_logsand msgs. The link between the two is msg_id. msg_notif_logs has customer_id, msg_id and view_date. msgs has msg_id, msg_body. If I want to view those msg_bodys that have the same msg_id between these 2 tables, I should use INNER JOIN. But the question is, is there a querry to first INSERT records into msg_notif_logs if msg_id is not found in it? Should I use two queries, first INSERT, then INNER JOIN ?
Youtube: Will you look at THAT! This PilotsEYE.tv video that you already watched 3 times that has 3 parts and takes an hour to watch. I just found that! Wanna watch?
And it never stops...
yeah it never stops....never..
09:45
@Zeta.Investigator what are you trying to accomplish?
Generally if you have the data you're inserting, you don't need to follow up with a query
@Neil msg_notf_logs should contain records of msgs seen by that customerid
Problem is, at first, msgs_notif_logs is empty
I... I cannot remember that I wrote "And it never stops..."
09:47
@Zeta.Investigator well option 2 is to do a left outer join starting with msgs
That is... Cweepy ._.
@Hans1984 youtube endless hell
left outer join msg_notif_logs means you'll get the message body, even if a record with the same msg_id doesn't exist in msg_notif_logs
09:47
^^ inverted geis
@Neil LEFT OUTER JOIN, also INSERTS if not found?
'_' disturbed geis
xD
-_-' sigh geis
@Zeta.Investigator they're two separate operations.. if you're going to insert anyway, then do then follow up with a select with inner join
if you're not going to insert, select with left outer join will grab the record just the same
there is no "insert if doesn't exist" in standard sql, but many databases support something that lets you do that just the same
@Neil It's more complicated than that. I should first do an INNER JOIN. if that is empty, I should insert, then return what I inserted
09:50
no point doing a join.. if you're checking to see if you should insert, it should be enough to do "select 1 from msg_notif_logs where msg_id=?"
@Neil yeah that was what I thought. Someone said : go do it with a JOIN
I mean you could do that, but you'd be checking if it exists in msgs and doesn't exist in msg_notif_logs
Also don't you guys forget SQL commands? I'm n00b but always google every command
If someone in my company tells me how I should do something regarding development, chances are that they have no idea what they are talking about.
it took me a while to remember the exact syntax for insert and update honestly
09:52
@Zeta.Investigator I always google update and insert. Every time :D
You guys are aware there's an SQL room?
and occasionally I still need to check syntax for certain select criteria clauses
@geisterfurz007 No, he was trying to give me ideas since I've not taken DB class
Oh, ok! My point still stands :)
@JennaSloan so discussing universe in the digits of pi is on-topic but SQL isn't?
09:54
@Neil Does "discussing universe in the digits of pi" have its own chat room?
I could create said chatroom if you like. I don't see how that would change the relevance of that question
I'm writing a server-side app using JAX-RS. How do you test the functionaloty of your REST-ful API? Do people use postman manually or automate it using scripts? I'm thinking should I write a python client for regression test of my API?
My API does not have Create and Delete (of CRUD) for some REST requests. If I were to write an independent python client, I should also implement them for data-stubbing
@Neil I don't think I said anything regarding whether or not something is on-topic.
@JennaSloan Fair enough
@JennaSloan @Neil Sorry guys. I didn't know that room exists. I'll ask it in there next time :D
10:04
I mean you'd probably get better responses for SQL questions if you ask in the SQL room.
It's not nearly as lively as this room though
@JennaSloan ok :)
Here's a link to the SQL room info: chat.stackoverflow.com/rooms/info/11391/sql
Zoe
Zoe
10:19
@geisterfurz007 no u
teeeheee
Jan 21 at 11:54, by Gemtastic
Cool story bro
Zoe
Zoe
@geisterfurz007 [ ZoeBot ] Your Zalgo is useless uwu
@Zoe No u
pew, pew, pew
Zoe
Zoe
SHOTS FIRED! TARGET STILL ALIVE!!
Try me, I'll send my ranger at you :squint:
Your what?
10:31
which one? pink or blue?
Zoe
Zoe
@Neil pink one obviously uwu
the blue ranger was supposed to be the smart ranger
Zoe
Zoe
The Ranger is one of the standard playable character classes in most editions of the Dungeons & Dragons fantasy role-playing game. Rangers were hunters and skilled woodsmen, and often lived reclusive lives as hermits. == Publication history == === Creative origins === The ranger was primarily based on the character Aragorn, and the Rangers of the North of J. R. R. Tolkien's Middle-earth mythos, as warriors who use tracking and other wilderness skills to hunt down their enemies. The AD&D second edition handbook mentions several other inspirations from myth and legend, such as Robin Hood, Jack the...
@Neil pff
dex > int uwu
ah but gandalf had the intellect of the group did he not?
he was easily the most powerful :P
Zoe
Zoe
yeah, but gandalf was an exception
Just look:
10:37
One thing that really bothered me was the way Gandalf behaved at the beginning
Zoe
Zoe
$ jar tvf Gandalf.jar
    gandalf/GandalfException
And now I can pull even more anger on me saying that I neither watched Lord of the Rings nor The Hobbit and didn't read the books :)
If you suspect for a moment that the ring you're seeing is the endgame, world ending, nuclear weapon, if you suspect there's less than 1% that it's true, but it might still be true, he should have taken Frodo to the elves immediately before investigating further
Zoe
Zoe
@geisterfurz007 You should watch it uwu
Only by luck did Frodo not fall to the Nuzguls at the very beginning and the entire war lost.
10:39
Why the feck does my WildFly use H2 instead of the MSSQL driver I gave it?! Or am I just misinterpreting the stactrace containing all org.h2?
paste.ofcode.org/36rRe4VnFmp8DFEXcpxKZ4A That's the end of the stacktrace.
Zoe
Zoe
DEUTSCH! >.>
Not my database.
paste.ofcode.org/39RMFUbsEnQ2TmBsgGrTCku And that is what it says when deploying.
So I don't understand where the h2 comes from but I assume that is the reason the table is not found because the wrong driver is used.
@MadaraUchiha and why didn't they use the eagles to drop the ring into mt. doom? ;)
@Neil Eagles could only access Mordor after Sauron fell
Actually... I think I know why....
10:47
they can fly.. not like a wall can stop them or something
I didn't know why.
I think the idea was that sauron was preoccupied with gandor thinking that was attempt to destroy the ring
@Neil Magic
what I don't understand is that they basically did a suicide march against Sauron's army in the fleeting hope that Sam and Frodo were making it to Mt Doom
were they that sure that all was lost if they couldn't complete their mission?
Magic applies for my case as well. I put the same stuff I had in my persistence.xml in a datasource, restarted and boom; works.
Weird stuff.
11:06
yep, magic is nice
Zoe
Zoe
11:23
@geisterfurz007 no u
@Neil You mean read-write synchronization happens with ConcurrentHashMap?
@TBag I mean if you see the words thread-safe used, you don't have to worry about concurrency issues
@Neil But they have also stated that read write overlap may occur. Which means it says more than 2 threads can access it at the same time (that too read-write!). And hence it is not synchronized. idk the docs seem a bit vague to me.
11:38
@TBag if what you're reading/writing lies in separate keys, there's no issue
I think the only issue comes from reading a key when that same key is being written by a separate thread
@Neil Hmm.
11:58
Hello, I am trying to understand how JSP and Servlets work. In my JSP i have the following <td><a href="/delete?id=<c:out value='${contact.id}' />">Delete</a></td>, meant to delete a row in a table. Now I am now sure how I can invoke my Delete Servlet. I have tried @WebServlet(name = "Delete", urlPatterns = {"/Delete"}) but the Servlet is not being invoked. How do I invoke my servlet?
Grover Cleveland was the only president in history to hold the job of a hangman. He was once the sheriff of Erie County, New York, and twice had to spring the trap at a hanging. (source)
@JWizard my guess is that your urlPattern is specifying that only /Delete is sufficient
@Neil Okay, but I am not sure how I can make it accept value='${contact.id}, thats where I am getting stuck
Try just with @WebServlet("/Delete")
Also, you should try with just /delete actually to see if it's a problem with the parameter itself or configuration
@Neil Okay, thanks let me try that
12:13
@Neil no u
@geisterfurz007 no u
You cannot no u a no u!
no u
sup javaites
@geisterfurz007 I just did tho o_o
That was invalid.
12:17
:(
12:50
posted on February 11, 2019

archive - contact - sexy exciting merchandise - search - about ← previousFebruary 11th, 2019nextFebruary 11th, 2019: Thank you to everyone who came out to the SF-adjacent events on Saturday! I had a great time, even if one of them was SLIGHTLY chilling.– Ryan

@Neil Using /delete I am able to execute the Servlet, but when I append ?id=<c:out value='${contact.id}' /> it s throwing an error. Is not there a way of "making" it know that I am passing parameters?
@JWizard well did you check what the generated page shows?
It shouldn't give you any hassle about that
if you had done /delete/id, then that changes the URI, but it isn't really changing the URI to add parameters
13:05
@Neil I am getting this error The origin server did not find a current representation for the target resource or is not willing to disclose that one exists.
@JWizard you should probably find an example using WebServlet which allows parameters
I'm sure there are plenty out there
no offense, but I'm sort of busy right now at work
@Neil I get you, I have seen some example but they are using xml configurations, me I want to use annotations. It's okay, I know what it is like at work when you are busy ;D
good luck to ya :)
 
2 hours later…
15:02
@MadaraUchiha What bothers me more is that Gandalf for so long ignored Sauron when he was known as the Necromancer (even after they knew it was Sauron).
I guess they figured his powers couldn't grow if the ring was hidden away
Then again the whole story would have never been written if that universe had logical gods
instead they've got writers :P
admittedly, I imagine it would be difficult to create such an intricate world and have nobody's motivation or actions put into question
15:49
Hashmap question: I want to create two hashmaps of background colors, the colors in $hashmapA will use black as the foreground color, and the colors in $hashmapB will use white as the foreground color.
Could I loop through $hashmapA and compare each entry to designated background color, if there's a match, include a CSS class that makes the text color black, then loop through $hashmapB and do the same thing? or is there a better way to do this?
I'm trying to avoid creating ten or so elseifs
what?
I'm trying to determine which would be the most efficient way to determine if the foreground color should be black or white. This may be a better question for another chatroom, so I'm going ot post it there.
you want something like if (darkTheme) mapA.get(stuff) else mapB.get(stuff) ?
oh, you want to determine the foreground colour based on the background colour
I'd do it differently tho
based on value <x> (background), you want to find the best value <y> (foreground)
considering, you had only one colour (greyscale)
you could put black on a value of 255 and white on a value of 0
then, find the distance between your colour (for example 64) and those black and white points
the one with the lowest distance would be chosen
(or the one with the highest distance if you put black on 0 and white on 255)
the same can be applied to n values
I'll be using a few different colors, gray, blue, green, red, with varied shades. They all have names specific to them which are CSS classes. I have two written lists of background colors that should have white foreground, and background colors that should have black foreground
you want 3
rgb
then, you need distance in 3d space
16:02
I'm not able to use Java
what language you need then?
at least not easily, it's a proprietary application in Java, I can do stuff in Velocity though
there are ways to call Java classes in Velocity, but I'm not sure what limitations there are, and the method is really screwy
well... im not sure about velocity... but using the distance mapping is how I would do it
@MadaraUchiha then you wouldn't have a trilogy
im happy Gandalf wasnt smart enough to end it all at the beginning
i like the lord of the rings movies
and story
and mostly everything else
16:07
I thought about trying to do something like that, but I'm too lazy to try and figure out the number values in the rgb scale to determine the limits on whether the foreground should be black or white. I have a few CSS class names and already went through a color contrast site comparing each. I just need to figure out how to do the control structure.
shrug, thanks anyway
if you want something easy, and you have a limited amount of background colours, then just make a background -> foreground map
given background <x>, get foreground <y>
Map<String, String>
ooooh that would work
the distance map would be a better solution if you have like fading backgrounds where the foreground has to switch colours :)
16:59
Hi guyss!
bye guyss
laytar
17:17
 
6 hours later…
23:17
farts

« first day (3033 days earlier)      last day (2132 days later) »