show code js

2012年9月23日 星期日

simple example

jXo4,j]zozdWiz}uo~1b1HRBiTs
1.open XcodejXo4,j]zozdWiz}uo~1b1HRBiTs
2.set project configjXo4,j]zozdWiz}uo~1b1HRBiTs
3.choose Single View ApplicationjXo4,j]zozdWiz}uo~1b1HRBiTs
4.open MainStoryboard.storyboardjXo4,j]zozdWiz}uo~1b1HRBiTs
(A)Add a label to frame in view controllor 1jXo4,j]zozdWiz}uo~1b1HRBiTs
(B)Add a button to frame in view controllor 1jXo4,j]zozdWiz}uo~1b1HRBiTs
5.add a view controller is 2jXo4,j]zozdWiz}uo~1b1HRBiTs
6.create a second pagejXo4,j]zozdWiz}uo~1b1HRBiTs
(A)click and hold right mouse button on button in view controller 1jXo4,j]zozdWiz}uo~1b1HRBiTs
(B)move mouse fouce to view controller 2 and release mouse buttonjXo4,j]zozdWiz}uo~1b1HRBiTs
(C)choose modaljXo4,j]zozdWiz}uo~1b1HRBiTs
7.create some codejXo4,j]zozdWiz}uo~1b1HRBiTs
(A)open (name)AppViewController.hjXo4,j]zozdWiz}uo~1b1HRBiTs
(B)add code in @interface xxx : UIViewController { ....(in here)... } @endjXo4,j]zozdWiz}uo~1b1HRBiTs
(C)code > IBOutlet UIButton *myButton;jXo4,j]zozdWiz}uo~1b1HRBiTs
(D)open (name)AppViewController.mjXo4,j]zozdWiz}uo~1b1HRBiTs
(E)add code in viewDidload{ [super viewDidload];  ....(in here)... }jXo4,j]zozdWiz}uo~1b1HRBiTs
(F)code > [myButton setTitle:@"Hello" forState:UIControlStateNormal];jXo4,j]zozdWiz}uo~1b1HRBiTs
8.RunjXo4,j]zozdWiz}uo~1b1HRBiTs

2012年9月12日 星期三

open svn function on mac

jXo4,j]zozdWiz}uo~1b1HRBiTs
  • Open Function
jXo4,j]zozdWiz}uo~1b1HRBiTs
sudo ln -s /Applications/Xcode.app/Contents/Developer/usr/bin/svn /usr/bin/svnjXo4,j]zozdWiz}uo~1b1HRBiTs
jXo4,j]zozdWiz}uo~1b1HRBiTs
jXo4,j]zozdWiz}uo~1b1HRBiTs
  • Checkout
jXo4,j]zozdWiz}uo~1b1HRBiTs
mkdir svn_projectjXo4,j]zozdWiz}uo~1b1HRBiTs
cd svn_projectjXo4,j]zozdWiz}uo~1b1HRBiTs
svn checkout http://domain/svn/trunkjXo4,j]zozdWiz}uo~1b1HRBiTs
ls.....jXo4,j]zozdWiz}uo~1b1HRBiTs
svn_project/trunk/ code .......

2012年9月9日 星期日

mac disable double .filename and .ds_store

jXo4,j]zozdWiz}uo~1b1HRBiTs
Open terminal and command below to disable.
If you want enable them, use reverse like true => false or false => truejXo4,j]zozdWiz}uo~1b1HRBiTs
  • Disable .DS_Store 
defaults write com.apple.desktopservices DSDontWriteNetworkStores true jXo4,j]zozdWiz}uo~1b1HRBiTs
jXo4,j]zozdWiz}uo~1b1HRBiTs
  • Disable Apple Double (.filename) 
export COPYFILE_DISABLE=true

git on mac

