Quantcast
Channel: C++博客-所有随笔
Browsing all 7881 articles
Browse latest View live

Image may be NSFW.
Clik here to view.

OpenCV调用摄像头录像并保存下来

网上很多都说录制了之后视频文件为0k,或者是打不开。其实,这个原因主要与2方面有关:  1. OpenCV生成的视频的编码格式有关。  2. 非法退出录取有关(我用200次循环解决。或者可以用Timer。或者用其他键处理) vs2008 win32控制台程序 1 #include "cv.h" 2 #include "cxcore.h" 3 #include "highgui.h" 4...

View Article


Image may be NSFW.
Clik here to view.

HWND转换CWnd*

CWnd *pWnd = CWnd::FromHandle(GetDlgItem(hWnd,ID)); m_Camerapwnd = pWnd;盛胜 2013-01-16 14:01 发表评论

View Article


Image may be NSFW.
Clik here to view.

MFC使对话框右上角关闭变灰

变灰代码:CMenu*   menu   =   this->GetSystemMenu(FALSE);   menu->EnableMenuItem(SC_CLOSE, MF_BYCOMMAND | MF_GRAYED);恢复代码:CMenu*   menu   =   this->GetSystemMenu(FALSE);...

View Article

Image may be NSFW.
Clik here to view.

MFC获取磁盘空间信息

