Author Archives: admin

The ways HTML5 vs. Flash could change gaming on the internet

It was never expected that there would be a battle between Flash Player and HTML5 to become the primary multimedia platform amongst internet users. This was down to Flash appearing to be in an unassailably dominant position. However since Apple made the controversial announcement that it would not be supporting Flash Player on any of its mobile devices, the long working partnership between the two companies diminished leading to HTML5 closing the gap with the support of Apple.

So what does the fight between the two mean for the internet?

Well depending on which of the two platforms comes out on top in the end it could make a serious difference to gaming. HTML5 allows the media used in games such as video, animation and graphics to be supported within the site while Flash requires to be downloaded externally. At the moment Flash is still the most popular choice with gamers, but this is less to do with it being a superior platform and more to do with there currently being more Flash-compatible games available. This is not likely to remain the case forever, and with more and more online casino sites turning to HTML for their mobile casino options the latter could really begin to win gamers over.

Just as with mobile sites, HTML5 looks a better supported option for those who do not want to have to keep downloading tools to their computers. The simple fact that it allows media to be supported on the site itself, rather than requiring a plug-in, means that it tends to be more stable and less liable to crash. This is particularly significant for games and sites such as These type of sites require a lot of investment of time in order to play them successfully – because if the platform crashes during the course of a long game it can seriously damage your chances of winning.

E-Book Gallery for Microsoft Technologies

Download existing and new content for ASP.NET, Office, SQL Server, Windows Azure, and other Microsoft technologies in e-book formats. Reference, guide, and step-by-step information are all available. All the e-books are free. New books will be posted as they become available.

  • Deploying an ASP.NET Web Application to a Hosting Provider using Visual Studio
  • Getting Started with ASP.NET 4.5 Web Forms (Beta)
  • Intro to ASP.NET MVC 4 with Visual Studio (Beta)
  • Configure Kerberos Authentication for SharePoint 2010 Products
  • SQL Server Master Data Services Capacity Guidelines
  • Microsoft SQL Server AlwaysOn Solutions Guide for High Availability and Disaster Recovery
  • Microsoft SQL Server Analysis Services Multidimensional Performance and Operations Guide
  • QuickStart: Learn DAX Basics in 30 Minutes
  • SQL Server 2012 Transact-SQL DML Reference
  • Windows Azure Prescriptive Guidance
  • Windows Azure Service Bus Reference

All the books are available in EPUB, MOBI, PDF format!

Download all the books from here.

Introducing Microsoft SQL Server 2012

41rYAFQaxbL. BO2204203200 PIsitb sticker arrow clickTopRight35 76 AA278 PIkin4BottomRight 4322 AA300 SH20 OU01  Introducing Microsoft SQL Server 2012For tech guys here is a free Microsoft ebook. Its a 288 pages book that gets you into shape with latest SQL Server 2012.

Microsoft SQL Server 2012 is Microsoft’s first cloud-ready information platform. It gives organizations effective tools to protect, unlock, and scale the power of their data, and it works
across a variety of devices and data sources, from desktops, phones, and tablets, to datacenters and both private and public clouds. Our purpose in Introducing Microsoft SQL Server 2012 is to point out both the new and the improved capabilities as they apply to achieving mission-critical confidence, breakthrough insight, and using a cloud on your terms.

As you read this book, we think you will find that there are a lot of exciting enhancements and new capabilities engineered into SQL Server 2012 that allow you to greatly enhance performance and availability at a low total cost of ownership, unlock new insights with pervasive data discovery across the organization and create business solutions fast—on your terms.

Download from here.

You can get it for Kindle as well.

SQL Server 2012 Cheatsheet

Pinal Dave has released his latest cheatsheet regarding the latest SQL Server 2012. Whats in there:

  • SSMS Shortcuts
  • Columnstore Index
  • SQL Server 2012 Datetime Functions
  • SQL Server Ranking Functions
  • SQL Server 2012 Analytic functions

Download from here.

Validate multiline TextBox

Because it is rendered to TextArea the MaxLength property does not work. One way around this is to attach a regular expression validator to that control. What is important is to set the ValidationExpression to something like “^[\s\S]{0,255}$“. Where 255 is the maximum length allowed.

