Wednesday, April 27, 2011

Dan’s Daily Juice

  • Cucumber (1 whole)
  • Kale (5-7 leaves)
  • Spinach (handful)
  • Cilantro (handful)
  • Celery (5-7 stalks)
  • Apple and/or Carrots to sweeten

I would include

  • Beet (1/4 small, 1/8 large)
  • Ginger root (1/2 to 3/4 inch)

Thursday, February 24, 2011

Windows 7 Gadget Development

 

Windows Sidebar

http://msdn.microsoft.com/en-us/library/aa965850(VS.85).aspx

A gadget is an HTML and script-based application designed to present the user with a limited set of information or functionality obtained from other applications, controls, or Web sites and services. Gadgets, although hosted by the Sidebar, are not confined to the Sidebar area; the user can undock and move them onto the desktop as desired.

A gadget is distributed as a .gadget file—a renamed .zip archive—consisting of a collection of XML, HTML, Microsoft JScript, and Cascading Style Sheets (CSS) files. Installation consists of downloading the .gadget file and allowing the download process to install the gadget or saving the .gadget file to the local system and double-clicking to start the installation process.

Users can run multiple instances of a gadget simultaneously. For example, if users want to know the time in different time zones, they can run multiple instances of the clock gadget, setting each clock to a specific time zone. A user might want to view slideshows of pictures from two or more different folders at the same time. This is possible because the gadget platform provides methods to store settings and automatically associate settings with the correct instance of each gadget. All current gadget settings are saved when the user logs out or restarts. If the Sidebar is on by default, then all gadget instances will run automatically upon startup, and each gadget instance will run with the correct settings.

Introduction to the Gadget Platform

http://msdn.microsoft.com/en-us/library/dd370867(v=vs.85).aspx

This topic introduces the Gadget Platform for Windows 7. It discusses the evolution of the Gadget Platform from the Windows Vista Sidebar, the differences between the two platforms, and what you need to know when you transition Sidebar gadgets to the new Windows Gadget Platform.

Windows Sidebar Object Reference

The Windows Sidebar and gadget architecture consists of three components. The functionality of these components is exposed through the scripting elements described in the following sections:

  • Gadget functionality, such as Sidebar and gadget state and event handling.
  • System functionality, such as file, network, and operating system information.
  • Presentation functionality, such as gadget background, image, and text handling.

Other Links

Developing Gadgets for the Windows Sidebar - http://odetocode.com/articles/463.aspx
Script# - http://projects.nikhilk.net/ScriptSharp
Authoring Sidebar Gadgets in C# (with Script#) - http://www.nikhilk.net/SidebarGadgets.aspx
Creating Windows 7 and Vista Gadgets (Book Resource Site) - http://www.innovatewithgadgets.com/

Wednesday, February 23, 2011

Investing Resources–Company lists for NYSE and NASDAQ

NYSE (New York Stock Exchange) complete list of stocks
http://www.nyse.com/about/listed/lc_ny_name_A.html?ListedComp=All

NASDAQ (National Association of Securities Dealers Automated Quotations)
http://www.nasdaq.com/screening/company-list.aspx

Yahoo links for a given ticker symbol – here using MSFT (Microsoft)

Main Page - http://finance.yahoo.com/q?s=MSFT&ql=1

Headlines - http://finance.yahoo.com/q/h?s=MSFT+Headlines

Profile - http://finance.yahoo.com/q/pr?s=MSFT+Profile

Key Statistics - http://finance.yahoo.com/q/ks?s=MSFT+Key+Statistics

Competitors - http://finance.yahoo.com/q/co?s=MSFT+Competitors

Industry - http://finance.yahoo.com/q/in?s=MSFT+Industry

Historical Prices - http://finance.yahoo.com/q/hp?s=MSFT+Historical+Prices

Download Historical Prices

http://ichart.finance.yahoo.com/table.csv?s=MSFT&d=1&e=23&f=2011&g=d&a=2&b=13&c=1986&ignore=.csv

1/23/2011, granularity=d (day), back to 2/13/1969, format CSV (comma separated values)

Friday, February 18, 2011

Apple Cider Vinegar Dressing

From http://www.cooking-mexican-recipes.com/apple_cider_vinegar_recipe.html

This apple cider vinegar recipe is a delicious salad dressing for Mexican food. It seems to blend extremely well with refried beans, spanish rice,enchiladas and especially tostadas.  It compliments these flavors so beautifully that in the restaurant business we used to serve our salads right on the plate with the main meal.  Sure there were a few people who didn't like their salad this way but the majority of people seem to love it.  I still do it this way when we go out for Mexican food. I can be found dumping my apple cider vinegar salad right on top of my beans, rice and enchilada.


Ingredients:

  • 1 cup canola oil
  • 1 cup apple cider vinegar
  • 2 Tbs. honey
  • 1/2 tsp. dried parsley
  • 2 tsp. garlic powder
  • 2 Tbs. water
  • pinch of pepper
  • 1/2 tsp. sea salt

Add all ingredients to a blender and blend for 30 seconds or until well blended.

It would be best to pour the dressing into a bottle that has a top you can shake the dressing out of instead of pouring it. In the past I have used a glass apple cider bottle that had a metal lid. I would poke a hole in the lid with a sharp knife. Other times I have used old plastic dressing bottles that have a shaker top.  This just makes applying the dressing easier. I dislike bottles where the dressing pours out and you end up with a puddle of it on your plate.  The shaker method will distribute your dressing evenly and with better control.  Store the dressing in the refrigerator and it will keep for several weeks.


