自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(15)
  • 资源 (1)
  • 收藏
  • 关注

原创 查找日志文件中的信息

1、#查找日志文件中fail所在行以及上下各一行并输出zjm@ubuntu:~$ cat /home/zjm/python_test/re_fold/test.log | grep -C 1 'fail'hello hello output failhello hello output failed#打印出fail所在行以及前1行(Before)zjm@ubuntu:~

2015-09-29 22:08:36 1112

原创 Python正则表达式实例演练

参考自:http://blog.jobbole.com/74844/1、首先python中要使用regex,必须导入模块 re>>>import re\的使用,要想输出元字符(. * - + \ $ ^ 等),必须在前边加\ , 才能输出。>>> string='this is a\nstring'>>> print stringthis is astring>

2015-09-29 21:23:53 697

原创 the built-in function of reduce in python

Now,there is a practical function, reduce(arg1,arg2),then we could learn how use this function in a example.#!/usr/bin/env pythondef myadd(x,y): return x+ydef mysub(x,y): return x-ydef m

2015-09-28 00:00:58 466

原创 the basic operation of sequence in python

in the last passage , we hava learned slice operation of consquence , then we will learn the basic operation of consquence.First , part of basic  function is built-in function .Then , if you want

2015-09-24 14:09:14 504

原创 slice operation of consequence in python

the  slice operation consequence is easy.the prototype of the function  is str[start:end:step] .then let's see the  following examples:>>>str1='abcde'>>>str1[1:3]'bc'>>>str1[:]    #defau

2015-09-24 13:07:34 427

原创 raw_input() and input() in python

there are two common input function,it's raw-input() and input(),thier function is receive the input from console ,but they have received and operated the data ,which is different. Then let's discuss

2015-09-23 23:56:46 437

原创 the file opeartion in python(一)

#! /usr/bin/env python# coding = utf-8file_path = "/home/zjm/python_test/file_fold/hello"f = open(file_path,"w") #write mode ,if not exits,then create one filef.write("firstline\n")f.write("secon

2015-09-23 00:14:50 418

原创 如何查看url的IP地址,以及IP地址所属区域

一张图说明一切问题:这是IPv6地址,需要单独的查询工具,而ipv4地址,百度一下“ip地址查询” 就ok了

2015-09-19 00:32:13 6368

转载 VMware的三种网络连接方式

1、桥接,相当于虚拟机和主机连接在同一个交换机上,即处于同一个 LAN,类似于日常中的对等网形式。2、NAT,可以这样理解,主机有两块网卡,一块连接外网,一块连到虚拟机的网络,然后在主机上启用了 NAT 服务,虚拟机复用主机的地址联网。这种模式下虚拟机不能主机所在 LAN 的其它计算机访问,除非做端口映射(主机之所以可以访问,是因为主机上有一块 VMnet8 网卡连接到这个虚拟子网)。

2015-09-18 21:20:45 463

原创 Ubuntu常用命令

软件安装:首先做的是 apt-get update   更新/etc/apt/souce.list列表是最新的。然后就是安装所需要的软件,但是在安装之前先删除一下删除命令:apt-get autoremove --purge packagname   删除包以及所依赖的软件包+配置文件安装所需要的软件:apt-get install packagename

2015-09-18 21:15:17 635

原创 ubuntu14.04下载android source code

通过这两三天自己刚开始用ubuntu系统并下载android源码的过程中,走了很多弯路,现在将其整理一下,分享给大家。注意:一定不要百度,一定要google,百度很多都是错误的或者是很旧的已经不适用的。本来写好的,最后全删了,还是看官方文档吧,不误导大家了https://source.android.com/source/downloading.html#using-a-l

2015-09-18 20:00:33 592

原创 ubuntu换成163的源

把ubuntu的源全都换成163的源,即将/etc/apt/sources.list文件中的域名都改为mirrors.163.com注意在改之前注意先将sources.list备份为sources.list.backup

2015-09-17 21:28:32 412

原创 ubuntu安装google chrome浏览器

前提是你能访问外网:如果不能请参看:http://blog.csdn.net/zjm750617105/article/details/48501303下载google chrome浏览器,终端命令如下:wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb   //下载s

2015-09-17 21:27:12 550

转载 dpkg:处理google-chrome-stable(--install)时候出错

转载自 http://blog.csdn.net/eland_edwiin/article/details/8177997ubuntu下安装chrome出现了错误:dpkg:处理 google-chrome-stable (--install)时出错:   正在解压缩 google-chrome-stable (从 google-chrome-stable_current_i386.deb

2015-09-16 21:14:10 13252

原创 ubuntu下安装软件的三种方法

今天晚上捣鼓ubuntu下软件安装,之前只是在终端敲一下简单的命令和vim的使用最近有需求需要通多ubuntu上安装chrome,尝试了几种方法,现总结一下分享给大家,如果有错误的地方望给出评论,谢谢!第一种就只直接搜索并安装:在终端中输入命令:首先是搜索源中有没有chrome软件sudo  apt-cache search chrome发现我的sources.list

2015-09-16 20:59:50 5556

mysql中文手册

很好的中文学习手册,平时没事多看看手册,mysql还是不难的

2013-06-05

空空如也

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

TA关注的人

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