Google Photos Screensaver on Windows 7 x64

I really like the Google Photos Screensaver because of it’s excellent visual effects options like the “Ken Burns effect” aka “Pan and Zoom“:

image

And it works great on dual monitors too by showing different pictures on both. As you can see from the settings image above, it can load images from the web, rss, or your local machine.

Oh and it’s free! Smile Get the screensaver by installing Picasa, Google’s awesome photo manager: http://picasa.google.com/ (The Google Photos screensaver used to be part of the now defunct “Google Pack”.)

Unfortunately, the Google Photos screensaver has an annoying issue if you run it on a Windows 7 64 bit machine. It will cause screen flickering and not show any of the images you asked for!

Why? Because of the “On resume, display logon screen” option:

SNAGHTMLf3e0423

The solution is to uncheck that the “On resume…” box. This sucks if you like to have your machine auto-locked when the screensaver kicks in. Not a big deal for me since I’m used to using the “Window+L” keys to lock my machine.

Sadly, Google has known about this bug for almost 3 year now and it’s still not fixed. Since they’ve started focusing more on their profitable products (right move, imho), it’s unlikely that we’ll see bugs like this get fixed. Oh well. Google Photos Screensaver is still fantastic. Better than the Windows Live Photo Gallery screensaver, imho. Winking smile

Free data sets – Northwind alternatives

data-computer-keysAt my day job, I write a lot of demos for videos, webinars and basically to help customers/developers. And the number one source of data used for these demos? Northwind.

Why?

  1. Great set of various data to bind to different things like grids, reports, and charts.
  2. It is used by many Microsoft samples.
  3. Available for SQL Server and Microsoft Access.
  4. Easily distributable.

So what’s problem? It’s a bit boring to always use the same set of data. In fact, Scott Hanselman even tried to stir the community with a call to action to come up with sources other than Northwind. That was back in 2008 and unfortunately, not many other sources were offered.

So, I’ve scoured the internet and below are several resources that I’ve found. Warning: You may need to “clean-up” this data. And you may also need to import it to your database of choice.

Fresh Data For Free

Good news, it’s easy these days to find interesting sources of data. And for free. If you’re willing to dig around and clean up some of the data, it’s right there for the taking.

Here’s a few:

freebaselogo FreeBase.com Freebase is a large collaborative knowledge base consisting of metadata composed mainly by its community members.

Freebase data is available for free/libre for commercial and non-commercial use under a Creative Commons Attribution License, and an open API, RDF endpoint, and database dump are provided for programmers. -Wikipedia

Download the latest dumps directly from here:

http://download.freebase.com/datadumps/Browse the latest dumps

Government Data

The US government has made available lots of government data. Not all of it is interesting or even ‘clean’. However, there is lots of data:

Other sources

For reference – Stackoverflow -

Amazon Web Services offers some public data sets as well. Though you will need an Amazon EC2 account.

Tim Berners-Lee on the next web

Here’s an interesting talk about data and the next web from the father of the internet, Tim Berners-Lee:

Do you have other sources of data? Drop me a note below. Thanks!

ASP.NET HTML Editor – Keyboard Shortcuts

Keyboard shortcuts are great. Especially when you’re writing in an online HTML editor, because they don’t require you to take your hands off the keyboard!

The DevExpress ASPxHtmlEditor editor provides many popular keyboard shortcuts as defaults.

And in the latest release of DXperience v2011.2, we added the ability for you to customize these keyboard shortcuts for your end-users (S38048).

Default Shortcuts

Here’s the list of the default ASPxHtmlEditor keyboard shortcuts.

Notice that the ASPxHtmlEditor provides a way for you to create hyperlinks using the common ‘Control + K’ keyboard shortcut found in many popular office products. Personally, I love that shortcut!

Try it now online: http://demos.devexpress.com/ASPxHTMLEditorDemos/Features/General.aspx

