原创 swoole創建基於tcp的服務端和客戶端---學習筆記(3)
server.php <?php //創建Server對象,監聽 127.0.0.1:9501端口 $serv = new swoole_server("127.0.0.1", 9501); $serv->set(array(
原创 PHP測試模擬併發下單,搶購
搶購、秒殺是平常很常見的場景 併發下如何解決庫存的減少超賣問題 正常是查詢出對應商品的庫存,看是否大於0, 然後執行生成訂單等操作,但是在判斷庫存是否大於0處, 如果在高併發下就會有問題,導致庫存量出現負數 簡單模擬一下
原创 mac下載切換不同PHP版本
項目需要切換一下7.2版本 vim ~/.bash_profile export PATH=/usr/local/Cellar/[email protected]/7.2.15/bin:$PATH source ~/.bash_profile
原创 composer 安裝更新包報錯Composer\Downloader\TransportException
更新包的時候報錯 [Composer\Downloader\TransportException] The "https://packagist.phpcomposer.com/p/provider-latest%244
原创 Mac下安裝Autosuggestion命令行提示插件
Autosuggestion是Oh-myszh的一個插件,作用基本上是根據歷史輸入指令的記錄即時的提示 https://github.com/zsh-users/zsh-autosuggestions 安裝 git clon
原创 pgsql記錄一次統計查詢
SELECT "ehi"."houses_id" AS 樓盤id, "ehi"."houses_name"
原创 laravel 存儲配置 Redis 多個庫選擇
laravel 的 Redis 的配置在 config/database.php 多個服務項目都使用同一 Redis, Redis 默認有 16 個庫 /* |---------------------------
原创 laravel 導出/導入excel /csv
安裝包 composer require maatwebsite/excel 安裝後的設置在config/app.php中註冊服務提供者到providers數組: Maatwebsite\Excel\ExcelService
原创 Elasticsearch 筆記-基礎索引-增刪改查
Elasticsearch 筆記-基礎索引-增刪改查
原创 Elasticsearch 筆記-分佈式安裝集羣配置
Elasticsearch 筆記-分佈式安裝集羣配置
原创 Mac下git clone項目xcrun: error: invalid active developer path問題
git clone xxx 項目時候報錯 xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing x
原创 Elasticsearch 筆記--單例安裝es+安裝kibana
jdk + node +es 官網下載地址 https://www.elastic.co/cn/downloads/elasticsearch 安裝6.6.2版本 wget https://artifacts.elastic
原创 Elasticsearch 筆記-安裝elasticsearch-head插件
elasticsearch-head git clone git://github.com/mobz/elasticsearch-head.git cd elasticsearch-head npm install npm
原创 git 不提交當前分支遠程-切換分支
git 不提交當前分支遠程-切換分支