|
...which also implies that there is no feedback to the calling function whether the new thread has been started, or not. Interesting, at least.
~RaGE();
I think words like 'destiny' are a way of trying to find order where none exists. - Christian Graus
Entropy isn't what it used to.
|
|
|
|
|
Well, it's a timer (that is never stopped) that creates a worker thread in its callback method, so if there is too much threads, then... no work will be started.
This check has been added because the duration of the worker thread was sometimes longer than the timer interval, so the number of threads was increasing indefinitely ! 
|
|
|
|
|
If anything, this is a very good description on how we work here.
~RaGE();
I think words like 'destiny' are a way of trying to find order where none exists. - Christian Graus
Entropy isn't what it used to.
|
|
|
|
|
def widthOfLength(s: String) = s.length.toString.length
|
|
|
|
|
Do you think they [or you ] chose width, as lengthOfLength(s: String) = s.length.toString.length would cause a meltdown.
|
|
|
|
|
I have to admit that "widthOfLength" seems OK to me. Obviously it is used to calculate the format/layout of some table perhaps where all the lengths are scanned to find the longest/widest. It is just a matter of semantics.
- I would love to change the world, but they won’t give me the source code.
|
|
|
|
|
You're absolutely right about the code purpose.
|
|
|
|
|
Trying to determine how many decimal digits are required for the Length?
A trick a colleague showed me once is to get the log 10 of the Length.
Something like:
int y = (int) System.Math.Ceiling ( System.Math.Log10 ( new string ( '*' , 255 ).Length ) ) ;
|
|
|
|
|
PIEBALDconsult wrote: new string ( '*' , 255 ).Length
Someone's getting paid by the character!
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
I don't understand language of your tribe, but I would go with extension method in C#. Something like this:
public static Int32 GetStringLength(this Int32 value)
s.Length.GetStringLength()

|
|
|
|
|
Smart K8 wrote: I don't understand language of your tribe
My guess is python
John
modified 8-Sep-14 14:19pm.
|
|
|
|
|
|
It's Scala actually and both Forogar and PIEBALDconsult are right about the function purpose. It is taken from a small example that reads a text file and prints it out displaying each line's length before it and the function makes sure that all lines are aligned/tabulated correctly.
|
|
|
|
|
Computer memory is amazing
We start out with this wonderful sandbox
A place where we can mold objects out of thin air
and the space is limitless in every direction
It's just the only way in or out is up
It may seem like the sandbox is small because we can see the edge of it
but as programmers we can expand the memory space so we never reach the edge
until that moment we run out of memory
which isn't such a big problem any more
but it has been
so now we have all this code that cleans up memory
So like a 3D game as we navigate through the map loading and unloading happens
on top of that
the scopes now plague us
global level, local level, and room level (procedure level)
So now we find ourselves locked in a bathroom
with the only way out of the sandbox
whish is up
the sky is out a tiny window
|
|
|
|
|
|
just can't get a hold of him ATM
That's cuz his fancy computer achieved self awareness and assimilated him...it's coming after us next 
|
|
|
|
|
According to your magical fairy tail you had 64 machines each with 500 GB of ram and each with 8 cores, which you called desktops- a desktop is currently around 16GB of RAM no where close to 500.
64 bit limitation is 18,446,744,073,709,551,616 so if you had 64 TB which is probably only 64 GB it wouldn't matter you would get the whole thing not a magical 32 TB.
The current limitation for Linux is 1 TB of RAM.
It's 64 GB with a G is probably the truth. and FYI we are getting 200 GB's in one machine so the guy is going through a crap load of work that windows does not natively support.
|
|
|
|
|
Reading some of the posts on this forum reminds me of a piece of C++ code written many years ago which went something like:
Class MyClass
{
public:
~MyClass()
{
delete this;
}
}
Life is like a s**t sandwich; the more bread you have, the less s**t you eat.
|
|
|
|
|
See my sig.
Software Zen: delete this;
|
|
|
|
|
I come before you with a question, a yearning in my heart. What <dramatic pause=""> is null..... Equal to?
...
if (value == null || value.equals(null)) {
return "null";
}
...
Evidently, the concept of "null" and "null pointers" and "null pointer calls" is lost on the guys who wrote this particular line of code. It doesn't make any errors, probably because someone added the first condition after a few NPEs happened...
EDIT: Clarification - the title is rhetorical.
|
|
|
|
|
What is the sound of two nulls equating?
|
|
|
|
|
Silence from Lorrha [^]
[Update} Well, that's pretty useless: the audio track doesn't work.
Or maybe that's the point: literally the sound of nothing at all: null in the truest sense. 
|
|
|
|
|
In programming a null object means that this doesn't exist in the memory. For example,
int i;
if(i == null) {
MessageBox.Show("Yes, Null!");
} else {
MessageBox.Show("No, value was added somewhere in the code stack");
}
This, would execute if there is no value in i , or the i was never initialized. The code that you're having is something like this
if (value == null || value.equals(null)) {
return "null";
}
The method signature would be like,
public string Function1 () {
}
Favourite line: Throw me to them wolves and close the gate up. I am afraid of what will happen to them wolves - Eminem
~! Firewall !~
modified 25-Aug-14 13:29pm.
|
|
|
|
|
I understand the concept of null, however, evidently "those who came before" didn't...
Hence why I'm posting this here 
|
|
|
|
|