This file contains hidden or 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.dhlz.webService.util; | |
| import java.util.Calendar; | |
| import java.util.Date; | |
| import java.util.concurrent.*; | |
| /** | |
| * User: seveniu | |
| * Date: 11/12/14 | |
| * Time: 5:46 PM |
This file contains hidden or 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
| {"+Auto Switch":{"color":"#55bb55","defaultProfileName":"__ruleListOf_Auto Switch","name":"Auto Switch","profileType":"SwitchProfile","revision":"14e9fa6c4b6","rules":[{"condition":{"conditionType":"HostWildcardCondition","pattern":"*.airitilibrary.com"},"profileName":"sss"},{"condition":{"conditionType":"HostWildcardCondition","pattern":"*.kickass.so"},"profileName":"sss"},{"condition":{"conditionType":"HostWildcardCondition","pattern":"*.backbonejs.org"},"profileName":"sss"},{"condition":{"conditionType":"HostWildcardCondition","pattern":"*cpro.baidu.com*"},"profileName":"ad"},{"condition":{"conditionType":"HostWildcardCondition","pattern":"*.polymer-project.org"},"profileName":"sss"},{"condition":{"conditionType":"HostWildcardCondition","pattern":"*.xda-developers.com"},"profileName":"sss"},{"condition":{"conditionType":"HostWildcardCondition","pattern":"*click.baidu.com"},"profileName":"ad"},{"condition":{"conditionType":"HostWildcardCondition","pattern":"*cb.baidu.*"},"profileName":"ad"},{"condition":{"c |
This file contains hidden or 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 nocompatible " be iMproved, required | |
| filetype off " required | |
| " Vundle | |
| " https://github.com/gmarik/vundle | |
| " | |
| set rtp+=~/.vim/bundle/Vundle.vim | |
| call vundle#begin() | |
| Plugin 'gmarik/Vundle.vim' |
This file contains hidden or 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
| public static String xorString(String text,String key) { | |
| byte[] textBytes = text.getBytes(); | |
| byte[] keyBytes = key.getBytes(); | |
| byte[] newCharArray = new byte[textBytes.length]; | |
| for (int i = 0; i < textBytes.length; i++) { | |
| byte c = textBytes[i]; | |
| int strIndex = i%(keyBytes.length); | |
| newCharArray[i] = (byte)(c ^ keyBytes[strIndex]); | |
| } | |
| return new String(newCharArray); |
This file contains hidden or 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 util = { | |
| getDomain:function (url) { | |
| var a = document.createElement('a'); | |
| a.href = url; | |
| return a.hostname; | |
| }, | |
| isNumber:function (n) { | |
| return !isNaN(parseFloat(n)) && isFinite(n); |
This file contains hidden or 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
| [ | |
| { | |
| "id": 1, | |
| "value": "AD", | |
| "zh": "安道尔共和国", | |
| "en": "Andorra", | |
| "py": "andaoergongheguo", | |
| "pyf": "adeghg" | |
| }, | |
| { |
This file contains hidden or 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
| #!/bin/bash | |
| ######## eg. | |
| #./run.sh mysql-test password /home/java/conf-files/mysql 3306 official/mysql:5.7 /data/mysql/test/ | |
| ######## | |
| name=$1 | |
| password=$2 | |
| confDir=$3 | |
| port=$4 |
This file contains hidden or 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 ListToTree(data,deep,getChildren) { | |
| this.stackListLength = deep -1-1; //不包含 root | |
| this.stackList = []; | |
| // 初始化 root | |
| this.root = {id: 0}; | |
| // 初始化 栈 |
This file contains hidden or 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 fs = require('fs'); | |
| var filePath = process.argv[2]; | |
| fs.readFile(filePath, {encoding: 'utf-8'}, function(err,data){ | |
| if (!err){ | |
| console.log('received data: ' + data); | |
| }else{ | |
| console.log(err); |
This file contains hidden or 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
| InputStream in = getClass().getClassLoader().getResourceAsStream("ParseResult.groovy"); | |
| BufferedReader reader = new BufferedReader(new InputStreamReader(in)); | |
| StringBuilder builder = new StringBuilder(); | |
| String aux = ""; | |
| while ((aux = reader.readLine()) != null) { | |
| builder.append(aux); | |
| } | |
| String text = builder.toString(); |