Share my knowledge, feel my life. Eric Shan' Blog myBloggie 2.1.6 © 2005   
Mar 2025 April 2025 May 2025
S M T W T F S
    1 2 3 4 5
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29 30    
Categories
About[5]
Blackberry[1]
dotNet and C Charp[1]
IPhone[10]
Life[4]
Unix&Linux[19]
WEB programming[16]
Windows API[5]
Windows Mobile[1]
Windows Multimedia[4]
Recent
CentOS mount CDrom and USB
CentOS GHOST(幽灵)漏洞修复方法
centos 改变语言并立即生效
centos vpn 接通后无法连接internet
让vlc播放中文字幕不出乱码
centos 取消屏保
php中ob_flush和flush的用法
CentOS检查,添加,删除自启动服务
CentOS中开机自动启动某个服务
Top命令中的翻页
Archives
February 2010[4]
September 2009[1]
August 2009[1]
January 2009[7]
October 2008[10]
June 2008[2]
December 2007[14]
November 2007[5]
May 2007[9]
April 2007[3]
March 2007[10]
User List
Eric Shan[66]
Search
Syndication
13 Feb 2010   05:49:03 pm
Play 'Lady GaGa - Isle of MTV 2009 (HD).ts'
To play 'Lady GaGa - Isle of MTV 2009 (HD).ts' using Windows Media Player, need to install two direct show filters.

1. Haali Media Splitter, http://haali.su/mkv/MatroskaSplitter.exe
2. Elecard AVC PlugIn for WMP, http://www.elecard.com/ftp/pub/mpeg/decoder/EMPEG-2_PlugIn_WMP.zip
3. Disable FFDSHOW's H.246 decode option.
Category : Windows Multimedia | By : Eric Shan | Comments [0] | Trackbacks [0]
07 Feb 2010   01:11:46 am
超稳定的翻强工具Astrill, 及邀请码
输入下列邀请码.
ASTRILL-BETA-682705-MCYXX

到https://www.astrill.com/去注册新用户和下载软件.
Category : WEB programming | By : Eric Shan | Comments [0] | Trackbacks [0]
01 Feb 2010   08:41:44 pm
翻墙利器-paperbus
Paperbus是个不错的proxy软件, 代价是经常看广告, 速度目前飞快, 不知将来用的人多了会不会还是这样.

他们的主页http://www.paperb.us.

发email 给ride@paperb.us 会自动把安装程序发给你.
Category : WEB programming | By : Eric Shan | Comments [0] | Trackbacks [0]
14 Sep 2009   07:50:01 am
Hook原来是这样工作的
先用自己的exe装载含有自己hook代码的dll(可以用loadlibrary,或者静态直接启动装入这个dll)再在自己的exe调用一个SetWindowsHookEx,SetWindowsHookEx可以设定为对所有的mouse hook,而proc参数就是上面dll中的proc.

这样SetWindowsHookEx会在系统所有用到mouse的新启动的进程里都会loadlibrary装入自己的hook dll。

在自己hook dll的Dllmain里可以判断目前的进程是哪个exe,或dll,如果发现是自己想要hook的那个进程.就可以进一步修改这个进程的内存,可以修改它的import table使其在调用系统api时先调用我们的。也可以检索它的内存,找到特定的内部函数,在调用这些函数前先调用我们自己的函数.

这里比较让人吃惊的是,实际上SetWindowsHookEx后,对每个进程实际上系统回自动loadlibrary你自己
的hook dll,导致你的Dllmain每次都会被调用.
Category : Windows API | By : Eric Shan | Comments [0] | Trackbacks [0]
21 Aug 2009   09:49:56 am
Where [STAThread] comes from
Actually, [STAThread] equals to [STAThreadAttribute], the 'Attribute' can be omitted.

There is a good artical describe this http://www.csharp-station.com/Tutorials/Lesson16.aspx.

搞了半天,原来[STAThread] 就是 [STAThreadAttribute], Attribute是可以被省略掉的. 有一个很好的教程提到过.

http://www.csharp-station.com/Tutorials/Lesson16.aspx.
Category : dotNet and C Charp | By : Eric Shan | Comments [0] | Trackbacks [0]
12 Apr 2009   02:10:47 am
Win32 picture process function
http://www.codeproject.com/KB/winsdk/win32image.aspx
Category : Windows API | By : Eric Shan | Comments [0] | Trackbacks [0]
18 Mar 2009   03:58:11 am
TNTSoft mobile software store
Visit http://store.tntsoft.com. It focus on Mobile phone software.
Category : WEB programming | By : Eric Shan | Comments [0] | Trackbacks [0]
17 Mar 2009   05:19:13 am
Feedburner中文乱码 - Feedburner Chinese display problem
如果xml里用的是GB2312的话Feedburner可能会出乱码.解决的办法是把xml转成UTF-8.

