Monday, June 27, 2011

Forget '.com', are you ready for '.google', or '.bank'?

Think of it as a cyberspace land rush, as companies and others try to stake claims to websites ending with names like ".bank"

Come next year, an era when site names ended in a handful of predictable ways like ".com" or ".gov" draws to a close. ICANN, which stands for the Internet Corporation for Assigned Names and Numbers, says it will accept applications for domains with new suffixes that could range from corporate names (like ".Apple" or ".Sony") to more generic terms (like ".bank" or ".supermarket").

Don't expect that all those ".com" sites will simply fade away, or that every celebrity will start a site with a name like "Lady.Gaga." Some pop stars may try to do that, but ICANN has made the process of launching a new suffix cumbersome and costly, to put some limits on the proliferation of web suffixes.

What's certain, though, is that companies and other entities will now be thinking hard about the new "your-name-here" opportunity. And on the flip side, they'll be pondering the potential risks of not joining the stampede.

Web experts have said that ICANN’s proposals, to essentially open up a new online market-place, where new addresses are available for those brands and individuals who have lost their identity online in the first and second wave of the web, could be significant.

It will cost £162,000 to apply, and individuals or organizations will be asked to show a legitimate claim to the name they are buying.

Credit: Material from the Telegraph and Wire Services were used in this article.

Sunday, June 26, 2011

Extension method for IComparable

.net

Extension method for IComparable

C# 3.0 gives great feature of extension method. I am also very much interested for Extension method.  Today, My friend Divyang posts very useful topic "Extension Meathod for IComparable".  I would like to share you something interesting way to use that extension method. This time it's extending IComparable. The API signature for IComparable<T> has been around since the birth of  C language . If the left is less than the right, return something less than 0, if left is greater than right, return something greater than 0, and if they are equivalent, return 0. Well, its readability leaves a bit to be desired.
So Here we have set of extension methods for any type T that implements IComparable:

GUIDs (Globally Unique Identifiers) in .NET

.net

What is GUID ?

A GUID is a 128-bit integer that can be used to uniquely identify something. You may store as primary key in your database. A common approach is to create a auto incrementing integer, another way would be to create a GUID for your field. 
GUIDs can be generated in a number of ways; most often a hash of several things that might be unique at any given point in time like the IP address plus the clock date/time etc are used to generate Unique Ids. Each system may have slightly different algorithm to generate the Unique Id.

Friday, June 24, 2011

Microsoft Free Books For SharePoint 2010


Microsoft SharePoint 2010

I found useful books and wallpaper for SharePoint 2010. 
They are as bellow : 

Windows Phone 7 Development

Windows Phone 7 Development.

Introduction

For programmes, Windows Phone 7 is also exciting, for it supports two popular and modern
Programming platforms: Silverlight and XNA.

Silverlight

A spinoff of the client-based Windows Presentation Foundation (WPF) has already given Web programmers unprecedented power to develop sophisticated user interfaces with a mix of traditional controls, high-quality text, vector graphics, media, animation, and data binding that run on multiple platforms and browsers. Windows Phone 7 extends Silverlight to mobile devices.

Generally you’ll choose Silverlight for writing programs you might classify as applications or utilities. These programs are built from a combination of markup and code. The markup is the Extensible Application Markup Language, or XAML and pronounced “zammel”. The XAML mostly defines a layout of user-interface controls and panels. Code-behind files can also perform some initialization and logic, but are generally relegated to handling events from the controls. Silverlight is great for bringing to the Windows Phone the style of Rich
Internet Applications (RIA), including media and the Web. Silverlight for Windows Phone is a version of Silverlight 3 excluding some features not appropriate for the phone, but compensating with some enhancements.

Apple Vs. Microsoft The History Of Computing (Infographic)

Inforgraphic are the the best learning concepts in modern Internet world.
Look out for infographics for learning.

I am sharing wonderful infographic of two Software Giants history and present.




Image By Manolution – The Blog for Men

Windows 8 - Amazing OS

Windows 8, the next generation of Windows, internally code-named “Windows 8,” for the first time. Windows 8 is a re-imagining of Windows, from the chip to the interface. A Windows 8-based PC is really a new kind of device, one that scales from touch-only small screens through to large screens, with or without a keyboard and mouse.

The video showed some of the ways re-imagined the interface for a new generation of touch-centric hardware. Fast, fluid and dynamic, the experience has been transformed while keeping the power, flexibility and connectivity of Windows intact.

Thursday, June 23, 2011

Nokia Window Phone Mango- Neowin

