standards

Does Standard define null pointer constant to have all bits set to zero?

最后都变了- 提交于 2019-11-28 14:24:58
( I'm quoting ISO/IEC 9899:201x ) Here we see that, integer constant expression has an integer type: 6.6 Constant expressions 6. An integer constant expression shall have integer type and shall only have operands that are integer constants, enumeration constants, character constants, sizeof expressions whose results are integer constants, _Alignof expressions, and floating constants that are the immediate operands of casts. Cast operators in an integer constant expression shall only convert arithmetic types to integer types, except as part of an operand to the sizeof or _Alignof operator. Then

What is the rationale for exponent and mantissa sizes in IEEE floating point standards?

混江龙づ霸主 提交于 2019-11-28 14:09:56
I have a decent understanding of how floating point works, but I want to know how the specific exponent and mantissa sizes were decided upon. Are they optimal in some way? How can optimality be measured for floating point representations (I assume there are several ways)? I imagine these issues are addressed in the official standard, but I don't have access to it. According to this interview with Will Kahan , they were based on the VAX F and G formats of the era. Of course that doesn't answer the question of how those formats were chosen... For 32-bit IEEE floats, the reasoning is that the

Authoritative description of ObjectiveC string literals? [closed]

て烟熏妆下的殇ゞ 提交于 2019-11-28 14:07:16
The Apple ObjectiveC description implies that NSStrings exist by showing examples, and that NSString literals are written as @ "<string content>" Amazingly, that's all it says, and these only show up in examples without any discussion. Is that document really the only reference document? Digging around, I found this blog which seems to have a lot of useful information. But is it right? Is there an authoritative document describing precisely what one can say (syntax) in an NSString literal, and what it means (semantics)? For instance, is the syntax of the content of a NSString literal identical

does c++ standard prohibit the void main() prototype?

十年热恋 提交于 2019-11-28 13:39:03
In section 3.6.1.2 of both C++ Standard 1998 and 2003 editions, An implementation shall not predefine the main function. This function shall not be overloaded. It shall have a return type of type int, but otherwise its type is implementation-defined. I am not a native English speaker.I do not sure what does"but otherwise" means.Whether it is to prohibit the other return type,or to give the right to C++ compiler writer? So what's the answer? The english you quote does prohibit declaring main to return void . It is allowing variation in the arguments that come in, but not in the return type.

array initialization, is referencing a previous element ok?

梦想与她 提交于 2019-11-28 13:28:30
const QPointF points[] = { QPointF(r.left() - i, r.top() - i), QPointF(r.right() + i, r.top() - i), QPointF(r.right() + i, r.bottom() + i), QPointF(r.left() - i, r.bottom() + i), points[0] // is this line valid (according to the C++ standard)? }; While this compiles with the MS Visual Studio Compiler, i am not sure if this is valid code according to the C++ Standard. Quotes from the Standard would be highly appreciated. C++03/C++11 answer No, it's not. On the right-hand side of the = , points does exist 1 but the initialiser is only applied after all its operands have been evaluated. If points

If transactions over REST are unachievable, how can REST ever be really useful? [closed]

耗尽温柔 提交于 2019-11-28 13:22:23
问题 As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance. Closed 9 years ago . When looking into REST one of the first things probably anybody will notice is there isn't any transaction semantics defined, some say

Is Struts2-Full-Hibernate plugin the standard way to integrate Struts2 and Hibernate? [closed]

若如初见. 提交于 2019-11-28 13:10:18
I'm starting a project, willing to use Struts2 and Hibernate. Should I use the struts2-full-hibernate plugin , or integrate them differently ? Searching on Internet confused me: is it the standard way to integrate them ? If not, which is the standard way ? Andrea Ligios In a nutshell: Choose a framework for the front-end (usually MVC, then Struts2 , JSF2 , Spring MVC , etc... you've already chosen Struts2. The standard (not necessarily the better nor the most used) in the Java EE 6+ stack is JSF2); Choose a persistence manager: the standard with Java EE 6+ is JPA 2.0 ( JSR 317 - Java

Where can I find a list of proper HTML nesting standards?

我的梦境 提交于 2019-11-28 13:01:49
问题 I've been crawling Stack Overflow and the rest of the web, looking for proper nesting standards in regards to all HTML elements, but the search seems to be in vain. Which is why I am asking, where is there a reference of the proper nesting standards (such as the fact that you can't put <div> tags inside a <p> tag)? 回答1: Try the language definition (hint: there are indexen of elements and attributes if you scroll down to the bottom) EDIT: there's also the latest draft of HTML5 回答2: In HTML5,

How to make IE support min-width / max-width CSS properties?

眉间皱痕 提交于 2019-11-28 11:59:55
Are these properties not considered standard CSS? I'm using something like this, which works properly on Chrome 12, FF4, Opera 11, and Safari 5, but on IE9 the min-width is not respected if width < min-width . <span style="float:left; width:11%; min-width:150px;"> ... </span> Edit: a little annoyed at the liberal editing and migrating of my question, but w/e. Here's a fuller example that shows a clear difference in IE9 vs other browsers. <html><body> <p style="width: 600px"> <span style="float: left; width: 11%; min-width: 150px">Hello.</span> <span style="float: left; width: 11%">World.</span

Calculating moving average/stdev in SAS?

大兔子大兔子 提交于 2019-11-28 11:44:07
Hye guys, I included a screenshot to help clarify my problem: http://i40.tinypic.com/mcrnmv.jpg . I'm trying to calculate some kind of moving average and moving standard deviation. The thing is I want to calculate the coefficients of variation (stdev/avg) for the actual value. Normally this is done by calculating the stdev and avg for the past 5 years. However sometimes there will be observations in my database for which I do not have the information of the past 5 years (maybe only 3, 2 etc). That's why i want a code that will calculate the avg and stdev even if there is no information for the