2013年6月19日

.Net 对webconfig进行加密解密

摘要: 加密: // 打开该应用程序中的配置文件 Configuration config = WebConfigurationManager.OpenWebConfiguration(Request.ApplicationPath); //在打开的配置文件中找到指定的节 ConfigurationSection section = config.GetSection("connectionStrings"); if (section != null && !section.SectionInformation.IsProtected) { section.Sect 阅读全文

posted @ 2013-06-19 02:35 大黑脸 阅读(341) 评论(0) 推荐(0) 编辑

2011年8月24日

查询名字重复但不是相同的人的记录

摘要: select * from c where names in (select names from c group by names having count(names)>1) 阅读全文

posted @ 2011-08-24 21:15 大黑脸 阅读(175) 评论(0) 推荐(0) 编辑

2011年7月8日

面试题 关于质数问题 (当输入2时,输出2、3,当输入10时,输出2、3、5、7、11、13、17、19、23、29)

摘要: int count = int.Parse(Console.ReadLine()); int i, j; int z = 0; for (i = 2; i < 1000; i++) { if (z < count) { for (j = 2; j < i; j++) { if (i % j == 0) { break; } } if (j >= i) { Console.WriteLine(i); z++; } } } Console.ReadLine(); 阅读全文

posted @ 2011-07-08 00:03 大黑脸 阅读(193) 评论(0) 推荐(0) 编辑

导航