- 博客(74)
- 收藏
- 关注
原创 protobuf 编译问题
copy from http://blog.chinaunix.net/uid-20682147-id-4957588.html.ibtoolize: AC_CONFIG_MACRO_DIR([./aclocal]) conflicts with ACLOCAL_AMFLAGS=-I ./aclocal执行libtoolize遇到上面提示的错误时,可能是因为configur
2017-01-16 11:06:44
1335
原创 vim tips
1. 已经打开的vim 中,diff 新的文件:diffsplit file 简写(diffs) 默认为 hor 模式 : vert diffs file --》 垂直模式 2. dp 和 do 后,重新diff一下diffupdate (diffu) 3.
2016-03-28 10:54:42
455
原创 查看线程 cpu 占用 linux
ps H -eo user,pid,ppid,tid,time,%cpu,cmd --sort=%cpu | grep test_front
2014-11-21 11:08:36
563
原创 mysql tips
另一篇文章:Mysql ERROR 1045 (28000): Access denied for user 'root'@'localhost'问题的解决这种问题需要强行重新修改密码,方法如下:/etc/init.d/mysql stop (service mysqld stop )/usr/bin/mysqld_safe --skip-grant-tables
2014-07-07 14:39:01
570
原创 awk 常量
1. NR number of record ;2. NF number of Field;3. FNR number of record in 3. FILENAME 文件名称4. ARGIND 参数顺序号5. ARGV[1] 第一个参数值其他技巧以后再加
2014-04-02 09:40:26
1467
原创 Makefile 相关
$@: 规则中的目标名$!$^: 规则中所有的依赖项目。$?: 规则中时间新于目标的依赖项目常用参数:-f : 指定makefile的名称,这样,就可以不用makefile做为规则文件的名字了。-i : 使make程序忽略运行时的错误,继续运行。-C: 指定目录运行make ; make -C dir-j:
2014-03-11 09:10:10
992
原创 记录一下 User Space 传递参数到 Kernel Space 的所有方法
1. virtual char dev driver2. system call interface3. netlink4. seq_file5. procfs6. sysfs7.debugfs8.relayfs9. init param10. module param
2013-06-12 10:38:16
1491
原创 lua 编译 C模块
两个问题: 1. 动态连接库 编译时, 调用静态连接库的东西 ,然后链接 静态连接库 OK 2. lua 编译 C模块是,出现 x64 X32, fPIC的问题时, 需要把 lua lib(.a)重新编译一遍(fPIC)的方式。fPIC 可以用于 静态连接库 和动态连接库的编译。原理:因为编译 lua 的C模块时,需要编译成 so,而 c模
2012-12-13 15:47:04
2246
原创 linux 下的socket 调试工具 netcat 使用
download link: http://netcat.sourceforge.net/该工具有三种模式:1. client 模式 netcat [options] remote port 2. server模式 netcat -l -p port [options] 3. tunel 模式 ....... not us
2012-11-22 10:21:46
13321
原创 Makefile --- updated the Static & Dynamic Lib
APP_PATH= .INC_PATH= $(APP_PATH) \ $(HOME)/cl_tmp/tools/cmockery-0.1.2/src/google/ \ #$(HOME)/dfs/ThirdLibs/thrift-0.8.0/include LIB_PATH
2012-11-20 15:21:59
725
原创 图像处理
图像灰度值的计算http://blog.youkuaiyun.com/godenlove007/article/details/7604164图像的灰度化原理和实现http://blog.youkuaiyun.com/chenamo9651/article/details/88669VC++ 灰度位图处理http://www.cxy.me/doc/3167.htm
2012-10-11 16:57:00
487
原创 Shell Parsing Process
1. Redirection Parse>, >>, 2>, | , 2. Command and variable substitution$var, $(cmd), ${var}3. Wildcard expansion (file name wildcard) *, ?, [] 4. Command Executione
2012-09-26 16:03:22
614
原创 D3D Vetex Buffer 多流 渲染
D3D中多流的用法http://dev.gameres.com/Program/Visual/3D/multistream.htmSetStreamSource函数与数据流的使用http://www.zxbc.cn/html/20071116/29530_2.htmlD3DVERTEXELEMENT9的详细解释http://blog.youkuaiyun.com/gam
2012-09-24 16:12:51
913
原创 悬浮窗体
悬浮窗制作 http://blog.163.com/toplcx@yeah/blog/static/92667383201021932360/D3DX 全屏http://blog.youkuaiyun.com/huangxiansheng1980/article/details/5416441win Stylehttp://msdn.microsoft.com/e
2012-09-21 09:40:18
581
原创 CMake
http://sewm.pku.edu.cn/src/paradise/reference/CMake%20Practice.pdf simple example: source全部在当前目录project(hello)aux_source_directory(. SRC_FILE)message(STATUS "This is BINARY dir" ${PR
2012-09-04 10:09:22
693
原创 BrowseImageFiles
//FileViewDlg.cpp<!--p, li {white-space:pre-wrap}-->// FileViewDlg.cpp : 实现文件//#include "stdafx.h"#include "FileView.h"#include "FileViewDlg.h"#include "afxdialogex.h"#includ
2012-08-30 11:18:57
770
原创 QueryPerformanceFrequency Window下的高精度计时器
<!--p, li {white-space:pre-wrap}-->#include "stdafx.h"#include #include #include "AcquireExecutionTime.h"int _tmain(int argc, _TCHAR* argv[]){ AcquireExecutionTime apt; if(
2012-08-30 10:50:10
1097
原创 DirectX 9 get the Adapter info
1. In DirectX 9, the adpater means One Display Card & One Moniter, the concept is difference with DirectX 10 's DXGI code: #include LPDIRECT3D9 g_pD3D =
2012-08-20 15:28:42
718
原创 Direct3D Study
1. Direct3D 原理和helloworldhttp://blog.youkuaiyun.com/tinya0913/article/details/6068859 ---50.18.125.73 -- pem2. Direct3D 画张图http://www.cppblog.com/CK985/archive/2011/06/04/92747.html3.
2012-08-14 13:09:40
796
原创 lfs----------
#include "LfsClient.h"#include #include #include #include #include #include "Log.h"#include "LfsNetClient.h"namespace lfs{LfsClient::LfsClient ():m_imp(new LfsNetClient){} Lf
2012-07-06 17:31:23
970
原创 Django 知识点
1. class DateTimeField([auto_now=False, auto_now_add=False, **options]) auto_now 每次保存该对象时,使用当前时间修改该字段 modify auto_now_add 第一次保存该对象时,使用当前时间修改该字段 create2. Field default value:defaul
2012-07-02 13:51:38
1098
原创 Lfs ---> Makefile
<!--p, li {white-space:pre-wrap}-->APP_PATH= .INC_PATH= $(APP_PATH) \ $(HOME)/dfs/ThirdLibs/gtest1.6/include \ $(HOME)/dfs/ThirdLibs/thrift-0.8.0/include \ #$(OPENSOURCE_D
2012-06-29 13:22:24
534
原创 Lfs ---> main.cpp
#include #include "LfsClient.h"#include "Log.h"#include #include #include #include int tmain(){ lfs::LfsClient lfs; int ret = lfs.Initialize(); if(ret != 0) { LOG_ERROR("Ini
2012-06-29 13:21:51
392
原创 LFS thrift IDL
namespace cpp lfsnamespace java lfsnamespace perl lfsstruct FileInfo { 1: i64 ID 2: i32 Size 3: i32 UsedSize 4: i32 ModifyTime 5: i32 CreateTime}struct ReadBuf{ 1:
2012-06-29 13:19:13
466
原创 Lfs Common --> Log
#ifndef LOG_H_#define LOG_H_#define MODULE 0#define LOG_FATAL(fmt,...) lfs::common::Log::Out(MODULE, 0, __FILE__, __FUNCTION__, __LINE__, fmt, ##__VA_ARGS__)#define LOG_ERROR(fmt,...)
2012-06-29 13:12:40
437
原创 Lfs ---> LfsClientLocalImp
#ifndef LFS_CLIENT_LOCAL_IMP_H#define LFS_CLIENT_LOCAL_IMPH#include "CommonDefine.h"namespace lfs {class LfsClientLocalImp{public: int Initialize(const char* nsAddr = NULL); int Close
2012-06-29 13:11:39
450
原创 LFS --> LfsClient
#ifndef LFS_CLIENT_H#define LFS_CLIENT_H#include "CommonDefine.h"namespace lfs {class LfsClientLocalImp;class LfsClient{public: LfsClient(); ~LfsClient(); int Initialize(const cha
2012-06-29 13:10:45
497
原创 LFS ----> CommonDefine.h
#ifndef COMMON_DEFINE_H#define COMMON_DEFINE_H#include #include typedef unsigned long long uint64_t;typedef unsigned int uint32_t;//typedef unsigned short uint16_t;//typedef uns
2012-06-29 13:09:44
684
原创 db2 连接远程server
与Oracle类似, 先将remoteDBServer Mapping 到本地,给个名字,然后连接1. 创建远程Server 在本地的一个别名: db2 catalog tcpip node localDBName remote RemoteServerDB 500002. 然后设置 远程db的default login 数据库 db2 catalog db
2012-05-29 11:18:20
751
原创 can not connect to X Server 0.0 Error
碰到 can not connect to X Server 1001.0 之类的错误运行 xhost +local:username然后再 运行就好了
2012-04-09 13:37:15
4007
原创 CouchDB Ubuntu Linux Server 安装
0. 环境:Ubuntu apt-get install Erlang 安装1. 安装 unixODBC 和 unixODBC-dev 包sudo apt-get install unixODBC unixODBC-dev 注意:2012-3-13止, 名字就叫做 unixODBC-dev,我是试了网上列出的很多名字都不行
2012-03-13 10:33:28
1412
原创 IniFile Read Write
<!--p, li {white-space:pre-wrap}-->#include #include class IniFile{public: explicit IniFile(const char * path):m_path(path){} ~IniFile(){}; QString GetPath() const {return
2012-02-28 16:32:52
651
原创 boos::asio- based SuperCom
NameSpace.h#ifndef NAMESPACE_H_#define NAMESPACE_H_#define NS_SUPERCOM SuperCom#define NS_SUPERCOM_START namespace NS_SUPERCOM {#define NS_SUPERCOM_END }#define USE_NS_SUP
2012-01-31 15:42:52
526
原创 boost serial -- database design
DataTable:ComBus BUSID (int, autoincrease) Name char(10) (COM1, COM2,....COM9) BaudRate int (9600,115200,,,,,,)
2012-01-31 14:38:07
1301
原创 boost asio serial port
http://hi.baidu.com/jrckkyy/blog/item/7f3067395d8245f93b87ce15.html// SuperCom.cpp: 定义控制台应用程序的入口点。//#include "stdafx.h"#include #include #include #include //block tim
2012-01-30 15:05:27
2263
原创 添加 第三方库的源代码 到 Visual Assist X
添加 第三方库的源代码 到 Visual Assist XVisual Assist X -> Visual Assist X Options -> Projects -> C/C++platform :选择 customershow directories for: 选择other include files增加一个路径指向第三方库,例如 : D:\boost_1_46_1\b
2012-01-30 14:51:32
3321
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人