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
<Query Kind="Program" /> | |
void Main() | |
{ | |
var a = new A(); | |
a.SetX(2); | |
Action<int> b = a.SetX; | |
b(1); | |
a.Dump(); | |
} |
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
foreach (var i in System.Linq.Enumerable.Range(1, 100)) | |
System.Console.WriteLine( | |
i % 15 == 0 ? "FizzBuzz" | |
: i % 3 == 0 ? "Fizz" | |
: i % 5 == 0 ? "Buzz" | |
: i.ToString()); |
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
#!/virtual/azyobuzin/local/bin/python | |
# -*- coding: utf-8 -*- | |
import shelve | |
import urlparse | |
import oauth2 | |
from wop_core import * | |
from wop_core import database |
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
double Arctan(double x) { | |
double a = 0; | |
for (var i = 0; i < 10000; i++) { | |
var k = 1 + i *2; | |
if (i % 2 == 0) { | |
a = a + (1.0 / k * Math.Pow(x, k)); | |
} else { | |
a = a - (1.0 / k * Math.Pow(x, k)); | |
} | |
} |
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.Linq.Expressions; | |
using System.Reflection; | |
using System.Runtime.CompilerServices; | |
using System.Threading.Tasks; | |
using Livet; |
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.Linq; | |
using System.Text; | |
using System.Threading.Tasks; | |
using System.Net; | |
using System.Threading; | |
namespace CoreTweet | |
{ |
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
private static List<byte> TestList = new List<byte>(); | |
static async Task Do() | |
{ | |
var source = new CancellationTokenSource(); | |
var t = Task.Run(() => | |
{ | |
source.Token.Register(() => TestList = null); | |
for (var i = 0; i < 100000000; i++) |
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
//2本接続 | |
var observable = t.Streaming.StartObservableStream(StreamingType.User); | |
var disposable1 = observable.OfType<StatusMessage>().Subscribe(s => Console.WriteLine("status")); | |
var disposable2 = observable.OfType<EventMessage>().Subscribe(e => Console.WriteLine("event")); | |
//1本接続 | |
var observable = t.Streaming.StartObservableStream(StreamingType.User).Publish(); | |
observable.OfType<StatusMessage>().Subscribe(s => Console.WriteLine("status")); | |
observable.OfType<EventMessage>().Subscribe(e => Console.WriteLine("event")); | |
var disposable = observable.Connect(); |
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.IO; | |
namespace paizen | |
{ | |
class Program | |
{ | |
const int NewLine = 10; | |
const int Space = 32; | |
const int ZeroChar = 48; |
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.Linq; | |
namespace CoreTweet.Core | |
{ | |
public interface ITwitterResponse | |
{ | |
RateLimit RateLimit { get; set; } | |
} |
OlderNewer