|
Impeccable, Unfailing, Trusted Upgradepath for VB.
Vasudevan Deepak Kumar
Personal Homepage Tech Gossips
A pessimist sees only the dark side of the clouds, and mopes; a philosopher sees both sides, and shrugs; an optimist doesn't see the clouds at all - he's walking on them. --Leonard Louis Levinson
|
|
|
|
|
void set_ptList(int len, int *start)<br />
{<br />
int i, z, l;<br />
<br />
i = 0;<br />
z = 0;<br />
<br />
while (i < len)<br />
{<br />
<br />
if (new_settings[3][i] != act_settings[3][i])<br />
{<br />
if (i < (len-1))<br />
{<br />
if (new_settings[3][i] > act_settings[3][i+1])<br />
{<br />
i++;<br />
z++;<br />
}<br />
else<br />
{<br />
for (l = i; l >= i-z; l--)<br />
{<br />
list[*start][0] = 3;<br />
list[*start][1] = l;<br />
(*start)++;<br />
}<br />
z = 0;<br />
i++;<br />
}<br />
}<br />
else<br />
{<br />
l = i;<br />
i++;<br />
while (z >= 0)<br />
{<br />
list[*start][0] = 3;<br />
list[*start][1] = l;<br />
(*start)++;<br />
z--;<br />
l--;<br />
}<br />
}<br />
}<br />
else<br />
{<br />
i++;<br />
}<br />
}<br />
<br />
}<br />
<br />
Have a nice life!!
|
|
|
|
|
Looks some kind of sort method to me :P
|
|
|
|
|
it shows there is no need for obfuscators in the modern toolbox.
Luc Pattyn [Forum Guidelines] [My Articles]
this months tips:
- before you ask a question here, search CodeProject, then Google
- the quality and detail of your question reflects on the effectiveness of the help you are likely to get
- use PRE tags to preserve formatting when showing multi-line code snippets
|
|
|
|
|
Apparently this code generates a list of reversed ordered blocks of indexes where the new_settings and acc_settings differ, separating the block in the items where the value in new_settings is > the next item in acc_settings.
I guess...
|
|
|
|
|
Surrender!!! You wrote it.
Greetings from Germany
|
|
|
|
|
Quick n Easy Obfuscation!
Search for the regular expression
// {.*}
and replace with nothing at all.
(God help you if you use // anywhere in like, a file path).
Ninja (the Nerd)
Confused? You will be...
|
|
|
|
|
It's a breath mint and a dish detergent.
|
|
|
|
|
Uhm... Provides theoretical foundation to Dark Bulk Matter existence?
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
|
|
|
|
|
It returns the number 42 and the question is "How many roads must a man walk down?"
|
|
|
|
|
Now thats a good one!
Cheers
You have the thought that modern physics just relay on assumptions, that somehow depends on a smile of a cat, which isn’t there.( Albert Einstein)
|
|
|
|
|
Awww shucks, now it happened again.
|
|
|
|
|
It's a model describing the eating pattern probability of termites...
-- Ian
|
|
|
|
|
First it missed a good indentation.
Vasudevan Deepak Kumar
Personal Homepage Tech Gossips
A pessimist sees only the dark side of the clouds, and mopes; a philosopher sees both sides, and shrugs; an optimist doesn't see the clouds at all - he's walking on them. --Leonard Louis Levinson
|
|
|
|
|
Why? Is it something you need to figure out for work? Just a challenge for us? What's the concern?
-Nick P.
|
|
|
|
|
About 4 years ago I had a problem with this code and spent a night trying to understand what the programmer wanted to do. It was just the worst code I have seen. Especially with parameter l and 1 is very difficult to tell apart...
Have a nice life!!
|
|
|
|
|
That makes my head hurt!
WE ARE DYSLEXIC OF BORG. Refutance is systile. Your a$$ will be laminated.
|
|
|
|
|
Tom,
I LOVE your signature line. DYSLEXIC of BORG!!! I laughed till my stomach hurt.
|
|
|
|
|
I wish I could claim it as my own original line, but I got it from my son. He found it somewhere online, and I loved it.
WE ARE DYSLEXIC OF BORG. Refutance is systile. Your a$$ will be laminated.
|
|
|
|
|
|
CPallini wrote: The following was mine
Sorry, I am a geometrical Embryo.:->
Please elaborate.
Let's think the unthinkable, let's do the undoable, let's prepare to grapple with the ineffable itself, and see if we may not eff it after all. Douglas Adams, "Dirk Gently's Holistic Detective Agency"
|
|
|
|
|
Well, the error isn't in geometry formula by itself.
As an hint, in the following one the bug is fixed:
...
double cosa = cos( alfa );
double sina = sin( alfa );
for (i = 0; i < POINTS; i++)
{
double dx = x[i] - x;
double dy = y[i] - y;
x[i] = x + dx * cosa - dy * sina;
y[i] = y + dx * sina + dy * cosa;
}
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
|
|
|
|
|
Sorry, that wasn't a horror, just a classical bug mixing present and future state.
Lots of algorithms offer opportunities for mistakes like this one.
Luc Pattyn [Forum Guidelines] [My Articles]
this months tips:
- before you ask a question here, search CodeProject, then Google
- the quality and detail of your question reflects on the effectiveness of the help you are likely to get
- use PRE tags to preserve formatting when showing multi-line code snippets
|
|
|
|
|
|
Then any good runtime will return an error stating quite plainly that:
"Sorry. This method is busy. Please call again later."
Ninja (the Nerd)
Confused? You will be...
|
|
|
|