Monthly Archives: April 2008

Tips on Getting a ScholarshipLifeSpy

Study

Ah, the bliss of education when someone else is paying for it. If you’re one of the unfortunates, and you had to work for your tuition money, you must be tired of applying for scholarships and grants. But don’t give up, kid. You never know when it’s your turn to get subsidized. Here are tips which can help you bag that grant.

(more…)

Master-Detail with the GridView, DetailsView and ModalPopup ControlsMatt Berseth

A while back I wrote a post describing how the DetailsView, GridView, UpdatePanel and the AjaxControlToolkit’s ModalPopup controls could be used to implement the common Master/Details UI pattern.  I cheated a bit when creating my original example in that I didn't really complete the implementation – the Save button on the popup didn't actually do anything.  Since writing that post I have received a lot of email and a number of people left comments asking me to complete the example – so here it is.  If you plan on reading through this article, I recommend playing around with the demo site to get a feel for how the page works.  All data changes are only persisted to memory, so don't worry about messing up the data set.

Live Demo | Download

image

Scenario

I am sure everyone is pretty familiar with Master/Details style of editing data, but just in case – here is how my page works.  The grid shows 12 rows of customer data.  The far right column in the grid contains a hyperlink that when clicked brings the detail view of the row into focus so the corresponding row can be edited.  The detail view is a popup control and contains a Save and Close buttons.  When close is clicked, the detail popup is dismissed and the user goes back to viewing the main grid.  When they click Save, some simple validation checks are run (all are RequiredFieldValidators for this sample) and the new data values are persisted, and finally the detail popup is dismissed and the main grid is refreshed so that it displays the changes.

Controls

There are quite a few controls that work together for this sample.  Here is a listing of the controls and the role they play.

Control Role
GridView Display the 12 customer rows of data
DetailsView Display the single customer row that is currently being edited
ModalPopupExtender Display the DetailView modally
UpdatePanel Allow the DetailView to be loaded without refreshing the entire page
ObjectDataSource Manage how our UI interacts with the customer data

Customer GridView

The Customer Grid is just a regular GridView.  I have used BoundFields to bind to the data and I am using a TemplateField for rendering the 'Edit' anchor. 

image

When 'Edit' is clicked, I want to show the detail view popup.  To accomplish this I set the CommandName of the 'Edit' button to Select – this will cause the SelectedIndexChanged event to fire on the server.  Inside this event handler, I force the DetailView to databind, passing the datasource it is bound to the ID that corresponds to the row the user clicked.  Finally, I let the UpdatePanel the DetailView is contained in that it needs to update its contents and invoke the Show server side method of my ModalPopupExtender which will cause the popup to be displayed when the partial page is reloaded on the client.

Here are the 2 events handlers that I am using to accomplish this bit of work.  The top event handler fires when 'Edit' is clicked and the explicit call to DataBind forces the DetailView's corresponding ObjectDataSource's Selecting event to fire.  In this handler I use the SelectedIndex of the GridView to fetch the ID the data source needs. 

image

image 

Customer DetailsView

The DetailsView for the individual customer records is also pretty simple – except because I have included RequiredFieldValidators I wasn’t able to use the BoundFields and instead I had to explicitly define the EditItemTemplate for each of the fields.

image

Just below the DetailsView, I have 2 buttons that interact with the ModalPopupExtender.  The Close button dismissed the popup without posting back or committing any changes.  The Save button does post back, moves the data out of the DetailsView and back to the ObjectDataSource, hides the ModalPopupExtender and finally causes the main GridView to refresh so it displays the changes.

image

Here is the logic I have wired to the Save button’s click handler.

image

Apply a Yellow Fade to the Updated Row in the GridView

And while this has been pretty much nuts and bolds functionality thus far, I couldn't resist trying to spice it up by applying a yellow fade to the row in the main grid that was updated.  To implement this feature, I needed a way to send a bit of information back from the server that let me know what row in the grid was updated.  So my approach was to use the ScriptManager’s RegisterDataItem method to accomplish this.  Here is the doc from MSDN:

