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 http = require('http') | |
var fs = require('fs') | |
var argv = require('optimist').argv | |
var rxVideoID = /v=([\]\[!"#$%'()*+,.\/:;<=>?@\^_`{|}~-\w]*)/ | |
var link = argv._.toString() | |
var videoID = link.match(rxVideoID)[1] | |
http.get("http://www.youtube.com/get_video_info?video_id="+videoID, function(res) { | |
var chunks = [] |
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
% mutter_von( Mutter , Kind ). | |
% 'Mutter' und 'Kind' sind Argumentpositionen, | |
% so da"s 'Mutter' die Mutter von 'Kind' ist. | |
:- dynamic mutter_von/2, vater_von/2. % ermoeglicht dynamische Veraenderung | |
%:- multifile mutter_von/2, vater_von/2. % ermoeglicht verteilte Definition in mehreren Files | |
mutter_von( marie , hans ). | |
mutter_von( marie , helga ). | |
mutter_von( julia , otto ). |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
MASTER THEOREM | |
If T(n) = a*T(ceil(n/b)) + O(n^d) for some a > 0, b > 1, d ≥ 0, | |
Then T(n) = { O(n^d) if d > log_b(a), | |
{ O(n^d log n) if d = log_b(a), | |
{ O(n^log_b(a)) if d < log_b(a). | |
ARRAY | |
DOUBLY LINKED LIST | |
insert O(1), delete O(1), get O(n), deleteFromTo O(1), insertList O(1) | |
SINGLY LINKED LIST |
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
# This script needs a csv NEI Item Panel Dump. | |
# To get one make sure your search field is empty and go to | |
# the NEI Options > Tools > Item Panel. Make sure the left button is on CSV and click dump. | |
# Drop this script in the same directory as the generated itempanel.csv and run it. | |
# (Tested with Python 3.4) | |
# Move the InvTweaksTree.txt to your config directory. | |
import csv | |
def normalize(name): |
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
function matrix(name, a,b,c, d,e,f, g,h,i){ | |
name[1,1] = a | |
name[1,2] = b | |
name[1,3] = c | |
name[2,1] = d | |
name[2,2] = e | |
name[2,3] = f | |
name[3,1] = g | |
name[3,2] = h | |
name[3,3] = i |
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
#!/bin/bash | |
if ! (pactl list short sources | grep virt); then | |
pactl load-module module-remap-source source_properties="device.description=virt" source_name=virt channel_map=mono channels=1 | |
fi | |
trap "pactl unload-module module-remap-source" SIGINT | |
pactl set-default-source virt |