Time of Update: 2015-05-08
標籤:java 多態 物件導向 介面 抽象類別 1.構造方法: 如果類中不寫構造方法,編譯器會預設添加構造方法,內部只有一句super(); Class A { public
Time of Update: 2015-05-07
標籤:android 許可權 Log輸出某APP擁有的許可權PackageManager pm = context.getPackageManager();PackageInfo pi;try { // 參數2必須是PackageManager.GET_PERMISSIONS pi = pm.getPackageInfo(packageName, PackageManager.GET_PERMISSIONS);
Time of Update: 2015-05-07
標籤:Android匯入源碼packages 中的apps出錯下載完源碼後再linux 中編譯架構中的app模組是不會出錯的,但是載入到eclipse就會有很多錯誤。Google 給使用者提供的SDK 都是閹割版本的 無法使用隱藏的API,如果想要使用系統API 比如import android.os.AsyncResult;首先需要下載源碼,然後編譯.編譯完成後在out/target/common/obj/JAVA_LIBRARIES/framework_intermediates
Time of Update: 2015-05-07
標籤:活動概況時間:2015年05月23日13:30-17:30地點:長安北路1號國際會展酒店省中小企業服務平台主辦:APICloud、七牛、領通科技網址:www.apicloud.com、www.qiniu.com、www.cutecomm.com費用:免費 活動背景“互連網+”的大背景下,移動互連網正在改變我們的生活,同時也改變著我們所處的商業環境,能否搭上移動互連網的快車,也許會成為很多傳統企業和創業團隊在賽跑中的彎道。在本次活動中,APICloud將會與
Time of Update: 2015-05-07
標籤:多年以來,人們打電話的時候都會問對方:“現在能聽到我說話嗎?”不久之後,人們的問題就會變成:“現在能找到我嗎?”。過去幾年來,手機領域正在悄悄發生著一場變革,也就是所謂的“移動定位服務(location-based
Time of Update: 2015-05-07
標籤:AndroidAnnotations是一個第三方架構,通過注釋來開發應用。使用AndroidAnnotations能大大減少代碼量。[java]package com.example.androidannotations; import android.app.Activity; import android.widget.TextView; import
Time of Update: 2015-05-07
標籤: /////////////////////////////初始化,self.view是父控制項///////////////////////////////// _webView = [[UIWebView alloc] initWithFrame: CGRectMake(0, 0, self.view.frame.size.width, 0)]; _webView.delegate = self; _webView.scrollView.bounces =
Time of Update: 2015-05-07
標籤:cordova ios開發 外掛程式 <pre name="code" class="objc"><span style="font-size:14px;">搞了半個月Cordova外掛程式,但一直沒沉下心能弄。為了更好的理解Cordova外掛程式的開發,今天自己寫了一個Demo
Time of Update: 2015-05-07
標籤:@Override public boolean onKeyDown(int keyCode, KeyEvent event) { //按下鍵盤上返回按鈕
Time of Update: 2015-05-07
標籤:nagios redis 監控redis連接埠如下:#!/bin/sh#Created by hys 20140823declare -a master_ismaster_is=($(redis-cli -h 192.168.0.76 -p 7711 INFO |grep role |awk -F: ‘{print $2}‘))echo $master_isif [ ${master_is} ==
Time of Update: 2015-05-07
標籤:autolayout sizeclass 代碼混合 iOS8之後,autolayout,sizeclass使用中如何配合代碼寫布局
Time of Update: 2015-05-07
標籤:原文地址 :IOS之禁用UIWebView的預設互動行為 http://my.oschina.net/hmj/blog/111344
Time of Update: 2015-05-07
標籤:很多學習Android程式設計的人都會發現每個人對代碼的寫法都有不同的偏好,比較明顯的就是對控制項響應事件的寫法的不同。因此本文就把這些寫法總結一下,比較下各種寫法的優劣,希望對大家靈活地選擇編碼方式可以有一定的參考借鑒價值。xml檔案代碼如下:<Button android:id="@+id/button1" android:layout_width="wrap_content"
Time of Update: 2015-05-07
標籤:結果XML檔案如下:<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:id="@+id/container" android:layout_width="match_parent" android:layout_height="match_parent"
Time of Update: 2015-05-07
標籤:本文轉載至http://my.oschina.net/sayonala/blog/198376摘要 經過一下午的查閱資料及嘗試,最終解決了在圖片和文字垂直排列的情況下,如果文字長度變化會導致圖片位置變動的問題。 經過一下午的查閱資料及嘗試,最終解決了在圖片和文字垂直排列的情況下,如果文字長度變化會導致圖片位置變動的問題,最開始採用了網上比較多的做法,做法如下:?1234567891011121314151617181920
Time of Update: 2015-05-07
標籤:1.先上題Write an algorithm to determine if a number is "happy".A happy number is a number defined by the following process: Starting with any positive integer, replace the number by the sum of the squares of its digits, and repeat the process until
Time of Update: 2015-05-07
標籤:在開發中,我們通常要對日誌的輸出做統一管理,下面就為大家推薦一個日誌輸出類,在開發階段只需將DEBUG常量設為true,生產環境將DEBUG設為false即可控制日誌的輸出。啥都不說了,需要的朋友直接帶走。package com.android.util;/** * 日誌輸出統一管理 * * @author 祁連山 * @date 2015-04-27 * @version 1.0 * */public class Log { private static final
Time of Update: 2015-05-07
標籤:ios 虛線 //此方法目前只能添加在self視圖上(如果有視圖在self視圖上,可能會遮蓋線條),畫的是虛線//調用[self drawRect:self.frame];//覆寫- (void)drawRect:(CGRect)rect{ CGContextRef context = UIGraphicsGetCurrentContext(); CGContextBeginPath(context);
Time of Update: 2015-05-07
標籤:android android開發 app Application和Activity中的onCreate都進行了最佳化,基本沒有耗時操作,但是啟動應用之後還是會閃現一下白色背景,然後才進入Splash頁面,對比了一下QQ、、微博等用戶端,點擊之後都是瞬間響應Splash啟動頁,差別在哪裡呢。其實就算你onCreate啥都不做,仍然會閃一下白屏,因為初始化解析介面時需要一定時間,解決方案是自
Time of Update: 2015-05-07
標籤:安全 https nsurlconnection http 一直使用NSURLConnection請求HTTP介面,現在為了安全性的考慮打算使用HTTPS。那麼怎麼修改呢?1.不需要認證驗證 ps:我們使用的就是這種1.1 直接修改HTTP為HTTPS;1.2 確認有 "Security.framework"1.3