Time of Update: 2015-04-01
標籤:前言:基於android webview 上定製自己使用的可移植瀏覽器apk,遇到好多按鍵處理的問題。所以索性研究了一下keyevent 事件的傳遞流程。frameworks 層keyevent 事件開始是從/frameworks/base/core/java/android/webkit目錄下WebViewClassic.java中的onKeyDown() 函數開始的 // Bubble up the key
Time of Update: 2015-04-01
標籤:The Android University ACM Team Selection ContestTime Limit: 1000ms Memory limit: 65536K 有疑問?點這裡^_^題目描述 Now it‘s 20000 A.D., and the androids also participate in the ACM Inter-national Collegiate Programming Contest
Time of Update: 2015-04-01
標籤:ios 圖片 微博 繪圖 建一個類目(不知道怎麼建的可以去百度一下) UIImage的類目類目的.h檔案 檔案名稱為UIImage+watermark#import <UIKit/UIKit.h>@interface UIImage (watermark)//定義一個方法- (UIImage
Time of Update: 2015-04-01
標籤:手機指南針(1)布局檔案如下:<?xml version="1.0" encoding="utf-8"?><LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent" android:gravity="center"
Time of Update: 2015-04-01
標籤:監控系統之nagios安裝1.安裝軟體依賴包和建立nagios使用者[[email protected] ~]# yum install gcc gcc-c++ make -y[[email protected] ~]# groupadd -g 500 nagios[[email protected] ~]# useradd -r -u 500 -s /sbin/nologin -g nagios
Time of Update: 2015-04-01
標籤:安卓public static void main(String[] args) {dateDiff("2015-04-01 17:06:49", "2015-04-02 17:06:50","yyyy-MM-dd HH:mm:ss");}public static void dateDiff(String startTime, String 
Time of Update: 2015-04-01
標籤:原始碼下載:http://download.csdn.net/detail/haogaoming123/8555077隨著asihttprequest的停止更新,許多人都轉向了AFNetworking、
Time of Update: 2015-04-01
標籤: 情景是這樣的,我UITableView添加了一個HeaderView,這個HeaderView是通過xib建立,是UIView。出來的結果卻出乎意料,UITableView的Cell最頂部的幾個被HeaderView給遮擋了~~~我勒個去~~神馬情況???!!! 於是哥通過看階層,發現運行出來的HeaderView和Cell列表不在同一層次,理應是同一層才對呀!!!!於是我用其他xib試試,情況一樣,然後改用代碼建立 UIView()
Time of Update: 2015-04-01
標籤:1:兩種方法刪除NSUserDefaults所有記錄//方法一NSString *appDomain = [[NSBundle mainBundle] bundleIdentifier];[[NSUserDefaults standardUserDefaults] removePersistentDomainForName:appDomain]; //方法二- (void)resetDefaults { NSUserDefaults * defs = [NSUserDefaults
Time of Update: 2015-04-01
標籤: 1. NSTimer,可以設定一段時間執行一次,不會卡住線程//NSTimer不準確,CADisplayLink準確 self.timer = [NSTimer scheduledTimerWithTimeInterval:3.0target:selfselector:@selector(roll) userInfo:nilrepeats:NO]; //NSDefaultRunLoopMode
Time of Update: 2015-04-01
標籤:1、定義介面content的方法,如ok,cancle;2、在View的處理類myview中實現content的方法。3、通過contently.getChildAt(i)的方法獲得View v;4、可以使用 content ct = (content)v;5、使用ct.ok()和ct.cancel();代碼如下:ll = (LinearLayout) findViewById(R.id.contently); btncancle = (Button)
Time of Update: 2015-04-01
標籤:轉:http://www.blueowls.net/android-strictmode%E4%BB%8B%E7%BB%8D/ /** * enables "strict mode" for testing - should NEVER be used in release builds */ @TargetApi(Build.VERSION_CODES.JELLY_BEAN) private static void enableStrictMode(
Time of Update: 2015-04-01
標籤:在ios8上 [TableView setSeparatorInset:UIEdgeInsetsMake(0,0,0,0)];不起作用經過測試加入下面方法 在ios7 8上都可以正常工作 1 -(void)viewDidLayoutSubviews 2 { 3 if ([self.tableView respondsToSelector:@selector(setSeparatorInset:)]) { 4 [self.tableView
Time of Update: 2015-04-01
標籤:content android 開發 共用 provider Focus on technology, enjoy life!—— QQ:804212028
Time of Update: 2015-04-01
標籤:android packagemanager 應用 本文將介紹如何擷取裝置中已經安裝的應用資訊,包括:應用程式名稱、包名、表徵圖等。獲得資訊列表後,選擇某一項記錄還可以啟動對應的應用!1.代碼實現package com.example.showapplist;import java.util.ArrayList;import java.util.List;import
Time of Update: 2015-04-01
標籤:
Time of Update: 2015-04-02
標籤:Android中在sqlite插入資料的時候預設一條語句就是一個事務,因此如果存在上萬條資料插入的話,那就需要執行上萬次插入操作,操作速度可想而知。因此在Android中插入資料時,使用批量插入的方式可以大大提高插入速度。 有時需要把一些資料內建到應用中,常用的有以下2種方式:其一直接拷貝製作好的SQLite資料庫檔案,其二是使用系統提供的資料庫,然後把資料批量插入。我更傾向於使用第二種方式:使用系統建立的資料庫,然後批量插入資料。批量插入資料也有很多方法,那麼那種方法更快呢,下面通過一
Time of Update: 2015-04-02
標籤: 之前遇到過一個問題,就是發現我在程式中產生一個新的 Bitmap 之後,當我開啟系統的 Gallery 查看時,並沒有看到新產生的映像。然而開啟檔案瀏覽器,找到儲存 Bitmap 所在的檔案夾下,還能看到程式產生的 Bitmap 檔案。也就是說,檔案其實存在,但 Gallery 似乎並沒有重新整理。之後,又一個新的行為證實了我的觀點,即,每次重啟裝置之後, Gallery 中就會顯示新產生的 Bitmap
Time of Update: 2015-04-02
標籤:Sqlite3支援的資料類型 :NULL、INTEGER、REAL、TEXT、BLOB 但實際上,sqlite3也接受如下的資料類型: smallint 16 位元的整數。 interger 32 位元的整數。 decimal(p,s) p 精確值和 s 大小的十進位整數,精確值p是指全部有幾個數(digits)大小值,s是指小數點後有幾位元。如果沒有特別指定,則系統會設為 p=5;
Time of Update: 2015-04-02
標籤:Ubuntu 14.04安裝 jdk-7u75-linux-x64.tar.gz總的原則:將jdk-7u10-linux-x64.tar.gz壓縮包解壓至/usr/lib/jdk,設定jdk環境變數並將其修改為系統預設的jdk 1.將jdk-7u75-linux-x64.tar.gz拷貝到/usr/lib/jdk/目錄下面並解壓,這裡如果沒有jdk檔案夾,則建立該檔案夾,命令:sudomkdir jdksudocp -r