示例代码:DWORD CCommonFun::GetDesignatedDiskFreeSpace(const CString &szPath){    DWORD dwTotalDiskSpace,dwFreeDiskSpace,dwUsedDiskSpace;        ULARGE_INTEGER uiFreeBytesAvailableToCaller;...

View Article

Image may be NSFW.
Clik here to view.

用shell写cgi --------- 一个解析cgi参数的SHELL脚本(转)

 测试工作中,经常会涉及到一些要验证服务器对某些cgi接口查询结果返回信息进行解析是否正确的情况。而提供cgi接口的通常又是另外的部门,测试的时候需要调试一些返回结果不方便。所以需要自己模拟虚假的cgi接口来达到同样的目的。       比如说,类似http://www.yousite.com/query.cgi?username=***&kind=***...

View Article


Image may be NSFW.
Clik here to view.

linux汇编之IA32数据格式及数据操作

IA32数据格式 类型                         Intel数据类型                         汇编代码后缀 Char                        字节                                      b(1字节) Short                       字...

View Article

Image may be NSFW.
Clik here to view.

科大邮箱自动转发

科大邮箱,设置了自动转发到126邮箱,但不能成功,转发到gmail是可以的。校友邮箱转发到126邮箱是可以的。打电话到网络中心,老师讲学校的邮件自动转发功能不太灵,可以使用pop转信。http://email.ustc.edu.cn/写了:SMTP(发信认证)/POP3/IMAP服务器:...

View Article

Image may be NSFW.
Clik here to view.

MFC Listcontrol 使用方法

原文出处:http://blog.csdn.net/bqw2008/article/details/2047489 Windows ListCtrl使用技巧1. ListCtrl 风格 LVS_ICON: 为每个item显示大图标LVS_SMALLICON: 为每个item显示小图标LVS_LIST: 显示一列带有小图标的itemLVS_REPORT: 显示item详细资料...

View Article


Image may be NSFW.
Clik here to view.

Reactor模式 (转)

Reactor这个词译成汉语还真没有什么合适的,很多地方叫反应器模式,但更多好像就直接叫reactor模式了,其实我觉着叫应答者模式更好理解一些。通过了解,这个模式更像一个侍卫,一直在等待你的召唤,或者叫召唤兽。 并发系统常使用reactor模式,代替常用的多线程的处理方式,节省系统的资源,提高系统的吞吐量。...

View Article


Image may be NSFW.
Clik here to view.

解决UnicodeEncodeError: 'ascii' codec can't encode characters in position 0-3问题

在文件的前两行加入: import os,sysreload(sys)sys.setdefaultencoding("utf-8")  SunRise_at 2013-01-17 13:45 发表评论

View Article

Image may be NSFW.
Clik here to view.

linux link

Linux Shell的通配符与正则表达式 http://blog.csdn.net/chen_dx/article/details/2463495魏尚堂 2013-01-17 14:01 发表评论

View Article

Image may be NSFW.
Clik here to view.

linux高级编程day12 笔记 (转)

     摘要: 一.多线程  1.了解多线程    解决多任务实现。    历史上Unix服务器不支持多线程    Unix/Linux上实现多线程有两种方式:     内核支持多线程   &nb...  阅读全文鑫龙 2013-01-17 14:30 发表评论

View Article

Image may be NSFW.
Clik here to view.

基于Hough 变换的直线检测(Matlab实现)

           输入图像:                              输出图像:源代码: (参考Matlab houghlines 例程)clearI  = imread('taj1small3.jpg');I = rgb2gray(I);%I = imrotate(I,33,'crop');% figure% imshow(rotI);figureimshow(I);BW =...

View Article


Image may be NSFW.
Clik here to view.

json的编码和解析

  JSON是JavaScript Object Notation的缩写,SJON是一种轻量级的数据交换格式。易于人阅读和编写。同时也易于机器解析和生成。 它基于JavaScript Programming Language, Standard ECMA-262 3rd Edition - December 1999的一个子集。    JSON建构于两种结构: “名称/值”对的集合(A...

View Article

Image may be NSFW.
Clik here to view.

Google Translate API

近期在做的一个任务,但是网上的资料甚少,经过了几番波折,终于弄好了。实现过程很简单,拿出来共享一下,免得大家像我一样找了半天。谷歌翻译升级到2.0后变为收费版本的,因此首先需要向谷歌申请一个key。付费标准是每100万个文本字符20美元(觉得小贵啦)。谷歌翻译的工作过程:1.谷歌翻译的请求网址:...

View Article


Image may be NSFW.
Clik here to view.

libevent学习资料 (转)

The libevent API provides a mechanism to execute a callback function when aspecific event occurs on a file descriptor or after a timeout has beenreached. Furthermore, libevent also support callbacks...

View Article

Image may be NSFW.
Clik here to view.

python的默认参数

刚在群里一个人问的问题,前两天正好看过,记录一下。 __author__ = 'chenyu'def f(i,L=[]):    L.append(i)    return Ldef f2(i,L=None):    if L  is None:       L = []    L.append(i)    return Lprint f(1)print f(2)print f(3)print...

View Article


Image may be NSFW.
Clik here to view.

QT笔记66:使用QTUiLoader动态载入控件

#include <QApplication>#include <QMessageBox>#include <QtUiTools/QtUiTools>#include <iostream>int main(int argc, char* argv[]){    QApplication app(argc, argv);    QUiLoader...

View Article

Image may be NSFW.
Clik here to view.

今天是母亲的生日

今天是阴历12月06日,是母亲的生日,非常想念母亲。小时候我病的时候,母亲总是背着我去医院看病。 我在外地上学,节假日回家母亲总是给我做我最喜欢的土豆饼,等等很多让我回味无穷的美好的回忆。每当想 念时,伴随着母亲生前没有好好孝顺。现在想,虽然上班重要,不过现在更觉得母亲的存在肯定比什么都重要。 真心想告诉有父母的朋友,父母是世界上最最最重要的人。让你选择父母和其他任何东西中选一样,应该毫不...

View Article

Image may be NSFW.
Clik here to view.

Open Cascade中的布尔操作

Open Cascade中的布尔操作 Modeling Algorithms Boolean Operations eryar@163.com 布尔操作(Boolean Operations)是通过两个形状(S1,S2)的组合来生成新的形状。布尔操作有如下几种类型: u 并集操作Fusion:Gets all the points in S1 or S2; u 交集操作Common:Gets all...

View Article
Browsing all 7881 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>