Skip to content

Instantly share code, notes, and snippets.

body {
width: 210mm;
margin: 1em auto;
font-family: Verdana, Arial, sans-serif;
}
h1 {
text-align: center;
margin-bottom: .4cm;
font-size: 1.7em;
}
@mingan
mingan / originalni-trigger.sql
Created June 13, 2011 11:47
Ukázkový trigger
CREATE OR REPLACE TRIGGER "tib_je_polozkou" before insert
on JE_POLOZKOU for each row
declare
EX_NEKOMP_POB EXCEPTION;
EX_KOLO_JE_PUJC EXCEPTION;
EX_UZAVR_VYPUJC EXCEPTION;
volne integer;
uzavreno TIMESTAMP;
pobockaVyp integer;
pobockaKol integer;
@mingan
mingan / gist:1276434
Created October 10, 2011 20:33
Martiny úkol
class Vysledek {
}
@mingan
mingan / gist:1276466
Created October 10, 2011 20:42 — forked from goldfish01/gist:1276446
Martiny úkol
public class Vysledek
{
//== Datové atributy (statické i instancí)======================================
private Tym domaci;
private Tym hoste;
private int kolo;
private String datum;
private int domaciGolu;
private int hosteGolu;
private boolean prodlouzeni;
@mingan
mingan / gist:1276469
Created October 10, 2011 20:43 — forked from goldfish01/gist:1276446
Martiny úkol
public class Vysledek
{
//== Datové atributy (statické i instancí)======================================
private Tym domaci;
private Tym hoste;
private int kolo;
private String datum;
private int domaciGolu;
private int hosteGolu;
private boolean prodlouzeni;
@mingan
mingan / saveToXml.php
Created April 25, 2012 19:39
Uložení $_POST do XML
<?php
// jsou odeslaná data POSTem
if (!empty($_POST)) {
$filename = dirname(__FILE__) . 'mujxmlsoubor.xml';
// načte soubor, musí existovat!
$xml = simplexml_load_file($filename);
// kořenovému elementu přidá nový element record
$record = $xml->addChild('record');
@mingan
mingan / stats.sql
Created June 6, 2012 15:21
Players' stats
SELECT
`Division_i18n`.`content` AS `Division__name`,
`TeamInfo`.`id`,
`TeamInfo`.`name`,
`Player`.`id`,
`PlayerInfo`.`name`,
`PointsSummary`.`matches`,
`PointsSummary`.`points`,
`PunishmentsSummary`.`punishment_type_id`,
`PunishmentsSummary`.`count`
def countChange (money: Int, coins: List[Int]): Int = {
def count(money: Int, coins: List[Int]): Int = {
if (coins.tail.isEmpty) {
if (money % coins.head == 0) 1
else 0
}
else if (money == 0) 1
else if (money < coins.head) count(money, coins.tail)
else count(money - coins.head, coins) + count(money, coins.tail)
@mingan
mingan / foaf+schema.org.html
Created October 22, 2012 14:13
Satisfy Google Rich Snippets "Person" standard using FOAF?
<div id="me" vocab="http://xmlns.com/foaf/0.1/" prefix="v: http://rdf.data-vocabulary.org/#" typeof="Person v:Person" resource="http://carlboettiger.info#me">
<p>
<img property="depiction" src="assets/img/carlboettiger.png" alt="Photo of Carl Boettiger" style="float: right; margin: 10px 10px"/> I am
<a property="homepage v:url" href="http://carlboettiger.info">
<span property="name v:name">
<span property="firstName v:givenName">Carl
</span>
<span property="lastName v:familyName">Boettiger
</span>
</span></a>,
<?xml version="1.0" encoding="UTF-8"?>
<rdf:RDF xmlns:adms="http://www.w3.org/ns/adms#"
xmlns:dcterms="http://purl.org/dc/terms/"
xmlns:gr="http://purl.org/goodrelations/v1#"
xmlns:irw="http://www.ontologydesignpatterns.org/ont/web/irw.owl#"
xmlns:org="http://www.w3.org/ns/org#"
xmlns:owl="http://www.w3.org/2002/07/owl#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
xmlns:s="http://schema.org/"