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 XMonad | |
import System.Exit | |
import qualified XMonad.StackSet as W | |
import qualified Data.Map as M | |
import XMonad.Util.Run | |
import XMonad.Hooks.DynamicLog | |
import XMonad.Hooks.ManageDocks | |
import XMonad.Layout.NoBorders |
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 extract () { | |
if [ -f $1 ] ; then | |
case $1 in | |
*.tar.bz2) tar xvjf $1 ;; | |
*.tar.gz) tar xvzf $1 ;; | |
*.tar.xz) tar xvJf $1 ;; | |
*.bz2) bunzip2 $1 ;; | |
*.rar) unrar x $1 ;; | |
*.gz) gunzip $1 ;; | |
*.tar) tar xvf $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
!black | |
*color0 : #222222 | |
*color8 : #454545 | |
!red | |
*color1 : #F92672 | |
*color9 : #F92672 | |
!green | |
*color2 : #A6E22E | |
*color10: #A6E22E | |
!yellow |
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
jQuery(document).ready(function() { | |
jQuery(#projecttable).jqGrid({ | |
url: 'projects', | |
datatype: 'xml', | |
mtype: 'POST' | |
colNames: ['Name', 'Beginn Datum', 'End Datum'], | |
colModel: [ | |
{name: 'Name', index: 'name', width: 55}, | |
{name: 'Beginn Date', index: 'start_date', width:90 }, | |
{name: 'End Datum', index: 'end_date', width:80, align: 'right' } |
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
xml.instruct! :xml, :version => "1.0", :encoding => "UTF-8" | |
xml.rows do | |
xml.page params[:page] | |
xml.total (@projects.size.to_i) | |
xml.records @projects.size | |
@projects.each do |p| | |
xml.row :id => p.id do | |
xml.cell p.name | |
xml.cell p.start_date | |
xml.cell p.end_date |
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
class ProjectsController < ApplicationController | |
# GET /projects | |
# GET /projects.xml | |
def index | |
@title = "Projekte" | |
@projects = Project.all | |
respond_to do |format| | |
format.html # index.html.erb |
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
<h1>Projekt Liste</h1> | |
<% form_tag :controller => 'project', :action => 'add_candidates', :method => 'post' do %> | |
<table id="oldprojecttable"> | |
<tr> | |
<th>Name</th> | |
<th>Beginn Datum</th> | |
<th>End Datum</th> | |
</tr> |
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
class HeapSort { | |
private static int[] a; | |
private static int n; | |
public static void sort(int[] arr) { | |
a = arr; | |
n = arr.length; | |
heapsort(); | |
} |
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
class Divide { | |
public static int divide(int dividend, int divisor) throws Exception { | |
int result = 0; | |
int sign = 1; | |
if (divisor == 0) { | |
System.out.println("Divide by 0 error"); | |
throw new Exception("Divide by 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
qsort[] = [] | |
qsort(x:xs) = qsort(filter (< x) xs) ++ [x] ++ qsort(filter (>= x) xs) |