Development – Leet 4 Life

Software Development Code Samples and More

Skip to: Content | Sidebar | Footer

HTML5 Table Borders Using CSS

14 November, 2012 | CSS, HTML5 | By: Michael Adams

I’m working on a HTML5 website and need a way to have borders on the TD tags without using the cellpadding and cellspacing attributes like I usually implement since they have been deprecated. After some googling I found a solution here. The answer does not mention HTML5 specifically but it worked like a charm. The above CSS will remove all spacing from a table completely and will do so for all tables on a page or any page that implement this CSS. The border-collapse: collapse attribute is added solely to collapse borders for for Internet Explorer versions 5-7. If you [Read More…]

Background Image Stretch With CSS

7 November, 2012 | CSS | By: Michael Adams

I was creating a UI from a PSD file and after I extracted the image background I realized that it was only 970px wide. So I went searching for a good way to stretch it out in the background and I ran across this gem. This HTML code combined with CSS will allow you to stretch an image of any size to fill in the entire space you need it to be the background for. In the example below this would go in the just inside of the body tag and would stretch over the entire background of the page. [Read More…]

Enable CLR Sprocs in MSSQL

31 October, 2012 | SQL Server, T-SQL | By: Michael Adams

Recently I inherited a project where the developer was using CLR stored procedures in Microsoft SQL Server. I found out that you must execute the following SQL Script to be able to use those stored procedures. This statement simply enables Common Language Runtime integration feature for the entire SQL instance that you are currently on. The CLR Integration feature is off on a new SQL Server instance by default so in order to use it you must run this statement. To enable this setting you must have the alter settings server level permission on the user account that you are [Read More…]

Find all Tables With Schema that Contain a Column by Name

29 October, 2012 | SQL Server, T-SQL | By: Michael Merrell

Sometimes you need to find tables that contain a specific column name. Maybe you want to find all the tables that have a User_ID column. This was my case when I came across writing this statement although it can be used for any cases where you need to find tables that contain a specific column. It ends up being a very simple query to the sys.objects and sys.columns tables using a join. First you query from the sysobjects table and find all objects that are type ‘U’ which stands for User Table. Then you join to the syscolumns and find [Read More…]

Parsing Large XML Files In VB.NET

24 October, 2012 | VB.NET, Windows Forms | By: Michael Adams

Recently I needed to modify a VB.NET 2.0 windows forms application to import data from an XML file over 2GB in size that was provided by a 3rd party vendor. The XML file contained multiple high level nodes, however, I’m was only concerned with nodes that matched my “PARENTNODENAME” string. Unfortunately, this file contained tens of thousands of “PARENTNODENAME” nodes that I needed to parse and the perform various database actions with the data they contained. The problem being that one could not simply read this into a single XML object as it would cause memory issues and more often [Read More…]