Time of Update: 2015-07-13
標籤:leetcode java trapping rain water 題意:Given n non-negative integers representing an elevation map where the width of each bar is 1, compute how much water it is able to trap after
Time of Update: 2015-07-13
標籤: 部分代碼如下: public void ShowAlertScreen(Context context,String titles,String content,String phone) { // 擷取Service wm =
Time of Update: 2015-07-13
標籤:android intent和intent action大全1.Intent的用法:(1)用Action跳轉1、使用Action跳轉,如果有一個程式的AndroidManifest.xml中的某一個 Activity的IntentFilter段中 定義了包含了相同的Action那麼這個Intent就與這個目標Action匹配。如果這個IntentFilter段中沒有定義 Type,Category,那麼這個
Time of Update: 2015-07-13
標籤:通過判斷瀏覽器的userAgent,用正則來判斷是否是ios和Android用戶端。代碼如下:<script type="text/javascript">var u = navigator.userAgent, app = navigator.appVersion;var isAndroid = u.indexOf(‘Android‘) > -1 || u.indexOf(‘Linux‘) > -1; //android終端或者uc瀏覽器var isiOS = !
Time of Update: 2015-07-13
標籤: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 the
Time of Update: 2015-07-13
標籤:前提: Centos 系統, apache 已安裝, python 已安裝。 1. 首先下載mod_wsgi-3.5.tar.gz :https://code.google.com/p/modwsgi/2. 解壓:tar -zxvf mod_wsgi-3.5.tar.gz3. 進入解壓後的目錄:cd mod_wsgi-3.54. 配置:./configure 此時可能會遇到問題:apxs:
Time of Update: 2015-07-13
標籤:在基類table增加upgrade操作:public abstract class DbBaseTable {private static final String TAG = "DbBaseTable";/** * @return the DB table name */abstract String getName();/** * Creates the DB table according to the DB scheme * * @param db
Time of Update: 2015-07-13
標籤:ios 時間戳記 字串 nsdate 1 在項目中我們經常要做時間格式的轉換,以下是我封裝的NSDate+TimeCategory,希望協助到大家。#import <Foundation/Foundation.h>@interface NSDate (TimeCategory)/** * 字串轉NSDate * * @
Time of Update: 2015-07-13
標籤:1、在images.xcassets裡面加入LaunchImage2、刪掉LaunchScreen.xib3、在Supporting Files裡的info.plist的檔案下,移除Launch screen interface file base...在設定檔Target--->項目名稱---->General----->4、把以上第二行改成以上名字5、- (BOOL)application:(UIApplic
Time of Update: 2015-07-13
標籤:ios 帶搜尋欄表視圖 帶搜尋欄表視圖 此執行個體主要實現 Search Bar and Search Display Controller ,注意不是Search Bar控制項。 Search Bar and Search Display
Time of Update: 2015-07-13
標籤:1.首先我們直接上代碼介紹:// Top-level build file where you can add configuration options common to all sub-projects/modules.buildscript { repositories { //這裡可以看到是指明的jcenter(), 之前版本則是mavenCentral() //
Time of Update: 2015-07-13
標籤:1、產生ipa包這裡不介紹正規的打包方式(選擇真機調試-編譯成功以後-工具product-archive-。。。。)下面介紹快速打包方式:1)選擇真機調試-編譯成功以後右擊.app檔案,選擇show in
Time of Update: 2015-07-13
標籤:android四大組件分別為activity、service、content provider、broadcast
Time of Update: 2015-07-13
標籤:手勢 收合 鍵盤 空白 點擊 iOS點擊空白處或點擊背景收合鍵盤在viewDidLoad中添加手勢- (void)viewDidLoad{ [super viewDidLoad]; //添加手勢UITapGestureRecognizer *tap1 =
Time of Update: 2015-07-13
標籤:Google App Engine是一個網路應用託管服務(web application hosting service)。所謂網路應用(By web application),我們的意思的可以通過網路訪問的應用或者服務,通常是通過Web瀏覽器。有購物車的店面(storefronts with shopping carts),社交網路(social networking sites),多人遊戲(multiplayer games),行動裝置 App(mobile applications)
Time of Update: 2015-07-13
標籤:#import <CommonCrypto/CommonDigest.h> // Need to import for CC_MD5 access//將字串進行MD5加密,返回加密後的字串。- (NSString *)md5:(NSString *)str{ const char *cStr =
Time of Update: 2015-07-13
標籤:mystra ios uiview 停止互動 失去焦點 UIView停止互動(失去焦點): 設定userInteractionEnabled=NO, 擷取互動設定YES. 可以應用於UIButton, UITextField等互動型控制項.[editButton
Time of Update: 2015-07-13
標籤:<!doctype html><html><head> <meta charset="UTF-8"> <title>擷取裝置資訊</title> <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no"/
Time of Update: 2015-07-13
標籤:package com.web伺服器區端判斷請求是否行動裝置;import java.util.regex.Matcher;import java.util.regex.Pattern;public class WebRequestUtil { // \b 是單詞邊界(連著的兩個(字母字元 與 非字母字元) 之間的邏輯上的間隔), // 字串在編譯時間會被轉碼一次,所以是 "\\b" // \B 是單詞內部邏輯間隔(連著的兩個字母字元之間的邏輯上的間隔)
Time of Update: 2015-07-13
標籤:1.建立一個android項目File——New——Other——android application project填寫application name(就是應用的名字,比如:天天酷跑)填寫project name(就是程式項目名,比如:TTKP,打包後名字也是TTKP.APP)填寫package