This file contains 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
#include <array> | |
#include <cstddef> | |
#include <stack> | |
template <typename T, size_t SIZE> | |
class CarPark | |
{ | |
public: | |
CarPark() |
This file contains 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
using System; | |
namespace Test | |
{ | |
class RepeatingDecimalLength | |
{ | |
// Solves the discrete logarithm problem in O(n^3). See https://arxiv.org/ftp/arxiv/papers/0912/0912.2269.pdf | |
// Returns k that solves for x^k = y (mod p) | |
public static UInt64 DiscreteLogarithm(UInt64 x, UInt64 y, UInt64 p) | |
{ |
This file contains 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
#pragma once | |
#include <functional> | |
struct fold_base | |
{ | |
template <typename T> | |
static T fold(T arg) | |
{ | |
return arg; |
This file contains 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 builder = WebApplication.CreateBuilder(args); | |
// Add services to the container. | |
builder.Services.AddEndpointsApiExplorer(); | |
builder.Services.AddSwaggerGen(); | |
var app = builder.Build(); | |
// Configure the HTTP request pipeline. | |
if (app.Environment.IsDevelopment()) |
This file contains 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
using System.Net; | |
using System.Text.RegularExpressions; | |
while (true) | |
{ | |
Console.WriteLine("scraping"); | |
using WebClient client = new(); | |
var url = @$"https://secure.runescape.com/m=forum/forums?320,321,123,65921801,goto,9999"; | |
string html = client.DownloadString(url); |