ASP.NET Weblogs

This Blog



Roiy Zysman

  • Network and Storage Devices Throughput Chart

    With all of the different storage and network devices that surround our day to day life, understanding these devices data transfer speeds can be somewhat confusing.
    Think about trying to identify your weakest link in the a chain that starts with an external USB hard drive (or a flash drive) that's connected to a 802.11g wifi router, can you quickly come up with an answer of where's the bottle neck in that chain , is it the router or the storage devices ? .
    Well, the following chart should give you an idea understanding different devices, protocols and interfaces maximum throughput speeds. Though these numbers can fluctuate (mostly for worse, but sometimes for the better) due to different kind of factors such as OS overhead (or caching and optimization) , multiple users or processes and so on , the chart can still serve to provide basic information on the theoretical throughput different devices and protocols can get to..


    Network and storage devices chart

     Link to the full size chart  






  • This is not a blog post about Windows Phone 7

    [OT, definitely not a C# post!.]

    Update: You can see the

    This is not a blog post about windows phone 7 , but it somehow started from the windows 7 phone commercial that was just release today. It will probably be known as the “really” commercial. BTW, this commercial is really good, go ahead and see it. But again , that’s not what this blog post is about. that commercial kept running in my head, something looked very familiar.  I thought maybe the idea for the commercial was stolen err , inspired from some other commercial , but i couldn’t find any. after I gave it a rest , i suddenly remembered that it could have been the theme song to a scene from the “Social network” movie, the scene which i actually liked the most.


    Since i couldn’t find that scene on to confirm my suspicion , I went ahead and searched for some information about the “Social Network” soundtrack. I found an interesting piece of evidence over here


    BTW, this guy thinks that the rowing scene was genius as well …;-)

    I went ahead and looked for the “In the Hall of the Mountain King Op. 23” and I got it!.

    I was right, the soundtrack for the windows phone 7 “Really” commercial was the same one as for the rowing scene in the “social network” movie. which makes one wonder , was this on purpose  ? It’s a bit of ironic sense windows phone 7  commercial narrates doing only the things you should be doing with _a_ phone but winks (maybe not on purpose) to facebook and the social network (which we all agree is the ultimate procrastinating black hole ) by using the same soundtrack.
    Here is also a snippet about this piece from Wikipedia..


    I wonder who are the king and who are his trolls..

    Anyway,nice commercial ,nice movie scene.

    Here is the commercial and some more “In the hall..” samples

    Update: here is the actual scene from the movie
  • C Sharp Color Table

    System.Drawing.Color is awesome, but sometime just the item name doesn’t say a lot. for your reference, here is a simple color table.
    Powered by of C# reflection and System.Drawing.



  • The world (map) should be free!.

    With all of the open source movement going around and new licenses like the creative commons you would have expected someone should be able to grab a simple jpeg or a png of the world map for free, without any licensing issues. Well, I’m not sure when I actually started looking for one, but at some point in time I did, and couldn’t actually find an appropriate map of the world countries that’s free to download and royalty free to use in projects. Sure some of you would say that Bing and Google maps have their own maps and API which is great for some purposes. but just grabbing a simple map world map with countries borders and without any companies watermarks or restrictions is just not available. (and if you do happen to find one , please let me know).
    So anyway I’ve decided to play the role of a cartographer and create my own maps and share those with the rest of the world , for free!. the first step was to find a reliable data set of country borders . Took a look in the CIA world Fact book which was good but not enough , took also a look here in this database which seemed very outdated. Eventually, I’ve stumbled upon this marvelous Natural Earth Data website. here is the Natural Earth Data site’s description

    Natural Earth is a public domain map dataset available at 1:10m, 1:50m, and 1:110 million scales. Featuring tightly integrated vector and raster data, with Natural Earth you can make a variety of visually pleasing, well-crafted maps with cartography or GIS software.

    Seeing the potential of this site , I’ve made sure the data had a very unrestrictive usage policy. here are their terms

    All versions of Natural Earth raster + vector map data found on this website are in the public domain. You may use the maps in any manner, including modifying the content and design, electronic dissemination, and offset printing. The primary authors, Tom Patterson and Nathaniel Vaughn Kelso, and all other contributors renounce all financial claim to the maps and invites you to use them for personal, educational, and commercial purposes.

    Perfect. now that we have the usage policy out of the way I went ahead and starting playing with the data.
    Natural Earth exposes the data as a zip file which contains ..shp. files. shp files contain very basic information about the polygons that compose the different countries borders. here is a sample zip file (unzip it to find the actual shp file)
    Following the understanding how shp files are structured it was relatively easy to read those values , construct polygons and draw those polygons on a bit map.

    The results can be shown below. To make sure the these images are free to use , the world map images linked below are licensed under which basically means that you can do what ever you want with these images , remix them, embed them in your projects or even sell them on ebay , furthermore , no credits or links are required when you use those. hope that makes it clear enough that these images can be used for free.
    If youe conscious doesn’t allow you to take something for free without saying thanks, just put a link to to this post and that should suffice. But again , you don’t have to.

    So here are the free to use world countries maps:

    A simple black and white


    2 colors Large version


    A greenish version


    Greenish Large version

    And multicolor


    Multicolor Large version


    Just be aware that the data which these maps are based on is take from the Natural Earth website. I just took at as is without any modifications or corrections. if you do find any mistakes or errors , I encourage you to read the information in the Natural earth website in the about page and corrections page as well. send me a note as well in case the maps are becoming outdated and when there is a need for new maps.

    Hope this helps.

    More Related Links

    SharpMap - mapping library for use in web and desktop applications


  • Windows Server Core 2008 R2 - Help tip #1 - Server Default Name

    This might be simple, but also tricky if you don't know where to look for. Once installed, Server core has a default name assigned.
    To get it , just run ipconfig /all in the command line.
    The first line will include the server's default name.

    Now, if you want to change it or join it to a domain , follow this post.


  • Guest Post on the ISABlog - Keeping High Availability with Forefront TMG’s ISP Redundancy Feature

  • Deepzoom with Silverlight 2.0 First Hands Example

    I was looking for an interesting starting point to getting my hands dirty with Silverlight. Deepzoom caught my attention. It is basically a Silverlight component that let's you zoom in and out into an image. While there are some examples out there that utilize and showcase it, most of them are pretty basic and not that practical. While back I wrote a small app that composes a target image mosaic out of smaller images, but back than , I had to use Zoomify to provide a zoom in and zoom out interface. Now with Deepzoom, I wanted to check it out.

    Tropical Fruits - Original Oil Painting by wizan.

    So here is the final result, it is basically an image broken down to pixel size images that are matched to images that serve as the tiles of the original image. Now that we have the matching tiles, we can simply compose the original image. The only challenging is  point here is to break the new image into Deepzoom format. For that I used this good codeproject published project. Because the end result is almost 200MB , I've decided to share a video showcasing a silverlight ASP.Net embedded page.


    What is shown here is the Deepzoom running in an IE7 window with the composed mosaic image.

    It would be cool to have this online application that let's you upload images and build the last uploaded image from all of the previously loaded images.
    I'll share more technical information on this on later posts , so stay tuned.

    BTW, here is a cool Michael Phelps mosaic, hand made. It would be nice to have a computer software to do this.

  • Halloween Fun - Embedding Ghosts Watermark in images with C#

    For those of you who are going to celebrate Halloween on the 31st , here is a nice cool thing to do with C# and System.Drawing library.
    In this post I'll show you how to use C# to embed a ghost image with a background image.

    First we'll pick out the ingredients:
    A ghost image

    And for background I've picked a times square shot taken by barcoder96


    ok, now that we have these, let's start getting our hands code dirty.
    open up a console project , and add the System.Drawing reference by adding a using System.Drawing;
    Next, type in the following code

    Image backImg = Image.FromFile("e:/pictures/times.jpg");
    Image ghostImg = Image.FromFile("e:/pictures/ghost.png");
    Graphics g = Graphics.FromImage(backImg);
    g.DrawImage(ghostImg, backImg.Width/2, 10);

    What's happening here is that we basically load up our background image and foreground image, we acquire a graphics object from the background image, and use it to paint over the foreground image. Looks simple, right ? here is the result


    But to make it more ghost realistic (there's an oxymoron for you), we'll make the ghost more transparent

    for that, I'm using an image color manipulation trick I first saw here (and there's also a good one here)
    The Matrix33 value below sets the level of opacity or transparency. 0 is full transparency , 1 is no transparency at all.
    The matrix multiply all of the colors with the new opacity value which "fades" out the colors and thus gives it the requires transparency.

    Bitmap transparentGhost = new Bitmap(ghostImg.Width, ghostImg.Height);
    Graphics transGraphics = Graphics.FromImage(transparentGhost);
    ColorMatrix tranMatrix = new ColorMatrix();
    tranMatrix.Matrix33 = 0.25F; //this is the transparency value, tweak this to fine tuned results.
    ImageAttributes transparentAtt = new ImageAttributes();
    transparentAtt.SetColorMatrix(tranMatrix, ColorMatrixFlag.Default, ColorAdjustType.Bitmap);
    transGraphics.DrawImage(ghostImg, new Rectangle(0, 0, transparentGhost.Width, transparentGhost.Height), 0, 0, transparentGhost.Width, transparentGhost.Height, GraphicsUnit.Pixel, transparentAtt);
    g.DrawImage(transparentGhost, backImg.Width / 2, 10);
    Which gets us to this better version


    And if you iterate it some more , and give it some skewing you can get the following result.


    For achieving this , you can use the YAEL C# image manipulation library which provides a watermark image filter

    Or trying this Halloween Ghosts Image filter online at

  • Tagging Images with GPS coordinates. Now the lightweight app.

    In one of my previous posts I showed how to embed GPS coordinates to jpeg images using C#. It is mainly useful if you're using a maps+pictures services such as or or any other kind of mapping and pictures solutions.
    My GPS buddy is a nifty HOLUX M-241 GPS  among the regular location, speed, direction, time it can also records tracks, and on top of that it's rather cheap
    But unfortunately its image GPS coordinates embedding feature doesn't work so well.

    So here is a little app to solve do that , it is basically an image GPS coordinates tagging solution. And it can be used with any other GPS that tracks data and can export the data as KML files.

    Here are the 3 simple steps to use it  (Please note that this application is just on its Beta stage, it doesn't come with any warranty, so use at your own risk)

    1. GPS and Camera Time Sync - Before the shooting session starts, make sure your camera time is synced with your GPS time - "synchronize your watch gentlemen". This is critical to couple between the GPS sample and the appropriate picture that was taken at that point. Also make sure your GPS sample rate is as frequent as can be (I for example, take a waypoint record every second)
    2. Shoot - Go out and take some pictures. Download your pictures to a folder, and export your waypoints as a KML file (hopefully this app would support more formats in the future)
    3. Geotag - Run the application, show it where the pictures folder and KML file are, hit the GO button.


    And that's basically it, now your photos are tagged with their relevant GPS location. Once you upload them to any of the services listed above , they would be automatically placed on the map.

     image image  image

    Since this is a technology blog, I feel obligated to share a few words on the technology. This solution is actually being deployed with the ClickOnce technology. Here is a quote of what it is from MSDN
    "ClickOnce is a deployment technology that allows you to create self-updating Windows-based applications that can be installed and run with minimal user interaction. ClickOnce deployment overcomes three major issues inherent in deployment..."


    One of the advantages of this feature that fits like a glove to this solution is that it comes prebuilt with an update check mechanism (as seen in the image above). You can configure  it to look for newer versions each time the application starts, and if there is , it automatically download and installs it on the client machine. Developing this functionality from scratch can be really tedious. If you're into releasing small foot print, specific focus solutions, I strongly recommend  reading more about it. It's not that it is perfect, ClickOnce has it's own issues, but for most cases (especially for these kinds of micro solutions)  it will be enough to take the overhead of working on an additional setup feature.

  • Using Live Maps to Show Beijing 2008 Medals Distribution by Contry

    I've was looking for an interesting project to get my hands on live maps API. Just to get the hang of developing cool application on top of Live maps.

    I've started this Olympics Medal Count + Community Contributed Data + Live Maps Mashup

    And It's almost complete.

    Take a look at this Beijing 2008 Medals Count on Live Maps


    If you want to help complete the picture, make your contribution to this wiki page

    Want to get a grip on the Live Earth SDK as well, here is your starting point [Live Earth SDK]

    Bookmark and Share
More Posts Next page »