码迷,mamicode.com
首页 >  
搜索关键字:windows os    ( 207876个结果
如何终结服务器进程
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
ios中创建可以拖动的view原理和实现详解(含代码)
有时候我们会需要在界面上拖动view;uiview是继承于uiresponder的,所以可以响应触摸相关的事件。 重点是以下一组方法: - (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event  - (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent...
分类:移动开发   时间:2014-04-29 13:41:20    阅读次数:485
UVA 11538 - Chess Queen(数论+计数问题)
题目链接:11538 - Chess Queen 题意:给一个n*m棋盘,问放两个皇后,使得两个皇后互相能攻击到,有几种放法 思路:分横竖,对角线来考虑。 横:n * A(m, 2)种 竖:m * A(n, 2)种 对角线:由于有两条,可以算一条再乘2 2 * 所有对角线和(A(对角线格数,2))。 那么对角线格数为:(1, 2, 3, 4 ... n .n .n .n.n - 1....
分类:其他好文   时间:2014-04-29 13:38:20    阅读次数:387
ios 得到文件夹大小 进率是1000
- (CGFloat)folderSizeAtPath:(NSString *) folderPath {     NSFileManager * manager = [NSFileManager defaultManager];          if (![manager fileExistsAtPath:folderPath])     {       return 0;   ...
分类:移动开发   时间:2014-04-29 13:36:20    阅读次数:379
UVA 315 求割点数
题目链接:http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=251 测模版: #include #include #include #include #include #include using namespace std; #define ...
分类:其他好文   时间:2014-04-29 13:31:21    阅读次数:542
VM启动报错Cannot open the disk,Failed to lock the file
在windows下运行VMware创建的虚拟机时出错,无法运行。 错误提示大概为: Failed to lock the file Cannot open the disk 'D:\Windows Server 2008 R2 x64.vmdk' or one of the snapshot disks it depends on. 解决方法:        把虚拟机文件夹里【.lck】...
分类:其他好文   时间:2014-04-29 13:28:21    阅读次数:366
paip.导入数据英文音标到数据库mysql为空的问题之道解决原理
paip.导入数据英文音标到数据库mysql为空的问题之道解决原理 #---原因:mysql 导入工具的bug #---解决:使用双引号不个音标括起来. 作者 老哇的爪子 Attilax 艾龙,  EMAIL:1466519819@qq.com 转载请注明来源: http://blog.csdn.net/attilax from log import * iniLog ...
分类:数据库   时间:2014-04-28 10:45:40    阅读次数:420
poj 2431 Expedition 贪心+最大堆
当油量不够时从走过的油站中选最大加油量的 #include #include #include #include using namespace std; #define MAX_N 10005 struct node{ int dist,fuel; }t[MAX_N]; bool cmp(const node &a,const node &b) { return a.dist<b.dis...
分类:其他好文   时间:2014-04-28 10:44:43    阅读次数:335
走进C++程序世界-----operator new delete 重载
在C++ 的世界里,new 和delete 是关键字,而在C的世界里相对应的malloc和free是函数,关键C++的new和delete分析,详见前面的章节,这里就不在过多的介绍了。链接。 下面来研究下关于new 和delete的重载。  1、对比使用重载和未使用重载  未使用“/*File : operator_new.cpp *Auth : sjin *Date : 2014-04...
分类:编程语言   时间:2014-04-28 10:43:41    阅读次数:406
uva 10084 Hotter Colder
uva 10084 Hotter Colder 题目大意: 有一个人玩游戏,起初是个左下角(0,0) 右上角(10,10)的矩形,有一个宝藏藏在这之间。这个人起初在(0,0) 每次走到一个点,会告诉你与原来的点相比距离宝藏近了还是远了,还是不变,根据这个每次求宝藏的范围(面积)。 解题思路: 每次相当于形成一个新的范围是凸包,只需要求这个凸包所有的点,然后按照极角排序,求面积。 这题wa了很多次,感觉代码略麻烦了一点点。 代码:见文章...
分类:其他好文   时间:2014-04-28 10:14:41    阅读次数:370
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!