1 2 3 4 5 ··· 7 下一页
摘要: 修改/etc/fstab, /etc/rc.d/rc.sysinit, /etc/rc.local等系统启动文件时误操作就会造成linux无法进入,有rescue盘可以容易修复.下述方法适合于没有rescue盘时修复系统.grub菜单中选择linux,按e,e,进入编辑模式,kernel (hd0,... 阅读全文
posted @ 2015-11-09 13:31 irun 阅读(7011) 评论(0) 推荐(0) 编辑
摘要: 类型转换 int(x [,base ]) 整数 long(x [,base ]) 长整数 float(x ) 浮点数 complex(real [,imag ]) 复数 str(x ) 字符串 repr(x ) 表达式字符串 eval(str ) 用来计算在字符串中的有效Python表达式,并返回一 阅读全文
posted @ 2015-10-15 17:30 irun 阅读(237) 评论(0) 推荐(0) 编辑
摘要: I.Given an array of integers, every element appearstwiceexcept for one. Find that single one.Note:Your algorithm should have a linear runtime complexi... 阅读全文
posted @ 2015-09-29 14:40 irun 阅读(119) 评论(0) 推荐(0) 编辑
摘要: 1.以前的方法如果是要获得程序运行的当前目录所在位置,那么可以使用os模块的os.getcwd()函数。如果是要获得当前执行的脚本的所在目录位置,那么需要使用sys模块的sys.path[0]变量或者sys.argv[0]来获得。实际上sys.path是Python会去寻找模块的搜索路径列表,sys... 阅读全文
posted @ 2015-09-24 10:21 irun 阅读(682) 评论(0) 推荐(1) 编辑
摘要: 1. /home/lvtest/test/test.py from datetime import datetimenow=datetime.now()f=open('test.log','a')f.write('%s '%now)f.close()2. edit/etc/rc.local wit... 阅读全文
posted @ 2015-09-21 15:18 irun 阅读(231) 评论(0) 推荐(0) 编辑
摘要: Moduleoptparse from optparse import OptionParser def opt(): usage = "usage: %prog [options] arg" parser = OptionParser(usage=usage) entries ... 阅读全文
posted @ 2015-09-17 16:50 irun 阅读(225) 评论(0) 推荐(0) 编辑
摘要: Write a program to find the node at which the intersection of two singly linked lists begins.For example, the following two linked lists:A: a... 阅读全文
posted @ 2015-09-10 20:54 irun 阅读(156) 评论(0) 推荐(0) 编辑
摘要: Given a string, determine if it is a palindrome, considering only alphanumeric characters and ignoring cases.For example,"A man, a plan, a canal: Pana... 阅读全文
posted @ 2015-09-10 20:41 irun 阅读(165) 评论(0) 推荐(0) 编辑
摘要: Merge two sorted linked lists and return it as a new list. The new list should be made by splicing together the nodes of the first two lists.Tags:Link... 阅读全文
posted @ 2015-09-10 20:02 irun 阅读(161) 评论(0) 推荐(0) 编辑
摘要: Given two stringssandt, determine if they are isomorphic.Two strings are isomorphic if the characters inscan be replaced to gett.All occurrences of a ... 阅读全文
posted @ 2015-09-09 21:36 irun 阅读(150) 评论(0) 推荐(0) 编辑
1 2 3 4 5 ··· 7 下一页