Skip to content

Instantly share code, notes, and snippets.

View brendanmckenzie's full-sized avatar

Brendan McKenzie brendanmckenzie

View GitHub Profile
class VenueDetailViewModel : MvvmModel
{
string _proprietor;
public string Proprietor { get { return _proprietor; } set { _proprietor = value; OnPropertyChanged(nameof(Proprietor)); } }
public string BusinessName { get; set; }
}
using System;
using Npgsql;
namespace ConsoleApplication
{
public class Program
{
public static void Main(string[] args)
{
Console.WriteLine("Connecting to db...");
using System;
using System.Collections.Generic;
using System.Linq;
namespace Advent
{
public static class Program
{
#region Public Methods
public class ResourceUtilTests
{
#region Public Methods
[Fact]
public void Get_ExistingResource_ReturnsContents()
{
// Arrange
const string ResourceName = "Resources.ExampleResource.txt";
public static class NpgsqlConnectionExtensions
{
public static void ExecuteFromResource(this NpgsqlConnection connection, string resourceName, object parameters = null)
{
var sql = ResourceUtil.Get<NpgsqlContentTreeProvider>($"Sql/{resourceName}.sql");
connection.Execute(sql, parameters);
}
public static IEnumerable<T> QueryFromResource<T>(this NpgsqlConnection connection, string resourceName, object parameters = null)
function timeoutSleep(milliseconds, callbackFunction) {
window.setTimeout(
function () {
callbackFunction();
}, milliseconds);
}
using System;
using System.Dynamic;
using System.Collections.Generic;
namespace Kasbah.Core
{
public struct Action
{
public string Type { get; set; }
for (i = 0; i<filterList.length; i++) {
if (i === 0) {
s = filterList[i];
}
else if (i === filterList.length - 1) {
s = s + " and " + filterList[i];
}
else {
s = s + ", " + filterList[i];
}
user (
id,
created
)
group (
id
)
group_user (
from takeoffgo import app
from takeoffgo.model import Session
@app.before_request
def before_request():
g.db = Session()
@app.teardown_request