Instantly share code, notes, and snippets.

View gist:eea1218ea83f7b4f0733
//ダブルクォートをシングルクォートにし、改行をとる
NSStirng * string = @"hogehoge";
string = [string stringByReplacingOccurrencesOfString:@"\"" withString:@"\'"];
string = [string stringByReplacingOccurrencesOfString:@"\n" withString:@""];
View file0.m
//------------------------------
// JSONを読み込む
//------------------------------
NSError *error0 = nil;
NSBundle *bundle = [NSBundle mainBundle];
NSString *path = [bundle pathForResource:@"local" ofType:@"json"];
NSString *jsonString = [[NSString alloc] initWithContentsOfFile:path encoding:NSUTF8StringEncoding error: &error0];
NSData *jsonData = [jsonString dataUsingEncoding:NSUnicodeStringEncoding];
if(error0){NSLog(@"よみこみえらー");}
View file0.xml
<?xml version="1.0" encoding="UTF-8"?>
<project name="**********">
<!-- =====================================================================================
FDT5.5 で AIR3.3 iOS USBデバッグするためのANTテンプレート
-->
<property name="PROJ_NAME" value="**********"></property>
View file0.txt
/**
* copyright (c) 2012 www.itoz.jp
* @author itoz
* @since 2012/06/20 19:55:22
*/
package jp.itoz.air.util
{
import flash.events.ErrorEvent;
import flash.filesystem.File;
import flash.filesystem.FileMode;
View ClothMotion.as
/**
* copyright (c) 2012 www.romatica.com
* @auther itoz
*/
package
{
import away3d.containers.View3D;
import away3d.core.base.SubGeometry;
import away3d.debug.AwayStats;
import away3d.entities.Mesh;
View RandomMoveVertex.as
/**
* copyright (c) 2012 www.romatica.com
* @auther itoz
*/
package
{
import away3d.containers.View3D;
import away3d.core.base.SubGeometry;
import away3d.debug.AwayStats;
import away3d.entities.Mesh;
View CameraLookAt.as
/**
* copyright (c) 2012 www.romatica.com
* @auther itoz
*/
package
{
import flash.geom.Vector3D;
import away3d.debug.AwayStats;
import away3d.containers.View3D;
View BasicSample.as
/**
* copyright (c) 2012 itoz.jp
* @auther itoz
*/
package
{
import away3d.cameras.Camera3D;
import away3d.containers.Scene3D;
import away3d.containers.View3D;
import away3d.entities.Mesh;
View GeometryApplyTransformation.as
/**
* copyright (c) 2012 www.romatica.com
* @auther itoz
*/
package
{
import away3d.containers.View3D;
import away3d.entities.Mesh;
import away3d.materials.TextureMaterial;
View AccelerometerConvertToRotation_Sample.as
/**
* copyright (c) 2012 www.romatica.com
* @auther itoz
* 2012.2.17 17:31:03
*/
package
{
import flash.events.AccelerometerEvent;
import flash.sensors.Accelerometer;
import flash.events.Event;