原创 面對犟人
這世界上有一類特別執拗的人,也就是那些俗話說的很犟的人。在他們的思維模式中,任何事情的處理都有固定的方式,不那樣就不行。跟他們打交道,要有適當的方法,否則會特別費勁。 作爲普通人,當我們在日常交往中遇到了特別固執、不易變通的人時,就要啓動
原创 pyinstaller 打包python文件
第一步: 安裝命令: pip install pyinstaller 第二步: 將文件python.ico圖標 和 p.py 文件放在同一個目錄下,最好放在一個獨立的文件夾下 第三步: 切換目錄到第二步所放文件的目錄: 命令行的一些使用
原创 cents 7.0命令
常用命令 centos7的網卡重啓方法:systemctl restart network 關閉防火牆: systemctl stop firewalld.service 禁止開機啓動: systemctl disable firew
原创 c++ 連續輸入帶空格字符串
#include <iostream> #include <stdio.h> #include <string.h> using namespace std; int main(){ char c; char arr[100];
原创 C++中的輸入
讀取函數 gets fgets scanf getline cin 所用時間 72ms 76ms 960ms 2189ms 2275ms 我們可以發現gets和fgets函數讀取字符串的速度
原创 python元組tuple
元組:tuple t1 = ("nihao",) 注意事項:只有一個數據的時候需要加一逗點; t1 = ("nihao") 表示一個字符串; size = width,height = 200,400 元組與列表的區別: 元組不可更改,列
原创 python中的隨機數以及驗證碼生成
#coding:utf-8 import random if __name__ == '__main__': print(random.randint(1,100)) #隨機整數 print(random.random(
原创 python時間模塊總結
#coding:utf-8 import time import datetime if __name__ == "__main__": print(time.time()) #時間戳 print(time.gmtime
原创 redis數據庫總結梳理
redis ================================== 最大能存儲512MB數據 開啓服務:service redis start ================================== 數據類型:
原创 python中的函數def
python中的函數 1、關鍵字參數 def fun(weigh,person,heigh) print("身高%f"%heigh) print("體重%f"%weigh) print("人%s"%person)
原创 sublime text3相關配置問題全部解決
1、使用python3爲解釋器進行匹配置 { //"shell_cmd": "python -u \"$file\"", "shell_cmd": "python3 -u \"$file\"",
原创 python中的賦值、深拷貝、淺拷貝
1.賦值: 只是複製了新對象的引用,不會開闢新的內存空間。 2.淺拷貝: 創建新對象,其內容是原對象的引用。 淺拷貝有三種形式:切片操作,工廠函數,copy模塊中的copy函數。 如: lst = [1,2,3,[4,
原创 全分佈式系統搭建使用的一些命令
centos7: 查看ip: ip addr nmtui調出命令窗口: nmtui 修改,將ipv4顯示; 重啓網卡服務: service network restart 上傳文件: / rz 修改主機名: vim /etc/hostna
原创 洛谷題目-去除測試數據多餘符號
去除 xx.in xx.out 數據中多餘的空格等冗餘符號 所使用的命令: sed -i 's/\r//g' *.in
原创 Python常用模塊學習 - time、datetime、os、sys、random、shutil
原文鏈接:https://blog.csdn.net/qq_33961117/article/details/82426287 目錄 一、time模塊:與時間相關功能 二、datetime 模塊