This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
hexo.extend.filter.register('pre', function(data, callback) { | |
var footContent = "" | |
var ReLink = new RegExp('\\[[^](\\d+)\\]:(.+)', 'g'); | |
data.content = data.content.replace(ReLink, function(x, y, z) { | |
footContent += '<li id="fn:' + y + '">' + z + '<a href="#fnref:' + y + '" rev="footnote">↩</a></li>'; | |
return ""; | |
}); | |
var ReSup = new RegExp('\\[[^](\\d+)\\]', 'g'); | |
data.content = data.content.replace(ReSup, '<sup id="fnref:$1"><a href="#fn:$1" rel="footnote">$1</a></sup>'); | |
if (footContent.length > 0) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using DevExpress.XtraEditors; | |
using DevExpress.XtraEditors.Repository; | |
using DevExpress.XtraGrid; | |
using DevExpress.XtraGrid.Columns; | |
using DevExpress.XtraGrid.Views.Grid; | |
RepositoryItemPopupContainerEdit ripce = new RepositoryItemPopupContainerEdit(); | |
GridControl gc = new GridControl(); | |
GridView gv = new GridView(); | |
gc.MainView = gv; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using DevExpress.XtraEditors; | |
using DevExpress.XtraEditors.Calendar; | |
using DevExpress.XtraEditors.Controls; | |
using DevExpress.XtraEditors.Popup; | |
using DevExpress.XtraEditors.Repository; | |
DateTime MinDateTime = new DateTime(1900, 1, 1); | |
/// <summary> | |
/// DateEditor that display year-month and only can select year-month view | |
/// </summary> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public void PrintFile() | |
{ | |
var fileName = @"D:\1.pdf"; | |
ProcessStartInfo psInfo = new ProcessStartInfo(); | |
psInfo.Verb = "Print"; // or "PrintTo" | |
psInfo.FileName = fileName; | |
psInfo.Arguments = String.Format("/p /h \"{0}\"", fileName); | |
psInfo.CreateNoWindow = true; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.IO; | |
using System.Net; | |
public static void DownloadFile(string server, int port, string username, string password, string remoteFilePath, string localFilePath, bool useBinary, bool usePassive) | |
{ | |
FtpWebRequest ftpReq = WebRequest.Create(string.Format("ftp://{0}:{1}/{2}", server, port, remoteFilePath)) as FtpWebRequest; | |
ftpReq.Method = WebRequestMethods.Ftp.DownloadFile; | |
ftpReq.UseBinary = useBinary; | |
ftpReq.UsePassive = usePassive; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.IO; | |
using System.Text; | |
using System.Windows.Forms; | |
private void DoMerge() | |
{ | |
using (FolderBrowserDialog fbd = new FolderBrowserDialog()) | |
{ | |
StringBuilder sb = new StringBuilder(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*--------------------------------- | |
內容 : 計算零息、永續跟一般債券之百元價、存續期間及凸性 | |
INPUT : | |
@settlement : 交割日 | |
@redemdate : 到期日 | |
@yield : 殖利率 | |
@rate : 票面利率 | |
@perpetual : 是否為永續債券 | |
@freq : 每年付息次數 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.ComponentModel; | |
using System.Drawing; | |
using System.Net; | |
using System.Runtime.CompilerServices; | |
using System.Windows.Forms; | |
namespace ftpTEST | |
{ | |
public class Form1 : Form | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DECLARE @candy TABLE (buydate SMALLDATETIME, name VARCHAR(10), piece INT) | |
INSERT @candy VALUES ('2014-09-01', 'candy1', 10) | |
INSERT @candy VALUES ('2014-09-01', 'candy2', 20) | |
INSERT @candy VALUES ('2014-10-01', 'candy2', 40) | |
INSERT @candy VALUES ('2014-10-01', 'candy3', 80) | |
DECLARE @delta TABLE (name VARCHAR(10), sep_count INT, oct_count INT) | |
INSERT @delta | |
SELECT name, piece, 0 FROM @candy WHERE buydate = '2014-09-01' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.IO; | |
using System.Threading; | |
public class CSharpLab | |
{ | |
public static void Test() | |
{ | |
string[] chtInt = new string[]{"零","壹","貳","參","肆","伍","陸","柒","捌","玖"}; | |
string[] moneyUnit1 = new string[] {"拾","佰","仟",}; |
OlderNewer