I am sure a lot of people will argue both ways and unfortunately there seems to be no 'official answer'. Part of my just wants to write and not pay any attention to this seemingly insignificant detail but I am curious how does the SO community feel about one option over the other? If you have an opinion state it and give supporting rea...
Just a question that came up from time to time at my old job when we were considering fleshing out our development staff with additional bodies. Does it really matter, if you are a .NET development house, if your developers all code in one language vs another.
I probably started out like alot of the 4million other folks there with Visu...
This code illustrates something that I think should be treated as bad practice, and elicit warnings from a compiler about redefining or masking a variable:
#include <iostream>
int *a;
int* f()
{
int *a = new int;
return a;
}
int main()
{
std::cout << a << std::endl << f() << std::endl;
return 0;
}
Its output (compiled with ...
A global variable's scope is in all the files.. while a static global variable's scope is just the file where it is declared.. why so ? where are global or static global variables stored in memory ?
...
I have some ideas, but I really want to know what makes things go smoothly for you when modeling database:
Table name matches Primary Key name and description key
Schemas are by functional area
Avoid composite primary keys where possible (use unique constraints)
Camel Case table names and field names
Do not prefix tables with tbl_, or...
I'm dabbling with the idea of setting up PHP CodeSniffer on our continuous integration server in an effort to improve the quality of our code-base. After reading the documentation I'm very excited about the idea of normalizing and enforcing our coding standards. However, I'm left wondering about the actual improvement to our product. I'm...
I have seen it asserted several times now that the following code is not allowed by the C++ Standard:
int array[5];
int *array_begin = &array[0];
int *array_end = &array[5];
Is &array[5] legal C++ code in this context?
I would like an answer with a reference to the Standard if possible.
It would also be interesting to know if it mee...
Is there a standards-sanctioned XML format for describing entity queries?
Background: I plan to build a library for writing queries over WCF services.
On the client I want to be able to write (C#):
var customers = from c in service.Customers
where c.Name.StartsWith("P")
order by c.Name
...
After having to register at one more website, and hitting stupid restrictions on the Username (no spaces or special characters), I'm wondering why we still have programmers restricting things like that. Is there a concensus on the methodology of allowable usernames?
...
Why are HTML character entities necessary? What good are they? I don't see the point.
...
I have this web service... It serves up HTML in response to an AJAX request, and the web service needs to be aware of:
the user's specific language
the user's timezone or location
I understand that this is currently quite infeasible. BUT...
It seems that HTML 5 will have a Geolocation API! Awesome. This should take care of my timez...
I want to be able to read vCard and vCalendar data using .NET, I have something which does this, and have looked at the specification.
For those not familar with the format here is some test data from my current application:
BEGIN:VCALENDAR
VERSION:2.0
PRODID:-//Microsoft Corporation//Windows Calendar 1.0//EN
CALSCALE:GREGORIAN
METHOD...
Is there a way to tell ifort or gfortran to just try to parse a source file (no include following, no compilation, no linking, etc) to tell us whether they find the syntax of the file acceptable / valid for a given Fortran version (77, 90, 95, ...) or at least valid at all?
I'm working on a piece of software that will parse and analyze ...
The C++ standard provides the std::set_terminate function which lets you specify what function std::terminate should actually call. std::terminate should only get called in dire circumstances, and sure enough the situations the standard describes for when it's called are dire (e.g. an uncaught exception). When std::terminate does get cal...
I'm writing standards compliant XHTML Strict 1.0, so including the HTML "target" attribute on anchor elements will not do.
I've read 2 fundamentally different ways using Javascript:
Upon document load, find all links with rel='external' and append the target='_blank' attribute.
Use the HTML onClick attribute that fires a Javascript po...
Another chapter from the "arguments between myself and the other senior developer" series :P
My position is that when doing web development, browser code should be written first and foremost to adhere to the W3C web standards, even though Internet Exploder has the greater market share (anywhere between 51% and 79% depending on who is do...
The more I read into Asp.Net MVC the more layers and components I find out are required in order to make my application follow all of the standards and best programming practices.
It's starting to get a bit confusing because some of the new layers don't seem to fit in as easily as the others I learnt. So I just wanted someone to go over...
When compiling a 64bit application, why does strlen() return a 64-bit integer? Am i missing somthing?
I understand that strlen() returns a size_t type, and by definition this shouldn’t change, but... Why would strlen need to return a 64-bit integer?
The function is designed to be used with strings. With that said:
Do programmers commo...
This is brought on by a previous question. Apparently ImageList doesn't support animated GIFs, so I'm stuck animating it myself.
I know how to extract the frames, but does anyone know how to extract the frame timing information from an animated GIF?
...
I work for a large company currently going through a merger. We are working on several projects involving and not involving the merger. One problem I'm noticing is that many of the groups of developers are very fragmented, even though they mostly support many different projects within their own realm of the business, and the databases ...