Sends custom data to a control during partial-page rendering, and indicates whether the data is in JavaScript Object Notation (JSON) format.

Just what I need – so after the Save button is clicked, back in the server side event handler, I call RegisterDataItem and pass the index of the updated row to the GridView.  Then after the partial refresh has occurred back on the client, I extract the row index from the DataItem's collection, use it to find the row that changed and give it a custom CSS class.

So I added the following call to my Save button handler to register the index of the row that was changed.

image

And then added the following JavaScript to my page to track down the corresponding TR element in the rendered table and apply the updated CSS class to the row.

image 

And like magic I get a yellow background applied to the row that was edited.  The background color stays in place for 1.5 seconds then my timeout handler fires and removes it.  A poor man's animation, but the plumbing is in place for me to improve upon.  Below are the screen shots of how it looks.

image

image

That's it.  Enjoy!

Highslide JS .NET Updated (v0.7)Encosia

An update to Highslide JS .NET is available today. I recommend that everyone upgrade, to benefit from the memory leak fixes in the latest Highslide JS.

v0.7 (4/29/2008)

  • Updated embedded Highslide version to 3.3.17.
  • Improved caption rendering, using inline caption divs. This should result in more semantic markup, pairing your captions with your images.
  • Added HighslideManager property: NumberOfImagesToPreload. This allows you to control how many images are automatically preloaded.
  • Added HighslideManager property: FadeInOut. When true, this fades the enlargement in and out as it’s resizing.
  • Added HighslideManager property: RenderScriptInPlace. This allows you to control where on the page the Highslide JS script is inserted in your page.
  • Updated download to include a sample site, to make it a little easier to get up and running quickly.

As always, the latest version is available on the Highslide JS .NET project page.

Originally posted at: Encosia.

NTFS-3G Makes NTFS Partitions Writable [Featured Download]Lifehacker

Mac OS X and Linux: Now that you’re dual booting Windows on your Mac, you want to save files to your Windows partition while you’re booted up in OS X. By default, NTFS-formatted disks are read-only in OS X, but the NTFS-3G driver makes it writable. Download NTFS-3G, then use the following command to save and edit files on your Boot Camp partition:

sudo mount -t ntfs-3g /dev/disk0s3 /Volumes/Untitled

You can also use the previously mentioned MacFUSE to write to NTFS disks, but while mounting disks over SSH went without a hitch with MacFUSE for me, I had trouble with NTFS disks (though NTFS-3G worked perfectly). The NTFS-3G driver is a free download for Mac and Linux.




CCleaner 2.0 Decrapifies Your PC [Featured Windows Download]Lifehacker

ccleanerthumb.png Windows only: One of our favorite PC cleansers CCleaner (which stands for "Crap Cleaner") saw an upgrade this week. Since the last time we mentioned CCleaner several new versions have come out; this week's added support for the Firefox 3 beta plus performance improvements and bug fixes. CCleaner scans your PC for unnecessary temporary and log files, cookies, memory dumps, and more and wipes them out at the press of the "Run Cleaner" button. You might be surprised at how much disk space it can recover—in fact, it managed to clear out 1.6GB of crap from my PC. See screenshot evidence after the jump.


CCleaner also includes a registry scanner, startup manager, and Add/Remove Programs area to uninstall applications you don’t use anymore. CCleaner 2.0 is a free download for Windows only.




K7 Offers Free Fax/Voicemail Lines [Web Utilities]Lifehacker

k7_cropped.jpgNeed a phone line to receive a one-time fax or voicemails on a particular project, auction, or job search? Free service K7 hands out 10-digit Seattle-area phone numbers that can answer calls with customized voicemail greetings or accept faxes. You can access both the audio files and fax documents through your sign-up account, and the only restrictions are a 20-message/fax limit (the site starts deleting the oldest after that) and an account wipe out after 30 days of inactivity. Other than that, you’ve got a free bin to keep your personal numbers private and still get at your messages.