Nokia CEO Stephen Elop have unveiled the Nokia’s first Windows Phone device during an internal company meeting earlier this week. According to Neowin “Elop mentions that the device is “super confidential” and that the company doesn’t want to see it out in the blogosphere. “Beautiful design, gorilla glass, pillow shaped backing, carl ziess 8MP camera,” says Elop.
The product is Nokia’s first Windows Phone device and will be available later this year when the company releases a batch of Windows Phone Mango devices.”

Techdays 2011 : Expression Blend for Silverlight Developers

Every year Microsoft conducts Techdays specially for developer community. I found useful video of Techdays which was conducted at UK on "Expression Blend for Silverlight Developers".
The session is split into:
  • Workflow
  • Quick fire tips on Blend
  • Building an app

Tips and Tricks : Visual Studio 2010

Visual Studio 2010

I found good post from my friend divyang blog http://divyang4481.blogspot.com. I like to share with you. It may be increase productivity you.

Tip #1 – You don’t need to select a line to copy or delete it

I always cringe whenever I see someone select an entire line of code in the Visual Studio code editor before copying the line or deleting the line (see Figure 1). You don’t need to do this.
Figure 1
image
f you want to copy a line of code then you can simply press CTRL-c to copy the line and press CTRL-v to paste the line. If you want to delete a line, don’t select it first, just press CTRL-x. You’ll be surprised how much time this one tip will save you.

Wednesday, June 22, 2011

NEWID() - Generate Randomly Sort Records - TSQL

NEWID() - Generate Randomly Sort Records - TSQL

In our company, we have project for "Quiz management". On quiz page, we have to fetch 10 random question from large table. To get a random question, you might be tempted to select the top n rows from the table. However, this question is not random. The first n rows are not necessarily representative of the whole table. After few searches on MSDN, we found wonderfull solution. The solution here is the NEWID function, which generates a globally unique identifier (GUID) in memory for each row. By definition, the GUID is unique and fairly random; so, when you sort by that GUID with the ORDER BY clause, you get a random ordering of the rows in the table.

For that we use bellow query, which generate 10 random question each time. For testing we run them 3 times and code as per bellow.

Code :
SELECT TOP 10  *   FROM questions ORDER BY NEWID();

Tuesday, June 21, 2011

SQL Server CE 3.5 Overview

Windows Phone 7.5 Mango technical preview

Last week Microsoft presented me with a Samsung Focus smartphone that was running a recent pre-release build of Windows Phone "Mango." Mango is the version of the OS that will replace Windows Phone 7, which launched last year.


Hi-Tech ITO: Nokia N9 - Design, Social and Interaction


Hello Guys,

Nokia today announced N9, their new invention to compete with Smart Phone majors.
You can find more details on Nokia N9 - http://swipe.nokia.com/


I classify the device in to three major things , which are done beatifically in new Device.

Design - Unibody Design , and no Home Button , Curved Shape Glass
Read More.....

Apple : iOS 5 Features

iOS 5
When Apple unveiled iOS 5 last Monday, Steve Jobs mentioned that their new OS for mobile devices included 200 new features. Apple didn’t give us a list of these 200 features, so it was left to beta testers to find them out themselves. Testers compiled the most comprehensive list of new iOS 5 features to, date which is as per bellow.

Notifications (full details)

  • Notification center
  • Lockscreen notifications
  • Slide lockscreen notifications to open their app
  • In app notifications
  • Select what notifications appear
  • Select where notifications appear
  • Sort notifications manually or by time

Some Amazing Fact About JavaScript


At once weird and yet beautiful, it is surely the programming language that Pablo Picasso would have invented. This post about some secrets and amazing fact of JavaScript.This facts and secretes helps to developers who are curious about
more advanced JavaScript. It is a collection of JavaScript’s oddities and well-kept secrets. I am going to prove you that every each of them can be explained.
  • Data Types And Definitions

    • Null is an Object

      Null is apparently an object, which, as far as contradictions go, is right up there with the best of them. Null? An object? “Surely, the definition of null is the total absence of meaningful value,” you say. You’d be right. But that’s the way it is. Here’s the proof:
      alert(typeof null);  //alerts 'object'
      Despite this, null is not considered an instance of an object. (In case you didn’t know, values in JavaScript are instances of base objects. So, every number is an instance of the Number object, every object is an instance of the Object object, and so on.) This brings us back to sanity, because if null is the absence of value, then it obviously can’t be an instance of anything. Hence, the following evaluates to false:
      alert(null instanceof Object);  //evaluates false

OOPs Concept

Object Oriented Programing is common practice in modern software development. So any beginner developer  must know what it is and should be able to explain certain terms which  is  used in .NET a object oriented programming  platform .  
  • Classes
  • Properties
  • Methods
  • Fields
  • Members
  • Enums
  • Casting
  • Structures
  • Abstraction
  • Encapsulation
  • Interfaces
  • Static classes
  • Constructors
  • Method overloading
  • Inheritance
  • Overriding methods
  • Virtual methods
  • Abstract classes
  • Polymorphism
  • Delegates
  • Events
  • Assemblies
  • Namespaces



