This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Imports System.Data | |
Imports System.Runtime.CompilerServices | |
Imports Common.Logging | |
Public Class DbLoggingWrapper | |
Private Shared _logger As ILog | |
Public Shared Property Logger As ILog | |
Get | |
If _logger Is Nothing Then |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "stdafx.h" | |
#include <Windows.h> | |
int _tmain(int argc, _TCHAR* argv[]) | |
{ | |
TCHAR commandLine[MAX_PATH] = { 0 }; | |
HDESK hOldDesk, hInputDesk, hNewDesk; | |
STARTUPINFO si; | |
PROCESS_INFORMATION pi; | |
BOOL success; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.IO; | |
using System.Linq; | |
using System.Reactive; | |
using System.Reactive.Disposables; | |
using System.Reactive.Linq; | |
using System.Reactive.Subjects; | |
using System.Text; | |
using System.Threading.Tasks; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Concurrent; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Runtime.InteropServices; | |
using System.Text; | |
using System.Threading.Tasks; | |
namespace ConsoleApplication1 | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Module Module1 | |
Sub Main() | |
' 1000,2500,5000 の最大公約数を求める | |
Dim n = {1000, 2500, 5000}.Aggregate(AddressOf GDC) | |
Console.WriteLine(n) | |
Console.ReadLine() | |
End Sub |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Linq; | |
namespace ConsoleApplication1 | |
{ | |
class Program | |
{ | |
static void Main(string[] args) | |
{ | |
if (args.Select(_ => _.ToUpper()).Any(_ => _ == "C")) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.Drawing; | |
using System.Drawing.Printing; | |
using System.Linq; | |
using System.Text; | |
using System.Threading.Tasks; | |
namespace Printer.Sample | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Enum PropertyChainMode | |
CopyOnly | |
RaiseOnly | |
CopyAndRaise | |
End Enum | |
Class PropertyChain(Of TSource As {Class, INotifyPropertyChanged}, TTarget) | |
Private WithEvents _source As TSource | |
Private _target As TTarget |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Module EnumerableExBuffer | |
<Extension> | |
Public Function Buffer(Of T)( | |
ByVal source As IEnumerable(Of T), | |
ByVal count As Integer | |
) As IEnumerable(Of T()) | |
If source Is Nothing Then Throw New ArgumentNullException("source") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'例えば、30秒間隔で状態監視を実行する場合とか | |
Dim ループ = New CancellationTokenSource() | |
Dim 状態監視間隔の待機 As CancellationTokenSource | |
Dim 状態監視タスク = Task.Factory.StartNew( | |
Sub() | |
While True | |
' 状態を監視する処理を実行 |