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 Epoch | |
{ | |
public class Epoch | |
{ | |
static readonly DateTime epochStart = new DateTime(1970, 1, 1, 0, 0, 0); | |
static readonly DateTimeOffset epochDateTimeOffset = new DateTimeOffset(1970, 1, 1, 0, 0, 0, TimeSpan.Zero); | |
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
import Converters._ | |
object Puzzle06 extends Runnable { | |
def find(line: String, count: Int): Int = { | |
val result = line.sliding(count).zipWithIndex.find { case (e, i) => | |
e.toSet.size == count | |
} getOrElse { | |
??? | |
} |
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
uuid: main.zig | |
zig build-exe --strip --single-threaded main.zig | |
mv main uuid | |
run: uuid | |
./uuid |
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; | |
public static class Main | |
{ | |
public static void Main(string[] args) | |
{ | |
Console.WriteLine("Hello World"); | |
} | |
} |
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; | |
using System.Collections; | |
using System.Collections.Generic; | |
namespace System | |
{ | |
public class BitArraySegment : IEnumerable<bool> | |
{ | |
public BitArrayWrapper Array { get; private set; } | |
public int Offset { get; private set; } |
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
public class Main | |
{ | |
public static void Main(string[] args) | |
{ | |
Console.WriteLine("Hello World"); | |
} | |
} |
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; | |
using System.Collections.Generic; | |
public class MainClass | |
{ | |
public static IEnumerable<string> Actions() | |
{ | |
try { | |
yield return "try"; | |
} catch (Exception) { |
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
main.exe: main.cs | |
mcs /unsafe main.cs |
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 <stdio.h> | |
#include <stdlib.h> | |
#include <unistd.h> | |
#include <assert.h> | |
#include <pthread.h> | |
#include <fcntl.h> | |
#include <sys/types.h> | |
#include <sys/stat.h> | |
#include <linux/unistd.h> |
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 <linux/module.h> | |
#include <linux/kernel.h> | |
#include <linux/netfilter_ipv4.h> | |
#include <linux/skbuff.h> | |
#include <linux/udp.h> | |
#include <linux/ip.h> | |
/* This function to be called by hook. */ | |
static unsigned int | |
hook_func(unsigned int hooknum, |
NewerOlder