Skip to content

Instantly share code, notes, and snippets.

PRINT CHARINDEX('B', 'A-B-C-D-E', 4); -- 0
PRINT CHARINDEX('B', 'A-B-C-D-E'); -- 3
@b2977053
b2977053 / gist:b8f95a0367bdc552b5e0a645d29065a2
Last active October 25, 2019 07:04
比較三個 Excel轉ODS檔案 or HTML轉Excel檔案
string Content = getContent("http://localhost/xxx");
byte[] byteArray = Encoding.UTF8.GetBytes(Content);
MemoryStream stream = new MemoryStream(byteArray);
#region Spire.Xls 不支援讀取HTML
//https://www.e-iceblue.com/forum/html-to-excel-xls-t7246.html
//Spire.Xls.Workbook Spire_book = new Spire.Xls.Workbook();
//Spire_book.LoadFromStream(stream, Spire.Xls.ExcelVersion.ODS); // System.InvalidOperationException: 'This is not a structured storage file.'
@b2977053
b2977053 / Default (OSX).sublime-keymap
Created May 17, 2019 03:52 — forked from beaugunderson/Default (OSX).sublime-keymap
Sublime Text macros for converting to and from 2 and 4 space indentation
[
{
"keys": ["ctrl+2"],
"command": "run_macro_file",
"args": {
"file": "Packages/User/to-2.sublime-macro"
}
},
{
"keys": ["ctrl+4"],
@b2977053
b2977053 / gist:b36bc560dd3bd0e9ab8c5ae8c5ec6548
Last active November 12, 2019 02:07
改版(〃∀〃) 保哥出作業 JS
(function() {
window.$ = function(n) {
var num="undefined"==typeof n||null===n?0:n;
return {
add: function(n) { num += n; return this; },
result: function() { return num; }
};
}
})();