Recently in 程式語言 Category


Go的吉祥物 Gordon田鼠

  繼Chrome OS 以後, Google 似乎欲求不滿, 總是不鳴則己, 一鳴驚人, 再次拋出個震撼的新聞, Google 自己研發的新語言 -- GO, 以加速程式開發。 Go結合了像是Python動態語言的開發速度,以及擁有C及C++語言等編譯語言的效能及安全性,同時也是一個開放源碼計畫。

自動偵測文字URL並轉成Hyperlink

| No Comments | No TrackBacks
echo preg_replace("/(http:\/\/|www|[a-zA-Z0-9-]+\.|[a-zA-Z0-9\.-]+@)(([a-zA-Z0-9-][a-zA-Z0-9-]+\.)+[a-zA-Z0-9-\.\/\_\?\%\#\&\=\;\~\!\(\)]+)/","<a href=\"\\1\\2\" target=\"_blank\">\\1\\2</a>",$text);

為UITableViewCell增加背景圖片

| No Comments | No TrackBacks
雖然不是很了不起的知識, 但也是我找了許久終於找到的答案. 

要使UITableViewCell的背景換成自己喜歡的, 很簡單...

 
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
        static NSString *CellIdentifier = @"Cell";
    
        UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];

        if (cell == nil) {
            cell.backgroundView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"background.png"]];// 套用自己的圖片做為背景
            CGRect CellFrame = CGRectMake(0, 0, 300, 60);
        CGRect Label1Frame = CGRectMake(10, 5, 288, 38);
   UILabel *lblTemp;
   UITableViewCell *cell = [[[UITableViewCell alloc] initWithFrame:CellFrame reuseIdentifier:cellIdentifier] autorelease];
   lblTemp = [[UILabel alloc] initWithFrame:Label2Frame];
   lblTemp.backgroundColor = [UIColor clearColor];//清除預設的背景顏色
   lblTemp.tag = 1;
   lblTemp.font = [UIFont boldSystemFontOfSize:15];
   lblTemp.numberOfLines = 2;
   [cell.contentView addSubview:lblTemp];
   [lblTemp release];
        }

UILabel *lblTemp1 = (UILabel *)[cell viewWithTag:1];
lblTemp1.text = @"AAAAA";
        return cell;
}

我的iPhone應用程式的開發體驗

| No Comments | No TrackBacks
   我的iPhone應用程式的開發體驗

在開始開發iPhone的應用程式之前, 其實我完全沒碰過iPhone, MAC OS 以及 iPhone 應用程式的開發語言.  我是以一個類似盲人摸象的方式開始玩MAC OS 以及開發語言.

   會接觸iPhone開發語言也是逼不得已的一件事.

   這可要追溯到1個多星期以前, 我忽然接到經理的通知, 要我出發到首都的分公司進行iPhone應用程式開發兩個星期.  說實在, 我委實嚇著了.  公司竟然要一個從來沒有接觸過MAC OS 以及iPhone的人在兩個星期內完成應用程式/軟體的開發, 這是什麼國際笑話?


CI PHPMYDATAGRID

| No Comments | No TrackBacks
看到phpMyDataGrid, 覺得好玩, 就把它整合進CI裡。

只要在 phpmydatagrid.class.php 加入以下這段就行了。

PHP5
===

Function __construct(){
   $CI =& get_instance();
   $this->connectionHandler = $CI->db->conn_id;
}


PHP4
===

Function datagrid(){
   $CI =& get_instance();
   $this->connectionHandler = $CI->db->conn_id;
}

About this Archive

This page is an archive of recent entries in the 程式語言 category.

科技技術 is the previous category.

簡單易懂的現代魔法 is the next category.

Find recent content on the main index or look in the archives to find all content.