Time of Update: 2014-12-14
一個用戶端向伺服器發送資料,伺服器向串連的用戶端轉寄資料demo,轉寄demo服務端代碼:// 負責處理每個線程通訊的線程類public class ServerThread implements Runnable{// 定義當前線程所處理的SocketSocket s = null;// 該線程所處理的Socket所對應的輸入資料流BufferedReader br = null;public ServerThread(Socket s)throws IOException{this.s =
Time of Update: 2014-12-14
Android WebView js 與 java 之間相互連信,androidwebview前面做手機瀏覽器,經常用到,js網頁與Java之間的相互連信。寫個簡單樣本把。1、Js
Time of Update: 2014-12-14
genymotion 的安裝配置,genymotion安裝配置一、安裝:準備:在genymotion官方網站上下載 genymotion-2.3.1-vbox.exe(包含vbox的PC端程式) 和com.genymobile.genymotion.ide.eclipse.plugin_1.0.3.201403261147.jar (eclipse外掛程式)1.PC系統安裝 genymotion-2.3.1-vbox.exe2.雙擊安裝後的genymotion圓形表徵圖,下載模擬器。3
Time of Update: 2014-12-14
[Android Studio][NDK]Execution failed for task ':app:compileDebugNdk'. Error Code:2,ndkcompiledebugndkExecution failed for task ':app:compileDebugNdk'.> com.android.ide.common.internal.LoggedErrorException: Failed to run
Time of Update: 2014-12-14
iOS 本地可以構造假資料,並轉換為json資料,iosjson // 當服務端介面沒做好時,本地可以構造假資料,並轉換為json資料 NSError *error; NSString *dataStr = [NSString stringWithContentsOfFile:[[NSBundle mainBundle] pathForResource:@"indEditor" ofType:@"txt"] encoding:NSUTF8
Time of Update: 2014-12-14
Android Gradle編譯學習日記之二(使用 Gradle 編譯 Eclipse,引入依賴資源以及遷移 Android Studio),androidgradle大家如果喜歡我的部落格,請關注一下我的微博,請點擊這裡(http://weibo.com/kifile),謝謝轉載請標明出處(http://blog.csdn.net/kifile),再次感謝Android Gradle編譯學習日記(基於 Android Studio 1.0): Android
Time of Update: 2014-12-14
Android Launcher 之 表徵圖加框 最佳化顯示效果,androidlauncher直接看代碼,解釋。主要是用到圖片處理的PorterDuff.Mode.SRC_ATOPSRC_ATOP 源像素和目標像素相混合讓上層圖置中顯示,達到加框效果package com.ferris.launchericonutils;import android.app.Activity;import android.graphics.Bitmap;import
Time of Update: 2014-12-14
Android從零單排之擷取ImageView的寬高為0?問題描述 說起來我也夠菜的!⊙﹏⊙b汗。 今天搞了一個關於圖片的demo,想動態改變一張圖片的大小和margin值。但是在activity中擷取imageview的寬度和高度的時候,總是0。哎,我tm就是搞不懂了,怎麼能是0呢?imageView1 = (ImageView) findViewById(R.id.id_img1);int width = imageView1.getWidth();int
Time of Update: 2014-12-14
android ListView單選功能在Adapter getView內部實現控制。private int selectPosition =-1;class PayAdapter extends BaseAdapter{@Overridepublic int getCount() {// TODO Auto-generated method stubreturn payList==null?0:payList.size();}@Overridepublic Object
Time of Update: 2014-12-13
android 架構LoonAndroid,碼農偷懶專用,androidloonandroid介紹 http://www.eoeandroid.com/thread-324764-1-1.html架構培訓視頻:http://pan.baidu.com/s/1mgv8HTm簡介:下載http://www.devstore.cn/code/info/74.html主要有以下模組:(1) 自動注入架構(只需要繼承架構內的application既可)(2)
Time of Update: 2014-12-14
android控制項開發之RatingBarandroid控制項開發之RatingBar本博文主要講述的RatingBar的開發,此控制項主要是用做評分,評級中使用,下面我們來看看執行個體代碼:MainActivity.java:package com.example.ratingbar;import android.os.Bundle;import android.app.Activity;import android.view.Menu;import
Time of Update: 2014-12-12
在mac上無法使用Android Studio的解決方案,macandroid隨著android Studio 1.0的正式發布,估計使用的人會越來越多,並且官網上現在已經沒有融合好的eclipse下載了,官方推薦下載android
Time of Update: 2014-12-12
android shape和selector,androidselector1.shape 用法樣本: <shape> <!-- 實心 --> <solid android:color="#ff9d77"/> <!-- 漸層 --> <gradient android:startColor="#ff8c00"
Time of Update: 2014-12-12
Android應用源碼航空訂票軟體用戶端,android源碼Android應用源碼航空訂票軟體用戶端功能分類:其他 支援平台:Android 運行環境:Android開發語言:Java 開發工具:Eclipse
Time of Update: 2014-12-12
python爬蟲,爬豆瓣top250電影,pythontop250python爬蟲,爬豆瓣top250電影import stringimport reimport urllib2class DouBanSpider(object) : def __init__(self) : self.page = 1 self.cur_url =
Time of Update: 2014-12-12
Android,android官網關於Fragment的預覽問題本文地址:http://blog.csdn.net/caroline_wendy在Activity中,添加Fragment,因為是動態載入,所以無法預覽,會產生Rendering Problem;但是可以選擇一個預覽Fragment,使用:tools:layout="@layout/fragment_status",就可以預覽;代碼:<?xml version="1.0"
Time of Update: 2014-12-12
組合題目的分析,組合分析 首先不妨考慮1個特殊情況,當n趨於無窮的時候,|t| = 1, 顯然可以。 然後考慮任意一個長度為2*n的區間。不妨設為[a, a + 2n] ,
Time of Update: 2014-12-11
讀取所有連絡人,讀取連絡人//讀取所有連絡人-(void)ReadAllPeoples{ //取得本地通訊錄名柄 ABAddressBookRef tmpAddressBook = ABAddressBookCreate(); //取得本地所有連絡人記錄 NSArray* tmpPeoples =
Time of Update: 2014-12-11
iOS基礎知識:類目、延展,ios類目一 、類目: 為已存在的類添加新的方法。但是不能添加執行個體變數。 應用:1、對現有的類進行擴充,如:系統中的類,在類目中增加的方法會被子類繼承,而且在運行時跟其他的方法沒有區別。
Time of Update: 2014-12-11
精品源碼匯總,源碼匯總1、雲相簿(作者:Steven)(註:標題為)該項目是一款基於Face Service註冊和登入,並支援分享的雲相簿。登陸模組採用了兩種登陸方式,一種是基於Face++的Face Service登陸,另一種方式是基於Bmob資料庫的帳號密碼登陸。綜合點評:該項目所用服務較廣,包括科大語音訊飛、Face++Face