码迷,mamicode.com
首页 >  
搜索关键字:class    ( 183544个结果
128 Longest Consecutive Sequence
public class Solution { public int longestConsecutive(int[] nums) { HashMap hs = new HashMap(); for (int i : nums) { hs.pu...
分类:其他好文   时间:2015-05-29 11:29:33    阅读次数:109
【数据结构】栈的应用--括号的匹配(c++)
头文件: #pragma once #include #include #include using namespace std; template class SeqStack { public: SeqStack(size_t sz = INIT_SZ); ~SeqStack(); public: bool empty()const; bool full()cons...
分类:编程语言   时间:2015-05-29 10:11:53    阅读次数:143
Java基础知识之IO(1)
IO中主要的类和接口File、InputStream、OutputStream、Reader、Writer、Serialzable接口File类File类应用的小例子import java.io.File; import java.io.IOException;public class FileDemo { public static void main(String[] args) {...
分类:编程语言   时间:2015-05-29 10:11:29    阅读次数:147
【数据结构】循环队列的实现(c++)
头文件: #pragma once #include #include using namespace std; template class CQueue { public: CQueue(size_t sz = INIT_SZ); ~CQueue(); public: bool full()const; bool empty()const; void show()c...
分类:编程语言   时间:2015-05-29 10:10:46    阅读次数:208
Hadoop之——Combiner编程
一、Mapper类的实现 /** * KEYIN 即k1 表示行的偏移量 * VALUEIN 即v1 表示行文本内容 * KEYOUT 即k2 表示行中出现的单词 * VALUEOUT 即v2 表示行中出现的单词的次数,固定值1 */ static class MyMapper extends Mapper{ protected void map(LongWr...
分类:其他好文   时间:2015-05-29 10:09:21    阅读次数:179
android 初识socket通信--java程序做服务器
1.新建一个java工程做服务器public class MyServer { String str ; public MyServer(){ try { //服务器端的声明用serversocket,括号里面写端口号,端口号是自己指定的 ServerSocket ss = new ServerSocket(4700...
分类:移动开发   时间:2015-05-29 10:08:42    阅读次数:115
详解嵌套ListView、ScrollView布局显示不全的问题
在项目开发中,可能经常遇到嵌套ListView、ScrollView的问题,百度一搜,都是现成的代码,而且都是一样的,就是重写onMeasure方法,但是为什么要那么写,估计就没多少人知道了,这里进行深入的剖析一下下,重点看onMeasure方法,代码如下:/** * Created by hailonghan on 15/5/28. */ public class ExpandListView...
分类:其他好文   时间:2015-05-29 10:08:24    阅读次数:302
Hadoop之——Partitioner编程
一、Mapper类的实现 static class MyMapper extends Mapper{ protected void map(LongWritable key, Text value, org.apache.hadoop.mapreduce.Mapper.Context context) throws IOException ,InterruptedException {...
分类:其他好文   时间:2015-05-29 10:06:31    阅读次数:118
泛型限定<? extends Object>
关于泛型限定: 向上限定。意思就是说只能传递E类型以及E类型的子类; 代码: package itheima; import java.util.ArrayList; import java.util.Iterator; import java.util.List; /** * 泛型限定 * @author Administrator * */ public class Gene...
分类:其他好文   时间:2015-05-29 10:03:16    阅读次数:123
85 Maximal Rectangle
public class Solution { public int maximalRectangle(char[][] matrix) { if (matrix == null || matrix.length == 0) { return 0; ...
分类:其他好文   时间:2015-05-29 09:52:28    阅读次数:104
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!