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
var th = ['','thousand']; | |
var dg = ['zero','one','two','three','four', 'five','six','seven','eight','nine']; | |
var tn = ['ten','eleven','twelve','thirteen', 'fourteen','fifteen','sixteen', 'seventeen','eighteen','nineteen']; | |
var tw = ['twenty','thirty','forty','fifty', 'sixty','seventy','eighty','ninety']; | |
function toWords(s) | |
{ | |
if (s > 1000) return 'too big'; | |
s = s.toString(); | |
s = s.replace(/[\, ]/g,''); |
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
var checkPalindrome = function(str){ | |
var strArr = str.split(''); | |
var strArrReverse = strArr.slice(0).reverse(); | |
console.log(strArr, strArrReverse, strArr.length); | |
var compareArr = function(){ | |
for (var i = 0; i < strArr.length; i++){ | |
return strArr[i] !== strArrReverse[i] ? false : true | |
} | |
} | |
return compareArr(); |
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
set NODE_ENV=production | |
node server.js |
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
git archive HEAD --format=zip > archive.zip |
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
{ | |
"memory": { | |
"defaultForType": "memory", | |
"connector": "memory" | |
}, | |
"push": { | |
"defaultForType": "push", | |
"connector": "loopback-push-notification", | |
"installation": "installation", | |
"notification": "notification", |
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
"container": { | |
"properties": {}, | |
"public": true, | |
"dataSource": "storage", | |
"plural": "containers" | |
} |
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
npm install -g loopback-storage-service --save |
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
// set permission | |
sudo chmod -R ug+rw | |
// delete recursive files and folders without prompt | |
rm -rf example |
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
<link rel="import" href="../chart-js/chart-js.html"> | |
<link rel="import" href="../core-icons/core-icons.html"> | |
<link rel="import" href="../core-icons/iconsets/av-icons.html"> | |
<link rel="import" href="../paper-fab/paper-fab.html"> | |
<link rel="import" href="../yt-video/yt-search-video.html"> | |
<link rel="import" href="../google-map/google-map-search.html"> | |
<link rel="import" href="../google-map/google-map-directions.html"> | |
<link rel="import" href="../paper-tabs/paper-tabs.html"> | |
<link rel="import" href="../paper-tabs/paper-tab.html"> | |
<link rel="import" href="../paper-icon-button/paper-icon-button.html"> |
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
<link rel="import" href="../components/polymer/polymer.html"> | |
<polymer-element name="my-element"> | |
<template> | |
<style> | |
:host { | |
position: absolute; | |
width: 100%; | |
height: 100%; |
OlderNewer