Tutorial by Examples: c

Initializing a record with mutable fields isn't different from a regular record initialization. let john = { name = "John"; weight = 115 };;
You can use BETWEEN clause to replace a combination of "greater than equal AND less than equal" conditions. Data +----+-----------+ | id | username | +----+-----------+ | 1 | admin | | 2 | root | | 3 | toor | | 4 | mysql | | 5 | thanks | | 6 | java ...
Generally tf.gather gives you access to elements in the first dimension of a tensor (e.g. rows 1, 3 and 7 in a 2-dimensional Tensor). If you need access to any other dimension than the first one, or if you don't need the whole slice, but e.g. only the 5th entry in the 1st, 3rd and 7th row, you are b...
Starting with version 2.7 ElementTree has a better support for XPath queries. XPath is a syntax to enable you to navigate through an xml like SQL is used to search through a database. Both find and findall functions support XPath. The xml below will be used for this example <Catalog> &l...
Build the documentation for existent doc source with specified source doc directory and where to be built like following: sphinx-build -b html source build
On the machine where you'd like to make the backup, jump to the Redis CLI: redis-cli Password? If your master Redis DB (the one you want to replicate) has a password: config set masterauth <password> Start replication Run the following to begin replication: SLAVEOF <host> <...
/* creates a database for Alfresco, on SQLServer 2008- 2014 */ use master; GO CREATE DATABASE alfresco; GO /* creates a new LOGIN and associated User use alfresco; GO CREATE LOGIN alfresco WITH PASSWORD = 'alfresco'; GO use alfresco; go CREATE USER alfresco FOR LOGIN alfresco; GO ...
This example is used in specifying options that might not be included in a database of available housing and its attendant amenities. It builds on the previous example, with some differences: Two procedures are no longer necessary for a single combo box, done by combining the code into a single ...
The Java Cryptography Extension (JCE) is a framework built into the JVM to allow developers to easily and securely use cryptography in their programs. It does this by providing a simple, portable interface to programmers, while using a system of JCE Providers to securely implement the underlying cry...
navigator.mediaDevices is the common method adapted in Chrome and FF to getUserMedia as of now. A promised based call back which returns local stream on success navigator.mediaDevices.getUserMedia({ audio: true, video: true }) .then(stream => { // attach this stream to window obje...
GTKWave is a fully feature graphical viewing package that supports several graphical data storage standards, but it also happens to support VCD, which is the format that vvp will output. So, to pick up GTKWave, you have a couple options Goto http://gtkwave.sourceforge.net/gtkwave.zip and downloa...
This example uses Icarus and GTKWave. Installation instructions for those tools on OSx are provided elsewhere on this page. Lets begin with the module design. This module is a BCD to 7 segment display. I have coded the design in an obtuse way simply to give us something that is easily broken and...
One time definition of a generic base class with recursive type specifier. Each node has one parent and multiple children. /// <summary> /// Generic base class for a tree structure /// </summary> /// <typeparam name="T">The node type of the tree</typeparam> pub...
You should create functions in a controller like insert, update, delete, and clear cart etc. eg : for insert new item in cart write below code that accepts value. $cartItem = array( 'id' => 'MOTOG5', 'qty' => 5, 'price' => 100.99, 'name' => 'Motorola Moto G5 - 16 GB',...
$data = array( array( 'id' => 'sku_123ABC', 'qty' => 1, 'price' => 39.95, 'name' => 'T-Shirt', 'options' => array('Size' => 'L', 'Color' => 'Red') ), array( 'id' =>...
Open your jenkins instance script console http://yourJenkins:port/script following is an example for how to get information about this instance. copy the code to the console and click "Run". /* This scripts shows how to get basic information about Jenkins instance */ def jenkins = Jenki...
A Java 8 compatibility kit for Scala. Most examples are copied from Readme Converters between scala.FunctionN and java.util.function import java.util.function._ import scala.compat.java8.FunctionConverters._ val foo: Int => Boolean = i => i > 7 def testBig(ip: IntPredicate) = ip.tes...
func sampleWithCompletion(completion:@escaping (()-> ())){ let delayInSeconds = 1.0 DispatchQueue.main.asyncAfter(deadline: DispatchTime.now() + delayInSeconds) { completion() } } //Call the function sampleWithCompletion { print("after on...

Page 731 of 826