2023-01-01ãã1å¹´éã®è¨äºä¸è¦§
ãã®è¨äºã¯ãQiita - C# Advent Calendar 2023ãã«åå ãã¦ãã¾ãã C# ã«ã¯ãæéã表ç¾ããã¯ã©ã¹ã« DateTime 㨠DateTimeOffset ãããã¾ãã.NET 8 ãã TimeProvider ã¯ã©ã¹ãæ°ããç¨æããã¾ããã TimeProvider ã¯ã©ã¹ã¯ .NET8 ã®æ°æ©è½ã®ã²ã¨ã¤ãæâ¦
ï¼ï¼æã®é¢¨ç©è©©ãæ¯å¹´ãã£ã¦ãããã©ãè²·ã£ã¦æãã¦ããªãã®ããã§ãã¯ã¿ãããªæ°ãããã QOL é¢ä¿ å°åå·èµåº« ãã¼ãã¼ã æå · ã¬ãã¼ã¬ã¹ã³ã³ããã¼ã©ã¼ä½æ PC é¢ä¿ãã¹ãã¼ããã©ã³é¢ä¿ éå æ¬ ç·æ¬ å±¥æ´ ä¾å¹´å®æ½ãã¦ããè³¼å ¥ç©ã®åçã¯å¾æ¥è¿½å ã§ãâ¦
C# ã® Timer äºæ è£è¶³ï¼èªå㧠sleep ãå©ç¨ããã¿ã¤ãã¼ãä½ãå ´å Windows ãã«ãã¡ãã£ã¢ã®ã¿ã¤ãã¼å®è£ ã®æ³¨æ å®è£ ããã¨ãã® P/Invoke 太å¤ã®æ å ± ãµã³ãã« åè Windows ã«ããã¦ãé«ç²¾åº¦ãªã¿ã¤ãã¼ãå®è£ ããã®ã¯ 2000 年以åããé£ããï¼å°é£ï¼ãã¨â¦
ã©ã³ãã³ã°åå ä¸ããã°ã©ãã³ã° ãã¡ã¤ã«æ§æï¼App.xamlï¼ AppExBase ã¯ã©ã¹ã®å®è£ AppEx ã®å®è£ App.xaml.cs ã®å®è£ åè App.xaml ã¯å ¨ä½ã§ä½¿ããªã½ã¼ã¹ã宣è¨ãããã¡ã¤ã«ã§ãApp.xaml.cs ã¯ï¼ä¸»ã«ï¼ã¢ããªã±ã¼ã·ã§ã³ã®ã¨ã³ããªã¼ãã¤ã³ãã WPF ã§ã Wiâ¦
Windows App SDK (WinUI 3) ã¨ã¯ Win UI ã®è£è¶³ Hello World ç°å¢æ§ç¯ã¨ããã¸ã§ã¯ãã®ä½æ ããã¸ã§ã¯ãã®åææ§æãã¡ã¤ã« ãããã°ã®å®è¡ãã¹ã ã¦ã£ã³ãã¦ç»é¢ã®ä½æ åè ãã®è¨äºã¯ãWindows App SDK ã®ä½¿ãæ¹ã«ã¤ãã¦å¦ãã åºæ¬çãªå 容ãã¢ã¦ãããâ¦
Visual Studio æ¡å¼µæ©è½ æ¡å¼µæ©è½ã®éçºãããã° ããã¸ã§ã¯ãã®æ§æã«ã¤ã㦠ã³ãã³ãã追å ãã ã³ãã³ãã®ãã¼ã«ã©ã¤ãº å ¬éãã GitHub åè Visual Studio ã®æ¡å¼µæ©è½ãä½æããã¨ãã®å 容ãã¡ã¢ãã¾ãã ä»åãæ¡å¼µæ©è½ãä½æãããã¨æã£ããã£ããã¯â¦
SnackBar XAML ã®è¨å® ï¼æé©ã§ã¯ãªããã©ï¼åä½ããæå°ãµã³ãã« Prism ã® DI ã使ã£ãä¾ åè WPF UI ã®ã¡ã¸ã£ã¼ãã¼ã¸ã§ã³ããï¼ãã«ãªãã¾ãããã¢ãããã¼ãã«ä¼´ã£ã¦ãæ§ãã¼ã¸ã§ã³ã«ãªã£ããï¼ã㯠NuGet ã§ãéæ¨å¥¨ã«ãªã£ã¦ãã¾ãã¾ããã ãã¼ã¸ã§ã³â¦
ã¤ã³ã¹ãã¼ã«ã¨åæè¨å® è£è¶³ï¼ç´æ¥æå®ï¼ è£è¶³ï¼ãã¼ãã®æå®ï¼ XAML ããã©ã¤ãã©ãªãå©ç¨ããããã®è¨å® ã·ã¹ãã ã®ãã¼ããé©ç¨ãã ã¡ãã¥ã¼ åè WPF ã® GUI ã©ã¤ãã©ãªãWPF UIãã使ã£ã¦ã¿ãæ©ä¼ããã£ãã®ã§ãåºæ¬çãªä½¿ãæ¹ãã¡ã¢ã WPF ã® GUI ã©â¦
å¤ãè¨äºã§ sprite ãã¤ã³ãã¼ãããéã¯ãSimple Sprite Packer ã®ãã©ã°ã¤ã³ã使ç¨ãã¦ãã¾ãããããæ°å¹´ã®éãUnity ããã¾ã触ãããã¨ãã§ããªãã£ãã®ã§ãããä¹ ãã¶ãã«ã¢ããªãä½ãéã« sprite ã®èªã¿è¾¼ã¿ã§ãã® Assets ã使ç¨ãã㨠obsolete ã®è¡¨â¦
Unity ã®ã¢ããªãä½ã£ã¦ããã¨ãã« FPS ãè¨å®ããæ©ä¼ãããã¾ããã ã¬ãã¼ã¬ã¹ã³ã³ããã¼ã©ã¼ãç·´ç¿ããã¢ããªãä½ããã¨æã£ããã§ãï¼ï¼ï¼¦ï¼°ï¼³ã«åºå®ãã¦ããå¿ è¦ãããã¾ãããã¡ãªã¿ã«ããããªé°å²æ°ã®ã¢ããªã«ãªãã¾ãããï¼Android ã§åããã¦éãâ¦
ç§ã¯ä¸»ã« WPF ãªã©ã® windows ç°å¢åãã®ã¢ããªã±ã¼ã·ã§ã³ãä»ã§ãããä½ãããã°ã©ãã¼ãªã®ã§ãããBlazor ã«è§¦ãæ©ä¼ãã§ããã®ã§ãã¨ã¦ãåºæ¬çãªã¨ããããã©ããã£ããã®ãªã®ãããBlazorå ¥éããèªã¿ã¤ã¤ãå¦ç¿ããå 容ãã¢ã¦ãããããããã¨æãã¾ãâ¦
ã³ãã³ã åè huggingface ãã ControlNet ã§ä½¿ç¨ããã¢ãã«ããã¦ã³ãã¼ãããæ¹æ³ãã¡ã¢ã ã²ã¨ã¤ã²ã¨ã¤ãã¦ã³ãã¼ããã¦ãããã®ã§ãããpython ã使ãã°ã¾ã¨ãã¦ãã¦ã³ãã¼ããããã¨ãå¯è½ã§ãã ã³ãã³ã æåã« python ã使ãããã©ããããã¹ããâ¦
ã²ã¼ã ã§ä½¿ãã³ã³ããã¼ã©ã¼ãèªä½ãã¾ãããã³ã³ããã¼ã©ã¼ã®ã³ã¢ã«ãªãé¨åã¯ãRaspberry Pi Pico ãå©ç¨ãã¾ããã ç¾å¨ã¯ã¬ãã¼ã¬ã¹ã³ã³ããã¼ã©ã¼ã«æ¹é ããã Raspberry Pi Pico ã« GP2040-CE ã¨ãã Firmware ãæ¸ãè¾¼ããã¨ã§ãã²ã¼ã ã³ã³ããã¼ã©ã¼â¦
Prism ã©ã¤ãã©ãªã¼ã«ã¯ããDialog Serviceãã¨ãããã®ãããã¾ãã å©ç¨ãã¦ã¿ãã¨ãããã¨ã¦ã便å©ãã¾ãããããã¢ããããã¦ã£ã³ãã¦ã«å¯¾ãã¦å¤æ¸¡ããããä»çµã¿ã¨ãã¦ãé¢ç½ãã¨æãã¾ããä»çµã¿ã¨ãã¦èãããã¦ããã®ã§ãèªåã§ãããããæ¡å¼µãäºæ³â¦
以åã.NET Framework æ代ã®è¨äºã ãã©ãC# OS ã«ã¤ã³ã¹ãã¼ã«ããã¦ããããªã³ã¿ã¼ã®ã¢ã¤ã³ã³ãåå¾ããæ¸ããã ããã©ã«ãã®ããªã³ã¿ã¼åãåå¾ããããªã£ãã®ã§ãæ¹ã㦠.NET ç¨ã«æ¸ãç´ããã®ã§ã¡ã¢ã ã§ããã㨠ããã©ã«ãã®ããªã³ã¿ã¼ã®ååãåå¾ â¦
NLog ãå©ç¨ããæé Debugger File ã½ã¼ã¹ã³ã¼ãä¸ããã® Logger ã¢ã¯ã»ã¹ ãµã³ãã« åè NLog ãå®éã«å©ç¨ããããã«ããµã³ãã«ãä½æããããµã³ãã«ã§ã¯ãWindowèµ·åæã®ã¤ãã³ãçºçé ä½ãã¨åãå 容ãå®è¡ãã¦ã¿ããæ°ã«ãªãç¹ããã£ãã®ã§ãèªåã§ãâ¦
Prompt ã®è¦ç´ ãã³ã æªä¾ããå¦ã¶ åºæ¬ç㪠Prompting zero-shot prompting few-shot prompting chain-of-thought (CoT) prompting zero-shot CoT prompting self-consistencyï¼èªå·±æ´åæ§ï¼ ç¥èçæããã³ããã£ã³ã° role prompting ããã³ããã®ä¾ ããâ¦
åé¡ã®ä¾ ContentRendered ã¤ãã³ãã UserControl ããå©ç¨ãã ContentRendered.Command ã®å®è£ ä¾ ãµã³ãã« åè é常ãUserControl ãã ContentRendered ã¤ãã³ãã使ãããã·ã¼ã³ã¯ãã¾ãç¡ãã¨æãã¾ãããä¾å¤ã«ãªãã±ã¼ã¹ãããã¾ããã Prism ã® Diâ¦
ç¶æ³ã®ç¢ºèª GPT ã«å¤æãã ããã¥ã¢ã«ï¼ã¤ã³ã¹ãã¼ã«ã¢ã·ã¹ã¿ã³ãï¼ã§ã¢ãããã¼ããã åè Windows 11 ã® 22H2 ã®ã¢ãããã¼ãã¯ãExplorer ã«ã¿ã表示ã追å ããã¦ããããå人çã«ã¯ Windows 10 ããåæã® Windows 11 ã«åãæ¿ããã¨ã以ä¸ã®ã¡ãªããâ¦
PowerShell ã®ããªã·ã¼è¨å® Python ãã¤ã³ã¹ãã¼ã«ãã¦ãæ£ããåä½ããªãä¾ ã¢ããªå®è¡ã¨ã¤ãªã¢ã¹ããªãã«ãã venv ãå®è¡ãã åè AI ã«ããç»åçæï¼Stable Diffusionï¼ãªãããå©ç¨ãããã¨ããã¨ãPython ç°å¢ãæ¬ ããã¾ããããããã Python ç°å¢â¦
対ç ãµãã¼ããã¦ããæåã¨ã³ã³ã¼ãã£ã³ã°ã調ã¹ã ä½è« åè .NET (core) ã§ãshift-jis ã®æåã¨ã³ã³ã¼ãã£ã³ã°ãå©ç¨ãããã¨ããã¨æ£ããã¨ã³ã³ã¼ãã£ã³ã°ãåå¾ãããã¨ãã§ããªããããã¯ã.NET Framework æ代ã¨ç°ãªãåä½ã§ããã var sjis = Encoâ¦
対å¦ï¼ï¼ãã¼ã¿ãã¼ã¹ ãããã¤ãã¼ãå¤æ´ãã å¤æ´ç¹ï¼ï¼åæå EF 6 ã®åæå EFcore å¤æ´ç¹ï¼ï¼åæå®ãä¸å¯§ã«ãã å¤æ´ç¹ï¼ï¼ä½¿ç¨ããåå空éã«æ³¨æ åè Planetscale ãå©ç¨ãã¦ããã®ã§ãããããæ¥çªç¶ãä½ããã¦ããªãã®ã«åæ¥ã¾ã§åä½ãã¦ããèªä½â¦
å¯¾å¿ pragma åè .NET 㧠OleDb ãå©ç¨ããã¨ä»¥ä¸ã®å³ã®ããã« .NET Frameworks æ代ã¯è¡¨ç¤ºãããªãã£ãè¦åãåºãããã«ãªã£ã¦ããã è¦åã®å 容ã®ã¨ãããOleDb é¢ä¿ã¯ windows ã§ãã使ããªããã¨ãåé¡ã§ãããè¨ãæãã㨠.NET ãè¤æ°ã®ãã©ãããã©â¦
解決æ¹æ³ã®ä¾ ssh ãå©ç¨ããããã®è¨å® å度ã³ãã³ããå®è¡ åè github ã«ä½ææ¸ã®ãªãã¸ããªã¼ã«ãã¼ã¿ã push ãããã¨ããã¨ãã¨ã©ã¼ãåºã¦ãã¾ã£ãã remote: Repository not found. fatal: repository 'https://github.com/sh1ch/SimpleCSVParser.gitâ¦
target ã® layout renderer ã使ãããªã æ¥ä»ã®ã«ã¹ã¿ãã¤ãº ã¬ãã«ã®ã«ã¹ã¿ãã¤ãº ä¾å¤ã®ã«ã¹ã¿ãã¤ãº target ã® layout renderer ãå®è£ ãã target ãå®è£ ãã ã©ããªã£ã¦ãã®ãæ°ã«ãªã£ããã½ã¼ã¹ã³ã¼ããèªã ãµã³ãã« åè ãã®è¨äºã¯ãNLogï¼ãã°ãâ¦