原创 mpvue開發微信小程序,分享按鈕報錯:`Cannot read property 'apply' of null`

用mpvue開發微信小程序,分享按鈕報錯:Cannot read property 'apply' of null thirdScriptError Cannot read property 'apply' of null;at

原创 scrapy-splash模擬鼠標點擊

scrapy-splash模擬鼠標點擊 跟網上其他教程一樣,配置好scrapy和splash, 網上的教程大多都沒提及這一點,都是用的render.html,但是這個沒法執行lua_source的腳本 重寫 start_reque

原创 python3 程序 Dockerfile 基礎模板

python3 程序 Dockerfile 基礎模板 FROM python:3.7.5-slim-buster COPY sources.list /etc/apt/sources.list ENV DEBIAN_FRONT

原创 vscode開發vue格式化代碼配置

{ "workbench.startupEditor": "welcomePage", "workbench.iconTheme": "vscode-icons", "workbench.colorThem

原创 nuxtjs asyncData參數

nuxtjs asyncData 可選參數 function (context) { // Universal keys const { app, store, route, params,

原创 pandas處理NaN

處理pandas數據中的NaN值 pd.dropna() pd.fillna() pd.isnull() pd.dropna() 是直接刪除包含NaN的列或者行 df.dropna( axis=0, # 0

原创 SQLAlchemy 返回大量數據(SQLAlchemy返回生成器)

SQLAlchemy 查詢返回大量數據 當用sqlalchemy查詢大量數據並返回的時候,很可能造成程序被系統killed,這是因爲內存佔用過大。 可以採用 yield_per(count) 方法進行返回數據 session.qu

原创 pandas對比兩列數據是否相同,並新建一列存儲結果

需要判斷 自動篩查結果 和 重點排污單位兩列是否相同: pandas 僞代碼 merge_data['自動——人工對比結果'] = merge_data[['重點排污單位', '自動檢查結果']].apply(lambda

原创 python2正則中文

python2默認不是utf-8編碼, 用正則表達式去匹配中文可能會出錯,因爲中文被轉換爲了 \xe5\x8c\xb9\xe9\x85\x8d 這種樣子。 解決方法 把匹配和被匹配的字符都轉換爲unicode

原创 git提交header

type:用於說明commit的類別,規定爲如下幾種 feat:新增功能; fix:修復bug; docs:修改文檔; refactor:代碼重構,未新增任何功能和修復任何bug; build:改變構建流程,新增依賴庫、工具等(例

原创 Dockerfile中修改ubuntu 18.04時區

原文鏈接:https://blog.csdn.net/think_ycx/article/details/83246458 # check now timezone $ date -R

原创 postgresql更新字段類型爲JSON的數據

PostgreSQL更新表字段爲JSON的數據。 比如: 表結構如下: # table name users id bigserial not null primary key info json '{}'::json 這個u

原创 macos下git tab鍵無效解決方法

原文地址 Homebrew Install homebrew Install Git and bash-completion: brew install git bash-completion (Note: If this in

原创 app store安裝應用一直轉圈,或者更新應用一直轉圈

app store安裝應用一直轉圈,或者更新應用一直轉圈 問題出現在: iphone 8 plus 美版 聯通4G網絡 電信Wi-Fi網絡 安裝和更新應用都是一直轉圈,無法下載。 解決辦法: 在 設置 -> 通用 -> 語言

原创 scrapy發送html郵件

我們查看 scrapy 的發送郵件模塊的源碼 MailSender class MailSender(object): def __init__(self, smtphost='localhost', mailfrom='s