- 博客(163)
- 资源 (31)
- 收藏
- 关注
原创 [置顶]苹果刷机相关开源代码(如iRecovery等)收集汇总(不断更新中...)
下面截图是在下面开源代码下使用VS2015修改部分代码后适配而成,可以在Windows平台上运行, 下载连接: http://pan.baidu.com/s/1i4zKGx3。打开调试开关:================================================================================================A
2016-04-28 16:17:56
2098
1
原创 VS2013配置WTL91_5321_Final
网上关于WTL的文章,尤其是中文的文章不多,根据收集的资料整理出了VS2013安装WTL的方法。1、下载。文件很小的,地址:http://sourceforge.net/projects/wtl/files/latest/download2、解压安装包。找到“VS安装目录\VC\VCWizards\AppWiz”这个目录,如我电脑上就是“Microsoft Visual Studi
2016-04-28 16:17:51
1018
原创 寻找二叉树两个节点的最低公共祖先
从root开始遍历,如果n1和n2中的任一个和root匹配,那么root就是LCA。 如果都不匹配,则分别递归左、右子树,如果有一个 key(n1或n2)出现在左子树,并且另一个key(n1或n2)出现在右子树,则root就是LCA. 如果两个key都出现在左子树,则说明LCA在左子树中,否则在右子树。/* 只用一次遍历解决LCA */#include using n
2016-04-28 16:17:47
733
原创 【转】更简单的非递归遍历二叉树的方法
解决二叉树的很多问题的方案都是基于对二叉树的遍历。遍历二叉树的前序,中序,后序三大方法算是计算机科班学生必写代码了。其递归遍历是人人都能信手拈来,可是在手生时写出非递归遍历恐非易事。正因为并非易事,所以网上出现无数的介绍二叉树非递归遍历方法的文章。可是大家需要的真是那些非递归遍历代码和讲述吗?代码早在学数据结构时就看懂了,理解了,可为什么我们一而再再而三地忘记非递归遍历方法,却始终记住了递归遍历方
2016-04-28 16:17:42
1272
原创 [LeetCode] Longest Substring Without Repeating Characters
#include "List.h"#include string>#include using namespace std;#define max(a, b) (a) > (b) ? (a) : (b)// LeetCode, Longest Substring Without Repeating Charactersclass Solution {public:
2016-04-28 16:17:38
409
原创 [LeetCode] Two sum
// TwoNum.cpp : Defines the entry point for the console application.//#include "stdafx.h"#include #include using namespace std;//Definition for singly-linked list.struct ListNode {
2016-04-28 16:17:35
417
原创 Create a Listlink
#ifndef List_h__#define List_h__#include struct ListNode{ int value; ListNode* pNext; ListNode(int n) :value(n), pNext(nullptr){}};class ListSolution{public:
2016-04-28 16:17:30
422
原创 【leetcode】 Remove Duplicates from Sorted List
Given a sorted linked list, delete all duplicates such that each element appear only once.For example,Given 1->1->2, return 1->2.Given 1->1->2->3->3, return 1->2->3.给出一个已排序链表,删除所有重复的元素使每一个节点值只出现一次
2016-04-28 16:17:25
336
原创 Windows上x86程序正常但x64程序崩溃问题
先看下面代码:#include #include #include class Test{public: Test(int i) :a(i) { } ~Test() { }public: void Print() { printf("a=%
2016-04-28 16:17:20
1764
1
原创 Microsoft source-code annotation language (SAL) 相关
More info see: https://msdn.microsoft.com/en-us/library/hh916383.aspxSimply stated, SAL is an inexpensive way to let the compiler check your code for you.The Microsoft source-code annotation lan
2016-04-28 16:17:16
890
原创 Visual Studio 2013 编译CEF步骤
If you'd like to build the Chromium Embedded Framework (a wrapper for Chromium, for creating browser-based applications) using Visual Studio 2013, you can do so by following the below steps.1. Get Vis
2016-04-28 16:17:11
2150
原创 C++中调用Python脚本
C++中调用Python脚本的意义就不讲了,至少你可以把它当成文本形式的动态链接库, 需要的时候还可以改一改,只要不改变接口, C++的程序一旦编译好了,再改就没那么方便了 先看Python的代码 代码:#test function def add(a,b): print "in python function add" print "a
2016-04-28 16:17:07
862
原创 MFCButton Memory leak(内存泄露问题)
http://m.blog.youkuaiyun.com/blog/haoekin/88512191.无法显示右边箭头的问题无论怎么折腾都没显示不出来,微软给的示例又能显示,度娘和谷歌也都不知道,经过不断地探索总算找到解决办法了:在rc2文件中加上下面的内容即可#ifndef _AFXDLL#include "afxribbon.rc" // Ribbon and control bar
2016-04-28 16:17:02
1286
1
原创 快速排序
#include "stdafx.h"void PrintFunc(int a[], int n){ for (int i = 0; i ) { printf("%d ", a[i]); } printf("\n");}//快速排序int QSort(int a[], int n){ int
2016-04-28 16:16:57
317
原创 插入排序
#include "stdafx.h"void PrintFunc(int a[], int n){ for (int i = 0; i ) { printf("%d ", a[i]); } printf("\n");}//插入排序int InsertSort(int a[], int n){
2016-04-28 16:16:55
354
原创 树莓派B+上手小记--使用HDMI线连接显示器
入手还算比较顺利,一开始使用网上下的别人精简的OS,发现ACT及PWR灯一直亮着,上网查说用HDMI连接显示器需要修改配置文件config.txt,但修改后情况依旧。如果还是用官方的系统试试吧,上网搜到最近2015年的(感觉应该不是最新,先试试,不行再刷也就分分钟的事,谁叫我们这么爱折腾呢):http://pan.baidu.com/s/1dD79LiL, 刷SD卡工具:http://pan.
2016-04-28 16:16:48
7260
原创 boost compile
pushd E:\boost\boost_1_59_0b2 stage --toolset=msvc-12.0 --without-python --stagedir="E:\boost\boost_1_59_0\stage" --build-type=completepopd
2016-04-28 16:16:43
486
原创 C++ 牛人博客(不断更新中...)
http://www.zhangjiee.com/新浪微博@独酌逸醉.Github.GitCafe.stackoverflow.Quorahttp://cpp1x.org/刘未鹏 | MIND HACKShttp://www.drdobbs.com/cpp/其它转自别人:http://blog.youkuaiyun.com/pongba 刘
2016-04-28 16:16:39
1365
原创 c++ 实现百度自动搜索
void CAttendanceRobotDlg::DocumentCompleteExplorer4(LPDISPATCH pDisp, VARIANT* URL){ // TODO: Add your message handler code here HRESULT hr; LPUNKNOWN lpUnknown; LPUNKNOWN lpUn
2016-04-28 16:16:33
1621
原创 新写的c++日志库:log4K
网是开源的c/c++日志库也不少,但用起来总觉得不方便,于是动手写了一个C++日志框架Log4K。测试代码:#include "log4k.h"#pragma comment(lib, "log4k.lib")static int g_Cnt = 0;void LogTestThread1(LPVOID lpPara){ DEBUG_FUNCTION(
2016-04-28 16:16:28
898
原创 VC编译错误:一个或多个多重定义的符号
1>uafxcw.lib(afxmem.obj) : error LNK2005: "void * __cdecl operator new(unsigned int)" (??2@YAPAXI@Z) 已经在 LIBCMT.lib(new.obj) 中定义1>uafxcw.lib(afxmem.obj) : error LNK2005: "void __cdecl operator delete(
2016-04-28 16:16:23
1048
原创 值得推荐的C/C++框架和库(转)
值得学习的C语言开源项目C++ 资源大全值得学习的C语言开源项目1.WebbenchWebbench是一个在linux下使用的非常简单的网站压测工具。它使用fork()模拟多个客户端同时访问我们设定的URL,测试网站在压力下工作的性能,最多可以模拟3万个并发连接去测试网站的负载能力。Webbench使用C语言编写, 代码实在太简洁,源码加起来不到600行。下载链接:http
2016-04-28 16:16:19
1361
原创 CThreadPool
1 class CThreadPool 2 { 3 public: 4 5 template 6 static void QueueUserWorkItem(void (T::*function)(void), 7 T *object, ULONG flags = WT_EXECUTELONGFUNCTION) 8
2016-04-28 16:16:14
798
原创 10 Code Coverage Tools for C & C++
Code coverage is a measure used in software testing that describes the degree to which the source code of a program has been tested. It a form of white box testing as it is a form of testing that insp
2016-04-28 16:16:09
745
原创 gcov源码,供学习使用。
摘自http://www.opensource.apple.com/source/gcc/gcc-5484/gcc/gcov.c 1 /* Gcov.c: prepend line execution counts and branch probabilities to a 2 source file. 3 Copyright (C) 1990, 199
2016-04-28 16:16:05
1477
原创 c++ string 转GUID及反转
#include "stdafx.h"#include string>#include using namespace std;#define CONVERT_STR_2_GUID(cstr, stGuid) do\{\ swscanf_s((const wchar_t*)cstr, L"{%8x-%4x-%4x-%2x%2x-%2x%2x%2x%2x%2x%
2016-04-28 16:16:00
2220
原创 Boost C++: 数据结构---tuple
1 #include 2 #include 3 #include 4 #include 5 #include string> 6 7 void TestTuple1() 8 { 9 typedef boost::tuplestring, std::string> person;10 person p("kevin", "25");1
2016-04-28 16:15:55
540
原创 Boost C++: 网络编程1
1 #include 2 #include 3 #include 4 #include 5 #include 6 #include foreach.hpp> 7 #include 8 #include 9 #include 10 #include 11 #include 12 #include 13 #inclu
2016-04-28 16:15:53
336
原创 C++著名程序库的比较和学习经验 (转)
转自:http://www.open-open.com/lib/view/open1328670468108.html内容目录:1、C++各大有名库的介绍——C++标准库2、C++各大有名库的介绍——准标准库Boost3、C++各大有名库的介绍——GUI4、C++各大有名库的介绍——网络通信5、C++各大有名库的介绍——XML6、C++各大有名库的介绍——科学计算7
2016-04-28 16:15:49
1411
原创 【C++面试】常考题复习:排序算法
// Sort.cpp : 定义控制台应用程序的入口点。//#include "stdafx.h"#include /************************************************************************//* copyright (c) 2014 kernel_main/* c++面试常考点/* 转载请
2016-04-28 16:15:44
620
原创 【C++面试】常考题复习
// CPP_Test@2014.10.22.cpp : 定义控制台应用程序的入口点。//#include "stdafx.h"#include /************************************************************************//* copyright (c) 2014 kernel_main/* c
2016-04-28 16:15:39
336
原创 【qt4.8.6】qt-everywhere-opensource-src-4.8.6静态库编译,搭建vs2010 + Qt4.8.6环境
公司的电脑上无法运行QtCreator, 又想用Qt,只能搞vs2010+Qt了, 看到运行时要链接一个几M到十几M的QtCore.dll和QtGui.dll,又有一种在用C#写的程序的感觉,很不爽,还是搞个静态库吧, 下面费话不多说,其它详细说明搜其它博客。。。configure -debug-and-release -fast -static -platform win32-msvc2010
2016-04-28 16:15:34
1395
原创 【linux】 静态库编译
文件如下:root@ubuntu:/home/test# ll total 72drwxr-xr-x 3 root root 4096 Sep 2 10:20 ./drwxr-xr-x 4 root root 4096 Sep 2 08:31 ../-rwxr-xr-x 1 root root 7901 Sep 2 10:09 a.out*-rwxr-xr-x 1
2016-04-28 16:15:30
395
原创 【linux】Ubuntu 14.04 smba服务器的配置
SMB(Server Messages Block,信息服务块)是为了在ubuntu虚拟机与windows之间共享文件。具体配置过程如下: (1)安装SMB应用sudo apt-get install samba sudo apt-get install cifs-utils 不知道是不是ubuntu已经默认安装了samba,但是在/etc/init.d中找不到启
2016-04-28 16:15:25
597
原创 【Qt】使用QProcess调用其它程序或脚本
大概试了一下,还是不错的,不过字符编码问题还不太好解决:代码:#include "mainwindow.h"#include "ui_mainwindow.h"#include #include #include #include MainWindow::MainWindow(QWidget *parent) : QMainWindow(paren
2016-04-28 16:15:20
6106
原创 【Qt 】QSettings写ini配置文件
QSettings写ini配置文件(Qt版本5.2):#include "inidemo.h"#include #include IniDemo::IniDemo(QWidget *parent) : QMainWindow(parent){ ui.setupUi(this); QSettings settings("setting
2016-04-28 16:15:16
1114
原创 Qt, 我回来了。。。
说起qt,大学时就有接触,但一直没有深入,这个周六周天利用两于时间重新温习了一下,跟之前用过的vs上的MFC、C++ builder比起来,Qt封装很人性化,库也比较全,写个一般的小工具很轻松。 参考的教程为:Qt快速入门系列教程目录 , 很详细很实用(除了一些插图说明看不了)导语 该系列教程是基于QtCreator开发环境的Qt入门级教程。自2009年10
2016-04-28 16:15:11
436
原创 boost: tcp client sample
#include #include using namespace std;using namespace boost::asio;void client(io_service &ios){ try { cout "client start." endl; ip::tcp::socket sock(ios);
2016-04-28 16:15:07
380
原创 makefile 中定义宏位置需要注意一下
1 CUR_DIR = $(shell pwd) 2 3 CFLAGS = -g -Wall 4 GCC = gcc 5 GXX = g++ 6 7 TARGET = exe.out 8 9 SRC_FILES += $(shell find $(CUR_DIR) -name *.cc) \10 += $(shell find $(CU
2016-04-28 16:15:02
1787
原创 libpcap报文解析: ipv4、ipv6 @ 2014.7.2
1 #include string.h> 2 #include 3 #include 4 #include 5 #include 6 #include 7 #include in.h> 8 #include 9 #include "packet_header.h" 10 #include 11 #include string>
2016-04-28 16:14:57
760
MobaXterm_Setup_7.2
2014-09-18
很好用的浏览器
2013-12-11
Python-3.3.3源代码
2013-12-03
搜狗浏览器4.0b
2012-09-07
Suse_Linux常用命令及基础培训
2012-06-19
Sublime Text 2 Build 2139 Setup
2011-12-15
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人