- 博客(110)
- 资源 (2)
- 收藏
- 关注
原创 利用反向 SSH:服务器访问本地电脑: 不同局域网之间的相互访问
条件:已经拥有一台有公网IP的服务器: user@xx.yy.zz.ww在局域网A的计算机A1(你想访问的计算机,假设你的用户名为: lsl): ssh -R 2210:localhost:22 user@xx.yy.zz.ww在局域网B的计算机B1(你想访问的计算机,假设你的用户名为: lsl): 登录服务器: ssh user@xx.yy.zz.ww 在服务器上运行: ssh -R 2210:localhost:22 user@xx.yy.zz.ww
2016-10-08 11:39:50
3530
原创 cassandra batch的注意事项
However, a lot of people are used to databases where explicit batching is a performance improvement. If you did this in Cassandra you're very likely to see the performance reduce. You'd end up with so
2016-10-05 01:25:26
2153
原创 influxdb 学习笔记(1)—— 数据结构
influxdb 学习笔记(1)—— 数据结构influxdb 由time, fields, tag构成,field不被索引,tag被索引,所以需要频繁查询的应放在tag中,field最少要有一个字段,tag可选
2016-10-04 22:51:29
3519
原创 关于template 的23个问题
发现新大陆,以前慢慢才知道的东西,原来有个集中营:看看updated, 处理方式是这么的好35.1What's the idea behind templates?35.2What's the syntax / semantics for a "class template"?35.3What's the syntax / s
2014-10-26 11:39:15
793
原创 Policy-based design设计模式
书在4年前看过,今天重温一下:一直认为这是最好的设计模式,大牛Andrei Alexandrescu 专门写了书,可见他的重要性http://en.wikipedia.org/wiki/Policy-based_designtemplate <class T>class Talkative { T const & t;public: Talkative(T const & obj) : t(obj) { } void talk() const { t.talk(); }};
2014-10-26 11:33:15
1721
原创 设计模式个人备忘(享元模式,strategy, templete strategy)
设计模式C++实现(9)——享元模式常见设计模式的解析和实现(C++)之十六-Strategy模式http://sourcemaking.com/design_patterns/strategy/cpp/1http://www.vincehuston.org/dp/strategy.htmltemplateclass Stat {public: void
2014-10-26 11:18:39
782
转载 (地基工)std::string::find() 和 std::string::npos
(地基工)std::string::find() 和 std::string::nposint idx = str.find("abc");if (idx == string::npos)...上述代码中,idx的类型被定义为int,这是错误的,即使定义为 unsigned int 也是错的,它必须定义为 string::size_type。npos 是这样定义的:
2014-10-23 22:41:27
959
原创 C++摘要——什么时候使用std::cout,什么时候用std::cerr
What is the difference between cout, cerr, clog of iostream header in c++? When to use which one?stdout and stderr are different streams, even though they both refer to console output by defau
2014-10-23 12:49:45
2671
原创 Opencv 学习资料集合(更新中。。。)
基础学习笔记之opencv(24):imwrite函数的使用 tornadomeet 2012-12-26 16:36 阅读:13258 评论:9 基础学习笔记之opencv(23):OpenCV坐标体系的初步认识 tornadomeet 2012-12-12 00:25 阅读:3803 评论:3 基础学习笔记之opencv(22):learni
2014-10-06 15:19:02
1016
原创 C++库研究笔记--用__attribute__((deprecated)) 管理过时代码
用__attribute__((deprecated)) 管理过时代码,同时保留兼容的接口Linux下:#define DEPR_AFTER __attribute__((deprecated))#define DEPR_BEFOR class DEPR_BEFOR AAA{}DEPR_AFTER;int main(int argc, char** argv){
2014-10-06 14:30:14
4408
原创 Opencv笔记(1) 数据结构的命名规则(CvMat,...)
网上查了很多,发现查资料不如查源码以Cv为开头的类,都是不含有具体数据的(仅仅存储指针)CvMattypedef struct CvMat{ int type; int step; /* for internal use only */ int* refcount; int hdr_refcount; union {
2014-10-06 14:07:15
1624
原创 char与unsigned char 区别
char 与 unsigned char的本质区别http://bbs.youkuaiyun.com/topics/270080484同一个内存内容:10010000 你用char* 解释是-112 你用unsigned char* 解释是144 还是同样这个内存内容赋给整型值,用unsigned char 类型还是会得到144,用c
2014-10-01 05:18:20
1276
转载 奇異值分解 (SVD)
奇異值分解 (SVD)Posted on09/01/2009 byccjou本文的閱讀等級:中級奇異值分解 (singular value decomposition,以下簡稱 SVD) 被譽為矩陣分解的「瑞士刀」和「勞斯萊斯」[1],前者說明它的用途非常廣泛,後者意味它是值得珍藏的精品。在“線性代數基本定理 (四)”一文,我們介紹了 SVD 的推導,並於矩陣的
2014-09-28 21:37:09
1012
原创 QML 文本无法显示问题
/*property string operation: buttonText.text*/ property alias operation: buttonText.textimport QtQuick 1.0BorderImage{ id: button property string color: "" /*pro
2014-09-21 02:48:31
1687
原创 mpi error: Permission denied (publickey,gssapi-keyex,gssapi-with-mic,password) 解决方法
这个问题一直没解决,弄了一个小时,直接解决方法是,
2014-09-20 19:01:33
7826
转载 多维数组怎样快速索引
Table of ContentsHow to create a multi-dimensional arrayHow to loop through a multi-dimensional arrayMethod 1: Nested loops with multiple arraysMethod 2: Nested loops with linear arr
2014-08-03 02:48:32
839
原创 day60_subproblem240: rtm_mpi_demo
第60天(6.28) 子问题240: RTM 初步实现 20:40~23:59
2014-06-28 20:41:28
642
原创 static 中的 C++使用权与生存期
#include int main(){ using namespace std; {int n;n=5;} cout<<n; system("pause"); return 0;}
2014-06-19 10:58:31
623
翻译 Makefile and Paul's Rules of Makefiles
Defining and Redefining Pattern Rules
2014-06-11 11:08:02
593
原创 error: for statement expected before ‘{’ token
https://computing.llnl.gov/tutorials/openMP/samples/C/omp_bug1fix.c
2014-06-01 10:58:45
4834
原创 [beiwang]被忘记的vim命令
方法一:使用 Ctrl-z 以及 fg 这两个命令组合。 这一解决方法主要利用了 Linux/Unix 的作业机制。具体原理是:Ctrl-z 命令将当前的 Vi/Vim 进程放到后台执行,之后 shell 环境即可为你所用;fg 命令则将位于后台的 Vi/Vim 进程放到前台执行,这样我们就再次进入 Vi/Vim 操作界面并恢复到原先的编辑状态。方法二:使用行命令 :sh。
2014-05-29 21:44:41
699
原创 SSH: Agent Admitted Failure To Sign Using The Key Error And Solution
SSH: Agent Admitted Failure To Sign Using The Key Error And SolutionTo fix this problem you need logout of your Unix / Linux / OS X / BSD desktop session and log back in again to force the age
2014-05-16 18:46:17
721
翻译 Flood fill 算法
http://en.wikipedia.org/wiki/Flood_fill#Stack-based_recursive_implementation_.28Four-way.29
2014-05-01 18:37:38
782
翻译 on std::numeric_limits<float>=1.192e-7
Assuming 64-bit IEEE double, there is a 52-bit mantissa and 11-bit exponent. Look at the following numbers:1.0000 00000000 00000000 00000000 00000000 00000000 00000000 × 2^0 = 1The smallest repr
2014-04-10 11:19:50
932
原创 Eikonal approximation Kichhoff
Geometric optics)1 Informal description2 Relation to the WKB approximation3 Formal description1 Derivation of Kirchhoff's diffraction formula1.1 Point source1.1.1
2014-03-19 16:23:03
567
原创 用C++ 模板做代码设计的三类方法及代码——基于策略Policy-based design
列出了3个方法,还有很多衍生版本,总结如下:通过继承,与static 有同样的使用接口继承:对代码改动最小:using ..., 适用于对代码已经写好,但用于追加功能,修改功能的时候static: 代码改动较继承大,需要在每个修改的地方都加上类名,适用于:代码设计阶段。优点是代码清晰明了(相对其它,最清晰)指针构造:功能最完善,适用于极其复杂的功能设计。扩展性强。缺点是,代码改动大,只能在代码设计阶段使用。
2014-03-17 13:36:19
2166
原创 关于何时使用cudaDeviceSynchronize
When to call cudaDeviceSynchronizewhy do we need cudaDeviceSynchronize(); in kernels with device-printf?Although CUDA kernel launches are asynchronous, all GPU-related tasks placed in on
2014-02-25 11:29:42
9991
原创 cudaFuncGetAttributes 模板template
cudaFuncGetAttributes return unexpected resultHow to pass the address of a template kernel function to a CUDA function?Directly casting from pointer to a template function?cudaFunc
2014-02-25 10:36:21
1104
原创 Qt MouseEvent
//! [10]void GLWidget::mouseMoveEvent(QMouseEvent *event){ int dx = event->x() - lastPos.x(); int dy = event->y() - lastPos.y(); if (event->buttons() & Qt::LeftButton) { setXRot
2014-02-16 20:20:19
1133
原创 opengl 光照资料
OpenGL - Lighting (光照)Independently Moving the LightNow suppose you want to rotate or translate the light position so that the light moves relative to a stationary object. One way to do this is
2014-02-16 20:05:49
810
原创 Opengl+Qt 可视化文字显示模糊问题
结果如下,有重影:debug原因:以下代码调用两次,注释掉一次即可(有效的原因不明,待高手指教)#if 1376 glClearColor(settings.backgroundColor.r, settings.backgroundColor.g, 377 settings.backgroundColor.b, settings.backg
2014-02-12 13:51:53
3495
语音识别 原理 算法 设计
2011-08-10
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人