In case you want to trigger an event on GitHub, you can create an empty commit:
$ git commit --allow-empty -m "Trigger event"
internal static class ExtensionMethods | |
{ | |
public static bool TryDequeue<T>(this Queue<T> queue, out T result) | |
{ | |
result = default; | |
if (queue == null || !queue.Any()) | |
{ | |
return false; | |
} | |
result = queue.Dequeue(); |
/* | |
* A Waveshare E-Paper controller via a simple web API | |
* | |
* This C++ program creates a simple HTTP server to control a Waveshare | |
* e-Paper display, like the 10.3inch e-Paper e-Ink Display HAT For | |
* Raspberry Pi at https://www.waveshare.com/10.3inch-e-Paper-HAT.htm | |
* which I am using. This program is meant to be run on the Pi that is | |
* connected to the e-Paper display. | |
* | |
* When run, this program creates a simple web server that serves a |
using System; | |
using System.Collections.Generic; | |
using System.Text; | |
namespace tests | |
{ | |
public static class ExtensionMethods | |
{ | |
/// <summary> | |
/// Returns the TimeSpan text in a concise way |
In case you want to trigger an event on GitHub, you can create an empty commit:
$ git commit --allow-empty -m "Trigger event"
# Pull ZIP code latitude/longitude coordinates from Geonames.org | |
# and write them out to a sharded flat-file database that makes | |
# it easy to efficiently query the database from the browser without | |
# any backend server. The Geonames database has a CC-BY license so | |
# credit must be given in the application. | |
# | |
# There are about 41,000 ZIP codes in the database, and with their | |
# lat/lng coordinate it's about 1MB of data, which a browser could | |
# load but it's kind of a lot of data for a browser to download and | |
# process. With state and place names, which might make for a nicer |
CREATE FUNCTION [Today]() RETURNS date AS BEGIN RETURN CONVERT(date, GETUTCDATE()) END; | |
GO | |
CREATE FUNCTION [Tomorrow]() RETURNS date AS BEGIN RETURN CONVERT(date, DATEADD(day, 1, GETUTCDATE())) END; | |
GO | |
CREATE FUNCTION [Yesterday]() RETURNS date AS BEGIN RETURN CONVERT(date, DATEADD(day, -1, GETUTCDATE())) END; | |
GO | |
CREATE FUNCTION [ThisMonthStart]() RETURNS date AS BEGIN RETURN CONVERT(date, DATEADD(day, 1-DATEPART(day, GETUTCDATE()), GETUTCDATE())) END; | |
GO | |
CREATE FUNCTION [ThisMonthEnd]() RETURNS date AS BEGIN RETURN CONVERT(date, DATEADD(day, -1, DATEADD(month, 1, DATEADD(day, 1-DATEPART(day, GETUTCDATE()), GETUTCDATE())))) END; | |
GO |
This is a comparison between Towel's CommandLine implementation and other similar command line parsers.
Here is an example of Towel's CommandLine:
using System;
using System.IO;
using static Towel.CommandLine;
namespace ConsoleApp
{
using System; | |
public class Program | |
{ | |
public static void Main() | |
{ | |
Console.WriteLine("hi mom"); | |
ConsoleHelper.DoWith( | |
action: () => Console.WriteLine("hi mom"), |
using System; | |
using Oracle.ManagedDataAccess.Client; | |
using Polly; | |
namespace frontend.ExtensionMethods | |
{ | |
public static class Extensions | |
{ | |
const int retryTimes = 3; |