1.按下離開跳出視窗
2013年10月31日 星期四
2013年10月29日 星期二
【php】preg_match 與 preg_match_all
1.preg_match 將文章符合條件抓出來(1次)
2.preg_match_all 將文章符合條件的全部抓出來
// 抓取圖片 $contents = '12341142222'; preg_match("/img.*?src=\"(.*?)\"/",$contents,$a); // 正規表示法很多方法可用 此寫法限於部落格安全性 print_r($a);結果:
Array ( [0] => img src="圖片1" [1] => 圖片1 )
2.preg_match_all 將文章符合條件的全部抓出來
// 抓取圖片 $contents = '12341142222'; preg_match_all("/img.*?src=\"(.*?)\"/",$contents,$a); // 正規表示法很多方法可用 此寫法限於部落格安全性 print_r($a);結果:
Array ( [0] => Array ( [0] => [1] => ) [1] => Array ( [0] => 圖片1 [1] => 圖片2 ) )
2013年10月28日 星期一
2013年10月24日 星期四
2013年10月22日 星期二
【職訓局-手機程式開發班】2013 10/22 xcode fb
1.貼文刪文新寫法
2.取得其他FB屬性
3.用rails建立網站
老師教學:http://lokanghung.blogspot.tw/search/label/Rails
因為我個人是使用Apache所以不做筆記
2.取得其他FB屬性
3.用rails建立網站
老師教學:http://lokanghung.blogspot.tw/search/label/Rails
因為我個人是使用Apache所以不做筆記
2013年10月18日 星期五
【Jquery】開合選單
範例網址:http://7311.tw/study/js/fcode/menu/left_open_menu1.html
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
<script>
$(function(){
var curr='';
$('#menu h2').click(function(){
if($(this).attr('id') != curr){ // 是否由展開
$('#menu ul').slideUp(); // 全部關上
$(this).next().slideDown(1000); // 點的往下開
curr = $(this).attr('id'); // 將目前ID存入Tag
}else{
$(this).next().slideUp(300);
curr='';
}
}).css("cursor","pointer");
$('#menu h2').eq(1).click(); // 預設開啟哪一個
});
</script>
<ul id="menu">
<li>
<h2 id="menu1">AAAA</h2>
<ul>
<li><a href="a.php" >aaaa</a></li>
</ul>
</li>
<li>
<h2 id="menu2">BBBB</h2>
<ul>
<li><a href="b.php">bbbb</a></li>
</ul>
</li>
</ul>
效果:
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
<script>
$(function(){
var curr='';
$('#menu h2').click(function(){
if($(this).attr('id') != curr){ // 是否由展開
$('#menu ul').slideUp(); // 全部關上
$(this).next().slideDown(1000); // 點的往下開
curr = $(this).attr('id'); // 將目前ID存入Tag
}else{
$(this).next().slideUp(300);
curr='';
}
}).css("cursor","pointer");
$('#menu h2').eq(1).click(); // 預設開啟哪一個
});
</script>
<ul id="menu">
<li>
<h2 id="menu1">AAAA</h2>
<ul>
<li><a href="a.php" >aaaa</a></li>
</ul>
</li>
<li>
<h2 id="menu2">BBBB</h2>
<ul>
<li><a href="b.php">bbbb</a></li>
</ul>
</li>
</ul>
2013年10月16日 星期三
【職訓局-手機程式開發班】2013 10/16 Android
1.基本layout設定
LinearLayout |
FrameLayout |
RelativeLayout |
TableLayout |
2013年10月15日 星期二
【職訓局-手機程式開發班】2013 10/15 xcode fb
老師的教學部落格:http://lokanghung.blogspot.tw/2013/09/ios-iosfacebook-sdk.html
1.使用facebook api
1.下載facebook的framework:
https://developers.facebook.com/docs/ios/getting-started/
中間有個here
2.下載後安裝 他會放到文件FacebookSDK裡頭 將FacebookSDK.framework拉到程式 裡頭
3.先到fb的https://developers.facebook.com/apps/建立自己的應用程式
4.編輯自己的BundleID要與專案的BundleID相同
5.修改專案的plist檔案就完成了
2.使用FB登入
老師部落格:http://lokanghung.blogspot.tw/2013/09/ios-facebook.html
裡面有詳細介紹 這邊只大概說明(要用chrome看)
1.先拉登入及登出頁面和換頁
2.import fbSDK
3.加入登入程式
3.FB推文
老師部落格:http://lokanghung.blogspot.tw/2013/09/ios-fbrequest-requestforpoststatusupdate.html
1.使用facebook api
1.下載facebook的framework:
https://developers.facebook.com/docs/ios/getting-started/
中間有個here
2.下載後安裝 他會放到文件FacebookSDK裡頭 將FacebookSDK.framework拉到程式 裡頭
3.先到fb的https://developers.facebook.com/apps/建立自己的應用程式
5.修改專案的plist檔案就完成了
老師部落格:http://lokanghung.blogspot.tw/2013/09/ios-facebook.html
裡面有詳細介紹 這邊只大概說明(要用chrome看)
1.先拉登入及登出頁面和換頁
2.import fbSDK
3.加入登入程式
老師部落格:http://lokanghung.blogspot.tw/2013/09/ios-fbrequest-requestforpoststatusupdate.html
4.FB 抓取個人資料
5.FB 貼圖
6.FB 刪除分享
訂閱:
文章 (Atom)