自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(116)
  • 资源 (6)
  • 收藏
  • 关注

原创 Nutch org.apache.hadoop.util.DiskChecker$DiskErrorException

今天在用nutch抓数据是总是报错:> org.apache.hadoop.util.DiskChecker$DiskErrorException: Could not find any valid localdirectory for taskTracker/jobcache

2011-07-10 14:24:41 3776 1

原创 Ubuntu Unity 快捷键列表

# 作者: riku / 阅读: 1,473 / 本文采用CC BY-NC-SA 2.5协议授权,转载请注明本文链接。以下这份是由我翻译的, Ubuntu 11.04 Natty 中 Unity 界面的快捷键列表中文版,方便大家阅读。[来源]- 注:在普通 PC 上,Super 键通常就是 Win 键, Numpad 表示数字小键盘。Launcher (启动器)Super (按住)- 调用启动器。Super-1 或 2 或 3 直至 0 - 打开或聚焦到应用程序。Super-T - 打开垃圾箱。Al

2011-05-01 10:04:00 751

原创 【转】 Pentadactyl简单介绍

2010-11-21 14:21转载自 arurua最终编辑 arurua 发现Pentadactyl是个偶然,因为原本打算装的是Vimperator,看到满满一篇blog文洋溢盛赞Vimperator之词,也有自己装个玩玩的心意。 刚装Vimperator当然问题多多,幸好Vimperator不算是个软件,反而是Firefox下面的插件(准确点是扩展)。不是软件,就不会出现 类似emacs的可用可不用的现象(对本人而言确实如此,Vim也是安装过的,所以看到名字很容易想到Vim)。浏览器是每天必用的工具

2011-04-20 13:58:00 4369

原创 Expect 的基础知识 linux

转自:http://blog.csdn.net/Lethe1989/archive/2010/01/25/5253155.aspxExpect 的基础知识 Expect 是由 Don Libes 基于 Tcl 语言开发的,并被广泛应用于交互式操作和自动化测试的场景之中,它尤其适用于需要对多台服务器执行相同操作的环境中,可以大幅度得提高系统管理人员的工作 效率。目前,大部分 Unix/Linux 系统安装有 expect. 万一系统中没有,可以从 http://expect.nist.gov/ 下载相应的

2011-04-19 21:50:00 938

原创 expect 自动登陆的一个问题

#!/usr/bin/expect# write to login the lab desktop using expectset username "your name"set ipaddr "your ip address"set timeout 3spawn ssh $username@$ipaddrexpect "password:"sleep 3send "yourpassword/r"interact一开始没有用sleep 3, 总是在出现提示输入密码之前向终端中输入了"yourpassword

2011-04-19 21:49:00 558

原创 expect 的一个问题

#!/usr/bin/expect# write to login the lab desktop using expectset username "your name"set ipaddr "your ip address"set timeout 3spawn ssh $username@$ipaddrexpect "password:"sleep 3send "yourpassword/r"interact一开始没有用sleep 3, 总是在出现提示输入密码之前向终端中输入了"yourpassword

2011-04-19 21:48:00 701

原创 expect spawn、linux expect 用法小记

版权声明:转载时请以超链接形式标明文章原始出处和作者信息及本声明http://sysop.blogbus.com/logs/70787883.html使用expect实现自动登录的脚本,网上有很多,可是都没有一个明白的说明,初学者一般都是照抄、收藏。可是为什么要这么写却不知其然。本文用一个最短的例子说明脚本的原理。 脚本代码如下: ############################################## #!/usr/bin/expect set timeout 30 spaw

2011-04-19 09:16:00 1131

原创 Android输入法之——如何在代码中强制切换输入法

转载自:http://xiaohang.org/2011/02/android%E8%BE%93%E5%85%A5%E6%B3%95%E4%B9%8B%E2%80%94%E2%80%94%E5%A6%82%E4%BD%95%E5%9C%A8%E4%BB%A3%E7%A0%81%E4%B8%AD%E5%BC%BA%E5%88%B6%E5%88%87%E6%8D%A2%E8%BE%93%E5%85%A5%E6%B3%95/由于工作需要,追踪Android输入法Framework中了关于输入法切换的实现过程或者说

2011-04-14 19:31:00 3799

原创 python 操作 libreoffice spreadsheet

最近研究了一个,用python来向libreoffice spreadsheet中的写数据,openoffice管方网站的资料也不是很清楚,在网上找到的几个比较有用的网站有:http://wiki.services.openoffice.org/wiki/Python#PyUNO_Modules上面了有一个比较好的入门文档:http://lucasmanual.com/mywiki/OpenOffice还有一个人在论坛上写的一个比较有用的例子:http://www.oooforum.org/forum/vi

