码迷,mamicode.com
首页 >  
搜索关键字:flag    ( 5253个结果
java多线程的等待唤醒机制及如何解决同步过程中的安全问题
/* class Person{ String name; String sex; boolean flag = true; public void setPerson(String name, String sex){ this.sex=sex; this.na...
分类:编程语言   时间:2014-08-04 01:55:16    阅读次数:221
小车PID算法跑直线
#include #include"sys.h" extern unsigned char Rec_Dat_U1; extern unsigned char Rec_String_U1[200]; extern int conut_flag_1; #define in_1(x)    x?GPIO_ResetBits(GPIOC , GPIO_Pin_0): GPIO_S...
分类:其他好文   时间:2014-08-03 20:40:05    阅读次数:845
bailian 2698
#include#include#includeusing namespace std;int a[100],flag=1,b[10][10];int f(int k,int j){ for(int i=0;i#include#includeusing namespace std;int a[100...
分类:其他好文   时间:2014-08-03 20:28:25    阅读次数:180
一串数字中有两个只出现一次的数字其余都是成对相同,求这两个数
当然如果这个问题是只有一个不同的数,其他数字成对相同,那么就是把所有数字异或就得出这个数了 这次是有两个只出现一次的数字,其他数字都成对相同 1)先把所有数都异或得到数t 2)算出t的二进制第一个1的位置flag 3)将所有数根据二进制flag位置是否为1分成两组b1[],b2[] (此时每组数字的个数一定是奇数) 4)将b1组异或得到ans1,将b2组异或得到ans2...
分类:其他好文   时间:2014-08-03 01:47:24    阅读次数:344
cv::Mat到YUV420的转换
某些特定场合我们会经常遇到yuv420格式的视频文件,这种视频帧无法直接用于opencv,故而,需要进行格式转换;幸运的是,opencv提供了rgb到yuv420的格式转换函数;下面给出基本用法; 函数1:读取avi格式的视频文件,转换成Yuv420格式,并写入文件; void WriteYuv() { cv::VideoCapture vc; bool flag = vc.ope...
分类:其他好文   时间:2014-08-02 23:32:14    阅读次数:1266
*绝对值排序
Problem Description输入n(n#includeint main(){ int n,i,j,flag,temp,a[100]; while(scanf("%d",&n)!=EOF&&n!=0) { for(i=0;i<n;i++) scanf...
分类:其他好文   时间:2014-08-02 12:45:23    阅读次数:170
字典树(模型体)
给出n(1#include #include #include #include const int N = 20010;using namespace std;struct node{ int flag; node *next[26];};int n,m,ans = 0;struct node *...
分类:其他好文   时间:2014-08-01 22:51:52    阅读次数:220
EasyUI父节点(parent)处理方法
function save(){ var nodes = $('#funcSelectTree').tree('getChecked');//获取所有打勾的节点 var flag = false; var array = new Ar...
分类:其他好文   时间:2014-08-01 18:30:12    阅读次数:227
Linux Windows 定时修改系统时间
#/bin/bash # beforTime=02:00 afterTime=08:00 beforTime=$(echo$beforTime|awk-F:{‘print$1‘}) afterTime=$(echo$afterTime|awk-F:{‘print$1‘}) Flag=0 whiletrue do sleep2s echo"date:$(date+"%Y-%m-%d%H:%M:%S")" if[$(date+%H)-eq$beforTime];then CurDate=$(date+%d) ..
分类:Windows程序   时间:2014-08-01 13:56:22    阅读次数:283
统计帧率的几种方法
class CFpsSta{public: time_t m_start_time; bool flag; float m_count; float m_last_fps; CFpsSta(); void checkFps();};void CFpsSta::ch...
分类:其他好文   时间:2014-08-01 12:56:21    阅读次数:324
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!