jXo4,j]zozdWiz}uo~1b1HRBiTs
Server:jXo4,j]zozdWiz}uo~1b1HRBiTs
1.get dropbox account and download & install dropboxjXo4,j]zozdWiz}uo~1b1HRBiTs
2.download and install gitjXo4,j]zozdWiz}uo~1b1HRBiTs
3.goto dropbox directoryjXo4,j]zozdWiz}uo~1b1HRBiTs
(A)mkdir project [for all git root]jXo4,j]zozdWiz}uo~1b1HRBiTs
(B)cd project and mkdir new_project.gitjXo4,j]zozdWiz}uo~1b1HRBiTs
(C)cd new_project.git and command:git init --bare [to format]jXo4,j]zozdWiz}uo~1b1HRBiTs
jXo4,j]zozdWiz}uo~1b1HRBiTs
Client:jXo4,j]zozdWiz}uo~1b1HRBiTs
1.New directoryjXo4,j]zozdWiz}uo~1b1HRBiTs
(A)mkdir a projectjXo4,j]zozdWiz}uo~1b1HRBiTs
(B)cd projectjXo4,j]zozdWiz}uo~1b1HRBiTs
(C)git initjXo4,j]zozdWiz}uo~1b1HRBiTs
(D)git remote add origin ~/Dropbox/project/myproj.gitjXo4,j]zozdWiz}uo~1b1HRBiTs
jXo4,j]zozdWiz}uo~1b1HRBiTs
2.from a projectjXo4,j]zozdWiz}uo~1b1HRBiTs
(A)git init or git clone ~/Dropbox/project/myproj.git [to format and get code from git server]jXo4,j]zozdWiz}uo~1b1HRBiTs
(B)git remote add origin ~/Dropbox/project/myproj.gitjXo4,j]zozdWiz}uo~1b1HRBiTs
jXo4,j]zozdWiz}uo~1b1HRBiTs
3.add new document to git serverjXo4,j]zozdWiz}uo~1b1HRBiTs
(A)git add filename.xxxjXo4,j]zozdWiz}uo~1b1HRBiTs
(B)git commit {-a} -m "Add a filename.xxx"jXo4,j]zozdWiz}uo~1b1HRBiTs
(C)first time:git push origin master, next time:git pushjXo4,j]zozdWiz}uo~1b1HRBiTs
jXo4,j]zozdWiz}uo~1b1HRBiTs
4.modify and update to git serverjXo4,j]zozdWiz}uo~1b1HRBiTs
(A)git commit -m "desc:modify"jXo4,j]zozdWiz}uo~1b1HRBiTs
(B)first time:git push origin master, next time:git pushjXo4,j]zozdWiz}uo~1b1HRBiTs
jXo4,j]zozdWiz}uo~1b1HRBiTs
5.update from git serverjXo4,j]zozdWiz}uo~1b1HRBiTs
(A)first time:git pull origin master, next time:git pulljXo4,j]zozdWiz}uo~1b1HRBiTs
jXo4,j]zozdWiz}uo~1b1HRBiTs
6.add ignore:jXo4,j]zozdWiz}uo~1b1HRBiTs
add a .gitignore in project root directory and setjXo4,j]zozdWiz}uo~1b1HRBiTs
data/*jXo4,j]zozdWiz}uo~1b1HRBiTs
xml/*.datjXo4,j]zozdWiz}uo~1b1HRBiTs
password.filejXo4,j]zozdWiz}uo~1b1HRBiTs
jXo4,j]zozdWiz}uo~1b1HRBiTs
7.see logjXo4,j]zozdWiz}uo~1b1HRBiTs
(A)git logjXo4,j]zozdWiz}uo~1b1HRBiTs
jXo4,j]zozdWiz}uo~1b1HRBiTs
jXo4,j]zozdWiz}uo~1b1HRBiTs
8.mirror a new project :jXo4,j]zozdWiz}uo~1b1HRBiTs
mkdir ../new_directoryjXo4,j]zozdWiz}uo~1b1HRBiTs
git archive master | tar -x -C ../new_directory

2012年9月8日 星期六

zend studio

jXo4,j]zozdWiz}uo~1b1HRBiTs
jXo4,j]zozdWiz}uo~1b1HRBiTs
  • download from www.zend.com
  • install Zend Studio trial on mac
  • open zend studio
  • change encoding
  1. open Preferences>General>Workspace
  2. see "Text file encoding" and modify it to utf-8
  • hide .svn
  1. right click item
  2. Build Path -> Configure Inclusion / Exclusion Filters… .
  3. in "Exclusion patterns" click add and keyin "**/.svn/" before click ok button
  4. click finish button
  • install language package
  1. click help and install new software
  2. keyin "http://archive.eclipse.org/technology/babel/update-site/R0.9.1/helios/" in work with and enter to waiting pending
  3. pending finish will list more package let you choose
  4. checkbox "Babel Language Packs in [language name]", click next
  5. click allow or finish to waiting for install package
jXo4,j]zozdWiz}uo~1b1HRBiTs
jXo4,j]zozdWiz}uo~1b1HRBiTs