Lua的确是一个很有意思的语言,尤其是交互是如此的方便,在系统中潜入一个Lua也不会消耗多少资源,反而可以获得很大的灵活性.的确很有意思. Lua在C#的移植使用的LuaInterface这个产品 在互联网上也有不少文章介绍如何在.net环境中使用Lua的,不过对于我们新手来说,可能有时候不是很容易看得清楚. Lua相当于一个解释器,你在这个解释器中注册了一个函数,即可在一个外部文件中调用其中的... Read More
posted @ 2011-09-23 15:54 CanY Views(9771) Comments(2) Diggs(0) Edit
NTFS磁盘格式下面的文件夹和文件是可以通过Encrypting File System来进行加密的,这样子就保护了数据,防止源代码或者重要文件的安全. 然后我们平常的源代码管理会用到SVN,这个时候... Read More
posted @ 2011-08-17 14:31 CanY Views(883) Comments(1) Diggs(1) Edit
在实际工作中需要产生一个随机的不重复的数组.有如下两个算法./// <summary>/// 产生一个不重复的 在0-count之间的随机数组/// 但是包含所有0-count之间的数值/// </summary>/// <param name="Buffers"></param>/// <param name="Count"></param>public static void Generate... Read More
posted @ 2011-08-12 17:36 CanY Views(517) Comments(0) Diggs(0) Edit
在C#中使用GDI的简单总结 在C#默认支持的是GDI+库,使用GDI+库,有很丰富的函数和排版手段,可以满足大部分的要求.除非,你需要使用bitmap字体,GDI+对于字体的支持有很大限制,支持truetype字体,而对于点阵字体(栅格字体)则不再支持,但是很多字体都是这种点阵字体,这样就带来一个问题,使用不了了.而很多公司则会自己制作某些用途的字体,比如说在LED显示屏上使用,这个时候使用GDI+则不再是一个明智的选择了.此外GDI+虽然强大,但是经过测试发现效率却是低下,速度比GDI慢了不少. 但是CS的界面开发环境和编码习惯又很适合,所以比较折衷的解决方法是使用C#调用系统的gdi a Read More
posted @ 2011-07-09 16:56 CanY Views(9698) Comments(0) Diggs(1) Edit
1: private void TestFun(Byte[] Temb) 2: 3: { 4: 5: Temb[0] = 20; 6: 7: byte[] TemBB = { 8, 9, 10, 11 }; 8: 9: Temb = TemBB; 10: 11: } 12: 13: private void button1_Click(object sender, EventArgs e) 14: 15: { 16: 17: Byte[] TemBa = { 1, 2 }; 18: 19: TestFun(TemBa); 20: 21: Debug.WriteLine(TemBa[0]); . Read More
posted @ 2011-06-11 11:04 CanY Views(7256) Comments(0) Diggs(2) Edit
编译环境 ubuntu 10.10 交叉编译器 gcc version 4.2.0 20070413 (prerelease) (CodeSourcery Sourcery G++ Lite 2007q1-10) 编译版本 linux 2.6.30 //hello.c#include <linux/init.h>#include <linux/module.h> static int __init hello_init(void){ printk(KERN_ALERT "Hello,Canson\n"); return 0;}static void Read More
posted @ 2011-04-19 10:44 CanY Views(5019) Comments(0) Diggs(0) Edit
1: library IEEE; 2: Use IEEE.std_logic_1164.all; 3: Use IEEE.numeric_std.all; 4: 5: entity VHSEG7_Controller is 6: generic (SEG7_NUM: integer :=8; 7: DATA_WIDTH: integer:=32; 8: ADDR_WIDTH: integer :=3 9: );10: port(csi_clockreset_clk: in std_logic;11: csi_clockreset_reset_n: in std_logic;12: avs_s. Read More
posted @ 2010-12-08 09:13 CanY Views(444) Comments(0) Diggs(0) Edit