Haibin님의 프로필.。 *゚’゚♪。.:*(¯`•._.•°Wel...사진블로그리스트기타 ![]() | 도움말 |
.。 *゚’゚♪。.:*(¯`•._.•°Welcome to Barry's Blog°•._.•´¯)*:.。♪*゚’゚・。.☆*~Let your feelings and comments B logged~*☆ |
||||
|
|
Eastwood中文支持Eastwood是一个模仿Google Chart的制图工具
Eastwood使用JFreeChart作为图标工具,使用Java servlet的方式进行封装,
其URL的编码方式完全按照Google Chart API进行。
这两个工具居然不约而同的对中文不支持,如果标签使用中文表示时,就会出现乱码
好在Eastwood是开源的,打开源代码ChartServlet.java加上一行
request.setCharacterEncoding("UTF-8");
$ant
...
BUILD SUCCESSFUL
Total time: 10 seconds Tomcat的server.xml修改为使用UTF-8对URI进行编码。
<Connector port="8080" protocol="HTTP/1.1"
connectionTimeout="20000" redirectPort="8443" URIEncoding="UTF-8" /> 重新发布到Tomcat,搞定,Java的开发速度就是惊人。
Google Chart Demo:
Poor support of Live Space for FirefoxWhen I write and post on my Live Space, duplicated posts were always made, more evilly, it also tell me wrongly that I had failed to post the article. err... Evil of IE non-standard extensions!! API for "MSN Messenger Now Playing" It's fun to display what's you're listening to in your MSN Live Messenger The API is quite simple, just by sending a predefined format of message to the window "MsnMsgrUIManager", which can be easily achieved by calling Windows API "FindWindowEx" Then send a "WM_COPYDATA" within pointer to "COPYDATASTRUCT" data structure to the found window via "SendMessage" The format of "COPYDATASTRUCT" is defined below: dwData = 0x547; lpData = pointer to preformatted msg string buffer; cbData = length in byte of the msg buffer, including null termination msg string buffer is defined as below: 1. Clear "Now playing" "\\0Music\\00\\0{0} - {1}\\0\\0\\0\\0\\0" 2. Show "Now playing" "\\0Music\\01\\0{artist} - {title}\\0{album}\\0{WMID}\\0\\0" p.s. WMID == 0 (what's WMID?) Closure Closure is a special callback/delegate Let's see the how closure is written within the following languages: Ruby, C#, Java(JDK7), C++(C++0x) 1.Ruby def managers(emps)2. C# public List<Employee> Managers(List<Employee> emps) {3. Javavoid sayHello(java.util.concurrent.Executor ex) {4. C++void printVec(std::vector<int> const&) {
reference: 1. http://joe.truemesh.com/blog/000390.html 2. http://gafter.blogspot.com/2006/08/closures-for-java.html 3. http://herbsutter.spaces.live.com/Blog/cns!2D4327CC297151BB!785.entry 4. http://martinfowler.com/bliki/Closure.html C++0x variadic template parameterSee how simple tr1::function can be implemented with this Core improvement template<typename R, typename... Args>Hooray, what a clean implementation. Three major things: 1. Declaring a variadic template argument typename... Argsor class... Args2. Referring to a variadic template argument Args..., args...3. Calculating the length of the template parameter package sizeof...(Args) |
|||
|
|