Also @CᴏɴᴏʀO'Bʀɪᴇɴ the background colors (at least for me) doesn't seem to go all the way: it turns back into the regular blue and white past the questions list
@ThomasKwa the function is actually lambda x: isint(num) or isfloat(num) or isstr(num) in that it should return True if any are true (why I agree any() makes sense)
I have my real account, two pages (one that was my old youtube account and one that is my new one) and another account that is the same identity as the new youtube account
General Principle/Color Scheme - Anything but blue
All beta Stack Exchange sites have the same light blue design which I am kind of sick of, but it doesn't stop there. Looking at all the SE sites, I quickly categorized the non-beta computer-related sites as blue or not blue, based on their icon ...
should stack underflow result in a magical zero appearing from thin air and being returned, or a fatal error? the magical zero could result in unexpected ZeroDivisionError...
@Calvin'sHobbies not that it really matters but... where's the blue in programmers?
@cat Note that in Python or returns the first True value, so 2 or 0 returns 2 and 0 or 3 returns 3. any((2,3)) returns True, whereas 2 or 3 returns 2. In most cases it won't affect what you're doing, but it's a subtlety worth bearing in mind if you want to use the return value for anything other than truth testing.
What is our policy on expression bodies? I see many valid JS answers using anonymous functions like function(a,b){return a*b;}. This needs to be assigned to be executed. A similar solution in C# would be (int a, int b)=>a*b;. Would this be acceptable?
This is obviously a named function.
def g(h):
return h * 2
However, not all functions are named. This is an anonymous function, which is still a function.
lambda h: h * 2
You may easily notice that you can assign the function.
g = lambda h: h * 2
However, even without this, the functio...
@Doᴡɴɢᴏᴀᴛ Minor point: When a code block only has one byte it still says "bytes". And I agree that only blocks in answers should be counted. Or do I agree? Maybe..
Hey so I'm new to coding and all & I'm going to start college in a few weeks, I'm going to major in computer science & my dream is to develop games & I'm just wondering if you guys can give me some tips, classes to take, books, videos to watch, or anything just to get familiar with coding and eve...
The challenge
Write a function or a program that takes a string composed by one or more subjective personal pronouns, separated by a + symbols, as an argument. The output must by a single pronoun, that is the result of the relation defined in the next paragraph.
Of course, feel free to edit as ...
The challenge
Well, I think it is quite clear, isn't it? You have to make a function or a program that takes a string as an argument and outputs the corrispondent Yoda-speaking.
This is code-golf, so least number of bytes wins.
The input
The input could be any string. You can translate a stri...
Browsing the site now works on codegolf.xyz. Login is disabled for security reasons until I finish the OpenID integration and SSL. Not yet there: Meta and chat.
The idea of Programming Puzzles & Code Golf is excellent. Putting-out challenges, submitting your take on the solution, receiving feedback. But it seems to be mainly code golf, and this then just seems to be a 'race to the bottom' for all the 'golfing languages'. These languages are great, but le...
As 2015 comes to an end, let's kick off Best of Code Review 2015!
All Code Review users will be invited to nominate (link to) the best questions and answers from this year, and showcase them as examples of what great CR questions and answers should look like. Prizes in the form of bounties will...
At the end of each year, our nemesis friendly neighbours at Code Review vote for the best questions and answers from that year. I think that is a great tradition we should steal adopt here as well, because it allows us to showcase some of the amazing content we've created and potentially reward t...
@MartinBüttner Why might <pre><code> ... </code></pre> fail, and let some of the line within it not get displayed, while <code>ing lines that come after the </pre>?