码迷,mamicode.com
首页 >  
搜索关键字:void 0    ( 62627个结果
【算法】第 n 小数 nth_element
STL 中取第 n 小数的算法 nth_element 的函数原型如下 template void nth_element(RandomAccessIterator first, RandomAccessIterator nth, RandomAccessIterator last); 算法说明: 1、功能:执行 nth_element 后,nth 所指位置的元素将是整个区间有序时在该处的元素。对 [first, nth) 中的任意迭代器 i 和 [n...
分类:其他好文   时间:2014-07-22 23:03:14    阅读次数:345
ComboBoxPropertyDescriptor 使用注意事项
ComboBoxPropertyDescriptor 1、public void setPropertyValue(Object id, Object value)  value为ComboBox中值的序号,而不是ComboBox中显示的名字. 2、public Object getPropertyValue(Object id) 返回的是序号需要转换为Integer类型。否则可能不显示可...
分类:其他好文   时间:2014-05-01 22:02:53    阅读次数:387
cocos2d-x3.0 RichText
.h RichText* _richText; void touchEvent(Ref *pSender, TouchEventType type);...
分类:其他好文   时间:2014-05-01 18:18:40    阅读次数:522
cocos2d-x3.0 PageView
.h添加如下代码: void pageViewEvent(Ref *pSender, PageViewEventType type);...
分类:其他好文   时间:2014-04-30 22:31:39    阅读次数:405
c++调用基类的构造函数(模板类)
代码如下 #include #include #include using namespace std; template class Base { public: Base(T name); virtual void toString(); protected: T id; }; template Base::Base(T n) { printf("B...
分类:编程语言   时间:2014-04-30 22:27:39    阅读次数:450
android 发送短信 如何做到一条一条的发送,只有在上一条发送成功之后才发送下一条短信
android发送短信截获上一条发送是否成功,然后再来发送下一条短信 1.问题:在项目中遇到如下要求:代发短信有N条,实现一条一条的发送并在上一条短信发送成功之后再来发送下一条。   for(int i=0;i   sendSMS(10086, text1, i);   } private void sendSMS(String toAddress, String body, Lon...
分类:移动开发   时间:2014-04-30 22:26:39    阅读次数:368
七大排序算法(冒泡,选择,插入,希尔,快速,合并,堆排序)的java实现
冒泡排序 思路:就是每次将最大或最小的元素放到数组的最后,so easy!时间复杂度为(O(n^2)) public class BubbleSort { public static void bubbleSort(int[] a) { for (int j = 1; j < a.length; j++) { for (int i = 0; i < a.length - j; i+...
分类:编程语言   时间:2014-04-30 22:12:40    阅读次数:309
在view扣除正方形
- (void)drawRect:(CGRect)rect { [super drawRect:rect]; CGContextRef ctx = UIGraphicsGetCurrentContext(); CGContextSetRGBFillColor(ctx, .3, .3, .3, .1); CGContextFillRect(ctx, self.boun...
分类:其他好文   时间:2014-04-29 13:33:22    阅读次数:284
链表《2》使用函数操作链表
使用函数操作链表 1:计算链表中结点的个数:定义一个Length_list()函数用于计算链表中结点的个数 函数代码: //计算链表中结点的个数 void Length_list(PNODE pHead) { PNODE p = pHead->pNext; int len = 0; while(NULL != p) { len++; p = p->pNext; ...
分类:其他好文   时间:2014-04-29 13:28:21    阅读次数:302
Linq To Entity 多表联合查询
using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace LinqToEntity { class Program { static void Main(string[] args) { //...
分类:其他好文   时间:2014-04-29 13:16:21    阅读次数:574
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!