Skip to content

Instantly share code, notes, and snippets.

/Applications/Adobe Flash CS4/Common/Configuration/Component Source/ActionScript 3.0/User Interface/fl/managers/StyleManager.as(97): col: 39 警告: return value for function 'getInstance' に型宣言がありません。
private static function getInstance() {
^
/Applications/Adobe Flash CS4/Common/Configuration/Component Source/ActionScript 3.0/User Interface/fl/core/UIComponent.as(1162): col: 48 警告: return value for function 'setIMEMode' に型宣言がありません。
protected function setIMEMode(enabled:Boolean) {
^
<span style="font-weight:bold; font-size:110%;">■Sphinx を用いて、 reST の文章を Blogger の原稿に変換する</span>
<a href="http://atnd.org/events/3015">BPStudy #30</a> にてSphinx講座があったので、早速それを生かしてreSTでBlogger向けの原稿を作ってみることにします。
<span style="font-weight:bold; font-size:110%;">■見出しのテスト</span>
Hello world!
foo bar
// Debug logger.
// Add "DEBUG" definition first at the "Edit Active Target... > GCC_PREPROCESSOR_DEFINITIONS for debug build.
#ifdef DEBUG
# define LOG(...) NSLog(__VA_ARGS__)
# define LOG_CURRENT_METHOD NSLog(@"%@", NSStringFromSelector(_cmd))
#else
# define LOG(...) ;
# define LOG_CURRENT_METHOD ;
#endif
- (void)layoutSubviews {
[super layoutSubviews];
// Place a toolbar
// Suppose ivar "toolbar" is already initialized before layoutSubviews
CGRect applicationFrame = [UIScreen mainScreen].applicationFrame;
CGRect convertedFrame = [self convertRect:applicationFrame fromView:nil];
NSLog(@"%f, %f, %f, %f", applicationFrame.origin.x, applicationFrame.origin.y, applicationFrame.size.width, applicationFrame.size.height);
NSLog(@"%f, %f, %f, %f", convertedFrame.origin.x, convertedFrame.origin.y, convertedFrame.size.width, convertedFrame.size.height);
const CGFloat toolbarHeight = 44.0f;
- (void)layoutSubviews {
[super layoutSubviews];
// Place a toolbar
// TODO: make this toolbar as a class
// TODO: make this toolbar looks better when hiding
CGRect applicationFrame = [UIScreen mainScreen].applicationFrame;
CGRect convertedFrame = [self convertRect:applicationFrame fromView:nil];
const CGFloat toolbarHeight = 44.0f;
toolbar.frame = CGRectMake(0,
//
// Copyright 2009-2010 Facebook
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
[[[MockPhoto alloc] initWithURL:@"bundle://pics1.png"
                                  smallURL:@"bundle://pics1.png"
                                      size:CGSizeMake(320, 480)] autorelease],
// Reachability通知をセットアップする
// TODO: シミュレータではsetHostNameを用いて設定すると正しくReachabilityが検出されていないようだ。実機での挙動は不明。
// ひとまずIP Address直指定でReachabilityの判定をするようにするが、できればホスト名を使いたい・・・
// 実機での挙動を調べてReachabilityの判定方法を調整する。その際デバイスビルドかシミュレータビルドかを判定する定義が欲しい -> TARGET_IPHONE_SIMULATOR
NSLog(@"Setting up Reachability for %@", ADDRESS_API);
[[Reachability sharedReachability] setAddress:ADDRESS_API];
[[Reachability sharedReachability] setNetworkStatusNotificationsEnabled:YES];
// TESTING! 1なら到達可能、 0なら到達不可能。なんでわざわざNSNumber numberWithBoolを使ってるのとか聞かないで>< 試してみただけ><
NSLog(@"%@", [NSNumber numberWithBool:[[Reachability sharedReachability] remoteHostStatus] != NotReachable]);
- (void)loadView {
self.bookView = [[[PFMBookView alloc] initWithFrame:[UIScreen mainScreen].applicationFrame] autorelease];
self.view = self.bookView;
// Add gesture recognizer to the paper view
UISwipeGestureRecognizer *toolPopoverGestureRecognizer = [[[UISwipeGestureRecognizer alloc] initWithTarget:self
action:@selector(handleToolPopover:)] autorelease];
toolPopoverGestureRecognizer.numberOfTouchesRequired = 2;
toolPopoverGestureRecognizer.direction = UISwipeGestureRecognizerDirectionDown | UISwipeGestureRecognizerDirectionUp;
[self.bookView addGestureRecognizer:toolPopoverGestureRecognizer];
#import <Foundation/Foundation.h>
@interface FetchOperation : NSOperation {
NSURLRequest *request;
NSURLConnection *connection;
NSHTTPURLResponse *response;
NSMutableData *responseBody;
NSOperation *parseOperation;