上一页 1 ··· 4 5 6 7 8 9 10 11 下一页
  2014年5月8日
摘要: 运行:services.msc选择:VMware Authorization Service,运行它 阅读全文
posted @ 2014-05-08 11:36 zhaofeng555 阅读(344) 评论(0) 推荐(0)
  2014年4月2日
摘要: a、ssh-keygen -t rsa -P '' -f ~/.ssh/id_rsa b、cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys c、chmod 600 ~/.ssh/authorized_keys d、sudo service sshd restart 阅读全文
posted @ 2014-04-02 17:12 zhaofeng555 阅读(428) 评论(0) 推荐(0)
摘要: 1.下载Django。地址:https://www.djangoproject.com/download/2.解压3中得到的Django-1.6.2.tar.gz。使用下面的命令进行解压,解压后在当前目录得到Django-1.6.2文件夹:tar xzvf Django-1.6.2.tar.gz3.切换目录到Django-1.6.2文件夹下。命令: cd Django-1.6.24.安装Django(这一步需要python的支持,但默认安装linux的时候都会安装python)。命令: sudo python setup.py install5.进入python shell模式。命令: pyt 阅读全文
posted @ 2014-04-02 13:59 zhaofeng555 阅读(367) 评论(0) 推荐(0)
摘要: 为用户添加sudo命令功能:打开etc下的sudoers文件vi /etc/sudoers在 rootALL=(ALL)ALL 下面添加如下一行,然后保存关闭hadoopALL=(ALL)ALL(注1:网上有文档上是说先切换到root用户,然后修改sudoers的权限,再打开添加hadoopALL=(ALL)ALL ,然后再将权限改回为只读,这样就要特别注意一定要将权限改回为只读,不然“sudo”命令就无法使用了,很悲剧的说注2:添加 hadoopALL=(ALL)ALL 的意义在于能让hadoop用户使用“sudo”命令 阅读全文
posted @ 2014-04-02 11:40 zhaofeng555 阅读(693) 评论(0) 推荐(0)
摘要: 修改/etc/environment文件导致系统起不来。长按shift,进入恢复界面,然后以root方式登录命令行界面然后vi修改/etc/environment文件提示:Unable to open swap file for "/etc/environment",recovery impossible解决方法:mount /dev/hdax / -o rw,remount然后就可以修改 /etc/environment 阅读全文
posted @ 2014-04-02 09:46 zhaofeng555 阅读(479) 评论(0) 推荐(0)
  2014年3月28日
摘要: Redis安装:$wgethttp://redis.googlecode.com/files/redis-2.4.5.tar.gz$tarxzfredis-2.4.5.tar.gz$cdredis-2.4.5$make&makeinstall测试:$src/redis-server$src/redis-cliauthhaojg//haojg是密码redis>setfoobarOKredis>getfoo"bar"将redis.conf中的daemonizeno变成daemonizeyes$cd../utils/$./install_server//安装启 阅读全文
posted @ 2014-03-28 14:02 zhaofeng555 阅读(158) 评论(0) 推荐(0)
  2014年3月26日
摘要: @RequestMapping(value = "/export.do")public void exportpushuserByareacode(HttpServletRequest req, HttpServletResponse rsp) throws Exception { List list = .....; String name="导出的文件.csv"; name = new String(name.getBytes("GBK"), "ISO8859-1"); rsp.setContentType(& 阅读全文
posted @ 2014-03-26 10:40 zhaofeng555 阅读(1871) 评论(0) 推荐(0)
  2014年3月11日
摘要: public class MergeSort { private static void mergeSortTest() { int[] in = { 2, 5, 3, 8, 6, 7, 1, 4, 0, 9 }; Utils.printArray("归并排序前:",in); int a[] = mergeSort(in); Utils.printArray("归并排序后:",a); } private static int[] mergeSort(int[] arr) { if (arr.length == 1) { return arr; } els 阅读全文
posted @ 2014-03-11 21:00 zhaofeng555 阅读(140) 评论(0) 推荐(0)
摘要: public class InsertSortUtils { public static void main(String[] args) { insertSortTest(); shellSortTest(); } private static void insertSortTest() { int[] values = { 5, 2, 4, 1, 3 }; System.out.print("直接插入排序前: "); Utils.printArray(values); insertSort(values); System.out.print("直接插入排序后: 阅读全文
posted @ 2014-03-11 20:59 zhaofeng555 阅读(146) 评论(0) 推荐(0)
摘要: public class ExchangeSortUtils { // 冒泡 public static void bubbleSort(int[] array) { int length = array.length; int temp; boolean isSort; for (int i = 1; i array[j + 1]) { // 交换 temp = array[j]; array[j] = array[j + 1]; array[j + 1] = temp; isSort = true; } } if (!isSo... 阅读全文
posted @ 2014-03-11 20:58 zhaofeng555 阅读(301) 评论(0) 推荐(0)
上一页 1 ··· 4 5 6 7 8 9 10 11 下一页