Monday, December 19, 2011

UK Newspaper Front Pages @ Front Pages Today

Website of the day on Pocket-lint today - what a fantastic idea, keep up to date with the big stories in the press day by day with direct links to all the papers. Also spans multiple countries too!
UK Newspaper Front Pages @ Front Pages Today:

'via Blog this'
Read More

One-click Blogging with BlogThis! Chrome Extension | Blogger Buzz

An extremely useful extension that should improve the frequency with which I update my blog. I usually post links through my twitter account ( @bUKaneer ) but will endeavour to post to my blog using this tool too!
One-click Blogging with BlogThis! Chrome Extension | Blogger Buzz:

'via Blog this'
Read More

Wednesday, June 29, 2011

NuGet, SQL CE 4 and CDN - oh my!


This is a system for “installing” components into your web application quickly and easily. So lets say your doing a data driven website using SQL CE 4, you’re going to be using jQuery and CSS control adapters. Simply create your new website as per normal fire up NuGet, do a search for jQuery and hit install, do a search for CSSFriendly double click and install. At this point it will have put copies of jQuery and CSS Friendly control adapters straight into your project! Brilliant! Theres LOADS of stuff available ousing NuGet these are only two VERY small example – check it out!


This is an “in site” file based database and needs no server components to run just some webspace supporting .NET 4 – it replaces using MS Access SQLite or PostgresSQL. In order to use it you simply need Visual Studio 2010 sp1 and the SQL CE 4 tooling support installed which can be downloaded from here and here . Then when you right click App_Data select New Item a new option will appear call SQL Server CE 4 – double click it and it will create for you a new database which you can use as per you would access.

SQL CE 4 Membership Provider:

Righty this little gem (provided via NuGet) is a way to use the Membership provider system built into .NET with SQL CE 4 – this is actually really easy to implement in about three step and takes about 5 minutes (I know because I did it yesterday). Once the steps are completed you will be able to use all the Membership functions directly from your new SQL CE 4 database saving you the time and effort of implementing this on small websites each time.

Google and Microsoft CDN

If you’re wanting to include framework such as jQuery jQuery UI and jQuery Validate then consider using a CDN (Content Delivery Network) version. This is basically an include to a file or files stored in the cloud. The advantages are tht you do not have to keep local copies of the files in your project and also that when a request is made when the page loads the file will be delivered from the nearest server to your user which should in theory speed up download times. The google CDN and Microsoft CDNS can be used in tandem so you could include jQuery and jQuery UI files from Google and Validate from Microsoft (I've done this and it works fine) – it’s a good way to keep your file footprint down on small sites: (Shows links to .js files) for the CSS to be included from CDN also please read the following (Both CSS and Javascript files are hosted on the Google CDN but only the js files are listed – bit silly however the previous link shows how to include the CSS files as well!)

Microsofts version can be foud here: (Webpage currently not working!)

Read More

Saturday, January 01, 2011

Moving a HTML Table Row

This has probably been done a million times before but i thought I would record my home-brew effort for posterity. The point of the following Javascript is to change the sequence in which Table Rows display using Javascript - this could be extended via AJAX calls to write back the new sequence to the data store but is beyond the scope of what I'm currently trying to achieve!

This method should be fairly generic and should work for any table with any number of columns and rows!

The Javascript function:
<script language="javascript" type="text/javascript">
function move(direction, tableCell) {
// Prepare variables to make code easier to read!
var table = tableCell.parentNode.parentNode;
var rowCount = table.rows.length;
var currentRow = tableCell.parentNode;
var currentRowIndex = currentRow.rowIndex;
// Disallow movement past bounds of table rows!
if (((currentRowIndex == 0) && (direction == 1)) || ((currentRowIndex == (rowCount - 1)) && (direction == 0))) return false;
// Find the Current Row's Sibling we're swapping position with
var newRowIndex = (direction == 0) ? currentRowIndex + 1 : currentRowIndex - 1;
var currentRowSibling = table.rows[newRowIndex];
// loop here foreach cell
for (var cellIndex = 0; cellIndex < currentRow.cells.length; cellIndex++) {
var currentRowSiblingCellHTML = currentRowSibling.cells[cellIndex].innerHTML;
currentRowSibling.cells[cellIndex].innerHTML = currentRow.cells[cellIndex].innerHTML;
currentRow.cells[cellIndex].innerHTML = currentRowSiblingCellHTML;
Read More