Tutorial by Examples

Doubly Linked Lists are a type of linked list. A doubly linked list's nodes have two "pointers" to other nodes, "next" and "previous." It is called a double linked list because each node only has two "pointers" to other nodes. A doubly linked list may have a h...
Big O notation provides upper bounds for the growth of functions. Intuitively for f ∊ O(g), f grows at most as fast as g. Formally f ∊ O(g) if and only if there is a positive number C and a positive number ``n such that for all positive numbers m > n we have C⋅g(m) > f(m). Intuition of ...
echo "Hello, world!" Even in bash, this program works similarly in most other languages. The program has no input and will always function the same in an idealized world - run time should never change. Thus Hello World has constant complexity. Almost all elementary operations are assum...
image: jangrewe/gitlab-ci-android before_script: - apt-get --quiet update --yes - apt-get --quiet install --yes wget tar unzip lib32stdc++6 lib32z1 openjdk-8-jdk - echo y | ${ANDROID_HOME}/tools/android --silent update sdk --no-ui --all --filter android-24 - echo y | ${ANDROID_HOME}/too...
There is a dozen implementations of Standard ML. MLton produces very optimized code, but has no REPL. SML/NJ is the most widely used, but has slightly difficult error messages for learning purposes. Moscow ML and Poly/ML are easy to get started with, but don't support the .mlb package format. That i...
// Basic code for Express Instance var express = require('express'); var app = express(); // Serve static files from directory 'public' app.use(express.static('public')); // Start Express server app.listen(3030);
// Set up Express var express = require('express'); var app = express(); // Serve static assets from both 'public' and 'files' directory app.use(express.static('public'); app.use(express.static('files'); // Start Express server app.listen(3030);
// Set up Express var express = require('express'); var app = express(); // Specify mount path, '/static', for the static directory app.use('/static', express.static('public')); // Start Express server app.listen(3030);
// Set up Express var express = require('express'); var app = express(); // Serve files from the absolute path of the directory app.use(express.static(__dirname + '/public')); // Start Express server app.listen(3030);
// Set up Express var express = require('express'); var app = express(); /* Serve from the absolute path of the directory that you want to serve with a */ virtual path prefix app.use('/static', express.static(__dirname + '/public')); // Start Express server app.listen(3030);
Joins in Spark: Read textFile 1 val txt1=sc.textFile(path="/path/to/input/file1") Eg: A B 1 2 3 4 Read textFile 2 val txt2=sc.textFile(path="/path/to/input/file2") Eg: A C 1 5 3 6 Join and print the result. txt1.join(txt2).foreach(p...
Two of the most fundamental higher-order functions included in the standard library are map and filter. These functions are generic and can operate on any iterable. In particular, they are well-suited for computations on arrays. Suppose we have a dataset of schools. Each school teaches a particular...
You can use the IFA for measuring ad clicks and the IFV for measuring app installs. IFA has built-in privacy mechanisms that make it perfect for advertising. In contrast, the IFV is for developers to use internally to measure users who install their apps. IFA ASIdentifierManager class pr...
A lot of example code posted on StackOverflow includes snippets like this: if ("A".equals(someString)) { // do something } This does "prevent" or "avoid" a possible NullPointerException in the case that someString is null. Furthermore, it is arguable that ...
This example shows how to deploy the "Hello World" program as a library and how to link it with other targets. Say we have the same set of source/header files as in the http://www.riptutorial.com/cmake/example/22391/-hello-world--with-multiple-source-files example. Instead of building fro...
A bit-field is used to club together many variables into one object, similar to a structure. This allows for reduced memory usage and is especially useful in an embedded environment. e.g. consider the following variables having the ranges as given below. a --> range 0 - 3 b --> range 0 -...
- Without quotes: You can just split a long piece of text like this. - With quotes: "[But be careful: if you \"need\" punctuation, put double quotes around it. You can ev\ en split without spaces by using backslashes." - Or single quotes: 'This wor...
This is a simple trigger function. CREATE OR REPLACE FUNCTION my_simple_trigger_function() RETURNS trigger AS $BODY$ BEGIN -- TG_TABLE_NAME :name of the table that caused the trigger invocation IF (TG_TABLE_NAME = 'users') THEN --TG_OP : operation the trigger was fired IF (TG_O...
Design documents contain application logic. Any document in a database that has an _id starting with "_design/" can be used as design document. Usually there is one design document for each application. { "_id": "_design/example", "view": { ...
All programming languages allow us to assign values to variables. Usually, a value is assigned to variable, standing on left side. The prototype of the overall assignment operations in any contemporary programming language looks like this: left_operand assignment_operand right_operand instructions_...

Page 940 of 1336