Sunday, December 23, 2007

Playing around with stereo images I wanted to judge the 3D effect immediately. To do so I created a small tool displaying the image by alternating between the left eye / right eye picture. Maybe it is also useful for you.  

See the binaries or the sources.

Sunday, December 23, 2007 9:11:39 PM (GMT Standard Time, UTC+00:00)

Catching oneself using a mobile phone as replacement for a torch? This simple windows mobile app does nothing more than displaying the brightest white in fullscreen mode. Sometimes quite useful :)

Developed for PPC 2003, Windows Mobile 5 and 6. The .NET Compact Framework 2.0 (Service Pack 1 Redistributable) is also required. Torchy was tested successful on WM6, but not on the other platforms. Maybe someone out there wants to try it out and drop a comment.

Download the installer or the sourcecode.

Sunday, December 23, 2007 9:05:51 PM (GMT Standard Time, UTC+00:00)
 Wednesday, December 12, 2007

Public request for instant-on mechanisms on hardware coming along with decreasing prices on flash memory, tend manufactures to enhance their devices by flash based techniques. Some months ago Erdgeist and Frank Rieger held a nice talk about this trend and security related issues coming along. I like to sensitize by listing some of the main points:

  • Flash buffered hard drives could mean writing back whole main-memory content to flash.
  • Keep in mind that crypto-keys could be contained in memory dumps and so they also could be copied to the flash memory without your intend.
  • Flash memory is accessed via FAT mechanisms. Deleting a file will not delete its information physically; it just deletes an entry in the FAT. So watch out selling your old cards on eBay or be amused buying them :)
  • When a cell dies the current state (0/1) can still be read. So dead memory cards are nice toys for computer forensic investigators.
  • Flash memory cells write-cycles are limited to 10K or 1M times.
  • To avoid that some cells are massively accessed while others do not, manufactures built in algorithms to distribute access to the cells. So sensitive data could be automatically copied and is now spread multiple times on the card without your intention.
  • So before selling used memory, fill the cards with large files of useless data before deletion.
  • Use encryption for sensitive data.

Along with every security related issue: It is not meant to spread paranoia but it doesn't hurt knowing what's possible with our beloved daily gadgets.

 

The complete content can be found here or here.

Wednesday, December 12, 2007 9:36:05 PM (GMT Standard Time, UTC+00:00)
 Tuesday, June 19, 2007
Another crazy gameshow on japanese television. Its time for human tetris. Just awesome :)

Fun
Tuesday, June 19, 2007 9:39:37 PM (GMT Standard Time, UTC+00:00)
 Wednesday, April 18, 2007
With all this Web 2.0 here and social networking there, it's time for some social marketing :)

"i’m" is a new initiative from Windows Live™ Messenger. Every time you start a conversation using "i’m", Microsoft shares a portion of the program's advertising revenue with some of the world's most effective organizations dedicated to social causes.

Just add one of the following strings behind your messenger name and start chatting:

  • *red+u (American Red Cross)
  • *bgca (Boys & Girls Clubs of America)
  • *naf  (National AIDS Fund)
  • *mssoc (National Multiple Sclerosis Society)
  • *9mil (ninemillion.org)
  • *sierra (Sierra Club)
  • *help (StopGlobalWarming.org)
  • *komen (Susan G. Komen for the Cure)
  • *unicef (The US fund for UNICEF)

http://im.live.com/Messenger/IM/Home/

Wednesday, April 18, 2007 1:31:58 PM (GMT Standard Time, UTC+00:00)
When multiplying a given TimeSpan, the obvious way does not work. As a solution you may instantiate a new TimeSpan object with ticks multiplied being the parameter.

TimeSpan test1 = new TimeSpan(0, 0, 5);

//TimeSpan test2 = test1 * 2; // does not work

TimeSpan test2 = new TimeSpan(test1.Ticks*2); // works

Wednesday, April 18, 2007 1:29:13 PM (GMT Standard Time, UTC+00:00)
 Friday, April 13, 2007
Problem: Adding an image to your project without the need for being deployed to the output folder. So it will be included in the assembly itself.

Solution: Change properties of image to "Build Action: Resource" and "Do not copy". Reference it in one of the following ways:

In the local assembly:
pack://application:,,,/texture.jpg

In a referenced assembly:
pack://application:,,,/ReferencedAssembly;component/texture.jpg

Example:

ImageBrush imageBrush =

    new ImageBrush(new BitmapImage(

    new Uri("pack://application:,,,/texture.jpg", UriKind.Absolute)));


A descriptive article on pack URIs can be found here.
WPF
Friday, April 13, 2007 8:43:59 AM (GMT Standard Time, UTC+00:00)
 Thursday, March 29, 2007
