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
/* | |
Google+ Stream API => An unofficial API to get Google+ streams. | |
Copyright (C) 2012 Jingqin Lynn | |
Based on the "An Unofficial Google+ Circle and Followers API for Google Chrome" poject | |
https://github.com/mohamedmansour/google-plus-extension-jsapi | |
by +Mohamed Mansour <https://github.com/mohamedmansour> | |
Under the license: https://github.com/mohamedmansour/google-plus-extension-jsapi/blob/master/LICENSE.md | |
This program is free software: you can redistribute it and/or modify |
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
public static void main(String[] args) { | |
List list = (List) Proxy.newProxyInstance(List.class.getClassLoader(), | |
new Class[] { List.class }, | |
new InvocationHandler() { | |
public Object invoke(Object obj, Method method, Object[] args) | |
throws Throwable { | |
if ("size".equals(method.getName())) | |
return (int)(Math.random() * 1000); | |
return null; |
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.BufferedInputStream; | |
import java.io.DataInputStream; | |
import java.io.FileInputStream; | |
import java.io.FileNotFoundException; | |
import java.io.IOException; | |
import java.io.InputStream; | |
import java.lang.reflect.Constructor; | |
import java.lang.reflect.Method; |
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
41172 [qtp15272259-27] WARN org.eclipse.jetty.util.log - /dodopipe.proxy/InvokeMethod | |
java.lang.RuntimeException: Fail to invoke getter com.prj17.bean.StudentWapper.'getStudents()' because [java.lang.IllegalArgumentException: | |
ject is not an instance of declaring class]: object is not an instance of declaring class | |
at org.nutz.lang.Lang.makeThrow(Lang.java:85) | |
at org.nutz.lang.eject.EjectByGetter.eject(EjectByGetter.java:26) | |
at org.nutz.json.entity.JsonEntityField.getValue(JsonEntityField.java:124) | |
at org.nutz.json.JsonRendering.pojo2Json(JsonRendering.java:184) | |
at org.nutz.json.JsonRendering.render(JsonRendering.java:302) | |
at org.nutz.json.JsonRendering.appendPair(JsonRendering.java:79) | |
at org.nutz.json.JsonRendering.map2Json(JsonRendering.java:129) |
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; |
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
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
#!/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
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
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); |
OlderNewer