Superior Alternatives to Crappy Windows Software [Crapware]Lifehacker


It may be the year 2008, but a whole lot of sucktacular software still rears its ugly head on PC’s everywhere, even when better-behaved options are freely available. Whether it’s molasses-slow bloatware, shameless adware, anemic default apps, or “Your trial period has expired!” nagware, it’s time to replace stinky Windows software with its superior (but lesser-known) alternative. Last week we asked what software you should never install on your PC, and over 200 comments later, you compiled quite a list. Today we’re going to take a walk down the Crapware Hall of Shame, point and laugh at the worst offenders, and highlight some better choices. Photo by chelseagirl.

Application to Avoid: Adobe Reader
Indictment: Bloatware
Superior Alternative(s): FoxIt Reader or Sumatra PDF
Notes: There are much worse offenders on this list than Adobe Reader, which has gotten more performant over the years. Keep in mind that Adobe deals with some PDF’s (like ones with editable form fields) better than FoxIt. If you don’t want to ditch Adobe Reader entirely, here’s how to tweak Adobe 8 for speed.

Application to Avoid: AOL Instant Messenger pidginthumb.png
Indictment: One-trick pony with ads included made by a company that holds its customers hostage. (Speaking of, here’s how to cancel your AOL account.)
Superior Alternative(s): Digsby or Pidgin or Miranda or Trillian or Meebo
Notes: The moral of the story is you should avoid anything that comes on six zillion free CDs that swamp your apartment building’s mailroom.

Application to Avoid: Browser Toolbars (that you didn’t seek out yourself)
Indictment: Notorious for hijacking your browser, phoning home with your online activity, taking up precious real estate, and not offering any features you actually want.
Superior Alternative(s): Your browser’s built-in search box and a few good bookmarklets
Notes: Don’t get us wrong: Not all toolbars are bad, but do beware when they get tacked onto the end of a totally unrelated software installation and you have to opt OUT of them.

Application to Avoid: Internet Explorer (6 and 7)
Indictment: Lacks features any self-respecting modern web browser had two versions ago
Superior Alternative(s): Firefox
Notes: Because IE gloms onto the innards of your operating system so inextricably, you can’t truly uninstall it. Just set your system’s default browser to Firefox to avoid launching IE ever.

Application to Avoid: iTunes
Indictment: Too controlling, gleefully enforces DRM, can’t monitor folders for new music
Superior Alternative(s): foobar200 (more on foobar2000), Songbird, or WinAmp
Notes: We—ok, I—actually like and use iTunes, ever since that time Steve Jobs waved that iPhone over my forehead and chanted. These recommendations only for those with particularly sensitive digital music sensibilities.

Application to Avoid: Java Runtime Environment
Indictment: You ugly and yo’ Mama dresses you funny
Superior Alternative(s): None.
Notes: If you want to run a Java app, without the runtime you’re SOL. Java, we love the idea of you. Just not the coffee cup staring at us from the system tray.

Application to Avoid: Limewire
Indictment: Where do we start? Haven’t launched Limewire since our college days, and don’t plan to ever look back
Superior Alternative(s): Frostwire
Notes: Bonus: Frostwire does BitTorrent, too.

Application to Avoid: MSN Messenger
Indictment: Little ugly non-faces with a red X over them plant themselves in your system tray with no obvious way to uninstall or quit it
Superior Alternative(s): Digsby or Pidgin or Miranda or Trillian or Meebo
Notes: Uninstall MSN Messenger by going to the “Add/Remove Windows Components” area in Control Panel’s “Add/Remove Programs” area.

Application to Avoid: Nero Suite
Indictment: Costly
Superior Alternative(s): CDBurnerXP
Notes: The free CDBurnerXP may not do everything Nero does, but for the price it does a whole lot.

Application to Avoid: McAfee/Norton/Symantec Anti-Virus
Indictment: Naggy subscription costs after the free trial on your new PC runs out
Superior Alternative(s): AVG or Avast
Notes: See why many readers have ditched their AV software.

