Posts Tagged c++

Count number of occurrences of distinct values using LINQ

C# code snippet below finds distinct (case-insensitive) strings in a collection and counts number of occurrences of each unique (case-insensitive again) one.

static void Main(string[] args)

            string[] sa = { "ala", "ma", "ala", "ma", "ma", "abc" };

            var res = from uniqueString
                in sa.Distinct(StringComparer.CurrentCultureIgnoreCase).ToList()
                      select new { str = uniqueString, occur = sa.Count(s => s.ToLower().Equals(uniqueString.ToLower())) };

            foreach(var el in res){
                Console.Write(el.GetType().GetProperty("str").GetValue(el, null) +  "\t");
                Console.WriteLine(el.GetType().GetProperty("occur").GetValue(el, null));



1 Comment

Augmented Reality

A program created as an assignment project for human-computer interaction at the University.

A webcam captures the view, finds the marker, then the object is drawn at the proper position.
Written in C#, VC++ and C++, using WPF, OpenGl, DIBs and some math.

Not downloadable as the proper marker is needed to play. A movie embeded below created as a part of the task.

, , , , , , , ,

Leave a comment

Network checkers

A game created as an assignment for Computer Networks. Multithreaded server written in C and running under Linux, client programmed in Java using for instance Java3d, Swing…

Download client
Download server (for linux)

, , , , , , , , , ,

Leave a comment


A game of checkers created for some programming subject. Written in pure C and OpenGL.


, , , , , , , ,

Leave a comment

Spacegunner – FPP shooter

A game created with Konrad SzaƂkowski smijran[at] as an assignment for Computer Graphics at the Poznan University of Technology.

FPP shooter, programmed in C++ using OpenGL, winapi and Ms XAct for 3d sound effects (unfortunatelly these may not work on machines without DirectX SDK installed… for reason unknown to me). Shadow mapping technique used for generating a shadow of the tank.


, , , , , , , , , , ,

Leave a comment