Tutorial by Examples: amp

This example will create an EC2 instance of t2.micro type in N.Virginia region running Amazon Linux. During the execution, it will ask to select the KeyPair to use and an I.P. CIDR from where you can SSH to the instance, use default to make SSH open to the internet { "AWSTemplateFormatVersion"...
Assuming that you are working with Windows 7 PC Step 1: GOTO -> C:\Windows\System32\drivers\etc Where you will find a file named “hosts”, kindly copy it and paste it at the same location. A copy file of hosts will be created there. Now we need to make some modifications in this file but if you...
The export tool exports a set of files from HDFS back to an RDBMS. The target table must already exist in the database. The input files are read and parsed into a set of records according to the user-specified delimiters. Example : sqoop export \ --connect="jdbc:<databaseconnector>&quo...
We will present some examples to show how to apply happens-before reasoning to check that writes are visible to subsequent reads. Single-threaded code As you would expect, writes are always visible to subsequent reads in a single-threaded program. public class SingleThreadExample { public in...
In this example we have a file called file.js. Let's assume that you have to parse an URL using JavaScript and NodeJS querystring module. To accomplish this all you have to do is to insert the following statement in your file: const querystring = require('querystring'); var ref = querystring.pa...
While launching an application firstly main thread is executed. This Main thread handles all the UI concept of application. If we want to run long the task in which we don't need the UI then we use thread for running that task in background. Here is the example of Thread which describes blow: new ...
NSTextAttachment *attachment = [[NSTextAttachment alloc] init]; attachment.image = [UIImage imageNamed:@"imageName"]; attachment.bounds = CGRectMake(0, 0, 35, 35); NSAttributedString *attachmentString = [NSAttributedString attributedStringWithAttachment:attachment];
seemed the only way to add a comment. One thing that's easy to forget is that if you string some variables like the example above, and the resulting length is SHORTER than what was originally in the receiving variable (o- string above) then"trailing"characters are left in place. For exam...
Deref has a simple rule: if you have a type T and it implements Deref<Target=F>, then &T coerces to &F, compiler will repeat this as many times as needed to get F, for example: fn f(x: &str) -> &str { x } fn main() { // Compiler will coerce &&&&&&a...
The following example will contain a block of code that is meant to be split into several source files, as denoted by // filename comments. Source Files // my_function.h /* Note how this header contains only a declaration of a function. * Header functions usually do not define implementations...
Background: The Household entity includes a set of options, each of which is an entity that is managed in an admin backend. Each option has a boolean enabled flag. If a previously enabled option is set to disabled it will need to be persisted in later Household edits, but cannot be edited away. T...
Most examples of a function returning a value involve providing a pointer as one of the arguments to allow the function to modify the value pointed to, similar to the following. The actual return value of the function is usually some type such as an int to indicate the status of the result, whether ...
This example uses the official Google .net Client library. PM> Install-Package Google.Apis.AnalyticsReporting.v4 Authorization Requires one of the following OAuth scopes: https://www.googleapis.com/auth/analytics.readonly https://www.googleapis.com/auth/analytics Oauth2 // The...
API requests are HTTP POST with the access token attached at the end of the API end point. Authorization Requires one of the following OAuth scopes: https://www.googleapis.com/auth/analytics.readonly https://www.googleapis.com/auth/analytics Note when posting the data use ContentType = &...
Objective-C Just log this see how to use a particular filter NSArray *properties = [CIFilter filterNamesInCategory:kCICategoryBuiltIn]; for (NSString *filterName in properties) { CIFilter *fltr = [CIFilter filterWithName:filterName]; NSLog(@"%@", [fltr a...
COBOL ***************************************************************** * Example of LINAGE File Descriptor * Tectonics: $ cocb -x linage.cob * $ ./linage <filename ["linage.cob"]> * $ cat -n mini-report ***********************...
Find f(n): nth Fibonacci number. The problem is quite easy when n is relatively small. We can use simple recursion, f(n) = f(n-1) + f(n-2), or we can use dynamic programming approach to avoid the calculation of same function over and over again. But what will you do if the problem says, Given 0 <...
Calls to the Metadata API are with HTTP Get: Using Public API Key GET https://www.googleapis.com/analytics/v3/metadata/ga/columns?key={YOUR_API_KEY} Using Access token from either Oauth2 or Service account authentication GET https://www.googleapis.com/analytics/v3/metadata/ga/columns?acces...
uses the Java Client library /** * 1. Execute a Metadata Request * An application can request columns data by calling the list method on the Analytics service object. * The method requires an reportType parameter that specifies the column data to retrieve. * For example, the following code ...
Uses the PHP client library /** * 1. Execute a Metadata Request * An application can request columns data by calling the list method on the Analytics service object. * The method requires an reportType parameter that specifies the column data to retrieve. * For example, the following code r...

Page 25 of 46