摘要: DataBinding作为WPF的核心必须搞懂,其中涉及C#的属性、委托、事件以及WPF中的DependencyPeoperty、DependencyObject、INotifyPropertyChanged等概念。 阅读全文
posted @ 2016-08-14 15:24 Avota 阅读(652) 评论(0) 推荐(0) 编辑
摘要: 问题描述: Calculate the sum of two integers a and b, but you are not allowed to use the operator + and . Example: Given a = 1 and b = 2, return 3 解题思路: 我们 阅读全文
posted @ 2016-07-03 19:06 Avota 阅读(179) 评论(0) 推荐(0) 编辑
摘要: 问题描述: Given a positive integer n, break it into the sum of at least two positive integers and maximize the product of those integers. Return the maxim 阅读全文
posted @ 2016-04-23 13:50 Avota 阅读(291) 评论(0) 推荐(0) 编辑
摘要: 原创,转载请注明出处: "STL库list::sort()实现深度解析" list模板的定义以及一些基本成员函数的实现这里我就不赘述了,还不清楚的同学可以到网上查找相关资料或者直接查看侯捷翻译的《STL源码剖析》相应章节。我之所以写这篇笔记是因为当时看到list::sort()源码时一时没看懂,后来 阅读全文
posted @ 2016-04-13 22:07 Avota 阅读(2263) 评论(1) 推荐(0) 编辑
摘要: 问题描述: Given a sorted positive integer array nums and an integer n, add/patch elements to the array such that any number in range [1, n] inclusive can 阅读全文
posted @ 2016-03-06 22:10 Avota 阅读(936) 评论(0) 推荐(0) 编辑
摘要: 问题描述: Given an unsorted array return whether an increasing subsequence of length 3 exists or not in the array. Formally the function should: Return tr 阅读全文
posted @ 2016-03-06 22:04 Avota 阅读(174) 评论(0) 推荐(0) 编辑
摘要: ++属于单目运算符,前置与后置的实现代码不一样,下面以整数自增为例: 1、返回值以及返回类型的区别示例如下: 2、自定义类重载前置++与后置++,如下例重载链表节点: 阅读全文
posted @ 2016-03-06 21:59 Avota 阅读(2889) 评论(0) 推荐(0) 编辑
摘要: 一、OpenGL光源简介 OpenGL提供了多种形式的光源,如 、`平行光源 聚光灯光源`等。所有光源都使用 glLight 接口来设置光源属性,其中包括 glLight{if} 和 glLight{if}v 两类。 1、示例光源 2、注意事项 最大光源数 :不同的硬件支持的光... 阅读全文
posted @ 2015-11-12 18:32 Avota 阅读(6097) 评论(0) 推荐(0) 编辑
摘要: 采用C语言编程的时候,函数中形式参数的数目通常是确定的,在调用时要依次给出与形式参数对应的所有实际参数。但在某些情况下希望函数的参数个数可以根据需要确定。典型的例子有大家熟悉的函数printf()、scanf()和系统调用execl()等。那么它们是怎样实现的呢? C编译器通常提供了一系列处理这种... 阅读全文
posted @ 2015-09-14 15:04 Avota 阅读(586) 评论(0) 推荐(0) 编辑
摘要: 类型转换,顾名思义即将操作数转化为所需要的类型。C++作为C语言的超集,完全继承了C语言所具有的类型转换方法与能力。C语言有两种类型转换方式:隐式转换(implicit)和显示转换(explicit)。示例如下: int a = 10; double b = a; // 隐式转换 int c = (int)b; // 显示转换 容易看出,这两种转换方式存在某些缺陷... 阅读全文
posted @ 2015-09-06 16:50 Avota 阅读(167) 评论(0) 推荐(0) 编辑