Saturday, January 29, 2011

快報!!! 一拍即發~~~上市嚕


一拍即發㊣


軟體名稱: 一拍即發㊣
軟體分類: LifeStyle

下載網址


        日前在Mobile01和PTT上面看到有人尋問,是否有加入辨識系統的統一發票對獎軟體。

這時候,就在這時候,PICAO的正義使者出現了,為了造福人群大家利用工作的閒暇之

餘開發了這支app。昨天,就在昨天(拍謝我有點lag,現在才po到網站上),我們的"一拍即

發"終於上市了,哇哈哈~~~這一切都要感謝我們PICAO的成員,在工作與出差之餘還還貢

獻出泡奶粉餵小孩的時間來開發這支程式,真的是太感動了。


       講了這麼多廢話,我們來講一下這支統一發票軟體的特色吧。這支App主要加入了OCR

的文字辨識,可以讓我們直接透過camera拍照來辨識發票上的號碼,並將其儲存至手機。直

到可以對獎的時候,我們的一拍即發可以到線上更新最新一期的中獎號碼來為大家對獎,對

完獎後當然少不了可愛的輕聲美少女為您報告您中獎的項目。這也是一拍即發的特點之一唷!

最後,祝福各位可以---快快對獎,快快中大獎唷~~~



以下為一拍即發的使用手冊,有興趣的大大們可以參閱一下:

使用手冊連結

Dragon

Thursday, January 6, 2011

