Time of Update: 2015-10-11
標籤:在他們的定義ContentProvider結合ContentObserver一起使用時,自己寫的ContentProvider,在運行完insert、delete和update後,要手動地調用getContentResolver().notifyChange()這種方法來通知修改的產生。直接上代碼:MainActivitypackage com.jackie.contentobserver;import java.util.ArrayList;import android.net.Uri;
Time of Update: 2015-10-11
標籤: 首先ActiveAndroid是依靠註解工作的。 @Table(name = "UserBean")public class UserBean extends Model { @Column(name = "uid") public String uid; @Column(name = "nick_name") public String nick_name; public String getUid() { return uid;
Time of Update: 2015-10-11
標籤:1.1.1. If a crash happens thisconfiguration does not guarantee that the relay log info will be consistent【環境的敘述性說明】msyql5.6.14【報錯資訊】mysql的slave啟動時,error.log中出現Warning警告:[Warning] Slave SQL: If a crash happensthis configuration does not
Time of Update: 2015-10-11
標籤:我們可以將視圖分為4個基本狀態:視圖建立、視圖可見、視圖不可見、系統低記憶體。1.其中當視圖正在建立時,會調用viewDidLoad方法,這個時候視圖並未出現,而是將視圖控制器初始化後剛載入到記憶體中,這個方法也常用來初始化視圖控制器所用,如初始化視圖中常用的控制項等。2.在視圖可見前和可見後分別會調用viewVillAppear和viewDidAppear方法。3.在視圖不可見前和不可見後分別會調用viewVillDisappear和viewDidAppear方法。4.在應用程式系統記憶
Time of Update: 2015-10-11
標籤:CLGeocoder *geoCoder = [[CLGeocoder alloc] init];// 通過地理編碼,得到位置, CLLocation *loc = [[CLLocation alloc] initWithLatitude:30.662221 longitude:104.041367]; [geoCoder reverseGeocodeLocation:loc completionHandler:^(NSArray
Time of Update: 2015-10-11
標籤:升級為iOS9後,預設請求類型為https,如何使用http進行請求會報錯The resource could not be loaded because the App Transport Security policy requires the use of a secure connection.原因 iOS9引入了新特性App Transport Security
Time of Update: 2015-10-11
標籤:
Time of Update: 2015-10-11
標籤:在iOS7以及以後有效: // base64編碼- (NSString*)base64encode:(NSString*)str { // 1.把字串轉成位元據 NSData* data = [str dataUsingEncoding:NSUTF8StringEncoding]; // 2.將二進位進行base64加密(編碼) //
Time of Update: 2015-10-11
標籤:問題描寫敘述:在Eclipse中執行ant批量打包工具出錯,日誌資訊例如以下:D:\Android\android-sdk-windows\tools\ant\build.xml:601: The following error occurred while executing this line:D:\Android\android-sdk-windows\tools\ant\build.xml:720: The following error occurred while
Time of Update: 2015-10-11
標籤: 今天在項目中運到了這個的一個問題,就是在原來的xib的是適配所有的iphone螢幕,然而現在既要適配iphone 也要適配Ipad,搞的很頭大,現在就為了實現這個效果,老大給我了兩種方法,就是在xib的基礎上修改的,之直接上代碼了,不多說了. 第一種方式:修改xib的檔案(source code) 1.在適配所有的iphone的螢幕的xib中會出現這個東西: <variation key=
Time of Update: 2015-10-11
標籤:當使用者在系統的專輯,點擊共用時。通過我們自己的app。分享此圖片。1.註冊主要是在AndroidManifest.xml中,對activity注冊Intent-filter。如:<activity android:name=".ui.MyActivity" > <intent-filter> <action android:name="android.intent.action.SEND"
Time of Update: 2015-10-11
標籤:幾個基本的概念 : OS X : 屬於案頭PC層級(IMac,MacPro等)對應安裝的作業系統IOS : 屬於行動裝置層級(Iphone,Ipad等)對應安裝的作業系統XCode: 是一個IDE,也就是一個開發人員工具程式IOS SDK : 是一個編程API集合(蘋果官方提供的開發包,包含大量類與方法,供開發人員調用) 我總結了幾個如下幾個問題,並作出總結解答:IOS系統與IOS SDK的關係?SDK版本一般就是IOS的版本,例如用IOS SDK
Time of Update: 2015-10-11
標籤:1.MD5加密Message Digest Algorithm MD5(中文名為訊息摘要演算法第五版)為電腦安全領域廣泛使用的一種散列函數,用以提供訊息的完整性保護。該演算法的檔案號為RFC 1321(R.Rivest,MIT Laboratory for Computer Science and RSA Data Security Inc. April
Time of Update: 2015-10-11
標籤: 1. Correctness 1) DuplicatedIds Layout於id應該唯一 2) NewApi 代碼中使用的某些API高於Manifest中的Min SDK 3) InconsistentArrays 字串國際化中。同一名字的的String-Array相應的item值不同樣 4) Registered Activity/Service/ContentProvider沒有通過AndroidManifest注冊 5) Deprecated
Time of Update: 2015-10-11
標籤:僅供參考,只要形成一個統一,見量知其意就可也就是工資的高低和你的代碼品質成正比的,養成良好習慣吧!!(一)Layout命名1.contentview命名:activity_功能模組.xml例如:activity_main.xml、activity_more.xml2.Dialog命名:dialog_描述.xml例如:dlg_hint.xml2.PopupWindow命名:ppw_描述.xml例如:ppw _info.xml3.
Time of Update: 2015-10-11
標籤:我自己也感到這些代碼非常不成熟,一定有很多可以最佳化的地方,就當做一個反面教材,供大家剖析、批評。index.html代碼:<!DOCTYPE html><html><head> <meta charset="utf-8"> <meta name="viewport" content="initial-scale=1.0, maximum-scale=1.0,
Time of Update: 2015-10-11
標籤:1. 不帶資料 @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); next=(Button)findViewById(R.id.next); next.setOnClickListener(new
Time of Update: 2015-10-11
標籤:iOS中的Block機制,可以簡化程式,實現回調功能。跟C語言中的函數指標類似。可以通過傳遞Block實現函數的回調處理。簡單地例子: 定義一個block int(^myblock)(int a, int b); 解釋:定義了一個block,名稱是myblock(類似函數指標),它的傳回型別是int,傳入2個int型的a,b的參數。 定義函數指標具體要做的內容。(函數體) myblock = ^(int a, int b){ retrun
Time of Update: 2015-10-11
標籤:理解:@protocal 可以定義一個協議。一個類如果使用了這個協議,那麼就要按照這個協議要求的去辦事。最常見的就是UITableViewDelegate、UITableViewDataSource這個兩個傢伙。我們的類可以使用這兩個協議,並對協議定義的方法進行實現(numberOfRowsInSection,
Time of Update: 2015-10-11
標籤:一. 允許網頁寬度自動調整: "自適應網頁設計"到底是怎麼做到的?其實並不難。 首先,在網頁代碼的頭部,加入一行viewport元標籤。 <meta name="viewport" content="width=device-width, initial-scale=1" /> viewport是網頁預設的寬度和高度,上面這行代碼的意思是,網頁寬度預設等於螢幕寬度(width=device-width),原始縮放比