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
public sealed class DatabaseObserver : IDisposable | |
{ | |
private readonly string _connectionstring; | |
private readonly string _sqlcommand; | |
private readonly Action<Observation> _onChange; | |
private readonly Action<Exception> _onError; | |
private readonly Action<string> _onWarning; | |
private SqlConnection _connection; | |
private SqlCommand _cmd; | |
private SqlDependency _dependency; |
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
/* | |
* © Copyright 2003-2017 by ScaleOut Software, Inc. | |
* | |
* LICENSE AND DISCLAIMER | |
* ---------------------- | |
* This material contains sample programming source code ("Sample Code"). | |
* ScaleOut Software, Inc. (SSI) grants you a nonexclusive license to compile, | |
* link, run, display, reproduce, and prepare derivative works of | |
* this Sample Code. The Sample Code has not been thoroughly | |
* tested under all conditions. SSI, therefore, does not guarantee |
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
// =============================================================================== | |
// Microsoft Data Access Application Block for .NET | |
// http://msdn.microsoft.com/library/en-us/dnbda/html/daab-rm.asp | |
// | |
// cs | |
// | |
// This file contains the implementations of the SqlHelper and SqlHelperParameterCache | |
// classes. | |
// | |
// For more information see the Data Access Application Block Implementation Overview. |
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.Linq; | |
using System.Text; | |
using System.Threading.Tasks; | |
using Hangfire; | |
using Microsoft.Practices.EnterpriseLibrary.Common.Configuration; | |
using Microsoft.Practices.EnterpriseLibrary.Logging; | |
using V.RemoteDecodeProcessConsole.Properties; |
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
public class DisableMultipleQueuedItemsFilter : JobFilterAttribute, IClientFilter, IServerFilter | |
{ | |
private static readonly TimeSpan LockTimeout = TimeSpan.FromSeconds(5); | |
private static readonly TimeSpan FingerprintTimeout = TimeSpan.FromHours(1); | |
public void OnCreating(CreatingContext filterContext) | |
{ | |
if (!AddFingerprintIfNotExists(filterContext.Connection, filterContext.Job)) | |
{ | |
filterContext.Canceled = true; |
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
angular.module('your-module').config(['$provide', function ($provide) { | |
$provide.decorator('$rootScope', ['$delegate', function ($delegate) { | |
wrapMethod($delegate, '$broadcast', function (method, args) { | |
if (isNonSystemEvent(args[0])) | |
logCall('$broadcast', args); | |
return method.apply(this, args); | |
}); | |
wrapMethod($delegate, '$emit', function (method, args) { |
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
// A bi-directional infinite scrolling jQuery plugin | |
// | |
// Usage Example: | |
// $(window).infiniteScroll({ url: window.location.href }) | |
(function($) { | |
$.scroller = { | |
// default settings | |
settings: { | |
url: null, |