1 WinMain(hInst,hPrev,……) 2 { 3 MSG msg; 4
RegisterClass(……); 5 CreateWindow(……); 6 ShowWindow(……); 7 UpdateWindow(……); 8
while(GetMessage(……)) 9 {10....
我的memcmp: 1 int memcmp(void *buf1, void *buf2,
unsigned int count){ 2 int reval; 3 while(count && !(reval = (*(unsigned
char *)buf1) - (*(unsi...
分类:
其他好文 时间:
2014-05-01 11:16:49
阅读次数:
387
When multiple threads share mutable data, each
thread that reads or writes the data must perform synchronization. Without
synchronization, there is no...
分类:
数据库 时间:
2014-05-01 09:14:25
阅读次数:
506
我的strcat: 1 char *strcat(char *dest,char *src)
2 { 3 char * reval = dest; 4 while(*dest) 5 dest++; 6 while(*src) 7 *dest++...
分类:
其他好文 时间:
2014-05-01 08:59:02
阅读次数:
484
#include#include#includeusing namespace std;int
main(){ int n,i; char a[100000]; cin>>a; sort(a,a+strlen(a)); do{
cout<<a<<endl; }while(next_permut...
分类:
其他好文 时间:
2014-05-01 06:20:37
阅读次数:
368
本地存储。相当于Flash里面的SharedObject。Android位置:机器自身存储的(非扩展卡)/data/data/appname/shared_prefs/{AppName}.xml,如果想查看需要Root。IOS位置:暂时还没找到。其他位置:参考https://docs.unity3d...
分类:
其他好文 时间:
2014-05-01 05:38:35
阅读次数:
281
1 保留小数点后两位#include cout const char * spilt="/";char
*p;p=strtok(str,spilt);while(p!=NULL){ //cout
#includesort(Rs.begin(),Rs.end());sort(Rs.begin(),Rs...
分类:
编程语言 时间:
2014-05-01 05:05:45
阅读次数:
409
windows下面可以主线程while loop接受input;但是觉得很丑。
linux没办法这样,可以用注册信号的办法。实现起来也不难:
#include "stdio.h"
#include "unistd.h"
#include "signal.h"
#include "error.h"
volatile bool isStop = false;
static void handl...
分类:
其他好文 时间:
2014-04-29 13:42:21
阅读次数:
418
今天想在应用的Loading页面加载一个gif动画,但又不知道怎么弄,就网上搜了下,看到好多人都是使用ant.cy.liao@gmail.com写的GifView.jar包,
于是就简单了解了一下:
看了下作者的源码,编写的GifView继承自View,那么在使用的时候也就很方便了,可以当做一个普通的UI组件来用。
在使用普通的UI组件的时候,我们一般都使用如下的方式:...
分类:
移动开发 时间:
2014-04-29 13:42:21
阅读次数:
545
floyd求最短路。
注意图是有向图。。。
#include
#include
#include
using namespace std;
struct node
{
int x,y,id;
}edge[205];
int dis[205][205];
int main()
{
int c,T,n,a,b,op;
while(scanf("%d",&T...
分类:
其他好文 时间:
2014-04-29 13:21:23
阅读次数:
313