Tutorial by Examples: 2

(taking a break) With the inclusion of those 4 error numbers, I think this page will have covered about 50% of the typical errors users get. (Yes, this 'Example' needs revision.) 24 Can't open file (Too many open files) open_files_limit comes from an OS setting. table_open_cache needs to be les...
C++11 An unsigned integer type with the same size and alignment as uint_least32_t, which is therefore large enough to hold a UTF-32 code unit. const char32_t full_house[] = U"🂣🂳🂨🂸🃈"; // non-BMP characters std::cout << sizeof(full_house)/sizeof(char32_t) <<...
creating-listview.component.html <ListView [items]="countries" (itemTap)="onItemTap($event)"> <template let-country="item" let-i="index"> <StackLayout orientation="horizontal"> <Label [text]='(i + 1) +...
ngfor.component.html <StackLayout> <Label *ngFor="let item of items" [text]="item"></Label> </StackLayout> ngfor.component.ts import { Component } from "@angular/core"; var dataItems = ["data-item 1", "data-item 2&quo...
For expressing the power of 2 (2^n) of integers, one may use a bitshift operation that allows to explicitly specify the n. The syntax is basically: int pow2 = 1<<n; Examples: int twoExp4 = 1<<4; //2^4 int twoExp5 = 1<<5; //2^5 int twoExp6 = 1<<6; //2^6 ... int twoEx...
Libpng was written as a companion to PNG specification as a way of reducing the amount of time and effort it takes to support the PNG file format in application programs. Libpng was designed to handle multiple sessions at one time, to be easily modifiable, to be portable to the vast majority of mac...
Adding dependencies into the build.gradle file. dependencies { .... compile 'com.squareup.retrofit2:retrofit:2.1.0' compile ('com.thoughtworks.xstream:xstream:1.4.7') { exclude group: 'xmlpull', module: 'xmlpull' } .... } Then create Converter Factory public c...
This can be done with a bit of modification in the above regex ^(?=.{10,}$)(?=(?:.*?[A-Z]){2})(?=.*?[a-z])(?=(?:.*?[0-9]){2}).*$ or ^(?=.{10,}$)(?=(?:.*[A-Z]){2})(?=.*[a-z])(?=(?:.*[0-9]){2}).* Let's see how a simple regex ^(?=(?:.*?[A-Z]){2}) works on string abcAdefD Image Credit :- ht...
The same example above, Image loading, can be written using async functions. This also allows using the common try/catch method for exception handling. Note: as of April 2017, the current releases of all browsers but Internet Explorer supports async functions. function loadImage(url) { return...
For more complex applications, flat execution profiles may be difficult to follow. This is why many profiling tools also generate some form of annotated callgraph information. gperf2dot converts text output from many profilers (Linux perf, callgrind, oprofile etc.) into a callgraph diagram. You can...
// 2. Covariant result version of the base example, static type checking. class Top { public: virtual Top* clone() const = 0; virtual ~Top() = default; // Necessary for `delete` via Top*. }; class D : public Top { public: D* /* ← Covariant return */ clone() const over...
The summation 1/1 + 1/2 + 1/3 + 1/4 + ... + 1/n is equal to the nth harmonic number, denoted Hn. The nth harmonic number obeys the inequalities ln (n + 1) ≤ Hn ≤ (ln n) + 1 and therefore Hn = Θ(log n). The harmonic numbers often arise in the analysis of algorithms, with randomized quicks...
The summation 1/1 + 1/4 + 1/9 + 1/16 + ... out to infinity converges to π2 / 6, and therefore any summation of the form 1/1 + 1/4 + 1/9 + 1/16 + ... + 1/n2 is Θ(1).
To get started: Install celery pip install celery configure celery (head to the remarks section) from __future__ import absolute_import, unicode_literals from celery.decorators import task @task def add_number(x, y): return x + y You can run this asynchronously by using the ....
app.ts import {Component} from '@angular/core'; import {Platform, ionicBootstrap} from 'ionic-angular'; import {StatusBar} from 'ionic-native'; import {LoginPage} from './pages/login/login'; import {FIREBASE_PROVIDERS, defaultFirebase, AuthMethods, AuthProviders, firebaseAuthConfig} from 'angul...
Given: x <- as.matrix(mtcars) One can use heatmap.2 - a more recent optimized version of heatmap, by loading the following library: require(gplots) heatmap.2(x) To add a title, x- or y-label to your heatmap, you need to set the main, xlab and ylab: heatmap.2(x, main = "My main t...
https://godzillai5.wordpress.com/2016/08/20/db2-for-i-in-the-cloud-connecting-to-pub400-via-jdbc-in-netbeans/
For live demo click.. App index ts import {bootstrap} from '@angular/platform-browser-dynamic'; import {MyForm} from './my-form.component.ts'; bootstrap(MyForm); Custom validator import {Control} from @'angular/common'; export class CustomValidators { static emailFormat(control: Cont...
Like for 1D signals, it's possible to filter images by applying a Fourier transformation, multiplying with a filter in the frequency domain, and transforming back into the space domain. Here is how you can apply high- or low-pass filters to an image with Matlab: Let image be the original, unfiltere...
appendToFile: Append single src, or multiple srcs from local file system to the destination file system. Also reads input from stdin and appends to destination file system. Keep the as - hdfs dfs -appendToFile [localfile1 localfile2 ..] [/HDFS/FILE/PATH..] cat: Copies source paths to stdout. ...

Page 8 of 21