Tutorial by Examples: f

Let's create a new project, I'm choosing Single View Application for better demonstration Drag a page view controller to the storyboard, there are 2 things you should change after that: Set the page view controller as initial view controller Change the transition style to scroll ...
<cfscript> api_request = GetHttpRequestData(); api = createObject("component","myAPI").init(); </cfscript> <cfif api_request.method is 'GET'> <cfoutput>#api.welcome()#</cfoutput> <cfelseif api_request.method is 'POST'> ...
Here can be found the most comprehensive math library that emulates pen and paper calculations and allows working with bigger numbers. Here are another examples of pen and paper emulations: ADD , Comparison , Multiply Some math functions implementations can be found here.
Arrow function is the new way of defining a function in ECMAScript 6. // traditional way of declaring and defining function var sum = function(a,b) { return a+b; } // Arrow Function let sum = (a, b)=> a+b; //Function defination using multiple lines let checkIfEven = (a) => { ...
this in function refers to instance object used to call that function but this in arrow function is equal to this of function in which arrow function is defined. Let's understand using diagram Understanding using examples. var normalFn = function(){ console.log(this) // refers to global/windo...
<?php // if device exists, update timestamp $stmt = $mysqli->prepare("UPDATE new_devices SET nd_timestamp=? WHERE nd_deviceid=?"); $stmt->bind_param('ss', $now, $device); $stmt->execute(); //echo "Affected Rows: ".$stmt->affected_rows; // T...
When trying to filter some record using multiple value in a selector. First you must use the px:PXMultiSelector in the aspx page instead of the normal px:PXSelector. Then after you must create yourself a graph containing at least three views and a view delegate. you will also need at least a basic ...
Following example will help to give equal space to an item in GridLayout. ItemOffsetDecoration.java public class ItemOffsetDecoration extends RecyclerView.ItemDecoration { private int mItemOffset; private int spanCount = 2; public ItemOffsetDecoration(int itemOffset) { ...
Vim saves all your unsaved edits in a swap file, an extra file that gets deleted once the changes are committed by saving. The name of the swap file is usually the name of the file being edited preceded by a . and with a .swp suffix (you can see it with :sw). So in case your vim process terminates ...
Docs: 1.x -> 2.x upgrade guide, registering an element, shared style modules. <link rel="import" href="bower_components/polymer/polymer-element.html"> <dom-module id="element-name"> <template> <!-- Use one of these style declaration...
This has been mentioned in other hybrid topics again and again. The old-school, but easy method to run Powershell is by: echoing the Powershell script into a temporary script Execute the temporary script Optionally remove the temporary script This is a sample script. @echo off echo power...
NSString *appDomain = [[NSBundle mainBundle] bundleIdentifier]; [[NSUserDefaults standardUserDefaults] removePersistentDomainForName:appDomain];
In landscape orientation \documentclass[final,t]{beamer} \mode<presentation> { \usetheme{Berlin} } \usepackage[orientation=landscape,size=a1,scale=1,debug]{beamerposter} \usepackage{lipsum} % for dummy text \title[]{\huge Awesome title} \author[]{\large \textbf{Author Name...
\documentclass[final,t]{beamer} \mode<presentation> { \usetheme{Berlin} } \usepackage[orientation=landscape,size=a1,scale=1,debug]{beamerposter} \usepackage{lipsum} % for dummy text \usepackage{graphicx} % for dummy image \usepackage{tikz} % for tikzpicture \usepackage{pgfplot...
Docs: mixins, hybrid elements. Defining a class expression mixin to share implementation between different elements: <script> MyMixin = function(superClass) { return class extends superClass { // Code that you want common to elements. // If you're going to override a...
Docs: lifecycle callbacks, ready. class MyElement extends Polymer.Element { constructor() { super(); /* ... */ } ready() { super.ready(); /* ... */ } connectedCallback() { super.connectedCallback(); /* ... */ } disconnectedCallback() { super.disconnectedCallback(); /* ... */ } attribut...
\documentclass[12pt]{article} \usepackage{titleps} \usepackage{fancyhdr} \usepackage{graphicx} \usepackage{lipsum} % for dummy text \pagestyle{myheadings} \pagestyle{fancy} \fancyhf{} \setlength{\headheight}{30pt} \renewcommand{\headrulewidth}{4pt} \renewcommand{\footrulewidth}{2pt...
\documentclass[12pt]{article} \usepackage{lastpage} \usepackage{fancyhdr} \usepackage{graphicx} \usepackage{lipsum} % for dummy text \pagestyle{myheadings} \pagestyle{fancy} \fancyhf{} \setlength{\headheight}{30pt} \renewcommand{\headrulewidth}{1pt} \renewcommand{\footrulewidth}{2p...
#include opencv2/opencv.hpp> #include vector> using namespace std; using namespace cv; int main() { Mat3b img = imread("test.jpg"); imshow("Original", img); // Cluster int K = 8; int n = img.rows * img.cols; Mat data = img.reshape(1, n); data.convertTo(data, CV_32F); ...
Here 2 examples of recursive anonymous functions based on previous example. Firstly, simple infinite loop: InfiniteLoop = fun R() -> R() end. Secondly, anonymous function doing loop over list: LoopOverList = fun R([]) -> ok; R([H|T]) -> R(T) end. These two func...

Page 446 of 457