码迷,mamicode.com
首页 >  
搜索关键字:num lock    ( 23499个结果
【来写个2048吧】—— 后期优化及源代码
卡片里的数字假设越来越大则会超过卡片,这样看起来不好看,所以我们要推断数字的位数然后设置合适的大小。在Card.cpp的setNumber()中增加例如以下代码 //设置数字大小 if ( num >= 0) { labelC...
分类:其他好文   时间:2014-06-25 23:34:03    阅读次数:269
c语言的结构体字节数统计
struct结构体的字节数 等于 结构体中最大类型的字节数的倍数。如:typedef struct Student{ short id; //2个字节 char name[15]; //1*15个字节 int age; //4个字节 char num; //1个字节} Student;总共28个字节...
分类:编程语言   时间:2014-06-25 21:13:46    阅读次数:235
C++链表-最简单
struct student{ long num; float score; struct student *next;};注意:只是定义了一个struct student类型,并未实际分配存储空间。只有定义了变量才分配内存单元。#includeusing namespace std;int mai...
分类:编程语言   时间:2014-06-24 22:24:45    阅读次数:318
LeetCode 3Sum Closest
class Solution {public: int threeSumClosest(vector &num, int target) { int len = num.size(); if (len target) { q-...
分类:其他好文   时间:2014-06-24 21:22:03    阅读次数:138
phpcms 标签解析
phpcms 每个pc标签对应modules控制器下一个 tag.class类比如{pc:content action="position" posid="2" order="listorder DESC" num="4"} {loop $data $key $val} {$val['titl...
分类:Web程序   时间:2014-06-24 12:28:21    阅读次数:344
setjmp与longjmp
在C中有时我们会使用goto语句用于执行跳转,但是不能跨越函数 #include void func2() { int num = 0; dst2: if (num > 0) { printf("func1()\n"); func3(); } if (num == 1) return; num++; goto dst2; } void func3() { } ...
分类:其他好文   时间:2014-06-22 20:46:50    阅读次数:144
Preemption Context Switches 和 Synchronization Context Switches
Preemption Context Switches度量的是操作系统任务调度器将处理器中的一个正在运行的线程切换为另一个更高优先级的线程的次数,即发生抢占的次数。 Synchronization context switches度量的是由于显式调用线程同步API而发生线程切换的次数,如给多线程共享的变量加锁,多线程共同去修改,有些线程要阻塞在lock,直至占用锁的线程释放lock,这个度量反映...
分类:其他好文   时间:2014-06-22 19:40:21    阅读次数:341
判断一个数是否为回文数
一: bool pd(int n)//判断是否是回文数 { int k=0; int temp=n; while(temp) { num[++k]=temp%10; temp/=10; } for(int i=1;i<=k/2;i++) { if(n...
分类:其他好文   时间:2014-06-22 17:23:50    阅读次数:186
结构体知识梳理4-浅拷贝深拷贝
typedef struct student{ int num; //成员 int age; char name[10]; }s_stu,*p_stu;...
分类:其他好文   时间:2014-06-22 14:01:44    阅读次数:232
该文章仅是用于测试
是吗hello爱发起#include<stdio.h> intmain() { printf("helloworld!"); }num=521 (1)sed加正则表达式 [[-n"`echo$num|sed‘s/[0-9]//g‘`"]]&&echo"Itisnumber" (2)变量的子串替换+正则表达式 [[-z"`echo"${num//[0-9]/}"`"]]&&echo"Itisnumber" (3)变量..
分类:其他好文   时间:2014-06-22 11:55:10    阅读次数:191
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!