Time of Update: 2016-01-25
標籤:iOS9引入了新特性App Transport Security (ATS)。詳情:App Transport Security (ATS) 如果你想設定不阻止任何網路,只需要在info.plist檔案中加入以下內容即可 如果你想設定只允許特定host的網路請求,在info.plist檔案中加入以下內容 這樣,你在發往baike.baidu.com這個host的請求就都不會被阻止了,你可以註冊多個網域名稱。網路請求報錯:The resource could
Time of Update: 2016-01-26
標籤:開發準備中http://www.cnblogs.com/dev2007/p/4059829.html主要介紹了基礎環境的搭建,開發工具主要是Eclipse,由於Android Studio使用越來越廣,此篇針對Android Studio相關簡要說明。首先推薦網站1:http://www.androiddevtools.cn/ 幾乎android相關工具都能在上面下載。網站2:http://www.android-studio.org/ Android Studio的中文社區1.
Time of Update: 2016-01-25
標籤:代碼如下: public Bitmap transform(Bitmap source) { int size = Math.min(source.getWidth(), source.getHeight()); int x = (source.getWidth() - size) / 2; int y = (source.getHeight() - size) / 2; Bitmap squaredBitmap =
Time of Update: 2016-01-25
標籤:在移動端h5頁面;尤其那些全螢幕的盒展示切換頁面,當使用者無意中將手指滑到了 瀏覽器地址攔以上(中國移動這快地區);此時,手指已經離開螢幕了,但是ios上無法監聽到touchend 事件;toucend監聽的回呼函數事件直接失效;該問題只有在實機 上才有;模擬器上,安卓暫時沒發現; touchcancel取消事件沒啥用; 百度了好久。問了好多人沒找到辦法;後來突然想到解決辦法;move時候 碰到地址攔;直接調用end的回呼函數,
Time of Update: 2016-01-25
標籤:Do you wanna have some toasts ?jquery-toastmessage-plugin is a JQuery plugin which provides android-like notification messages. The toasted messages arriving on the screen in a seamless and natural way. They may or may not disrupt the user and
Time of Update: 2016-01-25
標籤:standard:預設的模式,每次啟動會新建立一個activity對象singleTop:在當前任務棧中,判斷棧頂是否為當前的activity,如果是,就直接使用,如果不是,就會建立新的activity放入棧頂singleTask:在當前任務棧中,判斷棧裡是否存在當前的activity,如果不存在,就會建立新的activity入棧,如果存在,會把該activity之上所有activity清理出棧,顯示當前activitysingleInstance:新建立一個任務棧,放入新建立的activ
Time of Update: 2016-01-25
標籤:前言: 現在Android studio版本已經去到2.0(我暫時用著開發人員版本)了,但是還是和以前的版本一樣卡。 (因為我用了很多第三方的UI控制項,導致在Android studio build一個項目非常漫長,大約改一個字元需要兩三分鐘,最長試過5分鐘呢。 不過在Eclipse的話,最多隻需要半分鐘就Build 到在手機,大大減少編譯項目時間,有助於開發調試。)所以我還是用著Android studio來開發,Eclipse
Time of Update: 2016-01-25
標籤://// ViewController.m// text//// Created by 李東旭 on 16/1/22.// Copyright © 2016年 李東旭. All rights reserved.//#import <UIKit/UIKit.h>#import "ViewController.h"@interface ViewController ()@end@implementation ViewController-
Time of Update: 2016-01-25
標籤: 出現問題:蘋果以前的老版本,OS X 10.8或是10.8.5在當年提示你升級,你又任性沒升級的時候,拖過那陣,你再想升級,就是各種報複。進app store下載或是更新東西都是彈出app stpre 出錯,請稍候重試 (100),然後再提示說此系統不支援銀聯。 現在已經是OS X 10.11了,今天接手了一個老古董,系統才OS X 10.8,按照提示升到了OS X
Time of Update: 2016-01-25
標籤:用於自動補全內容適應器可用於顯示多行內容 1 package com.supermario.autocompletedemo; 2 import android.app.Activity; 3 import android.os.Bundle; 4 import android.widget.ArrayAdapter; 5 import android.widget.AutoCompleteTextView; 6 public class AutoCompleteDemo extends
Time of Update: 2016-01-25
標籤:一、LINEARLAYOUT 線性布局 android:layout_width=""match_parent 適應父控制項 fill_parent 填充父控制項 wrap_content 內容包裹 android:orientation="" 方向選擇 vertical 豎向 horizontal 橫向 android:laytou_weight="" 權重二、FRAMELAYOU 架構布局三、RELATIVELAYOUT 相對布局
Time of Update: 2016-01-25
標籤:1,沒去掉標題和狀態列的。 2,具體代碼 @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); // #########一定要寫在載入布局檔案之前############### //去掉標題列 requestWindowFeature(Window.
Time of Update: 2016-01-25
標籤:之前出於好奇想自己實現apply的功能(不使用call,bind),一寫才發現用eval無法實現,除非傳入的參數全是字串。今天突然看到這個ES6新特性spread opertor,發現有戲了Function.prototype.apply2 = function(obj, arg) { var t = typeof obj == ‘object‘ && !!obj ? obj : window, res; t.__func__ = this; if(arg) {
Time of Update: 2016-01-25
標籤: 1 #import "HMViewController.h" 2 #import "MBProgressHUD+MJ.h" 3 4 @interface HMViewController () 5 @property (weak, nonatomic) IBOutlet UITextField *usernameField; 6 @property (weak, nonatomic) IBOutlet UITextField *pwdField; 7 -
Time of Update: 2016-01-25
標籤:可能是資料庫上當前的串連數目已經超過了它能夠處理的最大值.select count(*) from v$process --當前的串連數select value from v$parameter where name = ‘processes‘ --資料庫允許的最大串連數修改最大串連數:alter system set processes&n
Time of Update: 2016-01-25
標籤:<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> </head> <body> <div id="status"></div> </body> <script> var shake=400
Time of Update: 2016-01-25
標籤: 1 - (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event 2 { 3 dispatch_queue_t queue = dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0); 4 dispatch_async(queue, ^{ 5 NSLog(@"--download--%@", [NSThread
Time of Update: 2016-01-25
標籤: 1 @implementation HMViewController 2 3 - (void)viewDidLoad 4 { 5 [super viewDidLoad]; 6 7 [self performSelectorInBackground:@selector(test) withObject:nil]; 8 9 // [self syncMainQueue]; 10 } 11 12 - (void)test 13 {
Time of Update: 2016-01-25
標籤:一年前在外包公司呆過,驚歎於Cocoa Pods的強大,也讓我有不少迷惑的地方。之前寫過一篇Cocoa Pods使用的部落格,詳細列出了通過Unix終端命令搭建環境的步驟,發布在新浪sae搭建的WordPress部落格平台,但是因為沒有續約,現在找不到了。近半年來在新公司,驚歎於老大進行項目依賴關係的處理,我老大主要是對iOS平台的Xcode工具中的Workspace、Project、Target以及各種靜態庫之間的關係理解的比較透徹,所以他這方面的操作很牛逼。其實跟老大學習這方面的東西,
Time of Update: 2016-01-25
標籤:- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { //標識符 static NSString *iden = @"cardsCell"; CardsCell *cell = [tableView dequeueReusableCellWithIdentifier:iden]; Cards *cards = [