Tutorial by Examples

open(my $fh, '<', "/some/path") or die $!; my @ary = <$fh>; When evaluated in list context, the diamond operator returns a list consisting of all the lines in the file (in this case, assigning the result to an array supplies list context). The line terminator is retained, and ...
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...
When Intel designed the original x86, the 8086 (and 8088 derivative), they included Segmentation to allow the 16-bit processor to access more than 16 bits worth of address. They did this by making the 16-bit addresses be relative to a given 16-bit Segment Register, of which they defined four: Code S...
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: ...
The easiest way to write Processing code is to simply call a series of functions. Press the run button in the Processing editor, and Processing will run your code. Here's an example: size(200, 200); background(0, 0, 255); fill(0, 255, 0); ellipse(100, 100, 100, 100); This code creates a 200x2...
Overview The Rigidbody component gives a GameObject a physical presence in the scene in that it is able to respond to forces. You could apply forces directly to the GameObject or allow it to react to external forces such as gravity or another Rigidbody hitting it. Adding a Rigidbody component Y...
Swift let sampleText = "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderi...
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 ...
TextInputDialog allows the to ask the user to input a single String. TextInputDialog dialog = new TextInputDialog("42"); dialog.setHeaderText("Input your favourite int."); dialog.setTitle("Favourite number?"); dialog.setContentText("Your favourite int: ");...
$ mkdir hello-world $ cd hello-world $ tns create hello-world --ng $ tns platform add android #You can only add ios on an OSX machine Then ensure you have a device connected or an emulator running (if you don't, the default emulator should start or an error will be raised. I would recommend ge...
Dim aList as New List(Of String) aList.Add("one") aList.Add("two") aList.Add("three") For Each str As String in aList System.Console.WriteLine(str) Next Produces the following output: one two three Another option, would be to loop through using the ...
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 ...
Overview: The default data type for numeric arrays in MATLAB is double. double is a floating point representation of numbers, and this format takes 8 bytes (or 64 bits) per value. In some cases, where e.g. dealing only with integers or when numerical instability is not an imminent issue, such high ...
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,...
In Emacs, file has the same meaning as in the operating system, and is used for permanent storage of data. A buffer is the internal representation of a file being edited. Files can be read into buffers using C-x C-f, and buffers can be written to files using C-x C-s (save file at its current locatio...

Page 489 of 1336