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 pprint | |
class CountryCoordinateParser: | |
def __init__(self, path): | |
self.path = path | |
def parse(self): | |
countries = self.__getCountryAndCoordinates() | |
for country in countries: | |
countries[country] = self.__coordinateToTupleList(countries[country]) |
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
const isPalindrome = s => { | |
if (s.length < 2) return true; | |
if (s[0] !== s[s.length - 1]) return false; | |
return isPalindrome(s.substr(1, s.length - 2)); | |
} | |
const testPalindrome = palindromeMethod => s => { | |
const result = palindromeMethod(s) ? "er et palindrom" : "er IKKE et palindrom"; | |
console.log(s, result); | |
} |
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
<!doctype html> | |
<html> | |
<head> | |
<meta charset="utf-8"/> | |
<title>Hej</title> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/rxjs/5.5.0/Rx.min.js"></script> | |
</head> | |
<body> | |
<input id="input" type="text"/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/> | |
<pre>Output 1: <span id="keystrokeOutput1"></span></pre> |
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.Text; | |
using System.Threading.Tasks; | |
namespace DistinctTest | |
{ | |
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
interface IGrowthInformation { | |
angleInDegrees: number; | |
growth: number; | |
} | |
interface ICoordinate { | |
x: number; | |
y: number; | |
} |
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.Linq; | |
namespace NumberFormatter | |
{ | |
class Program | |
{ | |
private static Formatter formatter = new Formatter(); | |
static void Main(string[] args) | |
{ |
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; | |
namespace NumberFormatter | |
{ | |
class Program | |
{ | |
private static Formatter formatter = new Formatter(); | |
static void Main(string[] args) |
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 os | |
import re | |
import hashlib | |
import urllib.request | |
class ImgurDownloader: | |
destinationFolder = 'D:\\imgur-downloads\\' | |
pattern = re.compile('<img alt="" src="//([^"]+)"') | |
def __init__(self, category): |
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 Palindrome | |
{ | |
class Program | |
{ | |
static void Main(string[] args) | |
{ | |
var palindromeChecker = new PalindromeCheckerImpl(); | |
Console.WriteLine(palindromeChecker.IsPalindrome("den laks skal ned")); | |
Console.WriteLine(palindromeChecker.IsPalindrome("den laks skal ikke ned")); | |
} |
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.Text; | |
using System.Threading.Tasks; | |
namespace MatrixMultiplying | |
{ | |
class Program | |
{ |
OlderNewer