The Wayback Machine - https://web.archive.org/web/20081002052623/http://stackoverflow.com:80/questions
2
votes
7answers
105 views

How do I check if an integer is even or odd?

How best can I check if an integer is even or odd in C? I considered how I'd do this in JAVA, but I couldn't come up with an answer either. Thanks.
3
votes
10answers
147 views

How would you compare IP address?

For my server app, I need to check if an ip address is in our blacklist. What is the most efficient way of comparing ip addresses? Would converting the IP address to integer and …
7
votes
19answers
438 views

Why do we still program with flat files?

Why are flat text files the state of the art for representing source code? Sure - the preprocessor and compiler need to see a flat file representation of the file, but that's easi …
3
votes
4answers
88 views

.NET multiplication optimization

Does the compiler optimize out any multiplications by 1? That is, consider: int a = 1; int b = 5 * a; Will the expression 5 * a be optimized into just 5? If not, will it if a is …
0
votes
2answers
23 views

How to make find | xargs handle spaces? [closed]

In bash, I usually end up using a combination of find | xargs to make modifications for files, such as fixing permissions. However, if the file or folder has spaces in its name, it …
20
votes
56answers
1,575 views

What’s a good non-programming interview question when hiring a programmer?

What is a good non-programming question to ask a candidate during a job interview? I'll post my two favorites below, but I'd like to hear others. Clarification: By "non-programm …
16
votes
51answers
813 views

What do you consider the 1st principle(s) of programming?

I always liked to ask myself "what's the first principle(s) of this?" after I learned the basic stuff of something (e.g. programming). It's an inspiring question, IMO, that can for …
1
vote
1answer
11 views

Error: initializer element is not computable at load time

I have in a function that takes a struct, and I'm trying to store its variables in an array, but I get this when I run gcc -Wall -ansi -pedantic-errors -Werror int detect_prm(Para …
13
votes
22answers
429 views

To ternary or not to ternary?

I'm personally an advocate of the ternary operator: () ? : ; I do realize that it has its place, but I have come across many programmers that are completely against ever using it …
1
vote
3answers
28 views

How can I kill a process by name instead of PID?

For example, sometimes when I try to start Firefox it says a Firefox process is already running. So I have to do this: jeremy@jeremy-desktop:~$ ps aux | grep firefox jeremy 745 …

103050per page