Monthly Archives: January 2008

ldd on Darwin / OSX?

 otool -L <executable>

Correct using of ASP.NET Cache.NET Tip of The Day.org

Often in ASP.NET application we see a code which looks like this one:

    if (Cache[“SomeData”] != null)

    {

        string name = ((SomeClass)Cache[“SomeData”]).Name;

        //…..

    }

This code is not safe enough and the second statement can generate a NullReferenceException sometimes. There is no guaranttee that a cached object will stay in the cache between two calls. After the first call it can be deleted either by garbage collector or by another thread to refresh cached data.

So to overcome this problem rewrite the code using as operator:

    SomeClass someClass = Cache[“SomeData”] as SomeClass;

    if (someClass != null)

    {

        string name = someClass.Name;

        //…..

    }

via Dmytro Shteflyuk

Put Documents Online in One Click with Google Docs Uploader [Featured Windows Download]Lifehacker

google_uploader_cropped.jpg
Windows only: Google has released a simple one-purpose application that lets you upload multiple documents at once to a Google Docs account, as well as add right-click uploading options for all the document types accepted by the free online office suit. Before the free app’s release, meant to show off the Google Docs API, your best bet for posting multiple files was through email, but even that had a 500KB size restriction and only worked with certain document types. Not much more to say—it's a simple, effective tool, and it seems to work pretty quickly. Google Docs Uploader is a free download for Windows only and requires .NET Framework 2.0.




Find Recipes to Satisfy Your Cravings at Cookthink [Cooking]Lifehacker

cookthink.png
Web site Cookthink turns your cravings into reality, matching recipes with cravings by ingredient, cuisine, dish, or mood. For example, if you were to head to the site aching for something—anything—that will hit your "basily" mood, just tell Cookthink that's what you want and it'll give you a handful of recipes designed to satisfy that craving. You can give Cookthink more than one requirement to meet your craving, and it does the standard recipe-by-ingredients lookup as well, so in all it's a one-stop shop for finding meals based on what you have and what cravings you're looking to satisfy. Most of the recipes, I should add, look mighty tasty.




Make Your Own Customized Linux Distro [How To]Lifehacker

Information Week has posted a thorough walkthrough guide for anyone interested in taking their Linux customization to the next level by creating their own distribution, whether for installation or running from a live CD. Among the topics covered are customizing and rebuilding Knoppix or Puppy Linux, as well as building from the ground up with Linux From Scratch (LFS) or Gentoo. Those less inclined to work (and sit) through a lot of compilation and package-choosing can try something like rolling their own Ubuntu CD, but this kind of guide makes for a great, geeky weekend project. Thanks Jeremy!




Home :: Installing Shoe Molding

This article on DYI is a simple guide on how to install show molding on a baseboard.

Find a Job that You Love [Career]Lifehacker

love.jpgLooking for a job you love? For many of us, it won’t happen right out of school and it may take several years until you find a job you’re truly happy with. Blogger Jon Morrow recognizes that most people spend the majority of their waking hours working, so he proposes the question: “why not spend that time on you’re passionate about?” He suggests that you start looking for the right job by defining what you love. Then move onto defining who you are and knowing what you want. Only when you know what you love and you can identify with who you are can you take the next step to define what work is to you.

If you want work that you love, then you’ll have to change your conception of work. You might even want to remove the word from your vocabulary entirely.

The two final steps are to define how you’re aiming to find the work that you love, and lastly, to figure out how you’re going to proceed with finding the work. You might seek out training first or work on building your reputation as an expert in the subject matter. You might just take the plunge. Either way, once you understand what you’re looking for by breaking down each individual term, you’ll likely be more satisfied with the path you end up taking.




How to create fully qualified URLs.NET Tip of The Day.org

With ASP.NET it’s quite easy to get absolute path to a page by calling the VirtualPathUtility.ToAbsolute method. Getting absolute URL is not that obvious but still quite easy. Just combine request url with absolute path to your ASP.NET page:

string absolutePath = VirtualPathUtility.ToAbsolute(“http://dotnettipoftheday.org/test/MyWebForm.aspx”);

Uri newUri = new Uri(Request.Url, absolutePath);

Fix Windows’ Master Boot Record with an Ubuntu Live CD [Boot CD]Lifehacker

livecd_cropped.jpg
If you’ve ever delved into the realm of Windows/Linux dual-booting, you probably know that the Master Boot Record can unexpectedly stop working, leaving you locked out of your Windows system. If you don’t have (or just don’t want to dig up) your Windows installation CD to fix it, ArsGeek has a handy tutorial on un-wonking the MBR with an Ubuntu live CD. The guide seemingly requires a working internet connection from inside the live session, but all should be well once you download the ms-sys application and run the right command. Except for the installation line, this guide could work for other Linux live CDs as well. For other live CD options, check out Gina’s Top 10 free computer system recovery tools.




Batch Resize Images with IrfanView [How To]Lifehacker

irfanviewstart-batch.png Windows only: Lifehacker readers love free image viewer and processor IrfanView, so much that whenever we mention how to rename or resize images with other programs, someone’s guaranteed to bring up IrfanView in the comments. So now that you know how to batch process images in Photshop, ImageMagick, and Photo Drop (Mac), tech site Of Zen and Computing covers the steps in IrfanView. I admit that I use Picasa and and an old copy of ImageReady for this kind of work most of the time, but IrfanView looks more and more to be like the free image multi-tool to have on your desktop. What other kinds of image work do you automate with IrfanView? Let us know in the comments.




WP Like Button Plugin by Free WordPress Templates