Month: February 2012

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