Tutorial by Examples: el

Add the following to a file named build.xml in your project directory: <?xml version="1.0" encoding="UTF-8"?> <project name="HelloWorld" default="main"> <target name="main" description="this is target main"> ...
In this example, we have an array containing some data. We capture the output buffer in $items_li_html and use it twice in the page. <?php // Start capturing the output ob_start(); $items = ['Home', 'Blog', 'FAQ', 'Contact']; foreach($items as $item): // Note we're about to step &q...
import multiprocessing def fib(n): """computing the Fibonacci in an inefficient way was chosen to slow down the CPU.""" if n <= 2: return 1 else: return fib(n-1)+fib(n-2) p = multiprocessing.Pool() print(p.map(fib,[38,37,3...
The form for a link in markdown is as follows. [Shown Text](Link) For example, This will take you to Example.com is created with [This will take you to Example.com](http://www.example.com)
Node provides the module.exports interface to expose functions and variables to other files. The most simple way to do so is to export only one object (function or variable), as shown in the first example. hello-world.js module.exports = function(subject) { console.log('Hello ' + subject); }...
Considering the following users table: idusername1User12User23User34User45User5 In order to constrain the number of rows in the result set of a SELECT query, the LIMIT clause can be used together with one or two positive integers as arguments (zero included). LIMIT clause with one argument When ...
The following C source file (which we will call hello.c for demonstration purposes) produces an extension module named hello that contains a single function greet(): #include <Python.h> #include <stdio.h> #if PY_MAJOR_VERSION >= 3 #define IS_PY3K #endif static PyObject *hell...
To join all of an array's elements into a string, you can use the join method: console.log(["Hello", " ", "world"].join("")); // "Hello world" console.log([1, 800, 555, 1234].join("-")); // "1-800-555-1234" As you can see in ...
SELECT 'Hello world!' FROM dual; In Oracle's flavor of SQL, "dual is just a convienence table". It was originally intended to double rows via a JOIN, but now contains one row with a DUMMY value of 'X'.
lsstat returns various summary stats per bucket for the specified field. The field must be numeric in elastic. rStat can be one of avg, min, max, sum, sum_of_squares, variance, std_deviation. The rest of the fields behave the same as lscount, except that there is no division based on bucketDuratio...
With Stream Controller add-on enabled, you can use Channel Groups to subscribe to a 1000's of channels from a single client. You do this by creating a channel group and adding channels to the channel group. We'll assume pubnub variable has been initialized properly with your keys. Create a generic ...
CASE's shorthand variant evaluates an expression (usually a column) against a series of values. This variant is a bit shorter, and saves repeating the evaluated expression over and over again. The ELSE clause can still be used, though: SELECT Id, ItemId, Price, CASE Price WHEN 5 THEN 'CHEAP' ...
Classes are identifiers for the elements that they are assigned to. Use the class attribute to assign a class to an element. <div class="example-class"></div> To assign multiple classes to an element, separate the class names with spaces. <div class="class1 class2&...
The ID attribute of an element is an identifier which must be unique in the whole document. Its purpose is to uniquely identify the element when linking (using an anchor), scripting, or styling (with CSS). <div id="example-id"></div> You should not have two elements with th...
This program, saved to a file named HelloWorld.dpr, compiles to a console application that prints "Hello World" to the console: program HelloWorld; {$APPTYPE CONSOLE} begin WriteLn('Hello World'); end.
Dim x As Int32 = 128 Console.WriteLine(x) ' Variable ' Console.WriteLine(3) ' Integer ' Console.WriteLine(3.14159) ' Floating-point number ' Console.WriteLine("Hello, world") ' String ' Console.WriteLine(myObject) ' Outputs the value from calling myObject.ToString() The Console.Wri...
Overview Attribute selectors can be used with various types of operators that change the selection criteria accordingly. They select an element using the presence of a given attribute or attribute value. Selector(1)Matched elementSelects elements...CSS Version[attr]<div attr>With attribute a...
Top-level extension methods are not contained within a class. fun IntArray.addTo(dest: IntArray) { for (i in 0 .. size - 1) { dest[i] += this[i] } } Above an extension method is defined for the type IntArray. Note that the object for which the extension method is defined (cal...
CREATE TABLE MyTableName ( Id INT, MyColumnName NVARCHAR(1000) ) GO INSERT INTO MyTableName (Id, MyColumnName) VALUES (1, N'Hello World!') GO
All Kotlin programs start at the main function. Here is an example of a simple Kotlin "Hello World" program: package my.program fun main(args: Array<String>) { println("Hello, world!") } Place the above code into a file named Main.kt (this filename is entirel...

Page 7 of 145