standards

What differences are expected of XHTML5 versus HTML5?

ぃ、小莉子 提交于 2019-11-30 00:20:41
What differences are expected of XHTML5 versus HTML5? I understand that XHTML5 is the XML form of the language and HTML5 is the SGML form of the language, which means obvious minor syntax differences. Will there be any further differences? Will XHTML5 deprecate completely worthless elements that were not deprecated by HTML5? Will XHTML5 be written in schema instead of doctype? Will XHTML5 impose structural validations instead of merely stating what is a child of what? Will XHTML5 offer accessibility advantages that not available in HTML5? Will XHTML5 offer any security enhancements? Please

Why is ::operator new[] necessary when ::operator new is enough?

旧城冷巷雨未停 提交于 2019-11-30 00:07:53
As we know, the C++ standard defines two forms of global allocation functions: void* operator new(size_t); void* operator new[](size_t); And also, the draft C++ standard (18.6.1.2 n3797) says: 227) It is not the direct responsibility of operator new or operator delete to note the repetition count or element size of the array. Those operations are performed elsewhere in the array new and delete expressions. The array new expression, may, however, increase the size argument to operator new to obtain space to store supplemental information. What makes me confused is: What if we remove void*

What's the deal with the banner command?

大憨熊 提交于 2019-11-29 23:08:34
In some versions of UNIX and Linux there's a banner command (usually /usr/bin/banner) that prints great output like this: ##### ####### # ##### # # # # # # # # # # # # # # # # # # ##### # # # # ### # # ####### # # # # # # # # # # # # ##### # # # ##### # # In other versions, the banner command (frequently /usr/games/banner) prints an ENORMOUS banner like you'd make in 1980 with Printshop that are suited for use at birthday parties and stuff. I tend to love using banner for my scripts but it inherently non-portable because of this issue. Is "banner" part of UNIX and why isn't part of the POSIX

C++ empty-paren member initialization - zeroes out memory?

▼魔方 西西 提交于 2019-11-29 22:47:21
问题 I originally wrote some code like this: class Foo { public: Foo() : m_buffer() {} private: char m_buffer[1024]; }; Someone who is smarter than me said that having the m_buffer() initializer would zero out the memory. My intention was to leave the memory uninitialized. I didn't have time to discuss it further, but it piqued my curiosity. Previously, I had thought it was wise to always list each member in the initializer list. Could someone please describe this behavior further? 1) Why does the

Build issue with MSVS 2010 and the C++ standard

戏子无情 提交于 2019-11-29 22:41:35
I'm trying to build, using msvs 2010 the project found at the following git: https://github.com/Joonhwan/exprtk The problem is when I comment out the line 48 '#define exprtk_lean_and_mean' in exprtk.hpp file, I get the following compiler error: Error 1 error C1128: number of sections exceeded object file format limit : compile with /bigobj Googling the error, seems to indicate the the compiled translation unit has compiled to something larger than an arbitariy limit, and adding 'bigobj' to the command line should fix the problem (which it does). Compiling the code with gcc (4.3), works without

How to correctly compute the length of a String in Java?

陌路散爱 提交于 2019-11-29 21:47:43
I know there is String#length and the various methods in Character which more or less work on code units/code points. What is the suggested way in Java to actually return the result as specified by Unicode standards ( UAX#29 ), taking things like language/locale, normalization and grapheme clusters into account? The normal model of Java string length String.length() is specified as returning the number of char values ("code units") in the String. That is the most generally useful definition of the length of a Java String; see below. Your description 1 of the semantics of length based on the

For { A=a; B=b; }, will “A=a” be strictly executed before “B=b”?

别来无恙 提交于 2019-11-29 21:14:51
Suppose A , B , a , and b are all variables, and the addresses of A , B , a , and b are all different. Then, for the following code: A = a; B = b; Do the C and C++ standard explicitly require A=a be strictly executed before B=b ? Given that the addresses of A , B , a , and b are all different, are compilers allowed to swap the execution sequence of two statements for some purpose such as optimization? If the answer to my question is different in C and C++, I would like to know both. Edit: The background of the question is the following. In board game AI design, for optimization people use lock

Best practices for consistent and comprehensive address storage in a database [closed]

喜夏-厌秋 提交于 2019-11-29 20:12:03
Are there any best practices (or even standards) to store addresses in a consistent and comprehensive way in a database ? To be more specific, I believe at this stage that there are two cases for address storage : you just need to associate an address to a person, a building or any item (the most common case). Then a flat table with text columns (address1, address2, zip, city) is probably enough. This is not the case I'm interested in. you want to run statistics on your addresses : how many items in a specific street, or city or... Then you want to avoid misspellings of any sorts, and ensure

Standard use of 'Z' instead of NULL to represent missing data?

╄→尐↘猪︶ㄣ 提交于 2019-11-29 20:06:27
Outside of the argument of whether or not NULLs should ever be used: I am responsible for an existing database that uses NULL to mean "missing or never entered" data. It is different from empty string, which means "a user set this value, and they selected 'empty'." Another contractor on the project is firmly on the "NULLs do not exist for me; I never use NULL and nobody else should, either" side of the argument. However, what confuses me is that since the contractor's team DOES acknowledge the difference between "missing/never entered" and "intentionally empty or indicated by the user as

Proper URL forming with Query String and Anchor Hashtag

99封情书 提交于 2019-11-29 20:04:45
When both a query string and anchor tag (hash tag) are visible in a URL, what is the proper order for them to appear? http://www.whatever.com?var=val#anchor or http://www.whatever.com#anchor?var=val Is there any documentation on this? update: The URLs are being handled by Wordpress / PHP blitzmann ?var=var#hash everything after # is client side. Also, look into url rewriting to get rid of ugly ?var=var billy ? should come before the # as noted in RFC 3986 : relative-ref = relative-part [ "?" query ] [ "#" fragment ] Taken from an answer over at superuser ( https://superuser.com/questions