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
/* | |
* jsrsasign(all) 8.0.12 (2018-04-22) (c) 2010-2018 Kenji Urushima | kjur.github.com/jsrsasign/license | |
*/ | |
/*! | |
Copyright (c) 2011, Yahoo! Inc. All rights reserved. | |
Code licensed under the BSD License: | |
http://developer.yahoo.com/yui/license.html | |
version: 2.9.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 maskNumber = { | |
mask: Number, | |
min: 0, | |
normalizeZeros: false, | |
thousandsSeparator: '.' | |
}; | |
var el = document.getElementById('number-mask'); | |
var item = new IMask(el, maskNumber); |
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(){ | |
window.addClass = function(__args__){ | |
var d = __args__.item, | |
c = __args__.class; | |
if (d.classList) | |
d.classList.add(c); | |
else | |
d.className += ' '+__args__.class; | |
} | |
})(); |
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 () { | |
"use strict"; | |
var self; | |
var counter; | |
var JS_EXT = 'js'; | |
var CSS_EXT = 'css'; | |
var HEAD = document.getElementsByTagName("head")[0]; | |
var RESPONSE = { | |
timeout: { code: '101', 'message': 'Timeout reached'}, |
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
<?php | |
namespace Library\Utils; | |
class Json | |
{ | |
public static function encode($source, $flag = null) | |
{ | |
if ($flag) | |
{ | |
return json_encode($source, $flag); |
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 React from 'react'; | |
import | |
{ | |
TouchableOpacity, | |
View, | |
StyleSheet, | |
Image, | |
Text | |
} from 'react-native'; |
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
#FOUND ON | |
https://dev.to/ryohlan/how-to-pass-initial-props-from-android-native-2k2 |
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 React from "react"; | |
import { | |
NativeModules | |
} from "react-native"; | |
export default class Component extends React.Component { | |
componentDidMount() { | |
//calling native method | |
NativeModules.Device.getDeviceName((err ,name) => { | |
console.log(err, name); |
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 React from 'react'; | |
import | |
{ | |
Image, | |
View, | |
TouchableOpacity | |
} from 'react-native'; | |
import Uploader from './utils/upload/Uploader'; |
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 --save @types/crypto-js | |
//npm i -S crypto-js | |
var key = CryptoJS.enc.Hex.parse("0123456789abcdef0123456789abcdef"); | |
var iv = CryptoJS.enc.Hex.parse("abcdef9876543210abcdef9876543210"); | |
var secret = JSON.stringify({obj:true, obj1:1,obj2:{obj3:3}}); | |
//crypted | |
var encrypted = CryptoJS.AES.encrypt(secret, key, {iv:iv}); | |
//and the ciphertext put to base64 |