Tutorial by Examples: al

When applied to a class, the sealed modifier prevents other classes from inheriting from it. class A { } sealed class B : A { } class C : B { } //error : Cannot derive from the sealed class When applied to a virtual method (or virtual property), the sealed modifier prevents this method (proper...
This example demonstrates that HTTP is a text-based Internet communications protocol, and shows a basic HTTP request and the corresponding HTTP response. You can use Telnet to manually send a minimal HTTP request from the command line, as follows. Start a Telnet session to the web server www.e...
In the HTTP server code (e.g. server.js): const EventEmitter = require('events') const serverEvents = new EventEmitter() // Set up an HTTP server const http = require('http') const httpServer = http.createServer((request, response) => { // Handler the request... // Then emit an event...
FlashDevelop is a multi-platform open source IDE created in 2005 for Flash developers. With no cost, it's a very popular way to get started developing with AS3. To Install FlashDevelop: Download The Installation File and run the installer Once installation is complete, run FlashDevelop. On the ...
from http://flex.apache.org/doc-getstarted.html Download the SDK installer Run the SDK installer. The first question you will be asked is the installation directory. on a Mac, use /Applications/Adobe Flash Builder 4.7/sdks/4.14.0/ on a PC, use C:\Program Files(x86)\Adobe Flash Builder ...
AEM can be installed as a standalone executable JAR file or through web application servers, such as JBoss and WebSphere, as a WAR file. Prerequisites AEM 6.2 needs at minimum the following in order to run Java Runtime Environment (JRE) 1.8x (64bit) 5GB of free disk space for installation 2GB...
Detailed instructions on getting braintree set up or installed.
Swift let frame = CGRect(x: 0, y: 0, width: 100, height: 100) let textField = UITextField(frame: frame) Objective-C CGRect *frame = CGRectMake(0, 0, 100, 100); UITextField *textField = [[UITextField alloc] initWithFrame:frame]; Interface Builder You can also add a UITextField to a storybo...
Swift textField.autocapitalizationType = .None Objective-C textField.autocapitalizationType = UITextAutocapitalizationTypeNone; All options: .None \ UITextAutocapitalizationTypeNone : Don't autocapitalize anything .Words \ UITextAutocapitalizationTypeWords : Autocapitalize every word .S...
0.18.0 Prior to 0.18.0 you can create ranges like this: > range = [1..5] [1,2,3,4,5] : List number > > negative = [-5..3] [-5,-4,-3,-2,-1,0,1,2,3] : List number 0.18.0 In 0.18.0 The [1..5] syntax has been removed. > range = List.range 1 5 [1,2,3,4,5] : List number > &g...
> listOfNumbers = [1,4,99] [1,4,99] : List number > > listOfStrings = ["Hello","World"] ["Hello","World"] : List String > > emptyList = [] -- can be anything, we don't know yet [] : List a > Under the hood, List (linked list) is ...
List.map : (a -> b) -> List a -> List b is a higher-order function that applies a one-parameter function to each element of a list, returning a new list with the modified values. import String ourList : List String ourList = ["wubba", "lubba", "dub",...
List.filter : (a -> Bool) -> List a -> List a is a higher-order function which takes a one-parameter function from any value to a boolean, and applies that function to every element of a given list, keeping only those elements for which the function returns True on. The function that List.f...
To create a collection of n copies of some object x, use the fill method. This example creates a List, but this can work with other collections for which fill makes sense: // List.fill(n)(x) scala > List.fill(3)("Hello World") res0: List[String] = List(Hello World, Hello World, Hello...
Partial functions are very common in idiomatic Scala. They are often used for their convenient case-based syntax to define total functions over traits: sealed trait SuperType // `sealed` modifier allows inheritance within current build-unit only case object A extends SuperType case object B exten...
Some JavaScript engines (for example, the current version of Node.js and older versions of Chrome before Ignition+turbofan) don't run the optimizer on functions that contain a try/catch block. If you need to handle exceptions in performance-critical code, it can be faster in some cases to keep the ...
Full example code included at the end Windows components for OpenGL WGL WGL (can be pronounced wiggle) stands for "Windows-GL", as in "an interface between Windows and OpenGL" - a set of functions from the Windows API to communicate with OpenGL. WGL functions have a wgl prefix...
The Scala compiler will automatically convert methods into function values for the purpose of passing them into higher-order functions. object MyObject { def mapMethod(input: Int): String = { int.toString } } Seq(1, 2, 3).map(MyObject.mapMethod) // Seq("1", "2", &...
using System.Runtime.InteropServices; class PInvokeExample { [DllImport("user32.dll", CharSet = CharSet.Auto)] public static extern uint MessageBox(IntPtr hWnd, String text, String caption, int options); public static void test() { MessageBox(IntPtr.Zero,...
Arrays of simple type [DllImport("Example.dll")] static extern void SetArray( [MarshalAs(UnmanagedType.LPArray, SizeConst = 128)] byte[] data); Arrays of string [DllImport("Example.dll")] static extern void SetStrArray(string[] textLines);

Page 40 of 269