ps. adSense還是過不了~ 嘖
2012年7月15日 星期日
2012年7月14日 星期六
設定php.ini的時區
一直想試試新的tracker,找到了這個mantis,但安裝完後,卻遇到底下這個warning
這時才發現我的php一直沒設定好時區,只好在php.ini下設定
這樣就再也沒有warning出現囉~~
參考網址:
http://jax-work-archive.blogspot.tw/2009/07/php-datetimezone.html
這時才發現我的php一直沒設定好時區,只好在php.ini下設定
這樣就再也沒有warning出現囉~~
參考網址:
http://jax-work-archive.blogspot.tw/2009/07/php-datetimezone.html
iOS開發筆記 ﹣UIWebView load jQuery.js
之前有一篇iOS開發筆記 - 將jquery放入是單純將jquery.js放入app中,並在html中去載入,但有時頁面是動態產生的,無法在當下載入,而且載入後,要馬上再放入自己寫好的js檔來執行,WebView有提供一個WebDelegate,其中有一個function:webViewDidFinishLoad,可以在頁面載完後執行,就在這function中去讀入jquery.js的內容,function內容如下:
- (void)webViewDidFinishLoad:(UIWebView *)webView
{
NSString *filePath =
[[NSBundle mainBundle] pathForResource:@"jquery-1.7.2.min"
ofType:@"js" inDirectory:@""];
NSData *fileData = [NSData dataWithContentsOfFile:filePath];
NSString *jsString =
[[NSMutableString alloc] initWithData:fileData
encoding:NSUTF8StringEncoding];
[webView stringByEvaluatingJavaScriptFromString:jsString];
}
再來再自己寫一個function跟一個UIButton綁定,function如下:
- (IBAction)runJavascript:(id)sender
{
NSString *workjs = [[NSBundle mainBundle] pathForResource:@"work" ofType:@"js" inDirectory:@""];
NSData *workjsData = [NSData dataWithContentsOfFile:workjs];
NSString *js = [[NSMutableString alloc] initWithData:workjsData encoding:NSUTF8StringEncoding];
[self stringByEvaluatingJavaScriptFromString:js];
}
work.js的內容只是很簡單的hello
alert('hello!!');
這樣按下按鈕就會秀出alert訊息了。
參考網頁
http://www.altinkonline.nl/tutorials/xcode/uiwebview/load-jquery-in-uiwebview/
- (void)webViewDidFinishLoad:(UIWebView *)webView
{
NSString *filePath =
[[NSBundle mainBundle] pathForResource:@"jquery-1.7.2.min"
ofType:@"js" inDirectory:@""];
NSData *fileData = [NSData dataWithContentsOfFile:filePath];
NSString *jsString =
[[NSMutableString alloc] initWithData:fileData
encoding:NSUTF8StringEncoding];
[webView stringByEvaluatingJavaScriptFromString:jsString];
}
再來再自己寫一個function跟一個UIButton綁定,function如下:
- (IBAction)runJavascript:(id)sender
{
NSString *workjs = [[NSBundle mainBundle] pathForResource:@"work" ofType:@"js" inDirectory:@""];
NSData *workjsData = [NSData dataWithContentsOfFile:workjs];
NSString *js = [[NSMutableString alloc] initWithData:workjsData encoding:NSUTF8StringEncoding];
[self stringByEvaluatingJavaScriptFromString:js];
}
work.js的內容只是很簡單的hello
alert('hello!!');
這樣按下按鈕就會秀出alert訊息了。
參考網頁
http://www.altinkonline.nl/tutorials/xcode/uiwebview/load-jquery-in-uiwebview/
2012年7月13日 星期五
CentOS筆記-載入DVD
這年頭很少人在用光碟機了吧,尤其是Server,大多都用網路傳輸,但我還是遇到了,第一步先到/dev底下看看有哪些設備跟光碟機有關,我的如下:
dvd
dvd-sr0
ps. 查看剛放上去的裝置如下指令
fdisk -l
所以在/mnt開了個media目錄,再用底下的指令將它mount上,就可以用了
mount -t iso9660 /dev/dvd-sr0 /mnt/media
dvd
dvd-sr0
ps. 查看剛放上去的裝置如下指令
fdisk -l
所以在/mnt開了個media目錄,再用底下的指令將它mount上,就可以用了
mount -t iso9660 /dev/dvd-sr0 /mnt/media
2012年7月11日 星期三
申請不到AdSense...怪
這個blog一直申請不到ad sense,想不通原因是什麼,仔細查查分析資料,也許是因為內容太雜或讓大家停留時間短,不過,這blog本身只是為了做筆記而設立的咧,想想,也許是這樣的初衷造成的吧。
訂閱:
文章 (Atom)

