Tutorial by Examples: st

DROP PROCEDURE if exists displayNext100WithName; DELIMITER $$ CREATE PROCEDURE displayNext100WithName ( nStart int, tblName varchar(100) ) BEGIN DECLARE thesql varchar(500); -- holds the constructed sql string to execute -- expands the sizing of the output buffer to accomoda...
;; disable automatic loading of packages after the init file (setq package-enable-at-startup nil) ;; instead load them explicitly (package-initialize) ;; refresh package descriptions (unless package-archive-contents (package-refresh-contents)) ;;; use-package initialization ;;; install ...
Because iota is incremented after each ConstSpec, values within the same expression list will have the same value for iota: const ( bit0, mask0 = 1 << iota, 1<<iota - 1 // bit0 == 1, mask0 == 0 bit1, mask1 // bit1 == 2, mask1 == 1 _, _ ...
Often times, responsive web design involves media queries, which are CSS blocks that are only executed if a condition is satisfied. This is useful for responsive web design because you can use media queries to specify different CSS styles for the mobile version of your website versus the desktop ver...
Activity is the root UserInterface in Android and have it's own life-cycle. MainActivity.java public class MainActivity extends Activity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); Toast.makeText(this, "Activ...
There are two ways to define functions with multiple parameters in F#, Curried functions and Tupled functions. let curriedAdd x y = x + y // Signature: x:int -> y:int -> int let tupledAdd (x, y) = x + y // Signature: x:int * y:int -> int All functions defined from outside F# (such as ...
The stack is a small region of memory into which temporary values are placed during execution. Allocating data into the stack is very fast compared to heap allocation, as all the memory has already been assigned for this purpose. int main() { int a = 0; //Stored on the stack return a; } ...
The term 'heap' is a general computing term meaning an area of memory from which portions can be allocated and deallocated independently of the memory provided by the stack. In C++ the Standard refers to this area as the Free Store which is considered a more accurate term. Areas of memory allocate...
Arithmetic operations are performed elementwise on Numpy arrays. For arrays of identical shape, this means that the operation is executed between elements at corresponding indices. # Create two arrays of the same size a = np.arange(6).reshape(2, 3) b = np.ones(6).reshape(2, 3) a # array([0, 1...
app/pipes.pipe.ts import { Pipe, PipeTransform } from '@angular/core'; @Pipe({name: 'truthy'}) export class Truthy implements PipeTransform { transform(value: any, truthy: string, falsey: string): any { if (typeof value === 'boolean'){return value ? truthy : falsey;} else return va...
Instantiating a socket can be done in various ways. by 2 line declaration & instantiation: First we need to define a variable which will hold a Socket class object: Socket socket; then we can create a Socket class object: socket = new Socket(); We can also make a one line defin...
Installing aws cli in Ubuntu / Debian Instance sudo apt-get install -y python-dev python-pip sudo pip install awscli aws --version aws configure Installing aws cli using python Using pip you can install aws cli in windows, OS X and Linux sudo pip install awscli Configuring the AWS Comman...
Unit Test Unit tests are used to ensure that your code has no syntax error and to test the logic of your code to work as what you expected. Quick example: src/AppBundle/Calculator/BillCalculator.php <?php namespace AppBundle\Calculator; use AppBundle\Calculator\TaxCalculator; class Bi...
JSTL is part of the Java EE API and included in Java EE application servers such as WildFly, TomEE, GlassFish, but not in barebones servletcontainers such as Tomcat and Jetty. JSTL are the taglibs which you import from http://java.sun.com/jsp/jstl/* namespace. JSTL must not be confused with a "...
There are various methods available for explicitly converting a string to an integer, such as: Convert.ToInt16(); Convert.ToInt32(); Convert.ToInt64(); int.Parse(); But all these methods will throw a FormatException, if the input string contains non-numeric characters. For t...
string str = "this--is--a--complete--sentence"; string[] tokens = str.Split(new[] { "--" }, StringSplitOptions.None); Result: [ "this", "is", "a", "complete", "sentence" ]
It is also possible to use Scala's string interpolation feature to create elaborate extractors (pattern matchers), as perhaps most famously employed in the quasiquotes API of Scala macros. Given that n"p0${i0}p1" desugars to new StringContext("p0", "p1").n(i0), it is p...
To the average R user, the list structure may appear to be the one of the more complicated data structures to manipulate. There are no guarantees that all the elements within it are of the same type; There is no guaranteed structure of how complicated/non-complicated that the list would be (An eleme...

Page 100 of 369