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
function ack(m,n){ | |
if (m==0) { return n+1; } | |
if (n==0) { return ack(m-1,1); } | |
return ack(m-1, ack(m,n-1) ); | |
} | |
function fib(n) { | |
if (n < 2){ return 1; } | |
return fib(n-2) + fib(n-1); | |
} |
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
if (!($posteduser) || !($_POST['password']) || !($_POST['email'])) { | |
$tplVars['error'] = T_('You <em>must</em> enter a username, password and e-mail address.') ; | |
// Check if username is reserved | |
} elseif ($userservice->isReserved($posteduser)) { | |
$tplVars['error'] = T_('This username has been reserved, please make another choice.') ; | |
// Check if username already exists | |
} elseif ($userservice->getUserByUsername($posteduser)) { |
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
/* | |
var Y_MAX = "99999"; | |
var X_MAX = "99999"; | |
initialize(); | |
*/ | |
function PalindromeFinder(x, y) { | |
this.Y_MAX = x; | |
this.X_MAX = y; | |
this.doit = function(){ |
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
CmdUtils.CreateCommand({ | |
service: "http://bookmark.kurosemi.com", | |
name: "kurosemi", | |
homepage: "http://gist.github.com/13422", | |
author: {name: "kzsg", homepage: "http://kzsg.kurosemi.com"}, | |
description: "search the bookmark from your Scuttle.", | |
takes: {"query": noun_arb_text}, | |
preview: function( pblock, query) { |
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
CmdUtils.CreateCommand({ | |
service: "http://", | |
name: "scuttle", | |
homepage: "http://gist.github.com/13428", | |
author: {name: "kzsg", homepage: "http://kzsg.kurosemi.com"}, | |
description: "search the bookmark from your Scuttle.", | |
takes: {"query": noun_arb_text}, | |
preview: function( pblock, query) { |
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
app.Env("CYGWIN") = "nontsec"; | |
app.Env("LANG") = "ja_JP.Shift_JIS"; | |
app.Env("LC_ALL") = "ja_JP.Shift_JIS"; | |
Config.tty.execute_command = "/bin/bash --login -i"; | |
Config.tty.title = "ck"; | |
Config.tty.savelines = 1000; | |
Config.tty.input_encoding = Encoding.SJIS; | |
Config.tty.display_encoding = Encoding.SJIS | Encoding.EUCJP | Encoding.UTF8; | |
Config.tty.scroll_key = 1; |
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
// Safariをシングルウィンドウモードにする | |
defaults write com.apple.Safari TargetedClicksCreateTabs -bool true | |
// MagicMouseの慣性スクロールをLeopardでも可能にする | |
defaults write com.apple.driver.AppleBluetoothMultitouch.mouse MouseMomentumScroll -bool true | |
// ユーザーがログアウトしている状態でもオートマウント機構が作動するよう設定する | |
// ログアウトした状態でもTimeMachineでバックアップするために必要 | |
defaults write /Library/Preferences/SystemConfiguration/autodiskmount AutomountDisksWithoutUserLogin -bool yes | |
// ユーザーがログアウトすると、ディスクをアンマウントするように設定する |
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
- (void)createAdView { | |
self.adView = [[ADBannerView alloc] initWithFrame:CGRectZero]; | |
adView.requiredContentSizeIdentifiers = | |
[NSSet setWithObjects:ADBannerContentSizeIdentifier320x50, | |
ADBannerContentSizeIdentifier480x32, | |
nil]; | |
adView.currentContentSizeIdentifier = ADBannerContentSizeIdentifier320x50; | |
adView.delegate = self; | |
[self.view addSubview:adView]; | |
} |
OlderNewer