Please wait while loading the page. You need to enable javascript to show the content.

n00b trek
Home
March 17th, 2011 — James
public string GetFileName(string path)
{
    FileInfo finfo = new FileInfo(path);
    string FileName = finfo.Name;
    string FileExtn  = finfo.Extension;
    return FileName.Replace(FileExtn, string.Empty);
    // Or just return finfo.Name.Replace(finfo.Extension, string.Empty);
}

Sample:
Input: c:\temp\sampletext.txt
Output: sampletext

namespace needed: System.IO

March 6th, 2010 — James

In Visual Studio 2008 you could just drag the toolbars around and dock it on any side. In Visual Studio 2010, the dragging is allowed only within the side where it is already docked. To change the docking location (top, left, bottom or right), open from the menu  tools -> customize. Select the toolbar you wish to modify. Click on the modify selection button and select the docking location.

February 21st, 2010 — James

Before Windows 7, you needed multiple tools and keystrokes to get the screenshot of your WordPress theme. On Windows 7, it is very easy with the snipping tool.

Open the browser to a post or page on your website that you want to appear on your screenshot.

Click the start menu on Windows 7. The snipping tool is usually at the top. If you cannot find, just type snipping tool in the search box. Start snipping tool.

Make sure you have rectangular snip selected in the new drop down on the snipping tool.

Now move the mouse cursor to the browser window with your themed blog post on it and select the area you want it on the screenshot. Once you complete the selection, snipping tool will capture that area and show it on its own window. Save the image as either screenshot.jpg or screenshot.png. Note that snipping tool adds extensions in upper case. Convert it to lower case. Unix/Linux is case sensitive and may not serve up the file.

Place this file in the theme folder (directory).

That’s all to it.

January 21st, 2010 — James

As a software developer, there are times I need a file to be present in a folder. Instead of right clicking in Windows Explorer and then selecting create a file, I run the following from the command line.

copy x=>myfilename.ext

This is much easier for me because right click and NEW inside Windows Explorer takes a while. I also have a Visual Studio command prompt open all the time.

December 28th, 2009 — James

Windows gets the wpad after establishing a network connection. If you need to test changes to wpad or pac settings, disconnect and connect the network.

http://support.microsoft.com/kb/271361

http://www.computing.net/answers/windows-2000/how-to-set-proxy-in-registry/60689.html