Tutorial by Examples: l

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 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...
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.
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...
First of all you should know that you can extend Android.Application class so you can access two important methods related with app lifecycle: OnCreate - Called when the application is starting, before any other application objects have been created (like MainActivity). OnTerminate - This...
Activity lifecycle is quite more complex. As you know Activity is single page in the Android app where user can perform interaction with it. On the diagram below you can see how Android Activity lifecycle looks like: As you can see there is specific flow of Activity lifecycle. In the mobile appl...
As you know you can have one activity but different fragments embedded in it. That is why fragment lifecycle is also important for developers. On the diagram below you can see how Android fragment lifecycle looks like: As described in the official Android documentation you should implement at le...
If you would like to get base project with methods described below you can download Xamarin.Android application template from my GitHub. You can find examples for: Application lifecycle methods Activity lifecycle methods Fragment lifecycle methods https://github.com/Daniel-Krzyczkowski/Xamar...
Consider the Binary Tree: Pre-order traversal(root) is traversing the node then left sub-tree of the node and then the right sub-tree of the node. So the pre-order traversal of above tree will be: 1 2 4 5 3 6 7 In-order traversal(root) is traversing the left sub-tree of the node then the node ...

Page 709 of 861