Shortcut ActionName Description
Ctrl+A selectall Selects the entire content
Ctrl+B bold Applies bold formatting to the selected text
Ctrl+C kbcopy Copies the selection
Ctrl+E justifycenter Justifies text center
Ctrl+G insertimagedialog Invokes the Insert Image Dialog
Ctrl+I italic Applies italic formatting to the selected text
Ctrl+J justifyfull Justifies text
Ctrl+K insertlinkdialog Invokes the Insert Link Dialog for the selection
Ctrl+L justifyleft Justifies text left
Ctrl+P print Prints the editor’s content
Ctrl+R justifyright Justifies text right
Ctrl+U underline Underlines the selected text
Ctrl+V kbpaste Pastes content from the clipboard
Ctrl+X kbcut Cuts the selection
Ctrl+Y redo Redoes the last undone action
Ctrl+Z undo Undoes the last action
Ctrl+Ins kbcopy Copies the selection
Ctrl+Shift+K unlink Unlinks the selection
F11 fullscreen Activates/deactivates the full-screen mode
Shift+Del kbcut Cuts the selection
Shift+Ins kbpaste Pastes content from the clipboard

 

Customization

There are two ways to customize the keyboard shortcuts, at design-time and runtime.

Design-time

In fact, you can redefine default shortcuts and create custom shortcuts at design time in two ways: using a shortcut editor or directly in a markup. To display the shortcut editor, click the Shortcuts property’s ellipsis button in the Properties window while designing.

ASPxHtmlEditor - Design Time Customization

The code sample below demonstrates how you can specify shortcuts in markup. The first shortcut invokes a MyDialog custom dialog. The second shortcut redefines a default Ctrl+B shortcut. The third shortcut assigns the default command bold to custom shortcut.

Note that other default shortcuts (except Ctrl+B) are still in effect.

<dx:ASPxHtmlEditor ID="MyHtmlEditor" runat="server">
     <CustomDialogs>
          <dx:HtmlEditorCustomDialog Caption="My Custom Dialog"
          FormPath="~/CustomDialogs/MyCustomDialog1.ascx" Name="MyDialog" />
     </CustomDialogs>
     <Shortcuts>
          <dx:HtmlEditorShortcut ActionName="MyDialog" ActionType="ShowCustomDialog" Shortcut="Ctrl+D" />
          <dx:HtmlEditorShortcut ActionName="backcolor" Shortcut="Ctrl+B" />
          <dx:HtmlEditorShortcut ActionName="bold" Shortcut="Alt+B" />
     </Shortcuts>
</dx:ASPxHtmlEditor>

 

Runtime

The ASPxHtmlEditor allows you to modify any shortcuts at run time. Simply use the methods provided in the HtmlEditorShortcutCollection collection.

The code sample below demonstrates how you can modify a shortcut collection at run time:

  • The first shortcut invokes a MyDialog custom dialog.
  • The second shortcut redefines a default Ctrl+B shortcut.
  • The third shortcut assigns the default command bold to a custom shortcut.

Note that other default shortcuts (except Ctrl+B) are still in effect.

using DevExpress.Web.ASPxHtmlEditor;

...

protected void Page_Load(object sender, EventArgs e) {
     if (!IsPostBack) {
          MyHtmlEditor.Shortcuts.Add("Ctrl+D", "MyDialog", ActionType.ShowCustomDialog);
          MyHtmlEditor.Shortcuts.Add("Ctrl+B", "backcolor");
          MyHtmlEditor.Shortcuts.Add("Alt+B", "bold");
     }
}

 

ASP.NET MVC Supported too!

These shortcuts can also customized for the DevExpress ASP.NET MVC HTML Editor extension too!

 

What custom shortcuts have you added to the ASPxHtmlEditor? Drop me a line below with your thoughts, thanks!

Save time and money…

Save time and money with high quality pre-built components for ASP.NET, Windows Forms, WPF, Silverlight and VCL as well as IDE Productivity Tools and Business Application Frameworks, all backed by world-class service and support. Our technologies help you build your best, see complex software with greater clarity, increase your productivity and create stunning applications for Windows and Web in the shortest possible time.

Try a fully-functional version of DXperience for free now: http://www.devexpress.com/Home/Try.xml

