monkeyduck
码龄11年
关注
提问 私信
  • 博客:1,102,649
    社区:3
    1,102,652
    总访问量
  • 163
    原创
  • 338,529
    排名
  • 179
    粉丝
  • 0
    铁粉

个人简介:清华大学CS在读,研究领域为语音处理、模式识别、对话管理,依然在不断学习中,成功在于点滴积累!

IP属地以运营商信息为准,境内显示到省(区、市),境外显示到国家(地区)
IP 属地:北京市
  • 加入CSDN时间: 2013-08-06
博客简介:

monkeyduck的专栏

查看详细资料
个人成就
  • 获得228次点赞
  • 内容获得115次评论
  • 获得449次收藏
  • 代码片获得218次分享
创作历程
  • 1篇
    2018年
  • 3篇
    2017年
  • 27篇
    2016年
  • 17篇
    2015年
  • 51篇
    2014年
  • 82篇
    2013年
成就勋章
TA的专栏
  • LeetCode的Python题解
    12篇
  • Android平台的口语对话系统
    6篇
  • poj解题报告
    10篇
  • uva解题报告
    46篇
  • C++
    38篇
  • Java
    17篇
  • Shell
    2篇
  • 杂
    14篇
  • Linux
    13篇
  • Python
    25篇
  • Android
    7篇
  • LeetCode
    20篇
  • 最近
  • 文章
  • 代码仓
  • 资源
  • 问答
  • 帖子
  • 视频
  • 课程
  • 关注/订阅/互动
  • 收藏
搜TA的内容
搜索 取消

excel数据表导入远程mysql数据库

解决的问题mysql数据库在公司内网服务器,而excel数据表在本地,需要堡垒机跳转才能访问,无法直连,因此在本地任何客户端导入数据表的方法都不好使。数据库只开放了一个端口,无法将数据表传到数据库服务器上,再登入数据库利用load data infile命令导入。解决办法登陆内网任意一台可以链接数据库的服务器,将excel文件导出为.sql文件,然后使用mysql -h ho
原创
发布博客 2018.01.24 ·
2982 阅读 ·
1 点赞 ·
0 评论 ·
4 收藏

按日期每天切割、定期删除tomcat的catalina.out日志

自动切割:http://blog.csdn.net/hanzheng260561728/article/details/51236131定期删除:http://825536458.blog.51cto.com/4417836/1841389
原创
发布博客 2017.02.27 ·
13887 阅读 ·
1 点赞 ·
0 评论 ·
2 收藏

maven阿里云中央仓库

maven作为一个项目管理工具确实非常好用,但是在国内这个网络条件下实在是让人恼火。之前oschina的中央仓库可用,现在oschina的maven服务器关了,一直没找到国内镜像来替代。今天发现阿里云公开了一个中央仓库,大家可以试试。配置 修改maven根目录下的conf文件夹中的setting.xml文件,内容如下: alimaven aliyun mav
转载
发布博客 2017.02.24 ·
1316 阅读 ·
1 点赞 ·
0 评论 ·
0 收藏

Spring AOP IOC 实现原理,面试问到如何回答

IOC:控制反转也叫依赖注入,IOC利用java反射机制,AOP利用代理模式。所谓控制反转是指,本来被调用者的实例是有调用者来创建的,这样的缺点是耦合性太强,IOC则是统一交给spring来管理创建,将对象交给容器管理,你只需要在spring配置文件总配置相应的bean,以及设置相关的属性,让spring容器来生成类的实例对象以及管理对象。在spring容器启动的时候,spring会把你在配置文件中
原创
发布博客 2017.01.11 ·
54439 阅读 ·
6 点赞 ·
9 评论 ·
73 收藏

[LeetCode]Basic Calculator II

题目不难,但是想做对却也需要考虑很多细节。 没有括号的运算就是先乘除后加减,思路是把➕和➖看作分隔符,先计算分隔符隔开的一个个term,再把term相加。 举个例子:a+b*c/d-e,在这个例子中,读到第一个➕时,term是a,并且我们可以认为a已经被➕分割开了,可以加到总和里去了,所以sum现在是a,term往后读一个数,是b。然后往后读一个符号是✖️,所以term=term*c,即term
原创
发布博客 2016.10.11 ·
968 阅读 ·
0 点赞 ·
0 评论 ·
0 收藏

先序遍历中序遍历后序遍历确定一棵二叉树(递归、非递归)

先序遍历和中序遍历确定二叉树后序遍历和中序遍历确定二叉树
原创
发布博客 2016.09.16 ·
1614 阅读 ·
1 点赞 ·
1 评论 ·
9 收藏

LeetCode总结

终于把LeetCode免费题目都做完了,接下来要做第二遍,想把第一遍不会做的题目整理一下思路,为接下来的google面试准备一下,万一过了呢,哈哈。315 Count of Smaller Numbers After Self 题意:计算每个元素右面有多少个元素小于它 从后向前遍历,维护一个排好序的数组,每次插入新元素时确定其在有序数组的位置,就是要求的右面有多少个元素小
原创
发布博客 2016.09.02 ·
1487 阅读 ·
1 点赞 ·
1 评论 ·
0 收藏

git ignore 添加后不生效 解决办法

