時間加減
$date = date("Y-m-d",strtotime("-5 day")); // 今天日期減5天
$date = date("Y-m-d",strtotime("-5 month")); // 今天日期減5個月
$date = date("Y-m-d",strtotime("-5 year")); // 今天日期減5年
設定某個變數時間加減
$date = date("Y-m-d",strtotime("+10 day",strtotime($start_date))); // $start_date + 10天
怕系統時間不是台灣時間,確保安全程式可以加上
ini_set('date.timezone','Asia/Taipei');
2013年11月14日 星期四
【職訓局-手機程式開發班】2013 11/14 Xcode
錄影檔
navigationController:
1.https://www.youtube.com/watch?v=AS64UAiEsmo
2.https://www.youtube.com/watch?v=JOi5WS6JtQg
TabBar:
3.https://www.youtube.com/watch?v=bcCrchxZ1U0
Spring & Struts:
4.https://www.youtube.com/watch?v=-rOB8_tczgw
Autolayout
5.https://www.youtube.com/watch?v=nKqd4dVQwq8
骰子(晃動)
6.https://www.youtube.com/watch?v=BzKWbqM1esM
7.https://www.youtube.com/watch?v=FVKI1nkvyHI
水平儀
8.https://www.youtube.com/watch?v=WlNL0K673T4
網路
9.https://www.youtube.com/watch?v=JAHPBP8LTFI
1.空專案加入程式碼
2.去下一頁即回上一頁
3.TabBar
4骰子遊戲
4.Reachability
navigationController:
1.https://www.youtube.com/watch?v=AS64UAiEsmo
2.https://www.youtube.com/watch?v=JOi5WS6JtQg
TabBar:
3.https://www.youtube.com/watch?v=bcCrchxZ1U0
Spring & Struts:
4.https://www.youtube.com/watch?v=-rOB8_tczgw
Autolayout
5.https://www.youtube.com/watch?v=nKqd4dVQwq8
骰子(晃動)
6.https://www.youtube.com/watch?v=BzKWbqM1esM
7.https://www.youtube.com/watch?v=FVKI1nkvyHI
水平儀
8.https://www.youtube.com/watch?v=WlNL0K673T4
網路
9.https://www.youtube.com/watch?v=JAHPBP8LTFI
1.空專案加入程式碼
下載 |
加入檔案並設定 |
2013年11月11日 星期一
【Android】換頁
【Android】錯誤整理
出現:
2.The type java.lang.Object cannot be resolved. It is indirectly referenced from required .class files
解決:
可能是因為安裝了多次ADT
下載新的JRE
安裝新的JRE
進入window > preferences > java > Installed JREs
1.The project was not built since its build path is incomplete. Cannot find the class file for java.lang.Object. Fix the build path then try building this project
2.The type java.lang.Object cannot be resolved. It is indirectly referenced from required .class files
解決:
可能是因為安裝了多次ADT
下載新的JRE
安裝新的JRE
進入window > preferences > java > Installed JREs
【職訓局-手機程式開發班】2013 11/11 Android
1.開啟特定網頁
其他URI功能:
1. 使用瀏覽器開啟
Uri myBlogUri = Uri.parse("http://kuikui.javaeye.com");
Intent returnIt = new Intent(Intent.ACTION_VIEW, myBlogUri);
startActivity(returnIt);
2,地圖
Uri mapUri = Uri.parse("geo:38.899533,-77.036476");
Intent returnIt = new Intent(Intent.ACTION_VIEW, mapUri);
startActivity(returnIt);
3,調撥打電話界面
請將以下內容加入到manifest檔裡
<uses-permission android:name="android.permission.CALL_PHONE"></uses-permission>
Uri telUri = Uri.parse("tel:100861");
Intent returnIt = new Intent(Intent.ACTION_DIAL, telUri);
startActivity(returnIt);
4. 直接撥打電話
請將以下內容加入到manifest檔裡
<uses-permission android:name="android.permission.CALL_PHONE"></uses-permission>
Uri callUri = Uri.parse("tel:100861");
Intent returnIt = new Intent(Intent.ACTION_CALL, callUri);
startActivity(returnIt);
5. 反安裝
Uri uninstallUri = Uri.fromParts("package", "xxx", null);
Intent returnIt = new Intent(Intent.ACTION_DELETE, uninstallUri);
startActivity(returnIt);
6,安裝
Uri installUri = Uri.fromParts("package", "xxx", null);
Intent returnIt = new Intent(Intent.ACTION_PACKAGE_ADDED, installUri);
startActivity(returnIt);
7.播放
Uri playUri = Uri.parse("file:///sdcard/download/everything.mp3");
Intent returnIt = new Intent(Intent.ACTION_VIEW, playUri);
startActivity(returnIt);
8,Email
Uri emailUri = Uri.parse("mailto:shenrenkui@gmail.com");
Intent returnIt = new Intent(Intent.ACTION_SENDTO, emailUri);
startActivity(returnIt);
9,發郵件
returnIt = new Intent(Intent.ACTION_SEND);
String[] tos = { "shenrenkui@gmail.com" };
String[] ccs = { "shenrenkui@gmail.com" };
returnIt.putExtra(Intent.EXTRA_EMAIL, tos);
returnIt.putExtra(Intent.EXTRA_CC, ccs);
returnIt.putExtra(Intent.EXTRA_TEXT, "body");
returnIt.putExtra(Intent.EXTRA_SUBJECT, "subject");
returnIt.setType("message/rfc882");
Intent.createChooser(returnIt, "Choose Email Client");
10,發簡訊
Uri smsUri = Uri.parse("tel:100861");
returnIt = new Intent(Intent.ACTION_VIEW, smsUri);
returnIt.putExtra("sms_body", "shenrenkui");
returnIt.setType("vnd.android-dir/mms-sms");
11,直接發郵件
Uri smsToUri = Uri.parse("smsto://100861");
returnIt = new Intent(Intent.ACTION_SENDTO, smsToUri);
returnIt.putExtra("sms_body", "shenrenkui");
12,發MMS
Uri mmsUri = Uri.parse("content://media/external/images/media/23");
returnIt = new Intent(Intent.ACTION_SEND);
returnIt.putExtra("sms_body", "shenrenkui");
returnIt.putExtra(Intent.EXTRA_STREAM, mmsUri);
returnIt.setType("image/png");
2013年11月7日 星期四
【職訓局-手機程式開發班】2013 11/07 Xcode
2013年11月4日 星期一
2013年10月31日 星期四
【職訓局-手機程式開發班】2013 10/30 Xcode
影音檔:
1.https://www.youtube.com/watch?v=-vtqYmZCG9g [alertView]
2.https://www.youtube.com/watch?v=YWMxF-195jA [actionSheet]
3.https://www.youtube.com/watch?v=24V7lAVOlfA [UIDatePicker]
4.https://www.youtube.com/watch?v=LjgmazxN0dA [UIPickerView 1] 後面一段沒錄
5.https://www.youtube.com/watch?v=RqkDttRLEr8 [UIPickerView 3]
6.https://www.youtube.com/watch?v=1_dEGP2-CDM [UIActivityIndicatorView]
7.https://www.youtube.com/watch?v=J898m_Wvd70 [UIProgressView]
8.https://www.youtube.com/watch?v=cj2Ny5tfwbo [Dynamics1]
9.https://www.youtube.com/watch?v=UWx4CRL4z5g [Dynamics2]
10.https://www.youtube.com/watch?v=UWx4CRL4z5g [Dynamics3]
1.動畫
讓手機變橫向一般設定
手機方向設定
將馬的imageView拉進程式並輸入動畫程式碼
結果:
2.AlertView
其實蠻簡單的
可代理的function
3.ActionSheet
4.UIDatePicker
5.UIPickerView
顯示
完成
6.UIActivityIndicatorView
7.UIProgressView
8.Dynamics Gravity重力 Collision碰撞 Reset初始化
9.Attachment 吸附
1.https://www.youtube.com/watch?v=-vtqYmZCG9g [alertView]
2.https://www.youtube.com/watch?v=YWMxF-195jA [actionSheet]
3.https://www.youtube.com/watch?v=24V7lAVOlfA [UIDatePicker]
4.https://www.youtube.com/watch?v=LjgmazxN0dA [UIPickerView 1] 後面一段沒錄
5.https://www.youtube.com/watch?v=RqkDttRLEr8 [UIPickerView 3]
6.https://www.youtube.com/watch?v=1_dEGP2-CDM [UIActivityIndicatorView]
7.https://www.youtube.com/watch?v=J898m_Wvd70 [UIProgressView]
8.https://www.youtube.com/watch?v=cj2Ny5tfwbo [Dynamics1]
9.https://www.youtube.com/watch?v=UWx4CRL4z5g [Dynamics2]
10.https://www.youtube.com/watch?v=UWx4CRL4z5g [Dynamics3]
1.動畫
讓手機變橫向一般設定
手機方向設定
將圖放入UI
匯入動畫的framwork QuartzCore.framework將馬的imageView拉進程式並輸入動畫程式碼
結果:
2.AlertView
其實蠻簡單的
可代理的function
3.ActionSheet
4.UIDatePicker
5.UIPickerView
顯示
完成
6.UIActivityIndicatorView
7.UIProgressView
8.Dynamics Gravity重力 Collision碰撞 Reset初始化
9.Attachment 吸附
訂閱:
文章 (Atom)