2011-04-11 15:16:00 8438 1

原创 vim的复制粘贴小结

原文地址:http://lsong17.spaces.live.com/blog/cns!556C21919D77FB59!603.entry内容:用vim这么久了,始终也不知道怎么在vim中使用系统粘贴板,通常要在网上复制一段代码都是先gedit打开文件,中键粘贴后关闭,然后再用vim打开编辑,真的不爽;上次论坛上有人问到了怎么在vim中使用系统粘贴板,印象里回复很多,有好几页的回复却没有解决问题,今天实在受不了了又在网上找办法,竟意外地找到了,贴出来分享一下。如果只是想使用系统粘贴板的话直接在输入模式按

2011-04-06 11:27:00 1845

原创 gvim 菜单栏与工具栏隐藏与显示动态切换

转自:http://liyanrui.is-programmer.com/articles/1791/gvim-menu-and-toolbar-toggle.html编辑 $HOME/.gvimrc 文件,添加以下代码:"Toggle Menu and Toolbar set guioptions-=m set guioptions-=T map :if &guioptions =~# 'T'         /set guioptions-=T         /set guioptions-=

2011-04-04 15:10:00 5858

原创 create GUI using pygtk and glade3

 Here is a hello world code I write.you can use gtk.builder to parse the glade source file, no longer need pyglade.other uses are the same with pyglade.#!/usr/bin/env python#sytem importsimport pygtkimport gtk#our own importsglade_file = "helloGlade.glade"

2011-04-04 14:02:00 800

原创 升级到 Ubuntu 11.04 Natty 的四种方法

转自:http://wowubuntu.com/upgrade-1010.html - 在线升级1 GUI 方式:在终端里输入以下命令sudo update-manager -d就会打开升级工具,可以看到升级到 11.04 的字样 ( 如下图),直接按 upgrade 升级吧。2  CLI 方式修改 /etc/update-manager/release-upgrades 文件,把里面的Prompt=lts改为Prompt=normal保存后退出,再执行sudo do-release-upgrade -d在

2011-04-03 18:04:00 879

原创 python 检测编码 Universal Encoding Detector

用python检测文件的编码Universal Encoding Detector是一个很好的工具,网址是:http://chardet.feedparser.org/用起来很方便Usage[link] Basic usageThe easiest way to use the Universal Encoding Detector library is with the detect function.[link]Example: Using the detect functionThe detect f

2011-04-03 13:42:00 4290 1

原创 Linux查看文件编码格式及文件编码转换

如果你需要在Linux中操作windows下的文件,那么你可能会经常遇到文件编码转换的问题。Windows中默认的文件格式是GBK(gb2312),而Linux一般都是UTF-8。下面介绍一下,在Linux中如何查看文件的编码及如何进行对文件进行编码转换。查看文件编码在Linux中查看文件编码可以通过以下几种方式:1.在Vim中可以直接查看文件编码:set fileencoding即可显示文件编码格式。如果你只是想查看其它编码格式的文件或者想解决用Vim查看文件乱码的问题,那么你可以在~/.vimrc 文件

2011-04-03 12:28:00 661

原创 Firefox 4 PPA for Ubuntu 10.04 and 10.10 users

Ubuntu 10.04 and 10.10 users wanting to upgrade to the latest release of Mozilla Firefox can do so by adding the Firefox Stable PPA to their system sources.To do this, open up the Ubuntu Software Center, head to Edit > Software Sources and click the ‘Other

2011-03-30 11:18:00 585

转载 vim 使用技巧汇总

功能强大的编辑器——Vi相信Vi是什么就不用我多介绍了,这个工具从Unix诞生以来一直是终端下的标准编辑器。几乎每个Unix或类Unix操作系统都提供了Vi。 Vim是Vi Improved的缩写,功能比起Vi来说有了很大的扩展。这里用的是Vi iMproved 6.3。在Vi 中移动光标 k 上h l 左 右 j 下^ 移动到该行第一个非空格的字符处w 向前移动一个单词,将符号或标点当作单词处理W

2011-03-29 11:08:00 467

原创 vim 使用技巧汇总

vim 中,* #可以高亮查找光标所在的单词,但是光标会跳到下/上一个匹配项那里。

2011-03-29 11:05:00 465

原创 android 在画布上画图片

