Tuesday, December 27, 2011

Introduction to Artificial Intelligence

Introduction to AI
Some time ago I have joined to Introduction to Artificial Intelligence  it is online course that is based on Stanford CS221, Introduction to Artificial Intelligence.
This class introduced students to the basics of Artificial Intelligence, which included machine learning, probabilistic reasoning, robotics, and natural language processing.
My reason to join this class was simple I wanted to know more. I took 82% it isn't so bad for not native speaker.
If you want to get more you can join a lot of next online courses - http://www.class-central.com/

Tuesday, August 16, 2011

Trouble with resources in WP7

I started a few projects on WP7. It was done just for fun and for improving my skills (Fun was profitable - I won in Ukrainian WP7 competition). So I had completed my projects and tried to localize it.
I met some issues:
  1. If you have experience in developing for web silverlight - first isn't new for you. When I edit/add/remove a item in resources's file I need to open resources designer's file and change access modifiers of parameterless constructor from "internal" to "public".
    It is know issue and know fix - proof.
  2. Second was new for me. It is strange issue because it appeared only in one of my projects. I created resources file and added key in Resources section of app.xaml (for binding to resources in my xaml files). My project started to crash after this.
    I had spent some time and found source of the issue. I noticed that Resource class (auto generated) is internal. I checked "Custom tool" field in properties of resource file. It was filled "ResXFileCodeGenerator" value. In my other projects this field contained "PublicResXFileCodeGenerator" value. I didn't found detailed description of "ResXFileCodeGenerator" but looks like that it is obsolete tool. I no idea how to it was set in my project.
One more note: it is for WP7 without "Mango" update. I hope I will not meet such issues after this update.

Monday, February 7, 2011

Trimmed TextBlock for Windows Phone 7.

Unfortunately WP7 is based on Silverlight 3. So we can't use some nice features of Silverlight 4 i.e. dynamic key word or TextBlock's trimming. But I've solved issue with trimming for Silverlight 3. Solution is here. Let me explain which code I use in WP7 project:
  • Generic.xaml: File contains style and template for custom control. This file is located in Themes folder. WP7 tools doesn't contains Resources.xaml file template. So I created xml file and name it as "Generic.xaml".
  • TrimmedTextBlock.cs: It is implementation of custom control. I just copied this file. One more note: I decrement c_POINTS_COUNT to "1" because screen resolution of desktop and mobile versions are different.
Easy coding.