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 CacheService : ICache | |
{ | |
private readonly string _keyPrefix; | |
private readonly IDistributedCache _cache; | |
private readonly IConfiguration _config; | |
public CacheService(IDistributedCache cache, IConfiguration config) | |
{ | |
_cache = cache; | |
_config = config; |
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
// First Register the Tab by hooking into the 'woocommerce_product_data_tabs' filter | |
add_filter( 'woocommerce_product_data_tabs', 'add_my_custom_product_data_tab' ); | |
function add_my_custom_product_data_tab( $product_data_tabs ) { | |
$product_data_tabs['my-custom-tab'] = array( | |
'label' => __( 'My Custom Tab', 'my_text_domain' ), | |
'target' => 'my_custom_product_data', | |
); | |
return $product_data_tabs; | |
} |
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() { | |
var JQ = jQuery("iframe").contents(); | |
var queue = []; | |
var last_processed = (new Date()).getTime(); | |
var loading = true; | |
var my_name = null; | |
var mouse = function(which, element) { | |
var evt = element.ownerDocument.createEvent('MouseEvents'); |
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
// Register MediatR Pipeline Behaviors | |
services.AddTransient(typeof(IPipelineBehavior<,>), typeof(LoggingBehavior<,>)); | |
services.AddTransient(typeof(IPipelineBehavior<,>), typeof(ValidationBehavior<,>)); | |
services.AddTransient(typeof(IPipelineBehavior<,>), typeof(CachingBehavior<,>)); | |
services.AddTransient(typeof(IPipelineBehavior<,>), typeof(FallbackBehavior<,>)); | |
services.AddTransient(typeof(IPipelineBehavior<,>), typeof(RetryBehavior<,>)); | |
// ICachePolicy discovery and registration | |
services.Scan(scan => scan | |
.FromAssemblies(assembly) |
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 Handler : IRequestHandler<Query, Customer>, IFallbackHandler<Query, Customer> | |
{ | |
private readonly ICustomerRepository _db; | |
private readonly ICustomerRepository<SourceSystem.Secondary> _db2; | |
private readonly IConfigurationProvider _configuration; | |
public Handler(ICustomerRepository db, ICustomerRepository<SourceSystem.Secondary> db2, IConfigurationProvider configuration) | |
{ | |
_db = db; | |
_db2 = db2; |
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 Handler : IRequestHandler<Query, Customer>, IRetryableRequest<Query, Customer> | |
{ | |
private readonly CustomerContext _db; | |
private readonly IConfigurationProvider _configuration; | |
// By implementing IRetryableRequest<TRequest, TResponse> I get the following | |
// properties to control how my "Handle" method will get retried. | |
public int RetryAttempts => 2; | |
public int RetryDelay => 500; | |
public bool RetryWithExponentialBackoff => 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
<script> | |
var WallpaperAd = WallpaperAd || {}; | |
/*-------------------------------------------------------------------------------------------------------*/ | |
/* Two values are needed for Wallpaper Ads: */ | |
/* 1.) destinationURL (where you want visitors to go when they click the wallpaper) */ | |
/* - NOTE: Click-throughs to this URL will automatically be tracked in DFP */ | |
/* 2.) backgroundURL (URL of wallpaper background image) */ | |
/* - NOTE: Make sure to change the URL to start with | |
http://assets.dmagazine.com so that it is served via CloudFlare CDN (this makes pages and images load faster) */ |
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
<template> | |
<loading-view :loading="initialLoading" :dusk="resourceName + '-index-component'"> | |
<custom-index-header v-if="!viaResource" class="mb-3" :resource-name="resourceName" /> | |
<div v-if="shouldShowCards"> | |
<cards | |
v-if="smallCards.length > 0" | |
:cards="smallCards" | |
class="mb-3" | |
:resource-name="resourceName" |
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
<script> | |
var DmagInterstitialAd = DmagInterstitialAd || {}; | |
DmagInterstitialAd.showInterstitial = true; | |
DmagInterstitialAd.adWidth = 720; | |
DmagInterstitialAd.adHeight = 480; | |
DmagInterstitialAd.destinationURL = "http://ad.doubleclick.net/ddm/trackclk/N5716.759086CENTRO.NET/B8239828.110882020;dc_trk_aid=283955045;dc_trk_cid=59150503"; | |
DmagInterstitialAd.embedCode = '<img src="http://ad.doubleclick.net/ddm/trackimp/N5716.759086CENTRO.NET/B8239828.110882020;dc_trk_aid=283955045;dc_trk_cid=59150503;ord=[timestamp]?" border="0" height="1" width="1" alt="Advertisement">'; | |
/*-------------------------------------------------------------------------------------------------------*/ | |
/* DO NOT MODIFY CODE BELOW */ |
NewerOlder