Skip to content

Instantly share code, notes, and snippets.

View Jia-Hong-Peng's full-sized avatar

James Peng Jia-Hong-Peng

View GitHub Profile
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Net;
using System.Text;
using System.IO;
using System.Data.SqlClient;
@Jia-Hong-Peng
Jia-Hong-Peng / BigIntegerExtensions.cs
Created October 14, 2015 06:01
Extension methods: BigInteger to Binary, Hex, and Octal
using System;
using System.Numerics;
using System.Text;
/// <summary>
/// Extension methods to convert <see cref="System.Numerics.BigInteger"/>
/// instances to hexadecimal, octal, and binary strings.
/// </summary>
public static class BigIntegerExtensions
{
@Jia-Hong-Peng
Jia-Hong-Peng / KeyboardHook.cs
Created September 24, 2015 06:22
KeyboardHook.cs
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Diagnostics;
using System.Reflection;
using System.Runtime.InteropServices;
namespace WindowsHookSample
{
@Jia-Hong-Peng
Jia-Hong-Peng / HCKXPackageToExcel.cs
Last active August 29, 2015 14:27
測試產生excel
private void button1_Click(object sender, EventArgs e)
{
hssfworkbook = new HSSFWorkbook();
MemoryStream ms = new MemoryStream();
// 新增試算表。
hssfworkbook.CreateSheet("試算表 A");
hssfworkbook.CreateSheet("試算表 B");
hssfworkbook.CreateSheet("試算表 C");