Skip to content

Instantly share code, notes, and snippets.

View vojto's full-sized avatar
🎯
Focusing

Vojtech Rinik vojto

🎯
Focusing
View GitHub Profile
wow
// *** Navigation View
var navigationView = [[CPView alloc] initWithFrame:CGRectMake(0, 0, 230, CGRectGetHeight([contentView bounds]))];
var sidebarPatternImage = [[CPImage alloc] initWithContentsOfFile:@"Resources/sidebar.png"];
var sidebarBackground = [CPColor colorWithPatternImage:sidebarPatternImage];
[navigationView setBackgroundColor:sidebarBackground];
// *** Main View
var mainView = [[CPView alloc] initWithFrame:CGRectMake(0, 0, CGRectGetWidth([contentView bounds])-230, CGRectGetHeight([contentView bounds]))];
[mainView setAutoresizingMask: CPViewHeightSizable | CPViewWidthSizable]
// [mainView setAutoresizingMask:CPViewWidthSizable];
=#define STEP_DELAY 50
void turnRight();
void turnAround();
int moveUntilWall();
void moveToCenter();
int main() {
turnOn("middleearth2.kw");
setStepDelay(STEP_DELAY);
void doubleToTen() {
int i;
for(i=1; i<=10; i++) {
printf("%d\n", i*2);
}
}
# This file is auto-generated from the current state of the database. Instead of editing this file,
# please use the migrations feature of Active Record to incrementally modify your database, and
# then regenerate this schema definition.
#
# Note that this schema.rb definition is the authoritative source for your database schema. If you need
# to create the application database on another system, you should be using db:schema:load, not running
# all the migrations from scratch. The latter is a flawed and unsustainable approach (the more migrations
# you'll amass, the slower it'll run and the greater likelihood for issues).
#
# It's strongly recommended to check this file into your version control system.
#include <stdio.h>
int main() {
printf("%d\n", faktorial(10));
}
int faktorial(int n) {
if(n == 1)
return 1;
* Priklad 1
400mhz
10 sekund
navrhnut rychlejsi pocitac, ktory by vedel vykonat
ten isty program za 6 sekund.
Konstrukter urcil, ze je mozne vyrazne zvysit taktovaciu
frekvenciu, avsak to sposobi, ze pocitac B bude potrebovat
#include "library.c"
void usage(char *binary_name);
void turnAround();
void goUntilWall();
void putBeepers(int count);
int main(int argc, char **argv) {
if(argc != 2)
module ServesPages
def show
path = path_for(params[:id])
unless File.exists?(path)
path = path_for("not_found")
end
@page = File.read(path)
render :text => @page, :layout => true
#include <errno.h>
#include <stdio.h>
#include <stdarg.h>
#include "util.h"
void x_log(const char *message, ...) {
va_list args;
va_start(args, message);
char formatted_message[255];
sprintf(formatted_message, ">\e\[32m %s\e\[0m\n", message);