- 博客(22)
- 收藏
- 关注
翻译 [Qt Wiki翻译]元对象系统 The Meta-Object System
原文链接 Qt的元对象系统为实现控件间通信,运行时类型信息和动态属性系统提供了信号与槽机制 元对象系统主要是包括以下三大部分: - QObject类是所有能够使用元对象系统的类的基类 - 在类的私有部分声明Q_OBJECT宏来表明需要使用元对象系统的特性,比如动态属性,信号和槽 - 元对象编译器(moc)为每个QObject子类提供了实现元对象系统所必须的代码moc工具读入...
2018-08-13 15:38:54 234
原创 【VC++深入详解笔记】Note 5:文本编程
1. 插入符1.1 文本插入符在视图窗口中创建一个文本插入符的流程: - 在OnCreate函数中利用CreateSolidCaret函数创建一个插入符 - 利用ShowCaret函数将插入符显示在视图窗口中1.2 图形插入符2. 窗口重绘2.1 OnDraw函数2.2 添加字符串资源3. 路径4. 字符输入4.1 字符输入实现4.2 字...
2018-06-14 18:17:21 222
原创 【VC++深入详解笔记】Note 2:MFC框架介绍
【VC++深入详解笔记】Note 2:MFC框架介绍1. 相关概念解释MFC 微软基础类库(Microsoft Foundation Class),是微软公司提供的一个类库,以c++类的形式封装了win32 API,并且包含了一个应用程序框架。所以,MFC其实一个库和框架的混合体。库和框架的区别 库包含了类、对象和方法等已供程序员直接使用,而Framework则包含了更多的东西...
2018-05-14 19:12:09 823
原创 【VC++深入详解笔记】Note 1: Windows桌面程序介绍
【VC++详解笔记】Note 1: Windows桌面程序介绍1. 相关概念解释VC++ VC++是微软公司旗下的一款IDE,集成了windows桌面应用程序的开发接口(Windows API),目前VC++已经被集成到visual studio里面去了。窗口 窗口是电脑上能够与用户进行交互的一个矩形区域,win32 SDK中实现了多种样式的窗口。句柄 句柄相当于每个窗口的标识...
2018-05-14 15:47:59 2433
原创 第八章练习题
Ex 8.3首先,易知 STINGY SAT 的解是可在多项式时间内验证的,因此属于 NP。另外,很容易可以将 SAT 归约到 STINGY SAT(将 k 设为所有变量的总个数即可),于是可知 STINGY SAT 为 NP 完全问题
2017-12-31 20:59:58 231
原创 LeetCode题解 第十六周
1.Letter Combinations of a Phone Numberhttps://leetcode.com/problems/letter-combinations-of-a-phone-number/description/Given a digit string, return all possible letter combinations that the
2017-12-24 14:03:34 198
原创 LeetCode题解 第十五周
1.3Sum Closesthttps://leetcode.com/problems/3sum-closest/description/Given an array S of n integers, find three integers in S such that the sum is closest to a given number, target. Return the
2017-12-24 14:00:59 151
原创 LeetCode题解 第十四周
1.3SumGiven an array S of n integers, are there elements a,b, c in S such that a + b + c = 0? Find all unique triplets in the array which gives the sum of zero.Note: The solution set must not
2017-12-10 14:35:30 146
原创 LeetCode题解 第十三周
1.Longest Common PrefixWrite a function to find the longest common prefix string amongst an array of strings.Difficulty:EasyExplanation:1.首先将数组中的字符串元素按长度从小到大排序,最长公共字串的长度不能超过最短的字符串的长。排序完成之后,利用查
2017-12-03 10:58:38 117
原创 LeetCode题解 第十二周
1.Roman to IntegerGiven a roman numeral, convert it to an integer.Input is guaranteed to be within the range from 1 to 3999.Difficulty:EasyExplanation:1.只要从大到小将这个整型数字分解,再转换成罗马数字即可。
2017-12-03 10:52:59 111
原创 LeetCode题解 第十一周
1.Integer to Romanhttps://leetcode.com/problems/integer-to-roman/description/Given an integer, convert it to a roman numeral. Input is guaranteed to be within the range from 1 to 3999.
2017-11-19 18:24:53 136
原创 LeetCode题解 第十周
1. Container With Most Waterhttps://leetcode.com/problems/container-with-most-water/description/Given n non-negative integers a1,a2, ..., an, where each represents a point at coordinate (i
2017-11-19 18:04:25 107
原创 LeetCode题解 第九周
1.Palindrome Numberhttps://leetcode.com/problems/palindrome-number/description/Determine whether an integer is a palindromeDifficulty:EasyExplanation:1.这道题目相对来说比较简单。证明一个数字是不是回文数,只要将数
2017-11-10 19:54:49 133
原创 LeetCode题解 第八周
1.ZigZag Conversionhttps://leetcode.com/problems/zigzag-conversion/description/The string "PAYPALISHIRING" is written in a zigzag pattern on a given number of rows like this: (you may want to
2017-11-10 19:42:30 175
原创 LeetCode题解 第七周
1.Median of Two Sorted Arrayhttps://leetcode.com/problems/median-of-two-sorted-arrays/description/There are two sorted arrays nums1 and nums2 of size m and n respectively.Find the median o
2017-11-03 17:37:13 122
原创 LeetCode题解 第六周
1. String to Integerhttps://leetcode.com/problems/string-to-integer-atoi/description/Implement atoi to convert a string to an integer.Hint: Carefully consider all possible input cases. If yo
2017-10-15 13:52:02 190
原创 LeetCode题解 第四周
1.Reverse Integerhttps://leetcode.com/problems/reverse-integer/description/Reverse digits of an integer.Note:The input is assumed to be a 32-bit signed integer. Your function shouldretur
2017-10-01 17:04:38 169
原创 LeetCode题解 第三周
1.Longest Substring Without Repeating Charactershttps://leetcode.com/problems/longest-substring-without-repeating-characters/description/Given a string, find the length of the longest substrin
2017-09-24 10:24:48 157
原创 LeetCode题解 第二周
1.Add Two Numbershttps://leetcode.com/problems/add-two-numbers/description/
2017-09-17 14:21:59 136
原创 LeetCode题解 第一周
1.Two Sumhttps://leetcode.com/problems/two-sum/description/Given an array of integers, return indices of the two numbers such that they add up to a specific target.You may assume that each
2017-09-10 10:44:39 270
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人