码迷,mamicode.com
首页 >  
搜索关键字:reference count    ( 23530个结果
C fwrite
功能:向文件读入写入一个数据块。用法:fwrite(const void *buffer,size_t size,size_t count,FILE *stream);(1)buffer:是一个指针,对fwrite 来说,是要输出数据的地址。(2)size:要写入内容的单字节数;(3)count:要...
分类:其他好文   时间:2014-05-16 23:37:49    阅读次数:303
winfrom中DataGridView绑定数据控件中DataGridViewCheckBoxColumn怎么选中
for (int i = 0; i < this.dataGridView1.Rows.Count; i++) { this.dataGridView1.Rows[i].Cells["CheckBoxCulums"].Value = this.ch...
分类:Windows程序   时间:2014-05-16 21:48:31    阅读次数:393
Leetcode: Count and Say
一次过 1 public class Solution { 2 public String countAndSay(int n) { 3 if (n <= 0) return ""; 4 int i = 1; 5 String current ...
分类:其他好文   时间:2014-05-16 21:27:59    阅读次数:267
C fread
fread是一个函数。从一个文件流中读数据,最多读取count个元素,每个元素size字节,如果调用成功返回实际读取到的元素个数,如果不成功返回 0。函数原型size_tfread (void*buffer,size_tsize,size_tcount,FILE*stream) ;参 数buffer...
分类:其他好文   时间:2014-05-16 21:06:26    阅读次数:417
php的数组、排序、查找
//创建数组,其值可以放任意的数据类型 $arr[0]=111; $arr[1]=121; $arr[2]="nihao"; $arr[3]=141.9; $arr[4]=null;//null要记入长度,并要占用空间,但是不会输出 echo "数组长度".count($arr);...
分类:Web程序   时间:2014-05-16 08:07:56    阅读次数:372
C#:自定义函数
将数组转成字符串/// /// 将数组转成字符串/// /// 分隔符/// 要字符串数组private string Implode(char glue,string[] pieces) { string result = string.Empty; int count = piece...
分类:其他好文   时间:2014-05-14 07:48:42    阅读次数:363
2013 南京邀请赛 C count the carries
1 /** 2 大意: 给定区间(a,b), 将其转化为二进制 计算从a+(a+1)+(a+2)。。。。+(a+b-1),一共有多少次进位 3 思路: 将(a,b)区间内的数,转化为二进制后,看其每一位一共有多少个1 4 可知最低位循环为2,第二位循环为4 5 ...
分类:其他好文   时间:2014-05-13 20:31:13    阅读次数:255
约瑟夫问题 算法很简单保证每隔人都能看懂用数组实现 利用循环删除数组中的元素
#include using namespace std; const int size = 1000; void ArrDel() { int arr[size]; //循环结束标志,一直循环到数组中只剩下最后一个元素结束 int currentNum = size; int count = 0; for (int k = 0; k < size; k++) { arr...
分类:其他好文   时间:2014-05-13 15:53:09    阅读次数:282
BZOJ 1036: [ZJOI2008]树的统计Count
题目地址:BZOJ 1036 题目大意:给出一棵树,每个点有一个权值,要求三种操作:1.修改某个点的权值,2.询问x到y路径上各点的权值最大值,3.询问x到y路径上各点的权值之和。 算法讨论:树链剖分模板题。 Code: #include #include #define N 30000 #define oo 0x7f7f7f7f using namespace std; int...
分类:其他好文   时间:2014-05-13 15:45:57    阅读次数:336
printf的实现(不借助stdarg.h中的宏)
实现了%d %x %c %s对变长函数的参数取址有了深刻的理解 ,蒋yy的实验任务其实还是很有帮助的^_^ 1 int printf ( const char * format, ... ) 2 { 3 int Count=0; 4 int index=0; 5 char b...
分类:其他好文   时间:2014-05-13 11:01:59    阅读次数:226
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!