摘要:1、首先检查linux有没有安装python-pip包,直接执行 yum install python-pip 2、没有python-pip包就执行命令 yum -y install epel-release 3、执行成功之后,再次执行yum install python-pip 4、对安装好的pi
阅读全文
摘要:1. gcc ... -omain -g -g : The function and variable names will be saved.2. start gdb gdb appName set args xxx xxx xxx Pass arguments to the app3. l co
阅读全文
摘要:1.vim的三种工作模式(vim是vi的增强版本) 命令模式 按ESC键后就会进入命令模式,命令模式下的常用操作有复制/黏贴/删除/撤销等.... 编辑模式 在命令模式下输入插入命令i(insert)、附加命令a (append)、打开命令o(open)、 修改命令c(change)、取代命令r或替
阅读全文
摘要:<!DOCTYPE html><html lang="en"><head> <meta charset="UTF-8"> <title>span</title></head><body> <fieldset> <legend>login</legend> <label for="username">
阅读全文
摘要:<!DOCTYPE html><html lang="en"><head> <meta charset="UTF-8"> <title>span</title></head><body> <table border="1"> <tr> <td>row 1, number1</td> <td>row
阅读全文
摘要:<!DOCTYPE html><html lang="en"><head> <meta charset="UTF-8"> <title>span</title></head><body> <label for="username">username:</label> <input id="usern
阅读全文
摘要:<!DOCTYPE html><html lang="en"><head> <meta charset="UTF-8"> <title>span</title></head><body> <a href="http://www.oldboyedu.com"> <img src="https://gs
阅读全文
摘要:<!DOCTYPE html><html lang="en"><head> <meta charset="UTF-8"> <title>span</title></head><body> <ul> <li>asdf</li> <li>asdf</li> <li>asdf</li> <li>asdf<
阅读全文
摘要:<!DOCTYPE html><html lang="en"><head> <meta charset="UTF-8"> <title>span</title></head><body> <a href="http://www.baidu.com" target="_blank">baidu</a>
阅读全文
摘要:<!DOCTYPE html><html lang="en"><head> <meta charset="UTF-8"> <title>span</title></head><body> <span>hello</span> <span>hello</span> <span>hello</span>
阅读全文
摘要:<!DOCTYPE html><html lang="en"><head> <meta charset="UTF-8"> <title>h</title></head><body> <h1>liujun</h1> <h2>liujun</h2> <h3>liujun</h3> <h4>liujun<
阅读全文
摘要:<!DOCTYPE html><html lang="en"><head> <meta charset="UTF-8"> <title>special char</title></head><body> <a href="http://www.baidu.com">ba &nb
阅读全文
摘要:<!DOCTYPE html><html lang="en"><head> <meta charset="UTF-8"> <title>p</title></head><body> <p>ddddddddddddddddddddddddddddddddddddddddddddddddddd <br>
阅读全文
摘要:<!DOCTYPE html><html lang="en"><head> <meta charset="UTF-8"> <!-- tell the browser what charset to use --> <meta http-equiv="Refresh" Content="3;Url=h
阅读全文
摘要:1. Functions associated with creating a process system : execute a shell command and it's a blocking function system("ls -l"); Create an independent p
阅读全文
摘要:1. ssize_t write(int fd,void *buf,size_t size); fd : File descriptor buf : The data you want to write into a kernal object. size_t size : The size of
阅读全文
摘要:#!/usr/bin/env python# Author:liujunclass People(object): def __init__(self,name,age): self.name = name self.age = age def eat(self): print("%s is eat
阅读全文
摘要:#!/usr/bin/env python# Author:liujunclass People(object): def __init__(self,name,age): self.name = name self.age = age def eat(self): print("%s is eat
阅读全文
摘要:#!/usr/bin/env python# Author:liujunclass Role: n = 123; # This is a class variable stored in class(not in a object) name = "class name" n_list = [] d
阅读全文
摘要:1 #include<stdio.h> 2 #include<unistd.h> 3 main() 4 { 5 //situation 1 6 //int *p = sbrk(4); // Here we allocate 1024(decides to the system) bytes of m
阅读全文
摘要:wget http://download.qt.io/archive/qt/5.9/5.9.2/qt-opensource-linux-x64-5.9.2.runchmod +x qt-opensource-linux-x64-5.9.2.run./qt-opensource-linux-x64-5
阅读全文
摘要:#!/usr/bin/env python# Author:liujunimport pickledef sayHi(name): print("hello,",name)av_catalog = { "Am":{ "www.youporn.com": ["很多免费的,世界最大的","质量一般"],
阅读全文
摘要:#!/usr/bin/env python# Author:liujun# Decide if a type can iteratefrom collections import Iterableprint(isinstance([],Iterable))print(isinstance("abc"
阅读全文
摘要:#!/usr/bin/env python# Author:liujun# List Comprehensions# A list comprehension generates all elements at once ,which consumes a lot of memory# versio
阅读全文
摘要:#!/usr/bin/env python# Author:liujun# The essence of decorator is function which is used to decorate another function.# The decorator is used to add s
阅读全文
摘要:1. classfys according to the range in which configuration files take effect. 1.1 The global configuration file /etc/profile : /etc/profile.d/*.sh /etc
阅读全文
摘要:1. Basic grammar egrep = grep -E egrep [OPTIONS] PATTERN [FILE...]2. Meta-charecter of extended regexp 2.1 Character match .: Matchs any single charac
阅读全文
摘要:1. grep : Global search Regular expression and Print out the line. 1.1. function:searches the given FILEs for lines containing a match to the given PA
阅读全文
摘要:1. 基本概述 1.1 文件的权限主要针对三类对象进行定义 owner: 属主, u group: 属组, g other: 其他, o 1.2 每个文件针对每类访问者都定义了三种权限: r: Readable w: Writable x: eXcutable 1.3 对文件而言三种权限分别表示:
阅读全文
摘要:1. linux security context Which resources a process can access depends on the user running the process. For example,the root user own the following fi
阅读全文
摘要:1. cp : copy files and directories 1.1 Basic use of cp : cp SRC DEST SRC is a single file: If DEST does not exist :create DEST and copy the content of
阅读全文
摘要:1.more : file perusal filter for crt viewing -d: 显示翻页及退出提示2.less : opposite of more3.head : output the first part of files head [OPTION]... [FILE]...
阅读全文
摘要:1. wc : print newline, word, and byte counts for each file [root@bogon ~]# wc /etc/passwd 44 88 2301 /etc/passwd -l: lines -w: words -c: characters2.
阅读全文
摘要:1. program:instruction+data data structures + algorathms 2. IO redirection:change the position of standard input and output 2.1 Output redirection : C
阅读全文
摘要:1. The command history 1.1 history :Display or manipulate the history list. [root@promote tmp]# history //Display the history list. -a: Append newly e
阅读全文
摘要:1. Category of directory The shell working directory. The current directory which refers to the shell working directory. HOME directory: root : /root
阅读全文
摘要:1. The system clock Timing by the Linux kernel by the working frequency of the CPU. The date command query and set the system clock.2. The hardware cl
阅读全文
摘要:1.definition date - print or set the system date and time2.SYNOPSIS 2.1 Display the current time in the given FORMAT. date []... [+FORMAT] FORMAT : re
阅读全文
摘要:#!/usr/bin/env python# Author:liujundef func1(): #This is a function """ttest....""" print("in the func1") return 0def func2(): #This is a process """
阅读全文
摘要:#!/usr/bin/env python# Author:liujunwith open("test","r",encoding="utf-8") as f: for line in f: print(line.strip())with open("test","r",encoding="utf-
阅读全文
摘要:#!/usr/bin/env python# Author:liujunf = open("test","r",encoding="utf-8") # r --> readable # r --> writeable # r+ --> read and write # w+ --> write an
阅读全文
摘要:#!/usr/bin/env python# Author:liujunlist1 = [1,4,5,7,3,6,7,9]list1 = set(list1) # set is unorderedlist2 = set([2,6,0,66,22,8,4])print(list1.intersecti
阅读全文
摘要:#!/usr/bin/env python# Author:liujuninfo = { 'stu1101':"TenglanWu", 'stu1102':"LongzaLuola", 'stu1103':"XiaoZeMaliya", 'stu1104':"TenglanWu", 'stu1105
阅读全文
摘要:#!/usr/bin/env python# Author:liujunname = "my name is aliex"print(name.capitalize()) # Capitalize the first letterprint(name.count('a')) # Count the
阅读全文
摘要:#!/usr/bin/env python# Author:liujunnames = [] # Define an empty listnames = ["ZhangYang", "Guyun", "XiangPeng", "XuLiangchen"]print(names)print(names
阅读全文
摘要:#!/usr/bin/env python# Author:liujuna,b,c = 1,3,5d = a if a < b else c /#if a < b , d = a else d = cprint(b)
阅读全文
摘要:#!/usr/bin/env python# Author:liujun#The standard libraryimport osres = os.system("ls -l") #used to execute commands and doesn't return anythingprint(
阅读全文
摘要:#!/usr/bin/env python# Author:liujun#The standard libraryimport sys,timeprint(sys.path) #The value of PATH which is a environment variable in pythonpr
阅读全文
摘要:#!/usr/bin/env python# Author:liujunfor i in range(1,10): if i==5: continue if i==8: break print("dddd ", i)for i in range(1,10): for j in range(1,10)
阅读全文
摘要:#!/usr/bin/env python# Author:liujunage=56count=0while count < 3: guessage = int(input("guess age:")) #Data type conversion is needed. if guessage ==
阅读全文
摘要:#!/usr/bin/env python# Author:liujunage=56guessage = int(input("guess age:")) #Data type conversion is needed here.if guessage == age: print("yes you
阅读全文
摘要:#!/usr/bin/env python# Author:liujun_username="liujun"_passwd="123456"username = input("username:")password = input("password:")if _username==username
阅读全文
摘要:#!/usr/bin/env python# Author:liujunimport getpassusername = input("username:")#password = input("password:")password=getpass.getpass("password:")prin
阅读全文
摘要:#!/usr/bin/env python# Author:liujunname = "liujun"name2 = namename = "ll" #The value of name2 will not change if you change the value of namename = "
阅读全文