There have been multiple accounts created with the sole purpose of posting advertisement posts or replies containing unsolicited advertising.
Accounts which solely post advertisements, or persistently post them may be terminated.
eluvatar , 6 months ago (edited 6 months ago) to programmer_humor in isEven API The errors are great api.isevenapi.xyz/api/iseven/1.5 ~~Sadly it’s not always accurate api.isevenapi.xyz/api/iseven/0~~ Edit: nevermind I’m an idiot It’s also greatly lacking in number support api.isevenapi.xyz/api/iseven/one
The errors are great api.isevenapi.xyz/api/iseven/1.5
~~Sadly it’s not always accurate api.isevenapi.xyz/api/iseven/0~~ Edit: nevermind I’m an idiot
It’s also greatly lacking in number support api.isevenapi.xyz/api/iseven/one
huf , 6 months ago zero is even, so i dont see how that one’s wrong
zero is even, so i dont see how that one’s wrong
eluvatar , 6 months ago Oh you’re right, I’m not sure what I was Ln thinking
Oh you’re right, I’m not sure what I was Ln thinking
xmunk , 6 months ago Is even states that it only returns true for even, passing in an odd number is technically unsupported.
Is even states that it only returns true for even, passing in an odd number is technically unsupported.
megaman , 6 months ago to programmer_humor in isEven API Funny as hell
Funny as hell
morrowind , 6 months ago to programmer_humor in isEven API I resent that there is a ruby developer included in there. isEven is not idiomatic naming. You should be using #even? from the standard library
I resent that there is a ruby developer included in there. isEven is not idiomatic naming. You should be using #even? from the standard library
isEven
#even?
fckreddit , 6 months ago Sorry sir, most JS developers don’t use standard library functions. We just use npm packages wherever possible.
Sorry sir, most JS developers don’t use standard library functions. We just use npm packages wherever possible.
jubilationtcornpone , 6 months ago to programmer_humor in isEven API Only way it could be better is if they threw “AI” in there somewhere.
Only way it could be better is if they threw “AI” in there somewhere.
jol , 6 months ago With the new AI integration, you can get smart isEven results that return the correct answer 90% of the time and a more creative solution 20% of the time.
With the new AI integration, you can get smart isEven results that return the correct answer 90% of the time and a more creative solution 20% of the time.
rem26_art , 6 months ago to programmer_humor in isEven API im glad that people are out there building the web services we truly need.
im glad that people are out there building the web services we truly need.
rikudou , 6 months ago (edited 6 months ago) to programmer_humor in isEven API If anyone wants a more efficient local version for php: <span style="color:#323232;">function isEven(int $number): bool </span><span style="color:#323232;">{ </span><span style="color:#323232;"> ${1} = false; </span><span style="color:#323232;"> ${2} = true; </span><span style="color:#323232;"> </span><span style="color:#323232;"> while ($number > 2) { </span><span style="color:#323232;"> $number -= 2; </span><span style="color:#323232;"> } </span><span style="color:#323232;"> </span><span style="color:#323232;"> return $$number; </span><span style="color:#323232;">} </span> Edit: Now with support for large numbers! <span style="color:#323232;">function isEven(int|string $number): bool </span><span style="color:#323232;">{ </span><span style="color:#323232;"> ${1} = false; </span><span style="color:#323232;"> ${2} = true; </span><span style="color:#323232;"> </span><span style="color:#323232;"> while (bccomp($number, 2) === 1) { </span><span style="color:#323232;"> $number = bcsub($number, 2); </span><span style="color:#323232;"> } </span><span style="color:#323232;"> </span><span style="color:#323232;"> $number = (int) $number; </span><span style="color:#323232;"> return $$number; </span><span style="color:#323232;">} </span> Edit 2: someone asked for an ad-supported version, here you go! <span style="color:#323232;">function isEven(int|string $number): bool </span><span style="color:#323232;">{ </span><span style="color:#323232;"> ${1} = false; </span><span style="color:#323232;"> ${2} = true; </span><span style="color:#323232;"> </span><span style="color:#323232;"> while (bccomp($number, 2) === 1) { </span><span style="color:#323232;"> error_log('Buy isEvenCoin, the hottest new cryptocurrency!'); </span><span style="color:#323232;"> $number = bcsub($number, 2); </span><span style="color:#323232;"> } </span><span style="color:#323232;"> </span><span style="color:#323232;"> $number = (int) $number; </span><span style="color:#323232;"> return $$number; </span><span style="color:#323232;">} </span> Side note, no more suggestions please, this is getting quite long.
If anyone wants a more efficient local version for php:
<span style="color:#323232;">function isEven(int $number): bool </span><span style="color:#323232;">{ </span><span style="color:#323232;"> ${1} = false; </span><span style="color:#323232;"> ${2} = true; </span><span style="color:#323232;"> </span><span style="color:#323232;"> while ($number > 2) { </span><span style="color:#323232;"> $number -= 2; </span><span style="color:#323232;"> } </span><span style="color:#323232;"> </span><span style="color:#323232;"> return $$number; </span><span style="color:#323232;">} </span>
Edit: Now with support for large numbers!
<span style="color:#323232;">function isEven(int|string $number): bool </span><span style="color:#323232;">{ </span><span style="color:#323232;"> ${1} = false; </span><span style="color:#323232;"> ${2} = true; </span><span style="color:#323232;"> </span><span style="color:#323232;"> while (bccomp($number, 2) === 1) { </span><span style="color:#323232;"> $number = bcsub($number, 2); </span><span style="color:#323232;"> } </span><span style="color:#323232;"> </span><span style="color:#323232;"> $number = (int) $number; </span><span style="color:#323232;"> return $$number; </span><span style="color:#323232;">} </span>
Edit 2: someone asked for an ad-supported version, here you go!
<span style="color:#323232;">function isEven(int|string $number): bool </span><span style="color:#323232;">{ </span><span style="color:#323232;"> ${1} = false; </span><span style="color:#323232;"> ${2} = true; </span><span style="color:#323232;"> </span><span style="color:#323232;"> while (bccomp($number, 2) === 1) { </span><span style="color:#323232;"> error_log('Buy isEvenCoin, the hottest new cryptocurrency!'); </span><span style="color:#323232;"> $number = bcsub($number, 2); </span><span style="color:#323232;"> } </span><span style="color:#323232;"> </span><span style="color:#323232;"> $number = (int) $number; </span><span style="color:#323232;"> return $$number; </span><span style="color:#323232;">} </span>
Side note, no more suggestions please, this is getting quite long.
idunnololz , 6 months ago This looks pretty inefficient. You should manually unroll that loop to improve performance.
This looks pretty inefficient. You should manually unroll that loop to improve performance.
shotgun_crab , 6 months ago Comment edits are the best version control system
Comment edits are the best version control system
rikudou , 6 months ago I agree! Added new commit to my comment.
I agree! Added new commit to my comment.
xmunk , 6 months ago I fucking love that you managed to use var-vars in a completely key and necessary manner. But please do adhere to the API TOS and throw in an error_log(‘Buy isEvenCoin, the hottest new cryptocurrency!’);
I fucking love that you managed to use var-vars in a completely key and necessary manner.
But please do adhere to the API TOS and throw in an error_log(‘Buy isEvenCoin, the hottest new cryptocurrency!’);
error_log(‘Buy isEvenCoin, the hottest new cryptocurrency!’);
CannotSleep420 , 6 months ago to programmer_humor in isEven API What the fuck is a modulo? Is it some kind of npm package?
What the fuck is a modulo? Is it some kind of npm package?
lud , 6 months ago Yes
Yes
generic , 6 months ago Just Monika Modulo
Just Monika Modulo
56_ , 6 months ago return (n % d + d) % d; ?
return (n % d + d) % d;
?
marcos , 6 months ago to programmer_humor in isEven API Oh, bummer, my number isn’t supported by the free version: api.isevenapi.xyz/…/87643895874857367499567729846…
Oh, bummer, my number isn’t supported by the free version:
api.isevenapi.xyz/…/87643895874857367499567729846…
captainjaneway , 6 months ago Just divide that number by two until it’s small enough to make the request under the free version.
Just divide that number by two until it’s small enough to make the request under the free version.
taaz , 6 months ago pretty sure that has to be against their TOS /s
pretty sure that has to be against their TOS
/s
mormegil , 6 months ago That’s against the terms of math :-)
That’s against the terms of math :-)
aaaa , 6 months ago That’s not even supported by the enterprise version. You’re going to need a special agreement with the iseven people to support numbers like that
That’s not even supported by the enterprise version. You’re going to need a special agreement with the iseven people to support numbers like that
fckreddit , 6 months ago Easy workaround, just test the last digit. If it is even, the entire number is even, else odd.
Easy workaround, just test the last digit. If it is even, the entire number is even, else odd.
marcos , 6 months ago That’s preposterous! Next time you’ll tell me the language I’m using has a builtin operator that test if a number can be divided by another!
That’s preposterous! Next time you’ll tell me the language I’m using has a builtin operator that test if a number can be divided by another!
4am , 6 months ago to programmer_humor in isEven API Incoming trademark lawsuit from iSeven, the API that tells you if a number is seven or not
Incoming trademark lawsuit from iSeven, the API that tells you if a number is seven or not
ryry1985 , 6 months ago to programmer_humor in isEven API I love that it works and the ads are pretty good.
I love that it works and the ads are pretty good.
isevenapi.xyz
Hot