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

Image may be NSFW.
Clik here to view.

《电网视频监控系统及接口 第一部分:技术要求》

接口A协议规范:平台之间定义: A.1.1 系统上下线通知  POST /Request_Update_Status   <HTTP_XML EventType=”Request_Update_Status”> A.1.2 系统连接保活    POST /KeepAlive    <HTTP_XML EventType=”KeepAlive”> A.2 系统资源获取...

View Article


Image may be NSFW.
Clik here to view.

Qt图片预览控件

头文件: 1 class CImagePreviewerCtrl : public QWidget 2 { 3     Q_OBJECT 4  5 public: 6     CImagePreviewerCtrl(QWidget *parent = 0); 7     ~CImagePreviewerCtrl(); 8  9     void SetImageFile(const...

View Article


Image may be NSFW.
Clik here to view.

VTK6.0初始化

在使用VTK6.0时候,会遇到X::New()返回为null的情况,需要全局初始化一下: #define vtkRenderingCore_AUTOINIT 4(vtkInteractionStyle,vtkRenderingFreeType,vtkRenderingFreeTypeOpenGL,vtkRenderingOpenGL) #define...

View Article

Image may be NSFW.
Clik here to view.

可怜的小老鼠

#面试思考题#可怜的小老鼠:有11瓶酒,只有一瓶有毒。喝酒之后,三天会死,只有三天时间。请问至少需要多少只老鼠,可以找出9瓶没有毒的酒。关注微信公众账号“待字闺中”,了解和讨论参考分析。http://www.weibo.com/1915548291/A2QpWmhUH分析:直觉上应该是4只鼠可以找出那瓶有毒的。如果要找出9瓶没有毒的,肯定不大于4嘛。这个大家能想明白吗?有人想看分析就回复哦。:P最多...

View Article

Image may be NSFW.
Clik here to view.

基于Linux平台的高级IO扩展函数

     摘要:      由于read、readv、write和writev函数一次读或写有时并不能满足所要求的数据,因此需要多次调用直到要求的字节数或者出错。针对这4个系统调用,编写了对应的xxxn版本,实现如下 Code highlighting produced by Actipro CodeHighlighter (freeware)http:...  阅读全文春秋十二月...

View Article


Image may be NSFW.
Clik here to view.

Mac:Mac下安装PHP, MySql开发环境

最简单的两个选择: XAMPP, MAMP 都集成了 MySql + PhpMyAdmin + PHP 开发环境,建立开发环境简单(都只需要安装一个程序)。 如果单独的安装MySql,PhpMyAdmin,PHP开发环境,会麻烦很多。 XAMPP: 提供多平台版本: Mac, Windows,Linux, Solaris,但是几乎不更新了,相对MAMP来说易用性就差那么一点点。...

View Article

Image may be NSFW.
Clik here to view.

Qt:FontMetrics

在一个Rect的正中间绘制文本: rect的中点与文本的中点重合. int cx = rect.x + rect.width / 2; int fx = cx - fm.width(text); int cy = rect.y + rect.height / 2; int fy = cy + fm.xHeight / 2; @import...

View Article

Image may be NSFW.
Clik here to view.

EL : About ContentProvider

    本来EL的基本功能在周三已经完成了,打算开始准备EL所需要的数据进行实测了,但却出现个大麻烦,这两个晚上不得不进行大量的'重构'工作(实际就是因为前面偷懒,导致后面重写了)...    先说下大麻烦的来由 -- EL需要两个数据库,一个在应用目录下,叫做lac2数据库;另外一个在sdcard上,叫做el数据库;...

View Article


Image may be NSFW.
Clik here to view.

使用libao+mpeg123播放mp3的例子

直接上代码:#include <stdio.h>#include <ao/ao.h>#include "mpg123.h"int main(int argc, char *argv[]){       ao_initialize();            mpg123_handle *mpg123 ;    int iMpg123_error;...

View Article


Image may be NSFW.
Clik here to view.

curl 多线程

http://fool.is-programmer.com/2011/3/26/libcurl-signal-bug.25603.htmlhttp://blog.csdn.net/balderfan/article/details/7599554http://blog.chinaunix.net/uid-20692625-id-3203258.html多彩人生 2013-08-04 19:15 发表评论

View Article

Image may be NSFW.
Clik here to view.

Objective-C 读书笔记

  1. "new" to create an object if no arguments are needed for initialization.    e.g.   XYZObject *object = [XYZObject new];2. Literals offers a concise object-creation syntax.    NSString *someString...

View Article

Image may be NSFW.
Clik here to view.

jsoncpp简单示例

http://www.cnblogs.com/logicbaby/archive/2011/07/03/2096794.html1、 编译jsoncpp  从(http://jsoncpp.sourceforge.net/)下载源码包“jsoncpp-src-0.5.0.tar.gz”,解压后在其解压后目录中运行$ scons platform=linux-gcc   编译出来的库文件在其libs/...

View Article

Image may be NSFW.
Clik here to view.

gcc编译的exe程序不要引用

1. -static-libstdc++ for libstdc++-6.dll2. -static-libgcc for libgcc_s_dw2-1.dllccsdu2009 2013-08-05 21:10 发表评论

View Article


Image may be NSFW.
Clik here to view.

cocos2d-x 截图的方法

     摘要:   阅读全文merlinfang 2013-08-06 11:57 发表评论

View Article

Image may be NSFW.
Clik here to view.

判断手指按下

void BlockVar(const UINT8 *pImg, UINT32 *p_var, UINT32 *p_avr){    UINT8 i;    UINT8 j;    UINT8 *p;    UINT32 AverTemp=0;    UINT32 VarTemp=0;    p=(UINT8 *)pImg;    //block 32*32...

View Article


Image may be NSFW.
Clik here to view.

cocos2dx加快游戏速度

游戏的速度可以由导演来控制。float multi = 1.0f;CCDirector::sharedDirector()->getScheduler()->setTimeScale(multi);参数multi是倍率的意思,默认是1,倍率越高速度越快。如果需要提升一倍的速度,可以把multi设为2.0f。通过这样一个机制可以实现游戏内战斗倍数加速的功能。C小加 2013-08-06...

View Article

Image may be NSFW.
Clik here to view.

感谢cppblog陪我多年,我走了

cppblog是一个好平台,技术氛围浓烈,引擎、编译器、服务器后台的各种牛人此起彼伏。在这里的时候,我是On The Road,一直在学习。如今自立门户,只是一粒abc。但我还是要走的,走的时候,得在这里留个外链。从今以后,请你叫我ABC。LOGOS 2013-08-06 23:02 发表评论

View Article


Image may be NSFW.
Clik here to view.

Qt:绘制带高兴的按钮

@import url(http://www.cppblog.com/CuteSoft_Client/CuteEditor/Load.ashx?type=style&file=SyntaxHighlighter.css);@import url(/css/cuteeditor.css); void Widget::paintEvent(QPaintEvent *) {...

View Article

Image may be NSFW.
Clik here to view.

make makefile 学习

http://www.cnblogs.com/napoleon_liu/archive/2011/05/06/2039316.htmlhttp://www.iteye.com/topic/774919...

View Article

Image may be NSFW.
Clik here to view.

Java:URLConnection访问网页

参考:http://lamoop.diandian.com/post/2012-08-07/40032367973@import url(http://www.cppblog.com/CuteSoft_Client/CuteEditor/Load.ashx?type=style&file=SyntaxHighlighter.css);@import...

View Article
Browsing all 7882 articles
Browse latest View live


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