Skip to content

Instantly share code, notes, and snippets.

result = []
(1..3).each {|w1|
(1..3).each {|w2|
(1..3).each {|w3|
(1..3).each {|w4|
(1..3).each {|w5|
result << w1 + w2 + w3 + w4 + w5
}}}}}
require "pp"
test css
<?php
require 'authenticated_controller.php';
class SheriffController extends AuthenticatedController
{
function index_action()
{
$args = func_get_args();
diff --git a/lib/classes/StudipDocument.class.php b/lib/classes/StudipDocument.class.php
index 4293ed4..637f3d0 100644
--- a/lib/classes/StudipDocument.class.php
+++ b/lib/classes/StudipDocument.class.php
@@ -107,4 +107,38 @@ class StudipDocument extends SimpleORMap {
$this->db_table = 'dokumente';
parent::__construct($id);
}
+
+ /**
@luniki
luniki / make
Created February 10, 2011 12:06
virtuos@vm088:~/.cruise/projects/studip/work$ make test
php test/all_tests.php
All tests
1) Equal expectation fails at character 349 with [...raum>
</raumzeit>
<raumzeit>
<datum>12.05.2010</datum>
<wochentag>Mi</wochentag>
<zeit>07:00-11:00</zeit>
<raum>
@luniki
luniki / gist:825696
Created February 14, 2011 10:25
StudipDocument.php
static function createWithFile($file)
{
$doc = new StudipDocument();
if (is_uploaded_file($file)) {
// create new ID
$this->setId($this->getNewId());
$newpath = get_upload_file_path($this->getId());
// try moving uploaded file
@luniki
luniki / question.php
Created June 16, 2011 10:11
Stud.IP createQuestion
<div class="modalshadow">
<div class="messagebox messagebox_modal">
<?= formatReady($question) ?>
<div style="margin-top: 1em;">
<? if ($content) : ?>
<?= $content instanceof Flexi_Template ? $this->render_partial($content) : $content ?>
<? else : ?>
<a href="<?= $approvalLink ?>">
<?= makebutton('ja') ?>
</a>
@luniki
luniki / lib-classes-AlertView.php
Created June 20, 2011 09:22
AlertView4Stud.IP
<?php
/*
* AlertView.php - render an alert message to the user
*
* Copyright (c) 2011 mlunzena@uos.de
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 2 of
* the License, or (at your option) any later version.
@luniki
luniki / high_traffic.csv
Created October 24, 2011 07:49
CSV file of the "GeekBuzz: Essen Spiel 2011" high traffic list
Stalag 17 25 4.5
Wilderness 29 4.4
Top-A-Top 29 4.3
Colonial: Europe's Empires Overseas 28 4.3
Pergamemnon 26 4.3
Takenoko 28 4.2
Antiquity 24 4.2
Québec 23 4.1
Ascension: Return of the Fallen 50 4.1
Dungeon Petz 95 4.1