How to present PowerPoint slides with a WinForms Tiles App

Check out this slick little application I built using the new DevExpress WinForms Tile controls for my touch webinar:

image

Quick & fun

This app took me about 15 minutes to create. And I wrote it for 2 main reasons:

  1. It’s a fun way to learn the new DevExpress WinForms Tile suite
  2. And it’s a great way to show touch features

Creating a slick and useful app quickly like my TileControlPowerPoint is what DevExpress productivity is all about.

How it’s made…

This visually stunning application is simple and it follows most of the steps outlined in the following videos:

Here’s the general steps:

  1. I started by creating a new (blank) WinForms app.
  2. Added the DevExpress XtraTile control, then 1 group and 1 tile. Watch this video to learn how.
  3. Added a green metro-style background image and customized the tile to make it larger.
  4. Added the code below to look for a ‘Slides’ folder and then dynamically create tiles based on the slides. This saves the trouble of manually creating each tile.
  5. Finally, I set the base form is also set to maximum and without a title bar.

Note: I use the background image property of the tiles to show the slides. These images were originally developed in PowerPoint and it’s very easy to save your slides as images.

Download

Download the full source code of the TileControlPowerPoint WinForms touch application here:

TileControlPowerPoint.zip TileControlPowerPoint.zip

DemoWare

Warning: This was a small fun app I wrote in 15 minutes. As such, I don’t recommend hard coding strings (the way I did). In fact, feel free to Refactor the small amount of code below. It dynamically creates tiles and uses the images for background so you don’ t need to do it at design-time:

string path = AppDomain.CurrentDomain.BaseDirectory + @"slides";
private void LoadItems()
{
    if (Directory.Exists(path))
    {
        tileControl1.BeginUpdate();
        int filesCount = Directory.GetFiles(path).Length;
        for (int i = 1; i < filesCount; i++)
        {
            string fileName = path + "\\Slide" + i + ".png";
            TileItem item = new TileItem() { IsLarge = true, BackgroundImage = Image.FromFile(fileName) };
            tileGroup2.Items.Add(item);
        }
        tileControl1.EndUpdate();
    }
    else
    {
        MessageBox.Show("Slides not found");
        if (System.Windows.Forms.Application.MessageLoop)
        {
            Application.Exit();
        }
        else
        {
            System.Environment.Exit(1);
        }
    }
}

Check out the recent touch webinar and download the app I used to present the slides. Then drop me a line below with your thoughts. Thanks!

DXperience? What’s That?

DXperience is the .NET developer’s secret weapon. Get full access to a complete suite of professional components that let you instantly drop in new features, designer styles and fast performance for your applications. Try a fully-functional version of DXperience for free now: http://www.devexpress.com/Downloads/NET/

How To Resize A VirtualBox VM In 3 Easy Steps

VirtualBox does not make resizing a VM easy. Luckily, I’ve collected the 3 necessary steps that you’ll need to resize your VDI files:

Step 1 – Create a New and Bigger VDI file

Use the VirtualBox ‘Virtual Media Manager’ GUI to create a new VDI file that is larger in size.

Step 2 – Use the ‘VBoxManage CloneHD’ Command

This command will copy the original to the New and larger VDI. Open a command window and call this command from the VirtualBox directory. Be sure you properly reference the correct files, for example, here the command I used:

C:Program FilesSunVirtualBox>vboxmanage clonehd –existing e:virtualboxORIGINAL.vdi C:UsersMehul.VirtualBoxHardDisksNEW_BIGGER.vdi

Sun VirtualBox Command Line Management Interface Version 3.1.8

(C) 2005-2010 Sun Microsystems, Inc. All rights reserved.

0%…10%…20%…30%…40%…50%…60%…70%…80%…90%…100%

Clone hard disk created in format ‘VDI’. UUID: 7099c645-15c2-4656-bf90-27a444444444444

Step 2 (optional) – Call ‘setvdiuuid’ in case of an issue

Try to start your VM now that points to the NEW_BIGGER.vdi file. If you get an unusual error like this one:

