03 2022 档案
摘要:chmod +x test.sh #给test文件添加权限 ./test.sh #运行桌面上的文件 /home/cx/test2.sh #运行指定目录下的文件 #!/bin/bash #指定告知系统当前这个脚本要使用的shell解释器 a="hello" 定义变量 echo $a 输出变量 dt=`
阅读全文
摘要:1、单独创建索引 create index 索引名 on 表名(要创建索引的列名); create index index_name on emp(emp_name); 2、修改表结构创建索引 alter table 表名 add index 索引名(要创建索引的列名); alter table e
阅读全文
摘要:from urllib import request import re page=54 #匹配段子吧的第五十四页 url="http://tieba.baidu.com/f?kw=%E6%AE%B5%E5%AD%90&ie=utf-8&pn="+str(page) try: #请求头 header
阅读全文
摘要:爬虫入门程序import urllib.request 定义网址 url="http://www.baidu.com" 访问网址 responsel=urllib.request.urlopen(url) 打印状态码 print(responsel.getcode()) 读取页面内容 print(r
阅读全文
摘要:Linux基础指令 一、ls ls:列出当前目录下的所有文件/文件夹的名字 ls /root:列出root下的所有文件/文件夹的名字 ls-l:以详细列表的形式展示 ls-la、ls-a:显示所有文件/文件夹(包含了隐藏文件/文件夹) ls-lh /root:列出root下的所有文件/文件夹的名称,
阅读全文
摘要:1、建库:create database if not exists 库名 default charset utf8;或create database表名 建表(例): create table if not exists cs_user(id int primary key auto_increm
阅读全文