Posts

Showing posts from January, 2006

Free Computer Textbooks

Textbook Revolution is a site that keeps track of free books in electronic form and has a section for computer / technology ones. Electronic books, while they can be useful, are not a substitute for the real thing (which are easier to read and can be read anywhere). Tags: Web Developer Blog , Free Books

FireBug (Firefox Extension for Web Developers)

What do you get if you cross the DOM Inspector with the JavaScript console and a JavaScript interpreter? A very useful extension for debugging/analysing web pages in Firefox called FireBug . Features include (more details on each feature can be found on the site): Log DOM Elements With Your Mouse Log Objects From The Command Line Log Objects From Your Web Page Scripts XMLHttpRequest Spy Contextual Error Display Error Status Bar Indicator Error Filtering With the addition of CSS errors to the JavaScript console (which can't be filtered out), this is a very welcome extension with its error filtering. Tags: Web Developer Blog , Firefox , Firefox Extension

Clean Word Html (command line tool)

This command line tool is based on the code from Cleaning Word's Nasty HTML , and has been backported to .NET 1.1. To compile, download Snippet Compiler (the version for .NET 1.1). Then do File > New > Default.cs and clear the contents. Paste in the following code, then click Build > Build Current To File and call it CleanWordHtml . Open the Command Prompt at the location it was saved to and type CleanWordHtml for help. Edit (18-Jan-06) : remove u tags. Not all empty tags were removed. Does not remove empty table cells (as they may be used for column/row layout). Quoted class attributes are removed. Edit (2-Feb-06) : As a side effect of removing u tags, ul tags where also removed. So they are no longer removed. When reading in text from a file, line breaks were not read in, but now they are. You can now drag files onto the application (rather than resorting to the command line). CleanWordHtml.cs using System; using System.Reflection; using System.Collections.Sp...

Free PDF Generators

Adobe Acrobat isn't the only tool able to create PDF documents, there are others, some of them free. Two good ones are: PDFCreator (many features, can be intimidating to less tech-savvy users). Download . PrimoPDF (less features than PDFCreator, but easier to use) Tags: Web Developer Blog , PDF

Programmer's Notepad Forums

The developer of Programmer's Notepad has setup some forums where you can discuss the program, ask for help etc. Uses bbPress , a very light-weight forum software by some of the developers of WordPress (which powers pnotepad.org ). Tags: Web Developer Blog , Programmer's Notepad , PN2

HyperLinks and UserControls (ASP.NET)

If you have a file ( /myapp/page.aspx ) which references a user control ( /myapp/controls/control.ascx ) that contains a HyperLink, you find that the link generated is relative to the control, not the page. For example if the following code was in the control: <asp:HyperLink Text="Foo" NavigateUrl="bar.aspx" runat="server" /> The following output would be generated: <a href="controls/bar.aspx">Foo</a> This may not the desired outcome. You can set the link relative to the server root (by using /myapp/bar.aspx ), site root (by using ~/bar.aspx ), or even the control itself ( ../bar.aspx ) but if you want to make it relative to the calling page more work is involved. For doing this you can use the Uri class and Request.Url : <asp:HyperLink id="lnkFoo" Text="Foo" NavigateUrl='<%#(new Uri(Request.Url,"bar.aspx")).AbsolutePath%>' runat="server" /> If the link is in a R...

anchorWrap (JavaScript)

Wraps a node with an anchor (i.e. HyperLink, JavaScript prompt). // 'node' can be an existing node, or a string (id of node) // 'anchor' can be a URL string, or a precreated anchor // 'target' is the target frame to go to, and is optional function anchorWrap(node,anchor,target) { if(!document.createElement) return; var newanchor,parent,sibling; if(typeof(node) == "string") { node = document.getElementById(node); } if(!node || !node.parentNode) return; if(typeof(anchor) == "string") { newanchor = document.createElement("a"); newanchor.href = anchor; } else { newanchor = anchor; } if(!newanchor) return; // if href is not set (which may be the case when it performs a javascript action), set it to #, so the link is seen if(!newanchor.href) newanchor.href = "#"; // if target is defined, set it if(typeof(target) == "string") { newanchor.target = target; } // get the sibling and the parent...