快速排序算法。python实现。 1 # -*- coding: utf8 -*- 2 3
import random 4 5 def partition(mylist, low, high): 6 pivotkey = mylist[low] 7
while low = piv...
分类:
其他好文 时间:
2014-05-17 01:25:40
阅读次数:
305
一、日期转换为字符串1.日期以特定的格式输出: // 创建日期并转换为yyyy-mm-dd格式
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); String datestr =
sdf.format(new Date()...
分类:
编程语言 时间:
2014-05-13 20:58:54
阅读次数:
261
用Python和FFmpeg查找大码率的视频文件
本文使用Python2.7, 这个工作分两步
遍历文件夹下的视频文件用ffprobe获取是视频文件的码率信息
用ffprobe 获取json格式的视频信息
用ffprobe.exe是FFmpeg自带的查看视频信息的工具,其获取json格式的信息命令如下
ffprobe -v quiet -print_format json -show...
分类:
编程语言 时间:
2014-05-13 16:26:01
阅读次数:
599
实现了%d %x %c %s对变长函数的参数取址有了深刻的理解
,蒋yy的实验任务其实还是很有帮助的^_^ 1 int printf ( const char * format, ... ) 2 { 3 int
Count=0; 4 int index=0; 5 char b...
分类:
其他好文 时间:
2014-05-13 11:01:59
阅读次数:
226
今天想使用String.Format,和平时的用法不一样。直接上代码: [Test]
public void TestMethod6() { string A = "A"; string B = "B"; ...
分类:
其他好文 时间:
2014-05-12 19:38:59
阅读次数:
296
1、格式化字符串操作String.prototype.format = function(args)
{ if (arguments.length>0) { var result = this; if (arguments.length == 1
&& typeof (args) == "objec...
分类:
编程语言 时间:
2014-05-12 04:17:43
阅读次数:
314
SimpleDateFormate sdf = new
SimpleDateFormate("yyyy-MM-dd HH:MM:ss");String s =
sdf.format(Date)然后这个s输出时的月份老是不对后来看了一下API"yyyy-MM-dd HH:MM:ss"这段室友讲究的M代...
分类:
编程语言 时间:
2014-05-12 03:05:56
阅读次数:
249
3.依赖倒置原则:High level modules should not depend upon low level modules. Both should depend upon abstractions. Abstractions should not depend upon details. Details should depend upon abstractions.
意思是:高...
分类:
其他好文 时间:
2014-05-11 22:15:36
阅读次数:
326
Given an array of words and a length L, format
the text such that each line has exactly L characters and is fully (left and
right) justified.You shoul...
分类:
其他好文 时间:
2014-05-11 15:15:29
阅读次数:
287
HFileV2文件
HFileV2文件写入通过StoreFile.Writer-->HFileWriterV2进行写入。
文件格式通过hfile.format.version配置。默认为2,也只有2这个值在0.96可用。
可通过cf中配置DATA_BLOCK_ENCODING配置dataBlock的encoding,
可配置值:NONE,PREFIX,DIFF,FAST_DIFF,PREF...
分类:
其他好文 时间:
2014-05-11 02:57:42
阅读次数:
589