摘要:提供对i和j的声明,将下面的循环转变为无限循环 while(i<=j && j<=i && i!=j) 题解: 考虑到基本数据类型变化为对象类型的情况。对象的判等使用的是.equal()方法,而“==”是判断两个对象是否指向同一个对象。而如果包括的是基本类型,那么<,>等比较类型可能就会自动解包为基本类型进行操作。 所以,当上式的i,j初试化为两个相同基本数据类型的不同包装类型就可以了。 In...
阅读全文
摘要:来自网络,具体是哪不知道,文档是在新浪文档共享处下载的,看到不错,整理了下就传上来了! 代码阅读的必要性 阅读别人的代码作为开发人员是一件经常要做的事情。一个是学习新的编程语言的时候通过阅读别人的代码是一个最好的学习方法,另外是积累编程经验。如果你有机会阅读一些操作系统的代码会帮助你理解一些基本的原理。还有就是在你作为一个质量保证人员或一个小领导的时候如果你要做白盒测试的时候没有阅读代码的能力是...
阅读全文
摘要:刚下了一本书的实例代码,我想把它们拷贝到Eclipse下的指定包里面去,但是发现每个.java文件都放在一个小文件夹里面的。本来是在是用Dos命令cp *.java 复制过去。但是不知道为什么我这的DOS命令总是出错。我怀疑是安装了Cygwin,并把、Cygwin当道path里面排到DOS命令前面了,所以就按照Cygwin运行了,而我按照Dos中cp命令的格式在Cygwin可能是不对的! 所以弄了...
阅读全文
摘要:YourKit有对java和.net两个版本的! 不过可惜的就是只有15天的试用期,后面再用就要收费了。 15天,应对紧急情况也差不多了! YourKit is a technology leader, creator of the most innovative and intelligent tools for profiling Java & .NET applications. Th...
阅读全文
摘要:MP3连接 还是老外好玩,写lisp代码竟然写出了一首歌! (define lyrics '( I was taught assembler in my second year of school.It's kinda like construction work - with a toothpick for a tool.So when I made my senior year, I th...
阅读全文
摘要:we should find sanity in the midst of chaos. 人真的很容易迷失自我,或由环境,或有自己!总是时不时的低估自己或高估自己(一般都是高估自己)。 想做成点事情还是需要正视自己,要明白自己是什么样的人。 对于事业,不能因为大家都说创业好,并且有些人还认为创业才是一个男人勇气的象征;不能因为这样你就为了创业而创业;要知道,不是任何人都适合创业的。 对于目标,更...
阅读全文
摘要:使用ElementTree读取xml文件,现在网上有很多实例了! 但是如果遇到其中有namespace的xml文件就会有问题! 假设需要读取的xml文件为<?xml version="1.0"?><Resume xmlns="http://ns.hr-xml.org/2007-04-15" <ResumeId> <IdValue>152036612-225804009</IdValue> </R...
阅读全文
摘要:修改bin/hadoop文件 sudo gedit bin/hadoop 找到elif [ "$COMMAND" = "datanode" ] ; then CLASS='org.apache.hadoop.hdfs.server.datanode.DataNode' if [[ $EUID -eq 0 ]]; then HADOOP_OPTS="$HADOOP_OPTS -jvm s...
阅读全文
摘要:感动:我被他的言行感动了,注意,是感动的是言语和行为; 心动:我为他心动了,注意,心动是一种状态; 在相处的时候,人常常纠结感动还是心动;或者说感动,心动是不是都是必须的? 调查发现,对感动与心动的解释有: 感动是被动的一种认知,通常都经过仔细认真的思考和感受。心动大多数情况下是一种随性的心灵感受。 感动——你是个本分踏实有安全感的男人心动——你是个情趣浪漫坏坏的男人 女孩喜欢使自己心动的男...
阅读全文
摘要:multiply(a b)=multiply(2*a,b/2)#if b is an even number multiply(a b)=a+multiply(a,b-1)#if b is an odd number################################################################(define (newmultiply a b) ...
阅读全文
摘要:pow(b n)=pow(b*b,n/2)#if n is an even numberpow(b n)=b*pow(b,n-1)#else, n is an odd number####################################################(define (newpow b n) (define (fast-expt n b a) (co...
阅读全文
摘要:电影《怦然心动》的片尾曲<Let it be me> I bless the day I found you I want to stay around you And so I beg you Let it be me Don't take this heaven from one If you must cling to someone Now and forever Let it be...
阅读全文
摘要:今天做阅读理解看到下面一段话: The key word is balance. You need to find the right balance that works for you. Celebrate your successes and don’t dwell on your failures. Life is a progress, and so is striving for b...
阅读全文
摘要:先看上篇会容易看懂些,这篇的注释不多!import java.io.BufferedReader;import java.io.File;import java.io.FileReader;import weka.clusterers.Clusterer;import weka.clusterers.SimpleKMeans;import weka.core.Attribute;import we...
阅读全文
摘要:import java.io.BufferedReader;import java.io.File;import java.io.FileInputStream;import java.io.FileNotFoundException;import java.io.FileOutputStream;import java.io.FileReader;import java.io.ObjectInp...
阅读全文
摘要:If I were a boy again, I would practice perseverance more often, and never give up a thing because it was hard or inconvenient. If we want light, we must conquer darkness. Perseverance can sometimes e...
阅读全文
摘要:NLTK includes the following software modules (~120k lines of Python code): Corpus readers interfaces to many corpora Tokenizers whitespace, newline, blankline, word, treebank, sexpr, regexp, Pun...
阅读全文