字符串讲解 参考MSDN方法string.ToLower()string.ToUpper()string.Equals属性:string.length字符串分割: string str = "How are you ?Fine,Thank you?"; s...
分类:
其他好文 时间:
2014-07-16 22:57:15
阅读次数:
207
//SituationSystem prompts"xxx is not in the sudoers file"(xxx equals the user name)while executing command "sudo":sudo-iPassword:xxx isnotinthe sudoer...
分类:
其他好文 时间:
2014-07-11 22:09:28
阅读次数:
216
总结之前工作中遇到的一个问题。
背景:
运维用scribe从apache服务器推送过来的日志有重复记录,所以这边的ETL处理要去重,还有个需求是要按业务类型多目录输出,方便挂分区,后面的使用。
这两个需求单独处理都没有问题,但要在一个mapreduce里完成,需要一点技巧。
1、map输入数据,经过一系列处理,输出时:
if(ttype.equals("other"))...
分类:
其他好文 时间:
2014-07-11 00:20:13
阅读次数:
226
关于JAVA中的==和equals函数的区别今天在研读Thinkinginjava时注意到==和equals的区别,于是就通过查看JDK_API才读懂了他们的区别,于是将心得分享一下,望批评指正,谢谢。在JAVA程序中一般的基本类型(值类型int,double,boolean等)都只能通过==来判断...
分类:
编程语言 时间:
2014-07-10 16:13:39
阅读次数:
348
We all know how to search through an array for an element whose value equals the target value, but how to search for the element that has value greate...
分类:
其他好文 时间:
2014-07-10 16:08:21
阅读次数:
168
JAVA中String对象的比较 1.首先介绍三个String对象比较的方法:(1)equals:比较两个String对象的值是否相等。例如: String str1 = "hello quanjizhu";String str2 =str1+"haha";String str3 = new Str...
分类:
其他好文 时间:
2014-07-09 19:32:06
阅读次数:
184
题目
Given a binary tree and a sum, determine if the tree has a root-to-leaf path such that adding up all the values along the path equals the given sum.
For example:
Given the below binary tree ...
分类:
其他好文 时间:
2014-07-09 10:32:42
阅读次数:
151
//Situation System prompts"xxx is not in the sudoers file"(xxx equals the user name)while executing command "sudo": sudo-i Password: xxx ...
分类:
其他好文 时间:
2014-07-06 21:39:36
阅读次数:
175
一、&和&&的区别?
&和&&都可以用作逻辑与的运算符,表示逻辑与(and),当运算符两边的表达式的结果都为true时,整个运算结果才为true,否则,只要有一方为false,则结果为false。
&&还具有短路的功能,即如果第一个表达式为false,则不再计算第二个表达式,例如,对于if(str != null && !str.equals(“”))表达式,当str为null时,后面的表...
分类:
编程语言 时间:
2014-07-06 08:37:36
阅读次数:
197
常用类库学习.net就是学习它的无数个类库怎么用,先看两个简单的String 字符串,不可变特性。字符串可以看成字符数组属性 Length方法IsNullOrEmpty() 静态方法ToCharArray()ToLower()string不可变性ToUpper()Equals() 忽略大小写的比较J...
分类:
其他好文 时间:
2014-07-05 21:19:46
阅读次数:
259