Disclaimer: While this article was written before I started working at SoftArtisans, I do work at SoftArtisans now.  Support for SoftArtisans products can be found at http://support.softartisans.com/

So today I tried out a product from SoftArtisans called OfficeWriter specifically the WordWriter feature. You can find a Demo here. I set out to create an application that would allow me to fill in a form and generate mailing labels to be printed. I found out that with SoftArtisans product this was extremely easy.

First I created a Mail Merge template in Microsoft office. You can download a copy of my Label Template if you would like.

Then I wrote the following code:

  protected void generateBtn_Click(object sender, EventArgs e)
        {
            // Variables
            object[] arrValues = { firstNameTxt.Text, lastNameTxt.Text, addressTxt.Text, cityTxt.Text, stateTxt.Text, zipCodeTxt.Text };
            generateLabels(arrValues);

        }

        private void generateLabels(object[] arrValues)
        {
            WordTemplate wt = new WordTemplate();
            wt.Open("C:/labels.doc");
            string[] arrNameFields = { "First_Name", "Last_Name", "Address_Line_1", "City", "State", "ZIP_Code" };

            //Bind Mail Merge Fields with Data
            wt.SetDataSource(arrValues, arrNameFields);

            wt.Process();
            //Save to browser
            wt.Save(Page.Response, "Labels.doc", false);
        }

with the following front end:

When opening the generate document I had the following output:

You can download my solution here, but remember that you need an Office Writer license or you must be using the demo license.

So in one of my recent projects I had to parse a Flickr feed and extract the image urls the code I came up with is as follows:

<?php
/* Author: Samuel Haddad
 * SimpleXML Flicker Feed Parser
 */
//Feed URL in RSS Format
$url ="http://api.flickr.com/services/feeds/photos_public.gne?lang=en-us&format=rss_200"; //FEED URL

//Use simple XML to parse the feed
$xml = simplexml_load_file($url);
$items = $xml->xpath('/rss/channel/item');
foreach($items as $item){
 $nsmedia = $item->children('http://search.yahoo.com/mrss/');
 $img = $nsmedia->content->attributes();
 echo $img; //URL of Image
 echo "<br/>";
}
?>

Of course my code did more then just extract the URL, but I will leave the rest up to the creative developers.

Download:

Click here to download Pandora Keys from:https://samuelhaddad.com/downloads/pandorakeys/

Source Code:

https://github.com/SamPlusPlus/Pandora-Keys

Features:

  • Media Key support
  • Customizable keyboard shortcuts
  • Control Pandora from any application.
  • Auto updater for new features

Screenshots:

Desktop Application for Pandora.com

Requirements:

  • .NET 4.0
  • A Pandora.com account
  • Enjoy listening to music

Why Did I make this?:

I am a big fan of both Pandora, Jango, and streaming music in general.  I think they are great. However, I also feel that being a web-based application they lack features that exist in a desktop media player. For example, keyboard shortcuts and notifications are features I cannot live without.  After creating a desktop wrapper for Jango.com called Jango Desktop. I set out to create one for Pandora. There were already a few on the market, but I found they did not do what I wanted or were no longer being developed. My favorite used to be Open Pandora however it no longer seemed to be supported and many of the features no longer work. My code is based on the Open Pandora project but has the functionality that I was looking for.

Contribute:

Pandora Keys is open source. Please check out the project and jump right in. Programmers, graphic designers, or just your ideas, whatever your skills may be you are welcome to join the fun.

Donate:

coffee_128x128Do you like my work? How about buying me a coffee?

Disclaimer:

Pandora Keys is in no way affiliated with www.pandora.com. By downloading Pandora Keys you claim full responsibility for the use of this application.

Recently I was trying to commit to my Jango Desktop project hosted on Google code. I was using AnkhSVN and I kept getting an error similar to:

SharpSvn.SvnRepositoryIOException: Commit failed (details follow): ---> SharpSvn.SvnRepositoryIOException: Server sent unexpected return value (405 Method Not Allowed) in response to MKACTIVITY request for

If anyone else runs into this issue I was trying to commit to the read only repository. An easy way to tell if this is your issue is to look at the repository url. Google’s commit repository starts with https: // not http://

If this is your issue log into Google code to obtain the correct repository url.