摘要:usingSystem;usingSystem.Net;usingSystem.Text;usingSystem.Text.RegularExpressions;classProgram{//获取网页的HTML内容,根据网页的charset自动判断EncodingstaticstringGetHtml(stringurl){returnGetHtml(url,null);}//获取网页的HTML内...
阅读全文
摘要:MSDN“MidpointRounding 枚举”中文翻译对AwayFromZero的说明搞反了。
阅读全文
摘要:1usingSystem;23classTest4{5staticvoidMain()6{7Console.WriteLine(Max(1));//输出:18Console.WriteLine(Max(.3,-.5));//输出:0.39Console.WriteLine(Max(0M,-3M,3.14M));//输出:3.1410Console.WriteLine(Max(9f,-1f,3.14...
阅读全文
摘要:Google™ Code Jam 中国编程挑战赛第一轮2005年12月19日21时在线举行,3道难度不同的题目,分数各为250、500和1000,难度高的题目分数较高,编码时间75分钟。很不幸,我没能进入下一轮。:(
阅读全文
摘要:Google™ Code Jam 中国编程挑战赛资格赛2005年12月12日中午12时-13日中午12时在线举行,参赛者会抽到5组题中的1组,每组题有2道难度不同的题目,分数各为250和750,难度高的题目分数较高。参赛者有60分钟可以完成全部的2题或其中1题。我抽到的是第3组题,以237.97分的成绩晋级下一轮比赛,在入围的500名参赛者中排名第189位。
阅读全文
摘要:C#封装的SQL Server数据库访问模块,可从该类继承,用于访问SQL Server数据库。对OleDb、Odbc和其他数据库,可仿此封装。
阅读全文
摘要:在局域网中, 仅凭本机的力量无法获得本机的外部IP, 必须登录到外网某个服务器, 那个服务器就知道你的IP, 然后你再取回来。
阅读全文
摘要:在C#项目中添加引用Microsoft.VisualBasic.dll, 可以在C#程序中直接使用VB.NET中丰富的函数
阅读全文
摘要:Here's a nice challange for people who THINK they know how to read other people's code...
It's a small C# program. I know, I know, it doesn't look like it's gonna get compiled, but believe me, it does. Try to guess this program's output, then try to run it. You'll be amazed to see what it does!
阅读全文
摘要:其实.NET Framework已经提供实现DES算法的类: System.Security.Cryptography.DESCryptoServiceProvider。之所以要把一个Delphi写的DES算法翻译成C#,是因为网友espnstar想用Delphi加密,C#解密。[原文]
阅读全文
摘要:模拟Visual Basic的ReDim语句,C#实现,仅支持1维数组。
阅读全文
摘要:For years, we gave the same programming test to every developer. It was a straightforward test that required no setup or external knowledge from manuals. The candidates were asked to write a program that could print its source to the screen exactly, without performing any file input.
阅读全文