Application to Avoid: QuickTime
Indictment: Plants itself in your startup and system tray
Superior Alternative(s): QuickTime Alternative
Notes: While QuickTime doesn't annoy us THAT much, it still annoys us a little—especially since it comes with Apple's Software Update. (See Safari's Honorable Mention, below.)

Application to Avoid: RealPlayer
Indictment: We’re still so traumatized about RealPlayer’s repeated takeover of our PC back in 2004 we’re seeing a special doctor that’s killing that part of our memory
Superior Alternative(s): Real Alternative

vlcthumb.pngApplication to Avoid: Windows Media Player
Indictment: WTF interface, chokes on clips in common formats
Superior Alternative(s): VLC

Application to Avoid: WinZip
Indictment: Cost
Superior Alternative(s): 7-Zip or ALZip

Honorable mention: While Apple’s Safari web browser for Windows itself is not crappy, Apple’s Software Update trying to push it on you completely sucks. Here’s how to opt out of installing Safari and stop the nag.

What crappy apps or better alternatives did we miss? Did we wrongly accuse one of your favorites? Let us know in the comments.

Gina Trapani, the editor of Lifehacker, still hasn’t forgiven RealPlayer. Her weekly feature, Geek to Live, appears every Monday on Lifehacker. Subscribe to the Geek to Live feed to get new installments in your newsreader.




Use a Built-In Windows Utility to Create Self-Extracting Archives [Windows Tip]Lifehacker

iexpress_cropped.jpgMost any savvy computer user is probably pretty handy with a free compression and archiving tool (like, say, 7-Zip), but not everyone they send files to will be. The Confessions of a Freeware Junkie blog points out that IExpress.exe, a built-in utility you simply type into the “Run” menu in Windows XP or “Start Search” in Vista, can create self-extracting archives to be emailed to anyone using Windows. Just choose “Extract files only” while clicking through the wizard interface, choose the files to be zipped up, and the end user only has to double-click to get them. IExpress also works as an easy way to convert batch files into executables. Need more info on IExpress? Check out Microsoft’s help page on the tool.




Hardy Heron Makes Linux Worth Another Look [Feature]Lifehacker


If you’ve flirted with the idea of switching your desktop operating system to Linux but never took the leap, the time is now. This week’s release of Hardy Heron, an Ubuntu release that will be supported until 2011, offers a freer, more productive space for work and play than ever before. It’s not easy jumping blind into a new way of thinking or working, and Ubuntu, the so-called “Linux for Humans” operating system, is no different. For all the online buzz that surrounds the increasingly popular distribution, millions of sane, regular people wonder why they’d ever give up their familiar Mac or PC to venture into something still relatively new. Today we’re shining the spotlight on a few great tools and tweaks that make Heron a worthy switch. Photo by BotheredByBees.

Try out and remove Ubuntu like a Windows program

wubi_feature.jpgNo hard drives to re-organize, no dual-boot setup—just pop an Ubuntu desktop CD in while Windows is running, and you'll get an option to install Ubuntu—inside Windows. Basically, a program called Wubi creates a single file tucked away in Windows and packs a virtual Ubuntu installation inside it. When Windows boots up next time, you’ll get an option to boot that pretend Ubuntu installation, and you’re off to see how Ubuntu would run on your system. Sick of experimenting and want to try the next step? Uninstall Wubi the same way you’d uninstall any other program.

Put Remember the Milk and other web gadgets on your desktop

rtmwidget_cropped.pngThe latest release of desktop widget manager Screenlets can run iGoogle gadgets and other web-based utilities on your desktop. That means modules like Remember the Milk, Google Calendar, and weight tracker The Google 15 can be tucked into a corner for rapid access later. A helpful Tombuntu post explains how to get the most current vision of Screenlets installed in Ubuntu. (Original Screenlets post).

Get full multimedia playback in less than five minutes

medibuntu_cropped.jpgLess than two years ago, the best way to get DVDs, Windows Media files, and MP3s to play was to use Automatix, a tool that made installation a one-click affair, but could cause headaches when installing other programs or upgrading to new versions. Now there’s the Medibuntu repository, a single stop for enabling multimedia playback and installing third-party apps and upgrades. Need help installing the good stuff? Head to Medibuntu’s wiki page and copy and run the appropriate codes for your system.

Run Windows XP and other systems inside Ubuntu with VirtualBox

ieinubuntu_cropped.jpgFew people can comfortably leave the Windows world behind entirely, whether due to web sites that only play nice Internet Explorer or Outlook/Office requirements of the job. Luckily, getting Windows up and running inside Linux has never been easier than with VirtualBox, a free virtualization tool that makes running one system inside another as easy as can possibly be. I used VirtualBox to create seamless XP windows inside Linux, and found that, in most cases, if you can install XP, you can get it running in VirtualBox.

Control your system from the keyboard with GNOME Do

gnome_do.jpgI know I’ll catch flak from certain die-hard Quicksilver advocates (how’s it going, Adam?), but application launcher GNOME Do is shaping up to be an honest-to-goodness Linux counterpart, if not equivalent. Trade text between files, start emails, IMs and even Twitters, query your Firefox search plugins, and much more. What’s more, work is moving forward on that key third “indirect object pane,” moving this little program that could toward the automation sweet spot.

Tweak your desktop however you want it

awn_dock.pngIf you’re a Mac fan or just familiar with OS X’s interface, the GNOME-based Ubuntu has got a turbo-charged dock of its own, the Avant Window Navigator (AWN), that can be loaded with some seriously cool applets, like an inline mail notifier, to-do organizers, a Google- and Outlook-compatible calendar, and much more (here’s a guide to installing and extending AWN, if you’re interested). More the Windows-style bottom toolbar type? You can re-arrange the built-in toolbars to your heart’s content. If none of those options feels creative or different enough, however, you can tweak to your heart’s content with the new KDE 4, a desktop environment that can be substituted or combined with Ubuntu’s default GNOME look (and available as a “cutting edge” Kubuntu system. Combined with the crazy amount of desktop effects available through Compiz Fusion (previously explained in detail), your desktop is your blank canvas.

Keep your open-source apps’ settings and plug-ins

profile_shared.jpgMore and more open-source apps are being released not just with Linux versions available, but with nearly fully-featured importing and sharing of profiles, plug-ins, and all the other stuff you’ve spent quality time getting just so. And since Ubuntu now has a built-in ability to read and writes to Windows-formatted disks, you don’t even have to move a thing to see yourFirefox bookmarks, Thunderbird mail accounts, and Pidgin buddy lists rise up to meet you. Check out our guide to dual-booting with a single data store for details on getting the most from open-source apps across two operating systems.

These are, of course, my own picks of productivity boosters and newb-friendly progress we’ve seen in Ubuntu since the last time we rounded up our favorite Ubuntu applications, and some still-worthy apps and tweaks before that. What drove you to check out the free, open-source OS? How would you entice your solidly Mac- and PC-based friends to to pop in a live CD? Let’s hear it in the comments.

Kevin Purdy, associate editor at Lifehacker, remembers asking his Linux-pushing friend what a swap partition was. His weekly feature, Open Sourcery, appears every Friday on Lifehacker.




Step-by-Step Fixes for Common Photo Problems [Tutorials]Lifehacker

photoshop_fix.jpgIf you’ve ever suffered from seeing a great photo sullied by red eye, reflective skin, or other blemishes, Wired’s How-To Wiki is offering an assist. The guide provides specific steps one should take with image editing tools to fix distracting imperfections or backgrounds, and while the instructions are written from a Photoshop user’s perspective, users of the free, open-source GIMP editor can follow along by finding the (usually identical) tools called for. Hit the link for a lesson, or contribute your own revisionist tips at the wiki. Photo by Noel Zia Lee.

Touch Up Your Pics [Wired How-To Wiki]




WP Like Button Plugin by Free WordPress Templates