Hope this helps icon smile Validate multiline TextBox

What is coming with VS2011 and Framework 4.5

ASPNET vNext What is coming with VS2011 and Framework 4.5Read here from Scott Hanselman’s post.

Download Links

Readmission to hospital within 28 days of discharge

This is very common question when we deal with patients in NHS data. Here is how the task is defined – Readmission rates and HES. In short we need to know how many times(or when) a patient was readmitted within 28 days of his last hospital discharge. Here is how I do that in SQL with self join.

The dates are being transferred from “DDMMYYYY” to SQL server datetime “YYYY-mm-dd”.

You can always ad disease code or any other conditions to the query. Hope it helps!

The columns are:
[Column 8] – Patient identifier
[Column 11] – Admission date
[Column 15] – Method of admission
[Column 19] – Discharge date
[Column 28] – Spell end – Yes/No
[Column 123] – PCT code
[Column 187] – Unique record ID

SELECT a.[Column 8] as 'PatientID', a.[Column 15] as 'Method of Admission',
convert(datetime, STUFF(STUFF(a.[Column 11],3,0,'-'),6,0,'-'), 105) as 'Admission Date',
convert(datetime, STUFF(STUFF(a.[Column 19],3,0,'-'),6,0,'-'), 105) as 'Dischrage Date',
MIN(convert(datetime, STUFF(STUFF(b.[Column 11],3,0,'-'),6,0,'-'), 105)) AS 'Readmission Date',
left(a.[Column 123],3) as 'PCT',
DateDiff(dd, convert(datetime, STUFF(STUFF(a.[Column 19],3,0,'-'),6,0,'-'), 105), MIN(convert(datetime, STUFF(STUFF(b.[Column 11],3,0,'-'),6,0,'-'), 105))) AS 'How many days'
FROM Readmissions_data a
INNER JOIN Readmissions_data b ON a.[Column 8] = b.[Column 8]
	AND convert(datetime, STUFF(STUFF(b.[Column 11],3,0,'-'),6,0,'-'), 105) BETWEEN convert(datetime, STUFF(STUFF(a.[Column 19],3,0,'-'),6,0,'-'), 105) AND DATEADD(dd, 28, convert(datetime, STUFF(STUFF(a.[Column 19],3,0,'-'),6,0,'-'), 105))
WHERE a.[Column 28]='Y' AND a.[Column 19]<>'' AND (right(a.[Column 19],2)='09' OR right(a.[Column 19],2)='10') AND a.[Column 187]<>b.[Column 187]
GROUP BY a.[Column 8],a.[Column 15],left(a.[Column 123],3),convert(datetime, STUFF(STUFF(a.[Column 11],3,0,'-'),6,0,'-'), 105),convert(datetime, STUFF(STUFF(a.[Column 19],3,0,'-'),6,0,'-'), 105)
ORDER BY convert(datetime, STUFF(STUFF(a.[Column 11],3,0,'-'),6,0,'-'), 105)

Clean whole database from unwanted string

Often we end up having an unwanted string injected into our database. It might be a virus or any text that you don’t need. This stored procedure is doing the hard work to remove all the unwanted instances.

ALTER PROC [dbo].[UpdateAllTables]
	@SearchStr nvarchar(100)


	DECLARE @TableName nvarchar(256), @ColumnName nvarchar(128), @SearchStr2 nvarchar(110)
	SET  @TableName = ''
	SET @SearchStr2 = QUOTENAME('%' + @SearchStr + '%','''')
	SET @SearchStr = QUOTENAME('' + @SearchStr + '','''')

		SET @ColumnName = ''
		SET @TableName = 
							 ), 'IsMSShipped'
						       ) = 0

		WHILE (@TableName IS NOT NULL) AND (@ColumnName IS NOT NULL)
			SET @ColumnName =
					AND	TABLE_NAME	= PARSENAME(@TableName, 1)
					AND	DATA_TYPE IN ('char', 'varchar', 'nchar', 'nvarchar')
			IF @ColumnName IS NOT NULL
					'UPDATE ' + @TableName + ' SET ' + @ColumnName + '=REPLACE(' + @ColumnName + ','+ @SearchStr + ','''') WHERE ' + @ColumnName + ' LIKE ' + @SearchStr2