2014年1月13日
摘要: IEnumerable allRules = from e in root.Elements("rule") select e; foreach (XElement rule in allRules) {} 阅读全文
posted @ 2014-01-13 14:44 飞翔@骑士 阅读(963) 评论(0) 推荐(0) 编辑
2014年1月10日
摘要: List wordsList = new List(); wordsList = File.ReadAllLines(inFilePath, Encoding.Unicode).ToList(); wordsList = wordsList.GroupBy(x => x.ToLower()).Select(grp => grp.FirstOrDefault()).OrderBy(x => x).ToList(); File.WriteAllLines(@"other.txt", wordsList, Encoding.Unicode); List word 阅读全文
posted @ 2014-01-10 14:00 飞翔@骑士 阅读(248) 评论(0) 推荐(0) 编辑
2013年4月17日
摘要: 1、 常量字符串 在代码里直接出现的”abcdef”这种字符串,在程序执行的时候,系统会将它们放在常量区,所谓常量区就是一直存在的,只读的,不可更改的数据区域,并且一个字符串只会有一份。假设你在程序里有两行代码 char* p1 = “agcd” ; char* p2 = “agcd” ; 无论你... 阅读全文
posted @ 2013-04-17 13:57 飞翔@骑士 阅读(3695) 评论(0) 推荐(0) 编辑
2013年4月1日
摘要: <html><script language="JavaScript">function changFont( x ){ var font_style = x; var article = document.getElementById("article"); if( typeof font_style == "string" ){ article.style.fontWeight = font_style; } else { article.style.fontSize = font_style; }}< 阅读全文
posted @ 2013-04-01 14:33 飞翔@骑士 阅读(293) 评论(0) 推荐(0) 编辑
摘要: <script type="text/javascript">// 定义构造函数,并设定一个属性function Person(name){ this.name = name;}// 为 Person 增加一个方法Person.prototype.showName = function(){ alert("我叫" + this.name);};// new 关键字实例化一个对象var Tom = new Person("Tom");// 运行该对象内的 showName() 方法Tom.showName();</sc 阅读全文
posted @ 2013-04-01 14:16 飞翔@骑士 阅读(119) 评论(0) 推荐(0) 编辑
2013年3月5日
摘要: cin >>i; p= new (nothrow) int[i]; // inot a constant value: if(p == NULL){ } else{ } 阅读全文
posted @ 2013-03-05 10:49 飞翔@骑士 阅读(140) 评论(0) 推荐(0) 编辑
2013年1月28日
摘要: HaHa 阅读全文
posted @ 2013-01-28 19:14 飞翔@骑士 阅读(201) 评论(0) 推荐(0) 编辑
2013年1月15日
摘要: Anoutletdescribes a connection between two objects. When you want an object (such as the view controller) to communicate with an object that it contains (such as the text field), you designate the contained object as an outlet. When the app runs, the outlet you create in Xcode is restored, allowin.. 阅读全文
posted @ 2013-01-15 18:54 飞翔@骑士 阅读(152) 评论(0) 推荐(0) 编辑
摘要: - (void)viewDidLoad { [superviewDidLoad]; // Do any additional setup after loading the view, typically from a nib. // [self setupArray]; //读取p... 阅读全文
posted @ 2013-01-15 15:11 飞翔@骑士 阅读(2375) 评论(0) 推荐(0) 编辑
2012年12月27日
摘要: 值参数,在函数执行前会调用一次拷贝构造函数初始化这个临时对象。 func(A) 引用参数,不产生一个临时对象来保存对象信息,不调用拷贝构造函数。 func(A&) 值返回,会产生一个临时对象(返回),并执行一次拷贝构造函数。 A func() 引用返回,不需要创建临时对象来保存对象信息(直接... 阅读全文
posted @ 2012-12-27 18:31 飞翔@骑士 阅读(394) 评论(0) 推荐(0) 编辑