2020年3月23日 星期一

tsql crontab (quartz) 轉datetime

有個需求要將crontab排程時間轉換為tsql datetime

google後沒找到人家寫好直接可用的tsql,最後的建議都指向自已寫SQL CLR (assembly)

github上有相關的做法,真是感謝。

主要是參考NCrontab這個物件,可到以下網址去下載,然後執行裡頭的msbuild.cmd產出NCrontab.dll檔

https://github.com/atifaziz/NCrontab


再來是建一個Table-valued Function CLR。
https://github.com/atifaziz/NCrontab/wiki/SQL-Server-Crontab

我用VS2019建立CLR專案,調整範例說明中的方法名稱 改成自已要的名稱,另外要再指定TableDefinition(要回傳的欄位名稱及型態)不然compile會有錯誤。

[SqlFunction(FillRowMethodName = "FillOccurrenceRow", TableDefinition = "val datetime", IsDeterministic = true, IsPrecise = true)]
    public static IEnumerable afnCrontab2Edt(SqlString expression, SqlDateTime start, SqlDateTime end)
    {
        if (expression.IsNull || start.IsNull || end.IsNull)
            return new DateTime[0];

        try
        {
            var schedule = CrontabSchedule.Parse(expression.Value);
            return schedule.GetNextOccurrences(start.Value, end.Value);
        }
        catch (CrontabException)
        {
            return new DateTime[0];
        }
    }

    public static void FillOccurrenceRow(object obj, out SqlDateTime time)
    {
        time = (DateTime)obj;
    }


最後執行以下建立assembly 及function

sp_configure 'show advanced options', 1;
GO
RECONFIGURE with override;
GO
sp_configure 'clr enabled', 1;
GO
RECONFIGURE with override;
GO


--以下如果是在還原後的DB要更新CLR,先執行一下這段
use yourDBname
go
alter database yourDBnameset trustworthy on;
go
exec sp_changedbowner 'your login name' ;
go


