-(id) 就是 Objective-C 中的 object, 本身就是帶一個 pointer 所以不用再加 *
-(id)initWithName:(NNString *)name andAge:(int)age{
id result = [super init];
if(result){
self.name = name;
self.age = age;
-- Project: Dropbox Module | |
-- Description: A module for accessing Dropbox from Lua/CoronaSDK using the Dropbox REST API. Module written | |
-- by F. E. Torkel, based off code by Michael Weingarden. | |
local lfs = require( "lfs" ) | |
local json = require( "json" ) | |
local M = {} |
--[[ | |
moveTo function | |
erinylin.com | |
for Graphics 2.0 | |
]]-- | |
display.setDefault("background", 1, 1, 1) | |
function moveTo(object, params) | |
local T = display.screenOriginY -- Top |
-- table library extensions | |
-- allows the table.copy function to return a shallow copy of a range of the table items | |
-- Example: | |
--local t={1,2,3,4,5,6,7,8,9,10} | |
--dump(table.copy(t,3,8)) | |
--prints out 3,4,5,6,7,8 | |
local table_copy = table.copy | |
table.copy = function( t, ... ) | |
if (type(arg[1]) == "number" and (arg[2] == nil or type(arg[2]) == "number")) then |
find <images folder> -name \*.png | sed 's/\.png//g' | \ | |
xargs -I % -n 1 TexturePacker %.png \ | |
--sheet %{v}.png \ | |
--data dummy{v}.plist \ | |
--algorithm Basic \ | |
--allow-free-size \ | |
--max-width 4096 \ | |
--max-height 4096 \ | |
--size-constraints AnySize \ | |
--no-trim \ |
------------------------------------- | |
-- function delegate | |
-- Author: Erin Lin | |
-- www.erinylin.com | |
-- 簡易模擬 C# delegate | |
-- licensed under the MIT license. | |
-- 2015, 02 | |
------------------------------------- | |
--[[ | |
Usage1: |
------------------------------------- | |
-- function delegate part 2 | |
-- Author: Erin Lin | |
-- www.erinylin.com | |
-- 簡易模擬 C# delegate | |
-- licensed under the MIT license. | |
-- 2015, 03 | |
-- 參考:https://gist.github.com/anonymous/3f0e5b046bfdcfa9864a | |
------------------------------------- |
------------------------------------- | |
-- i18n | |
-- Copyright (c) 2015 Erin Lin | |
-- erinylin.com | |
-- Licensed under the MIT license. | |
------------------------------------- | |
--[[ | |
All strings files are under a folder names "locale" |
find * -name \*.png | sed 's/\.png//g' | \ | |
xargs -I % -n 1 TexturePacker %.png \ | |
--sheet %{v}.png \ | |
--data dummy{v}.plist \ | |
--algorithm Basic \ | |
--allow-free-size \ | |
--max-width 4096 \ | |
--max-height 4096 \ | |
--size-constraints AnySize \ | |
--no-trim \ |
#Disable index
$sudo mdutil -i off /
#Enable index
$sudo mdutil -i on /