Tutorial by Examples

The stack is a LIFO (last-in, first-out) data-structure, i.e. the most recent (or "last in") element added to the stack will be the first element removed ("first out"). Let us consider the example of books in a box. Only one book can be added or removed from from the box at a ti...
Operators that bound tighter (higher precedence) are listed first. OperatorsPrecedence group (≥3.0)PrecedenceAssociativity.∞left?, !, ++, --, [], (), {}(postfix)!, ~, +, -, ++, --(prefix)~> (swift ≤2.3)255left<<, >>BitwiseShiftPrecedence160none*, /, %, &, &*MultiplicationPrec...
let Source = Folder.Files("\\jsds1.live\dfs\Userprofiles\ixh500\UPM_Profile\desktop\PQ Desktop Demos\Set 2"), #"Lowercased Text" = Table.TransformColumns(Source,{{"Extension", Text.Lower}}), #"Filtered Rows" = Table.SelectRows(#"Lowercased ...
Previous Quarter Sales:=CALCULATE(FactSales[Sales], PREVIOUSQUARTER(DimDate[DateKey])) (Calculates the total sales for the previous quarter, based on the Sales column in the FactSales table and the DateKey in the DimDate table, depending on the filters applied in a PivotTable or PivotChart)
You could migrate from team foundation version control to git by using an open source tool called Git-TF. Migration will also transfer your existing history by converting tfs checkins to git commits. To put your solution into Git by using Git-TF follow these steps: Download Git-TF You can downloa...
This is contrived; but some COBOL programmers may prefer the positive clarity, versus using NOT in conditional expressions (especially with the logic error prone var NOT = value OR other-value). if action-flag = "C" or "R" or "U" or "D" continue else...
program-one. FD important-file. 01 file-record. COPY record-layout. DATA DIVISION. 01 memory-record. COPY record-layout. PROCEDURE DIVISION. ... COPY record-move. ... COPY record-move. program-two. DATA DIVISION. 01 print-record. COPY record-lay...
Swarm Mode Node Availability: Active means that the scheduler can assign tasks to a node. Pause means the scheduler doesn’t assign new tasks to the node, but existing tasks remain running. Drain means the scheduler doesn’t assign new tasks to the node. The scheduler shuts down any existing ta...
To promote a node or set of nodes, run docker node promote from a manager node: docker node promote node-3 node-2 Node node-3 promoted to a manager in the swarm. Node node-2 promoted to a manager in the swarm. To demote a node or set of nodes, run docker node demote from a manager node: doc...
Worker Node: #Run the following on the worker node to leave the swarm. docker swarm leave Node left the swarm. If the node has the Manager role, you will get a warning about maintaining the quorum of Managers. You can use --force to leave on the manager node: #Manager Node docker swarm l...
(The following is a simplified version of what the Java Language Specification says. For a deeper understanding, you need to read the specification itself.) Happens-before relationships are the part of the Memory Model that allow us to understand and reason about memory visibility. As the JLS say...
The matplotlib.animation package offer some classes for creating animations. FuncAnimation creates animations by repeatedly calling a function. Here we use a function animate() that changes the coordinates of a point on the graph of a sine function. import numpy as np import matplotlib.pyplot as p...
We start off by creating an audio context and then create an oscillator which is the easiest way to check that your setup works. (Example fiddle) // We can either use the standard AudioContext or the webkitAudioContext (Safari) var audioContext = (window.AudioContext || window.webkitAudioContext);...
The best way to get started using Spring-Integration in your project is with a dependency management system, like gradle. dependencies { compile 'org.springframework.integration:spring-integration-core:4.3.5.RELEASE' } Below is a very simple example using the gateway, service-activator mes...
Step 1: First of all follow these two steps to add in app functionality : 1. Add the library using : repositories { mavenCentral() } dependencies { compile 'com.anjlab.android.iab.v3:library:1.0.+' } 2. Add permission in manifest file. <u...
In this example we use the save method to save an Animation object using ImageMagick. import numpy as np import matplotlib.pyplot as plt import matplotlib.animation as animation from matplotlib import rcParams # make sure the full paths for ImageMagick and ffmpeg are configured rcParams['ani...

C#

In order to execute JavaScript in a IWebDriver instance you need to cast the IWebDriver to a new interface, IJavaScriptExecutor IWebDriver driver; IJavaScriptExecutor jsDriver = driver as IJavaScriptExecutor; You can now access all the methods available on the IJavaScriptExecutor instance which...
You can install Celery either via the Python Package Index (PyPI) or from source. To install the latest version using pip: $ pip install celery To install using easy_install: $ easy_install celery Downloading and installing from source Download the latest version of Celery from http://pypi...
This example will create an EC2 instance of t2.micro type in N.Virginia region running Amazon Linux. During the execution, it will ask to select the KeyPair to use and an I.P. CIDR from where you can SSH to the instance, use default to make SSH open to the internet { "AWSTemplateFormatVersion"...
You can create unlogged tables so that you can make the tables considerably faster. Unlogged table skips writing write-ahead log which means it's not crash-safe and unable to replicate. CREATE UNLOGGED TABLE person ( person_id BIGINT NOT NULL PRIMARY KEY, last_name VARCHAR(255) NOT NULL, ...

Page 943 of 1336