My colleague Sergey just announced publishing the experiences he made with Windows CardSpace. It will be packaged as newtelligence CardSpace SDK and contain an API for different aspects of CardSpace programming, like issuing information cards, issuing security tokens, authentication for web and for windows applications.

The API and a reference application should significantly help developers to use CardSpace in their applications.
WCS
Thursday, March 29, 2007 8:06:02 AM (GMT Standard Time, UTC+00:00)
 Wednesday, February 28, 2007
Analysing a colorchooser in WPF, I came to the point not only binding to a single element property but also to multiple properties. The color of a rectangle should change according current values of 4 sliders. Suppose the sliders are named with "slAlpha", "slRed", "slGreen", "slBlue".

Resulting screenshot:

A multiple binding in XAML is then declared in the following way:

<Rectangle Name="rtColor" Margin="25">

  <Rectangle.Fill>

    <SolidColorBrush>

      <SolidColorBrush.Color>

        <MultiBinding Converter="{StaticResource convertColor}">

          <MultiBinding.Bindings>

            <Binding ElementName="slAlpha" Path="Value" />

            <Binding ElementName="slRed" Path="Value" />

            <Binding ElementName="slGreen" Path="Value" />

            <Binding ElementName="slBlue" Path="Value" />

          </MultiBinding.Bindings>

        </MultiBinding>

      </SolidColorBrush.Color>

    </SolidColorBrush>

  </Rectangle.Fill>

</Rectangle>

But now how do we transfer the 4 slider values to one single brush color? Note the "Converter" property. It maps to a static resource named "convertColor" declared within the window container:

<Window.Resources>

  <local:ConvertColor x:Key="convertColor" />

  <ImageBrush x:Key="newtelligencelogo" TileMode="Tile" Viewport="0,0,240,51" ViewportUnits="Absolute" ImageSource= "newtelligencelogo.bmp"/>

</Window.Resources>

It serves as link between XAML and some conversion functionality in code. So what is still missing is a class implementing the IMultiValueConverter interface doing the color mixing. It must be named as the type specified in the resource tag:

public class ConvertColor : IMultiValueConverter

{

    public object Convert(object[] values, Type targetType, object parameter, System.Globalization.CultureInfo culture)

    {

        float alpha = (float)(double)(values[0]);

        float red = (float)(double)(values[1]);

        float green = (float)(double)(values[2]);

        float blue = (float)(double)(values[3]);

 

        return Color.FromScRgb(alpha, red, green, blue);

    }

 

    public object[] ConvertBack(object value, Type[] targetTypes, object parameter, System.Globalization.CultureInfo culture)

    {

        throw new NotSupportedException("Not supported");

    }

}

For the Visual Studio 2005 solution click here.

WPF
Wednesday, February 28, 2007 9:12:44 AM (GMT Standard Time, UTC+00:00)
This is an addition to my article on how to deploy resources used within unit tests.

A Visual Studio 2005 Team System solution containing at least one unit test project, also includes a configuration file, which is used to setup your test runs ("localtestrun.testrunconfig" in the example below). Its deployment section may be used to specify which files or directories should be deployed for the run.

Wednesday, February 28, 2007 8:49:19 AM (GMT Standard Time, UTC+00:00)
 Thursday, January 25, 2007
Running Visual Studio unit tests with a bunch of different files to be deployed is quite inconvenient. See what Sergey found out on that issue here.

Suppose you have several tests all using x different files, which are to be deployed separately. So currently there seemed no other way than adding x different deployment attribute values on each test:

[TestMethod]

[DeploymentItem("testfile_1.txt")]

[DeploymentItem("testfile_2.txt")]

   ...

[DeploymentItem("testfile_x.txt")]

public void MethodXzyTest()

{

}

A convenient solution is to move those files into a separate folder (here "TestData") within the Visual Studio solution. Now only this folder needs to be specified as deploymentitem:

[TestMethod]

[DeploymentItem("TestData\\")]

public void MethodXzyTest()

{

}

However, what still seems to be missing is a way to declare deployment items at some central place within the test class.

Thursday, January 25, 2007 5:14:33 PM (GMT Standard Time, UTC+00:00)
With some hardware companies announcing their first 1000 GB hdd bricks, it is time to google for the next abbreviations succeeding the "GIGA" barrier: Mega (10^6)

Giga  (10^9)
Tera  (10^12)
Peta  (10^15)
Exa   (10^18)
Zetta (10^21)
Yotta (10^24)

More prefixes.
Thursday, January 25, 2007 5:09:55 PM (GMT Standard Time, UTC+00:00)
Latest Postings
Tags
History
<December 2007>
SunMonTueWedThuFriSat
2526272829301
2345678
9101112131415
16171819202122
23242526272829
303112345
License
Except where otherwise noted, content on this site is licensed under Creative Commons Attribution 3.0 Unported License:
Creative Commons Attribution 3.0 Unported License