原创 php安裝pear(linux環境)

執行 sudo apt-get install php-pear

原创 請求linux文件內容

有時我們想要清除文件內容,但是不想刪除。那就使用覆蓋 echo “”>file.log 在shell執行這樣名利來解決問題

原创 phpstrom不能更改php的版本

如果出現無法更換的情況php language level 查看composer同步是否勾選,去掉即可 注意這裏不能勾選就可以自由的選擇版本了

原创 php缺失curl,mb_sting,gd庫等文件的安裝

一、缺失CURL庫: 查詢:apt-cache search curl | grep php 安裝:安裝相應PHP版本的CURL庫 apt-get install php7.0-curl 二、缺失MB_STRING 查詢:apt

原创 在安裝swoole的問題

下載源碼 https://github.com/swoole/swoole-src/releases http://pecl.php.net/package/swoole http://git.oschina.net/swoole

原创 python獲取周幾

import datetime datetime.date.today().isoweekday()

原创 報錯 call not undefined function Think\simplexml_load_string() php7.0

這是由於少了一個以來文件php-xml導致的 yum install php-xml sudo apt-get install php-xml

原创 python3獲取相關的文件路徑

import os print('***獲取當前目錄***') print(os.getcwd()) print(os.path.abspath(os.path.dirname(__file__))) print('***

原创 laravel獲取查詢中的sql內容

DB::enableQueryLog(); $last_month_cost = DB::table('ds_dwb_game_summary') ->where("userid","in",$tuple_u

原创 php查詢mongo過濾的條目數

/** * 獲取mongo篩選查詢的條目 * @param $db string 數據庫 * @param $collection string 集合名 * @param $filt

原创 使用sql的CASE語句

SELECT ds AS 日期 ,operate as 充值類型 ,SUM(num) AS 總的 ,sum(CASE operate WHEN '22' THEN num EL

原创 git出現衝突

1、git status 先看下自己修改的文件是哪些; 2、git stash 用這個命令先把代碼緩存起來; 3、git pull 這時再用pull命令把遠端的代碼拉下來; 4、git stash pop 遠端代碼拉回來後再用這個

原创 curl: (7) Failed to connect to raw.githubusercontent.com port 443: Connection reset by peer

當mac安裝出現這個錯誤,請把腳本下載下來,執行試一下,可能就行了

原创 想要獲取對應分組某個值的所有值使用group

select body,group_concat(ds) from uids group by body; sql使用group by 進行分組的時候查找該組的id只會返回一個,只需使用group_concat(id)即可以獲得

原创 conda安裝python的擴展

請注意環境變量的問題,特別是自己的系統中已經安裝了python環境的小夥伴。使用conda內bin裏的環境來進行第三方包的安裝