In Zeus hangt exact de sfeer die ik zocht in een opleiding informatica: computers zijn cool en JavaScript is stom. Nee maar dan nu serieus, het is een fantastische groep en ik wil allereerst zoveel als ik kan bijdragen tot de toekomst van Zeus.
This file contains hidden or 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
height = int(input(">")) | |
width = int(input(">")) | |
class Ball(): | |
def __init__(self, field): | |
self.x = 0 | |
self.y = 0 | |
self.cur_vect = [1, 1] | |
self.field = field |
This file contains hidden or 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
def lvs(s): | |
count = 0 | |
if len(s) % 2: | |
count = 1 | |
for i in range(count, len(s), 2): | |
half = (len(s) - i) // 2 | |
if s[i:half + i] == s[half + i:len(s)]: | |
return len(s[i:half + i]) | |
return 0 |
This file contains hidden or 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
from typing import Dict, Set | |
def familieleden(path: str) -> Dict[str, Dict]: | |
famlist = [] | |
rslt = {} | |
with open(path) as file: | |
for line in file: | |
famlist.append(line.split()) |
This file contains hidden or 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 compare = (a, b) => { | |
return a.x === b.x && a.y === b.y; | |
}; | |
const distance = (a, b) => { | |
return Math.sqrt((a.x - b.x) ** 2 + (a.y - b.y) ** 2); | |
}; | |
const draaien = (a, b, c) => { |
This file contains hidden or 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
'use strict'; | |
class Kaart { | |
constructor(shape, color, number) { | |
this.vorm = shape; | |
this.kleur = color; | |
this.getal = number; | |
if (!Kaart.checkParams(shape, color, number)) { |
This file contains hidden or 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
class Quixo { | |
constructor(size, init = '') { | |
this.alpha = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"; | |
this.size = size; | |
this.grid = []; | |
for (let i = 0; i < size; i += 1) { |
This file contains hidden or 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
/* Save this file with a jsx extension and place in your | |
Illustrator/Presets/en_US/Scripts folder. You can then | |
access it from the File > Scripts menu */ | |
var decimalPlaces = 3; | |
if (app.documents.length > 0) { | |
if (app.activeDocument.selection.length < 1) { | |
alert('Select a path'); |
This file contains hidden or 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
// ==UserScript== | |
// @name dont open spotify-links in new tab | |
// @namespace http://tampermonkey.net/ | |
// @version 0.2 | |
// @description fix the spotify integration in rateyourmusic by removing the target=_blank attrs from the spotify links. | |
// @author abeforgit | |
// @match https://*.rateyourmusic.com/* | |
// @icon https://www.google.com/s2/favicons?sz=64&domain=rateyourmusic.com | |
// @run-at document-end | |
// @grant none |
Typing Slovene on a non-slovenian keyboard can be a bit of a pain. Most keyboard layouts are missing buttons for the č, š and ž letters! This guide describes what I found to be the best solution: WinCompose
Important
This only works on windows, unfortunately. For MacOS, I left some notes HERE