Tutorial by Examples

The procedures Create, Put_Line, Close from the package Ada.Text_IO is used to create and write to the file file.txt. with Ada.Text_IO; procedure Main is use Ada.Text_IO; F : File_Type; begin Create (F, Out_File, "file.txt"); Put_Line (F, "This string will be writ...
This example will provide basic web routing using Iron. To begin with, you will need to add the Iron dependency to your Cargo.toml file. [dependencies] iron = "0.4.*" We will use Iron's own Router library. For simplicity, the Iron project provides this library as part of the Iron cor...
You can also follow the official installation guide here. Step 1) Get The Angular UI Bootstrap Library Files via npm: npm install angular-ui-bootstrap via bower: bower install angular-bootstrap Step 2) Import The Angular UI Bootstrap Module angular.module('myModule', ['ui.bootstrap']); ...
To mock a protected member you must first include the following at the top of your test fixture: using Moq.Protected; You then call Protected() on your mock, after which you can use the generic Setup<> with the return type of your method. var mock = new Mock<MyClass>(); mock.Protec...
When using "controller as syntax" you would give your controller an alias in the html when using the ng-controller directive. <div ng-controller="MainCtrl as main"> </div> You can then access properties and methods from the main variable that represents our contr...
/* In all versions of Progress ABL you can write multi line comments */ /* They can also span a single line */ //Starting with version 11.6 you can also write single line comments //Can you nest single line comments? //Yes you can string = "HELLO". //A single line comme...
See recursion A function can call itself and thereby recurse. FUNCTION factorial INTEGER (num AS INTEGER). IF num = 1 THEN RETURN 1. ELSE RETURN num * factorial(num - 1). END FUNCTION. DISPLAY factorial(5). With standard settings (startup parameter) the Pro...
The source code can be cloned or downloaded from GitHub to test it. node('iOS Node') { stage('Checkout/Build/Test') { // Checkout files. checkout([ $class: 'GitSCM', branches: [[name: 'master']], doGenerateSubmoduleConfigurations: fa...
Here is a simple example of how to use Bokeh in Jupyter Notebook: import numpy as np from bokeh.plotting import figure # Make Bokeh Push push output to Jupyter Notebook. from bokeh.io import push_notebook, show, output_notebook from bokeh.resources import INLINE output_notebook(resources=INLIN...
A keyword is "MONARCHY" then the matrix will look like The matrix is constructed by filling in the letters of the keyword (minus duplicates) from left to right and from top to bottom, and then filling in the remainder of the matrix with the remaining letters in alphabetic order. Plai...
Let's say we have a model called product. class Product(models.Model): name = models.CharField(max_length=100) price = models.IntegerField() Now we are going to declare a model serializers for this model. from rest_framework.serializers import ModelSerializer class ProductSerialize...
Generally you should always define all variable and parameters as NO-UNDO unless you really need to. DEFINE VARIABLE cString AS CHARACTER NO-UNDO. cString = "HELLO". DISPLAY cString.
Using the + operator you can easily concatenate two or more strings. DEFINE VARIABLE cString AS CHARACTER NO-UNDO. cString = "HELLO". cString = cString + " " + "GOODBYE". DISPLAY cString FORMAT "X(20)".
There are a couple of useful built in functions for working with string. All functions working with the position of characters start with index 1 as the first character, not 0 as is common in many languages. STRING - converts any value to a string This example converts the integer 2000 to the stri...
How to reference any accessible folder. How to get the full name of a referenced folder. A pair of routines that together will list every folder within every accessible store. A routine to move a folder from one parent folder to another.
A number of the demonstration macros within this part requires a function which I will explain later. For the moment, please just copy GetFldrNames() to a suitable module. I use this function frequently and keep it, and other like it that I use in many different macros, in a module named “ModGloba...
In TestDefaultFldr() I set Fldr to the default Inbox. The constant olFolderInbox can be replaced by other values giving access to any of the default folders. If you type Set Fldr = Session.GetDefaultFolder(, the VB editor will display a drop down list of all the possible values. Sub TestDefaultFl...
TestFldrChain() demonstrates how to reference any folder within any accessible store: Sub TestFldrChain() Dim Fldr As Folder Set Fldr = Session.Folders("A").Folders("A2"). _ Folders("A21").Folders("A213") Debug.Print...
In Part 2, you were shown how to list every accessible store and the top level folders within each store. This involved a loop through the stores and then a loop for each store through its folders Above you have seen how to reference a known folder at any depth within the hierarchy of folders. Thi...
Why do I want to reference a folder? In the next part I will show you how to access emails within a referenced folder. Here I will show you how to move a folder. I created a folder named “Test” within my Inbox. In TestMoveFolder(), I replaced “A” with the name of the store containing my Inbox. ...

Page 1114 of 1336