12,238 reputation
22247
bio website
location
age
visits member for 3 years, 3 months
seen 9 mins ago

1d
comment Why don't compilers inline everything?
@SK-logic except that a simple if can blow the pipeline out of the water in a way that eclipses a function call
1d
comment Why don't compilers inline everything?
some recursive calls can be inlined (tail calls), but all can be transformed into iteration if you optionally add a explicit stack
1d
comment Multithreaded Pre/Post Functions
hint: thread local storage
2d
answered Is there any danger in writing raw bytes to a file?
Aug
26
answered Is method overloading anything more than syntactic sugar?
Aug
23
comment How can I find the shortest path between two subgraphs of a larger graph?
@Pops or my first idea: a 0-cost (or uniform cost) connection to all nodes in one subgraph from the fake node, much easier :)
Aug
23
comment How can I find the shortest path between two subgraphs of a larger graph?
@Pops but that would result in the cheaper path being traversed first
Aug
23
comment How can I find the shortest path between two subgraphs of a larger graph?
It removes the complexity of the subgraphs as the first and last edge is a 0-cost from the imaginary start or to the imaginary end, then all you need to worry about is the disappearing edges
Aug
23
comment How can I find the shortest path between two subgraphs of a larger graph?
add a imaginary node that connects to all nodes of one set and use that as your starting or end point
Aug
23
comment Problem in searching String array
first, wrong area, you are looking for stackOverflow.com second, not enough information (need some code of where you went wrong, we aren't psychic)
Aug
23
answered Looking for an algorithm to connect dots - shortest route
Aug
22
comment What is the use of the prefix “for(;;);” in an Ajax response
to force a crash if it is evaled?
Aug
22
comment What is the value of a let expression
many languages use a fundamentally different setup in interactive mode than in compiled mode
Aug
22
comment Maximum tcp port number constant in java
it's not going to change (ever) unless they redesign TCP to allow a higher port number (which isn't needed); 0xffff is a quick way to place it down
Aug
21
comment Can regexp be used to check for palindromes?
No, for a regex to be able to check a language (in this case the language of palindromes) the language needs to be a regular language
Aug
21
comment Can regexp be used to check for palindromes?
@OliverWeiler but the recurse isn't available in the java regex
Aug
21
answered Finding the shortest path through a digraph that visits all nodes
Aug
21
comment Finding the shortest path through a digraph that visits all nodes
still a traveling salesman problem: add the missing edges with the shortest path between the 2 nodes and then fire a salesman solver at it.
Aug
21
comment Finding the shortest path through a digraph that visits all nodes
you want to find the shortest hamiltonian path? that is the traveling salesman problem
Aug
20
comment Prepared statement alternatives for this middle-man program?
the middle-man should be its own sql-based server that has it data distributed else where, or just go with a distributed DB to begin with