specifications

Why does Array.prototype.push return the new length instead of something more useful?

前提是你 提交于 2019-12-04 02:22:00
Ever since its introduction in ECMA-262, 3rd Edition , the Array.prototype.push method's return value is a Number : 15.4.4.7 Array.prototype.push ( [ item1 [ , item2 [ , … ] ] ] ) The arguments are appended to the end of the array, in the order in which they appear. The new length of the array is returned as the result of the call. What were the design decisions behind returning the array's new length, as opposed to returning something potentially more useful, like: A reference to the newly appended item/s The mutated array itself Why was it done like this, and is there a historical record of

Where can I find SQL language specification

谁都会走 提交于 2019-12-03 22:22:05
Is there an official SQL standard? I.e. I want to understand what type of expression is supported by SQL language and how this expression evaluated by server? What documents are using for implementation SQL based databases? There is an official SQL standard from the ISO/ANSI committee. Some information can be found here: http://en.wikipedia.org/wiki/Sql However the specification itself is not freely available. You might find some drafts of older specs in the internet if you search for it. A nice explanation of the (yet a bit old) ANSI 99 standard is here: https://mariadb.com/kb/en/sql-99

What's the actual use of the Atomics object in ECMAScript?

做~自己de王妃 提交于 2019-12-03 16:34:38
问题 The ECMAScript specification defines the Atomics object in the section 24.4 . Among all the global objects this is the more obscure for me since I didn't know about its existence until I didn't read its specification, and also Google hasn't many references to it (or maybe the name is too much generic and everything gets submerged?). According its official definition The Atomics object provides functions that operate indivisibly (atomically) on shared memory array cells as well as functions

Is __enter__ and __exit__ behaviour for connection objects specified in the Python database API?

六月ゝ 毕业季﹏ 提交于 2019-12-03 13:04:31
Background I recently discovered the Python with keyword and started seeing its potential usefulness for more prettily handling some scenarios where I'd previously have used try: ... finally: ... constructs. I immediately decided to try it out on the MySQLdb connection object in some code I was writing. I didn't bother reading up on how __enter__ and __exit__ behave in implementors of the Python database API, and naively expected the behaviour to be like that of file objects - all I was expecting was for exit to call connection.close() . Imagine my confusion, then, at this behaviour: >>> with

Bad exit status from /var/tmp/rpm-tmp.ajKra4 (%prep)

爷,独闯天下 提交于 2019-12-03 12:29:22
I am having a weird RPM issue, I am new to it so bear with me... I have the spec file created and when I run to do the build I get an error: /var/tmp/rpm-tmp.ajKra4: line 36: cd: hero-01: No such file or directory error: Bad exit status from /var/tmp/rpm-tmp.ajKra4 (%prep) Then I check that temp file and it is trying to CD to a directory that does not exist.. Should it be creating this in the spec file? if so where? Here is my spec file: Summary: Install Hero Name: hero Version: 01 Release: 1 Group: Billing reporting Source: %{name}-%{version}.tar.gz License: SLA %description Hero billing

Active class versus passive class

匆匆过客 提交于 2019-12-03 11:45:12
In UML specification superstructure 2.5(still Beta, page 203) A Class may be designated by setting isActive to true as active (i.e., each of its instances is an active object). When isActive is false the Class is passive (i.e., each of its instances executes within the context of some other object). I wonder if there is a simple example illustrates the differences in applying each one of them? And elaborate this concept a bit? By definition, Active Objects In UML, active classes, and therefore active objects , exist in their own thread of operations and have their own address space. If

Where is Ruby's ERB format “officially” defined?

天大地大妈咪最大 提交于 2019-12-03 10:56:16
A number of sources (e.g. What is the meaning of erb? and three out of the top four results from this google search ) cite http://ruby-doc.org/stdlib-1.8.7/libdoc/erb/rdoc/ERB.html as the official documentation on the ERB format, but that really just gives you the API rather than the file format. I found a nice little summary in http://docs.puppetlabs.com/guides/templating.html#erb-template-syntax , but there's got to be something more official, right? And who is the "defining authority"? Did this come out of Rails? Since some folks like to know motivation behind questions, I'm looking for

I don't understand what a YAML tag is

大城市里の小女人 提交于 2019-12-03 10:32:19
问题 I get it on some level, but I have yet to see an example that didn't bring up more questions than answers. http://rhnh.net/2011/01/31/yaml-tutorial # Set.new([1,2]).to_yaml --- !ruby/object:Set hash: 1: true 2: true I get that we're declaring a Set tag. I don't get what the subsequent hash mapping has to do with it. Are we declaring a schema? Can someone show me an example with multiple tag declarations? I've read through the spec: http://yaml.org/spec/1.2/spec.html#id2761292 %TAG ! tag

Catch block is not being evaluated when exceptions are thrown from finallys

假如想象 提交于 2019-12-03 10:12:00
This question came about because code that worked previously in .NET 4.0 failed with an unhandled exception in .NET 4.5, partly because of try/finallys. If you want details, read more at Microsoft connect . I used it as the base for this example, so it might be helpful to reference. The code For the people who chose to not read about the details behind this question, here is a very quick look at the conditions where this happened: using(var ms = new MemoryStream(encryptedData)) using(var cryptoStream = new CryptoStream(encryptedData, decryptor, CryptoStreamMode.Read)) using(var sr = new

When can I safely use the new <main> element in HTML5?

ⅰ亾dé卋堺 提交于 2019-12-03 07:34:29
问题 On the 16th December, a HTML5 extension specification for the <main> element was submitted to the W3C under something called an editors draft. The abstract is as follows: This specification is an extension to the HTML5 specification [HTML5]. It defines an element to be used for the identification of the main content area of a document. All normative content in the HTML5 specification, unless specifically overridden by this specification, is intended to be the basis for this specification. The