--使用二進位值清單建立NCrontab.dll (net35)
CREATE ASSEMBLY [NCrontab]
FROM 0x4D5A90000300000004000000FFFF0000B800000000000000400000000000000000000000000000000000000000000000000000000000000000000000800000000E1FBA0E00B409CD21B8014CCD21546869732070726F6772616D2063616E6E6F742062652072756E20696E20444F53206D6F64652E0D0D0A2400000000000000504500004C0103002AA734B70000000000000000E00022200B0130000054000000080000000000003673000000200000008000000000001000200000000200000400000000000000040000000000000000C000000002000000000000030040850000100000100000000010000010000000000000100000000000000000000000E47200004F00000000800000640400000000000000000000000000000000000000A000000C00000000720000540000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000080000000000000000000000082000004800000000000000000000002E746578740000003C530000002000000054000000020000000000000000000000000000200000602E7273726300000064040000008000000006000000560000000000000000000000000000400000402E72656C6F6300000C00000000A0000000020000005C0000000000000000000000000000400000420000000000000000000000000000000018730000000000004800000002000500D83A00002837000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001E027B1C00000A2A1E027B1D00000A2A5602281E00000A02037D1C00000A02047D1D00000A2A0000133003003C0000000100001103750300001B0A062C30281F00000A027B1C00000A067B1C00000A6F2000000A2C18282100000A027B1D00000A067B1D00000A6F2200000A2B01162AD22060DB102320295555A55A281F00000A027B1C00000A6F2300000A5820295555A55A282100000A027B1D00000A6F2400000A582A000000133007005800000002000011147201000070188D130000012516027B1C00000A0A1200068C0600001B2D0426142B0BFE160600001B6F2500000AA22517027B1D00000A0B1201078C0700001B2D0426142B0BFE160700001B6F2500000AA2282600000A2A3A02724F000070282700000A00002A2A0203282700000A00002A2E020304282800000A00002A2E020304282900000A00002A000013300500460000000000000002037E24000004252D17267E23000004FE064E000006732A00000A2580240000047E25000004252D17267E23000004FE064F000006732B00000A258025000004280100002B2A000013300500460000000000000002037E26000004252D17267E23000004FE0650000006732A00000A2580260000047E27000004252D17267E23000004FE0651000006732B00000A258027000004280100002B2A0000133006005E000000030000110002282500000673140000060A067B060000040306FE060200002B732C00000A147E2D00000A252D17267E2E00000AFE062F00000A733000000A25802D00000A6F0300002B0B072C0905076F3100000A2B0704066F3200000A0C2B00082A221602280B0000062A221702280B0000062A221802280B0000062A221902280B0000062A221A02280B0000062A221B02280B0000062A13300200530000000400001102281E00000A00000314FE010A062C0B726D000070733300000A7A02037D0600000402036F2A000006733400000A7D03000004027B03000004166F3500000A000220FFFFFF7F7D0400000402157D050000042A5E027B0400000420FFFFFF7F3203152B06027B040000042A00133002006B000000050000110003027B04000004FE040C082C09027B040000040D2B52020328180000060A02027B0500000428180000060B0613042B2600027B0300000411046F3600000A130511052C0B02110428170000060D2B1900110417581304110407FE0216FE01130611062DCC150D2B00092A3A03027B060000046F28000006582A3A03027B060000046F28000006592A4E027B03000004020328180000066F3600000A2A000000133003007F0100000600001100027B060000046F280000060A027B060000046F290000060B0304FE010D093980000000000316FE04130411042C3C000517FE0216FE01130511052C250002067D0400000402077D05000004027B03000004176F3500000A000E041306381A010000061001071002002B36000306FE04130711072C1002030E05280400002B130638F60000000307FE02130811082C1002030E05280500002B130638DC00000000002B6C000304FE02130911092C1100040361100203046110010403611002000316FE04130A110A2C050610012B1A0306FE04130B110B2C1002030E05280400002B130638930000000416FE04130C110C2C050710022B170407FE02130D110D2C0D02040E05280500002B13062B6D000517FE04130E110E2C031710030306590C2B12027B0300000408176F3700000A000805580C08040659FE0216FE01130F110F2DDF027B0400000403FE02131011102C0702037D0400000408060559580C027B0500000408FE04131111112C0702087D050000040E0413062B0011062A00133003002700000007000011733800000A0A06037D3900000A06027D3A00000A0406FE063B00000A73440000066F3100000A2A00133003002700000008000011733C00000A0A06037D3D00000A06027D3E00000A0406FE063F00000A73440000066F3100000A2A220214281E0000062A13300300550000000900001100284000000A734100000A0A030C080B072C1C077277000070284200000A2D0F07727B000070284200000A2D0D2B150206172820000006002B100206281F000006002B06734300000A7A066F2500000A0D2B00092A2A0203162820000006002A42027B060000040203046F2C000006002A000000133003005F0000000A00001100D007000002284400000A028C07000002284500000A16FE010A062C3600727F000070D007000002284400000A284600000A284700000A0B72850000700772E1000070284800000A72E5000070734900000A7A7E0D000004029A0C2B00082A0013300300730000000000000002281E00000A0000D007000002284400000A038C07000002284500000A284A00000A000416FE0416FE01284A00000A000504FE0416FE01284A00000A000E042C0D0E048E690504591758FE012B0117284A00000A0002037D1000000402047D1100000402057D12000004020E047D0F0000042A1E027B100000042A1E027B110000042A1E027B120000042A420228290000060228280000065917582A2E02030416282C000006002A13300400E70000000B000011000314FE010C082C0B72EF000070733300000A7A0414FE010D092C0B72FB000070733300000A7A036F480000060A160B38A1000000000613040006130503110517586F490000060A000611055917FE01130611062DE3072D161104022828000006330C1105022829000006FE012B0116130711072C0C00041F2A6F4B00000A002B640716FE02130811082C09041F2C6F4B00000A0011041105FE01130911092C0F000211040405282D00000600002B21000211040405282D00000600041F2D6F4B00000A000211050405282D00000600000717580B000615FE0116FE01130A110A3A4FFFFFFF2A00133003006E0000000C000011000414FE03284A00000A00052D0B027B0F00000414FE012B01170A062C350003163207031F64FE042B01160B072C0C000304282E00000600002B1500040F01284000000A284C00000A6F4D00000A0000002B1A0003022828000006590C04027B0F000004089A6F4D00000A00002A0000133004005A000000040000110002163207021F64FE042B0116284A00000A000314FE03284A00000A00021F0AFE0416FE010A062C2200031F30021F0A5B58D16F4B00000A00031F30021F0A5D58D16F4B00000A00002B0E00031F300258D16F4B00000A00002AAA020304147E2F000004252D17267E2E000004FE065B000006733000000A25802F000004280300002B262A0000001B300500540000000D000011000414FE010A062C0B7209010070733300000A7A03284E00000A0B072C04050C2B300000020304050E04280600002B0CDE200D000209030E04280700002B0CDE11130400021104030E04280700002B0CDE00082A011C0000000023000F32000F24000001000023000F4100110300000213300300510000000E000011734F00000A0A06047D5000000A06027D5100000A06037D5200000A00067B5000000A14FE03284A00000A00067B5200000A14FE03284A00000A000506FE065300000A73440000066F3100000A0B2B00072A0000001B300600140200000F000011000314FE03284A00000A000414FE03284A00000A00036F5400000A16FE01130511052C2D0E047E5500000A252D17267E5600000AFE065700000A734400000625805500000A6F3100000A130638C0010000031F2C6F5800000A0A0616FE02130711072C6100051308037E220000046F5900000A6F5A00000A1309002B130211096F5B00000A04050E04280600002B130811096F1600000A2C0C11088C1500001B14FE012B0116130A110A2DD100DE0D11092C0811096F1500000A00DC11081306384C0100001201FE151600001B031F2F6F5800000A0C0816FE02130B110B2C26001201030817586F5C00000A284000000A285D00000A285E00000A0316086F5F00000A100100036F5400000A17330D03166F6000000A1F2AFE012B0116130C110C2C290004151507130D120D286100000A2D03172B07120D286200000A050E046F6300000A130638C5000000031F2D6F5800000A0D0916FE02130E110E2C4900020316096F5F00000A2833000006130F02030917586F5C00000A2833000006131004110F111007130D120D286100000A2D03172B07120D286200000A050E046F6300000A13062B690203283300000613041201286100000A16FE01131111112C12041104110417050E046F6300000A13062B3E07130D161312120D286200000A1112FE01120D286100000A5F16FE01284A00000A000411040228290000061201286400000A050E046F6300000A13062B0011062A0110000002007A0035AF000D00000000133005004301000010000011000314FE03284A00000A00036F5400000A16FE010C082C0B721101007073080000067A03166F6000000A0A061F30320A061F39FE0216FE012B01160D092C1203284000000A285D00000A130438EF000000027B0F00000414FE01130511052C5700725F0100701A8D13000001251603A2251702282800000613061206286500000AA2251802282900000613061206286500000AA2251902282700000613071207FE16070000026F2500000AA2286600000A73080000067A1613082B30007E0E000004027B0F00000411089A03176F6700000A130911092C0D11080228280000065813042B5B001108175813081108027B0F0000048E69FE04130A110A2DBE727F000070027B0F000004284700000A0B1B8D2F00000125167240020070A2251703A225187244020070A2251907A2251A72E1000070A2286800000A73080000067A11042A3202282700000628250000062A133007004A0100000000000016161F3B147326000006800700000417161F3B147326000006800800000418161F17147326000006800900000419171F1F147326000006800A0000041A171F0C1F0C8D2F000001251672B4020070A2251772C4020070A2251872D6020070A2251972E2020070A2251A72EE020070A2251B72F6020070A2251C7200030070A2251D720A030070A2251E7218030070A2251F09722C030070A2251F0A723C030070A2251F0B724E030070A27326000006800B0000041B161C1D8D2F00000125167260030070A22517726E030070A22518727C030070A22519728C030070A2251A72A0030070A2251B72B2030070A2251C72C0030070A27326000006800C0000041C8D0600000225167E07000004A225177E08000004A225187E09000004A225197E0A000004A2251A7E0B000004A2251B7E0C000004A2800D000004284000000A6F6900000A800E0000042A22021428370000062A0013300500460000000000000002037E37000004252D17267E36000004FE0666000006736A00000A2580370000047E38000004252D17267E36000004FE0667000006736B00000A258038000004280800002B2A22021428390000062A00133005004F0000000000000002252D06267E6C00000A037E39000004252D17267E36000004FE0668000006736A00000A2580390000047E3A000004252D17267E36000004FE0669000006736B00000A25803A000004280800002B2A4E02252D06267E6C00000A140304280900002B2A00133008006201000011000011736D00000A0A06027D6E00000A00067B6E00000A14FE01130511052C0B72D2030070733300000A7A067B6E00000A7E21000004176F6F00000A0B06032C08036F610000062B01167D7000000A067B7000000A2D031B2B011C0C078E69083208078E6908FE022B0117130611062C1A000506FE067100000A73440000066F3100000A130738D70000001C8D040000020D067B7000000A2D03172B011613041613083889000000001108110458130911090711089A7E7200000A252D17267E7300000AFE067400000A737500000A25807200000A7E7600000A252D17267E7300000AFE067700000A737800000A25807600000A280A00002B130A110A6F7900000A14FE03130B110B2C1105110A6F7900000A6F3100000A13072B46091108110458110A6F7A00000AA2001108175813081108078E69FE04130C110C3A67FFFFFF0409169A09179A09189A09199A091A9A091B9A733C0000066F7B00000A13072B0011072A0000133002006B0000000000000002281E00000A00000414FE03284A00000A000514FE03284A00000A000E0414FE03284A00000A000E0514FE03284A00000A000E0614FE03284A00000A0002037D1A00000402047D1B00000402057D1C000004020E047D1D000004020E057D1E000004020E067D1F0000042A761FFE737000000625027D4700000425037D4400000425047D460000042A3602037E7C00000A283F0000062A00133003001D0000001200001102030428400000060A1200287D00000A2D03042B071200287E00000A2A000000133009006203000013000011000F01287F00000A0A0F01288000000A0B0F01288100000A0C0F01288200000A0D0F01288300000A13040F01288400000A13050F02287F00000A13060F02288000000A13070F02288100000A130806130907130A08130B09130C1104130D11051758130E027B1A000004252D06267E20000004130F110F110E6F16000006130E110E15FE01131211122C1100110F6F15000006130E110D1758130D00027B1B000004110D6F16000006130D110D15FE01131311132C1500027B1B0000046F15000006130D110C1758130C00027B1C000004110C6F16000006130C110C15FE01131411142C2400027B1B0000046F15000006130D027B1C0000046F15000006130C110B1758130B002B1A110C09FE02131511152C0F00027B1B0000046F15000006130D00027B1D000004110B6F16000006130B00110B15FE01131611162C3A00110F6F15000006130E027B1B0000046F15000006130D027B1C0000046F15000006130C027B1D0000046F15000006130B110A1758130A002B30110B08FE02131711172C2500110F6F15000006130E027B1B0000046F15000006130D027B1C0000046F15000006130C00027B1E000004110A6F16000006130A110A15FE01131811182C4700110F6F15000006130E027B1B0000046F15000006130D027B1C0000046F15000006130C027B1D0000046F15000006130B027B1E0000046F15000006130A110917581309002B3D110A07FE02131911192C3200110F6F15000006130E027B1B0000046F15000006130D027B1C0000046F15000006130C027B1D0000046F15000006130B00110928420000066F8500000A131B121B287F00000AFE02131A111A2C11121CFE152000001B111C131D38EB000000110B08330F110A07330A110906FE0116FE012B01171310110B1F1CFE0211105F2C14110B28420000061109110A6F8600000AFE022B0116131E111E2C3400110911063211110A1107320B110B1108FE0416FE012B0116131F111F2C0D04738700000A131D388200000015130B384DFEFFFF12111109110A110B110C110D110E160F01288800000A288900000A111104288A00000A132011202C0A04738700000A131D2B47027B1F0000041211288B00000A6F19000006132111212C0B1111738700000A131D2B24021109110A110B1F171F3B1F3B160F01288800000A738900000A042840000006131D2B00111D2A000013300300A70000001400001100284000000A734100000A0A027B1A00000414FE030B072C1900027B1A00000406176F2000000600061F206F4B00000A0000027B1B00000406176F2000000600061F206F4B00000A00027B1C00000406176F2000000600061F206F4B00000A00027B1D00000406176F2000000600061F206F4B00000A00027B1E00000406176F2000000600061F206F4B00000A00027B1F00000406176F2000000600066F2500000A0C2B00082A2E284000000A6F8C00000A2A4272E8030070280E00000680200000042A86178D3B00000125161F209D8021000004178D3B00000125161F2C9D80220000042A2E734D00000680230000042A2202281E00000A002A0A032A2200036F450000067A0A032A0A142A2E738D00000A808E00000A2A2202281E00000A002A0A032A2202281E00000A002A000013300400690000000000000072EC030070027B8F00000A8C36000001027B9000000A7B060000046F270000068C07000002289100000A7277040070027B9000000A7B060000046F280000068C36000001027B9000000A7B060000046F290000068C36000001289100000A289200000A73080000062A2202281E00000A002A000013300400690000000000000072DD040070027B9300000A8C36000001027B9400000A7B060000046F270000068C07000002289100000A7277040070027B9400000A7B060000046F280000068C36000001027B9400000A7B060000046F290000068C36000001289100000A289200000A73080000062A2E735A000006802E0000042A2202281E00000A002A2200036F450000067A2202281E00000A002AB27266050070027B9500000A027B9600000A28270000068C07000002289100000A027B9700000A73090000062A2E739800000A809900000A2A2202281E00000A002A2E721101007073080000062A1E027B350000042A2202037D350000042A2202281E00000A002A2E736500000680360000042A2202281E00000A002A0A032A2200036F450000067A0A032A0A142A2202281E00000A002A13300400500000001500001100027B9A00000A2D0772D00500702B05728B0600700A1B8D2F00000125167240020070A22517027B9B00000AA225187258070070A2251906A2251A72E1000070A2286800000A73080000060B2B00072A2E739C00000A809D00000A2A2202281E00000A002A221403739E00000A2A220314739E00000A2A7E02281E00000A0002037D4000000402289F00000A6FA000000A7D420000042A062A00000013300400CD00000016000011027B400000040A062C082B0006172E042B042B042B44162A02157D400000040002027B47000004027B43000004027B4500000428400000067D480000042B450002027C4800000428A100000A7D4100000402177D40000004172A02157D400000040002027B47000004027C4800000428A100000A027B4500000428400000067D48000004027C48000004287D00000A2C29027B480000040C027B450000040D1202287D00000A2D03162B0D1202287E00000A0928A200000A2B01160B072D80027C48000004FE152000001B162A1E027B410000042A1A73A300000A7A32027B410000048C290000012A000000133002005400000017000011027B400000041FFE331D027B42000004289F00000A6FA000000A330B02167D40000004020A2B131673700000060A06027B470000047D4700000406027B440000047D4300000406027B460000047D45000004062A1E0228760000062A42534A4201000100000000000C00000076322E302E35303732370000000005006C00000048160000237E0000B41600000810000023537472696E677300000000BC260000C407000023555300802E0000100000002347554944000000902E00009808000023426C6F620000000000000002000001571FA20B090E000000FA013300160000010000003D0000001700000048000000770000008400000007000000A3000000060000003600000017000000050000000A0000000B000000080000002700000001000000030000000C000000130000000A0000000000420901000000000006002C079E0C0600C8079E0C06002006280C0F00E20C000006000F07D20906008007780906004C07D20906006507D2090600AF07D20906007A06D2090600F006D20906004F067F0C0600AD06D2090600CA06D20906006306D2090600FE05D10C0600E3059E0C06009607280C0600100E78090600BB05280C06003406280C06009506280C0600590A780906007F0AB5090600A60FB5090600E50F430D0A00AF0278090600220BDD0206002F0BDD0206009E0578090600810E78090600CB08780906007604B5090600670AA0090E00A108280C0600410A780906002302780906006902110306007F09780906002E02110306003D0578090600CE0AA0090600D20478090600730B430D0600C604430D06003C0211030600900878090600090B780906001C0A78090600730AA0090600460578090600DE0478090600510A78090600770278090600560DA0090600720D78090600370478090600120978090600E00A7809060060037D080600F509780900000000D402000000000100010000011000990200004D000100010001201000E409F7025D0003000700012110009A03F7024D0003000B00000100004F02F702790007002100002110004F09F7024D0007002500010100002604F7029D0013003600012110000205F7024D001A00360001010000E50AF702790021004400A10000009903F70200002100480080011000E208F7024D0021004B0003211000090300004D0023004C0003211000100200004D002800520003011000A60100004D002A00550003011000BE0100004D002C00570003211000090300004D002E00590003011000EE0100004D0030005C0003211000190200004D0033005E0002211000650D00004D003500610003211000090300004D003600640003011000D60100004D003B006A0003211000060200004D003D006C0003011000B60200004D0040007000210081035E002100710362002100B50DEE0401001E0E7B0101002B0E7B012100600931023600620431023600EA0731023600230C31023600E10F31023600C508310236001209310231004D04F2043100190BF7042100020DFC042100A70300052100BD037B012100D7037B010606E9027B015680620400055680EA0700055680230C00055680E10F00055680C50800055680120900052100760C7E012100110D7E0121009D0D7E012100C00D7E012100210D7E01210002097E013100960A7E013600700404053600F10204053600D002080516001D000C0516004D011605160034000C051600640116053600D002060116006700FC0006006F087B010600290D7E0106006F087B010600290D7E013600D002200516004E00FC0006001B0C2E020600290D31020600320A35023600D0026F02160081006B020100F10346033600D00224051600A200280516007E0132051600010028051600150132050600650C4603060095092E023600D002600316003101500316007D0284030100D2057B0101006B0FD203010040037B0101002405D20306001F05D20301001705D20306001205D2030600290D3C050100950140055020000000008608F70A330001005820000000008608F107C40301006020000000008618F20BA4040100782000000000C600330D4A050300C02000000000C6009C0460020400F82000000000C6008E08A30004005C21000000008618F20B060004006B21000000008618F20B100004007621000000008618F20BB40005008221000000008418F20BBB000700902100000000960098054F050900E42100000000960095054F050B003822000000009600950557050D00A2220000000096006E0C70051100AB22000000009600090D70051200B422000000009600970D70051300BD22000000009600BB0D70051400C6220000000096001A0D70051500CF22000000009600F70870051600D822000000008118F20B76051700372300000000E601940F60021800502300000000E601A10F7C051800C72300000000810033087C051900D623000000008100C10F7C051A00E52300000000E6013A0D45011B00FC23000000008100B00581051C0088250000000081005E0B94052100BC25000000008100410B94052300EF2500000000C6008E08A3002500F8250000000086008E08A30525005926000000008600CD0DA80526006426000000008600CD0DAE0527000000000003008618F20BCC002900000000000300C601BF04C0022B00000000000300C601BA04B5053000000000000300C601B004CB05370078260000000096004404D2053800E426000000008118F20BD905390063270000000086081D04E3053D006B270000000086081D0860023D007327000000008608590860023D007B27000000008608780F60023D008C27000000008600CD0DE8053D009827000000008600CD0DF0053F008C280000000081004D08F90542000829000000009100FB07010645006E290000000086009805080647009C29000000008600950513064900182A0000000081000B0A2A064D00782A000000008100870513065000A82C00000000810012083B065400F72D00000000E101DB0D20005500042E000000009118F80B400656005A2F000000009600980544065600642F00000000960098054A065700B62F000000009600950544065900C02F00000000960095054A065A001B30000000009600950552065C003030000000009600950569065F00A031000000008118F20B820663001732000000008600BE0C9206690035320000000086008A04A3066B0044320000000086008A04AC066C0070320000000081008704B8066E00E03500000000C6008E08A30070009336000000009108CA0AC90670009F36000000009118F80B400670000000000003008618F20BCC007000000000000300C601BF0482017200000000000300C601BA04CF067200000000000300C601B004D8067400000000000000C605940F60027500000000000000C605A10F7C057500000000000000C6053A0D45017600B036000000009118F80B40067700D236000000009118F80B40067700DE36000000008618F20B06007700E7360000000083002600DF067700EA360000000083005601E6067800F3360000000083003D00DF067900F6360000000083006D01E6067A00F936000000009118F80B40067B000537000000008618F20B06007B000E3700000000830070000E017B001137000000008618F20B06007C001C37000000008300FA0082017C009137000000008618F20B06007C009C37000000008300DF0082017C001138000000009118F80B40067C001D38000000008618F20B06007C00263800000000830058000E017C002F38000000008618F20B06007D003838000000008300C80082017D006538000000009118F80B40067D007138000000008618F20B06007D007A380000000083008B0082017D0086380000000086083B0C26007D008E38000000008608500C15007D009738000000008618F20B06007E00A038000000009118F80B40067E00AC38000000008618F20B06007E00B538000000008300AB00ED067E00B8380000000083008701F4067F00C1380000000083000B00ED068000C4380000000083001F01F4068100C738000000008618F20B06008200D038000000008300B900820182002C39000000009118F80B400682003839000000008618F20B0600820041390000000083003B01680382004A390000000083008702940383005339000000008618F20B01008400733900000000E1016C0506008500783900000000E1019D0F26008500513A00000000E109FC0E23048500593A00000000E101380E06008500603A00000000E109400F38008500703A00000000E1017F0BFB068500D03A00000000E101C50B4F00850000000100FB0A000002006908000001006F0800000100A80400000100A80400000200320A00000100910A00000200B70F00000100590400000200950900000100590400000200950900000100590400000200950900000300FF0B000004000D0C00000100950900000100950900000100950900000100950900000100950900000100950900000100610900000100870F00000100CE0F000001006F08000001006F0800000100870F00000200190400000300320900000400A40D000005000D0C000001006F08000002000D0C000001006F08000002000D0C00000100D40D000001003A0B000001003A0B00000200F10C00000100170E00000200690400000100870F00000200190400000300320900000400AC0D00000500560B00000100870F00000200190400000300320900000400AC0D00000500560B00000600D90800000700170E000001008E0E000001005904000001005904000002002A0800000300660800000400030D000001001304000002003A0B000001001304000002003A0B00000300F10C000001006F08000002003A0B00000300F10C000001006F08000002003A0B000001001B0C000002000D03000001001B0C000002000D0300000300A40D000004000D0C00000100320A000002001B0C000003000D0C000001001B0C000002000D0300000300A40D000004000D0C000001001B0C00000100B70F00000100950900000100950900000200850D00000100950900000100950900000200850D00000100950900000200FF0B000003000D0C00000100950900000200850D00000300FF0B000004000D0C00000100770C00000200120D000003009E0D00000400C10D00000500220D00000600030900000100240500000200170500000100240500000100240500000200170500000100240500000200170500000100170E00000200690400000100D90800000200170E000001008E0E00000100870F000001006F0800000100BF0F00000100730800000100BF0F00000100EF0200000100730800000100A10A000001006F0800000100BF0F00000100730800000100BF0F00000100EF0200000100BF0F00000100730800000100D205040028000600850017000A001700B500170006001700AD001700B1000900F20B01001100F20B06001900F20B0A002900F20B10003100F20B15003900F20B10004100F20B10004900F20B10005100F20B10005900F20B10006100F20B15006900F20B10007100F20B10007900F20B10008100F20B10008900F20B06009100F20B1000A900F20B1A00B100F20B06000901090E200059017F05060061019D0F26000C005F0F33006101570E060061015F0F38001400E40B45006901E40B4F001C0081035E001C00710362009900F20B06002400630E79002400330D83002C00630E79002C00330D830024009C0493002C009C04930099008E08A3007901CD0DAA00B900F20B1000B900F20BB400B900F20BBB004400F20BCC004C00F20BCC005400F20BCC005C006700FC005C00D00206015C0070000E016400F20BCC006C00BF0427017400BF0427018901F20B1000D100F20B0100D1003B091500D10066094501D1006F0965017C00F20B06007C006F087B017C00290D7E017C00FA0082018400F20B060084006F087B018400290D7E018400DF008201910157059F01E100F20BA5017901EE0FAC012101F20B06009901F004B90139016703C2013901F90CCA0179019009D2017901C60DD901A901F20BE00119018D0FE601E900DD05F901B1018E080402E900DD0510007901FA0F17028C00F20B06008C001B0C2E028C00290D31028C00320A35028C00C80082017901A7086002940081006B029400D0026F0294008B00820179017508770279015D0E7C029C00E40B4500A4005F0F3300790197089B02B1019805A002B400F20BA80279019708AE0279018D0DB402B40040082600B4006F0E3300BC00BF04C002B400F1073300B1018E08A3007901CD0DE1021101D40FE8027901C60DF1029101630AF702C400F20BCC00CC00F20BCC00790102102E02D400F20B0600D40095092E0279015D0E3C03D400650C4603D400B9008201DC0031015003DC00D0026003DC003B016803E400F20BCC00DC007D028403DC0087029403EC00F20BCC00F400F70A3300F400F107C403FC00BF04270149015D08D20304014008260004016F0E33004901D70A60024901B20860024901DD0F600249011F0C60024901E607600249015E04600251012D0523045101BC0829040401F20BA80249011D042F044901F20B350449011C09430449010E094D049101CA0A5A040C01F20B06000C01D002060114016F087B011401290D7E017901CD0D6E047901C60D75041C016F087B011C01290D7E0124011B0C2E022401290D31022401320A35022C01F20B06002C01D0026F023401650C4603340195092E023C01F20B06003C01D0026003F400F20BA404E1015503AC04E1012C0360020401F1073300490184094304E901F20B060008005000D00408005400D50408005800DA0408005C00DF0408006000E40408006400E904210093003C082E000B002D072E00130036072E001B0055072E0023005E072E002B0074072E0033007A072E003B0088072E00430008082E004B0008082E0053000E082E005B0008082E00630019082E006B0026082E0073007A072E007B003108410093003C0843008300D50443008B00450860009B00D50480009B00D504A0009B00D504C0009B00D50483018300D504A3018300D504C3018300D504E3018300D50401028300D504010293003C0803028300D50421028300D504210293003C0823028300D50441028300D504410293003C0843028300D50483028300D504A3028300D504C3028300D504E3028300D504E0048300D50400058300D50420058300D504A1068300D504A10693003C08200C8300D504400C8300D504000E9B00D504200E9B00D504600E9B00D504800E9B00D504A00E9B00D504C00E9B00D504E00E9B00D50466009900E00037013B014A016B0187019701B201EB01FE010B021C023902D2021403D703EB0353049004B204C20402000100060003000800070013000800170009000000FB0A0607000069080B0700005404100700002108150700005D08150700007C0F15070000CE0A19070000540C1F070000950E23070000D50E2907020001000300020002000500020027000700020028000900020029000B0002002A000D00020042000F000200610011000100620011000200730013000200750015000600680029001700E2002B001700E4002D001700E6002F001700E80031001700EA0033001700EC0035001700EE0037002A003C00550071008B00A000A700C300D200EE00F50015011E012E01740190012702640283028A0291029402B902FD020603350349037503A103BB03C903E203600467047B048204890496049D04048000000300030001000000000000000000F7020000020000000000000000000000C704000300000000030005000000000000000000C7044B0500000000020000000000000000000000C7047809000000000C0004000D0004000E0004000F0004001000060011000600120006001300080014000800150008001600080017000800000000000400B30A010000000400A40A000000000A00E702000000001A00E702000000001B00E702000000001C00E702000000001E00E702000000002200E702000000002400E702000000002A00E702000000002C00E702000000003500E702000000003700E702000000003900E702000000006100E702000000006300E702000000006500E702000000007500E702000000007700E7021A00DB003400E9006000E9003800600136006001640060016200600176000F03760060011A00B0030000003C3E395F5F31315F30003C54727950617273653E625F5F31315F30003C3E395F5F345F30003C50617273653E625F5F345F30003C3E395F5F355F30003C54727950617273653E625F5F355F30003C3E395F5F32365F30003C50617273653E625F5F32365F30003C3E395F5F365F30003C54727950617273653E625F5F365F30003C3E395F5F32395F30003C496E7465726E616C50617273653E625F5F32395F30003C3E395F5F395F30003C50617273653E625F5F395F30003C54727950617273653E625F5F30003C4F6E5061727365457863657074696F6E3E625F5F30003C4F6E56616C756542656C6F774D696E4572726F723E625F5F30003C4F6E56616C756541626F76654D61784572726F723E625F5F30003C3E395F5F31315F31003C54727950617273653E625F5F31315F31003C3E395F5F31335F31003C54727950617273653E625F5F31335F31003C3E395F5F345F31003C50617273653E625F5F345F31003C3E395F5F355F31003C54727950617273653E625F5F355F31003C3E395F5F395F31003C50617273653E625F5F395F31003C6F6363757272656E63653E355F5F31003C3E635F5F446973706C6179436C61737332305F306031003C3E635F5F446973706C6179436C61737332315F306031003C3E635F5F446973706C6179436C61737331335F306031003C3E635F5F446973706C6179436C61737332385F306031003C3E635F5F31336031003C3E635F5F366031003C3E635F5F32396031004E756C6C61626C6560310049456E756D657261626C65603100457175616C697479436F6D706172657260310043726F6E7461624669656C64416363756D756C61746F7260310049456E756D657261746F72603100496E743332003C3E395F5F31335F32003C54727950617273653E625F5F31335F32003C3E665F5F416E6F6E796D6F7573547970653060320046756E636032003C4765744E6578744F6363757272656E6365733E645F5F3135003C3E39003C4D6F64756C653E0053797374656D2E494F00540076616C75655F5F00436F6D6D61004E43726F6E746162006D73636F726C6962003C3E63006163630053797374656D2E436F6C6C656374696F6E732E47656E65726963006765745F4D616E616765645468726561644964003C3E6C5F5F696E697469616C5468726561644964006765745F43757272656E74546872656164004973446566696E6564003C56616C75653E695F5F4669656C64003C4572726F7250726F76696465723E695F5F4669656C64004943726F6E7461624669656C64003C4B696E643E6B5F5F4261636B696E674669656C64003C4D696E56616C75653E6B5F5F4261636B696E674669656C64003C4D617856616C75653E6B5F5F4261636B696E674669656C64003C496E636C7564696E675365636F6E64733E6B5F5F4261636B696E674669656C64006669656C6400656E64006765745F4B696E640043726F6E7461624669656C644B696E64004461746554696D654B696E640046726F6D4B696E64004669656C6442794B696E64006B696E64006765745F5365636F6E64006D6574686F6400537061636500494F626A6563745265666572656E6365005472794765744E6578744F6363757272656E63650047657448617368436F6465006D65737361676500456E64496E766F6B6500426567696E496E766F6B650049456E756D657261626C650049446973706F7361626C650052756E74696D655479706548616E646C65004765745479706546726F6D48616E646C650043726F6E7461625363686564756C65003C3E335F5F656E6454696D65003C3E335F5F6261736554696D65006765745F4D6178537570706F727465644461746554696D6500547970650053797374656D2E436F7265006765745F496E76617269616E7443756C747572650053797374656D2E49446973706F7361626C652E446973706F736500496E7465726E616C5061727365005472795061727365004D756C74696361737444656C656761746500416363756D756C61746500446562756767657242726F777361626C655374617465003C3E315F5F737461746500577269746500436F6D70696C657247656E657261746564417474726962757465004E65757472616C5265736F75726365734C616E67756167654174747269627574650044656275676761626C6541747472696275746500446562756767657242726F777361626C6541747472696275746500436F6D56697369626C6541747472696275746500417373656D626C795469746C6541747472696275746500417373656D626C7954726164656D61726B41747472696275746500446562756767657248696464656E41747472696275746500417373656D626C7946696C6556657273696F6E41747472696275746500417373656D626C79496E666F726D6174696F6E616C56657273696F6E41747472696275746500417373656D626C79436F6E66696775726174696F6E41747472696275746500417373656D626C794465736372697074696F6E41747472696275746500436F6D70696C6174696F6E52656C61786174696F6E7341747472696275746500417373656D626C7950726F6475637441747472696275746500417373656D626C79436F7079726967687441747472696275746500434C53436F6D706C69616E74417474726962757465004465627567676572446973706C617941747472696275746500417373656D626C79436F6D70616E794174747269627574650052756E74696D65436F6D7061746962696C697479417474726962757465006765745F4D696E757465006765745F56616C75650046617374466F726D61744E756D6572696356616C756500506172736556616C7565006765745F4D696E56616C7565006D696E56616C756500496E646578546F56616C7565006765745F48617356616C756500466F726D617456616C7565006765745F4D617856616C7565006D617856616C75650076616C756500496E6465784F660053797374656D2E546872656164696E6700546F537472696E6700537562737472696E67004465627567006765745F4C656E677468006765745F4D6F6E74680047657444617973496E4D6F6E7468004173796E6343616C6C6261636B0063616C6C6261636B00537472696E67536570617261746F7253746F636B00446179734F665765656B005F646179734F665765656B006765745F4461794F665765656B006F705F477265617465725468616E4F72457175616C00696E74657276616C00536574416C6C004E43726F6E7461622E646C6C0043726F6E7461624669656C64496D706C005F696D706C006765745F4974656D007365745F4974656D0053797374656D00456E756D006F705F4C6573735468616E004A6F696E0065787072657373696F6E0053797374656D2E476C6F62616C697A6174696F6E0053797374656D2E52756E74696D652E53657269616C697A6174696F6E0053797374656D2E5265666C656374696F6E0043726F6E746162457863657074696F6E004E6F74537570706F72746564457863657074696F6E004F6E5061727365457863657074696F6E00417267756D656E744E756C6C457863657074696F6E00696E6E6572457863657074696F6E00466F726D6174457863657074696F6E00417267756D656E74457863657074696F6E006765745F436F6D70617265496E666F0043756C74757265496E666F0053657269616C697A6174696F6E496E666F00696E666F005365636F6E645A65726F006570003C56616C75653E6A5F5F54506172003C4572726F7250726F76696465723E6A5F5F54506172006765745F43616C656E646172006765745F59656172004368617200457863657074696F6E50726F7669646572006765745F4572726F7250726F76696465720049466F726D617450726F766964657200436F6D706172657200537472696E67577269746572005465787457726974657200777269746572004F6E56616C756542656C6F774D696E4572726F72006F6E4572726F72004F6E56616C756541626F76654D61784572726F720049456E756D657261746F720053797374656D2E436F6C6C656374696F6E732E47656E657269632E49456E756D657261626C653C53797374656D2E4461746554696D653E2E476574456E756D657261746F720053797374656D2E436F6C6C656374696F6E732E49456E756D657261626C652E476574456E756D657261746F72002E63746F72002E6363746F720076616C756553656C6563746F72006572726F7253656C6563746F7200737472006765745F486F75720053797374656D2E446961676E6F7374696373006765745F496E636C7564696E675365636F6E6473007365745F496E636C7564696E675365636F6E647300696E636C7564696E675365636F6E6473005F7365636F6E64730053797374656D2E52756E74696D652E496E7465726F7053657276696365730053797374656D2E52756E74696D652E436F6D70696C65725365727669636573004765744E6578744F6363757272656E6365730053797374656D2E5265736F757263657300446562756767696E674D6F646573006E6F4E616D6573004765744E616D6573005F6E616D6573004D696E75746573005F6D696E75746573004D6F6E746873005F6D6F6E746873003C3E345F5F7468697300457175616C7300436F6E7461696E730053797374656D2E436F6C6C656374696F6E7300436F6D706172654F7074696F6E730050617273654F7074696F6E7300537472696E6753706C69744F7074696F6E73006F7074696F6E73006765745F436861727300486F757273005F686F7572730073756363657373007375636365737373005F626974730044617973005F6461797300436F6E63617400466F726D617400666F726D61740053797374656D2E52756E74696D652E53657269616C697A6174696F6E2E494F626A6563745265666572656E63652E4765745265616C4F626A656374006F626A656374005F6D696E56616C7565536574005F6D617856616C75655365740053797374656D2E436F6C6C656374696F6E732E49456E756D657261746F722E52657365740053706C6974006765745F44656661756C740047657456616C75654F7244656661756C7400494173796E63526573756C7400726573756C740053797374656D2E436F6C6C656374696F6E732E47656E657269632E49456E756D657261746F723C53797374656D2E4461746554696D653E2E43757272656E740053797374656D2E436F6C6C656374696F6E732E49456E756D657261746F722E43757272656E740053797374656D2E436F6C6C656374696F6E732E47656E657269632E49456E756D657261746F723C53797374656D2E4461746554696D653E2E6765745F43757272656E740053797374656D2E436F6C6C656374696F6E732E49456E756D657261746F722E6765745F43757272656E74003C3E325F5F63757272656E74006765745F56616C7565436F756E7400737461727400417373657274004765744669727374004D6F76654E6578740053747265616D696E67436F6E7465787400636F6E7465787400760056616C7565546F496E64657800696E646578004973507265666978006765745F446179004269744172726179006F705F457175616C6974790049734E756C6C4F72456D70747900004D7B007B0020004500720072006F007200500072006F007600690064006500720020003D0020007B0030007D002C002000560061006C007500650020003D0020007B0031007D0020007D007D00001D430072006F006E0074006100620020006500720072006F0072002E00000969006D0070006C000003470000034E0000052C002000005B49006E00760061006C00690064002000630072006F006E0074006100620020006600690065006C00640020006B0069006E0064002E002000560061006C00690064002000760061006C007500650073002000610072006500200000032E0000096B0069006E006400000B6600690065006C006400000D7700720069007400650072000007610063006300004D41002000630072006F006E0074006100620020006600690065006C0064002000760061006C00750065002000630061006E006E006F007400200062006500200065006D007000740079002E000080DF27007B0030007D00270020006900730020006E006F007400200061002000760061006C006900640020005B007B0033007D005D002000630072006F006E0074006100620020006600690065006C0064002000760061006C00750065002E0020004900740020006D007500730074002000620065002000610020006E0075006D0065007200690063002000760061006C007500650020006200650074007700650065006E0020007B0031007D00200061006E00640020007B0032007D002000280061006C006C00200069006E0063006C007500730069007600650029002E0001032700016F270020006900730020006E006F0074002000610020006B006E006F0077006E002000760061006C007500650020006E0061006D0065002E00200055007300650020006F006E00650020006F0066002000740068006500200066006F006C006C006F00770069006E0067003A002000010F4A0061006E007500610072007900001146006500620072007500610072007900000B4D006100720063006800000B41007000720069006C0000074D006100790000094A0075006E00650000094A0075006C007900000D4100750067007500730074000013530065007000740065006D00620065007200000F4F00630074006F0062006500720000114E006F00760065006D00620065007200001144006500630065006D00620065007200000D530075006E00640061007900000D4D006F006E00640061007900000F540075006500730064006100790000135700650064006E0065007300640061007900001154006800750072007300640061007900000D4600720069006400610079000011530061007400750072006400610079000015650078007000720065007300730069006F006E00000330000080897B0030007D00200069007300200068006900670068006500720020007400680061006E00200074006800650020006D006100780069006D0075006D00200061006C006C006F007700610062006C0065002000760061006C0075006500200066006F007200200074006800650020005B007B0031007D005D0020006600690065006C0064002E0020000065560061006C007500650020006D0075007300740020006200650020006200650074007700650065006E0020007B0030007D00200061006E00640020007B0031007D002000280061006C006C00200069006E0063006C007500730069007600650029002E000080877B0030007D0020006900730020006C006F0077006500720020007400680061006E00200074006800650020006D0069006E0069006D0075006D00200061006C006C006F007700610062006C0065002000760061006C0075006500200066006F007200200074006800650020005B007B0031007D005D0020006600690065006C0064002E002000006927007B0030007D00270020006900730020006E006F007400200061002000760061006C006900640020005B007B0031007D005D002000630072006F006E0074006100620020006600690065006C0064002000650078007000720065007300730069006F006E002E000180B93500200063006F006D0070006F006E0065006E007400730020006F0066002000610020007300630068006500640075006C006500200069006E0020007400680065002000730065007100750065006E006300650020006F00660020006D0069006E0075007400650073002C00200068006F007500720073002C00200064006100790073002C0020006D006F006E007400680073002C00200061006E0064002000640061007900730020006F00660020007700650065006B000080CB3600200063006F006D0070006F006E0065006E007400730020006F0066002000610020007300630068006500640075006C006500200069006E0020007400680065002000730065007100750065006E006300650020006F00660020007300650063006F006E00640073002C0020006D0069006E0075007400650073002C00200068006F007500720073002C00200064006100790073002C0020006D006F006E007400680073002C00200061006E0064002000640061007900730020006F00660020007700650065006B0000692700200069007300200061006E00200069006E00760061006C00690064002000630072006F006E007400610062002000650078007000720065007300730069006F006E002E0020004900740020006D00750073007400200063006F006E007400610069006E002000010000CB0C6AFB7C620043AC0EFBE8E098115800042001010803200001052001011111042001010E04200101020520010111510520011C1165032000020815128099011180A504200013000320001C08151280A1011180A5092000151280990113000520001280B108151208021300130103061300030613010A0701151208021300130107151280B9011300090000151280B9011300072002021300130007151280B9011301052001081300060702130013010213000320000E0213010900030E1280C10E1D1C062002010E125D07200201126111650815126D0212101210052002011C180815126D0212241210040A011210080703121012241E00040A0112240615121401122406151234011E00090615126D02122412240706151234011300062001122412240815126D02122412240815126D0212241E00062001130113000815126D0212101E00030701020907070808020808020204200102081507120808080202021E000202020202020202020202040A011E00052002010802080701151238011E0006151238011E0002060803061210042000125D08070115123C011E000615123C011E0007070412710E0E0E0500001280C9062001011280C1050002020E0E060703020E12180800011280CD1180D1070002021280CD1C0700011D0E1280CD0600020E0E1D0E0600030E0E0E0E052002010E0E04000101020D070B080802020808020202020204200101030507030202080620010E1280C10B070502021E00128091120C040001020E0A0702151244011E001E0006151244011E0002060E030612180306125D26071308151180950108080808021E00021E0015128099010E02020215118095010802080802080320000806151248011E0003061224070615124801130004200108030620011D0E1D0306151280A1010E0615128099010E021E00061511809501080420010E08070002080E1280C10520010113000520020E0808042001030806151214011E001120051300080808130015126D02122413000E070B030E0202080208111C0802020600020E0E1D1C082003020E0E1180DD0500010E1D0E0520001280890815126D02122012200815126D0212241220040A01122020070D151254011E001D0E081D12100802021E0008111C1512080212241210020206151254011E000920021D0E1D031180E102060206151258011E000F0615126D021210151208021224121007061512580113000C2001151208021224121012100E15126D02121015120802122412100F0615126D02122415120802122412100C2001151208021224121012240E15126D02122415120802122412100A0A01151208021224121008151208021224121004200013010815126D0212201E0004061180A50A070115118095011180A50815118095011180A53707220808080808080808080808080808081210021180A50202020202020202021180A515118095011180A515118095011180A5020202020520001180A50520020808080520001180E50D200801080808080808081180E5090002021180A51180A50520001180E90607031271020E0520001280A906151234011300061512380113000600030E0E1C1C0500020E0E0E0615123C01130006151244011300061512480113000507020E125D061512540113000615125801130007200201130013010500001280F10F0704080215118095011180A51180A5040701125C08B77A5C561934E0890400000000040100000004020000000403000000040400000004050000000306126904061D1218040612808903061D0E0306111C03061D0303061230090615126D0212101210090615126D02122412100306124003061250090615126D0212201220090615126D021224122003061220090615118095011180A5042001021C0700021210111C0E181001041E00111C0E15126D0212101E0015126D0212241E0005000112100E0520010112180420010808123001051E000808081E0015126D0212241E000E3001021E000815126D0212241E000420010E0E05200101127506200201127502152007127D080808130015126D02122413001280811C0620011300127D0600011218111C09200401111C08081D0E042000111C07200201122812750820030112281275020720030108127502060002010812750A2002010E151214011224163001041E000E151214011E001E0015126D0212241E00103001031E00125D0E15126D0212241E00042001080E0300000105000112200E07000212200E124C161001031E000E15126D0212201E0015126D0212241E00181001041E000E124C15126D0212201E0015126D0212241E000F200601121012101210121012101210102002151280A1011180A51180A51180A50820011180A51180A50B20021180A51180A51180A510200215118095011180A51180A51180A50500001280A9082002127D1280811C062001125D127D062001121012100620011210122406200112201220062001122012240A200015128099011180A504280013000428001301042800111C032800080508001280A9032800020528001180A50328001C0801000800000000001E01000100540216577261704E6F6E457863657074696F6E5468726F7773010801000701000000001501001043726F6E74616220666F72202E4E455400000501000100000D0100084E43726F6E74616200007F01007A436F7079726967687420C2A920323030382C204174696620417A697A2E20416C6C207269676874732072657365727665642E20506F7274696F6E7320436F7079726967687420C2A9203230303120546865204F70656E53796D70686F6E792047726F75702E20416C6C207269676874732072657365727665642E00000501000000000A010005444542554700000C010007332E332E312E3000000A010005332E332E3100000A010005656E2D55530000080100000000000000520100355C7B204572726F7250726F7669646572203D207B4572726F7250726F76696465727D2C2056616C7565203D207B56616C75657D207D0100540E0454797065103C416E6F6E796D6F757320547970653E00000000FBC652D700014D50020000006900000054720000545400000000000000000000010000001300000027000000BD720000BD5400000000000000000000000000001000000000000000000000000000000052534453B8E32652BF834B4FAA2D74FA1754808401000000433A5C55736572735C62657665726C795C446F776E6C6F6164735C4E43726F6E7461622D6D61737465725C4E43726F6E7461625C6F626A5C44656275675C6E657433355C4E43726F6E7461622E7064620053484132353600B8E32652BF834BAF2A2D74FA17548084FBC65257ED45C54ECA7EA92BB74671BF0C73000000000000000000002673000000200000000000000000000000000000000000000000000018730000000000000000000000005F436F72446C6C4D61696E006D73636F7265652E646C6C0000000000FF25002000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100100000001800008000000000000000000000000000000100010000003000008000000000000000000000000000000100000000004800000058800000080400000000000000000000080434000000560053005F00560045005200530049004F004E005F0049004E0046004F0000000000BD04EFFE00000100030003000000010003000300000001003F000000000000000400000002000000000000000000000000000000440000000100560061007200460069006C00650049006E0066006F00000000002400040000005400720061006E0073006C006100740069006F006E00000000000000B00468030000010053007400720069006E006700460069006C00650049006E0066006F0000004403000001003000300030003000300034006200300000003A001100010043006F006D006D0065006E00740073000000430072006F006E00740061006200200066006F00720020002E004E00450054000000000022000100010043006F006D00700061006E0079004E0061006D00650000000000000000003A0009000100460069006C0065004400650073006300720069007000740069006F006E00000000004E00430072006F006E0074006100620000000000300008000100460069006C006500560065007200730069006F006E000000000033002E0033002E0031002E00300000003A000D00010049006E007400650072006E0061006C004E0061006D00650000004E00430072006F006E007400610062002E0064006C006C00000000001601790001004C006500670061006C0043006F007000790072006900670068007400000043006F0070007900720069006700680074002000A900200032003000300038002C0020004100740069006600200041007A0069007A002E00200041006C006C0020007200690067006800740073002000720065007300650072007600650064002E00200050006F007200740069006F006E007300200043006F0070007900720069006700680074002000A90020003200300030003100200054006800650020004F00700065006E00530079006D00700068006F006E0079002000470072006F00750070002E00200041006C006C0020007200690067006800740073002000720065007300650072007600650064002E00000000002A00010001004C006500670061006C00540072006100640065006D00610072006B007300000000000000000042000D0001004F0072006900670069006E0061006C00460069006C0065006E0061006D00650000004E00430072006F006E007400610062002E0064006C006C0000000000320009000100500072006F0064007500630074004E0061006D006500000000004E00430072006F006E0074006100620000000000300006000100500072006F006400750063007400560065007200730069006F006E00000033002E0033002E003100000038000800010041007300730065006D0062006C0079002000560065007200730069006F006E00000033002E0033002E0031002E00300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000007000000C000000383300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
WITH PERMISSION_SET = EXTERNAL_ACCESS
GO   


