Tutorial by Examples: ect

As mentioned in another example a subset of the elements of an array, called an array section, may be referenced. From that example we may have real x(10) x(:) = 0. x(2:6) = 1. x(3:4) = [3., 5.] Array sections may be more general than this, though. They may take the form of subscript trip...
Open the C# project Right-click on the solution -> Add -> New Project… (Figure 1) Go to Installed -> Visual C# -> Test Click on Unit Test Project Give it a name and click OK (Figure 2) The unit test project is added to the solution (Figure 3) Adding the referen...
Requirements: Add following references to the project: Microsoft ActiveX Data Objects 2.8 Library Microsoft ActiveX Data Objects Recordset 2.8 Library Declare variables Private mDataBase As New ADODB.Connection Private mRS As New ADODB.Recordset Private mCmd As New ADODB.Command...
First get the Configuration File for Sign-in from Open link below [https://developers.google.com/identity/sign-in/android/start-integrating][1] click on get A configuration file Enter App name And package name and click on choose and configure services provide SHA1 Enable google SIGNIN and g...
An example of implementation which give a possibility to detect if user single or double tap on UITableViewCell. override func viewDidLoad() { viewDidLoad() let doubleTapGestureRecognizer = UITapGestureRecognizer(target: self, action: #selector(handleDoubleTap(sender:))) double...
An example of implementation UITableView which allows to detect if cell has been tapped single or double time. override func viewDidLoad() { viewDidLoad() let doubleTapGestureRecognizer = UITapGestureRecognizer(target: self, action: #selector(handleDoubleTap(sender:))) doubleTa...
step 1: Create Project - Application - app.js - Controllers - appController.js - Factories - SignalR-factory.js - index.html - Scripts - angular.js - jquery.js - jquery.signalR.min.js - Hubs SignalR version use: signalR-2.2.1 Step 2: Startu...
matrix-vector(A,x) n = A.lines y = Vector(n) //create a new vector of length n parallel for i = 1 to n y[i] = 0 parallel for i = 1 to n for j = 1 to n y[i] = y[i] + A[i][j]*x[j] return y
var MongoClient = require('mongodb').MongoClient; //connection with mongoDB MongoClient.connect("mongodb://localhost:27017/MyDb", function (err, db) { //check the connection if(err){ console.log("connection failed."); }else{ ...
To list the available databases, use the following command: $ show databases name: databases name ---- _internal devices ... list of your databases You can connect to one specific database: $ use <database_name> By using a single database, the scope for each subsequent query wi...
Option Explicit Sub CheckWorksheetsDiagram() Debug.Print Worksheets(1).Name Debug.Print Charts(1).Name Debug.Print Sheets(1).Name End Sub The result: Sheet1 Chart1 Chart1
public class Foobar { public static void main(String[] args) { // example: Boolean ignore = null; if (ignore == false) { System.out.println("Do not ignore!"); } } } The pitfall here is that null is compared to false. Since w...
Component: <md2-select [(ngModel)]="item" (change)="change($event)" [disabled]="disabled"> <md2-option *ngFor="let i of items" [value]="i.value" [disabled]="i.disabled"> {{i.name}}</md2-option> </md2-select> ...
Assume that, we implement a simple API and we have the following models. class Parent(models.Model): name = models.CharField(max_length=50) class Child(models.Model): parent = models.ForeignKey(Parent) child_name = models.CharField(max_length=80) And we want to return a respo...
DirectByteBuffer is special implementation of ByteBuffer that has no byte[] laying underneath. We can allocate such ByteBuffer by calling: ByteBuffer directBuffer = ByteBuffer.allocateDirect(16); This operation will allocate 16 bytes of memory. The contents of direct buffers may reside outside ...
Once you have discovered a desired BluetoothDevice object, you can connect to it by using its connectGatt() method which takes as parameters a Context object, a boolean indicating whether to automatically connect to the BLE device and a BluetoothGattCallback reference where connection events and cli...
Each section can can contain JavaScript and Stylesheets, these two languages are used within liquid tags: {% javascript %}{% endjavascript %} & {% stylesheet %}{% endstylesheet %}. When placing code inside of these two tags, Shopify compiles each piece into shopify_compiled.js & shopify_com...
The raycaster has an origin, where its ray starts, and a direction, where the ray goes. The origin of the raycaster is at the raycaster entity’s position. We can change the origin of the raycaster by setting the position component of the raycaster entity (or parent entities of the raycaster entity)...
We usually don’t want to test everything in the scene for intersections (e.g., for collisions or for clicks). Selective intersections are good for performance to limit the number of entities to test for intersection since intersection testing is an operation that will run over 60 times per second. ...
This example shows how to achieve an effect similar to FaceTime were a view is attracted to point once it enters a particular region, in this case two regions a top and bottom. Swift class ViewController: UIViewController { lazy var dynamicAnimator: UIDynamicAnimator = { let ...

Page 94 of 99