published 1 day ago (19.08.2008 00:03)
reichtum
»Der Reichtum eines Menschen steigt mit der Anzahl der Dinge, die er
nicht braucht.«
published 1 day ago (19.08.2008 00:03)
»Der Reichtum eines Menschen steigt mit der Anzahl der Dinge, die er
nicht braucht.«
published 3 days ago (17.08.2008 23:36)
Two excellent – and classic – articles on how to become an expert programmer:
to put it differently: the best you can do is to suck less as a programmer, year by year. i recently talked to a guy who had lots of architecture knowledge, knew rails’ activerecord inside out, said he counted Scheme as his favourite language, and in general seemed a top coder. it turned out later on he barely could handle simple regular expressions.
class ProductsController < ApplicationController
#before_filter :authenticate
layout 'shopAdmin'
helper :sort
include SortHelper
def initialize
super
@categories = Category.find_all
@materials = Material.find_all
end
def index
list
render_action 'list'
end
def list
sort_init 'category_id'
sort_update
@session['cart'] = 'A SHOPPING CART'
@products = Product.find(:all, :order => sort_clause)
@category = @params['category']
end
...
endfunction layout_head($proj_name,$pid) {
echo '<table width=600 border=0 cellspacing=2>';
echo "<tr><td>projektomat v 0.013</td><td align=right rowspan=2><a href=http://rmltk.weinbau-jauk.at/index.php?pid=$pid>[übersicht]</a><br/><a href=http://rmltk.weinbau-jauk.at/protected/upload.php?pid=$pid&proj_name=$proj_name>[neue datei hochladen]</a></td></tr>";
echo "<tr><td>aktuelles projekt: <b>$proj_name</b></td></tr></table>";
}<?php
if (!defined(INCLUDES)) include("./includes.inc.php");
if (!defined(HEADER)) include("./header.inc.php");
$class = "termin".$func;
$termin_head = "<title>Termin</title>\n<body class='$class' onload=self.focus();document.termin.stunde.focus();>\n<link rel='stylesheet' href='$templatepath/style.css'>";
$datum = mysql2dmy($datum[3]); ## killdatumarrayhere....
if (@$func=="edit") {
bearbeiten($id);
exit;
}
if (@$eintrag_neu) {
echo submit("neu");
} elseif (@$eintrag_update) {
echo submit("update");
} else {
neu(0);
}function submit($typ) { ### NEUEN und UPGEDATEDEN termin add_info und eintragen in db
global $jahr,$monat,$tag,$stunde,$minute,$dauer,$text,$projekt,$protrack,$projekt_id,$teambox,$id;
$datum = "20$jahr-$monat-$tag";
$zeit = "$stunde:$minute:00";
$text = nl2br($text);
$nr=1;
$i=1;
@end($teambox);
$lastelementnr = @key($teambox); # hier werden die werte der checkboxes (per get übergebenes array teambox[$id]) , werte yes oder unset
while ($i <= $lastelementnr) { # nach $team_id[$nr] = teambox gewandelt und dann weiter in brauchbare db-query-teile umgewandelt
if (@$teambox[$i] AND $nr <= 5) {
$$teambox[$i] =$i; # yes wird durch den entsprechenden zählerwert ersetzt
$team_id[$nr] = $$teambox[$i];
# echo "<pre>team_id[$nr] = $team_id[$nr]</pre>"; ## mal echo einschalten und die ausgabe ansehen
@$team_cols .= ",team_id$nr";
@$team_vals .= ",'$team_id[$nr]'";
@$team_update .= ",team_id$nr='$team_id[$nr]'";
$nr++;
}
$i++;
}class radQuizBase
{
var $dbName, $form;
var $debugFlag = false;
var $quiz = array();
var $quizForm;
// variablen für fragen
var $questionTypes = array (
'free' => 'Freie Antwort',
_continues ... file has ~1.200 lines ..._
class radQuizAdmin extends radQuizBase
{
var $task;
# variablen f¸r fragebogen administration
var $qSetName, $insertBeforeQuestionId, $qSetType;
var $transDifficulty = array(
'n.a.',
'leicht',
'mittel',
'schwierig'
);
_continues ... file has ~2.000 lines_ [...]################################ / logic start
if($func=='newEntry')
{
$newId = newEntry($pid);
eingabeseite($newId);
}
else
{
// classic logic based on $pid and $aenderung
if (!$pid)
{
echo auswahlseite($category);
}
else
{
if($showMulti == 'true')
{
echo showMulti($pid);
}
elseif (!file_exists(WA_ROOT.'/xml/'.$pid.'.xml'))
{
$parms['title'] = $navititle;
$parms['id'] = $pid;
neue_seite($parms);
eingabeseite($pid);
}
else // bearbeite bestehende seite
{
if(!$aenderung)
{
eingabeseite ($pid);
}
else
{
aenderung ($pid);
}
}
}
}published 4 days ago (16.08.2008 14:11)
genres: house, electro, dnb, alternative
and of course …
p.s.: sorry for the crappy layout … i had to be fast.
published 5 days ago (15.08.2008 16:05)
daily lolcat-ism for your Mac OS X Dashboard!
published 10 days ago (10.08.2008 23:14)
published 18 days ago (02.08.2008 23:18)
Monster Magnet – Negasonic Teenage Warhead
like this? then check out space lord, god says no, crop circle (live), unbroken (getting more mainstream). the new album seems boring, though.
published 23 days ago (28.07.2008 21:56)
Update: dammit, they took the video down! here’s a hilarious one from 1964, though.
Recorded at Madison Square Garden in 1969.
published 25 days ago (26.07.2008 17:44)
»Religion is based, I think, primarily and mainly upon fear. It is partly the terror of the unknown and partly, as I have said, the wish to feel that you have a kind of elder brother who will stand by you in all your troubles and disputes… A good world needs knowledge, kindliness, and courage; it does not need a regretful hankering after the past or a fettering of the free intelligence by the words uttered long ago by ignorant men «
—Betrand Russell in Why I Am Not a Christian, 1927
published about 1 month ago (21.07.2008 00:19)
$KCODE = 'u'
require 'rubygems'
require_gem 'activerecord'
require 'rest_client'
class MyModel < ActiveRecord::Base
end
ActiveRecord::Base.establish_connection(
:adapter => "mysql",
:database => "hello_world",
:encoding => 'UTF8'
)
MyModel.find(:all).each do |record|
p RestClient.post('http://localhost:5984/hello_world', record.to_json)
endpublished about 1 month ago (20.07.2008 00:38)