Top new questions this week:
|
|
I was looking at the source of sorted_containers and was surprised to see this line:
self._load, self._twice, self._half = load, load * 2, load >> 1
Here load is an integer. Why use bit shift ...
|
|
In my current codebase I see this following pattern:
#if SOMETHING_SUPPORTED+0 != 0
...
#endif
Unfortunately this is a very old codebase and nobody knows how and why it started. I think it started ...
|
|
I'm using the command line argument -modelsimini <modelsim.ini> to specify my own modelsim.ini file for most QuestaSim / ModelSim executables.
This works perfectly fine on Linux for vcom and ...
|
|
Is it safe to say that the following dichotomy holds:
Each given function is
either pure
or has side effects
If so, side effects (of a function) are anything that can't be found in a pure ...
|
|
If some function f with parameters p_1, ..., p_n of types T_1, ..., T_n respectively is called with arguments a_1, ..., a_n and its body throws an exception, finishes or returns, in what order are the ...
|
|
Suppose I have 3 Scanner instances which I want to close.
I could do
sc.close()
for each of the Scanners.
Or I could do something like
for (Scanner sc: new Scanner[]{sc1,sc2,sc3}) {
...
|
|
This recent code golfing post asked the possibilities of fast implementation in C the following (assuming n is an unsigned integer):
if (n==6 || n==8 || n==10 || n==12 || n==14 || n==16 || n==18 || ...
|
Greatest hits from previous weeks:
|
|
I am trying to generate a random intvalue with Java, but in a specific range.
For example:
My range is 5-10, meaning that 5 is the smallest possible value and 10 is the biggest. Any other number in ...
|
|
How do I read every line of a file in Python and store each line as an element in an array?
I want to read the file line by line and each line is appended to the end of the array.
|
Can you answer these?
|
|
Is there any way to get the current instance id from app-engine in node.js?
I found solutions only for java and python but nothing for node.
|
|
I have a application that runs periodically (it's a scheduled task). The task is launched once a minute, and normally only takes a few seconds to do its business, then exits.
But there's a ~1 in ...
|
|
I am trying to use the API to query the set of tables associated with a given dataset.
This works correctly on the sample dataset and on the dataset I 'created' through the API.
But, it does not ...
|