C# 處理大 Text 檔案的實驗比對
直觀寫法肯定是: Readline() 每行比對、處理一次 這邊有兩個網頁做了 "充分的"實驗比對, C# .Net: Fastest Way to Read Text Files The Fastest Way to Read and Process Text Files using C# .Net 結論是, 把檔案都讀進 Array (相當於進記憶體), 再運用平行運算處理完。
直觀寫法肯定是: Readline() 每行比對、處理一次 這邊有兩個網頁做了 "充分的"實驗比對, C# .Net: Fastest Way to Read Text Files The Fastest Way to Read and Process Text Files using C# .Net 結論是, 把檔案都讀進 Array (相當於進記憶體), 再運用平行運算處理完。
基本原則 Variables in trigger block is not supported. Maybe all YAML file of Pipelines are same in all branches. template http://thecodemanual.pl/2020/04/02/build-templates-on-azure-devops.html https://docs.microsoft.com/zh-tw/azure/devops/pipelines/process/templates?view=azure-devops detect CHANGED Dir to build & deploy coding in PowerShell to detect What files are changed, get DIR and combine ARRAY build & deploy via FACTORY PATTERN References: https://stackoverflow.com/questions/54541602/pass-array-as-inputs-to-azure-devops-yaml-task https://stackoverflow.com/questions/62835740/loops-and-arrays-in-azure-devops-pipelines https://stackoverflow.com/questions/53227343/triggering-azure-devops-builds-based-on-changes-to-sub-folders https://stackoverflow.com/questions/65088433/how-to-get-only-changed-files-using-azure-devops-pipelines https://stackoverflow.com/questions/67483194/pass-array-of-files-into-the-parameter-of-awscli1-task/67498247#67498247 https://stackoverflow.com/questions/68504910/can-i-loop-an-azure-pipelines-task-on-a-runtime-array-variable-instead-of-an-arr https://docs.microsoft.com/zh-tw/powershell/scripting/learn/deep-dives/everything-about-arrays?view=powershell-7.1#adding-to-arrays 開始 try 的: variables: f1Flag: false f2Flag: false trigger: branches: include: - master # paths: # include: # - "test_pipelines/*" steps: - powershell: |## get the changed files $files=$(git diff-tree --no-commit-id --name-only -r $(Build....
近日看到一篇討論文章: c# string performance - what is faster to compare, string text or string length 被接受的答案雖然蠻合理的,但有其他補充關於 C# String 的 source code 可以發現: 都考量到了 所以可以直接比對…
最近當了「Yaml 檔工程師」玩了 Azure Devops Pipelines,終於完成 Azure 編譯 Winforms 專案 並 部署到測試環境(VM)上面,過程中花了點時間找路,這邊紀錄一下。 Key concepts for new Azure Pipelines 優先參考: Key concepts for new Azure Pipelines users 新 Azure Pipelines 使用者的重要概念 文內地一張圖片有說明了 Azure Pipelines YAML 的結構階層關係,所以 YAML 檔案內的結構看啟回會像是這樣: trigger: pool: stages: - stage: A jobs: - job: 1 steps: - task: - stage: B jobs: - deployment: VMDeploy 這也能從 YAML 結構描述參考找到資訊印證。 好玩的來了… Deploy to VM 會從 Environment - virtual machine resource找到從 Pipeline deploy 到 VM 的方法,恰好裡面有一段:...
刪除專案中 *.vssscc、*.vspscc 副檔名的檔案。 刪除 .sln 內的 GlobalSection(TeamFoundationVersionControl) 區塊。 內部的 *.__proj 檔案內的這幾項也必須刪除: <SccProjectName>XXX</SccProjectName> <SccLocalPath>XXX</SccLocalPath> <SccAuxPath>XXX</SccAuxPath> <SccProvider>XXX</SccProvider> 萬一實在太多了,請這條正規表示式 /^\s*(?:<Scc\w+>).+$/,使用 Notepad++ search & replace。