Time of Update: 2018-12-08
Activity之間是沒有辦法直接傳遞資料的。Android的設計原則是,用Intent在不同的Activity和進程之間進行通訊,但是通常來講,Intent中只能存入基礎資料型別 (Elementary Data
Time of Update: 2018-12-08
曾幾何時,goto是多麼的讓牛人綻放他們高超的精湛技術曾幾何時,goto又變成了萬惡之首曾幾何時,goto只在教科書中的樣本才會出現有太多的理由不讓用goto,但有時,我們又想使用goto的功能,怎麼辦?用try/catch/finally便可實現同等於goto的功能,來看二個樣本:複製代碼 代碼如下:try { // operation one if (failed) { throw Exception; } //
Time of Update: 2018-12-08
我們都知道Dictionary<TKey,
Time of Update: 2018-12-08
利用wsdl.exe產生webservice代理類:根據提供的wsdl產生webservice代理類1、開始->程式->Visual Studio 2005 命令提示2、輸入如下紅色標記部分D:/Program Files/Microsoft Visual Studio 8/VC>wsdl /language:c# /n:TestDemo /out:d:/Temp/TestService.cs
Time of Update: 2018-12-08
背景介紹在開發應用過程中經常會遇到顯示一些不同的字型風格的資訊猶如預設的LockScreen上面的時間和充電資訊。對於類似的情況,可能第一反應就是用不同的多個TextView來實現,對於每個TextView設定不同的字型風格以滿足需求。
Time of Update: 2018-12-08
猶記得在初看C,C++和Java的編程書籍時,上面就有介紹語句塊,但當時甚是不理解什麼是語句塊。《代碼大全》中也有講說要把相似功能的語句組織到一起形成語句塊,然後與其他語句塊用空行分隔。但這隻是在人的理解上的語句塊,並非是真的程式語言意義上的語句塊。程式上的定義,在我的理解來看應該是有著相同的變數範圍的相關一組語句的集合,看起來就是應該用{}括起來的,比如控制結構中的邏輯。我認為最關鍵的一點就是變數範圍,也就是說,如果能用同一個局部變數,那麼就是程式意義上的語句塊。來看個例子:複製代碼
Time of Update: 2018-12-08
1 基於訊息的通訊機制 Intent--------boudle,extra用這種簡單的形式,一般而言傳遞一些簡單的類型是比較容易的,如int、string等詳細介紹下Intent機制Intent包含兩部分:1 目的【action】-------要去到哪裡去2 內容【category、data】----------路上帶些什麼,區分性資料和內容性資料簡單資料傳遞:複製代碼 代碼如下:Intent intent = new Intent(LoginActivity.this,
Time of Update: 2018-12-08
複製代碼 代碼如下:<asp:ScriptManager ID="ScriptManager1" runat="server"> <Services> <asp:ServiceReference Path="~/WebService1.asmx" /> </Services> </asp:ScriptManager> SinaWeiBo.WebService1.cunzai($(this).val(), a, b) {
Time of Update: 2018-12-08
例子: 複製代碼 代碼如下:{ xtype: 'datefield', width: 100, id: 'mydate', format: 'Y-m-d', value: new Date(), msgTarget: 'side', emptyText: '請選擇日期。。。', name: 'mydate' } mydate.value 和getvalue() 一樣的。 mydate.getvalue() 返回的是對象: Wed Mar 07 2007 00:00:00 GMT+0100
Time of Update: 2018-12-08
複製代碼 代碼如下:protected void Button1_Click(object sender, EventArgs e)//建立xml { //聲明 XmlDocument x = new XmlDocument(); //建立 XmlDeclaration xd = x.CreateXmlDeclaration("1.0", "GB2312", null); x.AppendChild(xd); //建立根節點 XmlElement element =
Time of Update: 2018-12-08
複製代碼 代碼如下:<link href="css/jquery.ui.base.css" rel="stylesheet" type="text/css" /> <link href="css/jquery.ui.theme.css" rel="stylesheet" type="text/css" /> <script src="http://maps.google.com/maps/api/js?sensor=false"
Time of Update: 2018-12-08
複製代碼 代碼如下:<script src="jquery-1.9.1.js" type="text/javascript"></script> <script type="text/javascript"> $(function () { var ping = ''; switch ($('#Select3 option:selected').text()) { case '圖片': ping += '<img'; break; case '文字框':
Time of Update: 2018-12-08
直接上代碼 複製代碼 代碼如下:var kingwolfofsky = { /** * 擷取輸入游標在頁面中的座標 * @param {HTMLElement} 輸入框元素 * @return {Object} 返回left和top,bottom */ getInputPositon: function (elem) { if (document.selection) { //IE Support elem.focus(); var Sel =
Time of Update: 2018-12-08
客戶名稱電話連絡人連絡人電話E-mail所在地區輝集團0432-65412**高經理137562112**caihongssss@***.com吉林市吉林省明日科技有限公司0431-84972266賽經理137563185**mingrisoft@mingrisoft.com長春市鑫***有限公司0431-65412***王經理13756211***qqqqq027@*****.com長春市東西南北***通訊公司0434-56167**李經理1375631***4mingrisoft@sina.
Time of Update: 2018-12-08
其實大家都知道sql語句的錯誤資訊都可以在sys.messages表裡面找到如:如果在執行語句在try...catch中 我們可以通過以下方法擷取錯誤資訊。sql語句如下:複製代碼 代碼如下:BEGIN TRY SELECT 3 / 0 END TRY BEGIN CATCH DECLARE @errornumber INT DECLARE @errorseverity INT DECLARE @errorstate INT DECLARE @errormessage NVARCHAR(4000
Time of Update: 2018-12-08
代碼如下所示:複製代碼 代碼如下: //Open document and create Documentbuilder Aspose.Words.Document doc = new Aspose.Words.Document("demo.doc"); DocumentBuilder builder = new DocumentBuilder(doc); //Set table formating //Set borders
Time of Update: 2018-12-08
複製代碼 代碼如下:var list = Pt_OrderWorkFlow_DAO.GetOrderWorkFlow(wfid, uid, 1); if (list == null) { list = new List<Pt_OrderWorkFlow>(); } dgWaitList.DataSource = list; dgWaitList.DataBind();
Time of Update: 2018-12-08
在Http協議中,規定了同個Http請求的並發串連數最大為2. 這個數值,可謂是太小了。而目前的瀏覽器,已基本不再遵循這個限制,但是Dot Net平台上的 System.Net 還是預設遵循了這個標準的。從而造成了,在使用HttpWebRequset 或者 WebClient 利用多線程的方式,訪問某個網站時,經常出現
Time of Update: 2018-12-08
用innerHTML取出一段內容後再innerHTML回去,那麼原來動態綁定的事件就會丟失,如: html: 複製代碼 代碼如下:<body><div id='d1'>點擊</div></body> script: 複製代碼 代碼如下:document.getElementById('d1').onclick=function(){alert(1)}; var html=document.body.innerHTML; document.body.
Time of Update: 2018-12-08
複製代碼 代碼如下:<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/