Time of Update: 2018-12-06
直接插入排序基本思想 1.直接插入排序的基本思想 直接插入排序(Straight Insertion Sorting)的基本思想是:把n個待排序的元素看成為一個有序表和一個無序表,開始時有序表中只包含一個元素,無序表中包含有n-1個元素,排序過程 中每次從無序表中取出第一個元素,將它插入到有序表中的適當位置,使之成為新的有序表,重複n-1次可完成排序過程。
Time of Update: 2018-12-06
摘自:http://edu.admin5.com/article/20110124/0124431N2011.shtml C# 應用程式設定 來源: 字型:[大 中 小] C# 應用程式設定官方參考:http://msdn.microsoft.com/zh-cn/library/k4s6c3a0(v=VS.80).aspx使用VS內建的應用程式設定功能建立項目 選擇菜單 [項目] > [屬性] 選擇 [設定]
Time of Update: 2018-12-06
自訂textbox控制項,實現智能輸入數字和點號代碼如下: public class TextBoxExtention:TextBox { private bool IsHavePoint { get; set; } protected override void WndProc(ref Message m)//Control.WndProc處理 Windows 訊息。 { if (m.Msg == 0x0102
Time of Update: 2018-12-06
/// <summary> 3 /// 給datagridview添加滑鼠滾輪事件 4 /// </summary> 5 /// <param name="dataGridView1"></param> 6 public static void bindMouseWheel(System.Windows.Forms.DataGridView dataGridView1) 7 { 8
Time of Update: 2018-12-06
1,根據項目的需求,要求重新繪製datagridview的邊框。; 代碼如下View Code 1 private void dgv2_Paint(object sender, PaintEventArgs e) 2 { 3 Color top = Color.FromArgb(160,160,160); 4 ControlPaint.DrawBorder(e.Graphics 5 , dgv2.
Time of Update: 2018-12-06
1.使用冒泡演算法進行排序,此冒泡演算法是從最上面往下沉。屬於反冒。 2.代碼如下: 冒泡演算法 1 class Program 2 { 3 static void Main(string[] args) 4 { 5 int n = 10; 6 int temp; 7 int[] a = { 6,5,4,9,2,0,15,19,25,95}; 8
Time of Update: 2018-12-06
在使用預存程序時,若動態傳遞表名或者是列名時,可以考慮使用動態sql。代碼如下; alter procedure Proc_UpdateDatetimeCounter@businessNum nvarchar(200),--業務號@column nvarchar(200),--列名@value datetime--值asdeclare @sql nvarchar(max)set @sql = N'update counter set '+quotename(@column)+'=
Time of Update: 2018-12-06
1,先 代碼如下。 View Code 1 private AutoCompleteStringCollection autoCompleteSource = new AutoCompleteStringCollection(); 2 3 private void dataGridView1_EditingControlShowing(object sender, DataGridViewEditingControlShowingEventArgs e) 4 { 5
Time of Update: 2018-12-06
1,無圖無真相。我還是先;自訂時間格式。如何設定呢,請看。 需要設定datetimepicker的Format和CustomFormat屬性。具體時間格式可以參考,如下: 可以使用datetime.ParseExact()來獲得時間類型。該函數剛某一具體的文化有關。,是顯示中文的文化。 是轉換前後的比較,具體代碼見代碼詳細。 View Code 1 string s = "03.04 周五";2 Console.WriteLine(s);3
Time of Update: 2018-12-06
1.刪除某一行的代碼可以使用按一下滑鼠包含這一段代碼的括弧(圓括弧、中括弧)2移動某一塊的代碼:使用win+[ 或者使用win+].3,在編程中如果要進行一項 非常重要的更改,可以先使用快照將代碼儲存起來,然後如果碰到什麼問題再恢複,這有利於提高速度。4. 如果要對某一變數進行替換時,可以使用Edit in scope 這種方法來尋找替換,這種方法會在變數的作用範圍內進行尋找以及替換。快速鍵(pc)是ctrl+win +t.5.修改類名同時修改源檔案。使用edit-》refactor 快速鍵是“
Time of Update: 2018-12-06
1.先介紹理論知識。 控制項的特徵:如下: 控制項最重要的體現是可重用行。 2.Control類是所有類的基類,其具體的功能如下: 3,如何開發自己的控制項呢?只要由如下幾種構成。 4.複合控制項的建立 5.擴充控制項。 自訂一個藍底的按鈕。 代碼如下:View Code 1 [ToolboxBitmap(typeof(Button))] 2 public class buttonExtension:System.Windows.Forms.Button 3 {
Time of Update: 2018-12-06
1,快速排序使用分治法(Divide and conquer)策略來把一個串列(list)分為兩個子串列(sub-lists)。步驟為:從數列中挑出一個元素,稱為
Time of Update: 2018-12-06
轉載:怎麼在xcode工程中建立自己的plist檔案NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES); NSString *documentsDirectory = [paths objectAtIndex:0]; NSString *path = [documentsDirectory stringByAppendingPathComponent:@"
Time of Update: 2018-12-06
在使用sp_executesql執行動態sql時,如果傳遞進來的參數是表名或者是列名,那麼會執行不成功。代碼如下:View Code
Time of Update: 2018-12-06
當滑鼠運行到儲存格時,出現氣泡,並且氣泡朝上。 關鍵函數是:tooltip中的函數SetToolTip。代碼如下: View Code 1 private void dgv1_CellMouseEnter(object sender, DataGridViewCellEventArgs e) 2 { 3 if (e.RowIndex < 0 || e.ColumnIndex < 0) 4 { 5
Time of Update: 2018-12-06
先。 代碼如下: View Code 1 private void dataGridView1_RowPostPaint(object sender, DataGridViewRowPostPaintEventArgs e) 2 { 3 var dgv = (DataGridView)sender; 4 if (dgv.RowHeadersVisible) 5 { 6
Time of Update: 2018-12-06
將數組存放到檔案中NSArray * array1=[NSArray arrayWithObjects:@"wtw",@"wtm",nil];[array1 writeToFile:@"/wtqwtq.txt" atomically:YES];NSArray *get =[NSArray arrayWithContentsOfFile:@"/wtqwtq.txt"];NSLog(@"%@",get); 將字典存放到檔案中NSMutableDictionary *md;md =
Time of Update: 2018-12-06
摘自:" href="http://blog.sina.com.cn/s/blog_5f11f3850100rk6r.html">iphone 控制項一 視圖UIView和UIWindow iphone視圖的規則是:一個視窗,多個視圖。UIWindow相當於電視機,UIViews相當於演員。 1.顯示資料的視圖下面幾個類可在螢幕上顯示資訊: UITestView:將文本段落呈現給使用者並/允許使用者使用鍵盤輸入自己的文本。可設定可編輯或不可編輯,使用單一字型大小和單一字型。
Time of Update: 2018-12-06
本文摘自:http://www.cnblogs.com/tiechui/archive/2011/09/05/2167657.htmliphone ipa打包檔案製作在XCode下做ipa很簡單,現在我們來說說步驟..1.選擇Device - 3.0 | Release模式,然後build2.到程式目錄的bulid檔案夾下,開啟Release-iphoneos, 會發現裡面有個.app檔案和.app.dSYM檔案.我們需要的是.app檔案--
Time of Update: 2018-12-06
摘自:xcode4發布測試-打包xcode4發布測試-打包(Archive),官方文檔有誤 轉自“我os”的新浪部落格,iOS程式發布測試4-打包(Archive)發布(share) 發布測試的最後一步打包(Archive),Xcode4協助文檔有比較詳細介紹,但是居然是錯的,這裡說明一下。 1、設定“Build Settings” ,是官方文檔,留意那個紅框,居然說反了。 "Skip