--使用.dll建立
CREATE ASSEMBLY [NCrontab] 
FROM 'c:\temp\NCrontab.dll'
GO
 

--建立你的Assembly (我習慣用二進位值清單建立,在VS的專案中publish時可以直接copy script 或部署),在範例上就用dll建立
 
CREATE ASSEMBLY [SQLCLR] 
FROM 'c:\temp\SQLCLR.dll'
GO


--建立function
CREATE FUNCTION [dbo].[afnCrontab2Edt]
(@expression NVARCHAR (MAX) NULL, @start DATETIME NULL, @end DATETIME NULL)
RETURNS
     TABLE (
        [val] DATETIME NULL)
AS
 EXTERNAL NAME [SQLCLR].[SRCLRFunctions].[afnCrontab2Edt]


--使用方式如下,取最近2個月內的每月14日排程時間,
select val from dbo.afnCrontab2Edt('30 18 14 * * '),getdate(),dateadd(month,2,getdate())) order by 1









會回傳
2020-04-14 18:30:00.000
2020-05-14 18:30:00.000



目前使用上還符合預期。

2020年3月2日 星期一

奇怪的SQL SERVER連線問題

一台SQL SERVER 2016 (WINDOWS 2016) VM環境

在某天突然以IP方式無法連線DB,造成網站顯示