@Overridepublic void onDraw(Canvas canvas) { Drawable buttonMore = getResources().getDrawable( R.drawable.button_triangle);                // setBounds(Rect rect); rect 是画布的一块区域,图片会缩放以填充Rect. buttonMore.setBounds(region.getBounds()); buttonMore.draw(canvas

2011-03-23 16:34:00 3379

原创 ubuntu SL410 笔记本外放和耳机同时出声的问题

更改codec的驱动模式:1、先备份sudo cp /etc/modprobe.d/alsa-base.conf /etc/modprobe.d/alsa-base.conf.backup2、编辑sudo gedit /etc/modprobe.d/alsa-base.conf//在文件的末尾加上以下一句options snd-hda-intel model=XXXXX3、保存,重启机器。关键在于“model=XXXXX“。其中XXXX就代表你的声卡的驱动模式。最后加上一句:"options snd_hda

2011-03-12 13:01:00 945

原创 中医博士彭鑫

中医博士彭鑫

2011-02-15 22:16:00 1052

原创 Stardict 真人发音配置

转自:http://wiki.ubuntu.org.cn/Stardict安装 WyabdcRealPeopleTTS如果你的源中有该软件包,直接sudo apt-get install wyabdcrealpeopletts没有的话,请到本站ftp 或WyabdcRealPeopleTTS.tar.bz2下载后执行sudo tar -xvf WyabdcRealPeopleTTS.tar.bz2 -C /usr/share发音设置如果您安装的是 ubuntu/gnome, 那么只要安装真人发音包之后 使

2011-01-22 18:14:00 3378

原创 Ubuntu中配置LaTeX中文的方法

转自:http://blog.csdn.net/yangzhuoluo/archive/2010/06/27/5697205.aspxLaTeX 中文文档配置Ubuntu 官方源就带有这个包,只需要 sudo apt-get install latex-cjk-all 即可。安装

2011-01-21 23:00:00 1668

原创 scrollView 横向

如果你把内容包含在ScrollView中,当内容超出高度时会自动出现滚动条。另外,使用控件HorizontalScrollView 来包住你的内容时,如果你的内容假设是一个LinearLayout, 那么当LinearLayout的宽度超过屏幕时, 将会自动产生滚动条,当你拖动鼠标时,效果跟scrollView一样,不过是横向而己

2011-01-21 18:01:00 2498

原创 android 画图画板清空

mBitmap = Bitmap.createBitmap(width, height, Bitmap.Config.ARGB_8888);mCanvas = new Canvas(mBitmap);将canvas里的mBitmap调用eraseColor(int color), color还可以是Color.TRANSPARENT;这样画板就透明了。

2011-01-20 14:48:00 3792 4

原创 python win32com.client IE google 搜索

##!/user/bin/env python# -*- coding: cp936 -*-import timefrom win32com.client import DispatchurlFileName = "urlFile.txt"outputFileName = "result.txt"outputFile = open(outputFileName, 'w')ie = Dispatch("InternetExplorer.Application")ie.visib

2011-01-18 17:13:00 3675

原创 python用win32com模拟浏览器

# -*- coding:UTF-8 -*- #!/user/bin/env python'''Created on 2010-9-1@author: chenzehe'''import win32com.clientfrom time import sleeploginurl='http://passport.cnblogs.com/login.aspx'loginouturl='http://passport.cnblogs.com/logout.aspx'username='XXX'password=

2011-01-18 11:19:00 3481

原创 urllib2 - The Missing Manual

 urllib2 TutorialIntroductionFetching URLsDataHeadersHandling ExceptionsURLErrorHTTPErrorError CodesWrapping it UpNumber 1Number 2BadStatusLine and HttpExceptioninfo and geturlOpeners and HandlersBasic AuthenticationProxiesSockets and LayersFootnotes Intro

2011-01-15 14:12:00 813

原创 11 AWESOME DD COMMANDS

dd is a common Unix program whose primary purpose is the low-level copying and conversion of raw data. dd is an application that will “convert and copy a file”according to the referenced manual page for Version 7 Unix and is most likely inspired from DD f

2011-01-14 23:03:00 904

原创 11 NOT SICK LINUX COMMANDS

1) CREATE A PDF VERSION OF A MANPAGEman -t manpage | ps2pdf – filename.pdfQuick and dirty version. I made a version that checks if a manpage exists (but it’s not a oneliner). You must have ps2pdf and of course Ghostscript installed in your box.Enhancement

2011-01-14 23:02:00 574

原创 Google Voice、Voice Search 安装

Google 刚刚一股脑的在 Android Market 里发布了 YouTube,Google Voice 和 Voice Search 的更新,带来了一些变化和性能提升。YouTube 现在可以发表评论还可以查看订阅。Google Voice 和 Voice Search 应用都只是做了一些错误修正以及稳定性和性能方面的改进。所有的更新都可以在 Android Market 上找到(当然需要 Market Enabler 将你伪装成米国人)。

2011-01-12 13:53:00 2102

原创 Android 中ListView内容刷新

