Top "Coding-style" questions

**DO NOT USE!

Count all values in a matrix greater than a value

I have to count all the values in a matrix (2-d array) that are greater than 200. The code I wrote …

python arrays coding-style numpy pixel
Conveniently map between enum and int / String

When working with variables/parameters that can only take a finite number of values, I try to always use Java's …

java enums coding-style
Best way to check for nullable bool in a condition expression (if ...)

I was wondering what was the most clean and understandable syntax for doing condition checks on nullable bools. Is the …

c# coding-style nullable
Why should I use var instead of a type?

Possible Duplicate: ReSharper and var After I have installed ReSharper it demands(by warnings) that I use var whenever possible, …

c# .net coding-style resharper var
Is it a good practice to place C++ definitions in header files?

My personal style with C++ has always to put class declarations in an include file, and definitions in a .cpp …

c++ coding-style code-separation
Is it a bad practice to use an if-statement without curly braces?

I've seen code like this: if(statement) do this; else do this; However, I think this is more readable: if(…

if-statement coding-style curly-braces
80-characters / right margin line in Sublime Text 3

You can have 80-characters / right margin line in Netbeans, Text Mate and probably many, many more other IDEs. Is it …

formatting coding-style sublimetext2 sublimetext3 sublimetext
How to stick <footer> element at the bottom of the page (HTML5 and CSS3)?

When I use position relative with no content, footer goes up, with absolute with a lot of content, the footer …

html css coding-style styles footer
Auto-indent spaces with C in vim?

I've been somewhat spoiled using Eclipse and java. I started using vim to do C coding in a linux environment, …

c vim coding-style vi
Setting top and left CSS attributes

For some reason I'm unable to set the "top" and "left" CSS attributes using the following JavaScript. var div = document.…

javascript coding-style