Tutorial by Examples: am

Data Manipulation Language (DML for short) includes operations such as INSERT, UPDATE and DELETE: -- Create a table HelloWorld CREATE TABLE HelloWorld ( Id INT IDENTITY, Description VARCHAR(1000) ) -- DML Operation INSERT, inserting a row into the table INSERT INTO HelloWorld (D...
require Exporter; This will ensure that the Exporter module is loaded at runtime if it hasn't already been imported. (See also: perldoc -f require.) N.B.: Most users should use modules rather than require them. Unlike use, require does not call the module's import method and is executed at runti...
use Cwd; This will import the Cwd module at compile time and import its default symbols, i.e. make some of the module's variables and functions available to the code using it. (See also: perldoc -f use.) Generally this is will do the right thing. Sometimes, however, you will want to control whic...
The second step to creating a subscription for a user is to create and execute a billing agreement, based on an existing activated billing plan. This example assumes that you have already gone through and activated a billing plan in the previous example, and have an ID for that billing plan to refer...
When creating a subscription for a user, you first need to create and activate a billing plan that a user is then subscribed to using a billing agreement. The full process for creating a subscription is detailed in the remarks of this topic. Within this example, we're going to be using the PayPal N...
Basic implementation: <script src= "http://player.twitch.tv/js/embed/v1.js"></script> <div id="PLAYER_DIV_ID"></div> <script type="text/javascript"> var options = { width: 854, height: 480, channel: "...
$.ajax({ url: 'https://api.dropboxapi.com/2/sharing/add_folder_member', type: 'POST', processData: false, data: JSON.stringify({"shared_folder_id": "84528192421","members": [{"member": {".tag": "email","email":...
# lambda using the arrow syntax hello_world = -> { 'Hello World!' } hello_world[] # 'Hello World!' # lambda using the arrow syntax accepting 1 argument hello_world = ->(name) { "Hello #{name}!" } hello_world['Sven'] # "Hello Sven!" the_thing = lambda do |magic, ...
Parameters can be used for returning one or more values; those parameters are required to be non-const pointers or references. References: void calculate(int a, int b, int& c, int& d, int& e, int& f) { c = a + b; d = a - b; e = a * b; f = a / b; } Pointers: ...
In ECMAScript 6, when using the module syntax (import/export), each file becomes its own module with a private namespace. Top-level functions and variables do not pollute the global namespace. To expose functions, classes, and variables for other modules to import, you can use the export keyword. /...
Given that the module from the Defining a Module section exists in the file test.js, you can import from that module and use its exported members: import {doSomething, MyClass, PI} from './test' doSomething() const mine = new MyClass() mine.test() console.log(PI) The somethingPrivate()...
A C++ namespace is a collection of C++ entities (functions, classes, variables), whose names are prefixed by the name of the namespace. When writing code within a namespace, named entities belonging to that namespace need not be prefixed with the namespace name, but entities outside of it must use t...
Creating a namespace is really easy: //Creates namespace foo namespace Foo { //Declares function bar in namespace foo void bar() {} } To call bar, you have to specify the namespace first, followed by the scope resolution operator ::: Foo::bar(); It is allowed to create one names...
A useful feature of namespaces is that you can expand them (add members to it). namespace Foo { void bar() {} } //some other stuff namespace Foo { void bar2() {} }
Sometimes you may encounter members that have really long member names, such as thisIsWayTooLongOfAName(). In this case, you can import the member and give it a shorter name to use in your current module: import {thisIsWayTooLongOfAName as shortName} from 'module' shortName() You can import m...
The term "IFrame" means Inline Frame. It can be used to include another page in your page. This will yield a small frame which shows the exact contents of the base.html. <iframe src="base.html"></iframe>
The IFrame can be resized using the width and height attributes, where the values are represented in pixels (HTML 4.01 allowed percentage values, but HTML 5 only allows values in CSS pixels). <iframe src="base.html" width="800" height="600"></iframe>
Normally a change of webpage within an Iframe is initiated from with the Iframe, for example, clicking a link inside the Ifame. However, it is possible to change an IFrame's content from outside the IFrame. You can use an anchor tag whose href attribute is set to the desired URL and whose target at...
# Length of a string $ var='12345' $ echo "${#var}" 5 Note that it's the length in number of characters which is not necessarily the same as the number of bytes (like in UTF-8 where most characters are encoded in more than one byte), nor the number of glyphs/graphemes (some of which ...
The Autocomplete widgets provides suggestions while you type into the field. <script> $(document).ready(function() { var tags = ["ask","always", "all", "alright", "one", "foo", "blackberry", "tweet","...

Page 5 of 129