Tutorial by Examples

Install Meteor On OS X and Linux Install the latest official Meteor release from your terminal: $ curl https://install.meteor.com/ | sh On Windows Download the official Meteor installer here. Create your app Once you've installed Meteor, create a project: $ meteor create myapp Run i...
In order to begin building with PayPal APIs, you have to create an application to obtain a client ID and secret. Go to https://developer.paypal.com/developer/applications/, sign in, and click on "Create App", as shown below: Next, enter an application name, select the sandbox testing a...
When testing you PayPal integration on sandbox, you'll need to have sandbox user accounts set up to use to go through the payment flow. Go to https://developer.paypal.com/developer/accounts/, log in using your PayPal account, and click on "Create Account", as below: Enter in the accoun...
The GlobalFetch interface exposes the fetch function, which can be used to request resources. fetch('/path/to/resource.json') .then(response => { if (!response.ok()) { throw new Error("Request failed!"); } return response.json(...
cat file.txt will print the contents of a file. If the file contains non-ASCII characters, you can display those characters symbolically with cat -v. This can be quite useful for situations where control characters would otherwise be invisible. cat -v unicode.txt Very often, for interactive ...
Use the --number flag to print line numbers before each line. Alternatively, -n does the same thing. $ cat --number file 1 line 1 2 line 2 3 4 line 4 5 line 5 To skip empty lines when counting lines, use the --number-nonblank, or simply -b. $ cat -b file 1 line 1 2 line ...
man <command> This will show the manual page for the specified command. For example, man ping will show: PING(8) BSD System Manager's Manual PING(8) NAME ping -- send ICMP ECHO_REQUEST packets to network hosts SYNOPSIS ping [-AaCDdfno...
$url = "https://api.dropboxapi.com/2/sharing/share_folder" $req = [System.Net.HttpWebRequest]::Create($url) $req.headers["Authorization"] = "Bearer <ACCESS_TOKEN>" $req.Method = "POST" $req.ContentType = "application/json" $enc = [system...
$url = "https://api.dropboxapi.com/2/users/get_current_account" $req = [System.Net.HttpWebRequest]::Create($url) $req.headers["Authorization"] = "Bearer <ACCESS_TOKEN>" $req.Method = "POST" $res = $req.GetResponse() Write-Host "Response Sta...
This is how to send an SMS text message from a US number using Twilio's Node.js SDK. First you need to install the Node.js client using: npm install twilio Then, you have to create an account on their website. Once you have an account, you'll need the account SID and auth token that you can fi...
Static method can be inherited similar to normal methods, however unlike normal methods it is impossible to create "abstract" methods in order to force static method overriding. Writing a method with the same signature as a static method in a super class appears to be a form of overriding,...
int a; printf("%d", a); The variable a is an int with automatic storage duration. The example code above is trying to print the value of an uninitialized variable (a was never initialized). Automatic variables which are not initialized have indeterminate values; accessing these can le...
Start by installing the PayPal Node module from NPM npm install paypal-rest-sdk In your application file, add in the configuration information for the SDK var paypal = require('paypal-rest-sdk'); var client_id = 'YOUR CLIENT ID'; var secret = 'YOUR SECRET'; paypal.configure({ 'mode'...
Consider the below list comprehension: >>> def f(x): ... import time ... time.sleep(.1) # Simulate expensive function ... return x**2 >>> [f(x) for x in range(1000) if f(x) > 10] [16, 25, 36, ...] This results in two calls to f(x) for 1,000 values of...
This code creates a sticky footer. When the content doesn't reach the end of the viewport, the footer sticks to the bottom of the viewport. When the content extends past the bottom of the viewport, the footer is also pushed out of the viewport. View Result HTML: <div class="header"&gt...
To create a new Date object use the Date() constructor: with no arguments Date() creates a Date instance containing the current time (up to milliseconds) and date. with one integer argument Date(m) creates a Date instance containing the time and date corresponding to the Epoch time (...
Undoing a merge not yet pushed to a remote If you haven't yet pushed your merge to the remote repository then you can follow the same procedure as in undo the commit although there are some subtle differences. A reset is the simplest option as it will undo both the merge commit and any commits add...
HTML: <div class="container"> <img src="http://lorempixel.com/400/200" /> </div> CSS: html, body, .container { height: 100%; } .container { display: flex; justify-content: center; /* horizontal center */ } img { align-self: center; /...
Defining a new protocol: @protocol NewProtocol - (void)protocolMethod:(id)argument; - (id)anotherMethod; @end
Browse to File > New > Project to bring you up the New Project dialog. Navigate to Visual C# > iOS > iPhone and select Single View App: Give your app a Name and press OK to create your project. Select the Mac Agent icon from the toolbar, as illustrated below: Select the Mac tha...

Page 54 of 1336