View program.cs
using System; | |
namespace comparingNullables | |
{ | |
public class Program | |
{ | |
private int? nullableInt = default; | |
private int nonNullableInt = 7; | |
private bool? nullableBool = default; | |
// default for bools is false, so let's use a value which |
View startup.cs
public void ConfigureServices(IServiceCollection services) | |
{ | |
services.AddCors(options => | |
{ | |
options.AddPolicy("nameOfPolicyHere", builder => | |
{ | |
builder.WithOrigins("array of strings", "representing origins"); | |
// headers can be complext to start with, so I would start with | |
//builder.AllowAnyHeader(); | |
// just to get it working first, then reduce the number of headers |
View avconv-bash-script.sh
# assumes that all subtitles have been removed | |
# and only one audio stream (and it is located at 0:1) | |
# TODO: add support for all subtitle and audio tracks | |
for file in *.mkv | |
do | |
# extract and convert audio | |
echo Extracting audio from "$file" | |
avconv -i "$file" -map 0:1 -c:a aac -b:a 160k -strict experimental audio_$(basename "$file" .mkv).m4a |
View SmsFixer.cs
using System; | |
using System.Collections.Generic; | |
using System.IO; | |
using System.Linq; | |
using System.Xml.Serialization; | |
namespace SmsFixer | |
{ | |
static class Program | |
{ |
View CV.tex
%%% LaTeX Template: Curriculum Vitae | |
%%% | |
%%% Source: http://www.howtotex.com/ | |
%%% Feel free to distribute this template, but please keep the referal to HowToTeX.com. | |
%%% Date: July 2011 | |
%%% Edited by Jamie Taylor (http://gaprogman.com) | |
%%% Added a definition for a "hobbies" section | |
%%% Added pdfinfo call to add metadata to outputted PDF | |
%%% Date April 2015 |
View JavaScriptPlayground
/* Invoking functions via parameters to other functions */ | |
var work = function() { | |
console.log("this is being invoked"); | |
}; | |
var doWork = function(f) { | |
console.log("invoking work"); | |
try { | |
f(); | |
} catch (ex) { |
View EqualsOverloading.cs
using System; | |
namespace ScratchPad | |
{ | |
public class Foo | |
{ | |
private string _name; | |
private string _title; | |
private string _address; | |
private bool _contacted; |
View BigDipper.cpp
/* | |
* Project Name: BigDipper | |
* Solution Name: BigDipper | |
* Original creation date: 24/03/2008 | |
* Edit date: 19/01/2013 | |
* Programmer name: Jamie Taylor (aka "GaProgMan") | |
* File name: VBigDipper.cpp | |
* | |
* Purpose of the project: | |
* My favourite constellation is the Big Dipper. So |
View Parents.pl
/* | |
* Project Name: Parents | |
* Solution Name: Parents | |
* Original creation date: 01/10/2006 | |
* Edit date: 11/10/2013 | |
* Programmer name: Jamie Taylor (aka "GaProgMan") | |
* File name: parents.pl | |
* | |
* Purpose of the project: | |
* This project was undertaken as coursework in class |
View yuv.c
/* | |
* Project Name: RGB to Y'UV | |
* Solution Name: RGB to Y'UV | |
* Original creation date: 19/11/2011 | |
* Edit date: 18/01/2013 | |
* Programmer name: Jamie Taylor (aka "GaProgMan") | |
* File name: YUV.c | |
* | |
* Purpose of the project: | |
* I was reading through a wikipedia article on |
NewerOlder