Reputation
16,846
Top tag
Next privilege 20,000 Rep.
Access 'trusted user' tools
Badges
2 33 67
Newest
 algorithms
Impact
~521k people reached

Jul
19
comment rand() gives same numbers again for a small range
rand() is a bad RNG
Jul
16
comment How do I prevent a long running SQL query from looking stuck?
optimize the query so it doesn't take 10 minutes
Jul
16
comment How to handle OSS license on GitHub with non-OSS pictures
This may be better handled on opensource.SE
Jul
15
comment Why use a unique hashkey for form submissions?
That article is unrelated to what your boss wants, he wants you to implement a session key of sorts.
Jul
15
comment Fast fixed-size (256 bit) integer modulo/division
find a existing bigInt divide and optimize for your case?
Jul
15
comment Why use a unique hashkey for form submissions?
that article is about the hashCode method in java to provide correct behavior in the hash based sets
Jul
15
comment Missing super class from dependencies could throw NullPointerException java
My gut says it should throw a ClassNotFound when trying to load the class with the missing parent.
Jul
14
comment Hot-patching a server: dynamically loading types from an uploaded assembly
use a proper script engine?
Jul
9
comment Algorithm to solve this “treefarm” puzzle
This is simple enough to brute force IMO, just place one at random until you get stuck and then backtrack.
Jul
2
comment Approaches for storing and analysing large amounts of time-based data
Do you know in advance which values change often and how much they change?
Jun
24
comment Communication between state machine and GUI
@user695652 not really, the callback function in my answer is an example of the observer pattern (if you squint a bit). All the patterns means is that there is a interface in the library that the gui implements and passes to the library to get called.
Jun
10
comment Directly query database vs. Using web service
The answer can be found in this question tl;dr: exposing your DB locks you to that DB and creates another vector of attack.
Jun
10
comment Can multiple synchronized methods in same object run concurrently
@Yeasir you can accept the answer by clicking the checkmark.
Jun
10
comment Can multiple synchronized methods in same object run concurrently
@Yeasir The thread will see that it already owns the lock on the object and just pass through the block after incrementing the owned counter. When leaving the method it will decrement the counter and release the lock if it hit 0.
Jun
9
comment Is it possible to have currying and variadic function at the same time?
isn't that the job of reduce?
Jun
8
comment Is it possible to have multiple threads using Background Workers for different controls within one GUI
It may be worthwhile to change the way you render the data to using direct3D, then you just need to change the buffer content in the mainthread callback.
Jun
4
comment In Java, why does (unsorted) Set implement Iterable, but SortedMap does not?
I understood that Set (implicitly) disallowed duplicates while Collection does allow it.
Jun
4
comment Is there an issue with closing our database connections in the “Finally” block of a Try statement?
java7? if so go with try-with-resources
Jun
4
comment How to write a doubly linked list for multi-core use without global lock?
@GoswinvonBrederlow forward pointers are shared_ptr, backward pointers are weak_ptr, before you can do anything you need a shared_ptr to the node you are manipulating -> no way for B to get deleted because the core holds a shared_ptr.
Jun
4
comment How to write a doubly linked list for multi-core use without global lock?
@GoswinvonBrederlow lock B get &A and &C; unlock B; lock A B and C; double check the values, repeat if needed.