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
config.BucketConfigs = new Dictionary<string, BucketConfiguration> { | |
{ | |
"travel-sample", new BucketConfiguration | |
{ | |
UseEnhancedDurability = 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
private static void AtPlusExample() | |
{ | |
Console.WriteLine("========= AtPlus"); | |
// get the current count | |
var result1 = _bucket.Query<dynamic>("SELECT COUNT(1) as airportCount FROM `travel-sample` WHERE type='airport'") | |
.Rows.First(); | |
Console.WriteLine($"Initial count: {result1.airportCount}"); | |
// insert a new airport |
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
private static void RequestPlusExample() | |
{ | |
Console.WriteLine("========= RequestPlus"); | |
// get the current count | |
var result1 = | |
_bucket.Query<dynamic>("SELECT COUNT(1) as airportCount FROM `travel-sample` WHERE type='airport'") | |
.Rows.First(); | |
Console.WriteLine($"Initial count: {result1.airportCount}"); |
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
private static void NotBoundedExample() | |
{ | |
Console.WriteLine("========= NonBounded (default)"); | |
// get the current count | |
var result1 = | |
_bucket.Query<dynamic>("SELECT COUNT(1) as airportCount FROM `travel-sample` WHERE type='airport'") | |
.Rows.First(); | |
Console.WriteLine($"Initial count: {result1.airportCount}"); | |
// insert a new airport |
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.Data.SQLite; | |
using System.Linq; | |
using System.Transactions; | |
using Dapper; | |
using LinkCrawler.Models; | |
namespace LinkCrawler.Utils.Outputs | |
{ | |
public class SqliteOutput : IOutput |
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
$(document).ready(function () { | |
var commentDiv = $("#latestComments"); | |
if (!commentDiv || commentDiv.length <= 0) | |
return; | |
var url = "https://disqus.com/api/3.0/forums/listPosts.json?forum=[your forum name]&limit=10&related=thread&order=desc&api_key=[put your own API key here]"; | |
$.get(url, function (res, code) { | |
var html = ""; |
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
@model List<CommentViewModel> | |
@{ | |
Layout = null; | |
} | |
<?xml version="1.0" encoding="UTF-8" ?> | |
<rss version="2.0" | |
xmlns:content="http://purl.org/rss/1.0/modules/content/" | |
xmlns:dsq="http://www.disqus.com/" | |
xmlns:dc="http://purl.org/dc/elements/1.1/" |
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 replaceASingleCharacter(str, singleCharacter, replaceWith) { | |
// put regex replace here | |
// something like return str.replace(/blahblahregex/,replaceWith); | |
} | |
var result1 = replaceASingleCharacter("This X should be replaced","X","Y"); | |
if(result1 != "This Y should be replaced") { | |
console.log("fail 1"); | |
} |
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 Android.Content; | |
using Newtonsoft.Json; | |
namespace LBMobileX | |
{ | |
public static class IntentExtensions | |
{ | |
/// <summary> | |
/// Serializes an object into the intent |
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
<html> | |
<head> | |
<link rel="stylesheet" type="text/css" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1/themes/flick/jquery-ui.css"> | |
<link href="jquery.tagit.css" rel="stylesheet" type="text/css"> | |
</head> | |
<body> | |
<p>This geotag demo uses the <strong>jQuery tag-it</strong> control and <strong>Google's AutocompleteService API</strong>.</p> |