Push/Fetch source to/from other remote/branch

  1. Push to other remotes
    1. List all remotes
      $ cat .git/config
      [remote "origin"]
            fetch = +refs/heads/*:refs/remotes/origin/*
            url = git@192.168.0.1:/home/git/debug_version.git
    2. Add a remote named "origin2"
      $ git remote add origin2 git@192.168.0.1:/home/git/release_version.git
      $ cat .git/config

      [remote "origin"]
            fetch = +refs/heads/*:refs/remotes/origin/*
            url = git@192.168.0.1:/home/git/debug_version.git
      [remote "origin2"]
            fetch = +refs/heads/*:refs/remotes/origin2/*
            url = git@192.168.0.1:/home/git/release_version.git

      $ git branch -a
      * master
         remotes/origin/HEAD -> origin/master
         remotes/origin/master
    3. Push branch master to origin2
      $ git push origin2 master
      $ git branch -a

      * master
         remotes/origin/HEAD -> origin/master
         remotes/origin/master
         remotes/origin2/master
    4. If you want to remove remote "origin2"
      $ git remote rm origin2
  2. Push to other branches
    1. List all branches
      $ cat .git/config
      [remote "origin"]
            fetch = +refs/heads/*:refs/remotes/origin/*
            url = git@192.168.0.1:/home/git/debug_version.git
      [branch "master"]
            remote = origin
           merge = refs/heads/master
    2. Create a branch named "golden"
      $ git branch golden
    3. Switch to golden
      $ git checkout golden
      $ git branch -a

      * golden
         master
         remotes/origin/master
    4. Push golden to remote origin/golden
      $ git push origin golden
      $git branch -a

      * golden
         master
         remotes/origin/master
         remotes/origin/golden
  3. Fetch from other branches (not master)
    1. Ref: http://stackoverflow.com/questions/67699/how-do-i-clone-all-remote-branches-with-git
    2. Download the branch master
      $ git clone git@192.168.0.1:/home/git/debug_version.git
      $ git branch -a

      * master
         remotes/origin/HEAD -> origin/master
         remotes/origin/golden
         remotes/origin/master
    3. If you want to take a peek at golden on upstream
      $ git checkout origin/golden
    4. Fetch from branch golden
      $ git checkout -b golden origin/golden
      $ git branch -a

      * golden
         master
         remotes/origin/HEAD -> origin/master
         remotes/origin/golden
         remotes/origin/master
Wayne

Tuesday, December 7, 2010

How to modify the AlertView size

 If you want to modify the alertView in your App, you should implement the method: 


- (void)willPresentAlertView:(UIAlertView *)alertView


And then you should set the frame size of the alertview that you want to modify.




- (void) willPresentAlertView:(UIAlertView *)alertView {
            if (alertView == proximityAlert) {
                 
                  [proximityAlert setFrame:CGRectMake(15, 30, 300, 350)];
            }
}


By Reon

How to use a block-based animation methods



According to apple's document,

Use of this method (such as "setAnimationWillStartSelector""commitAnimations") is discouraged in iPhone OS 4.0 and later. You should use the block-based animation methods instead.

Here is an example of using block-based animation methods.

{

notifyView.alpha = 0; //the status before animation
[UIView animateWithDuration:1.0
      animations:^ {
           notifyView.alpha = 1.0;
      }

      completion:^(BOOL finished) {
           [UIView animateWithDuration:1.0
                  animations:^ {
                       notifyView.alpha = 0;
                  }

                  completion:^(BOOL finished) {
                         ;
                  }];
      }];
}

Enif


Tuesday, November 30, 2010

Integrate Git with Xcode

According to http://shanesbrain.net/2008/7/9/using-xcode-with-git

Create these files in your root folder of the project ,
You should add these files after do "git init"

ex: /project_A /.gitignore     /project_A/.gitattributes

.gitignore
build/*
*.pbxuser
*.perspective
*.perspectivev3
*.mode1v3
*.mode2v3
.DS_Store
profile

.gitattributes
*.pbxproj -crlf -diff -merge

by Wayne
modify by Reon

Sunday, November 14, 2010

製作Traineddata的手動步驟


製作Traineddata的手動步驟如下:
目錄在tesseract-3.00下。

1.將要辨識的圖檔製作成tif/tiff檔:

   在Mac 用預覽程式開啓 存檔選成TIFF  記得把Alpha的勾勾取消  也不要壓縮

2.建立 BOX:

   tesseract 圖片檔名.tif(或tiff)  圖片檔名 ./tessdata/tessconfigs/batch.nochop
   ./tessdata/configs/makebox

  此時會產生 .box檔

3.分析及修改 BOX:
  1. box檔 可以用文字編輯器開啓(Open),開啓時 記得將 編碼(encode)選成UTF-8 並將忽略RTF指令打勾
  2. box檔開起以後,跟你的圖片文字做比較,第一欄位 就是辨識出的結果 如果辨識不正確 請把他改成正確的.
  3. 第2,3欄位分別是該字左下的起始坐標(x1,y1),第4,5欄位是右上終點坐標(x2,y2)
    但須注意 y軸的起始是由下往上遞增和我們常用的坐標相反!
  4. 如果有多或少辨識的數字必須自行增加 並增減相對映的坐標
  5. 完成後存檔即可.
4.產生訓練檔(tr檔) 

  tesseract 圖片檔名.tif  輸出訓練檔名 ./tessdata/tessconfigs/nobatch    ./tessdata/configs/box.train.stderr


製作訓練檔時,會印出一些訊息 檢查是否最後一行 Generated training data for XX blobs


5.解析 Unicode:

training/unicharset_extractor 圖片檔名.box


6.cluster  和 製作 prototypes

  1. 先做mftraining 指令如下:
    training/mftraining 訓練檔名.tr執行以後會產生 inttemp (the shape prototypes) 和pffmtable兩個檔案
  2. 再做cntraining指令如下:training/cntraining 訓練檔名.tr產生normproto 檔案 (the character normalization sensitivity prototypes)
7.移動與更名檔案

  將產生的四個資料檔更改檔名(加lang代號,比如說eng)複製到 tessdata:
  mv inttemp tessdata/eng.inttemp
  mv normproto tessdata/eng.normproto
  mv pffmtable tessdata/eng.pffmtable
  mv unicharset tessdata/eng.unicharset

8.生成trainedata檔


   進入tessdata資料夾  下 $combine_tessdata lang代號.
 (比如說目前是 eng.xxxxx  --> 指令為  combine_tessdata eng. )
  會產生 語言代號.traineddata ,就可以使用了(eng.traineddata)


Clover & Reon