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
select | |
[principal_id] | |
, [name] | |
, [type_desc] | |
, is_member(name) as [is_member] | |
from [sys].[server_principals] | |
where [type] in ('R','G') | |
order by [is_member] desc,[type],[name] |
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
Emoji Description Shortcut | |
Smiley (smile) | |
Big smile (laugh) | |
Heart (heart) | |
Kiss (kiss) | |
Sad (sad) | |
Smiley with tongue out (tongueout) | |
Winking (wink) | |
Crying (cry) | |
In love (inlove) |
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 (keys, values, rereduce) { | |
var result = {}; | |
if (rereduce) { | |
values.forEach(function (firstIndex) { | |
for (var firstKey in firstIndex) { | |
// try to get the result associated with this key | |
var firstResult = result[firstKey]; |
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 (doc, meta) { | |
// calculate the size of the document | |
var size; | |
if (meta.type == "json") { | |
size = JSON.stringify(doc).length; | |
} else if (meta.type == "base64") { | |
size = decodeBase64(doc).length; | |
} |
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 (doc, meta) { | |
var firstSeparator = meta.id.indexOf('_'); | |
if (firstSeparator > -1) { | |
var firstKeyPart = meta.id.substring(0, firstSeparator); | |
emit(firstKeyPart, null); | |
} else { | |
emit('n/a', null); | |
} | |
} |
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 System; | |
using System.Collections; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
using System.Threading.Tasks; | |
namespace RichardAdleta | |
{ | |
public static class IEnumerableExtensions |
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 System; | |
using System.Collections.Generic; | |
using System.Text; | |
using System.Threading; | |
using System.Threading.Tasks; | |
namespace RichardAdleta | |
{ | |
/// <summary> | |
/// A thread safe wrapper for the <see cref="Timer"/> to ensure only one callback is executing at a time. |
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 System.Collections.Concurrent; | |
using System; | |
using System.Collections.Generic; | |
using System.Text; | |
using System.Threading; | |
using System.Threading.Tasks; | |
using Nito.AsyncEx; | |
namespace RichardAdleta | |
{ |
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 System; | |
using System.Threading.Tasks; | |
using System.Threading; | |
using System.IO; | |
namespace AsyncTechTalk | |
{ | |
class ProgramAsync | |
{ | |
static int number = 0; |
NewerOlder