Skip to content

Instantly share code, notes, and snippets.

View Marax's full-sized avatar

Roman Mařák Marax

View GitHub Profile
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2008 The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
@Marax
Marax / .gtkrc-2.0
Created January 29, 2013 20:33
Úprava vzhledu Eclipse pro linux. Zmenší taby a změní barvu u tooltipů, aby byli čitelné. Stačí nakopírovat do home adresáře a restartovat eclipse. Zdroj: http://stackoverflow.com/questions/2743647/gigantic-tabs-in-eclipse-on-ubuntu
style "gtkcompact" {
GtkButton::default_border={0,0,0,0}
GtkButton::default_outside_border={0,0,0,0}
GtkButtonBox::child_min_width=0
GtkButtonBox::child_min_heigth=0
GtkButtonBox::child_internal_pad_x=0
GtkButtonBox::child_internal_pad_y=0
GtkMenu::vertical-padding=1
GtkMenuBar::internal_padding=0
GtkMenuItem::horizontal_padding=4
@Marax
Marax / i_newton.m
Last active December 11, 2015 01:39
Výpočet newtonova intepolačního polynomu + jeho vypsání
function v = i_newton(x, y, u)
% ======================================================================
% function v = i_newton(x, y, u)
% Pro hodnotu u (vektor hodnot) urci hodnotu v (vektor hodnot) na zaklade
% Newtonova tvaru interpolacniho polynomu
% Vstup:
% x... uzly
% y... fcni hodnoty v uzlech
% u... vstupni hodnoty (pokud potřebujete pouze ten polynom, zadejte např 1)
% Vystup:
@Marax
Marax / shitSwitch.php
Created September 2, 2012 07:53
Tohle jsem jako vážně napsal já?
switch($rok){
case "2010":
$od = "2010-01-01";
$do = "2010-12-31";
$rrok= 2010;
break;
case "2009":
$od = "2009-01-01";
$do = "2009-12-31";
$rrok= 2009;
@Marax
Marax / AddCategory.php
Created January 7, 2012 14:48
Traverzování nad stromem
<?php
class AddCategory extends AppForm {
public function __construct($parent, $name) {
parent::__construct($parent, $name);
$pres = $this->getPresenter()->getApplication()->getService('ModelLoader');
//$this->addProtection('Login timeout. Please, try it again.');
$kategorie = $pres->getModel('ShopCategory')->findAll($order = 'lft ASC', $where = NULL, NULL, NULL);
$kate = array();
<?php
$lepsi = 0;
$stejny = 0;
$s = 0;
for($s=0;$s<=264;$s +=33){
$soubor = file_get_contents("http://isit.uhk.cz/info/pohovory/public/Poradi.asp?skip=".$s."&obor=ai3&termin=1&rozhodnuti=?");
$hrefy = explode('<a href="Vysledky.asp?cislo=',$soubor);
for($h = 1; $h<=66;$h+=2){
$linkc = explode('">',$hrefy[$h]);
$link = "http://isit.uhk.cz/info/pohovory/public/Vysledky.asp?cislo=".$linkc[0];