2012年10月29日 星期一

Drop Multiple MySQL tables

You can show tables with wildcard character on MySQL server.
ie: SHOW TABLES LIKE 'PREFIX_%';

But can't drop multiple tables with '%'.

[HowTo]
For shell script:

for T in `echo "SHOW TABLES" |mysql db|grep "^PREFIX_"`; do echo "DROP TABLE $T;"|mysql db;done

enjoy it.
:D

2012年10月18日 星期四

How to play Away3D on mobile phone

Last week I played Away3D on my old iphone 3GS for fun(see my previous post).
Now, you can download the full source from here,
or get ipa and apk file to test on your mobile.

Here is the web demo.



2012年10月17日 星期三

How to monitor google analytics for iOS and Android

目前監控 mobile app tracking traffic 常用 proxy monitor 的方式,
不過這種方式常常會出現很謎的狀況,
ie: 有時有抓到資料,有時沒有...
造成開發者與分析師間鬼打牆的狀況...

最準確的方式還是用老方法直接截取封包,
以前用 tcpdump 很苦還要自己解析資料,
幸好現在有 ngrep 好用...XD

2012年10月11日 星期四

How to deploy adobe air to iOS: Part1

如何發佈 Adobe AIR 到 iOS 裝置(ipad/iphone)教學

Part1: How to get your *.mobileprovision and *.p12 files.

Member Center
goto https://developer.apple.com


2012年10月8日 星期一

Away3D + Flint 3D Particles Demo: Cloud Effect

Away3D + Flint 3D Particles Demo: Cloud(Fog) Effect

版本:
Away3D v4.0.9
Flint v4.0.1

先來看 demo 圖

重點如下:
建立: view = new View3D();
設定背景: view.backgroundColor = 0x222233;
設定 antiAlias(ie: 2,4,16): view.antiAlias = 4; 

2012年10月5日 星期五

Away3D 4.0.X Gold basics

Away3D 4.0.X Gold 基本教學

之前有寫過幾篇 Away3D 的教學與應用,
新版 4.0.X 後 API 有些許的調整,重新翻了一下文件。

Away3D 基本流程如下:

  • scene
  • camera
  • view
  • light
  • add 3D Object(3D Object -> Mesh -> 面 ->頂點)
  • render

2012年10月3日 星期三

cloud effect with perlinNoise

雲霧效果教學
scrolling BitmapData +  perlinNoise

首先產生可以連續捲動的雲(BitmapData),
先回憶一下 perlinNoise 語法:
perlinNoise(periodX, periodY, numOctaves, seed, stitch, fractalNoise, channelOptions, grayScale);
stitch:true 平滑影像邊緣,以建立無接縫的拼貼紋理,適用於水波。
fractalNoise:true 平滑化該效果的邊緣,適用於雲霧,false 明顯不連續的漸層,
適用於火焰和海浪。