There will be some problem display Chinese when the RSS have XML encode of GB2312, the solution is to convert the XML into UTF-8 encoding.

在php下GB2312转UTF-8有代码.

To convert from GB2312 to UTF-8

Code :
function gb2utf8($gbstr) {
global $CODETABLE;
if(trim($gbstr)=="") return $gbstr;
if(empty($CODETABLE)){
$filename = dirname(__FILE__)."/gb2312-utf8.table";
$fp = fopen($filename,"r");
while ($l = fgets($fp,15))
{ $CODETABLE[hexdec(substr($l, 0, 6))] = substr($l, 7, 6); }
fclose($fp);
}
$ret = "";
$utf8 = "";
while ($gbstr) {
if (ord(substr($gbstr, 0, 1)) > 0x80) {
$thisW = substr($gbstr, 0, 2);
$gbstr = substr($gbstr, 2, strlen($gbstr));
$utf8 = "";
@$utf8 = u2utf8(hexdec($CODETABLE[hexdec(bin2hex($thisW)) - 0x8080]));
if($utf8!=""){
for ($i = 0;$i < strlen($utf;$i += 3)
$ret .= chr(substr($utf8, $i, 3));
}
}
else
{
$ret .= substr($gbstr, 0, 1);
$gbstr = substr($gbstr, 1, strlen($gbstr));
}
}
return $ret;
}

function u2utf8($c)
{
for($i=0;$i<count($c);$i++)
$str="";
if ($c < 0x80) {
$str.=$c;
}
else if ($c < 0x800) {
$str.=(0xC0 | $c>>6);
$str.=(0x80 | $c & 0x3F);
}
else if ($c < 0x10000) {
$str.=(0xE0 | $c>>12);
$str.=(0x80 | $c>>6 & 0x3F);
$str.=(0x80 | $c & 0x3F);
}
else if ($c < 0x200000) {
$str.=(0xF0 | $c>>1;
$str.=(0x80 | $c>>12 & 0x3F);
$str.=(0x80 | $c>>6 & 0x3F);
$str.=(0x80 | $c & 0x3F);
}
return $str;
}
Category : WEB programming | By : Eric Shan | Comments [0] | Trackbacks [0]
16 Mar 2009   02:04:45 pm
冰派2.0下载器使用感受-bitpump 2.0
1.NET灯不是指LAN的灯,是指连通internet是否成功,冰派会连回厂家.
2.USB只能同时使用一个,另一个是备用的,真是滑稽.
3.管理界面里的暂停下载是指当下载队列里有三个以上的任务时,暂停哪个,小于三个时无法暂停BT下载.
4.Amule的文件如果是中文名称,可以下载,但是无法在结束时生成文件,而是保留在temp中,需要自己该成最终文件并放到incoming文件夹

总的来说,冰派下载器的构思是可以的,但是技术是很差的。其实应该把平台和系统都开放出来,让有本事的人基于你的linux平台创建无数可以使用的应用,如WEB服务器,无功耗的php服务器等。

这个产品最让我满意的是没有嘈声,一个安静的linux box,现在的U盘已经可以达到16G,更本不需要什么硬盘.

相信随着芯片价格的降低,这样的embedde linux产品应该很多的。
Category : Unix&Linux | By : Eric Shan | Comments [0] | Trackbacks [0]
20 Jan 2009   07:30:01 am
Why use CDATA in XML
CDATA - (Unparsed) Character Data
The term CDATA is used about text data that should not be parsed by the XML parser.

Characters like “<" and "&" are illegal in XML elements.

"<" will generate an error because the parser interprets it as the start of a new element.

"&" will generate an error because the parser interprets it as the start of an character entity.

Some text, like JavaScript code, contains a lot of "<" or "&" characters. To avoid errors script code can be defined as CDATA.

Everything inside a CDATA section is ignored by the parser.

A CDATA section starts with "<![CDATA[" and ends with "]]>“:

Code :
<script>
<![CDATA[
function matchwo(a,b)
{
if (a < b && a < 0) then
{
return 1;
}
else
{
return 0;
}
}
]]>
</script>

In the example above, everything inside the CDATA section is ignored by the parser.

Notes on CDATA sections:
A CDATA section cannot contain the string “]]>”. Nested CDATA sections are not allowed.

The “]]>” that marks the end of the CDATA section cannot contain spaces or line breaks.
Category : WEB programming | By : Eric Shan | Comments [0] | Trackbacks [0]
 
Prev 1 2 3 4 5 6 7 Next
Template theme : aura
Powered by myBloggie Copyright © 2004 2006
-- myWebland --

Sponsed by TNTSoft Store