diff --git a/misc/AmazonSimpleDB-2009-04-15-scratchpad/webapp/BatchPutAttributes.html b/misc/AmazonSimpleDB-2009-04-15-scratchpad/webapp/BatchPutAttributes.html
new file mode 100644
index 00000000..9d554da9
--- /dev/null
+++ b/misc/AmazonSimpleDB-2009-04-15-scratchpad/webapp/BatchPutAttributes.html
@@ -0,0 +1,156 @@
+
+
+ Amazon SimpleDBScratchpad
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/misc/AmazonSimpleDB-2009-04-15-scratchpad/webapp/CreateDomain.html b/misc/AmazonSimpleDB-2009-04-15-scratchpad/webapp/CreateDomain.html
new file mode 100644
index 00000000..373acf43
--- /dev/null
+++ b/misc/AmazonSimpleDB-2009-04-15-scratchpad/webapp/CreateDomain.html
@@ -0,0 +1,102 @@
+
+
+ Amazon SimpleDBScratchpad
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/misc/AmazonSimpleDB-2009-04-15-scratchpad/webapp/DeleteAttributes.html b/misc/AmazonSimpleDB-2009-04-15-scratchpad/webapp/DeleteAttributes.html
new file mode 100644
index 00000000..a8a66762
--- /dev/null
+++ b/misc/AmazonSimpleDB-2009-04-15-scratchpad/webapp/DeleteAttributes.html
@@ -0,0 +1,175 @@
+
+
+ Amazon SimpleDBScratchpad
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/misc/AmazonSimpleDB-2009-04-15-scratchpad/webapp/DeleteDomain.html b/misc/AmazonSimpleDB-2009-04-15-scratchpad/webapp/DeleteDomain.html
new file mode 100644
index 00000000..3c87a1fc
--- /dev/null
+++ b/misc/AmazonSimpleDB-2009-04-15-scratchpad/webapp/DeleteDomain.html
@@ -0,0 +1,102 @@
+
+
+ Amazon SimpleDBScratchpad
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/misc/AmazonSimpleDB-2009-04-15-scratchpad/webapp/DomainMetadata.html b/misc/AmazonSimpleDB-2009-04-15-scratchpad/webapp/DomainMetadata.html
new file mode 100644
index 00000000..f11484cd
--- /dev/null
+++ b/misc/AmazonSimpleDB-2009-04-15-scratchpad/webapp/DomainMetadata.html
@@ -0,0 +1,102 @@
+
+
+ Amazon SimpleDBScratchpad
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/misc/AmazonSimpleDB-2009-04-15-scratchpad/webapp/GetAttributes.html b/misc/AmazonSimpleDB-2009-04-15-scratchpad/webapp/GetAttributes.html
new file mode 100644
index 00000000..83ed05c4
--- /dev/null
+++ b/misc/AmazonSimpleDB-2009-04-15-scratchpad/webapp/GetAttributes.html
@@ -0,0 +1,120 @@
+
+
+ Amazon SimpleDBScratchpad
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/misc/AmazonSimpleDB-2009-04-15-scratchpad/webapp/ListDomains.html b/misc/AmazonSimpleDB-2009-04-15-scratchpad/webapp/ListDomains.html
new file mode 100644
index 00000000..1d0bcd5a
--- /dev/null
+++ b/misc/AmazonSimpleDB-2009-04-15-scratchpad/webapp/ListDomains.html
@@ -0,0 +1,108 @@
+
+
+ Amazon SimpleDBScratchpad
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/misc/AmazonSimpleDB-2009-04-15-scratchpad/webapp/PutAttributes.html b/misc/AmazonSimpleDB-2009-04-15-scratchpad/webapp/PutAttributes.html
new file mode 100644
index 00000000..890c8e1f
--- /dev/null
+++ b/misc/AmazonSimpleDB-2009-04-15-scratchpad/webapp/PutAttributes.html
@@ -0,0 +1,169 @@
+
+
+ Amazon SimpleDBScratchpad
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/misc/AmazonSimpleDB-2009-04-15-scratchpad/webapp/Select.html b/misc/AmazonSimpleDB-2009-04-15-scratchpad/webapp/Select.html
new file mode 100644
index 00000000..1decb71a
--- /dev/null
+++ b/misc/AmazonSimpleDB-2009-04-15-scratchpad/webapp/Select.html
@@ -0,0 +1,114 @@
+
+
+ Amazon SimpleDBScratchpad
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/misc/AmazonSimpleDB-2009-04-15-scratchpad/webapp/css/scratchpad.css b/misc/AmazonSimpleDB-2009-04-15-scratchpad/webapp/css/scratchpad.css
new file mode 100644
index 00000000..bf0b021d
--- /dev/null
+++ b/misc/AmazonSimpleDB-2009-04-15-scratchpad/webapp/css/scratchpad.css
@@ -0,0 +1,615 @@
+:focus {
+ -moz-outline-style: none;
+}
+html {
+ overflow: -moz-scrollbars-vertical;
+ outline-style: none;
+}
+
+body {
+ font-family: verdana, arial, helvetica, sans-serif;
+ padding: 0px;
+ margin: 0px;
+ font-size: 11px;
+ outline-style: none;
+}
+
+table {
+ font-family: verdana, arial, helvetica, sans-serif;
+ padding: 0;
+ margin: 0;
+ font-size: 12px;
+}
+
+a:active {
+ outline-style: none;
+}
+
+a:hover {
+ text-decoration: underline;
+}
+
+a {
+ text-decoration: none;
+ color: #4b6a86;
+ outline-style: none;
+}
+
+.blurb {
+ margin: 15px;
+ padding: 15px;
+ border: 1px dashed #ffc20d;
+ background-color: #fffbb8;
+}
+
+.apitable {
+ margin: 15px;
+ padding: 15px;
+ width: 500px;
+ border: 1px dashed #cccccc;
+ background-color: #eeeeee;
+}
+
+.apitable {
+ margin: 15px;
+ padding: 15px;
+ border: 1px dashed #cccccc;
+ background-color: #ffffff;
+}
+
+h4 {
+ font-size: 15px;
+ font-weight: bold;
+ color: #c60;
+ margin-top: 0px;
+}
+
+.header {
+ font-family: trebuchet ms, verdana, tahoma, arial;
+ font-size: 22px;
+ font-weight: bold;
+ color: #6D6DA0;
+ margin-top: 0px;
+}
+
+.logo {
+ font-family: trebuchet ms, verdana, tahoma, arial;
+ font-size: 20px;
+ color: #ba3639;
+ margin-top: 0px;
+}
+
+
+.logoweb {
+ font-family: trebuchet ms, verdana, tahoma, arial;
+ font-size: 20px;
+ color: #B3B3B3;
+ margin-top: 0px;
+}
+
+.text {
+ margin: 15px;
+ padding: 15px;
+ border: 1px dashed #ffffff;
+ background-color: #ffffff;
+}
+
+.label {
+ font-family: Arial,Helvetica,sans-serif;
+ font-size :13px ;
+ color : #333333 ;
+}
+
+.smallLabel {
+ font-family: Arial,Helvetica,sans-serif;
+ font-size :11px ;
+ color : #616161 ;
+}
+
+.help {
+ background-color: #ffff99;
+ border: 1px solid #ff9900;
+ display:none;
+ width:700px;
+ font-size: 12px;
+ font-family: Ms san serif, Verdana, Arial;
+ padding: 10px;
+ z-index: 1;
+}
+.outerTable {
+ padding: 0px;
+ height: 100%;
+ margin: 0px;
+ border: 0px;
+ width: 100%;
+
+}
+
+.outerTdRight {
+ background-color: #ffffff;
+ border-bottom: 1px solid #cccccc;
+ border-right: 1px solid #cccccc;
+ padding: 0px;
+}
+
+.logoutTd {
+ padding: 0px;
+ padding-right: 15px;
+ background-color: #f2f2f2;
+
+}
+
+.outerTdBottom {
+ background-color: #ffffff;
+ border-bottom: 1px solid #cccccc;
+ text-align: top;
+ width: 100%;
+ padding: 0px;
+
+}
+
+.outerTdLeft {
+ background-color: #ffffff;
+ border-bottom: 1px solid #cccccc;
+ border-left: 1px solid #cccccc;
+ width: 20%;
+ padding: 0px;
+}
+
+.outerTdLeftColumn {
+ background-color: #f2f2f2;
+ border-bottom: 1px solid #cccccc;
+ border-right: 1px solid #cccccc;
+ align: center;
+ text-align: top;
+ padding: 0px;
+}
+
+.outerTdBody {
+ padding: 15px;
+ height: 100%;
+ background-color: #ffffff;
+ text-align: top;
+ width: 600px;
+ align: left;
+
+}
+
+.outerTdRightColumn {
+ background-color: #f2f2f2;
+ border-bottom: 1px solid #cccccc;
+ border-left: 1px solid #cccccc;
+ width: 20%;
+ text-align: top;
+ padding: 0px;
+}
+
+fieldset {
+ padding: 0px;
+ padding-top: 10px;
+ padding-bottom: 10px;
+ font:100%/1 sans-serif;
+ border: 1px solid #ccc;
+
+}
+.legend {
+ padding: 5px;
+ font-weight:bold;
+ color: #6699cc;
+
+}
+.input {
+ width: 250px;
+ height: 30px;
+ background-color: #ffffff;
+ border: 1px solid #cccccc;
+ font-size: 17px;
+ color: #6699cc;
+}
+select {
+ background-color: #ffffff;
+ color: #6699cc;
+ width: 250px;
+ border: 1px solid #cccccc;
+ height: 30px;
+ font-size: 17px;
+}
+
+td {
+ font-family: helvetica, arial, verdana;
+ font-size: 15px;
+ color: #333;
+}
+.dashedLine {
+ padding-bottom: 2px;
+ border-bottom: 1px dashed #cccccc;
+ width: 100%;
+
+}
+
+.description {
+ background-color: #dbdfff;
+ padding: 15px;
+ margin: 15px;
+ width: 100%;
+
+}
+
+.errors {
+ background-color: #ffdfdf;
+ padding: 15px;
+ margin: 15px;
+ color: red;
+
+}
+
+.response {
+ background-color: #ccff99;
+ padding: 15px;
+ margin: 15px;
+
+}
+.submit {
+ outline: none;
+
+}
+
+ul.list li {
+ list-style-type: square;
+ padding: 5px;
+ color: #333333;
+
+}
+
+.darkLink {
+ text-decoration: none;
+ color: #cc3333;
+ outline-style: none;
+}
+
+.note {
+ background-color: #ffffcc;
+ border: 1px solid #fce383;
+ font-size: 12px;
+ font-family: Ms san serif, Verdana, Arial;
+ padding: 10px;
+ color: #333;
+}
+
+:focus {
+ -moz-outline-style: none;
+}
+html {
+ overflow: -moz-scrollbars-vertical;
+ outline-style: none;
+}
+
+body {
+ font-family: verdana, arial, helvetica, sans-serif;
+ padding: 0px;
+ margin: 0px;
+ font-size: 11px;
+ outline-style: none;
+}
+
+table {
+ font-family: verdana, arial, helvetica, sans-serif;
+ padding: 0;
+ margin: 0;
+ font-size: 12px;
+}
+
+a:active {
+ outline-style: none;
+}
+
+a:hover {
+ text-decoration: underline;
+}
+
+a {
+ text-decoration: none;
+ color: #4b6a86;
+ outline-style: none;
+}
+
+.blurb {
+ margin: 15px;
+ padding: 15px;
+ border: 1px dashed #ffc20d;
+ background-color: #fffbb8;
+}
+
+.apitable {
+ margin: 15px;
+ padding: 15px;
+ width: 500px;
+ border: 1px dashed #cccccc;
+ background-color: #eeeeee;
+}
+
+.apitable {
+ margin: 15px;
+ padding: 15px;
+ border: 1px dashed #cccccc;
+ background-color: #ffffff;
+}
+
+h4 {
+ font-size: 15px;
+ font-weight: bold;
+ color: #c60;
+ margin-top: 0px;
+}
+
+.header {
+ font-family: trebuchet ms, verdana, tahoma, arial;
+ font-size: 18px;
+ font-weight: bold;
+ color: #cc6600;
+ margin-top: 0px;
+}
+
+.logo {
+ font-family: trebuchet ms, verdana, tahoma, arial;
+ font-size: 22px;
+ color: #ba3639;
+ margin-top: 0px;
+ font-weight: bold;
+}
+
+
+.logoweb {
+ font-family: trebuchet ms, verdana, tahoma, arial;
+ font-size: 22px;
+ color: #B3B3B3;
+ margin-top: 0px;
+ font-weight: bold;
+}
+
+.text {
+ margin: 15px;
+ padding: 15px;
+ border: 1px dashed #ffffff;
+ background-color: #ffffff;
+}
+
+.label {
+ font-family: Arial,Helvetica,sans-serif;
+ font-size :13px ;
+ color : #333333 ;
+}
+
+.smallLabel {
+ font-family: Arial,Helvetica,sans-serif;
+ font-size :11px ;
+ color : #616161 ;
+}
+
+.help {
+ background-color: #ffff99;
+ border: 1px solid #ff9900;
+ display:none;
+ width:700px;
+ font-size: 12px;
+ font-family: Ms san serif, Verdana, Arial;
+ padding: 10px;
+ z-index: 1;
+}
+.outerTable {
+ padding: 0px;
+ height: 100%;
+ margin: 0px;
+ border: 0px;
+ width: 100%;
+
+}
+
+.outerTdRight {
+ background-color: #ffffff;
+ border-bottom: 1px solid #cccccc;
+ border-right: 1px solid #cccccc;
+ padding: 0px;
+}
+
+.logoutTd {
+ padding: 0px;
+ padding-right: 15px;
+ background-color: #f2f2f2;
+
+}
+
+.outerTdBottom {
+ background-color: #ffffff;
+ border-bottom: 1px solid #cccccc;
+ text-align: top;
+ width: 100%;
+ padding: 0px;
+
+}
+
+.outerTdLeft {
+ background-color: #ffffff;
+ border-bottom: 1px solid #cccccc;
+ border-left: 1px solid #cccccc;
+ width: 20%;
+ padding: 0px;
+}
+
+.outerTdLeftColumn {
+ background-color: #f2f2f2;
+ border-bottom: 1px solid #cccccc;
+ border-right: 1px solid #cccccc;
+ align: center;
+ text-align: top;
+ padding: 0px;
+}
+
+.outerTdBody {
+ padding: 15px;
+ height: 100%;
+ background-color: #ffffff;
+ text-align: top;
+ width: 600px;
+ align: left;
+
+}
+
+.outerTdRightColumn {
+ background-color: #f2f2f2;
+ border-bottom: 1px solid #cccccc;
+ border-left: 1px solid #cccccc;
+ width: 20%;
+ text-align: top;
+ padding: 0px;
+}
+
+fieldset {
+ padding: 0px;
+ padding-top: 10px;
+ padding-bottom: 10px;
+ font:100%/1 sans-serif;
+ border: 1px solid #ccc;
+
+}
+.legend {
+ padding: 5px;
+ font-weight:bold;
+ color: #6699cc;
+
+}
+.input {
+ width: 250px;
+ height: 30px;
+ background-color: #ffffff;
+ border: 1px solid #cccccc;
+ font-size: 17px;
+ color: #6699cc;
+}
+select {
+ background-color: #ffffff;
+ color: #6699cc;
+ width: 250px;
+ border: 1px solid #cccccc;
+ height: 30px;
+ font-size: 17px;
+}
+
+td {
+ font-family: helvetica, arial, verdana;
+ font-size: 15px;
+ color: #333;
+}
+.dashedLine {
+ padding-bottom: 2px;
+ border-bottom: 1px dashed #cccccc;
+ width: 100%;
+
+}
+
+.description {
+ background-color: #eeeeee;
+ padding: 15px;
+
+}
+
+.errors {
+ background-color: #ffdfdf;
+ padding: 15px;
+ margin: 15px;
+ color: red;
+
+}
+
+.response {
+ background-color: #ccff99;
+ padding: 15px;
+ margin: 15px;
+
+}
+.submit {
+ outline: none;
+
+}
+
+ul.list li {
+ list-style-type: square;
+ padding: 5px;
+ color: #333333;
+
+}
+
+.darkLink {
+ text-decoration: none;
+ color: #cc3333;
+ outline-style: none;
+}
+
+.note {
+ background-color: #ffffcc;
+ border: 1px solid #fce383;
+ font-size: 12px;
+ font-family: Ms san serif, Verdana, Arial;
+ padding: 10px;
+ color: #333;
+}
+
+.label{
+ color: #333;
+
+}
+.tab{
+ color: navy;
+ background-color: white;
+ border-top: 0px solid #6699cc;
+ border-bottom: 0px solid #6699cc;
+ border-left: 1px solid #6699cc;
+ border-right: 1px solid #6699cc;
+ background:url(../images/bg-nav.png);
+ position: absolute;
+ top: 0;
+ width: 120px;
+ text-align: center;
+ font: 9pt Verdana,sans-serif;
+ z-index: 2;
+ padding: 3;
+ cursor: pointer;
+ cursor: hand;
+ height: 33px;
+
+}
+
+.tabLite {
+ filter: alpha(opacity=50); -moz-opacity: 0.5;
+ color: navy;
+ background-color: white;
+ border-top: 0px solid #6699cc;
+ border-bottom: 0px solid #6699cc;
+ border-left: 1px solid #6699cc;
+ border-right: 1px solid #6699cc;
+ background:url(../images/bg-nav.png);
+ position: absolute;
+ top: 3;
+ width: 120px;
+ text-align: center;
+ font: 9pt Verdana,sans-serif;
+ z-index: 2;
+ padding: 3;
+ cursor: pointer;
+ cursor: hand;
+ height: 30px;
+}
+.panel{
+ position: absolute;
+ top: 32;
+ left: 15%;
+ right: 15%;
+ width: 70%;
+ z-index: 1;
+ height: 1000px;
+ display: none;
+ padding: 10;
+ overflow: none;
+ border: 2px dashed #669999;
+}
+
diff --git a/misc/AmazonSimpleDB-2009-04-15-scratchpad/webapp/images/add.gif b/misc/AmazonSimpleDB-2009-04-15-scratchpad/webapp/images/add.gif
new file mode 100644
index 00000000..98e20074
Binary files /dev/null and b/misc/AmazonSimpleDB-2009-04-15-scratchpad/webapp/images/add.gif differ
diff --git a/misc/AmazonSimpleDB-2009-04-15-scratchpad/webapp/images/bg-nav.png b/misc/AmazonSimpleDB-2009-04-15-scratchpad/webapp/images/bg-nav.png
new file mode 100644
index 00000000..a0bf40ef
Binary files /dev/null and b/misc/AmazonSimpleDB-2009-04-15-scratchpad/webapp/images/bg-nav.png differ
diff --git a/misc/AmazonSimpleDB-2009-04-15-scratchpad/webapp/images/bg-table.png b/misc/AmazonSimpleDB-2009-04-15-scratchpad/webapp/images/bg-table.png
new file mode 100644
index 00000000..14d01fd3
Binary files /dev/null and b/misc/AmazonSimpleDB-2009-04-15-scratchpad/webapp/images/bg-table.png differ
diff --git a/misc/AmazonSimpleDB-2009-04-15-scratchpad/webapp/images/bluearrow.gif b/misc/AmazonSimpleDB-2009-04-15-scratchpad/webapp/images/bluearrow.gif
new file mode 100644
index 00000000..77fc5606
Binary files /dev/null and b/misc/AmazonSimpleDB-2009-04-15-scratchpad/webapp/images/bluearrow.gif differ
diff --git a/misc/AmazonSimpleDB-2009-04-15-scratchpad/webapp/images/button-displaystringtosign.png b/misc/AmazonSimpleDB-2009-04-15-scratchpad/webapp/images/button-displaystringtosign.png
new file mode 100644
index 00000000..5d0a3985
Binary files /dev/null and b/misc/AmazonSimpleDB-2009-04-15-scratchpad/webapp/images/button-displaystringtosign.png differ
diff --git a/misc/AmazonSimpleDB-2009-04-15-scratchpad/webapp/images/button-displayurl.png b/misc/AmazonSimpleDB-2009-04-15-scratchpad/webapp/images/button-displayurl.png
new file mode 100644
index 00000000..d206b3e1
Binary files /dev/null and b/misc/AmazonSimpleDB-2009-04-15-scratchpad/webapp/images/button-displayurl.png differ
diff --git a/misc/AmazonSimpleDB-2009-04-15-scratchpad/webapp/images/button-invokerequest.png b/misc/AmazonSimpleDB-2009-04-15-scratchpad/webapp/images/button-invokerequest.png
new file mode 100644
index 00000000..d22e11e7
Binary files /dev/null and b/misc/AmazonSimpleDB-2009-04-15-scratchpad/webapp/images/button-invokerequest.png differ
diff --git a/misc/AmazonSimpleDB-2009-04-15-scratchpad/webapp/images/button-resetform.png b/misc/AmazonSimpleDB-2009-04-15-scratchpad/webapp/images/button-resetform.png
new file mode 100644
index 00000000..c389676d
Binary files /dev/null and b/misc/AmazonSimpleDB-2009-04-15-scratchpad/webapp/images/button-resetform.png differ
diff --git a/misc/AmazonSimpleDB-2009-04-15-scratchpad/webapp/images/delete.gif b/misc/AmazonSimpleDB-2009-04-15-scratchpad/webapp/images/delete.gif
new file mode 100644
index 00000000..677cc25f
Binary files /dev/null and b/misc/AmazonSimpleDB-2009-04-15-scratchpad/webapp/images/delete.gif differ
diff --git a/misc/AmazonSimpleDB-2009-04-15-scratchpad/webapp/images/go.gif b/misc/AmazonSimpleDB-2009-04-15-scratchpad/webapp/images/go.gif
new file mode 100644
index 00000000..15593013
Binary files /dev/null and b/misc/AmazonSimpleDB-2009-04-15-scratchpad/webapp/images/go.gif differ
diff --git a/misc/AmazonSimpleDB-2009-04-15-scratchpad/webapp/images/help.png b/misc/AmazonSimpleDB-2009-04-15-scratchpad/webapp/images/help.png
new file mode 100644
index 00000000..f6f842c7
Binary files /dev/null and b/misc/AmazonSimpleDB-2009-04-15-scratchpad/webapp/images/help.png differ
diff --git a/misc/AmazonSimpleDB-2009-04-15-scratchpad/webapp/images/poweredbyaws.png b/misc/AmazonSimpleDB-2009-04-15-scratchpad/webapp/images/poweredbyaws.png
new file mode 100644
index 00000000..0e3362f9
Binary files /dev/null and b/misc/AmazonSimpleDB-2009-04-15-scratchpad/webapp/images/poweredbyaws.png differ
diff --git a/misc/AmazonSimpleDB-2009-04-15-scratchpad/webapp/images/spacer.gif b/misc/AmazonSimpleDB-2009-04-15-scratchpad/webapp/images/spacer.gif
new file mode 100644
index 00000000..c95709f1
Binary files /dev/null and b/misc/AmazonSimpleDB-2009-04-15-scratchpad/webapp/images/spacer.gif differ
diff --git a/misc/AmazonSimpleDB-2009-04-15-scratchpad/webapp/index.html b/misc/AmazonSimpleDB-2009-04-15-scratchpad/webapp/index.html
new file mode 100644
index 00000000..bf33b4e9
--- /dev/null
+++ b/misc/AmazonSimpleDB-2009-04-15-scratchpad/webapp/index.html
@@ -0,0 +1,4 @@
+
+
+
+
diff --git a/misc/AmazonSimpleDB-2009-04-15-scratchpad/webapp/js/awssigner.js b/misc/AmazonSimpleDB-2009-04-15-scratchpad/webapp/js/awssigner.js
new file mode 100644
index 00000000..0ef9babc
--- /dev/null
+++ b/misc/AmazonSimpleDB-2009-04-15-scratchpad/webapp/js/awssigner.js
@@ -0,0 +1,123 @@
+function AWSSigner(accessKeyId, secretKey) {
+ this.accessKeyId = accessKeyId;
+ this.secretKey = secretKey;
+}
+
+AWSSigner.prototype.sign = function (params, time, requestInfo) {
+ var timeUtc = time.toISO8601();
+ params = this.addFields(params, timeUtc);
+ params.Signature = this.generateSignature(this.canonicalize(params, requestInfo));
+ return params;
+}
+
+AWSSigner.prototype.addFields = function (params, time) {
+ params.AWSAccessKeyId = this.accessKeyId;
+ params.SignatureVersion = this.version;
+ params.SignatureMethod = "HmacSHA1";
+ params.Timestamp = time;
+ return params;
+}
+
+AWSSigner.prototype.generateSignature = function (str) {
+ return b64_hmac_sha1(this.secretKey, str);
+}
+
+AWSV2Signer.prototype = new AWSSigner();
+
+function AWSV2Signer(accessKeyId, secretKey) {
+ AWSSigner.call(this, accessKeyId, secretKey);
+ this.version = 2;
+}
+
+function urlEncode(url) {
+ return encodeURIComponent(url)
+ .replace(/!/g, '%21')
+ .replace(/'/g, '%27')
+ .replace(/\(/g, '%28')
+ .replace(/\)/g, '%29')
+ .replace(/\*/g, '%2A');
+}
+
+AWSV2Signer.prototype.canonicalize = function (params, requestInfo) {
+ var verb = requestInfo.verb;
+ var host = requestInfo.host.toLowerCase();
+ var uriPath = requestInfo.uriPath;
+ var canonical = verb + "\n" + host + "\n" + uriPath + "\n";
+ var sortedKeys = filterAndSortKeys(params, signatureFilter, caseSensitiveComparator);
+ var first = true;
+ for (var i = 0; i < sortedKeys.length; i++) {
+ if (first) {
+ first = false;
+ } else {
+ canonical += "&";
+ }
+ var key = sortedKeys[i];
+ canonical += urlEncode(key);
+ if (params[key] !== null) {
+ canonical += "=" + urlEncode(params[key]);
+ }
+ }
+ return canonical;
+}
+
+function filterAndSortKeys(obj, filter, comparator) {
+ var keys = new Array();
+ for (var key in obj) {
+ if (!filter(key, obj[key])) {
+ keys.push(key);
+ }
+ }
+ return keys.sort(comparator);
+}
+
+function signatureFilter(key, value) {
+ return key === "Signature" || value === null;
+}
+
+function caseInsensitiveComparator(a, b) {
+ return simpleComparator(a.toLowerCase(), b.toLowerCase());
+}
+
+function caseSensitiveComparator(a, b) {
+ var length = a.length;
+ if (b.length < length) {
+ length = b.length;
+ }
+
+ for (var i = 0; i < length; i++) {
+ var comparison = simpleComparator(a.charCodeAt(i), b.charCodeAt(i));
+ if (comparison !== 0) {
+ return comparison;
+ }
+ }
+
+ if (a.length == b.length) {
+ return 0;
+ }
+ if (b.length > a.length) {
+ return 1;
+ }
+ return -1;
+}
+
+function simpleComparator(a, b) {
+ if (a < b) {
+ return -1;
+ } else if (a > b) {
+ return 1;
+ }
+ return 0;
+}
+
+Date.prototype.toISO8601 = function () {
+ return this.getUTCFullYear() + "-"
+ + pad(this.getUTCMonth() + 1) + "-"
+ + pad(this.getUTCDate()) + "T"
+ + pad(this.getUTCHours()) + ":"
+ + pad(this.getUTCMinutes()) + ":"
+ + pad(this.getUTCSeconds()) + ".000Z";
+}
+
+function pad(n) {
+ return (n < 0 || n > 9 ? "" : "0") + n;
+}
\ No newline at end of file
diff --git a/misc/AmazonSimpleDB-2009-04-15-scratchpad/webapp/js/hmacsha1.js b/misc/AmazonSimpleDB-2009-04-15-scratchpad/webapp/js/hmacsha1.js
new file mode 100644
index 00000000..c37e5e39
--- /dev/null
+++ b/misc/AmazonSimpleDB-2009-04-15-scratchpad/webapp/js/hmacsha1.js
@@ -0,0 +1,328 @@
+/*
+ * A JavaScript implementation of the Secure Hash Algorithm, SHA-1, as defined
+ * in FIPS 180-1
+ * Version 2.2-alpha Copyright Paul Johnston 2000 - 2002.
+ * Other contributors: Greg Holt, Andrew Kepert, Ydnar, Lostinet
+ * Distributed under the BSD License
+ * See http://pajhome.org.uk/crypt/md5 for details.
+ */
+
+/*
+ * Configurable variables. You may need to tweak these to be compatible with
+ * the server-side, but the defaults work in most cases.
+ */
+var hexcase = 0; /* hex output format. 0 - lowercase; 1 - uppercase */
+var b64pad = "="; /* base-64 pad character. "=" for strict RFC compliance */
+
+/*
+ * These are the functions you'll usually want to call
+ * They take string arguments and return either hex or base-64 encoded strings
+ */
+function hex_sha1(s) { return rstr2hex(rstr_sha1(str2rstr_utf8(s))); }
+function b64_sha1(s) { return rstr2b64(rstr_sha1(str2rstr_utf8(s))); }
+function any_sha1(s, e) { return rstr2any(rstr_sha1(str2rstr_utf8(s)), e); }
+function hex_hmac_sha1(k, d)
+ { return rstr2hex(rstr_hmac_sha1(str2rstr_utf8(k), str2rstr_utf8(d))); }
+function b64_hmac_sha1(k, d)
+ { return rstr2b64(rstr_hmac_sha1(str2rstr_utf8(k), str2rstr_utf8(d))); }
+function any_hmac_sha1(k, d, e)
+ { return rstr2any(rstr_hmac_sha1(str2rstr_utf8(k), str2rstr_utf8(d)), e); }
+
+/*
+ * Perform a simple self-test to see if the VM is working
+ */
+function sha1_vm_test()
+{
+ return hex_sha1("abc") == "a9993e364706816aba3e25717850c26c9cd0d89d";
+}
+
+/*
+ * Calculate the SHA1 of a raw string
+ */
+function rstr_sha1(s)
+{
+ return binb2rstr(binb_sha1(rstr2binb(s), s.length * 8));
+}
+
+/*
+ * Calculate the HMAC-SHA1 of a key and some data (raw strings)
+ */
+function rstr_hmac_sha1(key, data)
+{
+ var bkey = rstr2binb(key);
+ if(bkey.length > 16) bkey = binb_sha1(bkey, key.length * 8);
+
+ var ipad = Array(16), opad = Array(16);
+ for(var i = 0; i < 16; i++)
+ {
+ ipad[i] = bkey[i] ^ 0x36363636;
+ opad[i] = bkey[i] ^ 0x5C5C5C5C;
+ }
+
+ var hash = binb_sha1(ipad.concat(rstr2binb(data)), 512 + data.length * 8);
+ return binb2rstr(binb_sha1(opad.concat(hash), 512 + 160));
+}
+
+/*
+ * Convert a raw string to a hex string
+ */
+function rstr2hex(input)
+{
+ var hex_tab = hexcase ? "0123456789ABCDEF" : "0123456789abcdef";
+ var output = "";
+ var x;
+ for(var i = 0; i < input.length; i++)
+ {
+ x = input.charCodeAt(i);
+ output += hex_tab.charAt((x >>> 4) & 0x0F)
+ + hex_tab.charAt( x & 0x0F);
+ }
+ return output;
+}
+
+/*
+ * Convert a raw string to a base-64 string
+ */
+function rstr2b64(input)
+{
+ var tab = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
+ var output = "";
+ var len = input.length;
+ for(var i = 0; i < len; i += 3)
+ {
+ var triplet = (input.charCodeAt(i) << 16)
+ | (i + 1 < len ? input.charCodeAt(i+1) << 8 : 0)
+ | (i + 2 < len ? input.charCodeAt(i+2) : 0);
+ for(var j = 0; j < 4; j++)
+ {
+ if(i * 8 + j * 6 > input.length * 8) output += b64pad;
+ else output += tab.charAt((triplet >>> 6*(3-j)) & 0x3F);
+ }
+ }
+ return output;
+}
+
+/*
+ * Convert a raw string to an arbitrary string encoding
+ */
+function rstr2any(input, encoding)
+{
+ var divisor = encoding.length;
+ var remainders = Array();
+ var i, q, x, quotient;
+
+ /* Convert to an array of 16-bit big-endian values, forming the dividend */
+ var dividend = Array(Math.ceil(input.length / 2));
+ for(i = 0; i < dividend.length; i++)
+ {
+ dividend[i] = (input.charCodeAt(i * 2) << 8) | input.charCodeAt(i * 2 + 1);
+ }
+
+ /*
+ * Repeatedly perform a long division. The binary array forms the dividend,
+ * the length of the encoding is the divisor. Once computed, the quotient
+ * forms the dividend for the next step. We stop when the dividend is zero.
+ * All remainders are stored for later use.
+ */
+ while(dividend.length > 0)
+ {
+ quotient = Array();
+ x = 0;
+ for(i = 0; i < dividend.length; i++)
+ {
+ x = (x << 16) + dividend[i];
+ q = Math.floor(x / divisor);
+ x -= q * divisor;
+ if(quotient.length > 0 || q > 0)
+ quotient[quotient.length] = q;
+ }
+ remainders[remainders.length] = x;
+ dividend = quotient;
+ }
+
+ /* Convert the remainders to the output string */
+ var output = "";
+ for(i = remainders.length - 1; i >= 0; i--)
+ output += encoding.charAt(remainders[i]);
+
+ /* Append leading zero equivalents */
+ var full_length = Math.ceil(input.length * 8 /
+ (Math.log(encoding.length) / Math.log(2)))
+ for(i = output.length; i < full_length; i++)
+ output = encoding[0] + output;
+
+ return output;
+}
+
+/*
+ * Encode a string as utf-8.
+ * For efficiency, this assumes the input is valid utf-16.
+ */
+function str2rstr_utf8(input)
+{
+ var output = "";
+ var i = -1;
+ var x, y;
+
+ while(++i < input.length)
+ {
+ /* Decode utf-16 surrogate pairs */
+ x = input.charCodeAt(i);
+ y = i + 1 < input.length ? input.charCodeAt(i + 1) : 0;
+ if(0xD800 <= x && x <= 0xDBFF && 0xDC00 <= y && y <= 0xDFFF)
+ {
+ x = 0x10000 + ((x & 0x03FF) << 10) + (y & 0x03FF);
+ i++;
+ }
+
+ /* Encode output as utf-8 */
+ if(x <= 0x7F)
+ output += String.fromCharCode(x);
+ else if(x <= 0x7FF)
+ output += String.fromCharCode(0xC0 | ((x >>> 6 ) & 0x1F),
+ 0x80 | ( x & 0x3F));
+ else if(x <= 0xFFFF)
+ output += String.fromCharCode(0xE0 | ((x >>> 12) & 0x0F),
+ 0x80 | ((x >>> 6 ) & 0x3F),
+ 0x80 | ( x & 0x3F));
+ else if(x <= 0x1FFFFF)
+ output += String.fromCharCode(0xF0 | ((x >>> 18) & 0x07),
+ 0x80 | ((x >>> 12) & 0x3F),
+ 0x80 | ((x >>> 6 ) & 0x3F),
+ 0x80 | ( x & 0x3F));
+ }
+ return output;
+}
+
+/*
+ * Encode a string as utf-16
+ */
+function str2rstr_utf16le(input)
+{
+ var output = "";
+ for(var i = 0; i < input.length; i++)
+ output += String.fromCharCode( input.charCodeAt(i) & 0xFF,
+ (input.charCodeAt(i) >>> 8) & 0xFF);
+ return output;
+}
+
+function str2rstr_utf16be(input)
+{
+ var output = "";
+ for(var i = 0; i < input.length; i++)
+ output += String.fromCharCode((input.charCodeAt(i) >>> 8) & 0xFF,
+ input.charCodeAt(i) & 0xFF);
+ return output;
+}
+
+/*
+ * Convert a raw string to an array of big-endian words
+ * Characters >255 have their high-byte silently ignored.
+ */
+function rstr2binb(input)
+{
+ var output = Array(input.length >> 2);
+ for(var i = 0; i < output.length; i++)
+ output[i] = 0;
+ for(var i = 0; i < input.length * 8; i += 8)
+ output[i>>5] |= (input.charCodeAt(i / 8) & 0xFF) << (24 - i % 32);
+ return output;
+}
+
+/*
+ * Convert an array of little-endian words to a string
+ */
+function binb2rstr(input)
+{
+ var output = "";
+ for(var i = 0; i < input.length * 32; i += 8)
+ output += String.fromCharCode((input[i>>5] >>> (24 - i % 32)) & 0xFF);
+ return output;
+}
+
+/*
+ * Calculate the SHA-1 of an array of big-endian words, and a bit length
+ */
+function binb_sha1(x, len)
+{
+ /* append padding */
+ x[len >> 5] |= 0x80 << (24 - len % 32);
+ x[((len + 64 >> 9) << 4) + 15] = len;
+
+ var w = Array(80);
+ var a = 1732584193;
+ var b = -271733879;
+ var c = -1732584194;
+ var d = 271733878;
+ var e = -1009589776;
+
+ for(var i = 0; i < x.length; i += 16)
+ {
+ var olda = a;
+ var oldb = b;
+ var oldc = c;
+ var oldd = d;
+ var olde = e;
+
+ for(var j = 0; j < 80; j++)
+ {
+ if(j < 16) w[j] = x[i + j];
+ else w[j] = bit_rol(w[j-3] ^ w[j-8] ^ w[j-14] ^ w[j-16], 1);
+ var t = safe_add(safe_add(bit_rol(a, 5), sha1_ft(j, b, c, d)),
+ safe_add(safe_add(e, w[j]), sha1_kt(j)));
+ e = d;
+ d = c;
+ c = bit_rol(b, 30);
+ b = a;
+ a = t;
+ }
+
+ a = safe_add(a, olda);
+ b = safe_add(b, oldb);
+ c = safe_add(c, oldc);
+ d = safe_add(d, oldd);
+ e = safe_add(e, olde);
+ }
+ return Array(a, b, c, d, e);
+
+}
+
+/*
+ * Perform the appropriate triplet combination function for the current
+ * iteration
+ */
+function sha1_ft(t, b, c, d)
+{
+ if(t < 20) return (b & c) | ((~b) & d);
+ if(t < 40) return b ^ c ^ d;
+ if(t < 60) return (b & c) | (b & d) | (c & d);
+ return b ^ c ^ d;
+}
+
+/*
+ * Determine the appropriate additive constant for the current iteration
+ */
+function sha1_kt(t)
+{
+ return (t < 20) ? 1518500249 : (t < 40) ? 1859775393 :
+ (t < 60) ? -1894007588 : -899497514;
+}
+
+/*
+ * Add integers, wrapping at 2^32. This uses 16-bit operations internally
+ * to work around bugs in some JS interpreters.
+ */
+function safe_add(x, y)
+{
+ var lsw = (x & 0xFFFF) + (y & 0xFFFF);
+ var msw = (x >> 16) + (y >> 16) + (lsw >> 16);
+ return (msw << 16) | (lsw & 0xFFFF);
+}
+
+/*
+ * Bitwise rotate a 32-bit number to the left.
+ */
+function bit_rol(num, cnt)
+{
+ return (num << cnt) | (num >>> (32 - cnt));
+}
diff --git a/misc/AmazonSimpleDB-2009-04-15-scratchpad/webapp/js/scratchpad.js b/misc/AmazonSimpleDB-2009-04-15-scratchpad/webapp/js/scratchpad.js
new file mode 100644
index 00000000..2d2ecde5
--- /dev/null
+++ b/misc/AmazonSimpleDB-2009-04-15-scratchpad/webapp/js/scratchpad.js
@@ -0,0 +1,246 @@
+function toggleDiv(elementName, parent) {
+ var e = document.getElementById(elementName);
+ if (e) {
+ if ((e.style.display != 'block')) {
+ e.style.display = 'block';
+ e.style.position = "absolute";
+ e.style.zIndex = "1";
+ e.style.top = findPosY(parent) + 30 + "px";
+ e.style.left = findPosX(parent) - 600 + "px";
+ } else {
+ e.style.display = 'none';
+ }
+ }
+}
+
+function toggleBlock(elementName) {
+ var e = document.getElementById(elementName);
+ if (e) {
+ if ((e.style.display != 'block')) {
+ e.style.display = 'block';
+ } else {
+ e.style.display = 'none';
+ }
+ }
+}
+
+function findPosX(obj) {
+ var curleft = 0;
+ if (obj.offsetParent) while (1) {
+ curleft += obj.offsetLeft;
+ if (!obj.offsetParent) break;
+ obj = obj.offsetParent;
+ } else if (obj.x) curleft += obj.x;
+ return curleft;
+}
+
+function findPosY(obj) {
+ var curtop = 0;
+ if (obj.offsetParent) while (1) {
+ curtop += obj.offsetTop;
+ if (!obj.offsetParent) break;
+ obj = obj.offsetParent;
+ } else if (obj.y) curtop += obj.y;
+ return curtop;
+}
+
+function cloneRow(id) {
+ var node = document.getElementById(id);
+ var clone = node.cloneNode(true);
+ insertAfter(node, clone);
+ crawlNode(clone, id);
+}
+
+function insertAfter(ref, node) {
+ ref.parentNode.insertBefore(node, ref.nextSibling);
+}
+
+
+function parentContainer(node, level) {
+ while (level > 0) {
+ level = level - 1;
+ return parentContainer(node.parentNode, level);
+ }
+ return node;
+}
+
+function crawlNode(node, idPrefix) {
+ if (node.id) {
+ node.id = indexPlus(node.id, idPrefix);
+ } else if (node.name) {
+ node.name = indexPlus(node.name, idPrefix);
+ }
+
+ if (node.hasChildNodes()) {
+ for (var i = 0; i < node.childNodes.length; i++) {
+ crawlNode(node.childNodes[i], idPrefix);
+ }
+ }
+}
+
+function indexPlus(id, prefix) {
+ return buldIndexName(id, prefix, 1);
+}
+
+function indexMinus(id, prefix) {
+ return buldIndexName(id, prefix, -1);
+}
+
+function buldIndexName(id, prefix, num) {
+ var index = parseInt(extractIndex(prefix));
+ var newIndex = index + parseInt(num);
+ var name = extractName(prefix);
+ return id.replace(prefix, name + "" + (newIndex) + "");
+
+}
+
+function hideAddDelete(id) {
+
+ var addNode = document.getElementById(id + ".Add");
+ var deleteNode = document.getElementById(id + ".Delete");
+ addNode.style.display = 'none';
+ deleteNode.style.display = 'none';
+
+ var previousNodeId = indexPlus(id, id);
+ var previousDeleteNode = document.getElementById(previousNodeId + ".Delete");
+ previousDeleteNode.style.display = '';
+}
+
+function extractIndex(id) {
+ var match = /([0-9]+)$/i.exec(id);
+ return match[1];
+}
+
+function extractName(id) {
+ var match = /^(\S+)[0-9]+$/i.exec(id);
+ return match[1];
+}
+
+function showAddDelete(id) {
+
+ if (isFirstIndex(id)) {
+ var deleteNode = document.getElementById(id + ".Delete");
+ deleteNode.style.display = '';
+ return;
+ }
+ var previousNodeId = indexMinus(id, id);
+ var addNode = document.getElementById(previousNodeId + ".Add");
+ var deleteNode = document.getElementById(previousNodeId + ".Delete");
+ addNode.style.display = '';
+ deleteNode.style.display = '';
+
+}
+
+function deleteRow(id) {
+ if (isFirstIndex(id)) return;
+ var node = document.getElementById(id);
+ node.parentNode.removeChild(node);
+}
+
+function isFirstIndex(id) {
+ var match = /([0-9]+)$/i.exec(id);
+ return match != null && match[1] != null && match[1] == 1;
+}
+
+
+function deleteContainer(node, parentLevel) {
+ var parent = parentContainer(node, parentLevel);
+ deleteRow(parent.id);
+ showAddDelete(parent.id);
+ return false;
+}
+
+function addContainer(node, parentLevel) {
+ var parent = parentContainer(node, parentLevel);
+ cloneRow(parent.id);
+ hideAddDelete(parent.id);
+ return false;
+}
+
+function ignoreCaseSort(a, b) {
+ var ret = 0;
+ a = a.toLowerCase();
+ b = b.toLowerCase();
+ if(a > b) ret = 1;
+ if(a < b) ret = -1;
+ return ret;
+}
+
+/////////////////// String To Sign /////////////////////////////////////////////////////
+function getStringToSign(url) {
+
+ var stringToSign = "";
+ var query = url.split("?")[1];
+
+ var params = query.split("&");
+ params.sort(ignoreCaseSort);
+ for (var i = 0; i < params.length; i++) {
+ var param = params[i].split("=");
+ var name = param[0];
+ var value = param[1];
+ if (name == 'Signature' || undefined == value) continue;
+ stringToSign += name;
+ stringToSign += decodeURIComponent(value);
+ }
+
+ return stringToSign;
+}
+
+function generateSignedURL(actionName, form, accessKeyId, secretKey, endpoint, version) {
+ var host = endpoint.replace(/.*:\/\//, "");
+ var params = {};
+ var payload = null;
+ var displayUri = endpoint;
+
+ for (var i = 0; i < form.elements.length; ++i) {
+ var elementName = form.elements[i].name;
+ var elementValue = null;
+ if (form.elements[i].type == 'text') {
+ elementValue = form.elements[i].value;
+ } else if (form.elements[i].type == 'select-one') {
+ elementValue = form.elements[i].options[form.elements[i].selectedIndex].value;
+ }
+ if (elementValue) {
+ params[elementName] = elementValue;
+ }
+ }
+
+ params.Action = actionName;
+ params.Version = version;
+ var signer = new AWSV2Signer(accessKeyId, secretKey);
+ params = signer.sign(params, new Date(), {
+ "verb": "GET",
+ "host": host,
+ "uriPath": "/"
+ });
+
+ var encodedParams = [];
+ for (var key in params) {
+ if (params[key] !== null) {
+ encodedParams.push(encodeURIComponent(key) + "=" + encodeURIComponent(params[key]));
+ } else {
+ encodedParams.push(encodeURIComponent(key));
+ }
+ }
+
+ payload = encodedParams.join("&");
+ displayUri += "?" + payload;
+
+ return displayUri;
+
+}
+
+
+function getFormFieldsFromUrl(url) {
+ var fields = "";
+ var query = url.split("?")[1];
+ var params = query.split("&");
+ for (var i = 0; i < params.length; i++) {
+ var param = params[i].split("=");
+ var name = param[0];
+ var value = param[1];
+ fields += " ";
+ }
+ return fields;
+
+}
\ No newline at end of file
diff --git a/misc/AmazonSimpleDB-2009-04-15-scratchpad/webapp/main.html b/misc/AmazonSimpleDB-2009-04-15-scratchpad/webapp/main.html
new file mode 100644
index 00000000..74557a60
--- /dev/null
+++ b/misc/AmazonSimpleDB-2009-04-15-scratchpad/webapp/main.html
@@ -0,0 +1,37 @@
+
+
+ Amazon SimpleDBScratchpad
+
+
+
+
+
+
+
+
+ Amazon SimpleDB API Version: 2009-04-15. Scratchpad generated: Thu Jul 15 15:51:04 PDT 2010
+
+
diff --git a/misc/AmazonSimpleDB-2009-04-15-scratchpad/webapp/navbar.html b/misc/AmazonSimpleDB-2009-04-15-scratchpad/webapp/navbar.html
new file mode 100644
index 00000000..35975501
--- /dev/null
+++ b/misc/AmazonSimpleDB-2009-04-15-scratchpad/webapp/navbar.html
@@ -0,0 +1,79 @@
+
+
+ Amazon SimpleDB Scratchpad
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+