自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(22)
  • 资源 (3)
  • 收藏
  • 关注

原创 Java 19岁生日快乐!

从1.0开始学Java,现在还是

2014-05-23 10:03:31 2439

原创 Python定时器的一个实现

''' Created on 2012-10-11 @author: blh ''' import threading import time class PyTimer:     PRECISION = 10  # 10ms          def __init__(self, scheduler_num=1):         self.lock = thre

2012-10-11 17:10:21 1983

原创 Windows环境下用Eclipse+MinGW编译CppUnit的错误解决

在我们编译CppUnit时有可能遇到下面的错误 #error Cannot define CppUnit::OStringStream 在你的project的Properties->C/C++ Build/Setting/GCC C++ Compiler/Preporcessor加入预定义宏CPPUNIT_HAVE_SSTREAM 然后在编译,就可以编译通过生成静态或者动态C

2012-05-24 07:13:01 1156

原创 告别2011,迎接2012

旧的结束,新的开始

2011-12-31 23:41:07 431

原创 C++虚析构函数

当释放类对象指针时,会调用类析构函数,但如果释放的基类指针是属于其派生类对象的, 这种行为未定义,为了保证派生类的析构函数也被调用,需要将基类析构函数定义为虚。 例子: //1. 基类使用虚析构函数 (基类为A) #include using namespace std; class C { public:     C() {         cout

2011-12-24 16:58:45 471

原创 Steve走好

2011-10-06 11:05:40 474

原创 设置Qt应用程序图标

给你的应用指定了一个图标icon.ico,但编译执行后任然是系统图标可以使用下面方法设置应用图标创建资源文件:qt.rc (VS的资源文件语法),内如如下IDI_ICON               ICON    DISCARDABLE     "icon.ico"然后在应用的

2011-07-09 17:27:43 453

原创 Qt去掉窗口?按钮

通过windowFlags实现setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint);

2011-07-09 12:51:54 949

原创 Qt的LineEdit 输入内容控制

