Linux CentOS 6.6安装JDK1.7 目录 1、下载JDK 2、卸载JDK 3、安装JDK 3.1、.rpm后缀格式JDK安装方式 3.2、.tar.gz后缀格式JDK安装方式 4、验证安装 1、下载JDK 根据操作系统的位数下载对应的JDK,操作系统是32位的就下32位的JDK,64位 ...
分类:
系统相关 时间:
2016-10-30 20:11:52
阅读次数:
389
1 读取txt文件。跟c相比,python的文件读写简直是方便的可怕 首先是读取文件 首先获得文件名称,然后通过 open函数打开文件,通过for循环逐行读出文件内容 2 写入文件并保存,同理,新建一个文件,也是通过open函数。神奇。 all.append(entry) ##write lines ...
分类:
编程语言 时间:
2016-10-30 13:32:32
阅读次数:
195
题目: Given n non-negative integers a1, a2, ..., an, where each represents a point at coordinate (i, ai). n vertical lines are drawn such that the two e ...
分类:
其他好文 时间:
2016-10-30 00:02:52
阅读次数:
184
load data infile '/tmp/test.csv' into table test_info fields terminated by ',' optionally enclosed by '"' escaped by '"' lines terminated by '\r\n'; f ...
分类:
数据库 时间:
2016-10-29 07:44:51
阅读次数:
1126
抛砖引玉: 文件是我们储存信息的地方,我们经常要对文件进行读、写、删除等的操作,在Python中,我们可用Python提供的函数和方法方便地操作文件。 ***********************************************文件处理的函数和方法***************** ...
分类:
编程语言 时间:
2016-10-29 02:01:45
阅读次数:
196
沉迷于刷水 以前的那个二分写法过不了QAQ 换了一种好像大家都比较常用的二分。原因还不是很清楚。 【题目大意】 给出一张图,可以将其中k条边的边权减为0,求1到n的路径中最长边的最小值。 【思路】 二分答案,即最长边的最小值x。对于每次check(x),我们将边权大于x的边设为1,边权小于等于x的边 ...
分类:
其他好文 时间:
2016-10-27 01:03:16
阅读次数:
191
Given a string that consists of only uppercase English letters, you can replace any letter in the string with another letter at most k times. Find the ...
分类:
其他好文 时间:
2016-10-26 09:40:13
阅读次数:
431
【问题】 解压spark的tar包后,执行bin/spark-shell,执行val lines=sc.textFile("README.md")时,抛错error: not found: value sc 【解决办法】 这是因为shell启动时没有初始化sparkContext,修改conf/sp ...
分类:
其他好文 时间:
2016-10-25 14:11:45
阅读次数:
502