10 2013 档案
摘要:Would you like to be able to write and test code that uses the Amazon DynamoDB API even if you have no network connection and without incurring any usage charges ?If so, you are going to love Amazon's new DynamoDB Local test tool.DynamoDB Local is a client-side database that supports the complet
阅读全文
摘要:1. 什么是Amazon DynamoDBDynamoDB 是一种快速、全面受管的 NoSQL 数据库服务,它能让用户以简单并且经济有效地方式存储和检索任何数据量,同时服务于任何程度的请求流量。所有的数据项都存储在固态驱动器 (SSD) 中,同时在 3 个可用区域间进行复制,确保达到较高的可用性和持久性。通过 DynamoDB,您可以卸下由于运行和扩展高可用性的分布式集群而带来的管理负担,而且只需以较低的价格为您使用的部分付费。服务亮点可扩展 – Amazon DynamoDB 旨在实现吞吐量和存储容量高效无缝扩展。配置吞吐量 – 创建表时,只需指定所需的请求容量即可。DynamoDB 会为您
阅读全文
摘要:在一个函数体内,标识符arguments具有特殊含义.Arguments对象是一个类似数组的对象eg:验证函数参数的正确数目function f(x, y, z) { if (arguments.length != 3) { throw new Error("function with " + arguments.length + "arguments, but it expects 3 arguments.") // now do the actual function } }eg:简单的max函数能接受任意数目的实际参数function ...
阅读全文
摘要:1. Basic Selectors$('p')—Accesses all the paragraph elements in the HTML file $('div')—Accesses all the div elements in the HTML file $('#A')—Accesses all the HTML elements with id=A $('.b')—Accesses all the HTML elements with class=b2.Applying CSS to Elements$('d
阅读全文
摘要:1. SerializeJavaScript object to JSONvar messageObject = { title: 'Hello World!', body: 'It\'s great!' };var serializedJSON = JSON.stringify( messageObject ); });2. Parse JSON to Javascript Objectvar serializedJSON = '{"title":"Hello World!","body&quo
阅读全文
摘要:1.什么是 prototypeprototype 对于 JavaScript 的 意义重大,prototype 不仅仅是一种管理对象继承的机制,更是一种出色的设计思想在现实生活中,我们常常说,某个东西是以另一个东西为原型创作的。这两个东西可以是同一个类型, 也可以是不同类型。习语“照猫画虎”,这里的猫就是原型,而虎就是类型,用 JavaScript 的 prototype 来 表示就是“虎.prototype =某只猫”或者“虎.prototype= new 猫()”eg:function ClassA(){...... }ClassA.prototype = new Object(); fu
阅读全文