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
| (function () { | |
| 'use strict'; | |
| angular | |
| .module('app.services') | |
| .factory('myPatternService', myPatternService); | |
| myPatternService.$inject = ['$http']; |
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 @ClarionDate INT = 47563 | |
| DECLARE @SqlDateTime DATETIME | |
| -- Convert the clarion DATE into and SQL DateTime | |
| SET @SqlDateTime = DateAdd(day, @ClarionDate - 4, '1801-01-01') | |
| SELECT @SqlDateTime AS 'SQL Date Time' | |
| -- Now convert it back from and SQL DateTime to a Clarion Date | |
| SET @ClarionDate = DateDiff(day, DateAdd(day, -4, '1801-01-01'), @SqlDateTime) |
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
| function Remove-DiacriticChars { | |
| param ([String]$srcString = [String]::Empty) | |
| $normalized = $srcString.Normalize( [Text.NormalizationForm]::FormD ) | |
| $sb = new-object Text.StringBuilder | |
| $normalized.ToCharArray() | % { | |
| if( [Globalization.CharUnicodeInfo]::GetUnicodeCategory($_) -ne [Globalization.UnicodeCategory]::NonSpacingMark) { | |
| [void]$sb.Append($_) | |
| } | |
| } | |
| $sb.ToString() |
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 @handle uniqueidentifier | |
| while(1=1) | |
| begin | |
| select top 1 @handle = conversation_handle from queueName | |
| if (@@ROWCOUNT = 0) break | |
| end conversation @handle with cleanup | |
| end |
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
| USE master | |
| SET NOEXEC OFF; | |
| GO | |
| :setvar DatabaseName "YourDatabaseName" | |
| GO | |
| :on error exit | |
| GO | |
| :setvar __IsSqlCmdEnabled "True" | |
| GO | |
| IF N'$(__IsSqlCmdEnabled)' NOT LIKE N'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
| select convert(varchar(12), convert(int, rand() * 1000000)) |
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
| select is_receive_enabled | |
| from sys.service_queues q inner join sys.schemas s on q.schema_id=s.schema_id | |
| where q.name = N'queueName' and s.name='schemaName' |
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
| SELECT * FROM sys.dm_broker_activated_tasks | |
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
| SELECT j.name, COUNT(1) as Executions | |
| FROM msdb.dbo.sysjobs j INNER JOIN msdb.dbo.sysjobhistory h ON j.job_id = h.job_id | |
| GROUP BY j.name | |
| ORDER BY Executions DESC |
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
| int inputNumber = 1234; | |
| int[] result = inputNumber.ToString().Select(digit=> (int)Char.GetNumericValue(digit)).ToArray(); |
OlderNewer