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
#!/usr/bin/python | |
# usage python unwxapkg.py filename | |
import sys,os | |
import struct | |
class WxapkgFile: | |
nameLen = 0 | |
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
/** | |
* js对象复制 | |
*/ | |
function cloneObject(source) { | |
if (typeof source !== "object") { | |
return source; | |
} | |
var s = {}; | |
if ($.isArray(source)) { | |
s = []; |
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 net.chinaedu.projects; | |
import java.io.File; | |
import java.io.FileInputStream; | |
import java.io.FileOutputStream; | |
import java.io.IOException; | |
import java.io.InputStream; | |
import java.io.PushbackInputStream; | |
/** | |
* 判断并移除UTF-8的BOM头 |
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
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> | |
<html> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> | |
<title>js版猜数字</title> | |
<script type="text/javascript" src="js/jquery1.7.2.js"></script> | |
<style type="text/css"> | |
#guessResult { | |
width: 150px; margin: 5px auto 0 5px; border: solid 1px #a7c0d6; border-collapse: collapse; background: #fff | |
} |
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
Dao dao = ioc.get(Dao.class); | |
for (Class<?> klass : Scans.me().scanPackage("net.wendal.tb.bean")) | |
if (klass.getAnnotation(Table.class) != null) | |
dao.create(klass, false); |
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.weirhp.qq.core.web; | |
import java.security.NoSuchAlgorithmException; | |
/** | |
* 加密webQQ 传输时的密码 | |
* miniQQ快乐挂下载地址 http://qq.weirhp.com | |
* @author weirhp@gmail.com | |
* http://weibo.com/weirhp | |
*/ |
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
#!/usr/bin/env python | |
#-*- coding:utf-8 -*- | |
import httplib, urllib | |
import socket | |
import time | |
params = dict( | |
login_email="email", # replace with your email | |
login_password="password", # replace with your password |
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.util.ArrayList; | |
import java.util.HashMap; | |
import java.util.List; | |
import java.util.Map; | |
import java.util.Map.Entry; | |
import java.util.regex.Matcher; | |
import java.util.regex.Pattern; | |
public class MapConverter{ |
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.weirhp.interview; | |
import java.util.ArrayDeque; | |
/** | |
* 将后缀表达式转为中缀表达式,满足: | |
* | |
* <pre> | |
* example 1:'56 34 213.7 + * 678 -' | |
* 56 * (34 + 213.7) - 678 |
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.weirhp; | |
import java.io.FileInputStream; | |
import java.io.IOException; | |
import java.io.InputStream; | |
import java.lang.reflect.Constructor; | |
import java.lang.reflect.Method; | |
import java.util.ArrayList; | |
import java.util.Arrays; | |
import java.util.HashMap; |
NewerOlder