2014年9月29日

Unicode中跟汉字相关的一些内容的总结陈词

摘要: UniHan 这几天琢磨着怎么方便的给汉字注音,因为要知道具体哪些Unicode是给汉字用的,就读了读Unicode的官方文档.目前unicode已经发展到了7.0.不看不知道,发现Unicode的定义中颇有些有趣的内容,写下了给大家分享下,也算是个笔记. Unicode中跟汉字相关统称为UniH... 阅读全文

posted @ 2014-09-29 16:33 learner 阅读(4491) 评论(1) 推荐(2) 编辑

2013年6月25日

c#: 解析json, 转成xml, 简单方便

摘要: 没看到.net framework中有这样的功能, 懒得到处找了, 索性花点时间自己写一个 1 /* 2 * Created by SharpDevelop. 3 * Date: 2013/6/24 4 * User: sliencer 5 * Time: 21:54 6 * 7 * To change this template use Tools | Options | Coding | Edit Standard Headers. 8 */ 9 using System; 10 using System.Collections.Generic; 11 u... 阅读全文

posted @ 2013-06-25 22:47 learner 阅读(2914) 评论(0) 推荐(0) 编辑

2013年6月23日

玩一个:可以显示任何xml树结构的xaml定义

摘要: 学习中, 玩一玩。 效果如下。Xaml随后。 ... 阅读全文

posted @ 2013-06-23 00:11 learner 阅读(359) 评论(0) 推荐(0) 编辑

2012年10月23日

C#: the sample usage of c# template

摘要: 1. class definition with constraints1classTest<T,V>whereV:MyType{2publicStringname;3publicTvalue;4publicvirtualvoidprint(){5Console.WriteLine("{0}={1}",name,value);6}//print()7}//class2. inherited class definition with constraint( my use constraint)12classTest2<T1,T2>:Test<T 阅读全文

posted @ 2012-10-23 23:41 learner 阅读(250) 评论(0) 推荐(0) 编辑

2012年9月28日

Memo: How to use UMDH to detect memory leak

摘要: 1. Download windows debug tools from MS 2. Based on the app type (x86 or x64), add path : C:\Program Files (x86)\Windows Kits\8.0\Debuggers\x86(or x64) 3. For all the dlls and exes I wanna detect: run a. Gflags –i <dll name or exe name> +ust 4. Find you *.pdb, make sure it exist in _NT_SYMBOL_ 阅读全文

posted @ 2012-09-28 10:41 learner 阅读(434) 评论(0) 推荐(0) 编辑

2012年9月20日

compile openssl on windows

摘要: 1. download SSL http://www.cnblogs.com/sliencer/admin/ftp://ftp.openssl.org/snapshot/openssl-1.0.2-stable-SNAP-20120920.tar.gz2. unpack to a folder3. download nasm from http://www.nasm.us/pub/nasm/releasebuilds/2.10.05/win32/ based on instructions of INSTALL.W32 under SSL4. put nasm to PATH : set pa 阅读全文

posted @ 2012-09-20 14:43 learner 阅读(321) 评论(0) 推荐(0) 编辑

2012年3月25日

c# : use xsd 校验 xml

摘要: 1usingSystem;2usingSystem.Collections.Generic;3usingSystem.Linq;4usingSystem.Text;5usingSystem.Xml;6usingSystem.Diagnostics;7usingSystem.Xml.Schema;8usingSystem.Xml.Linq;910namespaceXsdValidator11{12classProgram13{14staticvoidMain(string[]args)15{1617//Debug.Assert(false);18InputArgumentParser.Inst. 阅读全文

posted @ 2012-03-25 15:43 learner 阅读(655) 评论(0) 推荐(0) 编辑

Java : use xsd 校验 xml

摘要: 1importjavax.xml.parsers.DocumentBuilder;2importjavax.xml.parsers.DocumentBuilderFactory;34importorg.w3c.dom.Document;5importorg.xml.sax.ErrorHandler;6importorg.xml.sax.InputSource;7importorg.xml.sax.SAXException;8importorg.xml.sax.SAXParseException;910importjava.io.*;11importjavax.xml.transform.Sou 阅读全文

posted @ 2012-03-25 15:41 learner 阅读(954) 评论(0) 推荐(0) 编辑

2012年3月22日

JAVA : 简单event机制的实现(伪码)

摘要: <S>public interface EventBase<S> { void onEvent(S source, Object[]... arguments);}<S,T extends EventBase<S>>public class EventSender<S, T> { private List<T> receivers = new ArrayList<T>(); public void addReceiver(T receiver) { if (null == receiver) throw new 阅读全文

posted @ 2012-03-22 00:52 learner 阅读(563) 评论(0) 推荐(0) 编辑

2011年4月24日

编码base64文件

摘要: 将binary文件编码成base64文件如果有问什么是base64的, 请参考http://en.wikipedia.org/wiki/Base64, 我就不罗嗦了。license采用codeproject的CPOL(http://www.codeproject.com/info/cpol10.aspx),基本上没什么限制。源码在这儿(VC++):http://files.cnblogs.com/sliencer/EncodeBase64.7z 阅读全文

posted @ 2011-04-24 22:42 learner 阅读(302) 评论(0) 推荐(0) 编辑

导航