一直在使用C/C++,對於迴圈語句while、do while、for,對於for情有獨鐘,因為其簡潔、清晰、靈活。訪問數群組類型的變數,只有for寫出來的語句是最易於閱讀的,如:Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->int arr[N] = {/**/};for(int i = 0; i < N; ++i) printf(
今天出了一個小問題,倒是令我有些驚訝。Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->byte[] data = {1,2,3,0,5,6,7,0};int n = Array.IndexOf(data, 0, 0); 結果,n為-1。 而如果改為:Code highlighting produced by Actipro
在使用 DynamicField / DynamicControl 時,經常在PostBack時,會出現一個例外: The DynamicControl/DynamicField needs to exist inside a data control that is bound to a data source that supports Dynamic Data. 中文為: 綁定到支援動態資料的資料來源的資料控制項內必須存在
沒想到漢語編程又有人開始網上對罵了。一方指另一方騙人,一方吹自已偉大。 今天群裡頭有人又把它翻出來了,剛好無聊,也就發明了一個漢語程式設計語言,整合到visual studio 2005的IDE中,名字就叫漢語編程++,歡迎同樣無聊的朋友試用。Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->#include "常用標頭檔"整數 主函數(
從VC2003到VC2005,一直有一個很奇怪的問題。 如下的代碼:Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--> short s1 = 0; short s2 = 2; s1 += s2; 在這兩個編譯器的 /w4 四級警告開啟的時候,就冒出以下的警告來:Code highlighting produced
由於C#現在還沒有提供預設參數的功能,因此,遇到需要預設參數的場合,有時候需要用到 DefaultParameterValue。 我在MVC項目中,就常常會遇到需要為Action指定預設參數的情況。當需要為枚舉類型的參數提供預設值的時候,出了問題。在啟動並執行時候,總是提示“The dictionary contains a value of type 'System.Int32', but the parameter requires a value of type
雖然只有32度,還是一推開房門就感覺外面熱得要命。主要是悶,跟蒸籠一樣,所以難怪日語有個詞叫作“蒸し暑い”。據說到了盛夏還要比現在高10度,悶10倍,真是心虛。開了空調,降到26度,才感到有一些涼爽。看來今天是不能出去了,那就坐在電腦前隨便寫些什麼吧。【雜誌和盜版】昨天偶然在網上看到一篇文章,而且是某知名個人PC雜誌上登載的,介紹如何將Windows XP改裝成Windows Media Center Edition。具體方法大概就是用XP或Windows Server
Jscript 有一些保留字不能在標識符中使用。保留字對 Jscript 語言有特殊的含義,它們是語言文法的一部分。使用保留字在載入指令碼的時候將產生編譯錯誤。Jscript 還有一些留作將來使用的保留字。這些字不是現在的 Jscript 語言的一部分,然而它們是為將來的使用保留的。保留詞break delete function return typeof case do if switch var catch else in this void continue false
對文本按照模板內容進行替換的簡單類封裝using System;using System.Collections.Generic;using System.Text;namespace Xingmai.InformationProvider.Factory{ public class StringBuilder { private RespaceArrayList _ReplaceList = new RespaceArrayList();