Time of Update: 2018-12-04
Struts2下載檔案實現的說明 contentType 內容類型,和互連網MIME標準中的規定類型一致,例如text/plain代表純文字,text/xml表示XML,image/gif代表GIF圖片,image/jpeg代表JPG圖片 inputName 下載檔案的來源流,對應著action類中某個類型為Inputstream的屬性名稱,例如取值為inputStream的屬性需要編寫getInputStream()方法 contentDisposition 檔案下載的處理方式,
Time of Update: 2018-12-04
一、git忽略檔案有三種:1、全域範圍內有效忽略檔案就是"版本庫根目錄/.git/info/exclude",全域範圍內的所有忽略規則都以行為單位寫在這個檔案中;2、局部範圍內有效忽略檔案就是.gitignore,這個忽略檔案只對某一級目錄下的檔案的忽略有效;如果某一個目錄下有需要被忽略的檔案,那麼就可以在該目錄下手工地建立忽略檔案.gitignore,並在這個忽略檔案中寫上忽略規則,以行為單位,一條規則佔據一行;比較特殊的情況就是在版本庫的根目錄下建立一個忽略檔案.gitignore,這時,這
Time of Update: 2018-12-04
1、$sudo apt-get install ckermit // 安裝ckermit2、配置.kermrc的設定檔$sudo gedit /etc/kermit/kermrc // 注意“自己”的許可權// 將下面的配置資訊複製到kermrcset line /dev/ttyUSB0 ;關於ttyUSB0的解釋下下面set speed 115200 ;設定傳輸速率為115200set carrier-watch offset handshake
Time of Update: 2018-12-04
想在initWithFrame或者其他函數裡調用UIGraphicsGetCurrentContext()函數,結果被告知Invalid
Time of Update: 2018-12-04
案頭上的所有程式突然就不響應了按Alt+Ctrl+F1進入tty1(F1~F6均可,Ubuntu下預設有7個Console,其中tty7中跑的是圖形案頭進程,其他只有簡單的shell),此時需要再次登入。登入後運行以下命令查看進程ps -t tty7此時可以發現一個Xorg的進程,記下他的PID。隨後使用kill
Time of Update: 2018-12-04
-------------- Android培訓 java培訓 期待與您交流!
Time of Update: 2018-12-04
PPA是Personal Package Archives首字母簡寫Ubuntu裡,PPA代表一種非穩定版本到發布,喜歡嘗試鮮到人一般會加入很多PPA源。安裝youdao:http://openyoudao.orgubunutu安裝:sudo add-apt-repository ppa:xdlailai/openyoudaosudo apt-get updatesudo apt-get install openyoudao刪除一個PPA源1,到 源的 目 錄:cd
Time of Update: 2018-12-04
wufen@wufenPC:~/code/VLC/android$ sh compile.sh For an ARMv6 device without FPU:$ export NO_FPU=1For an ARMv5 device:$ export NO_ARMV6=1If you plan to use a release build, run 'compile.sh release'VLC source foundBuilding toolsYou are ready to build
Time of Update: 2018-12-04
實現代碼如下:private void button8_Click(object sender, EventArgs e) { string[] myStrs = { "lihao","lixiaodaoaaa","lili","meinv","lixiaodaoaaa","geili" ,"sb","nihao","sunray","sss","lihao","geilideren","bushihaoren"
Time of Update: 2018-12-04
1, 當Action設定了某個屬性後,Struts將這些屬性封裝一個叫做Struts.valueStack的屬性裡。擷取valueStack對象: ValueStack vs = (ValueStack) request.getAttribute("struts.valueStack"); 調用ValueStack 的vs.findValue("books")方法(books為Action中的屬性);2,
Time of Update: 2018-12-04
設計原則: 1. 找出應用中可能需要變化之處,把它們獨立出來,不要和那些不需要變化的代碼混在一起 2. 針對介面編程,而不是針對試下編程 3. 多用組合,少用繼承 策略模式: 定義了演算法族,分別封裝起來,讓它們之間可以相互替換,此模式讓演算法的變化獨立於使用演算法的客戶。Duck問題:public abstract class Duck {QuackBehavior quackBehavior;FlyBehavior
Time of Update: 2018-12-04
using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Xml.Linq;namespace linqToXml{ class Program { static void Main(string[] args) { XElement myE = new XElement("Number", 12);
Time of Update: 2018-12-04
出版者 + 訂閱者 = 觀察者模式 Subject Observer觀察者模式:定義了對象之間的一對多依賴,這樣一來,當一個對象改變狀態時,它的所有依賴者都會受到通知並自動更新。松耦合的威力:當兩個對象之間松耦合,他們依然可以互動,但是不清楚彼此的細節。 觀察者模式提供了一種對象設計,讓主題和觀察者之間松耦合。設計原則:為了互動對象之間的松耦合設計而努力。模型:氣象監測應用public interface Subject {public void
Time of Update: 2018-12-04
參考:http://blog.csdn.net/lee576/article/details/6333828對這篇文章的解釋表達的不同看法。 發現此大牛也在研究Linq toxml的問題。 直接看代碼萬聖節問題指在迭代一組元素的時候, 刪除或改變元素個數時,迭代出現的的不正常行為, 但這種問題可以避免,同時達到 本來要達到的效果 書中的例子 new XElement("BookParticipants", new
Time of Update: 2018-12-04
原文地址 http://android.serverbox.ch/?p=306 Without the system bar it is almost impossible to control your Honeycomb tablet. Since no hardware control buttons are enforced for the tablet the system bar is the only way to control your slate.However,
Time of Update: 2018-12-04
Ubuntu GNU/Linux 12.04 LTS (Precise Pangolin) released. I wanted to manually install the Sun JDK 6 and 7 on Ubuntu.Installing Sun JDK 6 on Ubuntu 12.04:Download the sun jdk 6 bin from here.Make the bin file executeable:chmod +x
Time of Update: 2018-12-04
class Father{public:name(){printf("father name/n");}; virtual call(){printf("father call/n");}; }; class Son: public Father{public:name(){printf("Son name/n");}; virtual call(){printf("Son call/n");}; }; main(){ Son *Son1=new Son();Father *father1=(F
Time of Update: 2018-12-04
設計原則:類應該對擴充開放,對修改關閉。 裝飾者模式:動態地將責任附加到對象上。若要擴充功能,裝飾者提供了比繼承更有彈性的代替方案。裝飾者和被裝飾者必須是一樣的類型,也就是有共同的超類。public abstract class Beverage {String description = "Unknown Beverage";int size;public String getDescription() {return description;}public int getSize()
Time of Update: 2018-12-04
1. 阿甘正傳 “FORREST GUMP” 主演:Tom Hanks 湯姆 漢克斯 2. 電子情書 “YOU’VE GOT MAIL” 主演:Tom Hanks 湯姆 漢克斯 Meg Ryan 梅格 瑞安 3居家男人 “THE FAMILY MAN” 主演:Nicolas Cage 尼科拉斯 凱奇 Tea Leoni 蒂 裡奧尼 4公主日記I.II. “THE PRINCESS DIARIES I II” 主演:Julie Andrews 朱麗 安德魯斯 Anne Hatthaway 安妮
Time of Update: 2018-12-04
在 Android中,程式的響應(Responsive)被Active Manager(Activity Manager)和視窗管理器(Window Manager)這兩個系統服務所監視,當BroadcastReceiver在10秒內沒有執行完畢,Android會認為該程式無響應,所以在 BroadcastReceiver裡不能做一些比較耗時的操作,否則會彈出ANR(Application No