May 2012
S M T W T F S
« Feb    
 12345
6789101112
13141516171819
20212223242526
2728293031  

Categories

Monday, 13th of February 2012 at 02:10:37 AM

Mono V2

Ubuntu安装Mono2.10并使用Apache承载Asp.Net mvc3应用程序

Apache AutoConfig

Thursday, 28th of July 2011 at 04:46:57 PM

C# UTF-8 dec to Char

char[] caa = new char[] { (char)25105, (char)24456, (char)22909 };

Console.WriteLine(new String(caa)); // “我很好”

Ref: http://www.plurk.com/p/cnjj0g

Sunday, 18th of April 2010 at 02:51:01 PM

List Sort()、Find()、FindAll()、Exist() in c#

How to write delegate for sort, find, findall and exist.

Response.Write("找出Name='puma'的Person→ "); Response.Write(lstPerson.Find(delegate(Person p) { return p.Name == "puma"; }).ToString() + "<p>"); //List<T>.FindAll() //找出Age>10的數目 Response.Write("找出Age>10的數目→ "); Response.Write(lstPerson.FindAll(delegate(Person p) { return p.Age > 10; }).Count.ToString() + "<p>"); //List<T>.Exists() //檢查Name='F6'是否存在 Response.Write("檢查Name='F6'是否存在→ "); Response.Write(lstPerson.Exists(delegate(Person p) { return p.Name == "F6"; }).ToString() + "<p>"); //List<T>.Sort() //依Name升冪排序 Response.Write("<p>依Name升冪排序↑<br/>"); lstPerson.Sort(delegate(Person p1, [...]

Tuesday, 16th of March 2010 at 05:26:55 PM

How to list all files under command line.

DIR /S /ON /B >TEST.TXT

[...]

Thursday, 28th of January 2010 at 11:59:51 PM

C# deep Object clone

I made a mistake, I used shallow clone instead of deep clone. That’s second time I made this mistake.

Here is the deep clone. Remember to add [Serializable] for class.

Ref

using System.IO; using System.Runtime.Serialization.Formatters.Binary; public Class Test : IClonable { public Test() { } // deep copy in separeate memory space public object Clone() [...]

Tuesday, 26th of January 2010 at 11:01:55 AM

Integrate C# code with R

For ASMS abstract Anoop and I want to incorporate our I690 class project(A Multi-PCA Approach to Glycan Biomarker Discovery using Mass Spectromtery Profile Data) into my MultiNGlycan.

He wrote a R code which can deal with post-processing.

Remember to install rscproxy package. The error message will say you need to install rproxy.dll but it have [...]

Wednesday, 9th of December 2009 at 03:58:18 PM

How to invoke an executable program inside C#

System.Diagnostics.Process p = System.Diagnostics.Process.Start("calc.exe"); p.WaitForExit(); // Wait until the program exit

MSDN

Friday, 20th of November 2009 at 04:28:20 PM

Visual studio setup project upgrade

Set an option which allow program automatic uninstall when you click msi package.

Visual Studio – deploy RemovePreviousVersions propertied

Friday, 20th of November 2009 at 01:15:01 PM

Linear least squares approximation

C# Library

ALGLIB

Matlab

a[] \ b[]

Wiki