This file contains 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
#!/bin/bash | |
FILE_NAME=$GEDIT_CURRENT_DOCUMENT_NAME | |
if [ `echo $FILE_NAME | cut -d "." -f 2` = "pas" ] | |
then | |
FILE_NAME_LEN=`expr ${#FILE_NAME} - 4` | |
FILE_NAME_BASE=${FILE_NAME:0:$FILE_NAME_LEN} | |
if fpc $GEDIT_CURRENT_DOCUMENT_DIR/$GEDIT_CURRENT_DOCUMENT_NAME | awk '$1 > 0 && /compiled/ && /sec/{print "ok"}' | grep ok > /dev/null | |
then | |
# Check if file extension is .pas | |
gnome-terminal -e ./$FILE_NAME_BASE |
This file contains 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
program MultipleCondition; | |
uses crt; | |
var A: Integer; | |
begin | |
A := 0; | |
repeat | |
begin |
This file contains 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
<?php | |
$b = new Brainfuck(file_get_contents('hello.b')); | |
$b->execute(); | |
class BrainFuck { | |
private $code; | |
private $cells = array(); | |
private $cell = 0; |
This file contains 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
program lodky; | |
uses crt; | |
type HraciPole = array[0..11,0..11] of byte; | |
var pole: HraciPole; | |
polesuper: HraciPole; | |
i,j,y,rota: byte; | |
x: char; | |
input: string; |
This file contains 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
# nactu si soubory s prezenci a ziskam unikatni seznam ucastniku | |
for f in $@ | |
do | |
cat $f >> tempprezencka | |
done | |
cat tempprezencka | sort | uniq > tempprezencka2 | |
rm -f tempprezencka |
This file contains 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
# nactu prezencky | |
for f in $@ | |
do | |
cat $f >> tempprezencka | |
done | |
# zjistim unikatni jmena | |
cat tempprezencka | sort | uniq > tempprezencka2 | |
rm tempprezencka |
This file contains 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
for f in $@ | |
do | |
cat $f >> tempprezencka | |
done | |
cat tempprezencka | sort | uniq -c | sort -r > tempprezencka2 | |
cat tempprezencka2 | |
rm tempprezencka tempprezencka2 |
This file contains 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
using System; | |
using System.Collections.Generic; | |
using CodEx; | |
public struct Path | |
{ | |
public int Steps; // Počet kroku pro dosazeni | |
public int I; // Pozice I pri dosazeni pismene | |
public int J; // Pozice J pri dosazeni pismene | |
} |
This file contains 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
test |
This file contains 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
static private bool IsValidFormula(string formula) { | |
// Ja bych byl pouzil Regexpy a mel to na tri radky, jenze to neprojde na cas, takze automat :/// | |
ValidatorState state = ValidatorState.START; | |
if (formula[0] != '=') | |
{ | |
return false; | |
} | |
for (int i = 1; i < formula.Length; i++) | |
{ |
OlderNewer