01 2015 档案

摘要:最近因为想要看漫画,无奈下载的漫画是jpg的格式,网上的转换器还没一个好用的,于是乎就打算用python自己DIY一下:这里主要用了reportlab。开始打算随便写几行,结果为若干坑纠结了挺久,于是乎就想想干脆把代码写好点吧。#实现了以下的几项功能:* 将当前文件夹下的图片保存到一个pdf中,支持... 阅读全文
posted @ 2015-01-30 00:09 mrbean 阅读(2411) 评论(2) 推荐(4)
摘要:来自为知笔记(Wiz) 阅读全文
posted @ 2015-01-24 17:51 mrbean 阅读(637) 评论(0) 推荐(0)
摘要:![居然不让发居然不让发居然不让发居然不让发居然不让发居然不让发居然不让发居然不让发居然不让发居然不让发居然不让发居然不让发居然不让发居然不让发居然不让发居然不让发居然不让发居然不让发居然不让发居然不让发居然不让发居然不让发居然不让发居然不让发居然不让发居然不让发居然不让发居然不让发居然不让发居然不... 阅读全文
posted @ 2015-01-24 17:32 mrbean 阅读(727) 评论(0) 推荐(0)
摘要:首先用Anaconda是因为方便(管理方便,包安装真心不方便)。下面是我的安装过程:首先使用如下命令安装opencvconda install -c https://conda.binstar.org/menpo opencv不过装完之后用不了,这时候找到如下文件夹Anaconda\pkgs\ope... 阅读全文
posted @ 2015-01-24 14:58 mrbean 阅读(26227) 评论(0) 推荐(0)
摘要:#题目描述:Given a string, find the length of the longest substring without repeating characters. For example, the longest substring without repeating lett... 阅读全文
posted @ 2015-01-22 17:02 mrbean 阅读(218) 评论(0) 推荐(0)
摘要:#题目简述:Determine whether an integer is a palindrome. Do this without extra space.Some hints:Could negative integers be palindromes? (ie, -1)If you are ... 阅读全文
posted @ 2015-01-22 15:22 mrbean 阅读(269) 评论(0) 推荐(0)
摘要:#题目简述:Given n pairs of parentheses, write a function to generate all combinations of well-formed parentheses.For example, given n = 3, a solution set ... 阅读全文
posted @ 2015-01-22 00:41 mrbean 阅读(164) 评论(0) 推荐(0)
摘要:#题目描述:You are given two linked lists representing two non-negative numbers. The digits are stored in reverse order and each of their nodes contain a s... 阅读全文
posted @ 2015-01-22 00:00 mrbean 阅读(195) 评论(0) 推荐(0)
摘要:#题目简述:There are two sorted arrays A and B of size m and n respectively. Find the median of the two sorted arrays. The overall run time complexity shou... 阅读全文
posted @ 2015-01-21 22:22 mrbean 阅读(231) 评论(0) 推荐(0)
摘要:#题目简述:Given a string containing just the characters '(', ')', '{', '}', '[' and ']', determine if the input string is valid.The brackets must close in... 阅读全文
posted @ 2015-01-19 14:47 mrbean 阅读(216) 评论(0) 推荐(0)
摘要:#题目描述:Given an integer n, return the number of trailing zeroes in n!.**Note**: Your solution should be in logarithmic time complexity.#解题思路:这个题目给的评级是e... 阅读全文
posted @ 2015-01-18 23:30 mrbean 阅读(197) 评论(0) 推荐(0)
摘要:#题目概述:Given an array and a value, remove all instances of that value in place and return the new length.The order of elements can be changed. It doesn... 阅读全文
posted @ 2015-01-18 19:29 mrbean 阅读(197) 评论(0) 推荐(0)
摘要:#题目概述:Given an array of size n, find the majority element. The majority element is the element that appears more than ⌊ n/2 ⌋ times.You may assume tha... 阅读全文
posted @ 2015-01-17 17:25 mrbean 阅读(1737) 评论(0) 推荐(0)
摘要:#题目简述:You are climbing a stair case. It takes n steps to reach to the top.Each time you can either climb 1 or 2 steps. In how many distinct ways can y... 阅读全文
posted @ 2015-01-17 16:00 mrbean 阅读(277) 评论(0) 推荐(0)
摘要:#题目简述:Given an array of integers, find two numbers such that they add up to a specific target number.The function twoSum should return indices of the ... 阅读全文
posted @ 2015-01-16 22:25 mrbean 阅读(223) 评论(0) 推荐(0)
摘要:#题目简述:Given an absolute path for a file (Unix-style), simplify it.For example,path = "/home/", => "/home"path = "/a/./b/../../c/", => "/c"click to sho... 阅读全文
posted @ 2015-01-16 18:42 mrbean 阅读(185) 评论(0) 推荐(0)
摘要:解决方法:这个貌似是属于一个bug把Image.py中的1500行左右的split函数改成如下即可: def split(self): "Split image into bands" self.load() if self.im.bands == 1... 阅读全文
posted @ 2015-01-16 14:49 mrbean 阅读(1235) 评论(0) 推荐(0)
摘要:找到PIL安装文件里的ImageShow.py把第99行的 return "start /wait %s && del /f %s" % (file, file) 修改成 return "start /wait %s && PING 127.0.0.1 -n 5 > NUL && del... 阅读全文
posted @ 2015-01-14 18:13 mrbean 阅读(522) 评论(0) 推荐(0)