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.Xml; | |
using System.Xml.XPath; | |
using System.Text.RegularExpressions; | |
using System.IO; | |
namespace XmlDiffLib |
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
/// <summary> | |
/// Enumerates "all" public properties in an object graph. All is used loosely as this | |
/// may miss some older public property types that aren't enumerable (.Net v1 maybe). | |
/// CAUTION: Do not use on object graphs with cycles, as it will cause infinite reucrsion. | |
/// Additionally, this can be a VERY expensive call if used on a large object graph. | |
/// Ensure your use case can sustain the time-cost implications. | |
/// </summary> | |
/// <param name="obj">Object to traverse</param> | |
/// <returns>Enumerable set of properties</returns> | |
private static IEnumerable<Tuple<object, PropertyInfo>> GetWiredProperties(object obj) |
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
/// <summary> | |
/// This class caches data involved in rating. It uses a Guid as a key | |
/// to the cached Rate Data. Most methods involve manipulating the cached Rate Data, | |
/// not the cache itself. This is useful in Rate Modules that need to reference | |
/// data from previous rates by the same user (i.e. Multiple Programs with Single Request). | |
/// </summary> | |
public class RateCache | |
{ | |
#region Public Properties | |
/// <summary> |
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
CREATE OR REPLACE FUNCTION nfl_ffps(_season_year int, _season_type season_phase) | |
RETURNS table("name" varchar, "position" text, ffps double precision) AS $$ | |
BEGIN | |
RETURN QUERY | |
-- points come from my yahoo fantasy league, but can be applied arbitrarily for other leagues | |
WITH kicker_ffps AS ( | |
SELECT | |
play_player.player_id as player_id, | |
play_player.kicking_xpmade as kicking_xpmade, | |
( |
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 static void CopyTo(Stream src, Stream dest) | |
{ | |
byte[] bytes = new byte[4096]; | |
int cnt; | |
while ((cnt = src.Read(bytes, 0, bytes.Length)) != 0) | |
{ | |
dest.Write(bytes, 0, cnt); | |
} | |
} |
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
// this is only a marker for resolving the TransactionalQueryManager | |
public interface ITransactionRepository | |
{ | |
} | |
public class ProductRepository : IProductRepository, ITransactionRepository | |
{ | |
} |
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
<?xml version="1.0" encoding="utf-8" ?> | |
<root> | |
<players> | |
<player name="Pam" > | |
<tile terrain="B" cost="1" /> | |
<tile terrain="Z" cost="2" /> | |
<tile terrain="N" cost="2" /> | |
<tile terrain="M" cost="2" /> | |
<tile terrain="P" cost="5" /> | |
</player> |
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
open FSharp.Data | |
type Pizza = JsonProvider<"pizzas.json"> | |
type ToppingFrequencyPair = { Toppings: string[]; Frequency: int } | |
let getToppingFrequencyPair grouping = | |
{ Toppings = fst grouping; Frequency = snd grouping |> Array.length } | |
[<EntryPoint>] |
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
stage('QA Deployment') { | |
environment { | |
AWS_ACCESS_KEY_ID = credentials('Dev_Access') | |
AWS_SECRET_ACCESS_KEY = credentials('Dev_Secret') | |
} | |
when { | |
beforeAgent true | |
branch 'develop' | |
} | |
options { |
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
import { safeLoad } from 'js-yaml'; | |
import { readFileSync } from 'fs'; | |
import { getOutputValues, EnvironmentProps } from './infrastructure/environments'; | |
import { LoadBalancerServiceProps, Route53Stack } from './infrastructure/route53'; | |
import { App } from '@aws-cdk/core'; | |
type FargateConfig = { | |
environments: EnvironmentProps[]; | |
} |
OlderNewer