Cannot register the hard disk ‘PATH’ with UUID {id goes here} because a hard disk ‘PATH2’ with UUID {same id goes here} already exists in the media registry (‘PATH to XML file’).

Then use the following command on your NEW_BIGGER.vdi:

C:UsersMehul.VirtualBoxHardDisks>”c:Program FilesSunVirtualBoxVBoxManage.exe”
internalcommands setvdiuuid MHDXDT1_Laptop.vdi

Sun VirtualBox Command Line Management Interface Version 3.1.8
(C) 2005-2010 Sun Microsystems, Inc. All rights reserved.

UUID changed to: d4c86bf9-3739-4894-9fee-0ec8342432a

Take note that I ran that command from the directory location of the NEW_BIGGER.vdi file. For a good explanation of this command, check out this post.

Step 3 – Resize the local drive in the VM

Your NEW_BIGGER.vdi is larger than before. However, as a final step, you need to increase the local drive in the VM. Windows 7 makes it easy with the disk management.

  • From control panel, bring up ‘Disk Management’.
  • Right click on your local C: drive (Disk 0 usually)
  • Select ‘Extend Volume’

The process is pretty easy to figure out. If you need more info and images then check out this post for a more detail.

And that’s it! You’re done. You now have a bigger drive.

Easy, wasn’t it?

Thanks to this post for majority of the initial guidance.

AutoHotKey – Easily Create An HTML Link

I’m huge fan of AutoHotKey which saves me a ton of time in not having to type repetitive keystrokes. Basically, it helps me be a better keyboard ninja.

Often for blog posts, I need to encapsulate a link with a HTML anchor tag. So that http://Mehul.net becomes http://Mehul.net

So I’ve hacked up the following AutoHotKey script which allows you to highlight a link and press Control+Shift+L and it automagically converts into an HTML anchor tag.

Copy this script into a autohotkey script. Load the script. Select an HTML link and press Control+Shift+L.

;————————————————————-
; Create A Link — Ctrl+Shift+L
;————————————————————-

^+l::
{
Send, ^c
Sleep 50
var=% “
” . clipboard . “
clipboard=% var
Send, ^v
Return
}

To learn more about AutoHotKey, check out these LifeHacker posts:

Turn Any Action into a Keyboard Shortcut

Hack Attack: Knock down repetitive email with AutoHotKey

Improve iPhone Safari Readability

I like to catch up on my blog reading using my iPhone. However, many sites don’t have a mobile version that formats the page for a smaller device.

Instatpaper to the resuce!

Instapaper.com is known for allowing you to bookmark a web page and ‘Read It Later’ using either their website or iPhone app. What’s also great is they format the bookmarked web page so that it is readable on mobile devices. They also offer their ‘mobilizer engine’ to use as a separate service:

If you go to this site on your mobile browser: http://instapaper.com/m 

Then Enter a url of blog you like to read: For example: http://community.devexpress.com/blogs/aspnet/default.aspx

Hit Go and watch as all the formatting is removed and you see big text that only scrolls vertically. Beautiful and perfect for mobile browsers.

I’ve taken it a step further by creating a bookmarklet that will automatically call the ‘Instapaper mobilizer’ site for you when you’re reading a blog on your mobile browser. Here’s the steps to add it to an iPhone:

  1. From Safari, add a new bookmark and call it something like ‘Instapaper Mobilizer’.
  2. Edit the Bookmark you just added.
  3. javascript:var d=document,w=window,f=’http://www.instapaper.com/m’,l=d.location,e=encodeURIComponent,p=’?u=’+e(l.href),u=f+p;if(!w.open(u,’t',’toolbar=0,resizable=0,status=1,width=250,height=150′))l.href=u;   Replace the url with the JavaScript code in this box.
  4. Now, while reading a blog, open the bookmark you just added.

And that’s it. Enjoy.

I’m a Creator and Social Manager

Taking up Travis’ suggestion, I took the color career test and got the following results. Surprisingly, it is not too different than my day job:

—————————————————-

Best Occupational Category
You’re a CREATOR

