老顽童

2011年9月20日 #

C++虚函数表解析(转)

摘要: C++中的虚函数的作用主要是实现了多态的机制。关于多态,简而言之就是用父类型别的指针指向其子类的实例,然后通过父类的指针调用实际子类的成员函数。这种技术可以让父类的指针有“多种形态”,这是一种泛型技术。所谓泛型技术,说白了就是试图使用不变的代码来实现可变的算法。比如:模板技术,RTTI技术,虚函数技术,要么是试图做到在编译时决议,要么试图做到运行时决议。关于虚函数的使用方法,我在这里不做过多的阐述。大家可以看看相关的C++的书籍。在这篇文章中,我只想从虚函数的实现机制上面为大家 一个清晰的剖析。当然,相同的文章在网上也出现过一些了,但我总感觉这些文章不是很容易阅读,大段大段的代码,没有图片,没 阅读全文

posted @ 2011-09-20 10:05 老顽童 阅读(103) 评论(0) 推荐(0) 编辑

2011年9月15日 #

F10 ubuntu 调试 被占用

摘要: In Ubuntu, key F10 is used to open the first item of the menu bar, but If you use Emacs key binding in eclipse, F10 is used as the redo key. So you need to do the below change.Run gconf-editor, browse to /desktop/gnome/interface then scroll down to menubar_accel and delete the F10 value.From http:// 阅读全文

posted @ 2011-09-15 00:38 老顽童 阅读(298) 评论(0) 推荐(0) 编辑

2011年9月9日 #

Windows完成端口与Linux epoll技术简介

摘要: WINDOWS完成端口编程1、基本概念2、WINDOWS完成端口的特点3、完成端口(Completion Ports )相关数据结构和创建4、完成端口线程的工作原理5、Windows完成端口的实例代码Linux的EPoll模型1、为什么select落后2、内核中提高I/O性能的新方法epoll3、epoll的优点4、epoll的工作模式5、epoll的使用方法6、Linux下EPOll编程实例总结WINDOWS完成端口编程 摘要:开发网络程序从来都不是一件容易的事情,尽管只需要遵守很少的一些规则;创建socket,发起连接,接受连接,发送和接受数据。真正的困难在于:让你的程序可以适应从单单一个 阅读全文

posted @ 2011-09-09 11:03 老顽童 阅读(1889) 评论(0) 推荐(0) 编辑

Ubuntu 9.04 APT-GET 安装nginx+php+mysql

摘要: 通过APT-GET安装 NGINXsudo apt-get install nginx装好后 可以直接用WEB访问了然后安装MYSQL-SERVER MYSQL-CLIENT因为在光盘中带了这个包免去了下载的过程填加到源里面apt-cdrom add安装 sudo apt-get install mysql-server mysql-client安装PHPsudo apt-get install php5-cli php5-cgi php5-mysql另外还需要安装 LIGHTTPDapt-get install lighttpd这个时候 NGINX 已经启动了所以这个起不来 80端口冲突然后 阅读全文

posted @ 2011-09-09 10:10 老顽童 阅读(605) 评论(0) 推荐(0) 编辑

2011年8月23日 #

bmp565 wince显示

摘要: // #include "stdafx.h"#include <Windows.h>#include <vector>HWND g_hWnd;HDC g_hTopDc = NULL;HBITMAP g_hBitMap = NULL;UINT g_iWidth, g_iHeight;LRESULT MainWndProc( HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam );struct BitmapFileHeader { WORD bfType; DWORD bfSize; WORD bfRes. 阅读全文

posted @ 2011-08-23 10:50 老顽童 阅读(612) 评论(0) 推荐(0) 编辑

2011年8月19日 #

Ubuntu下安装Apache 2无法解析html中的php

摘要: Ubuntu下安装了Apache 2却无法解析html中的php ,好多说是在httpd.conf文件中修改代码,但是ubuntu中没有这个文件啊,新建添加代码之后,网页直接把html的代码给显示出来了……其实一个可行的办法是,在/etc/apache2/apache2.conf文件中添加下面两行即可:AddHandler php5-script .php .htmlAddType text/html .php .html保存后重启apache2:sudo /etc/init.d/apache2 restart 阅读全文

posted @ 2011-08-19 20:21 老顽童 阅读(748) 评论(0) 推荐(0) 编辑

Apache ubuntu

摘要: http://wiki.ubuntu.org.cn/Apachehttp://www.linuxidc.com/Linux/2010-07/27230.htm 阅读全文

posted @ 2011-08-19 20:09 老顽童 阅读(128) 评论(0) 推荐(0) 编辑

2011年8月15日 #

MS10-026 Microsoft MPEG Layer-3 Audio Stack Based Overflow

摘要: ### $Id: ms10_026_avi_nsamplespersec.rb 13555 2011-08-13 02:15:05Z sinn3r $##### This file is part of the Metasploit Framework and may be subject to# redistribution and commercial restrictions. Please see the Metasploit# Framework web site for more information on licensing and terms of use.# http:// 阅读全文

posted @ 2011-08-15 23:10 老顽童 阅读(216) 评论(0) 推荐(0) 编辑

2011年8月2日 #

创建WINCE下16位格式位图实现快速BitBlt

摘要: 在WINCE下,如果创建的位图与屏幕设备格式不一样,将会导致BitBlt函数极为缓慢,因此需要创建一幅16位色565格式位图,用此方法创建出的位图可以提供1ms的快速BitBlt绘制。当然,如果设备不是565颜色格式的,更改代码中的颜色掩码位bmiColors就可以了。view plain/////////////////////////////////////////////////////////////////////////////@brief创建一幅缓存图像。///@param[out]pHBitmap生成的位图句柄。///@param[out]pData生成的位图中的数据位置。// 阅读全文

posted @ 2011-08-02 23:10 老顽童 阅读(445) 评论(0) 推荐(0) 编辑

2011年7月31日 #

How to crack a wireless WEP key using AIR Crack

摘要: This article shortly describes simple steps on how to crack a wireless WEP key using AIR Crack software. This can be done by sniffing a wireless network, capturing encrypted packets and running appropriate encryption cracking program in attempt to decrypt captured data. WEP ( Wired Equivalent Privac 阅读全文

posted @ 2011-07-31 12:44 老顽童 阅读(430) 评论(0) 推荐(0) 编辑

导航