specifications

What is the value of the css 'ex' unit?

和自甴很熟 提交于 2019-11-26 21:37:28
(Not to be confused with Xunit , a popular .Net unit testing library.) Today in a fit of boredom I started inspecting Gmails DOM (yes, I was very bored). Everything looked pretty straightforward until I noticed an interesting specification on the widths of certain elements. The illustrious Googlites had specified a number of table cols using the rare 'ex' unit. width: 22ex; At first I was stumped ("what's an 'ex'?"), then it came back to me: I seem to remember something from years ago when first I was learning about CSS. From the CSS3 spec : [The ex unit is] equal to the used x-height of the

Is there a specification of x86 I/O port assignment?

不羁的心 提交于 2019-11-26 20:59:54
问题 I found some information on the web as follows, but incomplete. http://en.wikipedia.org/wiki/Input/output_base_address http://wiki.osdev.org/I/O_Ports Where to download the specification? 回答1: A good source for current (and not from 1994) I/O port map is chipset documentation, e.g. Intel® 7 Series Chipset Family PCH Datasheet (see section 9.3, I/O Map). For example, here are some ports which are commonly used in modern PCs and are not mentioned in the old lists: 2E-2F,4E-4F: Low Pin Count

Nested object initializer syntax

流过昼夜 提交于 2019-11-26 20:45:37
Resharper has just suggested the following refactoring to me: // Constructor initializes InitializedProperty but // the UninitializedSubproperty is uninitialized. var myInstance = new MyClass(); myInstance.InitializedProperty.UninitializedSubproperty = new MyOtherClass(); // becomes var myInstance = new MyClass { InitializedProperty = { UninitializedSubproperty = new MyOtherClass() } }; I've never seen this kind of object initialization before. In particular I don't see how InitializedProperty = { UninitializedSubproperty = new MyOtherClass() } makes any sense - it's not assigning anything to

What's the maximum pixel value of CSS width and height properties?

吃可爱长大的小学妹 提交于 2019-11-26 20:45:22
What are the largest valid px values that CSS width and height properties accept? (I'm currently building a webapp that creates a very large zoomable container element and I want to know what are the actual limits.) Using the CSS inspector that comes with certain browsers on an element with 10000000000px width and height : Firefox: 33554400px Chrome: 33554428px Opera: 33554428px IE 9: 21474836.47px 来源: https://stackoverflow.com/questions/16637530/whats-the-maximum-pixel-value-of-css-width-and-height-properties

Default width/height of an IFrame

北城余情 提交于 2019-11-26 20:07:06
问题 Is there any spec specifying the default width/height of an IFrame? Browsers I tested (FF, IE, Chrome) seem to use 300x150px but I couldn't find any spec on this. Should I ever come in the situation, can I rely on these values or should I always set width/height explicitly? 回答1: I found the answer on the dev-tech-layout mailing list -- it's part of the CSS spec. The default ratio is 2:1 . The default width of 300px is defined in the last paragraph of the CSS spec, section on the width of

Chunking WebSocket Transmission

删除回忆录丶 提交于 2019-11-26 19:08:26
问题 since I'm using WebSocket connections on more regular bases, I was interested in how things work under the hood. So I digged into the endless spec documents for a while, but so far I couldn't really find anything about chunking the transmission stream itself . The WebSocket protocol calls it data frames (which describes the pure data stream, so its also called non-control frames ). As far as I understood the spec, there is no defined max-length and no defined MTU (maximum transfer unit) value

What characters are allowed in an HTML attribute name?

喜你入骨 提交于 2019-11-26 17:33:45
In HTML attribute name=value pairs, what are the characters allowed for the 'name' portion? ..... Looking at some common attributes it appears that only letters (a-z and A-Z) are used, but what other chars could be allowed as well?... maybe digits (0-9), hyphens (-), and periods (.) ... is there any spec for this? Alohci It depends what you mean by "allowed". Each tag has a fixed list of attribute names which are valid, and in html they are case insensitive. In one important sense, only these characters in the correct sequence are "allowed". Another way of looking at it, is what characters

Order of execution of parameters guarantees in Java?

拟墨画扇 提交于 2019-11-26 16:20:26
问题 Given the following function call in C : fooFunc( barFunc(), bazFunc() ); The order of execution of barFunc and BazFunc is not specified, so barFunc() may be called before bazFunc() or bazFunc() before barFunc() in C . Does Java specify an order of execution of function argument expressions or like C is that unspecified? 回答1: From the Java Language Specification (on Expressions): 15.7.4 Argument Lists are Evaluated Left-to-Right In a method or constructor invocation or class instance creation

Is there a Python language specification?

喜夏-厌秋 提交于 2019-11-26 15:53:18
问题 Is there anything in Python akin to Java's JLS or C#'s spec? 回答1: There's no specification per se. The closest thing is the Python Language Reference, which details the syntax and semantics of the language. 回答2: You can check out the Python Reference 回答3: No, python is defined by its implementation. 来源: https://stackoverflow.com/questions/1094961/is-there-a-python-language-specification

Automatic semicolon insertion & return statements [duplicate]

情到浓时终转凉″ 提交于 2019-11-26 13:50:17
This question already has an answer here: What are the rules for JavaScript's automatic semicolon insertion (ASI)? 5 answers As you might know, ECMAscript tries to be smart and will automatically insert semicolons if you didn't write those explicitly. Simple example function foo() { var bar = 5 return bar } will still work as expected. But there are some caveats if you rely on that. If we re-write that function like so function foo() { var bar = 5 return { bar: bar } } ..that function would now return undefined because the interpreter would insert that semicolon right after the return