Keywords

Nonconforming, Impulsive, Expressive, Romantic, Intuitive, Sensitive, and Emotional

These original types place a high value on aesthetic qualities and have a great need for self-expression. They enjoy working independently, being creative, using their imagination, and constantly learning something new. Fields of interest are art, drama, music, and writing or places where they can express, assemble, or implement creative ideas.

CREATOR OCCUPATIONS
Suggested careers are Advertising Executive, Architect, Web Designer, Creative Director, Public Relations, Fine or Commercial Artist, Interior Decorator, Lawyer, Librarian, Musician, Reporter, Art Teacher, Broadcaster, Technical Writer, English Teacher, Architect, Photographer, Medical Illustrator, Corporate Trainer, Author, Editor, Landscape Architect, Exhibit Builder, and Package Designer.

CREATOR WORKPLACES
Consider workplaces where you can create and improve beauty and aesthetic qualities. Unstructured, flexible organizations that allow self-expression work best with your free-spirited nature.

Suggested Creator workplaces are advertising, public relations, and interior decorating firms; artistic studios, theaters and concert halls; institutions that teach crafts, universities, music, and dance schools. Other workplaces to consider are art institutes, museums, libraries, and galleries.

2nd Best Occupational Category
You’re a SOCIAL MANAGER

Keywords:

Tactful, Cooperative, Generous, Understanding, Insightful, Friendly, and Cheerful

This very social type enjoys working in groups, sharing responsibilities, and being the center of attention. Fields of interest are instructing, helping, nurturing, care giving and instructing-especially young people. They discuss and consider feelings in order to solve problems, lead, direct, persuade, guide, organize and enlighten others.

Handbook: Life Advice From My Big Sister

Check out this fantastic list that I got from my big sister. Some inspirational, useful, and good advice for everyone:

HANDBOOK 2010

Health

:
1. Drink plenty of water.

2. Eat breakfast like a king, lunch like a prince and dinner like a beggar.

3. Eat more foods that grow on trees and plants and eat less food that is manufactured in plants..

4. Live with the 3 E’s — Energy, Enthusiasm and Empathy

5. Make time to pray.

6. Play more games

7. Read more books than you did in 2009 .

8. Sit in silence for at least 10 minutes each day

9. Sleep for 7 hours.

10. Take a 10-30 minutes walk daily. And while you walk, smile.

Personality

:
11. Don’t compare your life to others.. You have no idea what their journey is all about.

12. Don’t have negative thoughts or things you cannot control.. Instead invest your energy in the positive present moment.

13. Don’t over do. Keep your limits.

14. Don’t take yourself so seriously. No one else does.

15. Don’t waste your precious energy on gossip.

16. Dream more while you are awake

17. Envy is a waste of time. You already have all you need..

18. Forget issues of the past. Don’t remind your partner with His/her mistakes of the past. That will ruin your present happiness.

19. Life is too short to waste time hating anyone. Don’t hate others.

20. Make peace with your past so it won’t spoil the present..

21. No one is in charge of your happiness except you.

22. Realize that life is a school and you are here to learn. Problems are simply part of the curriculum that appear and fade away like algebra class but the lessons you learn will last a lifetime.

23. Smile and laugh more.

24. You don’t have to win every argument. Agree to disagree….

Society

:
25. Call your family often.

26. Each day give something good to others.

27. Forgive everyone for everything.

28. Spend time w/ people over the age of 70 & under the age of 6.

29. Try to make at least three people smile each day.

30. What other people think of you is none of your business.

31. Your job won’t take care of you when you are sick. Your friends will. Stay in touch.

Life

:
32. Do the right thing!

33. Get rid of anything that isn’t useful, beautiful or joyful.

34. GOD heals everything.

35. However good or bad a situation is, it will change..

36. No matter how you feel, get up, dress up and show up.

37. The best is yet to come..

38. When you awake alive in the morning, thank GOD for it.

39. Your Inner most is always happy. So, be happy.

Last but not the least

:
40. Please Forward this to everyone you care about, I just did