Tutorial by Examples

From VBA array sort function? Public Sub QuickSort(vArray As Variant, inLow As Long, inHi As Long) Dim pivot As Variant Dim tmpSwap As Variant Dim tmpLow As Long Dim tmpHi As Long tmpLow = inLow tmpHi = inHi pivot = vArray((inLow + inHi) \ 2) While (tmpLow <=...
This code takes advantage of the Sort class in the Microsoft Excel Object Library. For further reading, see: Copy a range to a virtual range How to copy selected range into given array? Sub testExcelSort() Dim arr As Variant InitArray arr ExcelSort arr End Sub Private Su...
From anywhere in Vim, execute :help :help. This will open a horizontally split window with the manual page for the :help command. :help by itself will take you to the Table of Contents for the manual itself. Vim's help files are navigable like regular files (you can search for keywords within a fil...
:help [subject] attempts to find the "best" match for the argument you supply. The argument "can include wildcards like *, ? and [a-z] (any letter). You can additionally use Vim's command-line completion with CTRL+D: :help spli<Ctrl-D> will display a list of help topics matchi...
You can create classes without names that are not installed in the system by sending newAnonymousSubclass to a class. For example anonymousSet := Set newAnonymousSubclass will assign an anonymous subclass of Set to anonymousSet variable. Then you can compile methods in this class and instantiat...
var s = "Hello"; // The string referenced by variable 's' is normally immutable, but // since it is memory, we could change it if we can access it in an // unsafe way. unsafe // allows writing to memory; methods on Syste...
var scene = new THREE.Scene(); var camera = new THREE.PerspectiveCamera(75, window.innerWidth / window.innerHeight, 0.1, 50); camera.position.z = 25; var renderer = new THREE.WebGLRenderer(); renderer.setSize(window.innerWidth, window.innerHeight); document.body.appendChild(renderer.domElemen...
Prints out string with a newline. with Ada.Text_IO; procedure Put_Text is use Ada.Text_IO; S : String := "Hello"; begin Put_Line ("Hello"); Put_Line (Standard_Output, "Hello"); Put_Line (Standard_Error, "Hello error"); Put_Li...
String bucketName = "bucket"; List<String> nodes = Arrays.asList("node1","node2"); // IP or hostname of one or more nodes in the cluster Cluster cluster = CouchbaseCluster.create(nodes); Bucket bucket = cluster.openBucket(bucketName); //check for a documen...
Queue follow FIFO as it is mentioned in the introduction. Five major operations: Enqueue(x): pushes x to the back of the queue. Dequeue(): pops an element from the front of the queue. isEmpty(): Finds whether the queue is empty or not. isFull(): Finds whether the queue is full or not. frontV...
Memory is efficiently organized in a circular queue as compared to linear queue. In Linear Queue: In Circular Queue: Remaining spaces can be used: Code for it to do the same: #include<stdio.h> #define MAX 10000 int front = -1; int rear = -1; int a[MAX]; bool isFull() { if...
For example if the input is: Output should be false: As 4 in the left sub-tree is greater than the root value(3) If the input is: Output should be true
Linked list representation is more efficient in terms of memory managerment. Code to show enqueue and deque in a Queue using Linklist in O(1) time. #include<stdio.h> #include<malloc.h> struct node{ int data; node* next; }; node* front = NULL; node* rear = NULL; vo...
Detailed instructions on getting gstreamer set up or installed.
struct tree{ int a; tree* right; tree* left; }; tree* root=NULL; void insert(tree*& in, int b){ if(in){ if(in->a<b) insert(in->right,b); else if(in->a>b) insert(in->left,b); ...
with Ada.Text_IO; procedure Image_And_Value is type Fruit is (Banana, Orange, Pear); X : Fruit := Orange; begin Ada.Text_IO.Put_Line (Boolean'Image (Fruit'Value (Fruit'Image (X)) = X and Fruit'Image (Fruit'Value ("ORANGE")) = "ORANGE"));...
A Vector3 structure can be created in several ways. Vector3 is a struct, and as such, will typically need to be instantiated before use. Constructors There are three built in constructors for instantiating a Vector3. ConstructorResultnew Vector3()Creates a Vector3 structure with co-ordinates of...
The Vector3 structure contains some static functions that can provide utility when we wish to apply movement to the Vector3. Lerp and LerpUnclamped The lerp functions provide movement between two co-ordinates based off a provided fraction. Where Lerp will only permit movement between the two co-or...
Setup ActiveMQ Download a ActiveMQ distribution from activemq.apache.org and unpack it somewhere You can start the server immediately, running unsecured on localhost, using the script bin/activemq When it is running, you can access your local server's console on http://localhost:8161/admin/ Co...
Android Apps are written in Java. The Android SDK tools compile the code, data and resource files into an APK (Android package). Generally, one APK file contains all the content of the app. Each app runs on its own virtual machine(VM) so that app can run isolated from other apps. Android system wor...

Page 1110 of 1336