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 [ "$(pidof firefox)" ] | |
then | |
echo Please close all instance of firefox to unlock the database >&2 | |
exit 1 | |
else | |
echo Database optimization begin ... | |
echo ------------------------------- | |
time for i in `find ~/.mozilla -name \*.sqlite` |
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 code generate the function start, stop, restart | |
# which you can use to control your deamons like alsa, hal ... | |
# To use it, put it in your .zshrc. | |
# Example |
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
cmake_minimum_required(VERSION 2.8) | |
project(LuaPulse) | |
include(FindPkgConfig) | |
set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake") | |
find_package(Luabind REQUIRED) | |
find_package(Lua51 REQUIRED) | |
find_package(Boost COMPONENTS system REQUIRED) |
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 <stdlib.h> | |
#include <stdio.h> | |
typedef struct _IntList { | |
int current; | |
struct _IntList *next; | |
} IntList; | |
void Insert(IntList *l, int n) { | |
if (l == NULL) return; |
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
\subsubsection{Beispielklasse: Binäre Relation als Netzwerke} | |
\paragraph{Def:} Eine binäre Relation ist erklärt als Paar $M:=(M,R)$ | |
mit M und R sind Mengen und es ist $R\subseteqq MxM$, d.h R ist | |
``binäre Relation auf M''. | |
Sei $GM := (M,R,\sigma,\tau)$ mit $\sigma : E \rightarrow V, (p,q) | |
\mapsto p$ und $\tau : E \rightarrow V, (p,q) \mapsto q$ | |
GM heiße den zu M gehörige Netzwerke bzw. ``M=(M,R) als Netzwerke'' |
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/ruby | |
class Node | |
attr_accessor :right, :middle, :left | |
attr_accessor :first_val, :second_val | |
def assign(first_val, second_val) | |
@first_val = first_val | |
@second_val= second_val | |
end | |
def neighbors(right, middle, left) |
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
Aufgabe a) | |
1) Münze 200 wird 12mal gedreht! | |
da Primzahlzerlegung 200=2^3*5^2 | |
da |{2^0, 2^1, 2^2, 2^3}| * |{5^0, 5^1, 5^2}| | |
= 4 * 3 = 12 | |
2) Folgende Münzen werden auch 12mal gedreht: | |
60: [2, 2, 3, 5] | |
72: [2, 2, 2, 3, 3] | |
84: [2, 2, 3, 7] | |
90: [2, 3, 3, 5] |
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/env ruby | |
require 'rubygems' | |
require 'nokogiri' | |
require 'open-uri' | |
def scrape(country) | |
doc = Nokogiri::HTML(open("http://www.surfmusik.de/land/#{country}.html")) | |
radio_links = doc.css("td.home1 a.navil") |
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/env python | |
err = "Foobar" | |
try: | |
print("Still the same %s" % err) | |
1/0 | |
except ZeroDivisionError as err: | |
print("Got error: %s" % err) | |
try: | |
print("In python 2 err is overwritten %s " % err) | |
except NameError: |
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
diff -r 8590b10b692f clients_icons/clients_icons.py | |
--- a/clients_icons/clients_icons.py Wed Jan 11 23:04:49 2012 +0400 | |
+++ b/clients_icons/clients_icons.py Sun Feb 26 16:20:28 2012 +0100 | |
@@ -162,16 +162,17 @@ class ClientsIconsPlugin(GajimPlugin): | |
'show_unknown_icon': (True, ''), | |
'pos_in_list': (0, ''), | |
'show_facebook': (True, '') } | |
self.config_dialog = ClientsIconsPluginConfigDialog(self) | |
icon_path = os.path.join(self.local_file_path('icons'), 'unknown.png') |
OlderNewer