Visual Studio 2013 (First Look): One ASP.NET and BootStrap

by Rohit 15. December 2013 14:43

With the release of Visual Studio 2013 comes more improvements to make life of developers even more easier.  The release of Visual Studio 2013 came as a surprise though. Few weeks back I downloaded Visual Studio 2012 Express and was excited to start a new MVC application on it. I wanted to submit feedback and some valid reasons to migrate old projects to Visual Studio 2012 to my team in office. My feedback document now requires a revision with the release of 2013. No doubt, the changes looks exciting.

 

 Not only me but most developers wanted to use both MVC and Web Forms together in few situations. One ASP.NET is a move towards this. Visual Studio 2013 provides this option when you create a new Web Forms application.

 

 

If you select MVC in [Add folders and core references for:], Visual Studio 2013 creates a new project which includes MVC folders and default Web Forms as shown below: More...

Resolving reCAPTCHA issue in BlogEngine.NET

by Rohit 10. December 2013 22:43

I was using Disqus as comment provider but many readers were not able to post a comment and didn't want to go through the registration process. Therefore I disabled Disqus and enabled Simple Captcha Extension of BlogEngine. Because of the static nature of Simple Captcha, I started receiving lot of spam from the last few days. I disabled Simple Captcha and enabled reCAPTCHA extension. But even after several attempts tweaking with reCAPTCHA files, reCAPTCHA image was not appearing with the comment box. I submitted this issue on Twitter and soon got the response from BlogEngine.

The reason for reCAPTCHA image not appearing was the change in the URL. To resolve this follow these steps:

  1. Go to: wwwroot\App_Code\Extensions\Recaptcha
  2. Open the file: RecaptchaControl.cs
  3. Replace the URL:  http://api.recaptcha.net/js/recaptcha_ajax.js  with  http://www.google.com/recaptcha/api/js/recaptcha_ajax.js

This change worked and now reCAPTCHA is working. One more point to note is to disable Simple Captcha before enabling reCAPTCHA Extension.

 

 

Tags: , ,

BlogEngine.NET

What makes a CTE different from a Derived Table/Subquery? When to use it?

by Rohit 23. November 2013 23:30

Common Table Expression (CTE) was introduced in SQL Server 2005. A CTE is a temporary result set similar to a derived table which is not stored as an object. This result set lasts only for the duration of the query. You can reference a CTE within a SELECT, INSERT, UPDATE or DELETE statement.

 

 

Example of a Derived Table:

 

Select EmpId, EmpName, Manager 
From 
(
	select 
	  A.EmployeeId AS EmpId
	, A.EmployeeName AS EmpName
	, B.Manager AS Manager
	from EmployeeMaster A
	inner join EmployeeDetails B
	on A.EmployeeId = B.EmployeeId
	group by A.EmployeeId, A.EmployeeName, B.Manager

) EmployeeInfo

 

Example of a CTE:

 

With EmployeeInfo (EmpId, EmpName, Manager)
As
(
	select 
	  A.EmployeeId AS EmpId
	, A.EmployeeName AS EmpName
	, B.Manager AS Manager
	from EmployeeMaster A
	inner join EmployeeDetails B
	on A.EmployeeId = B.EmployeeId
	group by A.EmployeeId, A.EmployeeName, B.Manager
)
select * from EmployeeInfo

 

 

So what makes CTE different from a derived table? A CTE has few advantages over a derived table: More...

Tags: , , ,

SQL Server | Technology

About Rohit Prakash

Software Craftsman @ Fortune 100 Company. Technical Reviewer of few programming books.

A Single, Writer, Reader and Adventurist.

You can reach me at:

rohit [at] irohitable.com

-----------------------------------------

LinkedIn:

in.linkedin.com/in/rohitpkhare

Twitter:

@BuzzRohit

-----------------------------------------

Month List

Protected by Copyscape Web Plagiarism Software