会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
Loading
李正浩
Github:https://github.com/li-zheng-hao
博客园
首页
新随笔
联系
订阅
管理
上一页
1
···
4
5
6
7
8
9
10
11
12
···
24
下一页
2018年12月26日
[WPF]DataContext结果不显示
摘要: namespace DataContext_ItemSource_Demo{ public class Person { public string Name; } public class ViewModel { p...
阅读全文
posted @ 2018-12-26 15:56 李正浩
阅读(288)
评论(0)
推荐(0)
2018年12月19日
[C#]从两个例子理解async/await
摘要: 1 例子1输出的结果为: 可以看出执行的结果为:A——D——B——C——E. 我们再看下一个例子(注意,我们把代码中D和E的位置交换) 2 例子2 结果: 结果为:A——B——C——E——D 3 理解 Async方式,使用Async标记 Test 为异步方法,用Await标...
阅读全文
posted @ 2018-12-19 12:17 李正浩
阅读(167)
评论(0)
推荐(1)
2018年12月18日
Visual Studio2017快速收缩/扩展代码块
摘要: 首先要设置伸缩函数的同时也伸缩region块: 快捷键Ctrl+M+O 收缩所有方法Ctrl+M+L 展开所有方法
阅读全文
posted @ 2018-12-18 11:36 李正浩
阅读(497)
评论(0)
推荐(0)
2018年12月17日
[WPF]数据绑定Demo
摘要: 目录1、View模型代码2、ViewModel模型代码3、数据模型4、样例演示5、一些知识点这里简单实现一个listbox绑定的功能,符合MVVM模型。 View模型代码(View视图以及窗体类的后台代码) ...
阅读全文
posted @ 2018-12-17 21:06 李正浩
阅读(269)
评论(0)
推荐(0)
2018年12月2日
【随笔】Ubuntu18.04下virtualbox卡死的解决办法
摘要: //得到该进程ID Xpgrep Xorg//杀掉进程kill X然后重新登陆帐号即可
阅读全文
posted @ 2018-12-02 19:23 李正浩
阅读(690)
评论(0)
推荐(0)
2018年9月17日
5. 最长回文子串
摘要: 题目 代码class Solution {public: string longestPalindrome(string s) { if(s.size()==1) return s; string max=s.substr(...
阅读全文
posted @ 2018-09-17 21:14 李正浩
阅读(81)
评论(0)
推荐(0)
3. 无重复字符的最长子串
摘要: 题目 代码class Solution {public: int lengthOfLongestSubstring(string s) { //用dic存储每个字符最后一次出现的位置 vector dic(255,-1); in...
阅读全文
posted @ 2018-09-17 21:13 李正浩
阅读(76)
评论(0)
推荐(0)
49. 字母异位词分组
摘要: 题目 代码class Solution {public: vector> groupAnagrams(vector& strs) { vector> res; unordered_map> table; for(auto i:s...
阅读全文
posted @ 2018-09-17 21:11 李正浩
阅读(91)
评论(0)
推荐(0)
73. 矩阵置零
摘要: 题目 代码class Solution {public: void setZeroes(vector>& matrix) { if(matrix.size()==0) return; int lastRow=-1,H=ma...
阅读全文
posted @ 2018-09-17 18:59 李正浩
阅读(134)
评论(0)
推荐(0)
15. 三数之和
摘要: 题目 代码class Solution {public: vector> threeSum(vector& nums) { //先固定住第一个数字,然后后面两个数字为 i+1和 nums.size()-1开始往中间缩小,并且要考虑数字重复的问题,时间复杂度...
阅读全文
posted @ 2018-09-17 18:55 李正浩
阅读(98)
评论(0)
推荐(0)
上一页
1
···
4
5
6
7
8
9
10
11
12
···
24
下一页
公告