I am afraid

It’s more than two months since the last post named I Am Sad. I am still not happy for the same thing. I decide to study harder, not only the time and the method. I admit that I have nothing to progress in the past two years, especially the past half year.
I left QD seven months ago, I am afraid to leave again, even more for the save reason.
I’am better now.

Categories: Uncategorized

java动态代理要用到的反射知识备忘

备忘
import java.io.File;
import java.io.FileWriter;
import java.lang.reflect.Constructor;
import java.net.URL;
import java.net.URLClassLoader;

import javax.tools.JavaCompiler;
import javax.tools.JavaCompiler.CompilationTask;
import javax.tools.StandardJavaFileManager;
import javax.tools.ToolProvider;

public class App {
public static void main(String[] args) throws Exception {
System.out.println("start");

String srcString = "public class xxoo { public void f(){ System.out.println(\"I am C\"); } }";

String dir = System.getProperty("user.dir");

String fileName = dir + "\\src\\xxoo.java";
File file = new File(fileName);
FileWriter fWriter = new FileWriter(file);
fWriter.write(srcString);
fWriter.flush();
fWriter.close();

JavaCompiler compiler = ToolProvider.getSystemJavaCompiler();
System.out.println(compiler.getClass().getName());
StandardJavaFileManager fileManager =
compiler.getStandardFileManager(null, null, null);
Iterable units = fileManager.getJavaFileObjects(fileName);
CompilationTask task = compiler.getTask(null, fileManager, null, null, null, units);
task.call();

URL[] ss = new URL[] { new URL("file://" + dir + "\\src")};
URLClassLoader classLoader = new URLClassLoader(ss);
Class c = classLoader.loadClass("App");

Constructor constructor = c.getConstructor(null);
App app = (App)constructor.newInstance(null);

app.p("shitttt");

java.lang.reflect.Method[] ms = c.getMethods();
for (java.lang.reflect.Method method : ms) {
p(method.getName());
}

System.out.println("over");
}

public static void p(Object o){
System.out.println(o);
}
}

Categories: Code

I am sad

I am sad now.

Categories: Sentiment

冬至

已经很久没有写博客了, 忙是一个原因, 但我觉得最大的原因是自从来了这里后wordpress就上不去了, 不知道是这里严格还是正好正好赶上这个时间了.

来这里已经三个多月了, 工作比以前的忙很多, 但是感觉上要不以前好, 我很清楚自己的现在的能力在什么档次上, 做事要按部就班, 我想我四个 月前的决定是对的.

今天冬至, 要不是vita的提醒我也还没有察觉到, 都说冬至要吃水饺, 我也要不免俗套了.

现在工作比较忙, 经常是往右下角扫一眼(你懂得)叹一口气: 又要吃饭了. 难得今天的task完成的比较快, 饺子嘛还是自己动手吧.

于是到了吃饭时间饺子就在眼前了.

哇, 好豪放威武的饺子啊! 就是难看些. 但好歹是村手动打造, 过程如下, 采用倒叙手法:

这张太血腥暴力了, 果断带码.

速度比我妈慢多了, 她是一小时. 而我只做一人份的用时1又1/4小时. 从来没有完整的一次包过, 找吃看来还可以接受.

鉴于写篇博客这么难, 有两种处理方法:

1. 才有国内认可的平台

2. 肉身翻墙.

Categories: 琐事, Food and drink Tags:

冬天真的来了

今晚不到九点,回头一看人都没了,好奇怪。
走回家,发现供暖了,证实着一年又快要过去了,总觉得仅仅只是秋天。

Categories: 琐事 Tags:

好久没写

[tag] 工作, 生活
近半年来越是遇到的事情多了越是没有记录, 这大概就是忙吧.

这么久没有写的还一个原因是最近WP在京城根本就上不去, 无奈今天使用了依然很慢的GM发邮件的方式发布这篇文档.

不知不觉中生日过去了, 在忙碌中.

来这已经一个多月了, 也工作了一个多月, 但是还在适应阶段, 要学的东西太多, 通读大堆大堆的资料, 然后渐渐有个轮廓, 到现在能担任一部分任务. 对面坐着三位牛人, 当我五年后我会在什么位置上?

最近半年的时间里生活的变化很大.

我的句话是不是有点特别?

Categories: 琐事, Work

再听梦中的情话

September 28, 2011 Leave a comment

《梦中的情话》,第一次听到了不是自己播放的。

点击查看发布位置

Categories: My Free Mind
Follow

Get every new post delivered to your Inbox.