isEven(0) ->
true;
isEven(Num) ->
isOdd(Num-1).
isOdd(0) ->
false;
isOdd(Num) ->
isEven(Num-1).
- 0 Posts
- 43 Comments
FiskFisk33@startrek.websiteto Programmer Humor@programming.dev•I got to avoid memory management for quite some time7·25 days agoit is good to learn C, even if you’re never gonna touch it again. It teaches you what other languages abstract away.
FiskFisk33@startrek.websiteto Programmer Humor@programming.dev•We don't talk about IPv519·2 months agofun fact, the RFC introducing NAT calls it a “short-term solution”
FiskFisk33@startrek.websiteto Showerthoughts@lemmy.world•Most soups are just more watery hot bread dips5·3 months agoPasta carbonara and Sweetrolls share most of their ingredients
just substitute cheese and pepper with sugar and baking powder
FiskFisk33@startrek.websiteto Showerthoughts@lemmy.world•Why is cottage cheese the only cheese defined by some relationship to a building?6·3 months agoCheddar is a village in southern England
…and Maasdam is in the Netherlands
FiskFisk33@startrek.websiteto Showerthoughts@lemmy.world•When asked "are you an honest person?" The only logical answer is yes.7·4 months agonot being honest doesnt mean you always lie
wait, does windows jit compile C++ ??
FiskFisk33@startrek.websiteto Showerthoughts@lemmy.world•The term carrot and stick doesn't sit well with me. If you hit a donkey with a stick then it's likely it won't trust you enough to accept a carrot later.4·4 months agoOn the contrary, that’s why it’s perfect. There is so much evidence in so many different context that positive reinforcement yields better results than negative.
This is congruent with your donkey example.
FiskFisk33@startrek.websiteto Programmer Humor@programming.dev•I'm gonna refactor later.181·5 months agobut it removed half the point…?
i know this is a joke, but i find it quite interesting those two words have completely different etymologies.
Grave as in burial site comes from an old proto indo european word for “dig”, while grave as in serious comes from french.
I mean, sure, you won’t stay alive for very long with a stopped heart.
I meant like, when someones heart stops and gets restarted again with cpr or a defibrillator or something. People often call that being dead, and coming back.
people say quitting smoking is hard. I don’t understand, I do it multiple times a day.
I know this is a definition in many places. I find it stupid and useless.
The heart beating is not a good definition of being alive in my opinion. The heart stopping temporarily doesn’t mean you died, you were just in terribly grave danger.
If a person is defined by their heart, what does that make a heart transplant?
utterly useless definition.
oh god the reason is even stupider then I expected
Because large numbers use the
e
character in their string representation (e.g.,6.022e23
for 6.022 × 1023), usingparseInt
to truncate numbers will produce unexpected results when used on very large or very small numbers.parseInt
should not be used as a substitute forMath.trunc()
.
FiskFisk33@startrek.websiteto Showerthoughts@lemmy.world•Coffee is not brewed homogeneous10·5 months agoknowing about them does not correlate very well with owning them
https://www.npmjs.com/package/is-even
don’t look at the weekly downloads if you are faint of heart.