What is the actual ASCII value of the FNC1 character in GS1 barcodes?

The special function characters such as FNC1 through FNC4 belong to the class of “non-data characters” that can be encoded within various barcode symbologies but with do not have any direct ASCII representation in the decoded data stream. Each symbology that supports such characters has a different scheme for encoding them in its internal representation … Read more

Can type selectors be repeated to increase specificity?

It is possible to increase the specificity of a selector using type selectors, but not conventionally. The reason for this is explained below, but for those who are simply looking for an alternative, there are two of these. You can either chain :not() pseudo-classes containing type selectors in a single compound selector: h1 {} /* … Read more

Nested object initializer syntax

This syntax is called Object Initialization. C# specification clearly gives a lot of examples on this subject: 7.6.10.2 Object initializers An object initializer consists of a sequence of member initializers, enclosed by { and } tokens and separated by commas. Each member initializer must name an accessible field or property of the object being initialized, … Read more

Why are await and async valid variable names?

Reserved keywords cannot be used as identifiers (variable names). Unlike most other special Javascript words (like those listed in the question, let, finally, …), await is not a reserved keyword, so using it as a variable name does not throw a SyntaxError. Why wasn’t it made into a reserved keyword when the new syntax came … Read more

How to create Document objects with JavaScript

There are two methods defined in specifications, createDocument from DOM Core Level 2 and createHTMLDocument from HTML5. The former creates an XML document (including XHTML), the latter creates a HTML document. Both reside, as functions, on the DOMImplementation interface. var impl = document.implementation, xmlDoc = impl.createDocument(namespaceURI, qualifiedNameStr, documentType), htmlDoc = impl.createHTMLDocument(title); In reality, these methods … Read more

Do UNIX timestamps change across timezones?

The definition of UNIX timestamp is time zone independent. The UNIX timestamp is the number of seconds (or milliseconds) elapsed since an absolute point in time, midnight of Jan 1 1970 in UTC time. (UTC is Greenwich Mean Time without Daylight Savings time adjustments.) Regardless of your time zone, the UNIX timestamp represents a moment … Read more

tech