standards

Latest changes in C11

旧城冷巷雨未停 提交于 2019-11-30 06:22:00
问题 C1x has become ISO/IEC 9899:2011 aka C11. Does anyone know what changes (if any) there are in the Standard from the April 2011 draft n1570? ETA: There are the Committee minutes from London (March 2011) (which should be included in n1570) here, and from Washington, DC (October 2011) here; I suppose a list of accepted changes in the DC minutes should cover things. 回答1: I just learned today that there was one (somewhat) significant change between N1570 and the final C11 standard (ISO/IEC 9899

What are some of your most useful database standards?

冷暖自知 提交于 2019-11-30 06:08:07
问题 Locked . This question and its answers are locked because the question is off-topic but has historical significance. It is not currently accepting new answers or interactions. I have some ideas, some that I have accumulated over time, 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

In an ISO 8601 date, is the T character mandatory?

拜拜、爱过 提交于 2019-11-30 05:40:32
I'm wondering if the following date is ISO8601 compliant : 2012-03-02 14:57:05.456+0500 (for sure, 2012-03-02T14:57:05.456+0500 is compliant, but not that much human readable !) IOW, is the T between date and time mandatory ? It's required unless the "partners in information interchange" agree to omit it. Quoting the ISO 8601 standard , section 4.3.2: The character [T] shall be used as time designator to indicate the start of the representation of the time of day component in these expressions. [...] NOTE By mutual agreement of the partners in information interchange, the character [T] may be

CRTP and dynamic polymorphism compile error

杀马特。学长 韩版系。学妹 提交于 2019-11-30 04:55:13
问题 class A { virtual A* foo() = 0; }; template<class T> class B : public A { virtual T* foo() { return nullptr; } }; class C : public B<C> { }; This is a simplified implementation for Possibility to mix composite pattern and curiously recurring template pattern. I get the following error: Return type of virtual function 'foo' is not covariant with the return type of the function it overrides ('C *' is not derived from 'A *') Tested on clang 3.0, gcc 4.7 and visual studio 2008. First solution:

Whats the standard way of getting the last insert id?

那年仲夏 提交于 2019-11-30 04:47:38
问题 What's the sql standard to get the last inserted id? If there is such a thing. mysql: LAST_INSERT_ID() postgresql: ... RETURNING f_id mssql: SCOPE_IDENTITY() ... more examples here ... I mean, all databases have different implementations for that, there isn't a standard for such a common task? 回答1: See this answer Retrieve inserted row ID in SQL In short, there is no cross database way to do this, except MAX(ID) - but that is not a guaranteed result and has many many pitfalls, e.g. other

Why does the .tagName DOM property return an uppercase value?

我们两清 提交于 2019-11-30 04:47:37
For example, if we have <html> <head> <title>FooBar</title> </head> <body></body> </html> If we do document.getElementByTagName("title").TagName , then we will have TITLE (uppercase). While the html standards recommends writing html tags in lowercase. I know there is no relationship between both, but this still doesn't make sense. Is there any reason that DOM should return tag names in uppercase? Technically, this is mandated in DOM Level 1 : The HTML DOM returns the tagName of an HTML element in the canonical uppercase form, regardless of the case in the source HTML document. The convention

Does inheriting constructors work with templates in C++0x?

两盒软妹~` 提交于 2019-11-30 04:40:25
In C++0x, you can use the using keyword to inherit constructors, like so: class B { B(int) {} }; class A : public B { using B::B; }; Which will implicitly declare an A(int) constructor. Does this work with templates? class B { B(int) {} }; template<class T> class A : public T { using T::T; }; Within T::T , I expect the compiler to figure out the left hand T since using the scope operator on template arguments is normal, but figuring out that the right hand T is the constructor is a special case. In fact it appears there's an ambiguity: what if I have a method called T in B that I'm trying to

Objective-C standards document

无人久伴 提交于 2019-11-30 04:38:19
I'm a C and C++ programmer trying to get started with Objective-C. I'm really bewildered, though, by the apparent total absence of a standards document for the language and standard library. I can understand that there's no ISO standard, but is there no reference document at all? And how is it that nobody seems very concerned about this state of affairs? (Admittedly, it's hard to Google for such a thing, because "reference", "document", and "standard" are all overloaded terms. So it's possible that I've just missed something critical.) This question gets close to asking the same thing: Where

Size attribute for an input field not being honored

余生颓废 提交于 2019-11-30 04:28:53
Taken directly from W3Schools : Definition and Usage The size attribute specifies the width of an input field. For <input type="text"> and <input type="password"> , the size attribute defines the number of characters that should be visible. For all other input types, size defines the width of the input field in pixels. So.. If that is true why is my field <input type="text" size="2"/> wide enough to display 5 CAPTIAL MMMMM's ? Gaurav The same "erroneous" information is specified in the HTML4 Spec, the HTML5 spec, Sitepoint, Mozilla Developer Network, and Microsoft's MSDN library. So it isn't

Does standard C++11 guarantee that memory_order_seq_cst prevents StoreLoad reordering of non-atomic around an atomic?

假如想象 提交于 2019-11-30 04:01:46
Does standard C++11 guarantee that memory_order_seq_cst prevents StoreLoad reordering around an atomic operation for non-atomic memory accesses? As known, there are 6 std::memory_order s in C++11, and its specifies how regular, non-atomic memory accesses are to be ordered around an atomic operation - Working Draft, Standard for Programming Language C++ 2016-07-12: http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2016/n4606.pdf § 29.3 Order and consistency § 29.3 / 1 The enumeration memory_order specifies the detailed regular (non-atomic) memory synchronization order as defined in 1.10 and