自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(22)
  • 资源 (16)
  • 收藏
  • 关注

原创 使用 CPUID 查询 CPU 信息

cpuid 是用来查询 CPU 相关信息的指令。其大致使用方式为:在 eax(有时会涉及 ecx)放入指定的值使用 cpuid在指定寄存器中取值在 Visual C++ 以及 GCC 中,都有对应的 CPUID 的 intrin:#if defined(_MSC_VER)#include <intrin.h>#elif defined(__GNUC__)#include <cpuid.

2016-03-29 21:07:06 5934

原创 C++ 17 的最新动态

cpp17#本次会议确定的 C++ 17 特性:Core Lang: 1. [[fallthrough]] [[nodiscard]] [[maybe_unused]] P0068R0 2. constexpr Lambdas(允许一个 closure type 作为 literal type,对 lambda 的调用可以一个 constant expression(closure type 的

2016-03-05 12:18:58 1947 4

原创 libc++ hashtable 源码简析

libc++ hashtable 源码简析本文分析的是 https://github.com/llvm-mirror/libcxx/ 中截止至 2016 年 1 月 30 日最新的 libc++。 libc++ 中, hashtable 的实现为链式结构。 在教科书中(Introduction To Algorithm 3rd Edition)中,介绍的实现是由一个数组作为buckets,每个数组

2016-01-31 22:55:34 1122

原创 GacUI源码简析(一)

GacUI源码简析(一)  本文中介绍的 GacUI 源代码来自于 https://github.com/vczh-libraries/GacUI。  在 GacUI 中,`WinMain` 开始后,第一个执行的函数为 `SetupWindowsDirect2DRenderer` :int SetupWindowsDirect2DRenderer(){ CoInitializeEx(NUL

2015-11-09 18:15:06 2339

原创 算法导论 10.4.5 O(1)空间遍历二叉树

#pragma once#include #include #include #include //templateclass binary_search_tree{public: using value_type = int; struct node { value_type value_; node* left_; node* right_; node*

2015-08-15 00:55:47 869

原创 Visual C++ 2015 下的 enable_shared_from_this 原理简析

一般来说,搞到一个shared_ptr有两种常见方式: + 使用构造函数,如: cpp std::shared_ptr<foo> ptr{new foo{}}; + 使用make_shared(allocate_shared),如: cpp auto ptr = std::make_shared<foo>(); 在Visual C++ 2015下,第二种方式也走的是

2015-07-28 22:42:50 1098

原创 libc++ tuple源码剖析

我们先来看这段代码:// __lazy_andtemplate <bool _Last, class ..._Preds>struct __lazy_and_impl;template <class ..._Preds>struct __lazy_and_impl<false, _Preds...> : false_type {};template <>struct __lazy_and_im

2015-06-10 17:35:21 1610

原创 POJ 3436 ACM Computer Factory

#include #include #include #include #include #include #include #include const int MaxCount = 64;struct Edge{ Edge(int _t, int _c, int _r) :to(_t),cap(_c),rev(_r) { } int to, cap, rev

2015-05-23 18:11:45 459

原创 二叉搜索树的详细实现

本代码实现了:插入删除非递归的中序遍历、前序遍历、后序遍历从前序遍历与中序遍历中恢复二叉树  本代码在 Clang 3.6 for Windows 与 Visual Studio 2015 CTP 6 下编译通过。头文件无警告。

2015-04-07 08:14:25 592

原创 Windows 7 Task Dialogs

自从 Windows 7 发布以来,不少应用的面貌都有了极大改变,使得应用程序与用户可以更好地交互。这得益于 Windows 7 新增的大量Win32 API。今天探讨的是 Task Dialogs。  在 Windows 7 中,增加了一种 Common Control,叫做 Task Dialog。这种 Dialog 在系统中随处可见,如下图中 IE 的对话框:这种 Task

2015-04-05 17:05:49 1697

原创 POJ 2513

//#pragma warning (disable:4996)#include #include #include #include #include #include const int maxVertexCount = 250000 * 2 + 1;int ancestor[maxVertexCount];int rank[maxVertexCount];int c