转自: http://www.cnblogs.com/moonz-wu/archive/2010/04/18/1714529.html 最近在学习Android的listView控件时遇到了一个问题,如何添加一个Item到ListView中并及时的刷新出来。在网上查了很多帖子,很多人在问,也很多人在解答,但是总的来说都没找到详细的解决方案。对于ListView与数据库的同步,高手们建议使用 ContentProvider对象。但是如果我不使用数据库呢?也有人回答用notifyDataSetChanged()

2011-01-12 10:19:00 1787

原创 typedef 和#define定义别名的区别

typedef与#define 的区别一、typedef的用法    typedef常用来定义一个标识符及关键字的别名,它是语言编译过程的一部分,但它并不实际分配内存空间,实例像:typedef    int       INT;typedef    int       ARRAY[10];typedef   (int*)   pINT;    typedef可以增强程序的可读性,以及标识符的灵活性,但它也有“非直观性”等缺点。二、#define的用法    #define为一宏定义语句,通常用它来定义常量

2010-12-24 15:47:00 1275

原创 ubuntu wiki 下的编程简单入门

编程语言: http://wiki.ubuntu.org.cn/%E7%BC%96%E7%A8%8B%E8%AF%AD%E8%A8%80脚本:http://wiki.ubuntu.org.cn/%E8%84%9A%E6%9C%AC%E8%AF%AD%E8%A8%80  

2010-12-24 15:23:00 654

原创 python cookielib 登陆校内

转自: http://www.cnpythoner.com/post/30.html我今天给大家分享一个我自己用python写的自动登录 人人网的脚本,没办法就是懒!懒的输入帐号和密码,让python给我们减少工作量! 先上脚本吧,等下来讲下知识点:#!/usr/bin/env python#encoding=utf-8import sysimport reimport urllib2import urllibimport cookielibclass Renren(object):        def 

2010-12-23 17:07:00 1162

原创 Vrapper — Vim-like editing in Eclipse

website:http://vrapper.sourceforge.net/home/Vrapper is an eclipse plugin which acts as a wrapper for eclipse text editors to provide a Vim-like input scheme for moving around and editing text.Unlike other plugins which embed Vim in Eclipse, Vrapper imitate

2010-12-19 12:02:00 1217

原创 VIM开发C/C++插件cvim的安装及使用

利用c.vim插件,你可以实现添加文件头添加注释插入一些代码片段语法检查读函数文档注释代码块这一插件的作者是 Fritz Mehner, 目标就是打造程序员流畅的编辑环境。这一插件还能完成:Statement oriented editing of C / C++ programsSpeed up writing new code considerably.Write code and comments with a professional appearance from the beginning.Us

2010-12-17 17:23:00 43129

原创 rsync中文手册

转自:http://blog.csdn.net/joliny/archive/2007/09/25/1800767.aspx 必须在服务器A和B上都安装rsync,其中A服务器上是以服务器模式运行rsync,而B上则以客户端方式运行rsync。这样在web服务器A上运行rsync守护进程,在B上定时运行客户程序来备份web服务器A上需要备份的内容。rsync服务器1、rsync服务器的启动在web服务器A上需要以守护进程方式来启动rsync服务器,只需要运行:[root@www rsync-2.4.6]#

2010-12-13 16:50:00 638

原创 code style

3.1 CommentsExample 3-1 shows how the "hello world" program looks after comments are added.Example 3-1. hello2/hello2.cpp/******************************************************** * hello -- program to print out "Hello World". * * Not an espe

2010-12-10 13:12:00 424

原创 经典杂文

永远要像你不需要金钱那样地工作;永远要像你不曾被伤害过那样地爱;永远要像没有人在注视你那样地跳舞;永远要像在天堂那样地生活。 -- 马克吐温

2010-12-09 12:44:00 414

fcitx_3.6.2-1_i386.deb

fcitx是一款很好的linux下的中文件输入法,这是一个deb版,安装方便。

2010-03-17

JQuery_1.4_API

本CHM手册旨在帮助广大jQuery爱好者快速了解jquery库和jquery开发人员提供一份速查手册。

2010-03-17

Addison.Programming.in.Python.3.Dec.2008

The first book written from a completely "Python 3" viewpoint, Programming in Python 3 brings together all the knowledge you need to write any program, use any standard or third-party Python 3 library, and create new library modules of your own.

2010-03-17

Subversion 权威指南

Subversion 权威指南: 针对 Subversion 1.6 本书是为 Subversion 1.6 系列撰写的。在书中,我们尽力涵盖 Subversion 的所有内容

2010-03-17

深入浅出struts2

深入浅出struts2的精简版,可以大体看一下,页面数不多,让自己对struts2有一个快速的了解。

2010-03-17

latex short (使用手册英文版)

英文的latex使用手册,讲得比较全面,也比较初级。

2010-03-17

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除