Stack Overflow Weekly Newsletter
Stack Overflow Weekly Newsletter

Top new questions this week:

Why does NaN - NaN == 0.0 with the Intel C++ Compiler?

It is well-known that NaNs propagate in arithmetic, but I couldn't find any demonstrations, so I wrote a small test: #include <limits> #include <cstdio> int main(int argc, char* argv[]) ...

c++ c floating-point ieee-754 intel-c++  
asked by imallett 239 votes
answered by Petr Abdulin 261 votes

Fastest way to sort 10 numbers? (numbers are 32 bit)

I'm solving a problem and it involves sorting 10 numbers (int32) very quickly. My application needs to sort 10 numbers millions of times as fast as possible. I'm sampling a data set of billions of ...

c++ c algorithm sorting  
asked by bodacydo 91 votes
answered by m69 90 votes

Why is "short thirty = 3 * 10" a legal assignment?

If short is automatically promoted to int in arithmetic operations, then why is: short thirty = 10 * 3; A legal assignment to the short variable thirty? In turn, this: short ten = 10; short three ...

java short type-promotion  
asked by Ceiling Gecko 70 votes
answered by TheLostMind 106 votes

Inaccuracy of decimal in .NET

Yesterday during debugging something strange happened to me and I can't really explain it: So maybe I am not seeing the obvious here or I misunderstood something about decimals in .NET but ...

c# .net decimal floating-accuracy  
asked by 10rotator01 43 votes
answered by Luaan 59 votes

Do dotfiles have a file extension?

Do dotfiles, such as .htaccess .gitignore and .config, have a file extension and no filename or are they considered to have a filename and no extension? I'm trying to implement some utility ...

filenames file-extension dotfiles  
asked by zzzzBov 35 votes
answered by Jonathan Leffler 19 votes

Make C floating point literals float (rather than double)

It is well known that in C, floating point literals (e.g. 1.23) have type double. As a consequence, any calculation that involves them is promoted to double. I'm working on an embedded real-time ...

c gcc floating-point literals  
asked by Zeus 28 votes
answered by ameyCU 30 votes

Is undefined behavior only an issue if you are deploying on several platforms?

Most of the conversations around undefined behavior (UB) talk about how there are some platforms that can do this, or some compilers do that. What if you are only interested in one platform and only ...

c++ undefined-behavior  
asked by Glenn Teitelbaum 25 votes
answered by Yakk 21 votes

Greatest hits from previous weeks:

Delete a Git branch both locally and remotely

I want to delete a branch both locally and on my remote project fork on GitHub. Successfully Deleted Local Branch $ git branch -D bugfix Deleted branch bugfix (was 2a14ef7). Note: The uppercase -D ...

git github git-branch git-remote  
asked by Matthew Rankin 5523 votes
answered by Matthew Rankin 6360 votes

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. 893 votes
answered by Steve 1876 votes

Can you answer these?

Unable to Localize Custom Keyboard iOS

I am trying to implement a keyboard extension, which can display keys depending upon the language chosen by the user in Settings of the device. In Edit Scheme, I have correctly setup the Application ...

ios ios8 ios-keyboard-extension  
asked by iAnum 6 votes

Old School Sound Programming in Python

A long time ago in a galaxy far away, there were microcomputers which ran BASIC and had simple Sound commands which make to machine beep and hiss in all sorts of weird and wonderful ways. As well as ...

python audio retro-computing  
asked by Robin 5 votes

Integrate Cocos2dx project within Swift Project (XCode 6.3)

I have 2 separate Projects one is in Cocos2dx v3.6 and one is in Swift. I want to start a game from the Swift project. How can I do it? I have copied whole cocos2dx project into my Swift project and ...

ios objective-c swift cocos2d-x-3.0 xcode6.3  
asked by Anand 8 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