Tutorial by Examples

Ways to create a file with the echo command: echo. > example.bat (creates an empty file called "example.bat") echo message > example.bat (creates example.bat containing "message") echo message >> example.bat (adds "message" to a new line in example.bat)...
@echo off prevents the prompt and contents of the batch file from being displayed, so that only the output is visible. The @ makes the output of the echo off command hidden as well.
Ways to create a file with the echo command: ECHO. > example.bat (creates an empty file called "example.bat") ECHO message > example.bat (creates example.bat containing "message") ECHO message >> example.bat (adds "message" to a new line in example.bat)...

Vec

Vec (Vector) is a template class for numerical values. Unlike c++ vectors, it generally stores short vectors (only a few elements). The way a Vec is defined is as follows: typedef Vec<type, channels> Vec< channels>< one char for the type>; where type is one of uchar, short, i...
In OpenCV, images can be RGB/BGR, HSV, grayscaled, black-white and so on. It is crucial to know the data type before dealing with images. The image data types are mainly CV_8UC3 (Matrix of uchar with 3 channels) and CV_8U (Matrix of uchar with 1 channel), however, the conversion to other types such...
DispatchGroup allows for aggregate synchronization of work. You can use them to submit multiple different work items and track when they all complete, even though they might run on different queues. This behavior can be helpful when progress can’t be made until all of the specified tasks are c...
Activate Developer Mode: Login to odoo application. After login user may see several odoo menu's. Click on setting menu. Click on 'Activate the developer mode' which is located at right-bottom corner of settings page. Developer mode now activated.
import React from 'react'; class SearchEs6 extends React.Component{ constructor(props) { super(props); this.state = { searchResults: [] }; } showResults(response){ this.setState({ searchResults: response.results ...
Teacher Class: class Teacher { private String name; private double salary; private String subject; public Teacher (String tname) { name = tname; } public String getName() { return name; } private double getSal...
Android now supports devices with 512MB of RAM. This documentation is intended to help OEMs optimize and configure Android 4.4 for low-memory devices. Several of these optimizations are generic enough that they can be applied to previous releases as well. Enable Low Ram Device flag We are introduc...
The CPU governor itself is just 1 C file, which is located in kernel_source/drivers/cpufreq/, for example: cpufreq_smartass2.c. You are responsible yourself for find the governor (look in an existing kernel repo for your device) But in order to successfully call and compile this file into your ke...
DispatchSemaphore provides an efficient implementation of a traditional counting semaphore, which can be used to control access to a resource across multiple execution contexts. A scenario for when to use a semaphore could be if you are doing some file reading/writing, if multiple tasks are t...
There are two main functions in Redis (HSET and HMSET) for adding fields to a hash key. Both functions are available in redis-py. Using HSET: import redis r = redis.StrictRedis(host='myserver', port=6379, db=0) r.hset('my_key', 'field0', 'value0') Using HMSET: import redis r = redis.St...
Swift 3 Serial Queue func serialQueues () { let serialQueue = DispatchQueue(label: "com.example.serial") //default queue type is a serial queue let start = Date () for i in 0...3 { //launch a bunch of tasks serialQueue.a...
This example echoes the special character ! into a file. This would only work when DelayedExpansion is disabled. When delayed expansion in enabled, you will need to use three carets and an exclamation mark like this: @echo off setlocal enabledelayedexpansion echo ^^^!>file echo ^>>&...
Redis allows you to add items to either the right or the left of a list. If I was working with a list, my_list and I wanted to prepend 3 to the list, I could do that using the Redis LPUSH command: LPUSH my_list 3 If I wanted to append 3 to my_list, I would instead use the RPUSH command: RPUSH ...
Redis provides the LPOP and RPOP commands as a counterpart to the LPUSH and RPUSH commands for fetching data items. If I was working with a list my_list that had several data items in it already, I can get the first item in the list using the LPOP command: LPOP my_list The result of this comman...
Openfire it's available to download at Ignite Realtime website It's also possible to download relative source codeenter link description here Windows installer: Just execute the exe and follow basic instructions as any program (installation directory, shortcut etc.). Unix-Linux-Mac install:...
The size of a set can be determined using the SCARD command. SCARD will return the cardinality of a set or the number of members in the set. For example, if I had a Redis set my_set stored in the database that looked like (Apple, Orange, Banana), I could get the size using the following code: SCA...
The basic Redis command for adding an item to a set is SADD. It takes a key and one or more members and adds them to the set stored at the given key. For example, lets say that I wanted to create a set with the items apple, pear and banana. I could execute either of the following: SADD fruit app...

Page 1145 of 1336