Skip to content

Instantly share code, notes, and snippets.

/*
* simple SQLite3 wrapper for Objective-C.
*
* @author mootoh
*/
#import <sqlite3.h>
@implementation LocalCache
# --------------------------------------------------------------------------
# 拡張子の異なる同じファイル名の内容を検査
# "*"はコメント扱い
#
# 例) HogeHoge.csv HogeHoge.csv2
#
# --------------------------------------------------------------------------
$KCODE = "S"
require 'pp'
// self.nameが新しい値に更新されると呼び出される
KVOBlock blockFunc = ^(
NSString *keyPath,
id object,
NSDictionary *change,
id identifier)
{
NSString *text = [change valueForKey:@"new"];
// 変更された値で書き換え
@Seasons7
Seasons7 / CCSprite+hd.h
Created January 14, 2011 12:05
CCSprite+hd.m
@interface CCSprite ( hd )
+(id)spriteWithSpriteFrameName:(NSString*)spriteFrameName;
@end
@Seasons7
Seasons7 / CCGaussianBlurSprite.h
Created January 29, 2011 15:19
CCGaussianBlurSprite.h
//
// CCGaussianBlurSprite.h
// AWTextureFilter
//
// Created by Keisuke Hata on 11/01/19.
//
#import <Foundation/Foundation.h>
#import "AWTextureFilter.h"
#import "CCTexture2DMutable.h"
@Seasons7
Seasons7 / CCLabelBMFont.h
Created April 5, 2011 17:40
CCLabelBMFont supported Unicode
/*
* cocos2d for iPhone: http://www.cocos2d-iphone.org
*
* Copyright (c) 2008-2010 Ricardo Quesada
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
@Seasons7
Seasons7 / convert2caf.rb
Created May 26, 2011 12:13
Convert aif to caf
Dir.glob("*.aif").each do |fname|
%x{afconvert -f caff -d ima4 #{fname}}
end
@Seasons7
Seasons7 / CCSendMessageTest.m
Created June 4, 2011 08:58
CCSendMessageSample
//
// HelloWorldLayer.m
// CCSendMessageTest
//
// Created by Keisuke Hata on 11/06/04.
//
// Import the interfaces
#import "HelloWorldLayer.h"
@Seasons7
Seasons7 / app.js
Created August 21, 2011 10:33
Titanium Play Sound.
Titanium.UI.setBackgroundColor('#000');
// ウィンドウ作成
var win = Titanium.UI.createWindow({
title:'サウンドテスト',
backgroundColor:'#fff',
barColor:'#3366ff'
});
var button = Ti.UI.createButton({
@Seasons7
Seasons7 / app.js
Created August 30, 2011 07:54
OpenReeder
Titanium.UI.setBackgroundColor('#000');
var notification;
var fireDate = null;
var hasNotification = true;
var win = Titanium.UI.createWindow({
title:'OpenReeder',
backgroundColor:'#fff'
});