Tutorial by Examples

Hibernate (and embedded H2 DB) <?xml version="1.0" encoding="UTF-8"?> <persistence xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/...
We can create empty thread objects and assign work to them later. If we assign a thread object to another active, joinable thread, std::terminate will automatically be called before the thread is replaced. #include <thread> void foo() { std::this_thread::sleep_for(std::chrono::seco...
To obtain a reference to a KClass object representing some class use double colons: val c1 = String::class val c2 = MyClass::class
Functions are first-class citizens in Kotlin. You can obtain a reference on it using double colons and then pass it to another function: fun isPositive(x: Int) = x > 0 val numbers = listOf(-2, -1, 0, 1, 2) println(numbers.filter(::isPositive)) // [1, 2]
To obtain a Java's Class object from Kotlin's KClass use the .java extension property: val stringKClass: KClass<String> = String::class val c1: Class<String> = stringKClass.java val c2: Class<MyClass> = MyClass::class.java The latter example will be optimized by the compile...
The conventional connect syntax that uses SIGNAL and SLOT macros works entirely at runtime, which has two drawbacks: it has some runtime overhead (resulting also in binary size overhead), and there's no compile-time correctness checking. The new syntax addresses both issues. Before checking the synt...
Given that the 8086/8088 was used in the IBM PC, and the Operating System on that was most often from Microsoft, Microsoft's assembler MASM was the de facto standard for many years. It followed Intel's syntax closely, but permitted some convenient but "loose" syntax that (in hindsight) onl...
Intel wrote the specification of the 8086 assembly language, a derivative of the earlier 8080, 8008 and 4004 processors. As such, the assembler they wrote followed their own syntax precisely. However, this assembler wasn't used very widely. Intel defined their opcodes to have either zero, one or tw...
Although the 8086 was most used in IBM PCs along with Microsoft, there were a number of other computers and Operating Systems that used it too: most notably Unix. That was a product of AT&T, and it already had Unix running on a number of other architectures. Those architectures used more convent...
Borland started out with a Pascal compiler that they called "Turbo Pascal". This was followed by compilers for other languages: C/C++, Prolog and Fortran. They also produced an assembler called "Turbo Assembler", which, following Microsoft's naming convention, they called "T...
When the GNU project needed an assembler for the x86 family, they went with the AT&T version (and its syntax) that was associated with Unix rather than the Intel/Microsoft version.
NASM is by far the most ported assembler for the x86 architecture - it's available for practically every Operating System based on the x86 (even being included with MacOS), and is available as a cross-platform assembler on other platforms. This assembler uses Intel syntax, but it is different from ...
YASM is a complete rewrite of NASM, but is compatible with both Intel and AT&T syntaxes.
Types instantiating Monoid include lists, numbers, and functions with Monoid return values, among others. To instantiate Monoid a type must support an associative binary operation (mappend or (<>)) which combines its values, and have a special "zero" value (mempty) such that combini...
Suppose that you have a pointer to an object of a polymorphic class: Shape *ps; // see example on defining a polymorphic class ps = get_a_new_random_shape(); // if you don't have such a function yet, you // could just write ps = new Square...
Function is a set of instructions, which are grouped together. These grouped instructions together perform certain task. In erlang, all the functions will return a value when they are called. Below is an example of a function that adds two numbers add(X, Y)-> X + Y. This function performs an...
Background pages are implicit pages which contain background scripts. A background script is a single long-running script to manage some task or state. It exists for the lifetime of your extension, and only one instance of it at a time is active. You can declare it like this in your manifest.json: ...
A content script is extension code that runs alongside a normal page. They have full access to the web page's DOM (and are, in fact, the only part of the extension that can access a page's DOM), but the JavaScript code is isolated, a concept called Isolated World. Each extension has its own content...
Loop control statements are used to change the flow of execution from its normal sequence. When execution leaves a scope, all automatic objects that were created in that scope are destroyed. The break and continue are loop control statements. The break statement terminates a loop without any furthe...
Save with default parameters: df.to_csv(file_name) Write specific columns: df.to_csv(file_name, columns =['col']) Difault delimiter is ',' - to change it: df.to_csv(file_name,sep="|") Write without the header: df.to_csv(file_name, header=False) Write with a given head...

Page 299 of 1336