Menu
  • HOME
  • TAGS

What are the differences between javascript's Set and a regular plain object?

javascript,documentation,specifications,ecmascript-6

First off, here's a post with code that shows how to start to use a plain Javascript object for set-like behavior (with some limitations). And, here's a set of objects (that work in ES5) for getting lots more set-like behavior. And, here a partial ES6 polyfill for the Set object...

Is there any test(quiz) description format?

api,standards,specifications

A standard that describes test questions so that those questions can be rendered in any conformant tool? If I've understood correctly, you're looking for QTI. ...

Guarded function calls in C

c,debugging,assert,specifications

You mean something like this? #include <stdio.h> #if 1 #define foo(...) GUARD(foo, pre, post, (__VA_ARGS__)) #define GUARD(F, PRE, POST, ARGS) (POST(F(PRE ARGS))) //exactly equivalent to #define foo(...) post(foo(pre(__VA_ARGS__))) #endif int pre(int n) { printf("pre %d\n", n); return n; } int post(int n) { printf("post %d\n", n); return n; } int...

Is there a command to get file history of a P4 client spec?

client,perforce,specifications

Client specs, like other spec objects, can be archived in the Perforce "spec depot". Unfortunately, the spec depot is not enabled by default, so if you haven't already enabled it, you won't have the older versions of specs. Here's how to enable and use the spec depot: http://answers.perforce.com/articles/KB/2445/...

Is there any way to see JavaScript default methods source-code?

javascript,specifications

In the code for SpiderMonkey's JavaScript Array implementation (used in Firefox), you'll want to start by looking at the array_sort and array_reverse functions. More generally, look for the array_methods constant; it has indices to the relevant functions. In the code for V8's JavaScript Array implementation (used in Chrome and Opera),...

Does java.util.HashSet not Adhere to its Specification?

java,documentation,hashset,specifications

You're not overriding equals (you're overloading it). equals need to accept an Object as argument. Do something like @Override public boolean equals(Object o) { if (!(o instanceof Point)) return false; Point other = (Point) o; return x == other.x && y == other.y; } (and same for Edge) It's also...

Is the async/await transformation process specified?

c#,.net,asynchronous,specifications

It seems to be a implementation detail as it tends to change. E.g. c#6 will introduce await in catch/finally clauses (the idea in general described here). However, there are some deep-dive details about how awaiters are implemented in c#5. Look at links, especially this: Async Codegen (ppt). Such that a...

Can type selectors be repeated to increase specificity?

css,css-selectors,specifications,css-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...

Precision of SVG coordinates?

browser,svg,coordinates,precision,specifications

The SVG specification says double precision. No UA implements this though because they are all constrained by platform capabilities such as direct3d which are generally single precision.

Default name for database objects

jpa,jpa-2.0,specifications

It is the chapter "2.13 Naming of Database Objects" that specifies that (JPA 2.0 spec). This specification requires the following with regard to the interpretation of the names referencing database objects. These names include the names of tables, columns, and other database elements. Such names also include names that result...

Can Media Type's suffix and subtype be used interchangeably?

http,content-type,specifications,media-type

a) RFC 2616 is obsolete. Please look at RFC 7231. b) I wouldn't use html+json for something that is a mix of HTML and JSON; you'd really need to translate all markup to JSON (at which point you'd realize that JSON doesn't work well for markup languages). c) But yes,...

ASP.NET WebForms Specification

asp.net,specifications

this link can help? http://www.asp.net/web-forms Is the main source with examples and tutorials...

C++ language memory model

java,c++,memory,model,specifications

This is possible because Java VMs were written using non-portable knowledge of the memory models of the implementations of C++ that compiled them. The introduction of a memory model into C++11 is useful since it provides a standard model, and so future C++ code does not need to rely on...

Spring Data JPA. How to get only a list of IDs from findAll() method

spring,spring-data-jpa,specifications,criteria-api

