注释要添加的按钮的总个数为total-(void)addScrollAndButton{ int COLUMN=4;//列数 int total = self.listArray.count; //int rows = (total / COLUMN) + ((total % COLUMN)...
分类:
移动开发 时间:
2015-05-26 22:42:40
阅读次数:
138
树上的背包
#include
#include
#include
#include
#include
#include
#include
using namespace std;
const int MAXN = 110;
int n, m;
struct Node {
int num,cost, val;
}room[MAXN];
int dp[MAXN][M...
分类:
其他好文 时间:
2015-05-26 21:34:37
阅读次数:
144
我们能不能来一个线程报数功能,即第一个子线程输出1,第二个子线程输出2,第三个子线程输出3,……。要实现这个功能似乎非常简单——每个子线程对一个全局变量进行递增并输出就可以了。
代码如下:
//子线程报数
#include
#include
#include
int g_nCount;
//子线程函数
uns...
分类:
编程语言 时间:
2015-05-26 21:34:29
阅读次数:
178
#include
#include
#include
using namespace std;
const int maxn=20005;
int a[maxn];
void isprime()//素数筛
{
memset(a,0,sizeof(a));
for(int i=2;i<maxn;i++)//用a[]这个数组存的...
分类:
其他好文 时间:
2015-05-26 21:26:24
阅读次数:
107
#include
#include
typedef struct TreeNode//二叉树节点声明
{
int value;
TreeNode* left;
TreeNode* right;
}*PtrNode;
void CreatTree(PtrNode *root)//先序建立一个树
{
int tmp;
scanf("%d",&tmp);
if(tmp==-1)
*r...
分类:
编程语言 时间:
2015-05-26 21:22:20
阅读次数:
276
1.Add 1 #region 1.1 新增学生信息(定义成Int类型,返回受影响的行数) 2 /// 3 /// 新增学生信息 4 /// 5 /// 6 /// 7 public int Ad...
分类:
其他好文 时间:
2015-05-26 21:18:47
阅读次数:
207
java中的数据类型,可分为两类: 1. 基本数据类型,也称原始数据类型。byte,short,char,int,long,float,double,boolean 他们之间的比较,应用双等号(==),比较的是他们的值。 2. 复合数据类型(类) 当他们用(==)进行比较的时候,比较的是他们...
分类:
编程语言 时间:
2015-05-26 21:18:33
阅读次数:
159
#import #import "Observer.h"#import "Person.h"#import "Computer.h"int main(int argc, const char * argv[]) { @autoreleasepool {/* Person *per...
分类:
其他好文 时间:
2015-05-26 21:16:54
阅读次数:
98
auto_ptr 智能指针(C98)#includeusing namespace std;void main(){//auto_ptrfor ( int i = 0; i a_p(p);}cin.get();}查看任务管理器:
分类:
其他好文 时间:
2015-05-26 21:14:33
阅读次数:
156
main 主函数执行完毕后,是否可能会再执行一段代码?(转载) #include#includeusing namespace std;int f1(){ cout << "f1" << endl; return 0;}int f2(){ cout << "f2" << endl; return 0...
分类:
其他好文 时间:
2015-05-26 21:13:47
阅读次数:
94