Craig Eddy's Space

Various musings from the nether reaches of Craig's brain

Updating Apps on the Nook Color

leave a comment »

I couldn’t figure out how to do it. I saw a tweet from @my6sense regarding the updated version (1.2) of their app for the Nook Color.

I naturally went to the App Marketplace on my Nook. Found the app list in the market, the button was labeled “Open” since I already have it installed. Hmmm, was expecting an “Update” button or something (like on the Android phones’ Market app).

Looked at the app’s details. Said it was version 1.0.1 (or something). Maybe it hadn’t been posted yet?

Went to the blog at http://blog.my6sense.com/ and saw the article announcing the new version. And that’s where I found the correct instructions for updating an app on the Nook Color: you have to go to the device’s Apps menu item, then click the “refresh” button at the top-right of the screen and viola’, updated apps to install!

Written by hokiecraig

May 18, 2011 at 11:08 pm

Posted in Nook Color

Helpful Links I Discovered This Week

leave a comment »

Earlier in the week, I needed to know how to write a SQL Server query that would return the newest records from among a group of records.

For example, the user may have entered data for Category A in 2009 and 2010, and for Category B in 2009, 2010, and 2011 (a total of five records). I wanted to get the newest record for each category (A and B). I found this great article describing have to do this using the SQL Server RANK() function:

http://weblogs.sqlteam.com/jeffs/archive/2007/03/30/More-SQL-Server-2005-Solutions.aspx

Next, I needed to find out how to add tooltips to individual cells of the Telerik RadGridView for WinForms control. Found this handy post:

Add customise tootip to RadGridView cell on Mouse Hover or Enter

And finally, how to format the background color of certain cells:

http://www.telerik.com/community/forums/winforms/gridview/changing-fore-and-background-color-of-headers-at-runtime.aspx

Enjoy!

Written by hokiecraig

May 18, 2011 at 10:40 pm

WPF Viewer for the Windows Azure Thumbnails Sample

leave a comment »

Not content with simply using the web role to view thumbnails generated by the Windows Azure “thumbnails” sample, I decided to write a WPF client.

Once I got my head re-wrapped around data binding with the WPF ListView (it’s amazing how quickly we forget such things when we get old), it was a piece of cake. As usual, WPF does most of the work for you.

The only drastic change I had to make was in the creation of the StorageAccountInfo instances. The storage client library uses <appSettings>-based settings, but WPF only seems to work with settings in the Project properties. So instead of using the helper methods in the storage client library (StorageAccountInfo.GetDefaultBlobStorageAccountFromConfiguration and StorageAccountInfo.GetDefaultQueueStorageAccountFromConfiguration), I just manually created instances of StorageAccountInfo:

new StorageAccountInfo(
   new Uri(Settings.Default.BlobStorageEndpoint), 
   true, Settings.Default.AccountName, 
  Settings.Default.AccountSharedKey, false)

The other change was to the LINQ query used to retrieve the URL of the thumbnail image and assign it to the ListView’s ItemsSource property:

thumbnails.ItemsSource = from o in 
   GetPhotoGalleryContainer().ListBlobs("thumbnails/", 
   false) 
select o;

The code for the GetPhotoGallerContainer() method (and the methods that it calls) were copied directly from the web role project’s default.aspx.cs file. I removed the static qualifier from the copied code, as it seemed unnecessary in a WPF application.

The source code can be found at here.

Written by hokiecraig

February 24, 2009 at 4:58 pm

Using Linq XML with the WeatherBug API

leave a comment »

If you have access to the WeatherBug API, you can easily use LINQ queries to get to the data. I had originally thought I’d create the necessary classes and use XML serialization to load data, but this seemed like a lot of work.

Here’s some code that will load a ListView with a list of weather stations for a given latitude and longitude:

string url = string.Format( 
"http://api.wxbug.net/getStationsXML.aspx?ACode={0}&lat={1}&long={2}", myApiCode, latitude, longitude ); XDocument doc = XDocument.Load( url ); var stations = from station in doc.Root.Elements().Last().Elements() select station; foreach (var station in stations) { listView1.Items.Add(new ListViewItem( new string[] { station.Attribute("name").Value, station.Attribute("id").Value, station.Attribute("city").Value, station.Attribute("country").Value, station.Attribute("citycode").Value, station.Attribute("latitude").Value, station.Attribute("longitude").Value })); }

Written by hokiecraig

February 15, 2009 at 4:37 pm

Posted in .Net Development

Which Will You Use Today?

leave a comment »

I’m finishing up Rich DeVos’ Ten Powerful Phrases for Positive People. Which of these will you use today?

  1. I’m wrong
  2. I’m sorry
  3. You can do it
  4. I believe in you
  5. I’m proud of you
  6. Thank you
  7. I need you
  8. I trust you
  9. I respect you
  10. I love you

On a side note, I was amazed to read a multi-billionaire make the following statement:

"I was a happy child despite few material possessions. I continue to be a happy person today. But my wealth has not made me any happier than when I was a kid growing up during the Depression."

Maybe, just maybe, it’s that attitude & mindset that helped Rich DeVos achieve what he’s achieved…

Written by hokiecraig

December 14, 2008 at 9:59 pm

Posted in Uncategorized

Follow

Get every new post delivered to your Inbox.