package arithmetic;import java.util.Arrays;/** * 找出一个数组中依次最大的k个元素 * @author SHI */public class FindMaxFigure { public static void main(String[] arg...
分类:
编程语言 时间:
2015-01-27 23:18:27
阅读次数:
175
Assume ifle and ofile is the string object storing the names of input and output files' names.string ifile = "inputFile.txt";string ofile = "outputFil...
分类:
其他好文 时间:
2015-01-27 23:14:54
阅读次数:
343
一天一段scala代码(-)
为了更好的驾驭spark,最近在学习scala语言特性,主要看《快学scala》,顺便把一些自己认为有用的代码记下来。
package examples
object Example1
{
def main(args: Array[String])
{
//val用于声明可变变量
var coun...
分类:
其他好文 时间:
2015-01-27 21:52:29
阅读次数:
210
转自:----转自----:转自----:转自----:转自----:转自----:转自----:转自----:转自----:转自----:转自----:转自----:转自----:String 字符串常量StringBuffer 字符串变量(线程安全)StringBuilder 字符串变量(非线程...
分类:
其他好文 时间:
2015-01-27 21:49:08
阅读次数:
182
一、相关知识点 1. 栈(stack)与堆(heap)都是Java用来在Ram(随机存取存储器)中存放数据的地方,栈数据可以共享。 2. 栈的优势是,存取速度比堆要快,仅次于直接位于CPU中的寄存器。缺点是,存在栈中的数据大小与生存期必须是确定的,缺乏灵活性。 堆的优势是可以动态地分...
分类:
其他好文 时间:
2015-01-27 21:38:34
阅读次数:
253
// 定义结构体type TmyRec= record name:string[10]; password:string[10]; end;function RawToBytes(const AValue; const ASize: Integer): TBytes;begin S...
分类:
其他好文 时间:
2015-01-27 21:30:58
阅读次数:
156
描述:
Given a string, find the length of the longest substring without repeating characters. For example, the longest substring without
repeating letters for "abcabcbb" is "abc", which the length is ...
分类:
其他好文 时间:
2015-01-27 20:21:40
阅读次数:
149
描述:
Given a string S,
find the longest palindromic substring in S.
You may assume that the maximum length of S is
1000, and there exists one unique longest palindromic substring.
思路:
刚开始非常天...
分类:
其他好文 时间:
2015-01-27 20:21:30
阅读次数:
205
先看代码 1 public class FileReader { 2 public static String readFile(String fileName) { 3 String fileContent = ""; 4 try { 5 ...
分类:
编程语言 时间:
2015-01-27 20:18:40
阅读次数:
154
原题地址找规律+模拟,真没啥可说的。代码: 1 string intToRoman(int num) { 2 string res; 3 4 while (num >= 1000) { 5 res += "M"; 6 ...
分类:
其他好文 时间:
2015-01-27 20:16:36
阅读次数:
170