Time of Update: 2015-01-24
標籤:c# 設定系統音量 情境:在做播放裝置的時候需要控制音量的大小,下面幾種方法將滿足你的要求方法一: 改變系統音量設定 [DllImport("user32.dll")] static extern void keybd_event(byte bVk, byte bScan, UInt32 dwFlags, UInt32 dwExtraInfo);
Time of Update: 2015-01-24
標籤:Regex萬用字元叫做:元字元1> . 除\n之外的任意單個字元2> [] 表示取中括弧內的任意一個字元3> ^ 在中括弧內匹配取反,在外匹配以什麼開頭4> | 或者5> () 優先順序或定義提取組6> * 限定符 表示前面的運算式可以出現0次或多次,可有可無,可多可少7> + 限定符 至少出現1次或多次8> ? 限定符 表示出現一次或出現0次9> { } 限定符
Time of Update: 2015-01-24
標籤:緩衝技術 該節我們將分成兩部分來講解,第一部分為預計算,第二部分則為緩衝。緩衝這個技術對應從事開發的人員來說是非常熟悉的,從頁面緩衝到資料庫緩衝無處不在,而其最重要的特點就是在第一次查詢後將資料緩衝,在以後的查詢過程中就無需重新計算而直接從記憶體中將結果返回,大大提高了效能,而我們這裡的緩衝則集中運用在函數上。 預計算
Time of Update: 2015-01-24
標籤:using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Linq;using System.Text;using System.Windows.Forms;using System.IO;using System.Text.RegularExpressions;namespace
Time of Update: 2015-01-24
標籤:c# 調用 儲存 過程 參數 下面以調用:Sql Server 分頁預存程序為例調用代碼如下: string MyConn = "server=資料庫伺服器Ip;uid=資料庫使用者名稱;pwd=密碼;database=資料庫名稱;Trusted_Connection=no";
Time of Update: 2015-01-24
標籤:首先需要引用程式集 Microsoft Script Control 1.0然後建立一個js檔案,並寫入相應的js方法//執行JS檔案 private void btnjs_Click(object sender, EventArgs e) { //讀取js檔案路徑 string path = AppDomain.CurrentDomain.BaseDirectory + "JavaScript1.js";
Time of Update: 2015-01-24
標籤:第一篇 就抄寫了一下下MSDN上面的東西練練手吧!!! 存取修飾詞是一些關鍵字,用於指定聲明的成員或類型的可訪問性。 本節介紹四個存取修飾詞: public &
Time of Update: 2015-01-24
標籤:一、擷取當前檔案的路徑string str1=Process.GetCurrentProcess().MainModule.FileName;//可獲得當前執行的exe的檔案名稱。 string
Time of Update: 2015-01-24
標籤:一:C#產生XML,其元素或屬性由類的定義來設定(xml序列化)將一個字串轉到一個XML文檔中的xmlAttribute或xmlElementusing System;System.xml.Serialization;namespace xmlserializa{1.初始化一個類,設定屬性值[XmlRoot("Truck")] ----設定作為XML中的根項目名稱 public Truck()
Time of Update: 2015-01-23
標籤: private void textBox_proc1value_KeyDown(object sender, KeyEventArgs e) { Keys key = e.KeyCode; if (e.Control!=true)//如果沒按Ctrl鍵 return; TextBox textBox = sender as TextBox; switch
Time of Update: 2015-01-23
標籤: 最近做項目過程中遇到了這個類,查了下MSDN,是這麼說的。 Attribute類:表示自訂屬性的基類。 看到了就有點蒙圈了,這到底是用來幹什麼的呢? Attribute類 從網上查了一些資料後,就有點明白了,都說它就好比是一個附著物,用來定義額外的資訊。舉個例子說一下吧!我們做程式開發的時候,如何確定方法是誰開發的?當然你可以在方法上添加註釋,用來表明這個方法是誰敲的,除此之外呢?還有其他方法嗎? 這時這
Time of Update: 2015-01-23
標籤: OpenFileDialog openFD = new OpenFileDialog(); openFD.FileName = ""; openFD.Filter = "xls|*.xls|xlsx|*.xlsx"; openFD.Title = "選擇更新檔案"; openFD.Multiselect = false; if (openFD.ShowDialog() ==
Time of Update: 2015-01-23
標籤:1.添加contextMenuStrip控制項 預設命名:contextMenuStrip12.在要顯示的控制項上,找到其ContextMenuStrip屬性,並設定其為contextMenuStrip1比如我這邊放在 dataGridView1 控制項上,就將dataGridView1的ContextMenuStrip屬性,設定為contextMenuStrip13.將dataGridView1的CellMouseDown事件下寫入下列代碼 //在右鍵點擊時,將當前行選中
Time of Update: 2015-01-24
標籤:1、int適合單一資料型別之間的轉換,C#的預設整型是int32(不支援bool型); 2、int.Parse(string sParameter)是個建構函式,參數類型只支援string類型; 3、Convert.ToInt32()適合將Object類型轉換為int型; 4、Convert.ToInt32()和int.Parse()的細微差別: 對於空值(null)的處理不 同,Convert.ToInt32(null)會返回0而不會產生任何異常,但int.Parse(null)則
Time of Update: 2015-01-24
標籤:轉自:http://www.cnblogs.com/unintersky/p/3884712.html 將Json字串轉化成格式化表示的方法: 字串還原序列化為對象-->對象再序列化為字串使用Newtonsoft.Json提供的API,:http://www.newtonsoft.com/json 很多時候我們需要將json字串以{ "status": 1, "sum":
Time of Update: 2015-01-24
標籤:acm2014 acm-icpc 西安2014 ProblemC. The Problem Needs 3D ArraysDescriptionA permutation is asequence of integers p1, p2, . . . , pn,consisting of n distinct positive integers and each of them does
Time of Update: 2015-01-24
標籤:C - CTime Limit:1000MS Memory Limit:32768KB 64bit IO Format:%I64d & %I64uSubmit StatusDescriptionGiven a positive integer N, you should output the most right digit of
Time of Update: 2015-01-24
標籤:Amr bought a new video game "Guess Your Way Out!". The goal of the game is to find an exit from the maze that looks like a perfect binary tree of height h. The player is initially standing at the root of the tree and the exit from the tree
Time of Update: 2015-01-24
標籤:A:簽到題,排序判斷一下能學幾門即可B:圓心可以每步可以移動2 * r的距離,方向任選,所以答案是ceil(兩點距離 / 2 / r)C:遞迴下去就可以了,dfs(h, n,
Time of Update: 2015-01-23
標籤:我們要用c語言做一個簡單的計算機,進行加、減、乘、除操作。本程式涉及的所有數學知識都很簡單,但輸入過程會增加複雜性。我們需要檢查輸入,確保使用者沒有要求電腦完成不可能的任務。還必須允許使用者一次輸入一個計算式,例如: 32.4+32 或者