This content from this markdown file has moved a new, happier home where it can serve more people. Please check it out : https://docs.microsoft.com/azure/azure-cache-for-redis/cache-best-practices.
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
| using System; | |
| using System.Diagnostics; | |
| namespace BinarySearchTree | |
| { | |
| class Node | |
| { | |
| public int value; | |
| public Node left; | |
| public Node right; |
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
| <?php | |
| require '../src/Instagram.php'; | |
| /////// CONFIG /////// | |
| $username = ''; | |
| $password = ''; | |
| $debug = false; | |
| $photo = ''; // path to the photo | |
| $caption = null; // caption | |
| ////////////////////// | |
| $i = new Instagram($username, $password, $debug); |
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
| public class CrossDomainHandler : DelegatingHandler | |
| { | |
| const string Origin = "Origin"; | |
| const string AccessControlRequestMethod = "Access-Control-Request-Method"; | |
| const string AccessControlRequestHeaders = "Access-Control-Request-Headers"; | |
| const string AccessControlAllowOrigin = "Access-Control-Allow-Origin"; | |
| const string AccessControlAllowMethods = "Access-Control-Allow-Methods"; | |
| const string AccessControlAllowHeaders = "Access-Control-Allow-Headers"; | |
| protected override Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, CancellationToken cancellationToken) |
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
| /** | |
| * Be sure to include library scripts in this order. Can be placed either | |
| * in the header or footer. | |
| */ | |
| <script src="//cdnjs.cloudflare.com/ajax/libs/jquery/2.1.0/jquery.min.js"></script> | |
| <script src="//cdnjs.cloudflare.com/ajax/libs/jquery-infinitescroll/2.0b2.120519/jquery.infinitescroll.min.js"></script> | |
| <script src="//cdnjs.cloudflare.com/ajax/libs/masonry/3.1.2/masonry.pkgd.js"></script> | |
| <script src="//cdnjs.cloudflare.com/ajax/libs/jquery.imagesloaded/3.0.4/jquery.imagesloaded.min.js"></script> |
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
| public enum Cacheability | |
| { | |
| NoCache, | |
| Private, | |
| Public, | |
| } |
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
| // Note: This is an improved version provided by @laurentmuller in the comments below. | |
| // removes all data attributes from a target element | |
| // example: removeDataAttributes('#user-list'); | |
| function removeDataAttributes(target) { | |
| var $target = $(target); | |
| // Loop through data attributes. | |
| $.each($target.data(), function (key) { | |
| // Because each key is in camelCase, |
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
| using System; | |
| using System.Collections.Generic; | |
| using System.Linq; | |
| using System.Text; | |
| using System.Web.Optimization; | |
| using Microsoft.Ajax.Utilities; | |
| namespace System.Web.Mvc | |
| { | |
| public static class OptimizationExtensions |
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
| var YourViewModel = function () { | |
| var self = this; | |
| self.thing = ko.observable(''); | |
| $.get('api/call', function (data) { | |
| self.thing(data); | |
| // thing is loaded, | |
| self.loaded.thing(true); |
NewerOlder