Tutorial by Examples

// PixelAccessTutorial.cpp : Defines the entry point for the console // Environment: Visual studio 2015, Windows 10 // Assumptions: Opecv is installed configured in the visual studio project // Opencv version: OpenCV 3.1 #include "stdafx.h" #include<opencv2/core/core.hpp> #i...
For live plnkr click... <!doctype html> <html> <head> <title>ng for loop in angular 2 with ES5.</title> <script type="text/javascript" src="https://code.angularjs.org/2.0.0-alpha.28/angular2.sfx.dev.js"></script> <scr...
It's also possible to use selectors together. This is done by using the OpenQA.Selenium.Support.PageObjects.ByChained object: element = driver.FindElement(new ByChained(By.TagName("input"), By.ClassName("class")); Any number of Bys can be chained and are used as an AND type ...
Below is an usage of canny algorithm in c++. Note that the image is first converted to grayscale image, then Gaussian filter is used to reduce the noise in the image. Then Canny algorithm is used for edge detection. // CannyTutorial.cpp : Defines the entry point for the console application. // En...
This class open a .gz file (usual format of compressed log files) and will return a line at each call of .NextLine() There is no memory usage for temporary decompression, very useful for large file. Imports System.IO Class logread_gz Private ptr As FileStream Private UnGZPtr As Compress...
Here is the JSON Structure we are going to use. { "employees": [ { "firstName": "John", "lastName": "Doe", "skills": [ { "name": "javascript", "rating&quo...
Taggy-lens allows us to use lenses to parse and inspect HTML documents. #!/usr/bin/env stack -- stack --resolver lts-7.0 --install-ghc runghc --package text --package lens --package taggy-lens {-# LANGUAGE OverloadedStrings #-} import qualified Data.Text.Lazy as TL import qualified Data.Tex...
Detailed instructions on getting phonegap-build set up or installed.
<cfscript> oneDimensionArray = ArrayNew(1); oneDimensionArray[1] = 1; oneDimensionArray[2] = 'one'; oneDimensionArray[3] = '1'; </cfscript> <cfif IsDefined("oneDimensionArray")> <cfdump var="#oneDimensionArray#"> </cfif>...
Overview Android Studio's built-in update mechanism can be set to receive updates through any one of these four channels: Canary: Bleeding edge, released about weekly. These are early previews released in order to obtain real-world feedback during development. The canary channel will always have...
Detailed instructions on getting retrofit set up or installed.
var person = { name: ko.observable('John') }; console.log(person.name()); console.log('Update name'); person.name.subscribe(function(newValue) { console.log("Updated value is " + newValue); }); person.name('Jane');
Though Go supports ++ and -- operators and the behaviour is found to be almost similar to c/c++, variables with such operators cannot be passed as argument to function. package main import ( "fmt" ) func abcd(a int, b int) { fmt.Println(a," &...
You can attach an image in a texture to a framebuffer, so that you can render directly to that texture. glGenFramebuffers (1, &framebuffer); glBindFramebuffer (GL_FRAMEBUFFER, framebuffer); glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, ...
You can read texture data with function glGetTexImage: char *outBuffer = malloc(buf_size); glActiveTexture(GL_TEXTURE0); glBindTexture(GL_TEXTURE_2D, texture); glGetTexImage(GL_TEXTURE_2D, 0, GL_RGBA, GL_UNSIGNED_BYTE, outBuffer); ...
Sometimes there are sections of code that are difficult to test, such as accessing a database, or interacting with the user. You can stub out those sections of code, allowing the rest of the code to be tested. Let's start with a class that prompts the user. For simplicity, it has only two methods...
Go to the Microsoft link for the OpenXML SDK download. Click the red download button. On the next screen click the box next to OpenXMLSDKToolV25.msi and click next to begin the download. Once the download is complete, launch the OpenXMLSDKToolV25.msi and follow the instructions on the screen. Th...
preserveAspectRatio is an attribute that indicates whether the image should be scaled uniformly. This attribute only works if the <svg> element also has a viewBox. The default value is xMidYMid, which maintains the aspect ratio and centers the path inside the SVG container: <!-- when not ...
To set up a default SceneKit project you can use the Game Template.
If you are inserting data into a table with an auto increment column and if you want to get the value of the auto increment column. Say you have a table called my_table: CREATE TABLE my_table ( id serial NOT NULL, -- serial data type is auto incrementing four-byte integer name character varying...

Page 941 of 1336