2013年8月29日

ubuntu 12.04 下安装 MySQL 5.5

摘要: 参考:http://www.linuxidc.com/Linux/2011-12/48920.htm《Ubuntu 11.04 通过 apt 安装 MySQL 5.1 的全过程记录》说明:在mysql官网下载ubuntu下的安装包进行安装,不是一件容易的事。这里不是指下载,而是指安装配置过程。 所以可以使用ubuntu的软件中心或者使用以下指令进行安装,这就免去了一些细节(更多的是使用了默认的设置)。操作过程: 1)sudo apt-get install mysql-server#这会执行一段比较长的时间,然后出现设置root密码提示,以下截取部分 2)New password for t. 阅读全文

posted @ 2013-08-29 15:38 一直很安静的我 阅读(308) 评论(0) 推荐(0) 编辑

2013年8月28日

Ubuntu 12.04 如何使用root登录?

摘要: 参考:http://www.lupaworld.com/article-219280-1.html《Ubuntu 12.04 root默认密码? 如何使用root登录?》说明:root 账户没有密码,想使用root帐户登录,必须首先启用的帐户,并重新设置或添加一个新的密码。操作过程: 1)打开终端(ctrl+alt+t) 2)执行:sudo passwd -u root# 启用root账户。 3)给root创建一个密码:sudo passwd root #设置密码。 4)执行:sudo sh -c ‘echo “greeter-show-manual-login=true” >> 阅读全文

posted @ 2013-08-28 22:16 一直很安静的我 阅读(110) 评论(0) 推荐(0) 编辑

2013年8月26日

将两个已排好序的数组,合并成一个新的排好序的数组

摘要: 1 /** 2 * 3 * @author hanxin 4 * 标题:将两个已排好序的数组,合并成一个新的排好序的数组 5 * 6 */ 7 public class Merge { 8 9 /**10 * @param args11 */12 public static void main(String[] args) {13 // TODO Auto-generated method stub14 ArrayList C=mergeAB(A, B);15 System.out.printl... 阅读全文

posted @ 2013-08-26 15:16 一直很安静的我 阅读(614) 评论(0) 推荐(0) 编辑

求数组元素的并集

摘要: 1 /** 2 * 3 * @author hanxin 4 * 标题:实现C=A并B 5 */ 6 7 public class Union 8 { 9 public static int[] A={3,5,20,8,11,2,6};//数组A10 public static int[] B={2,6,8,9,11,15,5,20,44};//数组B11 public static ArrayList union(int[] A,int [] B)12 {13 ArrayList C=new ArrayList();14 ... 阅读全文

posted @ 2013-08-26 08:55 一直很安静的我 阅读(208) 评论(0) 推荐(0) 编辑

2013年8月24日

插入排序算法的Java实现

摘要: 1 package jgf.hmw.paixu; 2 3 public class Sort_Insert { 4 5 /** 6 * @author hanxin 7 * 标题:插入排序算法 8 */ 9 //待插入数组10 public static int [] array={4,2,5,8,3,7,1,9,6};11 //插入排序算法12 public static int [] inSort(int [] darray)13 {14 if(darray[0]>darray[1])//处... 阅读全文

posted @ 2013-08-24 09:25 一直很安静的我 阅读(200) 评论(0) 推荐(0) 编辑

导航