Tutorial by Examples: c

XE2 program CrossPlatformHelloWorld; uses FMX.Dialogs; {$R *.res} begin ShowMessage('Hello world!'); end. Most of the Delphi supported platforms (Win32/Win64/OSX32/Android32/iOS32/iOS64) also support a console so the WriteLn example fits them well. For the platforms that require...
Introduction When the 80286 was invented, it supported the legacy 8086 Segmentation (now called "Real Mode"), and added a new mode called "Protected Mode". This mode has been in every x86 processor since, albeit enhanced with various improvements such as 32- and 64-bit addressin...
Switching into Protected Mode is easy: you just need to set a single bit in a Control Register. But staying in Protected Mode, without the CPU throwing up its hands and resetting itself due to not knowing what to do next, takes a lot of preparation. In short, the steps required are as follows: ...
GitHub helps you quickly add a license to your repository, as an alternative for adding your own text/markdown file. In your repository, click 'Create new file' On next page: Type LICENSE.md or LICENSE.txt as the new file's file name. The Want to use a new template? dialog will appea...
AnchorPane a is a layout that allows placing the content at a specific distance from it's sides. There are 4 methods for setting and 4 methods for getting the distances in AnchorPane. The first parameter of these methods is the child Node. The second parameter of the setters is the Double value to ...
To start a bibliography you need to define your sources. Create a database file (like sources.bib) and include some content: @book{Doe1993, Author = {John Doe}, Publisher = {Earth University}, Title = {Creating a bibliography with biber}, Year = {1993}} You can then include y...
Microsoft Access is an Application Generator for developing databases and data-driven applications, primarily for local use. Microsoft Access consists of two main elements: A Relational Database Management System (RDBMS) that combines the Microsoft Jet Database Engine (Access 2003 and earler) or ...
Related to Monads are F# computation expressions (CE). A programmer typically implements a CE to provide an alternative approach to chaining Monads, ie instead of this: let v = m >>= fun x -> n >>= fun y -> return_ (x, y) You can write this: let v = ce { let! x = m ...
Most programming languages, including F#, evaluate computations immediately in accord with a model called Strict Evaluation. However, in Lazy Evaluation, computations are not evaluated until they are needed. F# allows us to use lazy evaluation through both the lazy keyword and sequences. // define ...
F#, like most programming languages, uses Strict Evaluation by default. In Strict Evaluation, computations are executed immediately. In contrast, Lazy Evaluation, defers execution of computations until their results are needed. Moreover, the results of a computation under Lazy Evaluation are cached,...
Emacs's user interface uses terms that were coined early and can be unsettling to users used to a more modern terminology. Frame In Emacs, what is otherwise called a window (the area of the display used by a program) is called a frame. Emacs starts using one frame, though additional frames may b...
Sometimes it is desirable to evaluate a nullable expression in an if-else fashion. The elvis operator, ?:, can be used in Kotlin for such a situation. For instance: val value: String = data?.first() ?: "Nothing here." The expression above returns "Nothing here" if data?.firs...
Longer portions of text containing special characters can be escaped with a CDATA section. CDATA sections can only appear in element content. <?xml version="1.0"?> <document> This is a CDATA section : <![CDATA[ plenty of special characters like & < > " ; ...
Characters can be escaped using character references, in element content or attribute values. Their Unicode codepoint can be specified in decimal or hex. <?xml version="1.0"?> <document> The line feed character can be escaped with a decimal (
) or hex (
) ...
In real world, connection and server delays could occur, to simulate delays in development environment Meteor._sleepForMs(ms); could be used Meteor.publish('USER_DATA', function() { Meteor._sleepForMs(3000); // Simulate 3 seconds delay return Meteor.users.find({}); });
select '123' * 2; To make the multiplication with 2 MySQL automatically converts the string 123 into a number. Return value: 246 The conversion to a number starts from left to right. If the conversion is not possible the result is 0 select '123ABC' * 2 Return value: 246 select 'A...
What's an image sprite? An image sprite is a single asset located within an image sprite sheet. An image sprite sheet is an image file that contains more than one asset that can be extracted from it. For example: The image above is an image sprite sheet, and each one of those stars is a sprite...
Suppose we want to get all product categories with total sales greater than 20. Here is a query without Common Table Expressions: SELECT category.description, sum(product.price) as total_sales FROM sale LEFT JOIN product on sale.product_id = product.id LEFT JOIN category on product.category_id ...
Suppose we want to query the "cheapest products" from the "top categories". Here is an example of query using Common Table Expressions -- all_sales: just a simple SELECT with all the needed JOINS WITH all_sales AS ( SELECT product.price as product_price, category.id a...
R is full of functions, it is after all a functional programming language, but sometimes the precise function you need isn't provided in the Base resources. You could conceivably install a package containing the function, but maybe your requirements are just so specific that no pre-made function fit...

Page 303 of 826