sfFeed2Pluginをインストールします。 # symfony plugin:install sfFeed2Plugin # symfony ccあとは簡単。RSSフィードをsfFeed2を使って取得します。 $feed = sfFeedPeer::createFromWeb('http://feed/rss.xml'); foreach( $feed->getItems() as $item) { /*…
Doctrineを利用している場合。 # symfony generate:project frontend # symfony generate:app myApp # symfony plugin:install sfDoctrineGuardPlugin # symfony doctrine:build --all --and-load --no-confirmation # symfony ccapps/myApp/config/security…
# pear upgrade PEAR # pear channel-discover pear.symfony-project.com # pear install symfony/symfonypearはapt-getなどで入れてください。あとは # symfony -V # symfony generate:project myApp # symfony generate:app helloWorld # symfony generate…
Coda (開発用) http://www.panic.com/jp/coda/ Subversionにも対応しています。 Transmit (データ転送用 FTP/SFTP) http://www.panic.com/jp/transmit/ 速度抜群。FTP,SFTPでだいたい何でも転送できます。 Xcode4 (Apple製品開発用) http://developer.apple.…
- (void)main { NSURL * url = [[NSURL alloc] initWithString:@"http://www.yahoo.co.jp"]; NSURLRequest * req = [[NSURLRequest alloc] initWithURL:url]; NSURLConnection * conn = [[NSURLConnection alloc] initWithRequest:req delegate:self]; if(co…
UIApplicationのプロパティ一覧 // ステータスバーを隠す [UIApplication sharedApplication].statusBarHidden = YES; // スリープ・アイドルしないようにする [UIApplication sharedApplication].idleTimerDisabled = YES; // アプリケーションのバッジ数字…
私と同じ金沢出身の中田ヤスタカはデジタルシンセで有名なNative Instrumentsのプリセットを多用していることがよく知られている。NIのMassiveやPro-53のプリセットをよく耳にしたりする。音色一つ一つを作っていってこそ面白いという時代ではないのは明らか…
NSURLからNSDataにデータを入れてそのままUIImageに投げればいいだけです。 簡単ですが忘れがち。非同期にするにはちょっと工夫がいりますね。ここでは実装してません。 UIImageView * imageView = [[UIImageView alloc]init]; NSURL *url = [NSURL URLWithS…
- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event; - (void)touchesMoved: (NSSet *)touches withEvent:(UIEvent *)event; - (void)touchesEnded: (NSSet *)touches withEvent:(UIEvent *)event; - (void)touchesCancelled:(NSSet *)touch…
よく使うのにたまに忘れがちなのでNSTimerの使い方かきました。userInfoの使い方とか参考になれば。 http://developer.apple.com/library/mac/#documentation/Cocoa/Reference/Foundation/Classes/NSTimer_Class/Reference/NSTimer.html#//apple_ref/doc/uid…
iOS(iPhone/iPad)アプリケーション公開申請までの流れをなるべく分かりやすく確認できるように工夫して書きました。application1.xcodeprojというプロジェクトで開発を進めたということで話を進めています。プロジェクト名が違う場合は置き換えてください。 …
AVAudioPlayerを使ったライブラリを作りました。AVAudioPlayerの実例が少なかったからしっかりとまとめた。AudioQueueとかAudioUnitじゃないとできないんじゃないの?ということがAVAudioPlayerでできます。 AudioPlayerDelegateをdelegateして使いたいクラ…
AVAudioPlayerを使って音楽を再生する方法です。再生時間をNSTimerを使って表示しています。NSRunLoopでも表示は可能かと思いますがNSTimerのほうがはるかに楽です。githubにもございます。 GitHub - kmusiclife/AudioPlayer: This is AudioPlayer class ext…
- (NSMutableArray *)randomizedArray:(NSMutableArray *)filename{ srand([[NSDate date] timeIntervalSinceReferenceDate]); int i = [filenames count]; while(--i) { int j = rand() % (i+1); [filenames exchangeObjectAtIndex:i withObjectAtIndex:j];…
UIViewContentMode typedef enum { UIViewContentModeScaleToFill, // これがデフォルト。UIImageViewにめいっぱいひろげる UIViewContentModeScaleAspectFit, // 画像のaspect比を維持し、ちょうどはいるようにする UIViewContentModeScaleAspectFill, // …
UIViewControllerを利用した上で右フリック・左フリック・上フリック・下フリックを検出する方法です。UIViewControllerのdelegateで実装される -(void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event -(void)touchesEnded:(NSSet *)touches wit…
長いタイトルですがタイトルの通りです。UITabBarNavigationにUINavigationController+UITableViewControllerとUIViewControllerを同時に使う。意外とややこしかったのでテンプレでまとめておきました。結構使うのにサンプルが少なかったりします。結局こう…
UITableViewControllerのimplementsを忘れるのでメモついでに。 #import "MyClass.h" @implementation MyClass @synthesize items; // 独自の拡張メソッド -(id) initWithTableObject:(UITableViewController *)tableView{ items = [[NSMutableArray alloc]i…
tableViewに動的に一行を追加する おもった以上に迷いました。 /* NSMutableArray * items; @property (nonatomic, retain) NSMutableArray * items; @synthesize items; */ [self.tableView beginUpdates]; [items addObject:@"ADD CEL"]; NSIndexPath * pa…
Rhaco1.xで動いているアプリがいくつかあるのでメンテナンス。 Rssをrhaco1.xで吐き出す方法。意外と忘れます。 Rhaco::import('tag.feed.Rss20'); Rhaco::import('tag.feed.model.RssItem20'); $rss = new Rss20(); $rssItem = new RssItem20(); $rssItem->…
Deep in thought, the captain murmured, "Even if we conserve our food, it will only be sufficient to sustain us for two weeks at most." deep in thought 考え、思考 murmur(v.i) ブツブツつぶやく(陰でつぶやく, 不平, 不満) http://ja.forvo.com/wo…
Capitalism, as opposed to socialism or communism, is believed to have favorable effect on the economy in that in promotes efficiency through competition. favorable(adj) 意見などが好意的な favorable opinion of〜 as opposed to 〜とは対照的に…
Colonel Sanders looked me in the eye and said, "If you presist in ignoring my commands, I'll be ogliged to transfer you somewhere else." persist(v.i) し続けるto persist in sayingyou persist in ignoring my commands persist in doing〜 oblige…
UINavigationControllerに関する忘れがちなメモ // UITableViewのCellをクリックしたときの動作 detailViewController * detail = [[detailViewController alloc]initWithNibName:@"detailViewController" bundle:nil]; // extends UITableView [self.naviga…
努力という言葉が嫌い。でも人からは努力家と言われる。努力は妄想なのではないかと思っています。努力をしているのではなく好きだからそれを深めることが出来るだけ。それを努力と言われても努力とは思わない。好きなだけだから。小学校中学校高校、そして…
.asoundrcには下記のようにjackd with alsaデバイスを設定しておきます。 pcm.jackplug { type plug slave { pcm "jack" } } pcm.jack { type jack playback_ports { 0 alsa_pcm:playback_1 1 alsa_pcm:playback_2 } capture_ports { 0 alsa_pcm:capture_1 1…
for image in `ls *.jpg`; do convert -sample 10%x10% $image thumbs/$image; done;例えばこれで縦横10%に縮小します。元画像をサムネイルしてthumbsフォルダにサムネイルを作成します。convertオプション一覧(日本語) http://www5a.biglobe.ne.jp/~nkgwtty…
function gen_uuid($len=8) { $hex = md5("your_random_salt_here_31415" . uniqid("", true)); $pack = pack('H*', $hex); $uid = base64_encode($pack); // max 22 chars $uid = ereg_replace("[^A-Za-z0-9]", "", $uid); // mixed case //$uid = ereg_rep…
独自に商品一覧をec-cubeから抜き出す方法です。 $objQuery = new SC_Query(); $cols = array( 'product_id', 'product_code_min', 'product_code_max', 'name', 'comment1', 'comment2', 'comment3', 'main_list_comment', 'main_image', 'main_list_image'…
http://ascii.jp/elem/000/000/584/584967/ Demand Media は独自の予測アルゴリズム技術を用いてオンラインユーザが求めている情報を解析して、それに合致する記事やビデオなどのコンテンツをeHowや Livestrong、Trails.com、answerbag などのDemand Mediaネ…