Archive

Archive for the ‘Programming’ Category

Team Foundation Server (TFS)?

November 30th, 2011 No comments

TFS? No, thank you….
I prefer Git\Svn + NUnit + Cruise Control

Hoppity hop! Facebook puzzle solution

September 23rd, 2011 No comments

Hoppity Hop puzzle description

Hoppity Hop! is the simplest Facebook puzzle.

Input specifications

The input file will contain a single positive integer (in base 10) expressed as a string using standard ASCII text (e.g. for example, the number “15″ but without the double quotes). This number may or may not be padded on either side with white space. There will be no commas, periods, or any other non-numeric characters present within the number. The file may or may not terminate in a single new line character (“\n”). An example input file is below:

15

Output specifications

The program should iterate over all integers (inclusive) from 1 to the number expressed by the input file. For example, if the file contained the number 10, the submission should iterate over 1 through 10. At each integer value in this range, the program may possibly (based upon the following rules) output a single string terminating with a newline.

For integers that are evenly divisible by three, output the exact string Hoppity, followed by a newline.
For integers that are evenly divisible by five, output the exact string Hophop, followed by a newline.
For integers that are evenly divisible by both three and five, do not do any of the above, but instead output the exact string Hop, followed by a newline.

Example output (newline at end of every line):

Hoppity
Hophop
Hoppity
Hoppity
Hophop
Hoppity
Hop

Read more…

GPS Generator PRO – a must-have for all developers of GPS-related hardware and software

July 12th, 2011 No comments

If you are developing a program or device that uses satellite GPS data, you definitely need a reliable and stable source of this data. Apparently, you can use an actual GPS receiver, but what if you can’t? For instance, if your office is located in an area with bad or no reception at all, efficient development of a product that relies on accurate GPS coordinates may be quite problematic. Fortunately, there is a solution for this problem that will help you keep working even if no satellite signal is available. Read more…

Control GPS simulator from external application

May 30th, 2011 No comments

Recently I was asked about the possibility to control GPS simulator using gaming wheel. Yes, it is possible. I created simple C# application to  demostrate this.

Here is video:

This small application interacts with GPS Simulator and sends control signals for changing course. So, it is possible to simulate object moving along a curve.

Java applet for converting RSS feed to HTML (source code)

April 30th, 2011 No comments

I’m C# and Delphi developer. Recently I decided to learn more about Java. I installed JRE (Java Runtime), NetBeans IDE, read several articles on Java.com, Oracle.com about creating Java Applets and standalone applications. After that I decided to create something useful. In this topic I’ll show how I implemented Java Applet that loads XML RSS feed from website and shows it on HTML page.
Read more…

Method call vs Delegate

February 7th, 2011 No comments

Is there any difference in performance between method call and delegate call in C# .Net? Let’s check it.
Here is C# code:
Read more…

How to copy projects files using MSBuild. Step by step explanation.

November 23rd, 2010 No comments

I try not to share source files among projects. If couple of projects use the same source codes I create separate project (assembly in .NET terminology), that contains shared functionality. However, sometimes there is no way to avoid using the same shared files. It can happen, for instance, if there is a project A and its subproject B. The project B can be used, for example, for shipping subset of source files to customers. The problem is, that all source files are mixed and there is a need to find a way how to extract files of project B only. Lets look how to achieve it using MSBuild.

Read more…

C# implementation of Bezier curvature calculation

October 30th, 2010 2 comments

In the previous post I wrote a couple of equations displaying how to calculate acceleration on a planar curve (equation #1) and curvature radius for Bezier curve (equation #2). In this post I’ll also show how to get the first and the second derivatives of Bezier polynomial.

Let’s implement it using C#.Net.
Read more…

Circular buffer (virtual ring)

September 3rd, 2010 No comments

A circular buffer, cyclic buffer or ring buffer is a data structure that uses a single, fixed-size buffer as if it were connected end-to-end. As it is fixed-size buffer, when it is full it starts to overwrite the oldest stored items with new ones. The logic is that recent data is more important then old one.

Circular buffer for plocessing n last samples

Circular buffer for plocessing n last samples


Read more…