Time of Update: 2017-01-13
下面就正式來講一下開發步驟:首先,在Tomcat5.X下建一個jdbc/edainfo的資料來源,資料庫可以是oracle、sql server、mysql。表的結構如下:CREATE TABLE example (id varchar(13) NOT NULL ,name varchar(50) NULL ,address varchar(50) NULL ) ON [PRIMARY]其中,id為主鍵。datasource.xml內容如下:<?xml version="1.0&
Time of Update: 2017-01-13
C# WinForm開發中,這是一個比較常見的異常:線程間操作無效,從不是建立控制項“xxx”的線程訪問它。這個異常來源於.NET2的一個限制:背景工作執行緒不能訪問視窗線程建立的控制項。解決方案主要有兩種,一種是在視窗線程中設定CheckForIllegalCrossThreadCalls = false ;另一種方式比較麻煩,使用委託的方式調用Invoke方法。比如視窗中有一個button1,我要建立一個線程訪問到button1。第一種方式是:
Time of Update: 2017-01-13
FileSystemWatcher控制項主要功能:監控指定檔案或目錄的檔案的建立、刪除、改動、重新命名等活動。可以動態地定義需要監控的檔案類型及檔案屬性改動的類型。1.常用的幾個基本屬性:(1) Path :設定要監視的目錄的路徑。(2) IncludeSubdirectories :設定是否級聯監視指定路徑中的子目錄。(3) Filter :設定篩選字串,用於確定在目錄中監視哪些類型的檔案。(4) NotifyFilter :設定檔案的哪些屬性的變動會觸發
Time of Update: 2017-01-13
判斷檔案 代碼如下複製代碼 #include<fstream.h>void main(){ ofstream f("c:\test.txt");//開啟檔案test.txt,用於寫,若檔案不存在就先建立它 } 例 代碼如下複製代碼 #include <iostream>#include <fstream>using namespace std;#define FILENAME
Time of Update: 2017-01-13
.NET Framework 類庫未提供讀寫ini檔案的相應類,不過可以使用WinAPI來處理INI檔案的讀寫,代碼很簡單。 首先有兩個API函數需放在你的class中且只能如此,放在method或(class外namespace內),都會出現編譯錯誤: 1 using System.Runtime.InteropServices; 2 [DllImport("kernel32")] 3
Time of Update: 2017-01-13
C# struct/class Differences struct Direct { //... } class InDirect { //... } Events are locked? Exist on stack or heap? Can cause
Time of Update: 2017-01-13
using System;using System.Net;using System.IO;using System.Text;using System.Net.Sockets;namespace zhangyuk.net.csdn.blog.ftpclient{ /// <summary> /// FTP Client /// </summary> public class FTPClient {
Time of Update: 2017-01-13
using System; using System.IO; using System.Text; using System.Collections; namespace PDFGenerator { public class PDFGenerator { static float pageWidth = 594.0f; static float pageDepth = 828.0f; static float pageMargin = 30.0f; static
Time of Update: 2017-01-13
我們知道,C#裡面有選擇檔案的對話方塊控制項,卻沒有選擇檔案夾的對話方塊控制項,不少人為了選擇一個檔案夾只好自己用TreeView類來處理,其實在C#裡面完全不用那麼麻煩,我們可以用C#的FolderNameEditor類的子類FolderBrowser類來實現擷取瀏覽檔案夾對話方塊的功能。 下面來看看具體是怎麼實現的。 首先建立一個winform的項目,再建立一個類檔案(File->AddNewItem->Class)。 因為FolderNameEditor是在System
Time of Update: 2017-01-13
Destructors in C#By AnsilIntroductionIn the enterprise application development world, the buzzwords are Performance, Scalability, and Security. I started my career as a VC++ programmer, and one fine morning, I was transferred to Web development
Time of Update: 2017-01-13
<?xml version="1.0" standalone="yes"?><users> <xs:schema id="users" xmlns="" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> <xs:element
Time of Update: 2017-01-13
此程式分兩部分,第一部分為主程式,另一部分為函數庫 本程式中用int[]表示char的2進位形式,如a=int[8]{0,1,1,0,0,0,0,1}下面副程式 本程式在C# 2005下通過。。#region Using directivesusing System;using System.Collecti
Time of Update: 2017-01-13
以前,在頁面上實現縮圖必須藉助第三方組件。現在,有了.NET,就可以很輕鬆地實現縮圖。下面就是實現縮圖的例子。ToThumbnailImage.aspx<%@ Page language="c#" Codebehind="ToThumbnailImage.aspx.cs" Src="ToThumbnailImage.aspx.cs" AutoEventWireup="false" Inherits="Exam_C.ToThumbnailImage" %><html&
Time of Update: 2017-01-13
大約是2001年時候用VS7 beta寫的一點東西了,現在回看起來不是一般的幼稚。。。好處是還能運行:),看到CSDN上有朋友要C# 的代碼,我也不揣簡陋,獻醜了。(轉換成VS03的工程了) Combinatorics.cs代碼清單using System;using System.Collections;using System.Data; /// <summa
Time of Update: 2017-01-13
str.substr(startpos, length);其中 startpos 是起始字元的序號,length 是[從 startpos 開始]取的字串長度(包括startpos )。如果要取得 str 中序號 m 到 n 之間(不包括n)的子字串需要用str.substr(m, n-m); #include<string>#include<iostream>using namespace std;main(){string
Time of Update: 2017-01-13
前面講了可以利用 string 執行個體的 CompareTo 方法進行字串比較,現在談談 string 的靜態方法 Compare,Compare 也是字串比較,但功能更強。基本文法Compare 有多個重載函數,列出最簡單的一個。public static int Compare ( string strA, string strB)傳回值小於零,strA 小於 strB; 零,strA 等於 strB;
Time of Update: 2017-01-13
http://support.microsoft.com/kb/2852386僅當磁碟清理嚮導檢測到一些您不需要在電腦的 Windows 更新時,Windows 更新清理選項才可用。若要使您可以將系統還原到以前的更新,更新儲存在 WinSxS 儲存,即使它們由更高版本的更新所取代。因此,運行磁碟清理程式嚮導後,您可能無法復原到有被取代的更新。如果您想要將系統還原到磁碟清理嚮導將刪除的被取代更新,您可以手動安裝該更新。功能更新發行的 Windows 7 SP1 十月份在 2013,並且沒有為
Time of Update: 2017-01-13
首先要知道語音啟用方式,語音交談啟用方式包括自由說話、按鍵說話、滑鼠點擊說話共3種。預設為按鍵說話,預設按鍵為F2,您需要按住F2才能正常說話。
Time of Update: 2017-01-13
方法一,利用系統內建工具清理垃圾我們一定需要先把uac關閉哦。 1、win鍵+X 然後在快顯視窗我們點擊 “命令提示字元(管理員)” ,這個就是以前windows cmd命令模式了哦。 2、輸入 powercfg -h off 然後在上我們輸入到了powercfg -h off 你會皇到 C盤立刻空閑了,你電腦得記憶體空間變大。方法二,利用360安全衛士進行清理垃圾1.在電腦中開啟360安全衛士之後我們點擊
Time of Update: 2017-01-13
在Photoshop CC 2014中開啟車輪素材,轉換為智能對象,同時複製該圖層,增加一個副本圖層。 用橢圓選框工具在車輪上建立一個選框,點擊菜單“選擇>變換選區”。 依次點擊菜單“選擇>修改>羽化”,將參數設定為15.這樣方便將各個圖層無縫銜接在一起。 確保複製圖層已被選中,然後點擊添加圖層蒙版表徵圖下的圖層面板,這樣只有車輪會受到濾鏡的影響。 為車輪使用旋轉模糊濾鏡 Photoshop CC