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

Image may be NSFW.
Clik here to view.

Java:static final 变量的初始化

public class Avatar {     public static final String NAME;     public static final String INFO = "avatar";     static {         NAME = "Biao"; // 可以从文件读取     }     public static void main(String[]...

View Article


Image may be NSFW.
Clik here to view.

iOS 解决NSString转换为NSURL时包含中文字符

NSString中如果包括中文字符,在转换为NSURL时得到的值为nil解决办法: NSString *urlString = [NSString stringWithFormat:@"http://api.openweathermap.org/data/2.5/weather?q=%@&units=imperial",cityName]; urlString = [urlString...

View Article


Image may be NSFW.
Clik here to view.

TCP/IP协议选项——TCP_KEEPALIVE

1、KEEPALIVE作用 KEEPALIVE机制,是TCP协议规定的TCP层(非应用层业务代码实现的)检测TCP本端到对方主机的TCP连接的连通性的行为。避免服务器在客户端出现各种不良状况时无法感知,而永远等在这条TCP连接上。 2、KEEPALIVE代码示例 该选项可以设置这个检测行为的细节,如下代码所示: [cpp] view plaincopyprint? int keepAlive =...

View Article

Image may be NSFW.
Clik here to view.

一个简单的Makefile

runsisi@hust.edu.cn http://www.cppblog.com/runsisi   前期将FreeBSD的TCP栈移到用户态的时候没有参考项目已有的Makefile,主要是项目的Makefile写的太复杂,看上去有点晕,而且前期也基本上不需要依赖已有Makefile定义的变量,因此单独弄了个Makefile,自我感觉良好:),以后一些小东西也可以继续用~...

View Article

Image may be NSFW.
Clik here to view.

How to Do Great Research

http://greatresearch.org/2013/08/14/managing-your-advisor/With the new academic term almost upon us, several of my students started to put together a list of practical advice for incoming...

View Article


Image may be NSFW.
Clik here to view.

路点自动生成

块,路点按坡度以及静态物件自动生成,主要思想是参考了火炬之光的作法,看起来效果还不错,载图留念:flipcode 2014-08-20 17:03 发表评论

View Article

Image may be NSFW.
Clik here to view.

[转贴]客户端架构设计的简单总结

我们知道,客户端是相对服务端而言的,客户端程序相对普通应用程序,主要是增加了网络通讯功能。在这个移动和云存储的年代,大部分终端应用程序都有网络通讯功能, 所以都可以称为客户端。常见的客户端如浏览器,IM客户端, 网络会议客户端,邮件客户端,微博和微信客户端等...通过观察,我们会发现所有的客户端基本是大同小异,都会包括一些相同的功能组件,...

View Article

Image may be NSFW.
Clik here to view.

发布一个招聘广告,有意的同学可以发简历

有意向的同学可以简历发简历给我 2八33一七四五七.qq.com 两年以上工作经验一定帮你成功ccsdu2009 2014-08-20 21:16 发表评论

View Article


Image may be NSFW.
Clik here to view.

cocos2dx3.2

新建项目 cocos new 编译so文件cocos compile -p android多彩人生 2014-08-20 21:45 发表评论

View Article


Image may be NSFW.
Clik here to view.

C++14 标准制定完成

http://www.cnbeta.com/articles/320875.htm竟然这么快。。runsisi 2014-08-21 00:34 发表评论

View Article

Image may be NSFW.
Clik here to view.

二手书便宜出售

@import url(http://www.cppblog.com/CuteSoft_Client/CuteEditor/Load.ashx?type=style&file=SyntaxHighlighter.css);@import url(/css/cuteeditor.css); 出售如下二手书:@import...

View Article

Image may be NSFW.
Clik here to view.

lua中的require机制

http://blog.chinaunix.net/uid-552961-id-2736410.htmllua中的require机制    为了方便代码管理,通常会把lua代码分成不同的模块,然后在通过require函数把它们加载进来。现在看看lua的require的处理流程。1、require机制相关的数据和函数...

View Article

Image may be NSFW.
Clik here to view.

wu

static int video_thread2(void *arg){    AVPacket pkt = { 0 };    VideoState *is = (VideoState *)arg;    AVFrame *pFrame = avcodec_alloc_frame();    int64_t pts_int = AV_NOPTS_VALUE, pos = -1;    double...

View Article


Image may be NSFW.
Clik here to view.

如何将Icon转成Bitmap

     摘要: 个最近工作中有个需求是将Icon转成带Alpha通道的Bitmap, 虽然网上有不少这方面的文章,但很多都是错的, 这里记录下,或许对后来人有用  阅读全文Richard Wei 2014-08-21 22:23 发表评论

View Article

Image may be NSFW.
Clik here to view.

IsoAlgo Split Point Issues

IsoAlgo Split Point Issues eryar@163.com   Abstract.  The impossibility to define the splitting point makes it impossible to generate the readable isometrics drawing in some cases. If the drawing is so...

View Article


Image may be NSFW.
Clik here to view.

如何抓取扬声器的声音

     摘要: 工作中有个需求是关于抓取扬声器的声音, 为什么会有这个需求? 试想我们在共享远程桌面时,如果能够把本地桌面应用程序的声音也一起发给对方, 用户体验该是多么棒。   阅读全文Richard Wei 2014-08-21 23:34 发表评论

View Article

Image may be NSFW.
Clik here to view.

lua require dofile loadfile区别

http://blog.163.com/hbu_lijian/blog/static/126129153201422902256778/1.dofile与loadfiledofile 当作Lua运行代码的chunk的一种原始的操作。dofile实际上是一个辅助的函数。真正完成功能的函数是loadfile;与dofile不同的是...

View Article


Image may be NSFW.
Clik here to view.

linux64位编译32位汇编指令不兼容

     摘要:   阅读全文pizzx 2014-08-22 10:01 发表评论

View Article

Image may be NSFW.
Clik here to view.

Exceptional C++ 读书笔记1

绝对不要对无效的迭代器执行解引用(dereference)操作用于不要将异常安全性放在事后考虑。异常安全性会影响到类的设计。它永远都不会“只是一个实现细节”。在传递对象参数时,选择const&方式而不是传值方式。对于程序运行中不会改变的值,应该预先计算并保存起来备用,而不是重复地创建对象,这是没有必要的。通常,为了保持一致性,应该使用前置递增来实现后置递增,否则,当其他用户在使用你的类时,可...

View Article

Image may be NSFW.
Clik here to view.

Exceptional C++ 读书笔记2

永远不要用#include包含不必要的头文件如果只需要流的前置声明,应该优先使用#include<iosfwd>只需要前置声明时,绝不要用#include包含相应的头文件。如果使用聚合关系就已经足够,就不要使用继承。要避免使用内联或者复杂的调整方法,除非通过性能分析证明这确实是必要的。正确使用名字空间。如果将一个类放入名字空间,那么同时要保证将这个类的所有辅助函数和运算符函数也放入相同的...

View Article
Browsing all 7881 articles
Browse latest View live


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