Trending Up...

Trending Up...

Get datepart

SELECT DATEADD(DAY,0, DATEDIFF(DAY,0, GETDATE()))SELECT  CAST(CAST(GETDATE() AS INT)  AS DATETIME)

2008-02-25 14:08:00

阅读数 427

评论数 0

segmented copy file (for network file transfer resume)

        private long SectionedCopy(string srcFile, long startPos, string dstFile, bool sectioned)        {            byte[] buffer = new byte[1024];...

2008-02-25 14:07:00

阅读数 576

评论数 0

do not bind 127_0_0_1 in socket server

otherwise the server can not accept any client connection other than 127.0.0.1

2008-02-25 14:05:00

阅读数 489

评论数 0

SQL Server read text directly

1)OpenRowset, text driverSELECT *FROM    OPENROWSET(MSDASQL,Driver={Microsoft Text Driver (*.txt; *.csv)};DEFAULTDIR=C:/;Extensions=CSV;, SELECT * FR...

2008-02-25 14:03:00

阅读数 557

评论数 0

detect if a URL is reachable

        public static bool URLIsReachable(string strURL)        {            bool reachable = false;            HttpWebRequest request = null;       ...

2008-02-15 09:43:00

阅读数 539

评论数 0

Inline CTE number table

WITH numbers AS( SELECT 1 AS num UNION ALL SELECT num + 1 FROM numbers WHERE num ) SELECT * FROM numbers

2008-02-15 09:42:00

阅读数 478

评论数 0

NLog CSV Rolling

using NLog;using NLog.Targets;using NLog.Layouts;FileTarget target = new FileTarget(); target.FileName = "${basedir}/log.csv"; // where to ...

2008-02-15 09:39:00

阅读数 728

评论数 0

Excel set dateformat

Format Cell -> Number -> Customizetype your format in yyyy, MM, dd

2008-02-15 09:37:00

阅读数 524

评论数 0

Thread Exception Handling (Excerpt from WWW)

Exception HandlingAny try/catch/finally blocks in scope when a thread is created are of no relevance once the thread starts executing. Consider the f...

2008-02-07 19:48:00

阅读数 510

评论数 0

Get cruuent function name, file... (even in release build)

using System;using System.Data;using System.IO;using System.Diagnostics;namespace ConsoleApplication1{    class Class1    {        [STAThread]       ...

2008-02-07 19:42:00

阅读数 684

评论数 0

C# read xml from a string and performance test

using System;using System.Data;using System.IO;using System.Xml;namespace ConsoleApplication1{    class Class1    {        [STAThread]        static ...

2008-02-07 19:40:00

阅读数 874

评论数 0

About BackgroundWorker

BackgroundWorker is a helper class in the System.ComponentModel namespace for managing a worker thread. It provides the following features:    * A &q...

2008-02-07 19:38:00

阅读数 410

评论数 0

提示
确定要删除当前文章?
取消 删除
关闭
关闭