码迷,mamicode.com
首页 >  
搜索关键字:equals == 对象比较    ( 4743个结果
2014年7月10日
字符串讲解 参考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
Linq 中 表连接查询
1 public void Test(){2 3 var query = from a in A join b in B on A.Id equals B.Id into c4 from d in c.DefaultIfEmpty()5 ...
分类:其他好文   时间:2014-07-14 08:43:30    阅读次数:187
Path Sum
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 and sum ...
分类:其他好文   时间:2014-07-13 13:58:01    阅读次数:184
spring mvc 控制器方法传数组对象的一些经验
因为项目需要在一个表单里面提交多个对象,比较好的做法就是直接在控制器方法参数里传一个数组。 由于Spring mvc框架在反射生成控制方法的参数对象的时候会调用这个类的getDeclaredConstructor方法来获得构造函数。 根据这个方法的jdk文档,这个类是一个数组对象时,这个方法会抛出java.lang.NoSuchMethodException,然后一直卡在这个问题。 同事后来...
分类:编程语言   时间:2014-07-12 19:35:44    阅读次数:372
Collection子接口(List/Set/Queue/SortedSet)
Collection主要的子接口: List:可以存放重复内容Set:不能存放重复内容,所有重复的内容靠hashCode()和equals()两个方法区分Queue:队列接口SortedSet:可以对集合中的数据进行排序 List接口: 总结了List接口的扩展方法,即包含有增删改查方法. List接口常用的子类: ArrayList:可以...
分类:其他好文   时间:2014-07-12 19:26:08    阅读次数:274
Error prompt:“xxx is not in the sudoers file”----Solution
//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
用一个MapReduce job实现去重,多目录输出功能
总结之前工作中遇到的一个问题。 背景: 运维用scribe从apache服务器推送过来的日志有重复记录,所以这边的ETL处理要去重,还有个需求是要按业务类型多目录输出,方便挂分区,后面的使用。 这两个需求单独处理都没有问题,但要在一个mapreduce里完成,需要一点技巧。 1、map输入数据,经过一系列处理,输出时: if(ttype.equals("other"))...
分类:其他好文   时间:2014-07-11 00:20:13    阅读次数:226
java中的==和equals的区别
关于JAVA中的==和equals函数的区别今天在研读Thinkinginjava时注意到==和equals的区别,于是就通过查看JDK_API才读懂了他们的区别,于是将心得分享一下,望批评指正,谢谢。在JAVA程序中一般的基本类型(值类型int,double,boolean等)都只能通过==来判断...
分类:编程语言   时间:2014-07-10 16:13:39    阅读次数:348
Binary search for the first element greater than target
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
【LeetCode】Path Sum
题目 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
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!