ITeye博客

2012 年文章归档

共 8 篇文章

Clib.htm

C/C++ API函数

2012-10-15 22:16

C 获得随机数

#include using namespace std; time_t temp_time; srand((unsigned)time(&temp_time));//初始化随机种子 int r = (rand() % 256); //0-255 int r1 = (rand() % 10); //0-9 int r2 = (rand() % 100); //0-99

2012-08-19 14:59

c 获得毫秒

Linux系统 使用gettimeofday接口:gettimeofday能得到微秒数,比毫秒还要更精确。 #include <stdio.h> #include <sys/time.h> int main() { struct timeval start, end; gettimeofday( &start, NULL ); sleep(3); gettimeofday( &end, NULL ); int timeuse = 1000000 * ( end.tv_sec - start.tv_sec ) + end.tv_usec - start.tv_usec; printf("tim…

2012-08-15 22:24

颜色拾取器和红蜻蜓截图

一个小巧的屏幕颜色拾取器,可用于HTML,VC++... 红蜻蜓截图软件

2012-07-22 14:15

SecureCRT_PortableSoft

SecureCRT_PortableSoft

2012-07-22 11:27

无法连接到linux虚拟机

解决方法: 一、开启SSH 以root用户登录Linux,打开终端,运行: /etc/init.d/sshd restrat 二、关闭防火墙 1.在终端运行 setup 2,.选择 firewall 回车 3.按tab键切换到disablede项,然后按空格键选择,然后再按tab键切换到ok,按空格件选择 4.按tab键切换到quit,按空格件选择 然后用客户端ssh登录Linux 三、关闭防火墙的另一种方式 /etc/init.d/iptables stop 补充: 红旗linux的某些版本,不允许root用户远程登陆的,需要修改设置#vi /etc/ssh/sshd_config 中 P…

2012-07-20 23:23

C++ 创建文件夹

//C++创建文件夹 bool CreateFolder(string path) { char* fileName = (char*)path.c_str(); char* tag; for(tag = fileName; *tag; tag++) { if ('\\' == *tag || '/' == *tag) { char buf; char path; strcpy(buf, fileName); buf = '\0'; strcpy(path, buf); if (access(path, 6) == -1) //第二个参数 00:检测是否存在 02:写权限 04:读权限 06…

2012-06-28 22:15

资源连接

android系统自带system/app下载 http://download.csdn.net/download/lin2221021/3551265 Android在Git上的所有项目源码下载 http://www.linuxidc.com/Linux/2011-03/33518.htm windows下安装git下载android源码 http://blog.csdn.net/fengkuanghun/article/details/7073389

2012-03-24 08:17