Windows10 のロック画面に表示されたのとのある WindowsSpotlight の壁紙を保存するプログラム。
SaveWindowsWallpaper の問題点を修正したバージョンになります。
csc.exe
などを用いて自力でコンパイルしてください。
// カレントディレクトリの取得方法に疑問を抱いたので主要な方法をまとめてみた。(大きくは2種類しかないが) | |
// 以下にデバッグ環境(?) | |
// ソースファイルのパス C:\GetCurrentDirectory\GetCurrentDirectory.cs | |
// 実行ファイルのパス C:\GetCurrentDirectory\GetCurrentDirectory.exe | |
// サンプルファイルのパス C:\GetCurrentDirectory\Sample.txt | |
// カレントディレクトリ C:\ | |
// 実行 => GetCurrentDirectory\GetCurrentDirectory.exe | |
public class GetCurrentDirectory { | |
public static void Main() { |
Console.WriteLine(Environment.GetFolderPath(Environment.SpecialFolder.DesktopDirectory)); |
[DllImport("user32.dll")] | |
public static extern IntPtr GetForegroundWindow(); | |
[DllImport("user32.dll", EntryPoint = "GetWindowText", CharSet = CharSet.Auto)] | |
public static extern int GetWindowText(IntPtr hWnd, StringBuilder lpString, int nMaxCount); | |
[DllImport("user32.dll")] | |
private static extern uint GetWindowThreadProcessId(IntPtr hWnd, out int lpdwProcessId); | |
int processid; |
#ローカルとリモートのブランチ名を変更する
以下、ブランチ名を hoge から foo に変更する例
git branch -m hoge foo
using Newtonsoft.Json; | |
using System; | |
using System.Collections.Specialized; | |
using System.Net; | |
using System.Text; | |
//A simple C# class to post messages to a Slack channel | |
//Note: This class uses the Newtonsoft Json.NET serializer available via NuGet | |
public class SlackClient | |
{ |