问题在repo中已经上传了很多配置文件,后来发现不需要,但是在gitignore添加之后并没有作用,在每次add后依然会出现。解决办法执行如下代码,把它们从repo中删除git rm --cached `git ls-files -i --exclude-from=.gitignore`
原创
发布博客 2016.07.11 ·
1703 阅读 ·
0 点赞 ·
0 评论 ·
0 收藏

Install NumPy, SciPy, scikit-learn on Mac OS X

Add on and summarized from blog http://penandpants.com/2012/02/24/install-python/Outline1. install Xcode –> 2. install pip –> 3. install brew –> 4. install NumPy –> 5. install gfortran (important!) –
原创
发布博客 2016.06.16 ·
1914 阅读 ·
0 点赞 ·
0 评论 ·
1 收藏

Linux统计某文件夹下文件、文件夹的个数

统计某文件夹下文件的个数ls -l |grep "^-"|wc -l统计某文件夹下目录的个数ls -l |grep "^d"|wc -l统计文件夹下文件的个数,包括子文件夹里的ls -lR|grep "^-"|wc -l如统计/home/han目录(包含子目录)下的所有js文件则:ls -lR /home/han|grep js|wc -l 或 ls -l "/home/han"|grep "js"
原创
发布博客 2016.06.16 ·
6282 阅读 ·
1 点赞 ·
0 评论 ·
4 收藏

【LeetCode】31. Next Permutation

题目思路找到下一个排列,比较好的思路是 O(n)O(n) ,从尾向前遍历,找到第一个nums[i-1]代码void nextPermutation(vector<int>& nums) { int N = nums.size(); bool flag = false; int i,j; for (i=N-1;i>=1;--i){
原创
发布博客 2016.06.05 ·
580 阅读 ·
0 点赞 ·
0 评论 ·
0 收藏

【LeetCode】310. Minimum Height Trees

题目链接思路我想到了n个点构成树,那么一定会有n-1条边,构成的树深度最大的情况发生在所有点位于一条链上,此时深度为 n/2n/2 或 n/2+1n/2 + 1 ,这取决于n的奇偶性。树深度最浅的情况发生在一个根节点,所有其它节点都与根节点直接相连,此时深度为2。我还发现一个规律,就是叶子节点的数目+树的最长路径为一定值,为节点数+2。这样统计出有多少个叶子节点后,再走最长路径的一半所到达的节点就是
原创
发布博客 2016.06.04 ·
1037 阅读 ·
0 点赞 ·
0 评论 ·
0 收藏

【LeetCode】82. Remove Duplicates from Sorted List II

思路很简单的一道题,思路也没什么特别的,就是设置一个prehead节点代码 ListNode* deleteDuplicates(ListNode* head) { ListNode nHead(0); ListNode* phead = &nHead; ListNode* tmp = &nHead; bool flag;
原创
发布博客 2016.05.31 ·
540 阅读 ·
0 点赞 ·
0 评论 ·
0 收藏

【LeetCode】209. Minimum Size Subarray Sum

题目Given an array of n positive integers and a positive integer s, find the minimal length of a subarray of which the sum ≥ s. If there isn’t one, return 0 instead.For example, given the array [2,3,1,2,
原创
发布博客 2016.05.31 ·
657 阅读 ·
0 点赞 ·
0 评论 ·
0 收藏

【LeetCode】207. Course Schedule

题目There are a total of n courses you have to take, labeled from 0 to n - 1.Some courses may have prerequisites, for example to take course 0 you have to first take course 1, which is expressed as a pai
原创
发布博客 2016.05.30 ·
1803 阅读 ·
0 点赞 ·
0 评论 ·
0 收藏

【LeetCode】134. Gas Station

题目There are N gas stations along a circular route, where the amount of gas at station i is gas[i].You have a car with an unlimited gas tank and it costs cost[i] of gas to travel from station i to its n
原创
发布博客 2016.05.29 ·
2156 阅读 ·
0 点赞 ·
0 评论 ·
0 收藏

【LeetCode】40. Combination Sum II

题目Given a collection of candidate numbers (C) and a target number (T), find all unique combinations in C where the candidate numbers sums to T.Each number in C may only be used once in the combination.
原创
发布博客 2016.05.22 ·
904 阅读 ·
0 点赞 ·
0 评论 ·
0 收藏

【LeetCode】50. Pow(x, n)

题目Implement pow(x, n).Subscribe to see which companies asked this question思路两种方法,一:一个一个乘,最多乘INT_MAX次,显然不太好。 二:每次求n/2n/2次幂,最多32次陷阱此题陷阱非常多,主要需要考虑几种特殊情况: 1. n 为 0:结果为1 2. n 为负数,需要先求再求倒数,或者直接求1/x1/x的-n次
原创
发布博客 2016.05.22 ·
556 阅读 ·
0 点赞 ·
0 评论 ·
0 收藏

【LeetCode】92. Reverse Linked List II

题目Reverse a linked list from position m to n. Do it in-place and in one-pass.For example: Given 1->2->3->4->5->NULL, m = 2 and n = 4,return 1->4->3->2->5->NULL.Note: Given m, n satisfy the following
原创
发布博客 2016.05.22 ·
534 阅读 ·
0 点赞 ·
0 评论 ·
0 收藏

【LeetCode】55. Jump Game

题目Given an array of non-negative integers, you are initially positioned at the first index of the array.Each element in the array represents your maximum jump length at that position.Determine if you a
原创
发布博客 2016.05.22 ·
762 阅读 ·
0 点赞 ·
0 评论 ·
0 收藏
加载更多