Wednesday, November 28, 2012

Unable to restore database in SQL Server because of running processes

Unable to restore database in SQL Server because of running processes.

If you are unable to restore database in SQL Server because of running processes.

1. You can find which processes are running using the following command:
sp_who2

2. After finding out which processes are running relating to the particular database, you can kill them using the kill command with process id

For eg.

kill 63
kill 55

This should restore your database.


Thursday, November 15, 2012

Delete duplicate rows in table with no key in SQL Server

Delete duplicate rows in table with no key in SQL Server:

DELETE
FROM  TableName
WHERE TableName.%%physloc%%
      NOT IN (SELECT MIN(b.%%physloc%%)
              FROM TableName b
              GROUP BY b.ColumnName)

Thursday, September 20, 2012

10 Key Features in Windows 8

Windows 8 introduces significant changes to the operating system's graphical user interface and platform; such as a new interface design incorporating a new design language used by other Microsoft products, a new Start screen to replace the Start menu used by previous versions of Windows, a new online store that can be used to obtain new applications, along with a new platform for apps that can provide what developers described as a "fast and fluid" experience with emphasis on touchscreen input.Additional security features were also added to the operating system, such as a built-in antivirus program and a secure boot feature on systems with UEFI firmware.

10 Key Features in Windows 8

1. Support for both x86 PCs and ARM tablets
2. Touch-centric, Tiles-based User Interface (UI)
3. Charms
4. Snap Multi-tasking
5. Windows 8 Control Panel
6. Web Navigation by Touch
7. Two Touch Keyboards
8. Enhanced Copy Experience
9. Native USB 3.0 Support
10. Better Support for Multiple Monitors

Sunday, July 15, 2012

How to get the details of W3WP processes running on your server

How to get the details of W3WP processes for each app pool running on your server
Run this command from System32 folder

Cscript iisapp.vbs

Output will be in the format:

W3WP.exe PID: 1468   AppPoolId: AppPoolForSite1.com
W3WP.exe PID: 3056   AppPoolId: AppPooForSite2.com
W3WP.exe PID: 1316   AppPoolId: AppPooForSite3.com

Auto Refresh a Web Page

Add the below line in the <head> section of your web page.
For Eg.
<meta http-equiv="Refresh" content="90" />

where "90" is Time in seconds.

Sunday, June 10, 2012

Redirection from http to https using Javascript

Redirection from http to https using Javascript

<script language="JavaScript">
function redirectHttpToHttps()
{
    var httpURL= window.location.hostname + window.location.pathname + window.location.search;
    var httpsURL= "https://" + httpURL;
    window.location = httpsURL;
}
redirectHttpToHttps();
</script>

Sunday, May 20, 2012

Redirection of page from http to https using VB.net and C#

Redirection of page from http to https using VB.net

If Not Request.IsSecureConnection Then
 Dim redirectUrl As String = Request.Url.ToString().Replace("http:", "https:")
 Response.Redirect(redirectUrl)
End If

Redirection of page from http to https using C#
if(!Request.IsSecureConnection)
{
  string redirectUrl = Request.Url.ToString().Replace("http:", "https:");
  Response.Redirect(redirectUrl);
}

Redirection Script for redirecting to new page

Redirection Script for Redirecting to new page.

One can use this redirection script to redirect from one page to another

<SCRIPT LANGUAGE="JavaScript">
  
 document.location.href = "<url to redirect>";
 
 </SCRIPT>

Thursday, May 3, 2012

init.js - library not registered

If you are getting a javascript error in the web browser
OR
A Java error
OR
Dropdown Menu not working in a Sharepoint 2007 site

Running IE?
Have Office 2010 64-bit installed?
If you are getting a init.js - library not registered error, try this:
Open CMD prompt, and navigate to C:\Program Files (x86)\Microsoft Office\ Office14.

Type regsvr32 name.dll  and Press Enter.
Restart IE
Done

Sunday, February 5, 2012

Microsoft SharePoint

Microsoft SharePoint is a web application platform developed by Microsoft. First launched in 2001,SharePoint is typically associated with web content management and document management systems, but it is actually a much broader platform of web technologies, capable of being configured to suit a wide range of solution areas.

SharePoint is designed as a broad, central application platform for common enterprise web requirements. SharePoint's multi-purpose design allows for management and provisioning of intranet portals, extranets, websites, document & file management, collaboration spaces, social tools, enterprise search, business intelligence, process integration, system integration, workflow automation, and core infrastructure for third-party solutions. SharePoint's core infrastructure is also suited to providing a base technology platform for custom developed applications.

SharePoint is capable of supporting multiple organizations on a single 'server farm'. Microsoft provides SharePoint Foundation at no cost, but sells premium editions with additional functionality,and also provides SharePoint as a service in their cloud computing as part of their Office 365 platform (and previously as part of their Business Productivity Online Standard Suite (BPOS) offering). The product is also sold through a cloud model by many third-party vendors.

In late 2008, the Gartner Group put SharePoint in the "leaders" quadrant in three of its Magic Quadrants (for search, portals, and enterprise content management).SharePoint is used by 78% of Fortune 500 companies. Between 2006 to 2011, Microsoft sold over 36.5 million user licences.

JQuery - Cross Browser JavaScript library

jQuery is a fast and concise JavaScript Library that simplifies HTML document traversing, event handling, animating, and Ajax interactions for rapid web development. jQuery is designed to change the way that you write JavaScript.

jQuery is a cross-browser JavaScript library designed to simplify the client-side scripting of HTML.It was released in January 2006 at BarCamp NYC by John Resig.
jQuery is the most popular JavaScript library in use today.

jQuery is free, open source software, dual-licensed under the MIT License or the GNU General Public License, Version 2. jQuery's syntax is designed to make it easier to navigate a document, select DOM elements, create animations, handle events, and develop Ajax applications. jQuery also provides capabilities for developers to create plug-ins on top of the JavaScript library. This enables developers to create abstractions for low-level interaction and animation, advanced effects and high-level, theme-able widgets. The modular approach to the jQuery library allows the creation of powerful and dynamic web pages and web applications.

Including the library

The jQuery library is a single JavaScript file, containing all of its common DOM, event, effects, and Ajax functions. It can be included within a web page by linking to a local copy, or to one of the many copies available from public servers.

<script type="text/javascript" src="jquery.js"></script>

The most popular and basic way to introduce a jQuery function is to use the .ready() function.

$(document).ready(function() {
// jquery goes here
});


or the shortcut

$(function() {
// jquery goes here
});


You can download the JQuery library using the following link:
http://jquery.com/