手里有一系统图片,有50多张,每张图片的底部都有个30像素的黑底白字的水印条,特别扎眼。于是,想到了批量“切除”底部的30个像素的方法来去除可恶的水印.用大家都熟悉的ImageMagick里的convert命令来做。既然要批量就要循环了,下面进入正题:Linux下批量去除底部水印:forii..
分类:
其他好文 时间:
2014-10-17 12:09:14
阅读次数:
226
Given a singly linked list where elements are sorted in ascending order, convert it to a height balanced BST.这题和sort list等题都比较相似,需要先用快慢指针的方法找到链表的中点,然后...
分类:
其他好文 时间:
2014-10-16 22:31:43
阅读次数:
217
[leetcode]Given two words word1 and word2, find the minimum number of steps required to convert word1 to word2. (each operation is counted as 1 step.)...
分类:
其他好文 时间:
2014-10-16 13:02:12
阅读次数:
183
Problem:Given a roman numeral, convert it to an integer.Input is guaranteed to be within the range from 1 to 3999.遍历一次输入的字符串,如果不满足类似4或者9的就直接加相应的数,否则减去...
分类:
其他好文 时间:
2014-10-16 02:41:51
阅读次数:
200
Problem:Given an integer, convert it to a roman numeral.Input is guaranteed to be within the range from 1 to 3999.把阿拉伯数字转换为罗马数字输出。百度一下对应的 I V X L C D ...
分类:
其他好文 时间:
2014-10-15 01:28:39
阅读次数:
267
Bitmap convert(Bitmap a, int width, int height){int w = a.getWidth();int h = a.getHeight();Bitmap newb = Bitmap.createBitmap(ww, wh, Config.ARGB_8888)...
分类:
其他好文 时间:
2014-10-14 17:41:08
阅读次数:
146
/// /// 将字符串编码为Base64字符串/// /// 要编码的字符串private string Base64Encode(string str){byte[] barray;barray=Encoding.Default.GetBytes(str);return Convert.ToBa...
分类:
其他好文 时间:
2014-10-14 13:56:08
阅读次数:
211
Given a string, write a routine that converts the string to a long, without using the built in functions that would do this. Describe what (if any) li...
分类:
其他好文 时间:
2014-10-14 13:01:28
阅读次数:
201
方法一:Convert.ToDateTime(string)string格式有要求,必须是yyyy-MM-dd hh:mm:ss================================================方法二:Convert.ToDateTime(string, IFormat...
分类:
其他好文 时间:
2014-10-14 11:12:58
阅读次数:
182
Given two words word1 and word2, find the minimum number of steps required to convert word1 to word2. (each operation is counted as 1 step.)
You have the following 3 operations permitted on a word:...
分类:
其他好文 时间:
2014-10-13 20:08:07
阅读次数:
188