give missed call from random number for verification
saw this in wielike app.
its good
saw this in wielike app.
its good
import sys
sys.argv[1:]#will give you a list of arguments (not including the name of the python file)
yo angular
yo angular:controller testController
..add some directives / views etc..
grunt server -- serves up pages correctly on port 9000
grunt -- which creates the dist folder
reference: http://stackoverflow.com/questions/18325510/how-to-deploy-a-yeoman-build-to-aws-node-js
# Create the role and attach the trust policy that enables EC2 to assume this role.
aws iam create-role --role-name Test-Role-for-EC2 --assume-role-policy-document file://C:\policies\trustpolicyforec2.json
# Embed the permissions policy (in this example an inline policy) to the role to specify what it is allowed to do.
aws iam put-role-policy --role-name Test-Role-for-EC2 --policy-name Permissions-Policy-For-Ec2 --policy-document file://c:\policies\permissionspolicyforec2.json
# Create the instance profile required by EC2 to contain the role
aws iam create-instance-profile --instance-profile-name EC2-ListBucket-S3
# Finally, add the role to the instance profile
aws iam add-role-to-instance-profile --instance-profile-name EC2-ListBucket-S3 --role-name Test-Role-for-EC2
| 1-YEAR TERM | |||||
|---|---|---|---|---|---|
| Payment Option | Upfront | Monthly* | Effective Hourly** | Savings over On-Demand | On-Demand Hourly |
| No Upfront | $0 | $71.54 | $0.098 | 26% | $0.132 per Hour |
| Partial Upfront | $356 | $32.12 | $0.0846 | 36% | |
| All Upfront | $726 | $0 | $0.0829 | 37% | |
conf folder ending with .routes as well as the default routes file. Generated class name is always Routes, but the package name depends on the file name. If the file name is routes (the default routes file), compiled class is placed in router package, so the fully qualified class name is router.Routes (which is the default value for play.http.router)..routes from the file name. So for my.test.routes, play.http.router value should be my.test.Routes.public class MyTestBase extends WithApplication {
@Override
protected Application provideApplication() {
Application application = new GuiceApplicationBuilder()
.configure("db.default.driver", "org.h2.Driver")
.configure("db.default.url", "jdbc:h2:mem:play")
.configure("play.http.router", "my.test.Routes")
.build();
return application;
}
}
package com.amazonaws.codesamples.datamodeling;
import java.io.IOException;
import java.util.Arrays;
import java.util.HashSet;
import java.util.Set;
import com.amazonaws.auth.profile.ProfileCredentialsProvider;
import com.amazonaws.services.dynamodbv2.AmazonDynamoDBClient;
import com.amazonaws.services.dynamodbv2.datamodeling.DynamoDBAttribute;
import com.amazonaws.services.dynamodbv2.datamodeling.DynamoDBHashKey;
import com.amazonaws.services.dynamodbv2.datamodeling.DynamoDBMapper;
import com.amazonaws.services.dynamodbv2.datamodeling.DynamoDBMapperConfig;
import com.amazonaws.services.dynamodbv2.datamodeling.DynamoDBTable;
public class ObjectPersistenceCRUDExample {
static AmazonDynamoDBClient client = new AmazonDynamoDBClient(new ProfileCredentialsProvider());
public static void main(String[] args) throws IOException {
testCRUDOperations();
System.out.println("Example complete!");
}
@DynamoDBTable(tableName="ProductCatalog")
public static class CatalogItem {
private Integer id;
private String title;
private String ISBN;
private Set bookAuthors;
@DynamoDBHashKey(attributeName="Id")
public Integer getId() { return id; }
public void setId(Integer id) { this.id = id; }
@DynamoDBAttribute(attributeName="Title")
public String getTitle() { return title; }
public void setTitle(String title) { this.title = title; }
@DynamoDBAttribute(attributeName="ISBN")
public String getISBN() { return ISBN; }
public void setISBN(String ISBN) { this.ISBN = ISBN;}
@DynamoDBAttribute(attributeName = "Authors")
public Set getBookAuthors() { return bookAuthors; }
public void setBookAuthors(Set bookAuthors) { this.bookAuthors = bookAuthors; }
@Override
public String toString() {
return "Book [ISBN=" + ISBN + ", bookAuthors=" + bookAuthors
+ ", id=" + id + ", title=" + title + "]";
}
}
private static void testCRUDOperations() {
CatalogItem item = new CatalogItem();
item.setId(601);
item.setTitle("Book 601");
item.setISBN("611-1111111111");
item.setBookAuthors(new HashSet(Arrays.asList("Author1", "Author2")));
// Save the item (book).
DynamoDBMapper mapper = new DynamoDBMapper(client);
mapper.save(item);
// Retrieve the item.
CatalogItem itemRetrieved = mapper.load(CatalogItem.class, 601);
System.out.println("Item retrieved:");
System.out.println(itemRetrieved);
// Update the item.
itemRetrieved.setISBN("622-2222222222");
itemRetrieved.setBookAuthors(new HashSet(Arrays.asList("Author1", "Author3")));
mapper.save(itemRetrieved);
System.out.println("Item updated:");
System.out.println(itemRetrieved);
// Retrieve the updated item.
DynamoDBMapperConfig config = new DynamoDBMapperConfig(DynamoDBMapperConfig.ConsistentReads.CONSISTENT);
CatalogItem updatedItem = mapper.load(CatalogItem.class, 601, config);
System.out.println("Retrieved the previously updated item:");
System.out.println(updatedItem);
// Delete the item.
mapper.delete(updatedItem);
// Try to retrieve deleted item.
CatalogItem deletedItem = mapper.load(CatalogItem.class, updatedItem.getId(), config);
if (deletedItem == null) {
System.out.println("Done - Sample item is deleted.");
}
}
}