terminology

Is imperative Quicksort in situ (in-place) or not?

◇◆丶佛笑我妖孽 提交于 2019-11-27 06:42:49
问题 Quicksort is often described as an in situ (in-place) algorithm, despite the fact that it requires O(log n) stack space. So does in situ mean "requires less than O(n) additional space", or does stack space generally not count as space complexity (but why would that be the case?), or is Quicksort actually not an in situ algorithm? 回答1: is Quicksort actually not an in situ algorithm? The standard implementation of it is not in situ . It's a horribly common misconception, but you as correctly

What does it mean to say a type is “boxed”?

妖精的绣舞 提交于 2019-11-27 06:33:28
问题 I have heard of types being referred to as "boxed" in some languages. In Java, I have heard of "autoboxing". What is this? Is it having wrapper classes for a type? How would my code change if I'm working with boxed or unboxed types? 回答1: Some data types are considered "primitive", meaning they are not treated like an object and don't have the properties of an object. On most platforms, integers and characters are examples of types that are primitive but can be boxed. Boxing means wrapping

What is Stateless Object in Java?

陌路散爱 提交于 2019-11-27 06:27:11
Currently I'm reading "Java concurrency in practice", which contains this sentence: Since the action of a thread accessing a stateless object can't affect the correctness of operations on other threads, stateless objects are thread-safe. So, what is stateless object? Stateless object is an instance of a class without instance fields (instance variables). The class may have fields, but they are compile-time constants (static final). A very much related term is immutable . Immutable objects may have state, but it does not change when a method is invoked (method invocations do not assign new

What is “Structured” in Structured Query Language?

核能气质少年 提交于 2019-11-27 05:57:15
问题 What does the "Structured" word means in SQL? Is it because this(SQL) language statements are organized into Clauses, expressions and predicates? Because of this organization, is it called "Structured" ? 回答1: The original full name was SEQUEL, which stood for "Structured English Query Language". It later had to be renamed to SQL due to trademark issues. So basically, it was yet another attempt to sell a programming language as "just like English, except with a formal syntax" (hence

What are fail-safe & fail-fast Iterators in Java [closed]

别等时光非礼了梦想. 提交于 2019-11-27 05:51:42
There are two types of iterators in Java: fail-safe and fail-fast. What does this mean, and is the difference between them? Stephen C What is the difference between them ... "Fail safe" means: it won't fail. Strictly speaking, there is no such thing in Java as a fail-safe iterator. The correct term is "weakly consistent". The javadoc says: "Most concurrent Collection implementations (including most Queues) also differ from the usual java.util conventions in that their Iterators and Spliterators provide weakly consistent rather than fast-fail traversal." Typically, weak consistency means that

What is a coroutine?

a 夏天 提交于 2019-11-27 05:49:26
What is a coroutine? How are they related to concurrency? Coroutines and concurrency are largely orthogonal. Coroutines are a general control structure whereby flow control is cooperatively passed between two different routines without returning. The 'yield' statement in Python is a good example. It creates a coroutine. When the 'yield ' is encountered the current state of the function is saved and control is returned to the calling function. The calling function can then transfer execution back to the yielding function and its state will be restored to the point where the 'yield' was

What is opinionated software?

妖精的绣舞 提交于 2019-11-27 05:46:52
I often see people saying that certain software is "very opinionated" or that Microsoft tends to write "un-opinionated" frameworks. What does this actually mean? If a framework is opinionated, it lock or guides you into their way of doing things. For example: some people believe that a template system shouldn't provide access to user defined methods and functions as it leaves the system open to returning raw HTML. So an opinionated framework developer only allows access to data structures. By design, the software is limiting and encourages the designer into doing things their way. Another

In Docker, what's the difference between a container and an image? [duplicate]

*爱你&永不变心* 提交于 2019-11-27 05:46:20
This question already has an answer here: What is the difference between a Docker image and a container? 21 answers What's the difference between a container and an image in Docker? In the Get started with Docker tutorial these terms are both used, but I do not understand the difference. Can anybody please shed some light? Images are frozen immutable snapshots of live containers. Containers are running (or stopped) instances of some image. Start with the base image called 'ubuntu'. Let's run bash interactively within the ubuntu image and create a file. We'll use the -i and -t flags to give us

What is the difference between the kernel space and the user space?

帅比萌擦擦* 提交于 2019-11-27 05:46:13
What is the difference between the kernel space and the user space? Do kernel space, kernel threads, kernel processes and kernel stack mean the same thing? Also, why do we need this differentiation? Jerry Coffin The really simplified answer is that the kernel runs in kernel space, and normal programs run in user space. User space is basically a form of sand-boxing -- it restricts user programs so they can't mess with memory (and other resources) owned by other programs or by the OS kernel. This limits (but usually doesn't entirely eliminate) their ability to do bad things like crashing the

What is “runtime”?

倾然丶 夕夏残阳落幕 提交于 2019-11-27 05:43:31
I have heard about things like "C Runtime", "Visual C++ 2008 Runtime", ".NET Common Language Runtime", etc. What is " runtime " exactly? What is it made of? How does it interact with my code? Or maybe more precisely, how is my code controlled by it? When coding assembly language on Linux, I could use the INT instruction to make the system call. So, is the runtime nothing but a bunch of pre-fabricated functions that wrap the low level function into more abstract and high level functions? But doesn't this seem more like the definition for the library, not for the runtime? Are "runtime" and "