Stack Overflow Weekly Newsletter
Stack Overflow Weekly Newsletter

Top new questions this week:

Why do we need monads?

In my humble opinion the answers to the famous question "What is a monad?", especially the most voted ones, try to explain what is a monad without clearly explaining why monads are really necessary. ...

haskell monads  
asked by cibercitizen1 134 votes
answered by cibercitizen1 215 votes

C struct inheritance pointer alignment

Background I have created a basic linked list data structure mainly for learning purposes. One goal of the list was that it can handle different data structures. Therefore, I've tried my hand at ...

c  
asked by thndrwrks 30 votes
answered by midor 8 votes

Is static context always single in C#?

I was asked with what I think a very interesting question. I know it sounds crazy, so let's forget about why I need that. Let's say I'm just interested in whether this is possible at all, no matter ...

c# .net  
asked by Archeg 26 votes
answered by Lucas Trzesniewski 43 votes

Is the "lazy man's enable_if" legal C++?

I frequently use a technique I call the "lazy man's enable_if," where I use decltype and the comma operator to enable a function based on some template input. Here is a small example: template ...

c++ c++11 sfinae  
asked by Travis Gockel 25 votes
answered by Columbo 23 votes

slow function call in V8 when using the same key for the functions in different objects

Maybe not the call slow but rather the lookup, i'm not sure, but here is an example: var foo = {}; foo.fn = function() {}; var bar = {}; bar.fn = function() {}; console.time('t'); for (var i = 0; ...

javascript node.js performance google-chrome v8  
asked by Gábor Bokodi 23 votes
answered by Vyacheslav Egorov 31 votes

LINQ's Func<bool> is only called once?

I'm lost on what keywords to google for... Could anyone please point me to an MSDN page or SO answer explaining why Foo() is only called once? Especially since First only has a single overload with a ...

c# linq  
asked by Ilya Kozhevnikov 21 votes
answered by Frédéric Hamidi 23 votes

If parenthesis has a higher precedence then why is increment operator solved first?

I have a single line code int a = 10; a = ++a * ( ++a + 5); My expected output was 12 * (11 + 5) = 192 but I got 187. As much as I knew the increment operator inside () is to be solved first, then ...

java precedence  
asked by Darshan Jain 21 votes
answered by Sotirios Delimanolis 47 votes

Greatest hits from previous weeks:

jQuery scroll To Element

I have this input element: <input type="text" class="textfield" value="" id="subject" name="subject"> Then I have some other elements, like other text inputs, textareas, etc. When the user ...

jquery  
asked by DiegoP. 679 votes
answered by Steve 1494 votes

Checkout remote Git branch

I am trying to checkout a remote branch: Somebody pushed a branch called test with git push origin test to a shared repository. I can see the branch with git branch -r. But how can I get this branch? ...

git git-checkout remote-branch  
asked by Juri Glass 1693 votes
answered by hallski 2583 votes

Can you answer these?

Single-value-tuple as last member of struct in swift

MusicPlayer's API relies on variable length arrays as the last member of a struct to handle passing around data of unknown size. Looking at the generated interface for MusicPlayer, the structs used in ...

swift core-audio coremidi  
asked by griotspeak 6 votes

NSUserDefaults in Swift - implementing type safety

One of the things that bugs me about Swift and Cocoa together is working with NSUserDefaults, because there is no type information and it is always necessary to cast the result of objectForKey to what ...

swift nsuserdefaults type-safety  
asked by Alex 5 votes

Why would Sybase not use a functional index?

I've created a functional index on a sybase table. create index acadress_codpost_lower on acadress(LOWER(l5_codpost)) I then run a complex query that uses the index. Without the index it takes ...

java prepared-statement sybase functional-index  
asked by Tim B 6 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