This file contains hidden or 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
#!c:/bin/ruby/bin/ruby | |
# encoding: shift_jis | |
# いわゆる「パスの通った」ディレクトリリスト。 | |
PATH = ENV["PATH"].split( /;/ ).collect { |path| path.gsub(/\\/, "/") } | |
# Windows で実行可能な拡張子。 | |
EXECUTABLE_EXTENSION = ENV["PATHEXT"].split( /;/ ).collect { |ext| ext.gsub(/\./, "").downcase } | |
def search_command(pattern) | |
PATH.each do |path| |
This file contains hidden or 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
#!c:/bin/ruby/bin/ruby | |
# -*- encoding: cp932 -*- | |
=begin | |
><div> | |
<p>ということで、こういうことをしたかったんだけど:</p> | |
</div>< | |
>|ruby| | |
puts if ((0..12).cover? Time.now.hour then "Hello, World!" else "Good evening, World!" | |
||< |
This file contains hidden or 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
path = "/usr/bin" | |
tmpdir_path = File.expand_path( "~/var/ps" ) | |
outdir_path = File.expand_path( "~/etc/manuals" ) | |
Dir.entries(path).each do |filename| | |
next if File.directory? "#{path}/#{filename}" | |
puts "#{filename}" | |
Dir.mkdir tmpdir_path unless File.exists? tmpdir_path |
This file contains hidden or 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
;; -*- coding: shift_jis -*- | |
(define (say-piza n) | |
(cond | |
((> n 0) | |
(display "ピザ") | |
(say-piza (- n 1))))) | |
(say-piza 10) |
This file contains hidden or 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.IO; | |
using System.Net; | |
using System.Text; | |
using Atom; | |
using Atom.Core; | |
using Atom.Core.Collections; | |
using Atom.Utils; | |
This file contains hidden or 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.Text; | |
using System.Xml; | |
namespace test.xmlwrote { | |
This file contains hidden or 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
#ifndef Winsock_hxx | |
#define Winsock_hxx | |
#include <winsock2.h> | |
/** | |
* | |
*/ | |
class Winsock |
This file contains hidden or 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> | |
#if defined(_WIN32) | |
# include <winsock2.h> | |
# pragma comment(lib, "ws2_32.lib") | |
#else | |
# include <netdb.h> | |
#endif /* defined(__WIN32__) */ | |
// http://d.hatena.ne.jp/spidy_spidy/20080423/1208878797 より | |
int main(int argc, char* argv[]) |
This file contains hidden or 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.Net; | |
using System.Net.Sockets; | |
using System.Linq; | |
using System.Text; | |
namespace demo.linq.ipaddr { |
This file contains hidden or 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
html xmlns=http://www.w3.org/1999/xhtml>(head>title+link rel=stylesheet type=text/css href=./style/screen.css+meta http-equiv=Content-Type content=text/html;charset=UTF-8+meta name=generator content=zencoding)+body.layout>(div.page>div.header+(div.content>h1+p)+div.footer) |