2015-03-28 23:22:08 620

原创 函数声明符的右值、左值引用以及const引用

有这么一段代码:

2014-08-06 23:32:10 903

原创 Win32捕捉鼠标离开窗口事件

首先..我们需要一个...

2014-06-04 15:12:15 4263

原创 Direct2D将当前呈现器目标内容保存为位图

直接上代码了。

2014-06-02 01:14:38 2352 4

原创 C语言中随机数的简单总结

#include #include #include #define MAXNUM 10#define MINNUM 1int main(void){    srand((unsigned int)time(0));    for ( int i = 0 ; i  10 ; i ++ )    {        printf("%d\n", rand()%(

2014-05-23 21:06:06 712

原创 在程序中加入UAC权限请求

如图所示。将UAC

2014-05-09 21:27:38 2115

原创 Windows API去掉窗口标题栏以及边框

本文中代码由http://bbs.csdn.net/topics/370099236中的VB代码修改而来。

2014-04-26 00:35:57 12449 1

原创 我们究竟该如何获取桌面句柄???

在我想获取桌面(就是满是图标那个桌面)时,

2014-04-10 16:54:16 2081

原创 RtlGetNtVersionNumbers获取版本号

这个函数在ntdll.dll中有定义。HMODULE hm; if (hm = LoadLibrary(L"ntdll.dll")) { short i=0, j=0, p=0; typedef void (WINAPI *getver)(short*, short*, short*); getver gv; gv = (getver)GetProcAddress(hm,

2014-03-22 17:46:54 6205 1

原创 初试可变参数

#include#includeint total(int n,...);int main(void){ printf("%d",total(9,7,8,9,6,7,6,4,6,2)); return 0;}int total(int n,...){ va_list ap;//一种数据对象,用来存储参数列表中省略号部分。 int i=0; in

2013-12-27 16:28:23 729

原创 C语言之试用qsort()

#include#include#includeint lyp[100];int comp(const void* p1,const void *p2);int main(void){ int i=0; time_t t; srand((unsigned)time(&t)); for(i=0;i<100;i++) lyp[i]=rand(

2013-12-27 15:48:39 647

原创 C语言实现瞬间关机

#include #include #include#include#define SE_SHUTDOWN_PRIVILEGE 0x13int main(){ HINSTANCE hdll; int lyp=0; int result; if(hdll=LoadLibrary("ntdll")) { typedef int (*l

2013-12-21 13:44:47 1512

算法导论第三版 教师用书

《算法导论 第三版》的教师用书,有许多 答案 中没有的题目的答案哦

2015-07-08

Operating Systems: Three Easy Pieces 完整版

http://pages.cs.wisc.edu/~remzi/OSTEP/ 本PDF由我合成,合成时版本为0.9。如果遇到顺序不对请联系我。

2015-06-08

Learn Windows PowerShell 3 in a Month of Lunches

Learn Windows PowerShell 3 in a Month of Lunches

2015-04-24

C++ 14标准草案

C++ 14的标准草案。

2015-03-08

WPF 编程宝典(2012,网盘链接)

因为文件太大,而且7-zip分卷压缩有点受不了,就扔到了网盘里,下载该资源后解压就是网盘链接和密码了,失效的话一定要提醒我哦

2015-03-08

UML和模式应用(原书第3版).pdf

UML和模式应用 中文版 第三版 介绍了 UML 以及设计模式

2015-03-08

Windows 7 高级编程

《Windows 7》高级编程介绍了Windows 7新增的特性如Ribbon、Task Dialog、Jump List等等。

2014-10-05

Effective Modern C++ Sampler

Effective Modern C++,是Effective C++的新版本,其内容为C++11/C++14全部重写。注意,本资源仅仅是Sampler,即原书的一小部分。

2014-10-05

离散数学及其应用6E 中文版 练习题答案

离散数学及其应用6E 中文版 练习题答案

2014-06-23

The C++ Standard Library 2nd Edition

The C++ Standard Library 2nd Edition C++ 11

2014-06-23

The C++ Programming Language 4th

The C++ Programming Language,4th,C++ 11,C++之父

2014-06-23

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除