測試了一下,在那台SQL SERVER 主機以SSMS 無法用IP連線,但用主機名稱可以連線。

怪哉???

網卡只開了IPV4,而且在外部用一台WIN10 機器也是以SSMS用IP或主機名稱連線又都是正常的。

更是怪哉???

最後將主機的網卡停用再啟用後 ,竟然就不藥而癒了。

hidden administrative network share

hidden administrative network share這中文叫啥?? 我也不知,就是打了\\computername\c$ 
在某天就突然沒法用了.
 
顯示的訊息如下
無法存取 \\computername\c$。您可能沒有使用這個網路資源的權限。請連絡這個伺服器的系統管理員,了解您是否有存取權限。
連結到系統的某個裝置失去作用。
 
找到這篇文章 https://cormang.com/2018/01/06/enable-c-admin-share-windows-10-server-2016/
執行以下指令,然後重開機。
 
REG ADD HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\system /v LocalAccountTokenFilterPolicy /t REG_DWORD /d 1 /f
 
我的人生就是不斷的在找尋無法原創~哈哈。
 

自動記錄滑鼠點選操作

為了一個需求,需要人工去點選幾個滑鼠的點選行為,找了幾種工具,覺得GS Auto Clicker最實用,極符合我的需求,尤其是多個固定位置的button點擊,解決了一個很耗時間的工作。 最後設定完預設hotkey F8為啟用鍵,就可以開始自動做工了。再按F8結束工作。 GS Au...