Skip to content

Instantly share code, notes, and snippets.

View Gelio's full-sized avatar

Grzegorz Rozdzialik Gelio

View GitHub Profile
@Gelio
Gelio / Lab06_Main.cs
Last active March 30, 2017 10:27
ASD2 laboratory task 6 main file with custom tests and performance metrics
using ASD;
using ASD.Graphs;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Pathfinder
{
@Gelio
Gelio / posix-mq-modulo-checking-client.c
Created March 26, 2017 16:16
Modulo checking using server and clients, created in C using POSIX message queues in preparation for the Operating Systems class
#include <stdlib.h>
#include <stdio.h>
#include <mqueue.h>
#include <unistd.h>
#include <string.h>
#include <signal.h>
#include <errno.h>
#include <sys/time.h>
#define MAX_QUEUE_NAME_LENGTH 100
@Gelio
Gelio / posix-mq-divisor-waterfall.c
Created March 25, 2017 20:13
Divisibility checker using a waterfall of POSIX message queues created in C for the Operating Systems class
#include <stdlib.h>
#include <stdio.h>
#include <mqueue.h>
#include <errno.h>
#include <signal.h>
#include <string.h>
#include <unistd.h>
#define MAX_QUEUE_NAME_LENGTH 10
#define MESSAGE_LENGTH sizeof(int)
@Gelio
Gelio / posix-mq-p2p-communicator.c
Created March 25, 2017 17:43
Peer-to-peer communicator written in C for the Operating Systems class. Utilizes POSIX message queues
#include <stdio.h>
#include <stdlib.h>
#include <mqueue.h>
#include <unistd.h>
#include <signal.h>
#include <string.h>
#include <errno.h>
#define MAX_QUEUE_NAME_LENGTH 100
#define MAX_MESSAGES 10
@Gelio
Gelio / Lab05_Main.cs
Last active March 24, 2017 12:24
ASD2 laboratory task 5 main file with custom tests and performance metrics
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using ASD.Graphs;
namespace ASD
{
class CyclePartitionTestCase : TestCase
@Gelio
Gelio / Bookstore.xslt
Created March 16, 2017 16:35
Object oriented design XML cheatsheet (with snippets of C# to handle typical serialization behavior)
<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:msxsl="urn:schemas-microsoft-com:xslt" exclude-result-prefixes="msxsl"
xmlns:bk="http://bookstore.mini.pw.edu.pl/"
>
<xsl:output method="html" indent="yes"/>
<xsl:template match="/bk:Bookstore">
<html>
<head>
@Gelio
Gelio / Lab04_Main.cs
Last active March 18, 2017 16:35
ASD2 laboratory task 4 main file with custom tests and performance metrics
using System;
using System.Text;
using System.Diagnostics;
namespace ASD
{
/// <summary>
/// Struktura przechowująca wyniki: minimalną i maksymalną prędkość wynikającą z obliczeń.
/// </summary>
public struct Velocities
@Gelio
Gelio / pipe-network-simulation.c
Created March 13, 2017 16:11
Lab1 task from the SOP2 course
#define _GNU_SOURCE
#include <stdio.h>
#include <stdlib.h>
#include <errno.h>
#include <unistd.h>
#include <signal.h>
#include <sys/wait.h>
#include <time.h>
#include <string.h>
#include <limits.h>
// 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
// 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