代码改变世界

阅读排行榜

iframe 父页面与子页面之间的方法的相互调用

2013-12-23 16:58 by 无聊玩博客, 44347 阅读, 收藏,
摘要: Parent Page This is the Parent Page. Child Page This is the Child Page. 阅读全文

html <input type="text" />加上readonly后在各种浏览器的差异。

2013-12-05 11:21 by 无聊玩博客, 4582 阅读, 收藏,
摘要: Name: Country: 上述代码在ie中:可以获得焦点,光标可进入,不能输入,但是按backspace键后,页面会后退跳转。 在chrome中:可以得到焦点,光标不可进入 在firebox中:可以得到焦点,光标也可进入。按backspace键,不起任何作用。 阅读全文

几种获取操作系统语言的方法及其相似点与不同点

2012-12-03 15:07 by 无聊玩博客, 1548 阅读, 收藏,
摘要: [DllImport("kernel32.dll", EntryPoint = "GetSystemDefaultLCID")] public static extern ushort GetSystemDefaultLCID();//OS 系统自己的语言(区域-管理) [DllImport("kernel32.dll", EntryPoint = "GetSystemDefaultLangID")] public static extern ushort GetSystemDefaultLangID();//OS 阅读全文

C#调用非托管代码(C++方法)的2种方式

2013-05-14 15:53 by 无聊玩博客, 633 阅读, 收藏,
摘要: 第一种:静态调用使用using System.Runtime.InteropServices命名空间下的DllImport标签指定非托管的Dll及其细节方法必须是静态的即必须加上static关键字,还有extern关键字 [DllImport("kernel32.dll", EntryPoint = "GetSystemDefaultLCID")] static extern ushort GetSystemDefaultLCID();//OS 当前选择的默认语言(区域-管理) [DllImport("kernel32.dll", E 阅读全文

C#求解哈夫曼树

2013-04-22 13:56 by 无聊玩博客, 358 阅读, 收藏,
摘要: C#求解哈夫曼树,树是用数组保存的 class HuffmanTree { private Node[] data; public int LeafNum { get; set; } public Node this[int index] { get { return data[index]; } set { data[index] = value; } } public HuffmanTree(int n) { data... 阅读全文