Tutorial by Examples: f

While standard LaTeX is all that is needed for most simple mathematical formulae and equations, sometimes more symbols and tools are needed. There are multiple packages available that will enhance your equations and provide you with more to work with. Three of the main packages are described below. ...
//Check if a value exists in settings already if (IsolatedStorageSettings.ApplicationSettings.Contains("Key")) { //perform logic }
TikZ provides syntax similar to DOT which you can use to tighten up your graph drawing code considerably. \documentclass{standalone} \usepackage{tikz} \usetikzlibrary{graphs,quotes,arrows.meta} \begin{document} \begin{tikzpicture} \graph[nodes={draw,circle},edges={-{Stealth[]}}] { ...
The state of an object at a given time is represented by the information that it holds at that point. In an OO language, the state is implemented as member variables. In a properly designed object, the state can be changed only by means of calls to its methods and not by direct manipulation of its ...
Get last segment echo end($this->uri->segment_array()); //it will print others Get before last segment echo $this->uri->segment(count($this->uri->segment_array())-1); //it will print how-can-i-do-this More info: [http://stackoverflow.com/questions/9221164/code-igniter-get-b...
SKAction: let waitForOneSecond = SKAction.waitForDuration(1) let action = SKAction.runBlock(){action()} let sequence = SKAction.sequence([waitForOneSecond,action]) self.runAction(sequence) NSTimer: NSTimer.scheduledTimerWithTimeInterval(1, target: self, selector: #selector(action), userInfo: nil,...
h = 1.0 / n; #pragma omp parallel for private(x) shared(n, h) reduction(+:area) for (i = 1; i <= n; i++) { x = h * (i - 0.5); area += (4.0 / (1.0 + x*x)); } pi = h * area; In this example, each threads execute a subset of the iteration count. Each thread has its local private copy ...
h = 1.0 / n; #pragma omp parallel for private(x) shared(n, h, area) for (i = 1; i <= n; i++) { x = h * (i - 0.5); #pragma omp critical { area += (4.0 / (1.0 + x*x)); } } pi = h * area; In this example, each threads execute a subset of the iteration count and they accumul...
h = 1.0 / n; #pragma omp parallel for private(x) shared(n, h, area) for (i = 1; i <= n; i++) { x = h * (i - 0.5); #pragma atomic area += (4.0 / (1.0 + x*x)); } pi = h * area; In this example, each threads execute a subset of the iteration count and they accumulate atomically int...
h = 1.0 / n; #pragma omp parallel private(x) shared(n, h) { double thread_area = 0; // Private / local variable #pragma omp for for (i = 1; i <= n; i++) { x = h * (i - 0.5); thread_area += (4.0 / (1.0 + x*x)); } #pragma omp atomic ...
Animating Background color of stacklayout on tapping button pages/main.component.ts import {Component, ElementRef, ViewChild} from "@angular/core"; import {Color} from "color"; import {View} from "ui/core/view"; @Component({ selector: "main&quot...
pages/main.component.ts import {Component, ElementRef, ViewChild} from "@angular/core"; import {View} from "ui/core/view"; import {AnimationCurve} from "ui/enums"; @Component({ selector: "main", template: ` <StackLayout> ...
Set the NSFetchRequest property sortDescriptors to determine how data is returned. let fetchRequest = NSFetchRequest(entityName: "NAME_OF_ENTITY") let sortDescriptor = NSSortDescriptor(key: "NAME_OF_ATTRIBUTE", ascending: true) fetchRequest.sortDescriptors = [sortDescriptor] ...
Installing software via APT (Advanced Package Tool) also know as 'apt-get'. To install Mozilla Firefox: Open a Terminal (Ctrl+Alt+T) Type sudo apt-get install firefox Hit Enter When it asks to install type 'Y' to confirm. Software will be downloaded and installed.
Eclipse would provide its own embedded Maven enviroment out-of-the-box, which is not recommended whenever a certain Maven version must be used or further configuration must be performed (proxy, mirrors and so on): that is, to have full control over which Maven environment would be used by the IDE. ...
A confusion matrix can be used to evaluate a classifier, based on a set of test data for which the true values are known. It is a simple tool, that helps to give a good visual overview of the performance of the algorithm being used. A confusion matrix is represented as a table. In this example we w...
/_build /cover /deps erl_crash.dump *.ez # Common additions for various operating systems: # MacOS .DS_Store # Common additions for various editors: # JetBrains IDEA, IntelliJ, PyCharm, RubyMine etc. .idea
Apache 2.4 provides the following 6 directives via the mod_rewrite module: RewriteBase RewriteCond RewriteEngine RewriteMap RewriteOptions RewriteRule The following directives, available previously in Apache 2.2 have been removed: RewriteLock RewriteLog RewriteLogLevel All the dir...
Protractor needs only two files to run the first test, spec (test code) file and configuration file. The spec file contains test code and the other one contains configuration details like spec file path, browser details, test url, framework parameters etc. To write first test we will be providing on...

Page 278 of 457