standards

Passing a pointer to a member function as a template argument. Why does this work?

I have some code that 100% works for the use case I have. I'm just wondering if anyone can explain how and why it works. I have a template class that sits between some code that handles threading and network communication and the library user to pass data received from the server to the user. template <class Bar, class Baz...

Vertical alignment of empty inline-block elements

Consider the following html/css: <style> span { display:inline-block; width:5em; height:5em; padding:1em; } </style> a <span style="background-color:blue;">b</span> <span style="background-color:green;"></span> <span style="background-color:red;">c</span> d The blue and red boxes, plus the text both inside and surrounding the...

Standard change comments

I am looking for some direction as to a standard format for commenting changes in PHP. Continually while working with an assortment of developers on large scale projects, comments run wild and in most cases changes are either poorly commented or not commented at all. Here is an example, please feel free to expand on it: /** * Author...

Standards for using inner classes for GUI?

Hi, I'm wondering about the standard practice with inner classes (in Java but I suppose it applies to all OO languages). So I have a JFrame subclass ControllerWindow that contains a JPanel subclass MapPanel which I draw onto (so it needs to overwrite paintComponent method) and which needs to implement a mouse listener. My current solutio...

What does it mean to a programmer when their organisation is ISO 9001 registered?

When a dev shop (or any other organisation) is registered as ISO 9001 what impact can this have on a programmer's day-to-day experience? Are any special requirements made of a developer? Is an organisation which conforms to this standard likely to be a better place to work than one that isn't? Is the quality of code/coders proportionally...

Will O3D take flash's place on the web?

O3D is a new google tech that enable 3D rendering within a browser (also 2D rendering), and if it is remotely like real 3D applications it is supposed to be capable of playing videos in the future! O3D on Google labs And flash every web-user and web-developer knows! so what is going be the future of web? the new version of flash and i...

Is there any limit to the characters we can put in HTML 'keywords' meta tag?

So the title says it all I guess... I was wondering if there was a limit, according to the standards, that we should respect while entering keywords in the <meta name="keywords" /> tag inside the HEAD of any HTML page. Please note, I'm not asking how specific search engines take this tag into consideration, but about standards. EDIT: ...

IEEE Std. 1636-2009

Anyone familiar with the new IEEE standard 1636-2009? IEEE trial-use standard for software interface for maintenance information collection and analysis (SIMICA) This document provides an implementation-independent specification for a software interface to information systems containing data pertinent to the diagn...

Recommendations for webapp stucture PHP Jquery mySQL

Im been playing with PHP for a while, whilst not actually doing it for a crust. I have now stumbled upon jquery and have found it really easy to get what I want out of it. Combining all this together I have strung together a webapp but with no formal training I could possibly be going about it all wrong as far as structure goes. What ...

Parsing JSON like data interchange format

I'd like to use a data interchange format that uses no quotation marks. Maybe something based on JSON: {param:value,param:value,param:{[{param:value,param:value}, {param:value,param:value}]}} How should I go about parsing something like that in let's say PHP. Should do it through regular expressions? ...

Declaring a function static and later non-static: is it standard?

Hello, I noticed a very curious behavior that, if standard, I would be very happy to exploit (what I'd like to do with it is fairly complex to explain and irrelevant to the question). The behavior is: static void name(); void name() { /* This function is now static, even if in the declaration * there is no static keyword. Test...

Combination of searches - standardized format?

While thinking about how to best combine search results from different resources on a site (e.g. blog software, forum software, pages etc.) it appeared to me that it would be pretty neat to have a standardized format (possibly XML) to return search results. This could consist of title, excerpt and more meta information like time, author ...

Passing complex data over URL with grace

I'm thinking about using something like: <script src="http://www.example.com/?key={"param":"value"}"&gt; As you can see in the example above a JSON formatted string is being passed over the src URL. The example, of course, doesn't work because both the JSON string and the script tag use double quotes. Here are a few solutions that I ...

Proper use of Arraylist and Java Generics vs Vectors

I have been using vectors in the past and am very familiar with them. I have heard that ArrayLists are faster and more flexible. I am new to using ArrayLists and Java Generics. I am currently using them as follows and receiving a warning about parametrization (Which I thought I did by declaring them <String>. ArrayList<String> arrayList...

Is there a standard way to handle design (CSS) seperate from conditionals in PHP?

Hi folks, I've been working with a developer on a web-based application. I have some experience with html and css mainly, and now that the heavy lifting is done, I'm wanting to start improving the design elements of the program (I know that is NOT the ideal situation, and in a perfect world, all design elements would have been consider...

C# read-only calculated properties, should they be methods?

I have several entities that have calculated fields on them such as TotalCost. Right now I have them all as properties but I'm wondering if they should actually be methods. Is there a C# standard for this? public class WorkOrder { public int LaborHours { get; set; } public decimal LaborRate { get; set; } // Should this be L...

Software Installation Documents

Does anyone know if there is an IEEE standard for software installation instruction documents? ...

Reference for VC9 C++ Language Extensions

Is there a reference somewhere concerning all the C++ extensions the VC9 (SP1) compiler has? Examples would be the __declspec stuff, variadic macros and the compiler intrinsics, although there are also some less noticeable ones like being able to have template function specialisations at class scope, whereas apparently the standard say...

C++ Standard: Unexpected const_iterator in multiset

I recently ran into an odd issue where I'd get a const_iterator instead of the expected iterator when iterating through a multiset. It turned out to be a non-issue for MSVC but g++ gave me an error: error: invalid initialization of reference of type 'myPtr&' from expression of type 'const boost::shared_ptr' Relevant code: ty...

Is "argv[0] = name-of-executable" an accepted standard or just a common convention?

When passing argument to main() in a C or C++ application, will argv[0] always be the name of the executable? Or is this just a common convention and not guaranteed to be true 100% of the time? ...