Another recipe; simple:

  • 3 Tbsp apple cider vinegar
  • 3 Tbsp olive oil
  • salt, pepper to taste

Tuesday, February 15, 2011

jQuery resources/links

Some resources/bookmarks for jQuery.

jQuery (general)

jQuery
http://jquery.com/

jQuery Documentation
http://docs.jquery.com/Main_Page

jQuery API (3rd Party Documentation)
http://jqapi.com/

jQuery Tutorial
http://www.w3schools.com/jquery/default.asp

jQuery UI
http://jqueryui.com/

jQuery, Learning (book support site)
http://www.learningjquery.com/

jQuery Fundamentals (ebook)
http://jqfundamentals.com/book/index.html

50 Amazing jQuery Examples
http://www.noupe.com/jquery/50-amazing-jquery-examples-part1.html

Visual jQuery 1.2.6
http://visualjquery.com/

jQuery Cycle Plugin
http://jquery.malsup.com/cycle/

jQuery Mobile
http://jquerymobile.com/

jQuery Templates (VS Magazine)

    Setting Up for jQuery Templates
    http://visualstudiomagazine.com/articles/2011/01/26/setting-up-for-jquery-templates.aspx

    Displaying and Filtering Data with jQuery Templates
    http://visualstudiomagazine.com/articles/2011/02/08/displaying-and-filtering-data-with-jquery-templates.aspx

    Supporting Updates with jQuery Data Linking
    http://visualstudiomagazine.com/articles/2011/02/14/updates-with-jquery-data-linking.aspx

Monday, January 17, 2011

Simple Backups with Robocopy

Of course, everyone backs up their hard drives, right?  If your system crashes, how much would you lose?  Most likely, something, but I like to try and minimize that answer – I ‘d rather not answer “everything.”

For backing up my C: drive partition, I use Acronis True-Image Home.  I backup the entire C: drive image so I can rebuild it in the event of a catastrophic failure.

Like many other people, however, I have data drives.  To be a little more specific, I have 1TB partitions for “DATA_HOME” and “DATA_WORK”.  These two 1TB partitions will fit on a 2TB HD no problem, but using Acronis is not what I want to do.  Why?  Because Acronis creates a giant backup file (and possibly subsequent incremental backup files) that I need Acronis in order to use.  In addition, if I wanted to create a new backup, I would (due to space reasons) need to delete my old backup before creating the new one.  This is a small window of opportunity for disaster, but one that I will avoid if I can.  And you can.  Easily.  I very much like the idea of having a copy of my data on a separate hard drive that I can access from any computer, without Acronis.

I did some searching around for a good solution and found a utility from Microsoft called “SyncToy”.  At the time I used it, and still now, the most recent is version 2.1.  SyncToy would create a mirror image of my DATA_HOME and DATA_WORK partitions into DATA_HOME and DATA_WORK folders on the 2TB hard drive.  Whenever I wanted to do a backup, I would stick the 2TB backup hard drive into my eSATA slot and run SyncToy to “echo” my partitions to folders on the backup drive.  All seemed good in the world.

But then I noticed a missing folder.  Two, actually.  So I ran SyncToy again to echo the data.  But SyncToy wouldn’t copy the files.  It turned out there was a lot of missing data on the backup.  SyncToy said it had done everything it needed to do and no errors were encountered.  Yet, I could easily verify that there was 22GB (out of 400GB) that was MISSING on my external HD backup!  NOT GOOD!  I verified that the folders and files would not be excluded for some reason (System attribute set? nope!).  I could find no reason.  And so, my trust for SyncToy was lost.  I could not get SyncToy to copy the missing files.  Time to look for an alternative.

Being a software engineer, I thought I would write something myself.  But being a busy person, I didn’t have a lot of time to do that.  So I looked up an old utility I read about that’s included with Windows Vista, 2003 and 7.  It’s a command-line program called ROBOCOPY and it was written a long time ago, in an office far far away.  But it does just the trick.  I ran Robocopy and the 23GB of missing files moved over to the target folder.  Problem solved.

To run Robocopy, I run it with these options:

image

This would copy my G: drive (DATA_HOME) to the backup folder E:\DATA_HOME.  The /MIR option does a mirror operation – copying stuff in the source not in the destination and deleting stuff in the destination that is no longer in the source.  The /XD option is used to exclude the protected Recycle Bin and System Volume Information folders.

Note: you can use the /L parameter (LIST only) and it will go through the motions but not actually do any copying.  At the end of the process, you get a little report of what it would do (or what if did, if you omit the /L option.)

Here is the final report after copying my DATA_WORK partition.  About 75.2GB was copied and it took 4 minutes 18 seconds to complete.

image

A simple batch file, to copy the folders I want backed up, makes backing up my extra partitions and files a snap.  There is another program from Microsoft out there called “RichCopy”, which is newer offering.  I have not spent any time playing with it.  Also, Robocopy has a GUI front-end that you can download and install.  Just google “robocopy gui” to find it.

Thursday, January 6, 2011

2010, what a great year!!

2010 turned out to be one of the best years of my life; 2011 is looking to be even better!
Such a drastic contrast from drama of 2008 and 2009!
It’s going to be an exciting year!!!