- Mar 04 Mon 2013 11:49
將附初值的的變量定位到ROM中
- Mar 04 Mon 2013 11:45
Keil的lib庫函數的封裝
- Feb 15 Fri 2013 09:08
dmg文件怎么打开?四种方法教你如何打开dmg文件
最近遇到了以dmg结尾的文件,着实把我给忙着了,之前没有遇到过这种后缀名的文件,查询了下,总结四种方法分享给遇到此类问题的朋友么,以后大家就不会再有
dmg文件怎么打开,如何打开dmg文件,dmg格式用什么打开 这些疑问了。
- Feb 06 Wed 2013 17:09
解決 VMware 出現 “Failed to lock the file" 的錯誤
VMware Server 當掉後重新啟動 Guest OS 時,出現
cannot open the disk '*.vmdk' or one of the snapshot disk is depends on. Reason: Failed to lock the file.
解決方法一:
- Nov 22 Thu 2012 11:39
寫入文字檔
程式執行當中常常需要記錄各種資訊,如果需要處理的資訊較為單純,可以直接使用文字檔來紀錄,假若資料較繁雜就需要用SQLite,在此先以簡單文字檔做切入,先以Java I/O介紹寫檔、讀檔常用的方法及常用的Method
- Nov 21 Wed 2012 15:12
android開機後自動啟動activity/service
首先是從BroadcastReceiver派生出一個新類,用來監聽系統啟動後發出的廣播消息android.intent.action.BOOT_COMPLETED 。
- BootReceiver.java:
- import android.content.BroadcastReceiver;
- import android.content.Context;
- import android.content.Intent;
- import android.util.Log;
- publicclass BootReceiver extends BroadcastReceiver {
- publicvoid onReceive(Context context, Intent intent) {
- if (intent.getAction().equals("android.intent.action.BOOT_COMPLETED"))
- {
- Log.d("BootReceiver", "system boot completed");
- Intent newIntent = new Intent(context, FirstRun.class);
- newIntent.setAction("android.intent.action.MAIN"); //MyActivity action defined in AndroidManifest.xml
- newIntent.addCategory("android.intent.category.LAUNCHER");//MyActivity category defined in AndroidManifest.xml
- newIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK); //If activity is not launched in Activity environment, this flag is mandatory to set
- context.startActivity(newIntent);
- //if you want to start a service, follow below method:
- /*******************************************************
- Intent service = new Intent(yourService.ACTION_START);
- service.setClass(context, yourService.class);
- context.startService(service);
- ******************************************************/
- }
- }
- }
接下来这个类就是监听到系统启动完毕后,我们要运行的activity.
- Nov 21 Wed 2012 10:42
Hello World C program using Android Toolchain
I had reported earlier how I had gotten a C Hello World statically-linked program running on my Android phone using CodeSourcery's toolchain (on linux). Today I got a dynamically-linked Hello World program running on the phone, compiled using Android's prebuilt toolchain from the source.
- Nov 21 Wed 2012 10:40
ERROR: Application requires API version 10. Device API version is 8
- Nov 20 Tue 2012 09:25
./hello1,出現:Not executable:magic 7F45
Hello World in C on Android
If you've been following the Android world, you'd know that Android's SDK requires you to write apps in Java. Ever since I got my phone I've been dying to run a Hello World C program, but I've been unable to get the right cross compiler for it.