I solve the problem. (As a result we will have a sparse Customer object only with id and name) Define their own repository: public interface SparseCustomerRepository { List<Customer> findAllWithNameOnly(Specification<Customer> spec); } And an implementation (remember about suffix - Impl as default) @Service public class SparseCustomerRepositoryImpl implements SparseCustomerRepository { private final...

Are these requirements correct (variable relations)

variables,specifications,testcase,requirements

After having seen the original text, it is clear that the equation L - 2 W >= 10 is indeed the author's intent. This constraint makes sense. Anyway, there are two "bugs" left: the textual specification is wrong (should read "The length must be greater than twice the width by...

Is the blink() method really deprecated?

javascript,deprecated,specifications,ecmascript-6

Yes I think the description at the top of Annex B, where all these methods are defined, is pretty clear (emphasis mine): The ECMAScript language syntax and semantics defined in this annex are required when the ECMAScript host is a web browser. The content of this annex is normative but...

Do I put the following parts in “non functional needs”?

specifications,requirements

This question (and my answer) is a rather subjective one as people can have different opinions and there is no true accepted standard here but I try to explain my reasoning nevertheless. The required (or implemented) data format is definitely a functional requirement as it defines how your application communicates...

Should variable bound in SELECT clause be accessible in ORDER BY?

scope,sparql,specifications

Sparql.org's query validator says it's legal. This is actually a pretty important case, since we want to be able to do things like: select ?min ?max ((?max - ?min) as ?range) { #-- ... } order by ?range ...

coq — function power definition

math,specifications,coq

With the pow_func function that gallais defined, you can state your specification as lemmas, such as: Lemma pow_func0: forall (A:Type) (f: A -> A) (x: A), pow_fun f O x = f x. and Lemma pow_funcS: forall (n:nat) (A: Type) (f: A->A) (x:A), pow_fun f (S n) x = f...

What's the benefit of exceptions specification in Java?

java,c++,exception,specifications

You have to specify only checked exceptions (subclasses of the Exception class) in the method signature. Unchecked exceptions (subclasses of the RuntimeException class) don't need to be specified. Specifying exceptions in method signature is an inherent Java practice defined by the language semantics. But there is also much controversy about...

msbuild clcompile specification? (Mapping of switches to XML properties)

xml,msbuild,tags,specifications

You can see all the property pages and configuration options by right clicking your project and selecting Properties. Clicking on a property gives the command line switch to pass in and a brief description. Here is a link to all the compiler switches and what they do: Compiler Options Listed...

How is class A * A; declaration parsed by C++?

c++,class,types,specifications

Yes, the inline declaration is just syntactic sugar. You're forward-declaring that name and using it on the same line.

Activity stream object structure

django,specifications,activity-streams

I think you need something like this Lee (actor) was awarded (verb) the medal (action object) This form might be more useful for you to use in Action Streams, which let you "follow" things that Lee does/are done to him...

Is this comparison behavior well-defined?

javascript,specifications,readability

Yes, evaluation order is well defined in Ecmascript § 11.9.4. x !== (x = y) will get the value of x before assigning the value of y to x.

What is the definition of “program” according to C#?

c#,programming-languages,language-lawyer,specifications

Either or. Based on the above definition, a program is a concept rather than a physically defined boundary. As such, it could be a single dll or a large collection of assemblies.

Official ld linker spec

c++,linker,specifications

You might get more idea about linker and shared libraries here also here is man page for ld.so which is linker. Here is brief description about linker and loaders in Linux. ...

How can the offset for a JVM jump instruction be 32768?

java,c,casting,jvm,specifications

The argument to if_icmpge is an offset, but javap shows the jump target as an absolute position. That is, javap should show a getstatic at 32768: and not 32770: (i.e., 2 + 32768).

Shortcut for denoting or implying getters and setters in UML class diagrams

uml,getter-setter,class-diagram,specifications

You are correct: there is no need to include the (noise of) "boilerplate" signatures of standard setters and getters in a class model. Unfortunately, UML does not define a standard notation for implying getters and setters for private attributes. So, you'd have to use your own convention. For instance, you...

Combining Spring Data query builder with Spring Data JPA Specifications?

jpa,spring-data,specifications,query-builder

There is no such feature. Specifications can only be applied on JpaSpecificationExecutor operations. Update The data access operations are generated by a proxy. Thus if we want to group the operations (as in findByName + Criteria) in a single SELECT call, the proxy must understand and support this kind of...

RPM spec for glibc

rpm,glibc,specifications

As suggested in the comments, the best solution for RPM .specs (which are not available by default in the software source package) is taking it from appropriate source RPM.

CSS Spec - Atomic Inline Level Boxes

css,specifications

It means that the box is a singular, solid unit, and that it cannot be split across lines like an inline box can when its text cannot all fit on a single line. See section 9.4.2 which describes this splitting behavior and the terms "inline formatting context" and "line box"....

XML Spec: Union of xs:date, xs:gYearMonth, xs:gYear?

xml,types,specifications,xml-validation

"Union" here is in the set theoretical sense. So, any value that satisfies the constraints of xs:date or xs:gYearMonth or xs:gYear will be valid. In other words, a full date, just the year and month, or just the year are acceptable. See the date/time Seven-Property Model and Lexical Mappings for...

How can a type have multiple supertypes which are array types, and not itself be an array type?

java,types,specifications,inference

Say you have a Double[] and the options are Number[] or Object[] then Number[] is the most specific match. When performing type inference, there might be multiple constraints. It might even infer the type (Serializable[] & Comparable[])

What do “positive” and “negative” mean in ECMAScript? +0 and -0

javascript,language-lawyer,specifications

The terms "positive number" and "negative number" are indeed defined in the ECMAScript spec: 8.5 The Number Type The Number type has exactly 18437736874454810627 (that is, 264−253+3) values [...] The 9007199254740990 (that is, 253−2) distinct “Not-a-Number” values of the IEEE Standard are represented in ECMAScript as a single special NaN...

How to differentiate an implementation from specification

java,tomcat,servlets,specifications

Interfaces/Abstract classes contribute to a spec and the actual implementation of it is what is used by us as the implementation.

Is the window.System object a required part of JavaScript ES6

javascript,specifications,ecmascript-6

The global System object is not part of ES2015. The module loading API, which includes System, was removed from the ES2015 spec in Draft 28, October 2014. Module loading is now tracked by the separate WhatWG loader spec. There is an implementation of the module loader API as specified in...

Initializing a global variable with integer-casted global variable pointer in C

c,compiler-errors,initialization,standards,specifications

Which part of C specification makes this erroneous? Since pstr is global, it has static storage duration. Therefore, section 6.7.8.4 of the C99 standard applies: All the expressions in an initializer for an object that has static storage duration shall be constant expressions or string literals. The address of...

Does Tomcat implement or run the Java Servlet and the JavaServer Pages (JSP) specifications?

java,jsp,tomcat,servlets,specifications

JavaServerPages (JSR 245) and Java Servlet (JSR 315) are Java specifications. They are just that: a set of guidelines that are joined in a document full of words about what they are, how they should behave, etc.. Now here's the answer to your question: Vendors take those specifications to make...

Any wireless chipsets with open specifications?

hardware,wireless,specifications

You have OpenWRT which is a fully capable open source router operation system, TP-LINK products are based on OpenWRT. You may be also interested in https://www.zigbee.org/ more oriented to the Internet of Things and M2M wireless sensor networks....

Partially specification in method of a class with more than two templates

class,templates,methods,overloading,specifications

the error comes from line 19, where you define a new template class A with one template parameter, which inherits from the template class A with three parameters. This new class cannot have the same name as the old one, that's why the compiler complains. If your real application has...