specifications

Does the JDBC spec prevent '?' from being used as an operator (outside of quotes)?

旧时模样 提交于 2019-11-26 12:31:30
问题 From Sam Macbeth\'s question: Is there anything in the JDBC spec which allows a ? to be escaped and be anything other than a parameter placeholder? For example, Postgres allows you to use ? as an operator: SELECT * FROM tbl WHERE tbl.data ? \'abc\' Would a JDBC driver that lets you use ? as an operator still be JDBC-compliant? 回答1: I think it would be perfectly acceptable if the JDBC driver would allow for the ? operator to be unescaped and used as it is, but it might 1) complicate your

Why is form enctype=multipart/form-data required when uploading a file?

旧街凉风 提交于 2019-11-26 12:22:52
Why is <form enctype=multipart/form-data> required when uploading a file to a web-server? It has to do with how the browser packages binary and form data for transmission over HTTP. By default only form data is sent, but if the form needs to support uploading a file, then the binary data must also be appended and separated from the form data. Scott Hanselman gives a good explanation of this here : HTTP and How File Upload works via HTTP It's always better, for me, to understand WHY and HOW something is happening. If you say "just because" or "whatever, you just add that, and it works" then I

Can type selectors be repeated to increase specificity?

元气小坏坏 提交于 2019-11-26 11:33:51
问题 The spec states regarding calculating CSS specificity: (bold mine) Note: Repeated occurrences of the same simple selector are allowed and do increase specificity. So for example .class.class {} has twice the specificity than .class {} - DEMO However, regarding the term \' simple selector \' the spec has this to say: (bold mine) A simple selector is either a type selector or universal selector followed immediately by zero or more attribute selectors, ID selectors, or pseudo-classes, in any

Java: Rationale of the Cloneable interface

女生的网名这么多〃 提交于 2019-11-26 08:26:57
问题 Why wasn\'t the .clone() method specified in the java.lang.Cloneable interface ? 回答1: Basically, it's a broken interface. Ken Arnold and Bill Venners discussed it in Java Design Issues. Arnold: If I were to be God at this point, and many people are probably glad I am not, I would say deprecate Cloneable and have a Copyable , because Cloneable has problems. Besides the fact that it's misspelled, Cloneable doesn't contain the clone method. That means you can't test if something is an instance

What is the value of the css &#39;ex&#39; unit?

浪尽此生 提交于 2019-11-26 07:59:16
问题 (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

Nested object initializer syntax

白昼怎懂夜的黑 提交于 2019-11-26 07:45:00
问题 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

What&#39;s the maximum pixel value of CSS width and height properties?

☆樱花仙子☆ 提交于 2019-11-26 07:44: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.) 回答1: 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

Java&#39;s L number (long) specification

£可爱£侵袭症+ 提交于 2019-11-26 05:55:46
问题 It appears that when you type in a number in Java, the compiler automatically reads it as an integer, which is why when you type in (long) 6000000000 (not in integer\'s range) it will complain that 6000000000 is not an integer. To correct this, I had to specify 6000000000L . I just learned about this specification. Are there other number specifications like for short, byte, float, double? It seems like these would be good to have because (I assume) if you could specify the number you\'re

What characters are allowed in an HTML attribute name?

。_饼干妹妹 提交于 2019-11-26 05:29:33
问题 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? 回答1: 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

What&#39;s valid and what&#39;s not in a URI query?

∥☆過路亽.° 提交于 2019-11-26 05:17:08
问题 Background (question further down) I\'ve been Googling this back and forth reading RFCs and SO questions trying to crack this, but I still don\'t got jack. So I guess we just vote for the \"best\" answer and that\'s it, or? Basically it boils down to this. 3.4. Query Component The query component is a string of information to be interpreted by the resource. query = *uric Within a query component, the characters \";\", \"/\", \"?\", \":\", \"@\", \"&\", \"=\", \"+\", \",\", and \"$\" are