F**k you! JavaS**t
-
:mad: Now what's wrong here:
function MyAwesomeFunction(value)
{
print("Should run my awesome function:"+value);
if(!value)
{
print("no");
//do some awesome task
}
else {
print("sure");
//some more awesome task goes here
}SetValue( "DoAwesomeTask",value);
}Run a for-loop and call this "awesome" method with
true
for(i = 0; i<=50; i++)
MyAwesomeFunction(true);Methods are guaranteed to run without exceptions but, when I tried to run the test code, out of 100 calls, code began to fail randomly.:mad: Sometimes, my awesome task is done, while sometimes not. But as per input it should never do my awesome task. :doh: :confused: I'm out of ideas why. Either me or Windows S**t Host is low on caffeine! :java:
Beauty cannot be defined by abscissas and ordinates; neither are circles and ellipses created by their geometrical formulas. Carl von Clausewitz Source
-
:mad: Now what's wrong here:
function MyAwesomeFunction(value)
{
print("Should run my awesome function:"+value);
if(!value)
{
print("no");
//do some awesome task
}
else {
print("sure");
//some more awesome task goes here
}SetValue( "DoAwesomeTask",value);
}Run a for-loop and call this "awesome" method with
true
for(i = 0; i<=50; i++)
MyAwesomeFunction(true);Methods are guaranteed to run without exceptions but, when I tried to run the test code, out of 100 calls, code began to fail randomly.:mad: Sometimes, my awesome task is done, while sometimes not. But as per input it should never do my awesome task. :doh: :confused: I'm out of ideas why. Either me or Windows S**t Host is low on caffeine! :java:
Beauty cannot be defined by abscissas and ordinates; neither are circles and ellipses created by their geometrical formulas. Carl von Clausewitz Source
Amitosh S.M. wrote:
Methods are guaranteed to run without exceptions
That however is quite a bit different than saying they are guaranteed to succeed.
Amitosh S.M. wrote:
code began to fail randomly....I'm out of ideas why
Qualifying what "fail" means would be the first step. That said when an application on a computer seems to be doing something impossible then the first step is to look at the assumptions, not the code. ...for example...you are assuming that the code you posted is the code that ran.
-
:mad: Now what's wrong here:
function MyAwesomeFunction(value)
{
print("Should run my awesome function:"+value);
if(!value)
{
print("no");
//do some awesome task
}
else {
print("sure");
//some more awesome task goes here
}SetValue( "DoAwesomeTask",value);
}Run a for-loop and call this "awesome" method with
true
for(i = 0; i<=50; i++)
MyAwesomeFunction(true);Methods are guaranteed to run without exceptions but, when I tried to run the test code, out of 100 calls, code began to fail randomly.:mad: Sometimes, my awesome task is done, while sometimes not. But as per input it should never do my awesome task. :doh: :confused: I'm out of ideas why. Either me or Windows S**t Host is low on caffeine! :java:
Beauty cannot be defined by abscissas and ordinates; neither are circles and ellipses created by their geometrical formulas. Carl von Clausewitz Source
NOt really the right forum, but interesting! So - are you saying that your output from the above is something like: no no no sure no sure no no sure sure etc. ?
MVVM # - I did it My Way ___________________________________________ Man, you're a god. - walterhevedeich 26/05/2011 .\\axxx (That's an 'M')
-
NOt really the right forum, but interesting! So - are you saying that your output from the above is something like: no no no sure no sure no no sure sure etc. ?
MVVM # - I did it My Way ___________________________________________ Man, you're a god. - walterhevedeich 26/05/2011 .\\axxx (That's an 'M')
_Maxxx_ wrote:
no
no
no
sure
no
sure
no
no
sure
sureSounds like a normal conversation with my wife :laugh: ;P
Hmm i wonder why its doing that......ARGHS NO STOP, ROLLBACK ROLLBACK...F*** That's how i learned to "Always Backup"!! Dogs are man's best Friend, Cats are man's adorable little serial killer
-
NOt really the right forum, but interesting! So - are you saying that your output from the above is something like: no no no sure no sure no no sure sure etc. ?
MVVM # - I did it My Way ___________________________________________ Man, you're a god. - walterhevedeich 26/05/2011 .\\axxx (That's an 'M')
Yes, something like that. And I'm out of ideas why:confused:
_Maxxx_ wrote:
NOt really the right forum, but interesting!
I know, but as you see, my feelings are such that, I can vent them out only in the Soapbox.
Beauty cannot be defined by abscissas and ordinates; neither are circles and ellipses created by their geometrical formulas. Carl von Clausewitz Source
-
_Maxxx_ wrote:
no
no
no
sure
no
sure
no
no
sure
sureSounds like a normal conversation with my wife :laugh: ;P
Hmm i wonder why its doing that......ARGHS NO STOP, ROLLBACK ROLLBACK...F*** That's how i learned to "Always Backup"!! Dogs are man's best Friend, Cats are man's adorable little serial killer
:laugh:
Beauty cannot be defined by abscissas and ordinates; neither are circles and ellipses created by their geometrical formulas. Carl von Clausewitz Source
-
Amitosh S.M. wrote:
Methods are guaranteed to run without exceptions
That however is quite a bit different than saying they are guaranteed to succeed.
Amitosh S.M. wrote:
code began to fail randomly....I'm out of ideas why
Qualifying what "fail" means would be the first step. That said when an application on a computer seems to be doing something impossible then the first step is to look at the assumptions, not the code. ...for example...you are assuming that the code you posted is the code that ran.
jschell wrote:
That however is quite a bit different than saying they are guaranteed to succeed.
They are guaranteed to succeed too. Ok, I remove some "awesome" code here, but that awesome code, in no way, breaks the execution unless there is an catastrophic failure. Some part of the awesome code sets the display css property to hidden at times. So, will this ever cause problems? I tried settings breakpoints, console.logs() & lot of them. And lastly, occurs only on windows (IE).
Beauty cannot be defined by abscissas and ordinates; neither are circles and ellipses created by their geometrical formulas. Carl von Clausewitz Source
-
jschell wrote:
That however is quite a bit different than saying they are guaranteed to succeed.
They are guaranteed to succeed too. Ok, I remove some "awesome" code here, but that awesome code, in no way, breaks the execution unless there is an catastrophic failure. Some part of the awesome code sets the display css property to hidden at times. So, will this ever cause problems? I tried settings breakpoints, console.logs() & lot of them. And lastly, occurs only on windows (IE).
Beauty cannot be defined by abscissas and ordinates; neither are circles and ellipses created by their geometrical formulas. Carl von Clausewitz Source
-
:mad: Now what's wrong here:
function MyAwesomeFunction(value)
{
print("Should run my awesome function:"+value);
if(!value)
{
print("no");
//do some awesome task
}
else {
print("sure");
//some more awesome task goes here
}SetValue( "DoAwesomeTask",value);
}Run a for-loop and call this "awesome" method with
true
for(i = 0; i<=50; i++)
MyAwesomeFunction(true);Methods are guaranteed to run without exceptions but, when I tried to run the test code, out of 100 calls, code began to fail randomly.:mad: Sometimes, my awesome task is done, while sometimes not. But as per input it should never do my awesome task. :doh: :confused: I'm out of ideas why. Either me or Windows S**t Host is low on caffeine! :java:
Beauty cannot be defined by abscissas and ordinates; neither are circles and ellipses created by their geometrical formulas. Carl von Clausewitz Source
-
:mad: Now what's wrong here:
function MyAwesomeFunction(value)
{
print("Should run my awesome function:"+value);
if(!value)
{
print("no");
//do some awesome task
}
else {
print("sure");
//some more awesome task goes here
}SetValue( "DoAwesomeTask",value);
}Run a for-loop and call this "awesome" method with
true
for(i = 0; i<=50; i++)
MyAwesomeFunction(true);Methods are guaranteed to run without exceptions but, when I tried to run the test code, out of 100 calls, code began to fail randomly.:mad: Sometimes, my awesome task is done, while sometimes not. But as per input it should never do my awesome task. :doh: :confused: I'm out of ideas why. Either me or Windows S**t Host is low on caffeine! :java:
Beauty cannot be defined by abscissas and ordinates; neither are circles and ellipses created by their geometrical formulas. Carl von Clausewitz Source
-
:mad: Now what's wrong here:
function MyAwesomeFunction(value)
{
print("Should run my awesome function:"+value);
if(!value)
{
print("no");
//do some awesome task
}
else {
print("sure");
//some more awesome task goes here
}SetValue( "DoAwesomeTask",value);
}Run a for-loop and call this "awesome" method with
true
for(i = 0; i<=50; i++)
MyAwesomeFunction(true);Methods are guaranteed to run without exceptions but, when I tried to run the test code, out of 100 calls, code began to fail randomly.:mad: Sometimes, my awesome task is done, while sometimes not. But as per input it should never do my awesome task. :doh: :confused: I'm out of ideas why. Either me or Windows S**t Host is low on caffeine! :java:
Beauty cannot be defined by abscissas and ordinates; neither are circles and ellipses created by their geometrical formulas. Carl von Clausewitz Source
I do not code in JavaScript, but I would assume that booleans are passed by reference and the SetValue( "DoAwesomeTask",value); line somehow has the side effect of changing value. Try changing your loop to:
for(i = 0; i<=50; i++)
{
parameter = true;
MyAwesomeFunction(parameter);
} -
:mad: Now what's wrong here:
function MyAwesomeFunction(value)
{
print("Should run my awesome function:"+value);
if(!value)
{
print("no");
//do some awesome task
}
else {
print("sure");
//some more awesome task goes here
}SetValue( "DoAwesomeTask",value);
}Run a for-loop and call this "awesome" method with
true
for(i = 0; i<=50; i++)
MyAwesomeFunction(true);Methods are guaranteed to run without exceptions but, when I tried to run the test code, out of 100 calls, code began to fail randomly.:mad: Sometimes, my awesome task is done, while sometimes not. But as per input it should never do my awesome task. :doh: :confused: I'm out of ideas why. Either me or Windows S**t Host is low on caffeine! :java:
Beauty cannot be defined by abscissas and ordinates; neither are circles and ellipses created by their geometrical formulas. Carl von Clausewitz Source
If it's any consolation, I used to work with FORTRAN compilers where numeric values were passed by reference. Not normally a problem until
CALL MYSUB(666) ... PRINT \*,"THE VALUE OF 666 IS: ", 666
...
SUBROUTINE MYSUB(I)
INT I
I = I * 2
RETURN
ENDThe universe is composed of electrons, neutrons, protons and......morons. (ThePhantomUpvoter)
-
Yes, something like that. And I'm out of ideas why:confused:
_Maxxx_ wrote:
NOt really the right forum, but interesting!
I know, but as you see, my feelings are such that, I can vent them out only in the Soapbox.
Beauty cannot be defined by abscissas and ordinates; neither are circles and ellipses created by their geometrical formulas. Carl von Clausewitz Source
are you sure there's nothing redefining value?
I'm brazilian and english (well, human languages in general) aren't my best skill, so, sorry by my english. (if you want we can speak in C# or VB.Net =p) "Given the chance I'd rather work smart than work hard." - PHS241 "'Sophisticated platform' typically means 'I have no idea how it works.'"
-
are you sure there's nothing redefining value?
I'm brazilian and english (well, human languages in general) aren't my best skill, so, sorry by my english. (if you want we can speak in C# or VB.Net =p) "Given the chance I'd rather work smart than work hard." - PHS241 "'Sophisticated platform' typically means 'I have no idea how it works.'"
No, not even any variable defined anywhere with the same name
Beauty cannot be defined by abscissas and ordinates; neither are circles and ellipses created by their geometrical formulas. Carl von Clausewitz Source
-
If it's any consolation, I used to work with FORTRAN compilers where numeric values were passed by reference. Not normally a problem until
CALL MYSUB(666) ... PRINT \*,"THE VALUE OF 666 IS: ", 666
...
SUBROUTINE MYSUB(I)
INT I
I = I * 2
RETURN
ENDThe universe is composed of electrons, neutrons, protons and......morons. (ThePhantomUpvoter)
Nah, I'm not messing with the value parameter anywhere.
OriginalGriff wrote:
FORTRAN
Seems greek to me
Beauty cannot be defined by abscissas and ordinates; neither are circles and ellipses created by their geometrical formulas. Carl von Clausewitz Source
-
I do not code in JavaScript, but I would assume that booleans are passed by reference and the SetValue( "DoAwesomeTask",value); line somehow has the side effect of changing value. Try changing your loop to:
for(i = 0; i<=50; i++)
{
parameter = true;
MyAwesomeFunction(parameter);
}Nope, SetValue doesn't change the value of the variable. It's an ajax call to the server. If error arises, fail silently. And this was encountered during dry run. No ajax. SetValue does nothing.
Beauty cannot be defined by abscissas and ordinates; neither are circles and ellipses created by their geometrical formulas. Carl von Clausewitz Source
-
That problem occurs only in Windows S**t host! :mad: on Win7 Sp1.
Beauty cannot be defined by abscissas and ordinates; neither are circles and ellipses created by their geometrical formulas. Carl von Clausewitz Source
-
Nothing...
Beauty cannot be defined by abscissas and ordinates; neither are circles and ellipses created by their geometrical formulas. Carl von Clausewitz Source