默认下,LineEdit接受任何字符输入,如何让LineEdit能偶只接受自定义的输入,如只允许输入XX或者XX.XX(X:0-9)可以使用正则表达式和LineEdit的Validator进行限制例子: QRegExp regExp2("[0-9]{1,2}[.][0-9]

2011-07-09 12:47:49 7946

转载 Makefile 常用函数表

<br />一、字符串处理函数<br /> 1.$(subst FROM,TO,TEXT)<br /> 函数名称:字符串替换函数—subst。<br /> 函数功能:把字串“TEXT”中的“FROM”字符替换为“TO”。<br /> 返回值:替换后的新字符串。<br /><br /> 2.$(patsubst PATTERN,REPLACEMENT,TEXT)<br /> 函数名称:模式替换函数—patsubst。<br /> 函数功能:搜索“TEXT”中以空格分开的单词,将否符合模式“TAT

2010-08-21 12:56:00 778

原创 用lex和yacc实现的计算器

代码// calc.lex// calc.y// makefile// exam.txt// 使用方法 1$ ./calc // 是用方法2$ ./calc1+31+3=4q$

2010-06-27 12:26:00 1400

原创 一个“回”型数字的程序

#include #define MAX        (9)#define MAX_NUM    ((MAX) * (MAX))int xy[MAX][MAX];#define m2r(x, y, v) do { while (((x) #define m2d(x, y, v) do { while (((y) #define m2l(x, y, v) do {

2010-05-10 23:24:00 835

原创 VBox下Ubuntu更改分辨率方法

 在windows中用VirtualBox (v3.0.2)安装Ubuntu(v9.0.4),默认按照800*600显示,可以采用下列方式更改分辨率 1、加载VBox的Guest Additions2、运行一个终端3、执行su - 更改到root用户 (如果更改失败,先激活root用户)4、编辑/etc/X11/xorg.conf,增加红色字段 Section "D

2009-07-27 21:07:00 5022

原创 用system权限执行程序

 今天遇到一个问题,在windows vista中需要手工删除注册表中的一注册项,但该项要求system权限(比administrator权限还高),经过不断努力找到一个程序,在命令行自行命令将regedit.exe按照system权限运行,成功的删除了那个注册表项 命令为 psexec.exe -i -d -s regedit.exe  psexec.exe位于工具集 pstoo

2009-07-25 23:39:00 1256

原创 一类出镜率很高的面试题

 看看下面代码是否有问题?void getval(int *pi){    int i;    pi = (int *)malloc(10 * sizeof(int));    for (i = 0; i     {        pi[i] = i;    }}int main(){    int *pi;    int i;

2009-07-22 18:26:00 575

原创 日全食

 今天上午在家里观看日全食,天空云很多,观测条件不太好,但是效果还是不错,当太阳全部被遮住后,天真的黑了,呵呵     

2009-07-22 12:24:00 646 1

原创 一个C程序例子:打印指定日期所属月的月历

#include #include #include #include int days[6][7];int mdays[] = {31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};int mdays2[] = {31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};#d

2009-07-12 16:48:00 1592 3

原创 判断符号整数和无符号整数的方法

//有符号整数>>操作,符号位不变 #define _is_sign_int(x)  ((((x) >> 1) & 0x80000000) ?  1 : 0) #define is_sign_int(x) (((x) > 0) ? _is_sign_int(0 - (x)) : (((x) == 0) ? _is_sign_int((x) - 1) : _is_sign_int(x))

2009-06-18 21:36:00 1299 2

原创 根据结构体某一成员的地址得到该结构体变量的首地址

#define element_to_entity(p,T,e)  ((T*)((unsigned char *)(p) - ((unsigned char *)(&(((T *)0)->e)))))  很多人会对((T *)0)很迷糊,其实换个((T *)p) 形式或许更好理解,如果当p的地址为0时就成了((T *)0)     例子#include

2009-06-07 11:04:00 776

原创 几种排序方法的C语言实现

 #include #include #define SORT_ASCENDING (1)#if SORT_ASCENDING#define compare_num(a,b)    ((a) > (b))#else#define compare_num(a,b)    ((a) #endif#define NUM    (10)//=======

2009-06-06 23:33:00 1058

原创 加减乘除算24的C代码

 #include #define ERROR_NUM (0x7fffffff)#define RESULT_NUM (24)char o_name[] = "+-*/";int calc(int a, int o, int b){if ((a == ERROR_NUM) || (b == ERROR_NUM))return ERROR_NUM;

2009-06-05 09:41:00 1042 1

原创 “搞笑”的C数组5["abcdef"]表示方法

 这个形式是正确的,这是由于数组下标的指针定义, 即对于任何两个表达式a 和e, 只要其中一个是指针表达式而另一个为整数, 则a[e] 和*((a)+(e)) 完全一样 如果定义char a[] = "abcdef"即5["abcdef"] 的值等价于"abcdef"[5],a[5]、5[a] 建议这种表达式还是不要用到你的正式代码中,呵呵

2009-06-04 15:26:00 1449 1

一个很有用的工具集 - PsTools

The Windows NT and Windows 2000 Resource Kits come with a number of command-line tools that help you administer your Windows NT/2K systems. Over time, I've grown a collection of similar tools, including some not included in the Resource Kits. What sets these tools apart is that they all allow you to manage remote systems as well as the local one. The first tool in the suite was PsList, a tool that lets you view detailed information about processes, and the suite is continually growing. The "Ps" prefix in PsList relates to the fact that the standard UNIX process listing command-line tool is named "ps", so I've adopted this prefix for all the tools in order to tie them together into a suite of tools named PsTools. Note: some anti-virus scanners report that one or more of the tools are infected with a "remote admin" virus. None of the PsTools contain viruses, but they have been used by viruses, which is why they trigger virus notifications. The tools included in the PsTools suite, which are downloadable as a package, are: * PsExec - execute processes remotely * PsFile - shows files opened remotely * PsGetSid - display the SID of a computer or a user * PsInfo - list information about a system * PsKill - kill processes by name or process ID * PsList - list detailed information about processes * PsLoggedOn - see who's logged on locally and via resource sharing (full source is included) * PsLogList - dump event log records * PsPasswd - changes account passwords * PsService - view and control services * PsShutdown - shuts down and optionally reboots a computer * PsSuspend - suspends processes * PsUptime - shows you how long a system has been running since its last reboot (PsUptime's functionality has been incorporated into PsInfo) The PsTools download package includes an HTML help file with complete usage information for all the tools.

2009-07-25

vxworks_network_programmers_guide_5.5

vxworks_network_programmers_guide_5.5

2009-06-02

RFC 3015 - Megaco Protocol Version 1.0

RFC 3015 - Megaco Protocol Version 1.0

2009-06-02

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除