This file contains 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
(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; } | |
}; | |
} | |
})(); |
This file contains 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
Show hidden characters
[ | |
{ | |
"keys": ["ctrl+2"], | |
"command": "run_macro_file", | |
"args": { | |
"file": "Packages/User/to-2.sublime-macro" | |
} | |
}, | |
{ | |
"keys": ["ctrl+4"], |
This file contains 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
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.' |
This file contains 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
PRINT CHARINDEX('B', 'A-B-C-D-E', 4); -- 0 | |
PRINT CHARINDEX('B', 'A-B-C-D-E'); -- 3 |
This file contains 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
PRINT SUBSTRING('A-B-C-D-E-F', 3, 1); -- B | |
PRINT SUBSTRING('A-B-C-D-E-F', 3, 2); -- B- | |
PRINT SUBSTRING('A-B-C-D-E-F', 3, 3); -- B-C | |
--gmail.com | |
DECLARE @Email NVARCHAR(100); | |
SET @Email = '[email protected]'; | |
PRINT SUBSTRING(@Email, ( CHARINDEX('@', @Email) + 1 ),( LEN(@Email) - CHARINDEX('@', @Email) )); -- gmail.com | |
This file contains 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
PRINT REPLICATE('A--', 3) -- A--A--A-- | |
-- 補零 | |
DECLARE @C1 varchar(4) = '12'; | |
PRINT DATALENGTH(@C1) -- 2 | |
PRINT REPLICATE('0', 4 - DATALENGTH(@C1)) + @C1 -- 0012 |
This file contains 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
PRINT PATINDEX('%en_ure%', 'please ensure the door is locked'); --8 | |
PRINT PATINDEX('%ein%', 'Das ist ein Test' COLLATE Latin1_General_BIN); --9 |
This file contains 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 @f FLOAT, @d MONEY, @i INT | |
SET @f = 1234567890.12 | |
SET @d = 1234567890.12 | |
SET @i = 1234567890 | |
SELECT @f, CONVERT(varchar, @f), '-'+STR(@f,13, 2)+'-' | |
SELECT @d, CONVERT(varchar, @d), '-'+STR(@d,13, 2)+'-' | |
SELECT @i, CONVERT(varchar, @i), '-'+STR(@i,13, 2)+'-' |
This file contains 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 Aspose.Cells; | |
using System; | |
using System.Drawing; | |
namespace test_Aspose_Cells | |
{ | |
internal class Aspose_Cell_Style | |
{ | |
internal void Background() | |
{ |
This file contains 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
internal class 使用同步製作Pizza | |
{ | |
private static int Pizza總數 = 0; | |
internal void 開始() | |
{ | |
var watch = Stopwatch.StartNew(); | |
Console.WriteLine("開始進行製作披薩..."); | |
// 製作10個披薩 993 時間 |
OlderNewer