specifications

Is scala.Singleton pure compiler fiction?

孤街浪徒 提交于 2019-12-01 01:50:07
问题 The Scala Language Specification says under §3.2.1: A stable type is either a singleton type or a type which is declared to be a subtype of trait scala.Singleton. I couldn't find scala.Singleton neither in the sources, in ScalaDoc nor in the binary jar file. Trying on the REPL results in: scala> class Foo extends Singleton <console>:9: error: illegal inheritance from final trait Singleton class Foo extends Singleton ^ <console>:9: error: illegal inheritance; superclass Any is not a subclass

Why is the separator in a TypeScript TypeMemberList semicolon as opposed to comma?

懵懂的女人 提交于 2019-11-30 22:20:19
问题 This is a typescript interface: interface A { l: { x: string; y:number } } But this (similar thing) produces an error: interface A { l: { x: string, y:number } } // => Error: ';' expected. On p.37 of the spec: http://www.typescriptlang.org/Content/TypeScript%20Language%20Specification.pdf I see that indeed it is specified that a ; should appear there, but coming from JavaScript the semicolon in the middle of the object-literal-ish thing looks wrong. Was this decision made to avoid ambiguity

h264 inside AVI, MP4 and “Raw” h264 streams. Different format of NAL units (or ffmpeg bug)

前提是你 提交于 2019-11-30 21:40:22
TL;DR: I want to read raw h264 streams from AVI/MP4 files, even broken/incomplete. Almost every document about h264 tells me that it consists of NAL packets. Okay. Almost everywhere told to me that the packet should start with a signature like 00 00 01 or 00 00 00 01 . For example, https://stackoverflow.com/a/18638298/8167678 , https://stackoverflow.com/a/17625537/8167678 The format of H.264 is that it’s made up of NAL Units, each starting with a start prefix of three bytes with the values 0x00, 0x00, 0x01 and each unit has a different type depending on the value of the 4th byte right after

Why does this code compile when pasted in but fail otherwise?

别说谁变了你拦得住时间么 提交于 2019-11-30 17:53:00
A friend made me look at this page , and noticed a strange piece of code in the signature of one of the forum users. The code is a one-liner that goes as follows: On Local Error Resume Next: If Not Empty Is Nothing Then Do While Null: ReDim i(True To False) As Currency: Loop: Else Debug.Assert CCur(CLng(CInt(CBool(False Imp True Xor False Eqv True)))): Stop: On Local Error GoTo 0 Scrolling removed: On Local Error Resume Next: If Not Empty Is Nothing Then Do While Null: ReDim i(True To False) As Currency: Loop: Else Debug.Assert CCur(CLng(CInt(CBool(False Imp True Xor False Eqv True)))): Stop:

Fetch API - What's the use of redirect: manual

白昼怎懂夜的黑 提交于 2019-11-30 17:02:29
I've recently been playing with the Javascript Fetch API. As far as I understand, by default all redirects are handled transparently and in the end I get a response from the last call in the redirect chain. However, I could invoke fetch with {redirect: 'manual'}, in which case it would return an opaqueredirect response with no usable information. From https://fetch.spec.whatwg.org/#concept-filtered-response-opaque-redirect An opaque-redirect filtered response is a filtered response whose type is "opaqueredirect", status is 0, status message is the empty byte sequence, header list is empty,

How do I submit suggestions to the CSS spec? [closed]

对着背影说爱祢 提交于 2019-11-30 15:54:53
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 7 years ago . Recently I've wanted to do a number of things using CSS only to find that the best solution is to use Javascript. This has made me wonder, does anyone here know how to go about making development suggestions to be implemented into CSS 3 spec? It would be great if we could get some sort of feature request/vote

What is Clojure spec?

夙愿已清 提交于 2019-11-30 15:42:30
问题 I could not understand the intent of clojure . spec What kind of problems does it solve? Why should we use it? 回答1: spec allows you to create specifications for data and functions. Specifications are at their core predicative (based on existing Clojure predicates) and structural, rather than type-based as you might see in a statically typed language. By basing spec on predicates, you can write specifications that are far more expressive than most type systems and using the same language as

What is Clojure spec?

旧巷老猫 提交于 2019-11-30 14:34:08
I could not understand the intent of clojure . spec What kind of problems does it solve? Why should we use it? Alex Miller spec allows you to create specifications for data and functions. Specifications are at their core predicative (based on existing Clojure predicates) and structural, rather than type-based as you might see in a statically typed language. By basing spec on predicates, you can write specifications that are far more expressive than most type systems and using the same language as your code. Specs defined on a function specify the specs for the args, the return value, and a

What is the maximum size of a Java .class file?

送分小仙女□ 提交于 2019-11-30 11:24:10
问题 A .class file is a rather well documented format that defines sections and size, and therefore maximum sizes as well. For instance, a .class file contains a magic number (4 bytes), a version (4 bytes), the constant pool (variable size), etc. But sizes can be defined on several levels: you can have 65535 methods and each is limited to 65535 bytes. What are the other limits? And, if you would make the largest .class file possible, what size would it be? If needed, limit answers to Java. Meaning

Why don't the modern browsers support PUT and DELETE form methods?

二次信任 提交于 2019-11-30 10:48:28
I just finished building a RESTful API for one of my latest apps. I also built a simple admin interface scaffolding class that will enumerate resources and build simple forms and tables to edit, create, delete etc. For updating and deleting resources, the class outputs a form with methods of PUT and DELETE, pretty simple: <form action="/posts/xxxxxxx" method="DELETE"> <input type="submit" value="Delete" /> </form> and <form action="/posts/xxxxxxx" method="PUT"> <input type="text" name="username" value="nikcub" /> <input type="text" name="fullname" value="Nik Cubrilovic" /> <input type="text"