Time of Update: 2018-12-07
XML資料一個最普通的問題就是資料的大小寫,在進行資料轉換時常常產生令人頭疼的麻煩。下面就是一個 解決的辦法。假設你有一些資料要發送到另外一個系統,它也識別XML格式的資料,而且要求全部大寫,例子資料如下: 例子1:person.xmlnet_loverXianhui Meng孟憲會假設你要轉換成如下的格式: 例子2:newperson.xmlNET_LOVERXIANHUI MENG孟憲會解決這個轉換問題一般是用XPATH函數裡的translate(),例如:轉換後結果如下:ThIS IS
Time of Update: 2018-12-07
寫這篇文章並不是要告訴垃圾廣告商可以盡情彈出廣告或者後台隱藏快顯視窗,而是提醒大家IE核心還有一些冬冬可以繞過大多數以IE為核心的瀏覽器的廣告屏蔽功能,甚至繞開這些瀏覽器本身,直接彈出一個真正的Internet Explorer視窗。當然並不是全部,有的還是做的比較好的,如Maxthon,儘管新視窗開啟了,但是仍然存在於Maxthon之中,而不會砰地彈出一個IE在後台放著,但是TT、The
Time of Update: 2018-12-07
只能輸入數字:"^[0-9]*$"。只能輸入n位的數字:"^\d{n}$"。只能輸入至少n位的數字:"^\d{n,}$"。只能輸入m~n位的數字:。"^\d{m,n}$"只能輸入零和非零開頭的數字:"^(0|[1-9][0-9]*)$"。只能輸入有兩位小數的正實數:"^[0-9]+(.[0-9]{2})?$"。只能輸入有1~3位小數的正實數:"^[0-9]+(.[0-9]{1,3})?$"。只能輸入非零的正整數:"^\+?[1-9][0-9]*$"。只能輸入非零的負整數:"^\-[1-9][]0
Time of Update: 2018-12-07
using System;using System.Web;using System.Web.SessionState;namespace httpmodulename{ public class Moduleclass : IHttpModule { public void Init(HttpApplication application) { 註:asp.net開始執行httpHandlers時發生(如:使用者請求xxx.aspx,xxx.asmx頁面時發生) appl
Time of Update: 2018-12-07
文章目錄 分析運算式的邏輯序列化和傳輸運算式習題 上回我們說到Expression Tree是一種表示程式設計語言中“運算式”概念的樹狀資料結構,並且學習了從Lambda運算式自動產生運算式樹狀架構的C#文法。那麼它到底有什麼用呢?其實上一回已經提到了Expression
Time of Update: 2018-12-07
“努力學習的熊”CodeSmith基礎系列:1.CodeSmith基礎(一)2.CodeSmith基礎(二)3.CodeSmith基礎(三)4.CodeSmith基礎(四)5.CodeSmith基礎(五)6.CodeSmith基礎(六)7.CodeSmith基礎(七)8.CodeSmith基礎(八)“Terrylee”CodeSmith實用技巧系列:1.CodeSmith實用技巧(一):使用StringCollection2.CodeSmith實用技巧(二):使用FileNameEditor3.
Time of Update: 2018-12-07
開始寫了個函數,用來輸出剩餘量,順便用out參數把總量、使用量和無效量也輸出,:Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->int GetRest(out int all, out int usedCount,out int invalidCount){ all = 10; // all = GetAll(); usedCount =
Time of Update: 2018-12-07
.NET3.5多了個HasSet<T>用來儲存集合。從名稱可以看出,它是基於Hash的。可以簡單理解為沒有Value的Dictionary<TKey,TValue>。HashSet<T>不能用索引訪問,不能儲存重複資料,元素T必須正確實現了Equals和GetHashCode。那它的優勢是什麼呢?檢索的效能。簡單的說它的Contains方法的效能在大資料量時比List<T>好得多。HashSet<T>的Contains方法複雜度是O(1
Time of Update: 2018-12-07
關於這個架構的介紹我就不說了,網上很多,我只教基本用法,基本邏輯語句寫法以sqlserver2008+SubSonic 2.2+VS2010 為了讓學習者能順利學習,我已將subsonic2.2上傳到了csdn上了
Time of Update: 2018-12-07
很多地方都講,在做字串拼接的時候StringBuilder比string快,並且快得多。事實是,StringBuilder比string快的原因是string拼接時產生了中間對象,最終是垃圾。如:string str = "a";str += "b";str += "c";那麼,最終結果是"abc",但第二行產生了"ab"只是一個中間對象,是個垃圾。用StringBuilder會避免這種中間對象的產生。那如果我這麼寫呢?string str = "a" + "b" +
Time of Update: 2018-12-07
一下內容皆是個人想法,只是希望將專業的東西,轉化成通俗的東西,不想含有囉嗦的成分1.學前故事: 看了3,4個簡單工廠的例子,映像最深的還是那個計算機(好像還是微軟的一道面試題"計算機,用OOP實現") 說實話,再講模式之前,記住兩個公式: (介面命名規範,名稱前面加個“ I ”) IA ic=new C; IA id=new D; 當參數是 IA類型時,ic,id當然都能傳入,當ic調他裡面的方法和屬性時是C裡面的,而id調他裡面的方法和屬性時是D裡面的
Time of Update: 2018-12-07
<Window x:Class="WpfApplication1.Window1" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Title="Window1" Height="300" Width="300" Loaded="Window_Loaded"> <
Time of Update: 2018-12-07
本篇主要是一些瑣碎的東西了,前面3篇都是關於查詢的這篇講一些沒水準的吧 4.1 Update 4.1.1 把ID為1的學生的愛好改成 打遊戲
Time of Update: 2018-12-07
[1]常見的MIME類型(通用型):超文字標記語言 (HTML)文本 .html text/htmlxml文檔 .xml text/xmlXHTML文檔 .xhtml application/xhtml+xml普通文本 .txt text/plainRTF文本 .rtf application/rtfPDF文檔 .pdf application/pdfMicrosoft Word檔案 .word application/mswordPNG映像 .png image/pngGIF圖形 .gif
Time of Update: 2018-12-07
給你個demo吧前台頁面很簡單<Window x:Class="ProgressBarDemo.MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Title="MainWindow" Height="350"
Time of Update: 2018-12-07
1 /// <summary> 2 /// Finds a Child of a given item in the visual tree. 3 /// </summary> 4 /// <param name="parent">A direct parent of the queried item.</param> 5 /// <typeparam name="
Time of Update: 2018-12-07
/// <summary> /// Window1.xaml 的互動邏輯 /// </summary> public partial class Window1 : Window { public Window1() { InitializeComponent(); this.rectangle1.PreviewMouseMove += new
Time of Update: 2018-12-07
1. binding 後面的stringFormat的寫法----連接字串 <TextBlock Text="{Binding Path=Qty, StringFormat=Quantity: \{0\}}" /> 2. [ValueConversion(typeof(decimal), typeof(string))] public class PriceConverter : IValueConverter { public object
Time of Update: 2018-12-07
#region 身份證演算法 /// <summary> /// 身份證驗證 /// </summary> /// <param name="Id">社會安全號碼</param> /// <returns></returns> public bool CheckIDCard(string Id) {
Time of Update: 2018-12-07
<Style x:Key="hyberlinkEffect" TargetType="{x:Type Hyperlink}"> <Setter Property="Foreground" Value="#3D6490"></Setter> <Setter Property ="TextBlock.TextDecorations" Value ="{x:Null}" />