UIViewController<UITextFieldDelegate>
        //inputtext

result945 發表在 痞客邦 留言(0) 人氣()

字串處理相關網站
http://hi.baidu.com/rone2000_/blog/item/9d30ce1dc06f5b6cdab4bd97.html
計算字串長度
CGFloat word_width = [yourstring sizeWithFont:[UIFont fontWithName:@"Arial" size:18]].width; 

result945 發表在 痞客邦 留言(0) 人氣()

有一串內文要計算scroll view所需要的長度
    CGSize constraint = CGSizeMake(300 - (0 * 2), 20000.0f);

result945 發表在 痞客邦 留言(0) 人氣()

export PATH=$PATH:/usr/bin:/usr/sbin
就是指在原有的執行文件目錄上再添加/usr/bin和/usr/sbin這兩個文件搜尋目錄,
比如說你的一個可執行文件放在/usr/bin下,你添加了/usr/bin這個目錄後,
执行/usr/bin下的可執行文件,就不用输入全路径了,
可直接输入可執行的名稱,就可以執行了。

result945 發表在 痞客邦 留言(0) 人氣()

寫了一段自動讀取頁面的JQuery
結果發現ie並不會執行
   $("#content").load("answer.php");
   var refreshId = setInterval(function() {
      $("#content").load('answer.php?randval='+ Math.random());
   }, 1000);
       $.ajaxSetup ({
    // Disable caching of AJAX responses
    cache: false
    });

result945 發表在 痞客邦 留言(0) 人氣()

最近要幫伺服器定期備份MySQL
首先、先把原本的資料庫全部備份起來
mysqldump --user=root -p --all-database > /backup/mysql.sql

result945 發表在 痞客邦 留言(0) 人氣()

最近看到朋友用聽電影和看字幕來練習英文
所以就也想來學習他的方法
但字幕檔裡還有時間、因此就想把不需要的時間濾掉
<?php
$fn = "test.srt";//字慕檔名稱
$fp = fopen($fn, 'r'); //讀取字幕檔
while(!feof($fp)){
$line = fgets($fp);//讀取每一行
if(!ereg("^[0-9]", $line)) //如果開頭不是數字則顯示
echo $line . '<br/>'; 
}
?> 

result945 發表在 痞客邦 留言(1) 人氣()

//普通bbutton
    UIButton *nearBtn = [UIButton buttonWithType:UIButtonTypeRoundedRect];
    nearBtn.frame = CGRectMake(115.0f, 150.0f, 88.0f, 40.0f);
    NSString *near_btnName = [NSString stringWithFormat:@"test button"];
    [nearBtn setTitle:near_btnName forState:UIControlStateNormal];
    [nearBtn setTitleColor: [UIColor blackColor] forState: UIControlStateNormal];
    [nearBtn addTarget:self action:@selector(go_nearPage:) forControlEvents:UIControlEventTouchUpInside];
    [self.view addSubview:nearBtn];

result945 發表在 痞客邦 留言(0) 人氣()

    UILabel *label_word = [[UILabel alloc] initWithFrame:CGRectMake(30.0f, 30.0f, 150.0f, 80.0f)];
    NSString *title = [NSString stringWithFormat:@"UILabel Sample"];
    [label_word setText:title];
    [label_word setNumberOfLines:2];
    [label_word setLineBreakMode:label_word.lineBreakMode];
    [label_word setFont:[UIFont fontWithName:@"Arial-BoldMT" size:32]];
    [label_word setTextColor:[UIColor blackColor]];
    [label_word setBackgroundColor:[UIColor clearColor]];
    [self.view addSubview:label_word];

result945 發表在 痞客邦 留言(0) 人氣()

info.plist中的Bundle display name修改成你想要的程式名稱
若不行的話
Product->clean 重新build 
如果還有錯誤

result945 發表在 痞客邦 留言(0) 人氣()

今天公司搬家下午到資策會幫公司裝OA
沒想到一個不注意螺絲起子竟然先往臉上再往眼睛上去
說時遲那時快、眼鏡已經往上飛去、然後整個都傻住了
接著馬上去洗臉、發現自已臉上竟然有個恐怖的洞

result945 發表在 痞客邦 留言(0) 人氣()

  • Sep 16 Fri 2011 20:41
最近心情真的很不好
雖然到處去玩
但還是感到十分的低潮
而最近公司搬到了資策會

result945 發表在 痞客邦 留言(0) 人氣()

Blog Stats
⚠️

成人內容提醒

本部落格內容僅限年滿十八歲者瀏覽。
若您未滿十八歲,請立即離開。

已滿十八歲者,亦請勿將內容提供給未成年人士。