Zen Coding 實在太好用了, 簡單來說就是可以讓你少打幾個字自動產生HTML跟CSS
好幾年前有看到過, 但是一直沒習慣去用.
今天看到一個外國網站的介紹, 發現真的要來好好習慣一下Zen Coding, 可以少浪費一些生命XD
所謂"工欲善其事, 必先利其器", 就是這樣
http://code.google.com/p/zen-coding/
從這網址可以找到各種IDE和cheat sheet, 我個人是用Komodo Edit + Zen Coding
---
在IDE輸入:
form:post#loginForm>(div>label+span>input:text)+(div>label+span>input:p)+div>input:s
執行Expand Abbreviation後, 就會快速產生一個登入表單, :
<form action="" method="post" id="loginForm">
<div><label for=""></label><span><input type="text" name="" id="" /></span></div>
<div><label for=""></label><span><input type="password" name="" id="" /></span></div>
<div><input type="submit" value="" /></div>
</form>
---
before:
link:css
after:
<link rel="stylesheet" type="text/css" href="style.css" media="all" />
---
before:
script:src
after:
<script type="text/javascript" src=""></script>
2012年5月25日 星期五
2012年5月22日 星期二
[Music] Xenoblade - Beyond the Sky (英文歌詞+自譯中文歌詞)
偶然聽到這首歌, 覺得很好聽
後來看了歌詞, 覺得歌詞的意境很棒, 剛好很符合自己內心的心境
所以我也試著把英文歌詞翻成中文 : ) 希望來此看到的人可以邊聽音樂邊慢慢欣賞歌詞中的意境
---
歌詞 Lyrics:
後來看了歌詞, 覺得歌詞的意境很棒, 剛好很符合自己內心的心境
所以我也試著把英文歌詞翻成中文 : ) 希望來此看到的人可以邊聽音樂邊慢慢欣賞歌詞中的意境
---
歌詞 Lyrics:
2012年5月16日 星期三
[Android] repack System Image after compile
Emulator 執行時會自動讀取img檔, 但是如果修改程式後不會自動安裝到emulator中
所以要repack image, 重新讀取新的img檔
所以要repack image, 重新讀取新的img檔
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
out/host/linux-x86/bin/mkyaffs2image -f out/target/product/generic/system out/target/product/generic/obj/PACKAGING/systemimage_intermediates/system.img | |
out/host/linux-x86/bin/acp -fpt out/target/product/generic/obj/PACKAGING/systemimage_intermediates/system.img out/target/product/generic/system.img |
2012年5月9日 星期三
[Android] Run Android 4.0.4 compiled android source build system on emulator
// set ANDROID_PRODUCT_OUT to environment
$ export ANDROID_PRODUCT_OUT="/android/out/target/product/generic"
// execute emulator
$ export ANDROID_PRODUCT_OUT="/android/out/target/product/generic"
// execute emulator
$ ./out/host/linux-x86/bin/emulator
[Android] 解決 Ubuntu 11.10 編譯Android 4.0.4 錯誤 - Solve Compile Android 4.0.4 failed on Ubuntu 11.10
在Ubuntu 11.10 Compile Android 4.0.4 時會有這個錯誤
make: *** [out/host/linux-x86/obj/EXECUTABLES/obbtool_intermediates/Main.o] Error 1
make: *** Waiting for unfinished jobs....
<command-line>:0:0: warning: "_FORTIFY_SOURCE" redefined [enabled by default]
<built-in>:0:0: note: this is the location of the previous definition
後來發現是gcc版本4.6.1導致的問題, 降到4.4就可以
降的方法就是把gcc-4.4設成預設在bin裡面, 可以藉由檢查$PATH, 知道bin的優先順序
像我是有在家目錄另外開一個bin (~/bin), 然後擺在$PATH的第一個
所以我只要把gcc跟g++ link到~/bin裡
$ ln -s /usr/bin/gcc-4.4 ~/bin/gcc
$ ln -s /usr/bin/gcc-4.4 ~/bin/cc
$ ln -s /usr/bin/g++-4.4 ~/bin/g++
$ ln -s /usr/bin/g++-4.4 ~/bin/c++
// 檢查版本
$ gcc -v
$ g++ -v
如果你的電腦沒有4.4版就要透過apt-get另外安裝
$ sudo apt-get install gcc-4.4 g++-4.4 gcc-4.4-multilib
訂閱:
文章 (Atom)