Skip to content

Instantly share code, notes, and snippets.

View Gelio's full-sized avatar

Grzegorz Rozdzialik Gelio

View GitHub Profile
@Gelio
Gelio / kolejka.c
Last active December 7, 2015 20:18
Kolejka w C
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#define A 10
#define B 30
struct kolejka {
int *tab;
int dlugosc;
@Gelio
Gelio / ruchoma-tablica.c
Created December 7, 2015 21:08
Ruchoma tablica w C
#include <stdlib.h>
#include <stdio.h>
#include <time.h>
#define ACHUNK_LEN 5
#define RCHUNK_LEN 4
int len = 0;
int *pini(int *len, int firstvalue);
@Gelio
Gelio / muzeum.c
Created January 13, 2016 16:34
Lista jednokierunkowa - muzeum
#define _CRT_SECURE_NO_WARNINGS
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#define DLUGOSC_NAZWY 30 //długość nazwy
#define L_DZIALOW 5 //liczba działów muzeum
enum DZIAL { ceramika, obrazy, rzezba, numizmatyka, magazyn }; //nazwy działów
#define _CRT_SECURE_NO_WARNINGS
#include <stdio.h>
#include <conio.h>
#include <stdlib.h>
#define LICZBA_PUSTA {NULL,0}
#define ZERO_ASCII 48
#define B 8 //Podstawa systemu liczbowego
//Struktura przechowująca bardzo dużą liczbę w postaci kolejnych cyfr, oraz ilość tych cyfr.
@Gelio
Gelio / square-communication.c
Created February 18, 2017 22:43
SOP2 L1 - inter-process communication using POSIX pipes, ring architecture with the main process creating subprocesses
#include <stdio.h>
#include <stdlib.h>
#include <errno.h>
#include <unistd.h>
#include <signal.h>
#include <sys/wait.h>
#define DELTA_MIN -10
#define DELTA_MAX 15
#define SUBPROCESS_COUNT 3
@Gelio
Gelio / Lab02_Main.cs
Created March 1, 2017 19:28
Task 2 from the AiSD 2 class (change calculating) with additional random-generated tests (and the output of my solution)
using System;
namespace ASD
{
abstract class ChangeMakingTestCase : TestCase
{
protected int amount;
@Gelio
Gelio / pipe-tree-hierarchy.c
Last active March 7, 2017 09:51
Task from the first SOP2 laboratory
#define _GNU_SOURCE
#include <stdlib.h>
#include <stdio.h>
#include <sys/wait.h>
#include <signal.h>
#include <unistd.h>
#include <errno.h>
#include <limits.h>
#include <math.h>
#include <time.h>
@Gelio
Gelio / Lab03_Main.cs
Last active March 10, 2017 21:52
ASD2 laboratory task 3 with performance metrics
using System;
using System.Diagnostics;
using ASD.Graphs;
namespace ASD
{
class FindCycleTestCase : TestCase
{
// lab1-cs.cpp : Defines the entry point for the application.
//
#include "stdafx.h"
#include "lab1-cs.h"
#define MAX_LOADSTRING 100
// Global Variables:
HINSTANCE hInst; // current instance
// lab1-proba.cpp : Defines the entry point for the application.
//
#include "stdafx.h"
#include "lab1-proba.h"
#define MAX_LOADSTRING 100
// Global Variables:
HINSTANCE hInst; // current instance