Stack Overflow Weekly Newsletter
Stack Overflow Weekly Newsletter

Top new questions this week:

Why do some C# lambda expressions compile to static methods?

As you can see in the code below, I have declared an Action<> object as a variable. Would anybody please let me know why this action method delegate behaves like a static method? Why does it …

c# .net reflection lambda  
asked by nunu 66 votes
answered by Lukazoid 92 votes

C++ :: why is there injected class name?

Recently, I saw the strange C++ feature, injected class name. class X { }; X x1; class X::X x2; // class X::X is equal to X class X::X::X x3; // .. and so on.. But I cannot figure out why this …

c++  
asked by ikh 46 votes
answered by Jonathan Wakely 57 votes

Is it a premature optimization to use std::move()?

Suppose I have the following code: int main() { std::vector<std::string> strs; std::string var("Hello World"); // Make some modifications to 'var' …

c++ c++11  
asked by Robert Dailey 45 votes
answered by Jonathan Wakely 20 votes

Why is "" == [null] true in JavaScript?

I know JavaScript has lots of insane results with comparisons between types, though I don't fully understand why. Came across this one today. Why does "" == [null] evaluate to true in …

javascript  
asked by Scott Stafford 43 votes
answered by Pointy 64 votes

Zipper Comonads, Generically

Given any container type we can form the (element-focused) Zipper and know that this structure is a Comonad. This was recently explored in wonderful detail in another Stack Overflow question for the …

haskell zipper deriving comonad  
asked by J. Abrahamson 39 votes
answered by pigworker 57 votes

Why an expression instead of a constant, in a C for-loop's conditional?

In many programming competitions I have seen people write this type of for-loop for(i = 0; i < (1 << 7); i++) Unless I am missing something, that's the same as for(i = 0; i < 128; i++) …

c for-loop coding-style expression constantfolding  
asked by harrythomas 33 votes
answered by ouah 54 votes

Lambda-Over-Lambda in C++14

How following recursive lambda call ends/terminates ? #include <cstdio> auto terminal = [](auto term) // <---------+ { // | …

c++ lambda c++14  
asked by P0W 31 votes
answered by Nim 26 votes

Greatest hits from previous weeks:

How do I check if a file exists using Python?

How do I check if a file exists, using Python, without using a try: statement?

python file filesystems  
asked by spence91 1173 votes
answered by rslite 839 votes

How to split a string in C++?

What's the most elegant way to split a string in C++? The string can be assumed to be composed of words separated by whitespace. (Note that I'm not interested in C string functions or that kind of …

c++ split c++-faq stdstring  
asked by Ashwin 1079 votes
answered by Zunino 592 votes

Can you answer these?

How to calculate the trend line

I am trying to calculate the trend line, according to the formula : i got from this site http://classroom.synonym.com/calculate-trendline-2709.html And i have done the trend line in high charts by …

javascript html css highcharts  
asked by John 2 votes

Correct way to do operations on Memmapped arrays

The operation I'm confused about looks like this. I've been doing this on regular Numpy arrays, but on a memmap I want to be informed about how it all works. arr2 = …

python numpy  
asked by user1265125 4 votes

IE10 random image rendering issue

I have a website which displays fine on all browsers (even lower versions of IE than IE10). But, on IE10, the images are having rendering issues like the screenshot attached below. If would have …

html css internet-explorer internet-explorer-10 image-rendering  
asked by ISuthan Bala 2 votes
Subscribe to more Stack Exchange newsletters


Unsubscribe from this newsletter or change your email preferences by visiting your subscriptions page on stackexchange.com.

Questions? Comments? Let us know on our feedback site. If you no longer want to receive mail from Stack Exchange, unsubscribe from all stackexchange.com emails.

Stack Exchange, Inc. 110 William St, 28th Floor, NY NY 10038 <3