Read More.....

Monthwise report With Pivot Query

Yesterday One of my friend give me to solve one interesting query. There are some specific forms list in one table. There is one more table for month. The status of form as per month recorded in another table. Base on status table, we have to find for which month status record not fill up for forms.

Table Name         Field Name

Forms                   form_id
                              form_name

Months                 Month_id
                              Month_Name

Status                   form_id
                              month_id
                              status (whether filled or not)
                              comment (Comment for each entry)

Sample Data As per Bellow: 

Required Result
I found one solution for this. The code of query as per bellow.

Monday, June 20, 2011

Server Side Pagination Query

The paging of a large database resultset in Web applications is a well known problem. In short, you don't want all the results from your query to be displayed on a single Web page, so some sort of paged display is more appropriate. While it was not an easy task in the old ASP, the DataGrid control in the ASP.NET simplifies this to a few lines of code. So, the paging is easy in ASP.NET, but the default behavior of the DataGrid is that all resulting records from your query will be fetched from SQL server to the ASP.NET application. If your query returns a million records this will cause some serious performance issues (if you need convincing, try executing such a query in your web application and see the memory consumption of the aspnet_wp.exe in the task manager). That's why a custom paging solution is required where desired behavior is to fetch only the rows from the current page. 

Here I provide some query which provide solution for custom pagination. It helps to improve your search result for your filter data.
Code

How to Add Google Plus one (+1) Button to Website/Blogs


The Plus One (+1) button, Google’s new experiment, is shorthand for “this is pretty cool” or “you should check this out.”  By clicking Plus One (+1), you can to publicly give something your stamp of approval. Your vote can help friends, contacts, and others on the web find the best stuff when they search.
Plus One (+1) will be integrated directly into Google’s search engine, and will serve pretty much the same purpose as a Facebook ‘Like’ does. But it is not like face where you should go and and post your like or dislike. The Plus One (+1) button, you can keep on any website/blog. Here we explain implementation of Plus One (+1) button.
Implement Plus One (+1) button to your website
The implementation is very simple and you get started instantly by using this default code where you want the Google Plus One (+1) button to appear. You just  require to insert two line of codes to your HTML.
1. Insert the following javascript code to your <head> tag.
<script type= "text/javascript" src= "http://apis.google.com/js/plusone.js"></script>
2. Insert the following tag to the place where you want the button to appear.
<g:plusone> </g:plusone>

Sunday, June 19, 2011

TSQL - Decimal to time

 Yesterday I got one query to change numeric value to decimal value. Suddenly I thought "Are datetime and numeric value convertible?" like It convert in excel. Is it possible SQL Server. After 1 hours searching and trial and error ,  I found result.  
The answer is yes. 
Here are the main rules on DATATIME and NUMERIC value conversions:
  • During the conversion a DATETIME value will be treated as a NUMERIC value with the number of days relative the base date, Jan 1, 1900 being the integer part, and the time of the day being the decimal part.
  • DATETIME values can not be converted to NUMERIC values implicitly using assignment operations.
  • NUMERIC values can be converted to DATETIME values implicitly using assignment operations.
  • DATETIME values and DATETIME values can be converted to each other explicitly using CAST() or CONVERT() functions.
The tutorial exercise below shows you some good examples:
  • Implicit conversion Numeric to Datetime
    Implicit Conversion Numeric To Datetime.

    Implicit Conversion Numeric To Datetime

Divyang Panchasara: move ViewState to bottom of Page in ASP.NET

Divyang Panchasara: move ViewState to bottom of Page in ASP.NET: "on last Saturday, in Community tech days Tejash Shah has discussed about viewstate's prons and crons. in his wonderful session and also..."

IE9 Developer Tools: Network Tab

At MIX 10 Microsoft released the IE9 Platform Preview and showed some of the included developer tools. You can access these tools by pressing F12, or click Developer Tools on the Debug menu when you use the Platform Preview.

Debug menu in the Platform Preview Build.  The first option is Developer Tools.
Debug >> Developer Tools ( F12 )

The developer tools include some new capabilities and improvements in tools which is not available in IE8.
  • Network Inspection Tab
  • Inspecting HTML and CSS
  • Script Debugging and Using the Console
  • Improving Script Performance
  • Changing the UA String and Compatibility Modes
  • Putting it Together

NULLIF (Transact-SQL)

Yesterday I found one more function of sql server. NULLIF which returns the first expression if the two expressions are not equal. If the expressions are equal, NULLIF returns a null value of the type of the first expression. NULLIF function is available from Sql Server 2005.

