This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[{ | |
"Note": "The first two digits (ranging from 10–43) correspond to the province, while the last two digits correspond either to the city/delivery zone (range 01–50) or to the district/delivery zone (range 51–99). Afghanistan Postal code lookup", | |
"Country": "Afghanistan", | |
"ISO": "AF", | |
"Format": "NNNN", | |
"Regex": "^\\d{4}$" | |
}, { | |
"Note": "With Finland, first two numbers are 22.", | |
"Country": "Åland Islands", | |
"ISO": "AX", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.thurloat.foo; | |
import org.codehaus.jackson.annotate.JsonIgnore; | |
import org.codehaus.jackson.annotate.JsonProperty; | |
/** | |
* In order to write a composite data property (stats) out to JSON without reading | |
* it back in, you need to explicitly ignore the property, as well as the setter and | |
* then apply the @JsonProperty annotation to the getter. | |
**/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function () { | |
// IndexedDB | |
var indexedDB = window.indexedDB || window.webkitIndexedDB || window.mozIndexedDB || window.OIndexedDB || window.msIndexedDB, | |
IDBTransaction = window.IDBTransaction || window.webkitIDBTransaction || window.OIDBTransaction || window.msIDBTransaction, | |
dbVersion = 1.0; | |
// Create/open database | |
var request = indexedDB.open("elephantFiles", dbVersion), | |
db, | |
createObjectStore = function (dataBase) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function createDb() { | |
var db_name = 'jabber'; | |
var db_version = '1.0'; | |
var db_describe = 'Bro,its jabber'; | |
var db_size = 2048; | |
var db = openDatabase(db_name, db_version, db_describe, db_size, function(db) { | |
console.log(db); | |
console.log("Database opened Successfully! Or created for the first time !"); | |
createTable(db); | |
}); |