Stefano Tommesani

  • Increase font size
  • Default font size
  • Decrease font size

Limiting SkyDrive upload speed

E-mail Print PDF

At the time of writing, the SkyDrive client application on Windows does not support bandwidth throttling on uploads, so if you start uploading a large number of files, it will try to use all the available bandwidth, and this behaviour has an impact on other applications accessing the Internet.

A quick fix to this behaviour is:

  • install a network traffic manager app, such as SeriousBit NetBalancer (I will use NetBalancer in this example)
  • start SkyDrive app
  • start NetBalancer, and look for the SkyDrive process (SkyDrive.exe), right-click to open the menu, and choose Upload Priority | Limit...


Last Updated on Wednesday, 20 February 2013 13:30

AltaLux 1.5 in IrfanView

E-mail Print PDF


AltaLuxIV1 The AltaLux image enhancement filter is now available in the popular IrfanView image viewer!

Now you can enjoy AltaLux technology inside an advanced image viewer and editor, so trying how AltaLux can effectively enhance your photos is just a click away while you keep using your favourite image viewer.

Last Updated on Sunday, 04 November 2012 12:20

An object-oriented approach to FizzBuzz

E-mail Print PDF

FizzBuzz is described as:

Write a program that prints the integers from 1 to 100. But for multiples of three print "Fizz" instead of the number and for the multiples of five print "Buzz". For numbers which are multiples of both three and five print "FizzBuzz"

It takes a couple of minutes to write a few lines of C++ code that satisfy the requirements:

#include <iostream>
using namespace std;
int main () {
 int i;
 for (i = 0; i <= 100; i++) {
 if ((i % 15) == 0)
 cout << "FizzBuzz" << endl;
 else if ((i % 3) == 0)
 cout << "Fizz" << endl;
 else if ((i % 5) == 0)
 cout << "Buzz" << endl;
 cout << i << endl;
 return 0;

But then the examiner may ask you to add some more checks, such as printing a different string when the number is a multiple of 11 or any other number, and the code quickly becomes ugly. In fact, the major mistake that you can make with FizzBuzz is using the wrong sequence of checks, for example checking for modulus of 3 before that of 15, so that FizzBuzz is never printed; this is obvious with only 3 simple checks, but gets more complicated with a longer list of more complicated checks.

So why not spend a few minutes more than those required to write a trivial solution, and propose a fully object-oriented solution that is designed for extensibility?

Last Updated on Monday, 27 May 2013 18:51

Improving web speed with Arduino

E-mail Print PDF

The Flash library by Mikal Hart is a wonderful piece of software for improving simple web server apps built on the Arduino: the main problem when designing such apps is that the limited number of RAM available forces the designer either to use an SD card to store the files that are part of the web site, and/or store some HTML fragments in the PROGMEM area, and copy them back to normal RAM to modify and include them in the server HTML packets. The Flash library greatly simplifies the second technique, as the following code fragment highlights:

FLASH_STRING(WebPageHeader, "HTML source code");
Client& client = web_server.get_client();

The FLASH_STRING macro declares a string contained in PROGMEM, so that it does not decrease the available RAM. Streaming that string is as easy as calling the print method and passing the Client connection of the web server as the parameter. Using this technique, dynamic generation of web pages includes both static parts stored in PROGMEM as FLASH_STRINGs (for example, page headers and footers, top menus, etc.) and dynamic parts that are generated by code (for example, tables containing data values coming from attached devices).

Last Updated on Thursday, 21 March 2013 23:18

Test video for CCTV motion analysis

E-mail Print PDF

CCTVTestVideoHere is video footage from a real-life scene: it's a windy day, so the camera is slightly shaking, and there is a lot of action happening in the road below. This video sequence is useful for the following tests:

  • - checking the direction of moving vehicles (there are bikes moving in the wrong direction)
  • - classifying moving objects (cars, buses, motorcycles, bikes etc.)
  • - rejecting false alarms due to unrelevant movements (the shadow of the trees is costantly moving, but it should not trigger an alarm, while people walking and running should)

You can download this video sequence (running time: 9m 42s) from Dropbox clicking on this link. (if clicking on the link starts a video player, right-click on the link and choose Save Link As.. from the popup menu)

Last Updated on Thursday, 13 September 2012 15:53

Slow blits with latest nVidia drivers

E-mail Print PDF

An application of mine uses DirectDraw to draw video frames on multiple screens, and so far the visualization pipeline used a group of off-screen YUV surfaces that, at the end of the process, are drawn into the primary surface. So this is the code that creates the primary surface:

ZeroMemory(&ddsd, sizeof(ddsd));
ddsd.dwSize = sizeof(DDSURFACEDESC);
ddsd.dwFlags = DDSD_CAPS;
ddsd.ddsCaps.dwCaps    = DDSCAPS_PRIMARYSURFACE;
if ((ddrval = lpDD->CreateSurface(&ddsd, &lpDDSPrimary, NULL)) != DD_OK)

and this is the code that creates an off-screen YUV surface:

Last Updated on Friday, 27 July 2012 11:12

Page 7 of 9
View Stefano Tommesani's profile on LinkedIn

Latest Articles

Castle on the hill of crappy audio quality 19 March 2017, 01.53 Audio
Castle on the hill of crappy audio quality
As the yearly dynamic range day is close (March 31st), let's have a look at one of the biggest audio massacres of the year, Ed Sheeran's "Castle on the hill". First time I heard the song, I thought my headphones just got
Necessary evil: testing private methods 29 January 2017, 21.41 Testing
Necessary evil: testing private methods
Some might say that testing private methods should be avoided because it means not testing the contract, that is the interface implemented by the class, but the internal implementation of the class itself. Still, not all
I am right and you are wrong 28 December 2016, 14.23 Web
I am right and you are wrong
Have you ever convinced anyone that disagreed with you about a deeply held belief? Better yet, have you changed your mind lately on an important topic after discussing with someone else that did not share your point of
How Commercial Insight changes R&D 06 November 2016, 01.21 Web
How Commercial Insight changes R&D
The CEB's Commercial Insight is based on three pillars: Be credible/relevant – Demonstrate an understanding of the customer’s world, substantiating claims with real-world evidence. Be frame-breaking – Disrupt the
Windows Forms smells funny, but... 07 April 2016, 15.38 Software
Windows Forms smells funny, but...
In the "2016 .NET Community Report" just released by Telerik, the answers to the question "What technology would you choose if building for Windows Desktop?" were as follows: So roughly half of new desktop developments would