standards

Is there a standard resource for the “default action” of HTML elements? [closed]

寵の児 提交于 2019-12-05 16:31:33
I'm wondering if there is a defined standard for what the default action is of various HTML elements. I've looked at the W3C's HTML specification and while they are very precise with what attributes can be used with elements (and also some behavioural stuff such as exactly what gets included with form submission) there's nothing about the behaviour of elements. I've also checked out the Mozilla JS reference , and found nothing there either. In particular I'm looking for the default behaviour of a form submit button; I've seen in different places that its default action is to submit the form

Stop system entering 'standby'

跟風遠走 提交于 2019-12-05 16:14:51
How can i stop the host machine entering standby mode while my application is running? Is there any win32 api call to do this? There are two APIs, depending on what version of Windows. XP,2000, 2003: http://msdn.microsoft.com/en-us/library/aa373247(VS.85).aspx Respond to PBT_APMQUERYSUSPEND. Vista, 2008: http://msdn.microsoft.com/en-us/library/aa373208(VS.85).aspx There could be many valid reasons to prevent the computer from going to sleep. For example, watching a video, playing music, compiling a long running build, downloading large files, etc. This article http://www.codeguru.com/cpp/w-p

Difference between int and signed int declaration

 ̄綄美尐妖づ 提交于 2019-12-05 15:52:22
问题 I am reading some tutorials on embedded programming and one of them says int and signed int are different but does not explain how or why. I understand why unsigned int and int are different but int and signed int being different is a new one for me. 回答1: It is for historical reasons only. Today whenever you declare int you get a signed int . The only point where you might see a difference even with today's compilers is with char versus signed char which are different by specification (and

Changes in POSIX 2013 revision

假如想象 提交于 2019-12-05 15:30:28
According to the POSIX FAQ , the standard has been revised and ratified by IEEE in 2013. What changed from the previous standard, from 2008? According to the abstract in the online edition , POSIX.1-2008 is simultaneously IEEE Std 1003.1™-2008 and The Open Group Technical Standard Base Specifications, Issue 7. This 2013 Edition includes IEEE Std 1003.1-2008/Cor 1-2013 incorporated into IEEE Std 1003.1-2008 (the base document). The 2013 edition incorporates Technical Corrigendum 1 addressing problems discovered since the approval of the 2008 edition. Technical Corrigendum 1, containing the

Column type and size for international country subdivisions (states, provinces, territories etc)

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-05 15:07:54
I apologize if this is a duplication. What column standardization would you use for storing international country subdivision data? For example, if it was just US and Canada I believe all subdivisions have a 2-character abbreviation... which might lend to a Char(2) This cannot possibly be sustainable internationally lest we presume there are only 1296 (A-Z, 0-9) subdivisions. I've been unsuccessful locating an ISO list of these or even an indication of how to store them. That's fine, I don't need to know them all now but I would like to know that there is a standard and what standard info to

mysql should i use apostrophe in mysql queries?

大城市里の小女人 提交于 2019-12-05 13:25:28
What is the correct way of writing a query to a MySQL database on numeric data-types: SELECT * FROM accounts WHERE id = 5; or SELECT * FROM accounts WHERE id = '5'; Mainly I prefer the last one, using ' because it is more consistent with text data-types. Does it effect the performance? Quotes are for strings, MySQL is going to read those quotes and then cast it to an integer, this is slower then just handing it an int to begin with. Honestly the performance difference is minor, but it is just like writing a program that stores numbers in strings and then casts to int when it needs to do some

Storage Commitment Service: why I really need a what is the real purpose?

送分小仙女□ 提交于 2019-12-05 13:14:20
I'm wondering why I really need of commitment after a c-store command; I can understand the commit is a sort of assurance about the fact the message was actually taken in charge by the storage and the storage takes the responsibility of it, but I wonder why is not safe enough to rely on the response status ? I read some explanations about that but none convinced me all the way. As far as I understood a commit can be required or better desirable basically because you can not totally trust the system you are sending the message to. Well it sound like: when you insert a record in a database table

Move semantic with std::function

两盒软妹~` 提交于 2019-12-05 12:52:17
问题 std::function provides a constructor from an rvalue ref. What happens to the moved function object by standard? Will it be empty so that calling it again has no effects? 回答1: Under 20.8.11.2.1p6, function(function &&f) leaves f in a valid state with an unspecified value . The empty state is a valid state, so you should expect that the moved from function object can be empty. Because function performs type erasure, and function objects can be arbitrarily expensive, the optimisation to leave

c standard and bitshifts

最后都变了- 提交于 2019-12-05 12:47:39
This question was first inspired by the (unexpected) results of this code: uint16_t t16 = 0; uint8_t t8 = 0x80; uint8_t t8_res; t16 = (t8 << 1); t8_res = (t8 << 1); printf("t16: %x\n", t16); // Expect 0, get 0x100 printf(" t8: %x\n", t8_res); // Expect 0, get 0 But it turns out this makes sense: 6.5.7 Bitwise shift operators Constraints 2 Each of the operands shall have integer type Thus the originally confused line is equivalent to: t16 = (uint16_t) (((int) t8) << 1); A little non-intuitive IMHO, but at least well-defined. Ok, great, but then we do: { uint64_t t64 = 1; t64 <<= 31; printf("t64

Is (uint64_t)-1 guaranteed to yield 0xffffffffffffffff?

浪子不回头ぞ 提交于 2019-12-05 12:13:20
问题 I know, that it is well defined by the C standard that (unsigned)-1 must yield 2^n-1, i. e. an unsigned integer with all its bits set. The same goes for (uint64_t)-1ll . However, I cannot find something in the C11 standard that specifies how (uint64_t)-1 is interpreted. So, the question is: Is there any guarantee in the C standard, which of the following holds true? (uint64_t)-1 == (uint64_t)(unsigned)-1 //0x00000000ffffffff (uint64_t)-1 == (uint64_t)(int64_t)-1 //0xffffffffffffffff 回答1: Yes.