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
// * Add reference to iTunesLib to your project. | |
// * If iTunes isn't running when this code run, iTunes will start. | |
// * After this code run, iTunes will ask you that "are you sure to exit?" when you close iTunes because this code cannot release COM interface. Releasing code is no effects... | |
using System; | |
using iTunesLib; | |
iTunesApp app = new iTunesApp(); | |
IITTrack track = app.CurrentTrack; | |
if (track != null) |
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; | |
namespace SimulationPhys2_5 | |
{ | |
/// <summary> | |
/// Represents a linear cellular automaton. | |
/// </summary> |
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; | |
namespace SimulationPhys1_2 | |
{ | |
struct Point | |
{ | |
public double X { get; private set; } |
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.Dynamic; | |
namespace MethodMissingSample | |
{ | |
class MethodMissing : DynamicObject | |
{ | |
Func<object[], string> method; |
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
require 'optparse' | |
require 'twitter' | |
out_file = '' | |
opt = OptionParser.new | |
opt.on('-o output') {|v| out_file = v} | |
opt.parse!(ARGV) | |
abort('no source file') if ARGV.size == 0 |
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
require 'optparse' | |
require 'net/http' | |
require 'json' | |
out_file = '' | |
opt = OptionParser.new | |
opt.on('-o output') {|v| out_file = v} | |
opt.parse!(ARGV) |
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
require 'json' | |
require 'net/http' | |
def get_followings(screen_name, cursor = '-1') | |
result = [] | |
if (cursor != '0') | |
json = JSON.parse(Net::HTTP.get(URI("http://api.twitter.com/1/friends/ids.json?screen_name=#{screen_name}&cursor=#{cursor}"))) | |
result << json['ids'] | |
if json['next_cursor_str'] | |
result << get_followings(screen_name, json['next_cursor_str']) |
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 <stdio.h> | |
int main() | |
{ | |
printf("%d¥n", fib(5)); | |
return 0; | |
} |
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
[32;01m * [39;49;00mPackage: dev-games/ggz-client-libs-0.0.14.1 | |
[32;01m * [39;49;00mRepository: gentoo | |
[32;01m * [39;49;00mMaintainer: games@gentoo.org | |
[32;01m * [39;49;00mUSE: amd64 consolekit elibc_glibc kernel_linux multilib policykit userland_GNU | |
[32;01m * [39;49;00mFEATURES: sandbox | |
>>> Unpacking source... | |
>>> Unpacking ggz-client-libs-0.0.14.1.tar.gz to /var/tmp/portage/dev-games/ggz-client-libs-0.0.14.1/work | |
>>> Source unpacked in /var/tmp/portage/dev-games/ggz-client-libs-0.0.14.1/work | |
>>> Preparing source in /var/tmp/portage/dev-games/ggz-client-libs-0.0.14.1/work/ggz-client-libs-0.0.14.1 ... | |
[32;01m*[0m Applying ggz-client-libs-0.0.14.1-destdir.patch ... |
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 <iostream> | |
#include <map> | |
using namespace std; | |
typedef enum { | |
IMPLIES, | |
AND, | |
OR, | |
NOT, |
OlderNewer