A little walkthrough to setup a new apache virtual host with an HTTPS certificate on Ubuntu.
sudo apt-get update
using System; | |
using System.Net.Http; | |
using System.Net.Http.Headers; | |
using System.Text.Json; | |
using System.Text.Json.Serialization; | |
namespace JokesAPI | |
{ | |
public class DadJokeService | |
{ |
public class FiboGenerator implements Iterable<BigInteger>, Iterator<BigInteger> { | |
BigInteger avantDernier = BigInteger.ZERO; | |
BigInteger avantAvantDernier = BigInteger.ONE ; | |
@Override | |
public Iterator<BigInteger> iterator() { | |
return this; | |
} |
public class Repository<T> where T : class | |
{ | |
private DbSet<T> m_dbset; | |
private BaremoContext m_context; | |
public Repository(DbSet<T> dbset, BaremoContext context) | |
{ | |
m_dbset = dbset; | |
m_context = context; | |
} |
# https://gis.stackexchange.com/questions/31628/find-points-within-a-distance-using-mysql | |
SET @lat = 45.536264; | |
SET @long = -73.493025; | |
SELECT | |
id, name, ( | |
6371 * acos ( | |
cos ( radians(@lat) ) | |
* cos( radians( lat ) ) |
using System; | |
using System.Text; | |
namespace System.Security.Cryptography; | |
{ | |
public static class SHA | |
{ | |
public static string sha256(string inputString) | |
{ | |
SHA256 sha256 = SHA256.Create(); | |
byte[] bytes = Encoding.UTF8.GetBytes(inputString); |
using System.Collections.Generic; | |
namespace ChartJs.Models | |
{ | |
public class Chart | |
{ | |
public string[] labels { get; set; } | |
public List<Datasets> datasets { get; set; } | |
public static Chart CreateLineChart(string datasetName, string[] labels, int[] values) |
export {}; | |
declare global { | |
interface String { | |
isNotEmpty(): boolean; | |
} | |
} | |
String.prototype.isNotEmpty = function () { | |
return (this.trim() !== ''); |
Tested on a standard $5/mo DigitalOcean VPS running Ubuntu 16.04.