Others
lingedeng
海纳百川有容乃大,壁立千仞无欲则刚!
展开
-
QThread简单测试理解
#ifndef QTHREADTEST_H#define QTHREADTEST_H#include <QObject>#include <QThread>// method 1class Worker : public QObject{ Q_OBJECTpublic: explicit Worker(QObject *parent = 0);signals: void resultReady(const QString& re.原创 2021-06-24 17:58:58 · 153 阅读 · 0 评论 -
杂项1
1. windows git服务器安装工具准备: Git-2.26.2-64-bit.exe Copssh_4.1.0_Installer.exe1. 新建git系统用户,密码永不过期2. 正常安装Copssh和Git3. 打开Copssh的控制面板,选择User->Add,在弹出的对话框中选择上面建的系统用户,其它保持默认值4. 如果以后不需要免密码登陆的话,则基本环境搭建完成5. 通过git pull/push git@ip:/path/to/foo.git命令访问过程中出现原创 2021-06-10 10:37:59 · 507 阅读 · 0 评论 -
C++简单单元测试类
参考自LEVELDB中的单元测试类头文件(testharness.h):#ifndef TEST_HARNESS_H_#define TEST_HARNESS_H_#include <sstream>namespace simpleut { namespace test { //执行所有的单元测试 extern int RunAllTest(); c...原创 2019-03-11 15:55:56 · 1443 阅读 · 0 评论 -
MAC地址表、ARP缓存表、路由表及交换机、路由器基本原理
原文引用地址:http://blog.51cto.com/dengqi/1223132MAC地址表 说到MAC地址表,就不得不说一下交换机的工作原理了,因为交换机是根据MAC地址表转发数据帧的。在交换机中有一张记录着局域网主机MAC地址与交换机接口的对应关系的表,交换机就是根据这张表负责将数据帧传输到指定的主机上的。 交换机的工作原理 交换机在接收到数据帧以后,首先、会记录数据帧...转载 2018-03-01 15:32:40 · 26867 阅读 · 5 评论 -
SSH+EXPECT远程执行命令及本地保存结果
#!/usr/bin/expectif {$argc < 4} { #do something send_user "usage: $argv0 <remote_host> <remote_port> <remote_user> <remote_pwd>" exit}set timeout 15 se...原创 2018-03-01 15:05:46 · 15026 阅读 · 0 评论 -
Qt编码相关
//海军GBK编码 unsigned char str[5] = {0xBA, 0xA3, 0xBE, 0xFC}; QByteArray ba((char *)str, 4); QTextCodec *codec = QTextCodec::codecForName("GBK"); QString string = codec->toUnicode(ba);原创 2016-12-20 14:04:54 · 363 阅读 · 0 评论 -
Git-0.99 README 第二部分 工作流
The Workflow------------Generally, all "git" operations work on the index file. Some operationswork *purely* on the index file (showing the current state of theindex), but most operations move翻译 2015-12-08 11:29:31 · 773 阅读 · 0 评论 -
Git-0.99 README 第一部分 基本对象
There are two object abstractions: the "object database", and the"current directory cache" aka "index".The Object Database~~~~~~~~~~~~~~~~~~~The object database is literally just a content翻译 2015-12-07 17:26:20 · 762 阅读 · 0 评论 -
qrencode生成QRCode及使用ImageMagick和zbar从QRCode读取内容
#include #include #include #include #include #include #include using namespace std;using namespace zbar;//#define QRCODE_TEXT "http://www.ultramundum.org/index.htm"; //原创 2016-01-18 18:09:30 · 3166 阅读 · 0 评论 -
Windows数据类型
TermDescriptionATOMAtom. For more information, see Atoms. This type is declared in WinDef.h as follows:typedef WORD ATOM;BOOLBoolean variable (should be TRUE转载 2016-01-17 11:11:18 · 935 阅读 · 0 评论 -
windows编码转换
char* unicodeToUtf8(const TCHAR *zWideFilename){ int nByte; char *zFilename; nByte = WideCharToMultiByte(CP_UTF8, 0, zWideFilename, -1, 0, 0, 0, 0); zFilename = (char *)malloc(nByte); if(zFi原创 2015-09-28 09:40:16 · 764 阅读 · 1 评论 -
方根法计算正反矩阵特征向量及最大特征根
原始正反矩阵(3X3)n=3:1, 0.20, 0.335, 1, 33, 0.33, 11. 计算判断矩阵每一行元素的乘积0.66150.992. 计算每一行的n次方根0.4042.4660.996sum = 3.8663. 归一化处理:即获得了每个指标的权重(特征向量)向量w=[W1', W2',...,Wn']原创 2015-07-01 09:46:17 · 32597 阅读 · 4 评论 -
乐视(letv)网tkey破解
乐视网tkey算法频繁变动,如果才c原创 2014-07-09 16:52:13 · 14387 阅读 · 30 评论 -
Java调用C++
Java调用C/C++大概有这样几个步骤:编写带有native方法的Java类, 使用javac工具编译Java类使用javah来生成与native方法对应的头文件实现相应的头文件, 并编译为动态链接库(windows下是.dll, linux下是.so)编写带有native方法的Java类public class Sample { public nativ转载 2014-01-08 09:54:32 · 810 阅读 · 0 评论 -
RFC2616 HTTP/1.1 标志转换及通用语法
name = definition The name of a rule is simply the name itself (without any enclosing "") and is separated from its definition by the equal "=" character. White space is only sign转载 2012-06-21 12:11:46 · 1349 阅读 · 0 评论 -
字符编码
乱码一个网页或一篇文档出现乱码,对于我们来说应该不陌生。关于乱码的理解对我来说就是无法阅读或理解其正确的意思,来看看乱码吧!一个简单的HTML文件:Character Set我是谁在你熟悉的文本编辑器中输入上述代码并以“unicode(UTF-8原创 2011-09-17 18:23:49 · 1590 阅读 · 0 评论