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
| #include <iostream> | |
| using namespace std; | |
| struct Node { | |
| int data; | |
| Node * next; | |
| }; | |
| class LinkedList { |
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 MergeSort { | |
| public void sort(int[] arr) { | |
| if (null == arr || arr.length == 0) { | |
| return; | |
| } | |
| merge_sort(arr); | |
| } |
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
| qsort[] = [] | |
| qsort(x:xs) = qsort(filter (< x) xs) ++ [x] ++ qsort(filter (>= x) xs) |
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 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 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 HeapSort { | |
| private static int[] a; | |
| private static int n; | |
| public static void sort(int[] arr) { | |
| a = arr; | |
| n = arr.length; | |
| heapsort(); | |
| } |
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
| <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 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 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 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
| 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 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
| 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 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
| !black | |
| *color0 : #222222 | |
| *color8 : #454545 | |
| !red | |
| *color1 : #F92672 | |
| *color9 : #F92672 | |
| !green | |
| *color2 : #A6E22E | |
| *color10: #A6E22E | |
| !yellow |