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
import java.security.MessageDigest; | |
class Hasher { | |
public static string getMD5(String password){ | |
MessageDigest md = MessageDigest.getInstance("MD5"); | |
md.update(password.getBytes()); | |
byte byteData[] = md.digest(); | |
//convert the byte to hex format method 1 |
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 UserHandler = {}; | |
//...... Some user handler stuff... | |
UserHandler.recievePictures = function(object, data, callback){ | |
var _files = data.files && data.files.pictures; | |
var _file = _files; | |
if(_files){ | |
if(_files.length) _file = _files[0]; |
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 oldDB = [ | |
{ | |
index: 1, | |
name: "Java" | |
}, | |
{ | |
index: 2, | |
name: "C" | |
}, | |
{ |
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
/** | |
* Mocha Logger | |
* Thuya Myo Nyunt | |
*/ | |
module.exports = function Logger(describe){ | |
var space = " "; | |
while(describe.parent){ | |
space += " "; | |
describe = describe.parent; |
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 definePropertiesOfObjects(objects, values){ | |
for (var i = 0; i < objects.length; i++) { | |
Object.defineProperties(objects[i], values); | |
} | |
} | |
function defineProperty(){ | |
Object.defineProperty.apply(null, arguements); | |
} |
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
"use strict"; | |
/** | |
* Material colors name and hex-code | |
* some example here | |
* https://gist.github.com/greenlikeorange/8a557d1130be74937985#file-hack-js | |
*/ | |
var MATERIAL_COLORS = [{"name": "red_50", "hex": "#ffebee"},{"name": "red_100", "hex": "#ffcdd2"},{"name": "red_200", "hex": "#ef9a9a"},{"name": "red_300", "hex": "#e57373"},{"name": "red_400", "hex": "#ef5350"},{"name": "red_500", "hex": "#f44336"},{"name": "red_600", "hex": "#e53935"},{"name": "red_700", "hex": "#d32f2f"},{"name": "red_800", "hex": "#c62828"},{"name": "red_900", "hex": "#b71c1c"},{"name": "red_a100", "hex": "#ff8a80"},{"name": "red_a200", "hex": "#ff5252"},{"name": "red_a400", "hex": "#ff1744"},{"name": "red_a700", "hex": "#d50000"},{"name": "pink_50", "hex": "#fce4ec"},{"name": "pink_100", "hex": "#f8bbd0"},{"name": "pink_200", "hex": "#f48fb1"},{"name": "pink_300", "hex": "#f06292"},{"name": "pink_400", "hex": "#ec407a"},{"name": "pink_500", "hex": "#e91e63"},{"name": "pink_600", "hex": "#d81b60"},{"name": "pink_700", "hex": "#c2185b" |
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
<?xml version="1.0" encoding="utf-8"?> | |
<resources> | |
<color name="white">#ffffff</color> | |
<color name="black">#000000</color> | |
<color name="red-50">#ffebee</color> | |
<color name="red-100">#ffcdd2</color> | |
<color name="red-200">#ef9a9a</color> | |
<color name="red-300">#e57373</color> | |
<color name="red-400">#ef5350</color> |
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
app.get('/', page.index); | |
app.get('/approval', page.approval); | |
app.get('/task', page.task); | |
app.get('/report', page.report); | |
app.get('/admin', page.admin); |
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 fileTransfer, uri; | |
function downloader(filesURLs, cloneArray){ | |
if(cloneArray){ | |
// Do not manipulate old memory | |
cloneArray = Array.prototype.concat.call([], filesURLs); | |
} | |
if(cloneArray.length === 0){ | |
// End on done loop |
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 constr(){ | |
return new ProcessTime(); | |
} | |
function ProcessTime(){ | |
this._start_time = new Date(); | |
} | |
ProcessTime.prototype.done = function(format, nonPrint){ | |
var differ = ((new Date()) - this._start_time); |