definition

HTTPbis - what does bis mean?

丶灬走出姿态 提交于 2019-12-03 14:26:13
问题 I've often seen "bis" appended to versions of protocols (eg v.34bis or httpbis). What does "bis" mean or stand for? A telecom engineer I know thinks it might be French in origin. 回答1: As others have already said, "bis" comes from "twice" or "repeat". It's used to indicate a second variant of something (although usually with only minor variations that don't warrant a new name). In the context of HTTP, HTTPbis is the name of the working group in charge of refining HTTP. According to its charter

What is the definition of Convenience Method in regards to Objective C?

∥☆過路亽.° 提交于 2019-12-03 12:46:04
In most languages I have dealt with, one something is called a convenience method, it means that the method does some small task that gets done very frequently, and therefore it is more convenient to use said method. In Objective-C does this definition hold true? Or is it generally only used to describe class methods that return a prebuilt object? ex. [NSString stringWithContentsOfFile:...] Is this just a preference thing, or are there some hard and fast definition for these terms? Cheers, Stefan What you are talking about is actually more specifically a "convenience constructor" in Objective

What is the difference between “compile time” and “run time”?

試著忘記壹切 提交于 2019-12-03 12:26:14
I do not understand what is meant by the terms "compile time" and "run time" (or "runtime"). I'm also a bit confused about what "value type" and "reference type" mean, and how they relate to the 'times mentioned above. Would someone please explain these things? "Compile time" is when you build your code - when the compiler converts your source code into IL. "Runtime" is when your code is executed - for ASP.NET, when a page request is made. (Personally I prefer the term "execution time" to distinguish between that and "the Common Language Runtime (CLR)" - aka the virtual machine.) Value types

Definition list with inline pairs

落爺英雄遲暮 提交于 2019-12-03 10:52:06
I'm trying to create a definition list of term-definition pairs, each pair existing on a single, separate line. I've tried making dt s and dd s display:inline , but then I lose the line breaks between the pairs. How do I make sure I have a line for each pair (and not for each individual term/definition)? Example: <dl> <dt>Term 1</dt><dd>Def 1</dd> <dt>Term 2</dt><dd>Def 2</dd> </dl> yielding: Term 1 Def 1 Term 2 Def 2 The CSS for making them inline would be: dt,dd{display:inline;} yielding: Term 1 Def 1 Term 2 Def 2 ...which is not what I want (line breaks between pairs missing). Try this: dt,

Enum inside class (TypeScript definition file)

大憨熊 提交于 2019-12-03 08:04:22
问题 I've searched around but can't seem to find an answer for this, hopefully you can help. How can I add an enum to Image? This is what I would like ideally but I get an error. declare module 'Lib' { export module Graphics { export class Image { enum State {} static STATE_IDLE: State; static STATE_LOADING: State; static STATE_READY: State; static STATE_ERROR: State; constructor(); } } } If I move State into the Graphics module it works but now State belong to Graphics...which is incorrect, it

What is the rationale behind tentative definitions in C?

↘锁芯ラ 提交于 2019-12-03 07:48:08
问题 Consider following program. Will this give any compilation errors? #include <stdio.h> int s=5; int s; int main(void) { printf("%d",s); } At first glance it seems that compiler will give variable redefinition error but program is perfectly valid according to C standard. (See live demo here http://ideone.com/Xyo5SY). A tentative definition is any external data declaration that has no storage class specifier and no initializer. C99 6.9.2/2 A declaration of an identifier for an object that has file

namespaces, classes and free functions - when do you need fully qualified names

你说的曾经没有我的故事 提交于 2019-12-03 07:44:19
问题 In my example below, why do I have to fully qualify the name of the free function in the cpp to avoid linker errors and why does it work for the class function without? Can you explain the difference? ctest.h: namespace Test { int FreeFunction(); class CTest { public: CTest(); ~CTest(); }; } ctest.cpp: #include "ctest.h" using namespace Test; // int FreeFunction() -> undefined reference error int Test::FreeFunction() -> works just fine { return 0; } CTest::CTest() -> no need to fully qualify

Javascript - difference between namespace vs. closure?

痴心易碎 提交于 2019-12-03 06:19:15
问题 In Javascript, what's the difference between a namespace and a closure? They seem very similar to me. EDIT Specifically, this article discusses namespaces and closures, and has sentences like Now, we’re still going to have situations where we’ll want to declare variables that don’t naturally fit into a namespaced object structure. But we don’t want those variables to have a global scope. This is where self-invoking functions come in. It goes on to give what looks a lot like a closure, as an

C++ global variable initialization order

淺唱寂寞╮ 提交于 2019-12-03 05:33:57
问题 I don't understand what the following code example does and how it does it: #include <stdio.h> int f(); int a = f(); // a exists just to call f int x = 22; int f() { ++x; return 123; // unimportant arbitrary number } int main() { printf("%d\n", x); } When this is ran it prints 23 , which is the intuitive answer. However in C++, global variables are supposed to be initialized in order of definition. That would mean that a should be initialized before x , because it is defined before x . If

Does Qt offer a (guaranteed) debug definition?

▼魔方 西西 提交于 2019-12-03 05:30:39
问题 Does anyone know an officially supported way to include debug-build only code in Qt? For example: #ifdef QT_DEBUG // do something #endif Basically like Q_ASSERT but for more complex tests. I can't seem to find any documentation which says that the Qt framework guarantees to define a debug macro. If there isn't, what would be a sensible unofficial way to implement this feature project wide? 回答1: Qt defines QT_NO_DEBUG for release builds. Otherwise QT_DEBUG is defined. Of course you are free to