Tutorial by Examples: er

An iterator to the first element in the container. If a map object is const-qualified, the function returns a const_iterator. Otherwise, it returns an iterator. // Create a map and insert some values std::map<char,int> mymap; mymap['b'] = 100; mymap['a'] = 200; mymap['c'] = 300; // It...
Any permission required by your application to access a protected part of the API or to interact with other applications must be declared in your AndroidManifest.xml file. This is done using the <uses-permission /> tag. Syntax <uses-permission android:name="string" android...
int a = 0, b = 2; const int* pA = &a; // pointer-to-const. `a` can't be changed through this int* const pB = &a; // const pointer. `a` can be changed, but this pointer can't. const int* const pC = &a; // const pointer-to-const. //Error: Cannot assign to a const reference *pA = b...
Log into a running container A user can enter a running container in a new interactive bash shell with exec command. Say a container is called jovial_morse then you can get an interactive, pseudo-TTY bash shell by running: docker exec -it jovial_morse bash Log into a running container with a s...
It is also possible to assign a supervision strategy to these actors with the following: superviseWith(OneForOneStrategy() { case e: Exception if e.getMessage == "hello" ⇒ Stop case _: Exception ⇒ Resume })
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> <path d="M 10,10 V 200" stroke="green" stroke-width="5" /> </svg> Result:
Wildfly, part of the JBoss umbrella of projects, can also be executed via Docker. On a machine with Docker properly configured, run: $ docker run -it jboss/wildfly Once the image is pulled, the container starts and the following line can be seen: 09:44:49,225 INFO [org.jboss.as] (Controller Bo...
Once Wildfly is installed by unzipping the distribution, it can be started by running the standalone.sh script on the bin directory: $ ./bin/standalone.sh ========================================================================= JBoss Bootstrap Environment JBOSS_HOME: /mnt/storage/tools...
Sometimes you may want to have a lambda expression implementing more than one interface. This is mostly useful with marker interfaces (such as java.io.Serializable) since they don't add abstract methods. For example, you want to create a TreeSet with a custom Comparator and then serialize it and se...
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/...
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...
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.

Page 96 of 417