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
""" | |
We split the maze into sevent walkable regions, denoting | |
the exits with 'b' for blue and 'r' for red in the following | |
figure. | |
..................... | |
.22222r3333333333b33. | |
.bb.bb.rr.....33..33. | |
.11r66b444444r333333. |
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 <iostream> | |
#include <string> | |
#include <vector> | |
#include <algorithm> | |
using namespace std; | |
/** | |
* Auto-generated code below aims at helping you parse | |
* the standard input according to the problem statement. |
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; | |
using System.Linq; | |
using System.Runtime.InteropServices; | |
using System.Text; | |
using System.Threading.Tasks; | |
namespace Picasso | |
{ | |
class Program |
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
package gdx.scala.demo | |
import java.util.Comparator | |
import com.badlogic.ashley.core.{Component, ComponentMapper, Entity, Family} | |
import com.badlogic.ashley.systems.SortedIteratingSystem | |
import gdx.scala.demo.components.PositionComponent | |
class RenderingSystem() extends |
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 RenderingSystem extends SortedIteratingSystem { | |
private ComponentMapper<RenderableComponent> rm; | |
private ComponentMapper<PositionComponent> pm; | |
public RenderingSystem() { | |
super(Family.all(RenderableComponent.class, PositionComponent.class).get(), new ZComparator()); | |
rm = ComponentMapper.getFor(RenderableComponent.class); | |
pm = ComponentMapper.getFor(PositionComponent.class); | |
} |
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
#!/usr/bin/bash | |
echo "Spellchecking $1" | |
tr -s '[[:punct:]][:space:]]' '\n' < $1 | sort | uniq | \ | |
aspell pipe --encoding utf-8 --lang=sv | sort | uniq | cut -d ' ' -f 2 | sort | uniq | \ | |
aspell pipe --encoding utf-8 --lang=en | sort | uniq | cut -d ' ' -f 2 | |
echo "Spellchecked $1" |
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 spinner = new Action<int, string>((ms, name) => | |
{ | |
var start = DateTime.Now; | |
while (true) | |
{ | |
var now = DateTime.Now; | |
if ((now - start).Milliseconds > ms) | |
{ | |
Console.WriteLine($"[{name}]"); | |
start = now; |
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
*filter | |
# Allow all outgoing, but drop incoming and forwarding packets by default | |
:INPUT DROP [0:0] | |
:FORWARD DROP [0:0] | |
:OUTPUT ACCEPT [0:0] | |
# Custom per-protocol chains | |
:UDP - [0:0] | |
:TCP - [0:0] | |
:ICMP - [0:0] |
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
startlab2; | |
whos; | |
% close all; | |
%% %%%%%%%%% 2.2 | |
% plot the theta function (t > t_0 = 1, t < t_0 = 0) | |
%figure;plot(t, theta); | |
% plot the DeltaDirac-function (t = t_0 ==> 1, else 0) |
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
namespace MailGenerator | |
module Generator = | |
open System.IO | |
open System.Text.RegularExpressions | |
open FSharp.Data | |
open FSharp.Data.JsonExtensions | |
type Template = string * string -> string | |
NewerOlder