Wednesday, October 14, 2009

VS Debugger: No Source Code Available for the Current Location

When the Visual Studio debugger can't find the source for your code, it will prompt for a location. If you make the mistake of hitting "cancel" on that dialog, it will mark it down on the solution properties under "do not look for these source files". If it's not removed from that list, then the debugger will display the "No Source Code Available for the Current Location" dialog box while you pull your hair out.

This helped: MSDN article about the dialog box. (Found this reference through this forum.)

Look at the solution properties. Under "Common Properties," go to "Debug Source Files". Look in the "Do not look for these source files" box and remove the source file that it's having issues with. While you're at it, add directories as needed in the "Directories containing source code" box.

(this refers to VS2008)

Tuesday, October 13, 2009

Ordering stylesheets and scripts

See the Google Code article about Properly Including Stylesheets and Scripts.

If it looks like your external stylesheets aren't being recognized, try moving them before the script files.

Thursday, September 24, 2009

Using CASE in WHERE clause

After much searching, I found that yes, you can use CASE expressions in the WHERE clause of a PL/SQL SELECT statement. The article titled case expressions and statements in oracle 9i provides excellent examples and even explains the impact on query plans.

Friday, September 18, 2009

Adding EXIF datestamps and IPTC info on images

This applies to JPEG images from today's digital cameras which do not stamp the date and time on photos. Uses Irfanview to add a white frame around the image and stamps information (copyright text, date, time, caption, city, state, etc.) on the bottom edge.
For more info, Google "EXIF" and "IPTC".

These notes are based on Irfanview version 4.25.
  1. Download Irfanview and install. Make sure to install the plugins also.
  2. Enter IPTC info for your images:
    • Open an image in Irfanview, then press "T" to go to Thumbnails view.
    • Select one or more images.
    • Press "Ctrl-I" to open the IPTC Information dialog.
    • Enter values for the Copyright, Caption, origin info, etc. Note that this information could also be used to batch-rename the photos, so put in as much info as you can. Add keywords too, which will be useful if you plan on uploading the images to the web.
    • Check the settings in the "Options" tab, then save your changes.
  3. Do a batch-conversion to add the frame and the stamp:
    • Select one or more thumbnails and press "B" to open the Batch dialog.
    • Main batch conversion dialog settings:
      • Work as: Batch conversion
      • Output format: JPG - JPG/JPEG Format
      • Use advanced options: checked
      • Output directory for result files: set this to some folder separate from your original files folder (you will want to keep your originals as-is)
      • Select thumbnails and click the "Add" button, or click the "Add all" button.
    • Output format (JPEG/GIF save options)
      • Save quality: 100
      • Keep original EXIF data: checked
      • Keep original IPTC data: checked
      • Keep original JPG-Comment: checked
      • Set file size: Set this to something close to your original file size (I have it set to 4400.00 KB). This is the cool thing about using Irfanview to add datestamps/watermarks--you could get close to your original file size. I've tried other apps and they tend to add around 2Mb to the file size after watermarking.
    • Advanced settings:
      (You might want to save these by clicking the "Save settings" button. Note that this version of Irfanview does not save the Canvas Size settings.)
      • Canvas size: checked
      • Canvas settings:
        left=60
        right=60
        top=25
        bottom=55
        border color=white
        (This is set for images at 3:2 aspect ratio, and are meant to maintain the aspect ratio, thus the thinner top. These values are based on originals at 3648 x 2736 pixels.)
      • Add overlay text: checked
      • Add overlay text settings:
        X-Coord: 80
        Y-Coord: 0
        Width: 3500
        Height: 50
        Start Corner: Left Bottom
        Text: $I116 [$E306(%Y-%m-%d %H:%M) $I90 $I95] $I120
        Text is transparent: unchecked
        Background color: white
        Font: Calibri, Size:36
        Text alignment: Left
        (Click on "Help" to see what values are available for the Text value. Pick a font that is easy to read and that doesn't take up too much space.)
      • Miscellaneous:
        Overwrite existing files: checked
        Delete original files... : unchecked!
        Create subfolders... : checked
        Save files with original date/time: checked
        Apply changes to all pages... : checked
      • Everything else: unchecked

    • Click on the "Start Batch" button

See samples of the output here...

Thursday, September 17, 2009

Silverlight background

Setting "BackColor" on the Silverlight control won't be enough--it still displays a white box in the beginning. Need to set "PluginBackground" also. Found this answer here.