摘要:
常用插件:minibufexpl.vimtaglist.vimwinfileexplorer.vimwinmanager.vimwintagexplorer.vim12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810 阅读全文
posted @ 2013-05-23 18:50
simon1024
阅读(248)
评论(0)
推荐(0)
摘要:
GivenaBST(BinarysearchTree)howwillyoufindmedianinthat?Constraints:*Noextramemory.*Functionshouldbereentrant(Nostatic,globalvariablesallowed.)*Medianforevennoofnodeswillbetheaverageof2middleelementsandforoddnooftermswillbemiddleelementonly.*Algorithmshouldbeefficientintermsofcomplexity.中文不需要赘述了,就是二叉搜 阅读全文
posted @ 2013-05-23 18:00
simon1024
阅读(1403)
评论(0)
推荐(0)
摘要:
PythonaddsanextensionsyntaxtoPerl’sextensionsyntax.IfthefirstcharacterafterthequestionmarkisaP,youknowthatit’sanextensionthat’sspecifictoPython.Currentlytherearetwosuchextensions:(?P<name>...)definesanamedgroup,and(?P=name)isabackreferencetoanamedgroup.>>>p=re.compile(r'(?P<wor 阅读全文
posted @ 2013-05-23 17:58
simon1024
阅读(178)
评论(0)
推荐(0)
摘要:
将一个整数拆分成不重复的整数之和。example:6=1+5=1+2+3=2+4采用递归方法实现。12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182#include<iostream>#include<vector>usingnamespacestd;/**6=1+5=1+2+3=2+4**/voidsplit(i 阅读全文
posted @ 2013-05-23 17:56
simon1024
阅读(230)
评论(0)
推荐(0)
摘要:
在看hive源码的时候,因为对log4j不了解而苦于不知道该如何打印log来进行调试。虽然最后我选择了直接使用System.err.println来打印log,但是log4j是一个很好的log框架,在很多多线程系统中都有用到,所以值得花点时间好好学习下。简介:log4j是apache的一个开源项目,是一个流行的javalog框架,如今已经有了c,c++,python,shell等各语言的相关版本,如使用于shell的log4shell.打印log是最简单和最直接的程序调试方法。即便如此,打印log有时却是唯一可以用的程序调试方法,尤其是对于大型的多线程或分布式系统。它们很难通过gdb等工具就进 阅读全文
posted @ 2013-05-23 17:46
simon1024
阅读(452)
评论(0)
推荐(0)
摘要:
方法一、不用栈void reverseChar(char* str, int len){ char* q = str+len-1; char* p = str; if (!len) return; while( pst;stackword;char*p=str;st.push('\0');while(*p!='\0'){while(*p=='')st.push(*p++);if(*p=='\0')break;while(*p!='\0'&&*p!='')word.push(*p++) 阅读全文
posted @ 2013-05-23 17:42
simon1024
阅读(331)
评论(0)
推荐(0)
浙公网安备 33010602011771号