docker-in-win10-home
應用 Docker 在 Win10 Home 版
Win10 Home 版因為沒有支援 Hyper-V
所以 Docker Desktop for Windows 無法安裝
Docker Desktop for Windows
只有 Windows 10 Professinal or Enterprise 64-bit 才可以
Home版只能安裝 Docker Toolbox 去模擬 Linux 環境跑 Docker
安裝完畢後跑跑看新手教學
MsDoc: Use Docker
最後執行 Localhost:5000 跑不起來
最後找到解法
必須先在模擬環境內下 docker-machine ip
取得IP位置
先能正確的 Run 起來
StackOverflow: This site can’t be reached
MongoDB 若資料結構與 Model 不同,Deserializ 的時候的問題
使用 [BsonIgnoreExtraElements]
加在 Class 上
StackOverflow : MongoDB C# Driver - Ignore fields on binding
如何在遊戲伺服器實作排行榜
如何實作排行榜
其實想辦法排前幾百名就可
後面不太重要
知乎 : 如何对游戏服务器全服玩家进行排名?
\[分享\]開發手機遊戲的好文章
遊戲的伺服器架構
遊戲的伺服器架構 & 歷史
找到一篇很棒的文章
收起來以後慢慢看
知乎 : 端游、手游服务端常用的架构是什么样的?
如何在 C# 內取得 Unix TimeStamp
LINQ 依照多個 Columns 的排序方法
MongoDB 在指定的 Array 移除 Field
MongoDB 在指定的 Array 移除 Field
有找到方法在 MongoDB >= 3.4 版本
但 Azure Document DB MongoDB 是 3.2版本
所以不適用
解決方法目前可能用程式碼去解(未嘗試)
Mkyong.com : MongoDB – How to remove a field from document
NULid 怎摸用
NUlid
有時間內容可排序的進階版 GUID
Github : NUlid
ASP.NET 使用 Serilog 紀錄 Log
ASP.NET 使用 Serilog 紀錄 Log
Git 回覆上一個版本
Git Authentication Fail 不給輸入帳號密碼
Git Push 上雲端有時出現 Authentication fail 的問題 然後又不給你輸入帳號密碼
解決方法1
1 | git config --system --unset credential.helper |
解決方法2
我個人是用這招
因為方法1無效
刪除 .gitconfig [credential]部分
1 | [user] |
改成
1 | [user] |
參考資料
C# 標示方法或變數已過時
Task 方法不回傳任何東西的方法
Redis Commander 在 Local 端跑
Redis Commander 在 Local 端跑
先把這個弄成一個 File 可叫做 docker-compose.yml
1 | version: '3' |
然後 Run 下面這行指令
1 | docker-compose up |
Git 回復一個以前的 File
在 .NET 使用 MongoDB 的教學 (Skip, Sort, Limit, & Projections)
在 .NET 使用 MongoDB 的教學 (Skip, Sort, Limit, & Projections)
可能有用到喔
Working with MongoDB in .NET (Part 3): Skip, Sort, Limit, & Projections
過濾掉不合法的字元 使用 Regular Expression
有時候 Nuget 套件的 .cs file 遺失怎麼辦?
有時候 Nuget 套件的 .cs file 遺失怎麼辦
在 Visual Studio 內
1 | Settings -> Tools -> Import and Export Settings -> Reset |
StackOverflow : Cannot find .cs files for debugging .NET source code
如何同時間打很多個 Request
如何同時間打很多個 Request (這算 DDOS?)
StackOverflow : C# - how to do multiple web requests at the same time
1 | await Task.WhenAll(requests); |
VSCode 使用正規表達式進行搜尋
Visual Studio Code 進行 Regex Search
要搜尋奇怪目標的時候
請使用 Regular Expression
Github: What flavor of Regex does Visual Studio Code use?
正規表達式表達 4xx 錯誤,但不要 400
C# 使用 HtmlAgilityPack 對 HTML 進行解析
Azure 使用 Application Insights Alert 功能
https://www.rickvanrousselt.com/send-your-application-insights-alert-data-to-microsoft-teams/
https://blog.poychang.net/how-to-query-and-analytics-application-insights-log/
https://docs.microsoft.com/en-us/azure/kusto/query/iiffunction
1 | union (traces),(exceptions) |