Time of Update: 2016-05-04
標籤: /// <summary> /// 以中心點旋轉Angle角度 /// </summary> /// <param name="center">中心點</param> /// <param name="p1">待旋轉的點</param> /// <param name="angle">旋轉角度(弧度)</param>
Time of Update: 2016-04-30
標籤:原文:http://ejohn.org/blog/xpath-css-selectors最近,我做了很多工作來實現一個同時支援XPath和CSS
Time of Update: 2016-04-30
標籤: 最近工作的時候遇到一個問題,根據Web端接收到的對象obj1,更新對應的對象值ogj2。先判斷obj1中屬性值是否為null,若不等於null,則更新obj2中對應屬性值;若等於null,則保持obj2中對應屬性值不變。 先建立Student Class: 1 using System; 2 using System.Collections.Generic; 3
Time of Update: 2016-05-03
標籤:使用C#中Dictionary的一下細節小記:一、Dictionary.Add(key,value) 與 Dictionary[key]=value的區別:如果Dictionary中已經有了key1、則再Add會報錯: Dictionary 中已存在具有相同鍵的元素。2、而
Time of Update: 2016-05-03
標籤:Excel中添加超連結,可以用hyperlink公式,即=hyperlink(src,display);在stackoverflow中的樣本中:http://stackoverflow.com/questions/2905633/add-hyperlink-to-cell-in-excel-2007-using-open-xml-sdk-2-0CellFormula cellFormula1 = new CellFormula() { Space =
Time of Update: 2016-05-05
標籤:1、調用無傳回值的預存程序--預存程序create proc myinsert @username varchar(10), @password varchar(10), @name varchar(10), @usertype varchar(10), @createpeople varchar(10) as insert into SystemUsers(UserName,PassWord,Name,UserType,CreatPeople)values(@
Time of Update: 2016-05-05
標籤:最近做一個C#項目,剛做完基礎資料,現把緩衝機制給大家分享一下:做過基礎資料的同學應該都知道,每次涉及到查詢資料時都會去資料庫把配置好的基礎資料查詢出來,這樣每次在操作是會很慢。那麼我們每次點開一個新頁面都會去資料庫查詢一下基礎資料,這樣會頻繁的串連資料庫,使用者多了之後肯定就會特別慢。因為資料一旦配好之後就會很少去改動它,所以我們可以做一個緩衝把每次查詢出來的基礎資料緩衝起來,這樣就可以提高查詢效率。好了,廢話不多說了,上代碼。我聲明一下我用的是Dictionary資料字典,您也可以使用
Time of Update: 2016-05-03
標籤:一、添加服務連接埠在檔案Apache\conf\httpd.conf中,去掉前面的#號,重啟#LoadModule rewrite_module modules/mod_rewrite.so #Include conf/extra/httpd-vhosts.conf 二、在檔案Apache\conf\extra\httpd-vhosts.conf 檔案中,修改裡面相應的配置:NameVirtualHost *:80<VirtualHost *:80>
Time of Update: 2016-04-29
標籤:參考文獻:FileInfo 的使用 https://msdn.microsoft.com/zh-cn/library/system.io.fileinfo_methods(v=vs.110).aspx網頁表格的產生 http://www.w3school.com.cn/html/html_tables.aspC#
Time of Update: 2016-05-05
標籤:摘自:http://www.cnblogs.com/xcsn/archive/2013/05/10/3070485.html 1.C# Timer用法及執行個體詳解http://developer.51cto.com/art/200909/149829.htmhttp://www.cnblogs.com/OpenCoder/archive/2010/02/23/1672043.html關於C# Timer類 在C#裡關於定時器類就有3個C#
Time of Update: 2016-05-03
標籤: double a = double.Parse( this.textBox1.Text); double b = double.Parse(this.textBox2.Text); double c =0; switch (this.comboBox1.Text) { case "+": c = a + b;
Time of Update: 2016-05-03
標籤:1.方法一:採用OleDB讀取EXCEL檔案: 把EXCEL檔案當做一個資料來源來進行資料的讀取操作,執行個體如下: public DataSet ExcelToDS(string Path) { string strConn = "Provider=Microsoft.Jet.OLEDB.4.0;" +"Data Source="+ Path +";"+"Extended Properties=Excel 8.0;"; OleDbConnection conn =
Time of Update: 2016-05-05
標籤:以下是對C#中各種運算子號的說明及作用進行了詳細的總結介紹一、[]方括弧 ([]) 用於數組、索引器和屬性,也可用於指標。1、數群組類型是一種後跟 [] 的類型:int[] fib = new int[100]; //建立一個有100元素的數組若要訪問數組的一個元素,則用方括弧括起所需元素的索引:fib[0] = fib[1] = 1;for( int i=2; i<100; ++i ) fib[i] = fib[i-1] + fib[i-2];//
Time of Update: 2016-05-06
標籤:Recently,I have been reading the book The C Progrmming Lanuage(2nd Edition),which written by Dennis M.Ritchie and Brian W.Kernighan.The are many useful and elegant exercises in the book.Here is my solutions to the exercises of the first
Time of Update: 2016-05-05
標籤:c 遞迴經典執行個體1菲波那切數列:求第N個數列的值#include <stdio.h>long long Fib(int n){ return (n == 1 || n == 2) ? 1 : Fib(n - 1) + Fib(n&
Time of Update: 2016-05-04
標籤:題目連結:http://codeforces.com/problemset/problem/7/C給你一個直線方程,有整數解輸出答案,否則輸出-1。擴歐模版題。這裡有講解:http://www.cnblogs.com/Recoder/p/5459812.html(很久沒寫exgcd,都不會寫了) 1 #include <bits/stdc++.h> 2 using namespace std; 3 typedef long long LL; 4 5 LL exgcd(LL
Time of Update: 2016-05-03
標籤:(1)注意資料類型及其範圍不同資料類型的表示方法和範圍是不同的,整型如: 這裡要注意符號數和無符號數是有區別的,符號的最高位要犧牲出來作為符號位,符號位為1表示負數,符號位為0表示正數。實質上,我們對記憶體中的資料進行解釋,是按照他的資料類型進行解釋的。舉個例子,-3在記憶體中的補碼(假設8位)表示為1000 0011,如果定義-3為無符號型,那麼解釋得到的數值就是131。所以,有時候會發生一些看似“奇怪”的事情。舉兩個例子: char的表示範圍是-127~127,這裡定義char a=
Time of Update: 2016-05-03
標籤:之前為了測試, 拿最小板做了一個I2C的主發跟主讀, 一開始當然是嘗試用硬體I2C, 結果弄了很久, 時間緊迫, 只好用了類比, 結果發現, 哎, 真特麼挺好用的, 現在1片兒頂過去5片兒.硬體I2C, 用庫函數的方法如下:void WriteData2OBD(u8 TxLength){ u8 Tx_Idx=0; I2C_GenerateSTART(I2C2,
Time of Update: 2016-04-30
標籤:C. Reberland Linguistics First-rate specialists graduate from Berland State Institute of Peace and Friendship. You are one of the most talented students in this university. The education is not easy because you need to have fundamental
Time of Update: 2016-04-30
標籤:http://codeforces.com/problemset/problem/599/C題目大意: 有n個城堡的高度 讓你最多分成幾個塊 每個塊排過序之後 整體是按照升序來的分析: i之前的最大值只要小於等於i之後的最小值 ans++#include <iostream>#include <cstring>#include <algorithm>#include