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 FactualPlaceResponseContainer | |
{ | |
public string Status { get; set; } | |
public FactualPlaceResponse Response { get; set; } | |
} | |
public class FactualPlaceResponse | |
{ | |
[JsonProperty("included_rows")] | |
public int IncludedRows { get; set; } |
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
const string placeQuery = "http://api.v3.factual.com/t/places?geo={\"$point\":[38.544401,-121.742229]}"; | |
using (var client = new HttpClient()) | |
{ | |
var header = OAuthUtil.GenerateHeader(new Uri(placeQuery), "KEY", | |
"SECRET", null, null, "GET"); | |
client.DefaultRequestHeaders.Add("Authorization", header); | |
var res = client.GetAsync(placeQuery).Result; | |
res.EnsureSuccessStatusCode(); |
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
const string placeQuery = "http://api.v3.factual.com/t/places?geo={\"$point\":[38.544401,-121.742229]}"; | |
using (var client = new HttpClient()) | |
{ | |
var header = Xamarin.Auth.OAuth1.GetAuthorizationHeader ("GET", new Uri ("http://api.v3.factual.com/t/places"), new Dictionary<string,string> { {"geo","{\"$point\":[38.544401,-121.742229]}"} }, | |
"key", "secret", string.Empty, string.Empty); | |
client.DefaultRequestHeaders.Add("Authorization", header); | |
var res = client.GetAsync(placeQuery).Result; | |
// res.EnsureSuccessStatusCode(); |
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
select * from Gifts where Status = 'Completed' and StatusLevel = 10 --if any results we are on old scheme | |
update Gifts set StatusLevel = StatusLevel + 1 where StatusLevel > 5 --move all gifts financial review or higher up a level | |
update Gifts set StatusLevel = StatusLevel + 2 where StatusLevel = 5 --move from financial hold to financial review |
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 alertController = UIAlertController.Create (null, null, UIAlertControllerStyle.Alert); | |
alertController.AddAction (UIAlertAction.Create ("Cancel", UIAlertActionStyle.Cancel, null)); | |
alertController.AddAction (UIAlertAction.Create ("Take photo", UIAlertActionStyle.Default, null)); | |
alertController.AddAction (UIAlertAction.Create ("Take photo", UIAlertActionStyle.Default, null)); | |
this.PresentViewController (alertController, true, null); |
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 completed = RepositoryFactory.GiftRepository.Queryable.Where(x => x.IsCompleted).ToArray(); | |
var trans = await | |
_givingFinancialService.GetKfsAccountDetails( | |
completed.Select(c => new KfsAccountQueryParams {KfsKey = c.KfsKey}).ToArray()); | |
var grouped = trans.GroupBy(t => t.KfsKey).Select(t => new {t.Key, total = t.Sum(x => x.Amount)}); | |
var joined = from c in completed | |
join g in grouped on c.KfsKey equals g.Key |
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
// Load HTML file | |
var pdfDocument = new Document(stream, options); | |
//pdfDocument.FitWindow = true; | |
Font myFont = FontRepository.OpenFont(HttpContext.Current.Server.MapPath("~/fonts/ocraextended.ttf")); | |
//Font myFont = FontRepository.OpenFont(".\\fonts\\ocraextended.ttf"); | |
myFont.IsEmbedded = true; | |
//create text stamp | |
TextStamp textStamp = new TextStamp("0123456789000100000123456789"); |
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
git branch --merged | ?{-not ($_ -like "*master")} | %{git branch -d $_.trim()} |
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
(•_•) | |
( •_•)>⌐■-■ | |
(⌐■_■) |
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
{ | |
"extends": "airbnb", | |
"plugins": [ | |
"react" | |
], | |
"env": { | |
"es6": true, | |
"jasmine": true, | |
}, | |
"rules": { |