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
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.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
#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
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
open System.Net | |
open System.Net.Sockets | |
type IpMessenger (port: int) = | |
let client = new UdpClient(port) | |
let random = new Random(Environment.TickCount) | |
let nextId = fun () -> random.Next(0, 1000) | |
let sendBuffer (address: IPAddress, message: Byte[]) = | |
client.Send(message, message.Length, new IPEndPoint(address, 2425)) |
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
public static Class EnumerableEx | |
{ | |
} |
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.Runtime.CompilerServices | |
Imports System.Dynamic | |
Module DatabaseExtensions | |
Sub Main() | |
Dim conn = New SqlClient.SqlConnection("Data Source=...") | |
Dim one = Convert.ToInt32(conn.ExecuteScalar("SELECT 1")) |
OlderNewer