摘要:方法1: static void Main(string[] args) { TestClass tc1 = new TestClass(); tc1.i = 1; TestClass tc2 = new TestClass(); tc2.i = 1; List<TestClass> list = new List<TestClass>(); list.Add(tc1); Console.WriteLine(lis... 阅读全文
List<T>.Contains(T item)为什么我把两封一样的邮件经分析后一模一样的数据mail_data先后导入进去,第2封信还是会加到mailList里去 ?? 搞不懂..
2012-09-10 15:48 by hongjiumu, 299 阅读, 0 推荐, 收藏,一个可以生成复杂结构的json数据的简单例子
2012-09-08 17:53 by hongjiumu, 832 阅读, 0 推荐, 收藏,
摘要:using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Reflection;namespace ConsoleApplication1{ class Program { static void Main(string[] args) { StringBuilder builder = new StringBuilder(); User user = new User("abc"... 阅读全文
使用this作为方法的参数
2012-09-08 10:18 by hongjiumu, 454 阅读, 0 推荐, 收藏,
摘要:<table><tbody> <tr id="test"><td></td></tr></tbody></table>document.getElementById("test").setAttribute("onclick","Test()");var Test=function(){ alert(Object.prototype.toString.call(this));};结果显示: [object Window] 阅读全文
js做带编辑,保存,删除,添加功能的表格
2012-09-06 19:18 by hongjiumu, 723 阅读, 0 推荐, 收藏,
摘要:<!--产品属性处理部分开始--> <table id="productAttributeBlock" class="tabEditList" style="width:100%;"> <thead> <tr> <th> 属性类型 </th> <th> ... 阅读全文
<input type="text"> 的document.getElementById("").value和document.getElementById("").getAttribute("value")不相同
2012-09-06 18:07 by hongjiumu, 4732 阅读, 0 推荐, 收藏,
摘要:<!--产品属性处理部分开始--> <table id="productAttributeBlock" class="tabEditList" style="width:100%;"> <thead> <tr> <th> 属性类型 </th> <th> ... 阅读全文
(转)C#的排列组合类
2012-09-06 09:12 by hongjiumu, 366 阅读, 0 推荐, 收藏,
摘要://-----------------------------------------------------------------------------////算法:排列组合类////版权所有(C)Snowdust//个人博客http://blog.csdn.net/snowdust&http://snowdust.cnblogs.com//MSN&Emailsnowdust77@sina.com////此源代码可免费用于各类软件(含商业软件)//允许对此代码的进一步修改与开发//但必须完整保留此版权信息////调用方法如下:////1.GetPermutation(T[ 阅读全文
(转)一维字符串数组之间组合问题的C#实现
2012-09-06 00:31 by hongjiumu, 1564 阅读, 0 推荐, 收藏,
摘要:如题,最近需要处理一些字符串数组之间相互无重组合的实际问题。把问题抽象出来,实际就是数学中的排列组合问题,思想很简单,只是在实现上着实花了一些功夫,而且代码尚需进一步优化,写下来希望能和大家一起探讨,欢迎大家提建议,以使程序能进一步优化。问题描述:假设现有三组字符,如下{k1,k2},{k3,k4},{k5}要求三组数据组合,组合的每一个结果必须包含三组中的字符,且不重复。针对这种少量的数组,通过排列组合我们可以计算出组合数量N = 2*2*1 = 4 (种)结果如下:k5k3k1k5k4k1k5k3k2k5k4k2思想很简单的,我实际问题抽象成了二维数组,实际就是一维数组中n个一维数组的组合 阅读全文
Js中冒号的作用
2012-09-05 09:31 by hongjiumu, 597 阅读, 0 推荐, 收藏,
摘要:Js中冒号的作用:1,声明对象的成员;2,switch语句的分支;3, 三元表达式。(1)声明对象的成员:var Book={ Name:'法', Price:100, Discount:function(rate){ this.Price*=rate; }};alert(Book.Price);Book.Discount(0.8);alert(Book.Price);2.switch语句分支vara=2;switch(a){ case0: alert('0'); break; case1: alert('1'); break; case2: a 阅读全文
getElementById() dosen't find <input type="hidden" runat="server"/>
2012-09-04 10:36 by hongjiumu, 386 阅读, 0 推荐, 收藏,
摘要:getElementById() dosen't find <input type="hidden" runat="server"/><asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server"><input id="divPosition" type="hidden" value="12" 阅读全文
浙公网安备 33010602011771号