Syntax :

NULLIF ( expression , expression )

Example :

The following example creates a budgets table to show a department (dept) its current budget (current_year) and its previous budget (previous_year). For the current year, NULL is used for departments with budgets that have not changed from the previous year, and 0 is used for budgets that have not yet been determined. To find out the average of only those departments that receive a budget and to include the budget value from the previous year (use the previous_year value, where the current_year is NULL), combine the NULLIF and COALESCE functions. 

ISNULLIF Example

Saturday, June 18, 2011

As Operator in C#

The as operator is used to perform certain types of conversions between compatible reference types. "As" Operator is also known as a safe cast. What is does is it attempts to cast from one type to another and if the cast fails it returns null instead of throwing an InvalidCastException.
As-casting is equivalent to the following expression except that expression is evaluated only one time.
expression is type ? (type)expression : (type)null

Visual studio update on facebook

Yesterday I found link of  Visual Studio Page on facebook. All new annocements of visual studio listed on the wall of visual studio. So anybody like to join Visual Studio on facebook.


Visual Studio on Facebook
Visual Studio on Facebook




It is nice way to updated with face book.

Web Standards Update for Visual Studio 2010 SP1

There is great future for HTML 5 and CSS 3. Still they are not approved by W3C. But all new browsers make them HTML 5 and CSS 3 completable. IE 9 and firefox 4 are supports almost all features of HTML 5 and CSS 3.  In order this scenario, the Web Platform and Tools team is very pleased to announce the first Web Standards Update for Visual Studio SP1. 


New in iOS 5: Split Keyboard

Apple announce iOs 5 with number of new great features. Split keyboard is one of them. In previous version we face lot time keypad covers half of screen. Due to that many contain hides beside keypad. But split keypad is solve that problem.  It just makes typing on the iPad faster and easier.

To activate this, simply tap the keyboard icon at the bottom right of the keyboard and it will give you 2 options: undock, which lets you use the keyboard higher or lower on the screen, and split, which let’s you undock and split the keyboard just like it is on the image bellow… 

Ipad with split keypad Option

Friday, June 17, 2011

Important Query For DBA

Which protocol is being used for client-server connectivity in SQL Server?
SELECT net_transport FROM sys.dm_exec_connections WHERE session_id = @@SPID;
Above  query return our server  connection protocol. There are 4 protocol there for connect database server with client.
  • Shared Memory
  • TCP/IP
  • Named Pipes
  • VIA (Virtual Interface Adapter)

Windows Phone Developer Tools 7.1 Beta

Mango comes with 500 new features which includes enhanced Facebook, Twitter and LinkedIn integration, hands-free messaging, a multiple email inbox and the ability to chat with friends using Facebook Chat, Windows Live Messenger and SMS in the same thread. Mango also brings with it the Office365 and IE9 experiences. Mango, is first smart phone which provides multiprocessing between different customize application.

History Of MS SQL Server

SQL Server 2008 R2 is the latest version of a database server product that has been evolving since the late 1980s. Microsoft SQL Server originated as Sybase SQL Server in 1987. 

In 1988, Microsoft, Sybase, and Aston-Tate ported the product to OS/2. Later, Aston-Tate dropped out of the SQL Server development picture, and Microsoft and Sybase signed a co-development agreement to port SQL Server to Windows NT. The co-development effort cumulated in the release of SQL Server 4.0 for Windows NT. After the 4.0 release, Microsoft and Sybase split on the development of SQL Server; Microsoft continued forward with future releases targeted for the Windows NT platform while Sybase moved ahead with releases targeted for the UNIX platform, which they still market today. 

Delete VS Truncate

"What is deference between Delete & Truncate ? " 

We all face this question in interview at least once in our career. Actually it is very tricky question. We have many misunderstanding regarding this two terms. After lots of searching today I found some good comparison between them. It is as per bellow.

Delete Truncate
Removes rows from a table or view. DELETE statements delete rows one at a time, logging each row in the transaction log, as well as maintaining log sequence number (LSN) information. Removes all rows from a table without logging the individual row deletions.
TRUNCATE TABLE is similar to the DELETE statement with no WHERE clause; however, TRUNCATE TABLE is faster and uses fewer system and transaction log resources.
You may use DELETE statement against a view (with some limitations). You can’t use TRUNCATE statement against a view.

Google Search by Image

Google announced a new feature which will allow users to search the internet using images found both on their computer or online. Google uses computer vision techniques to match your image to other images in the Google Images index and additional image collections. From those matches, we try to generate an accurate “best guess” text description of your image, as well as find other images that have the same content as your search image. Your search results page can show results for that text description as well as related images. 

Steps For Search By Image (Work with firefox and crome only)  :
1) Visit web site : http://images.google.com/