Thursday, August 27, 2015

Search Text in schema of Stored Procedure

With a big database this is one of the basic issue if you want to search whether a particular string/value available in anywhere in schema of stored procedure.
So we cant do it manually (yeah we have option of looking into dependencies but this is one step ahead) like It will help us to search in even comments too.
 

SELECT DISTINCT OBJECT_NAME(OBJECT_ID),
object_definition(OBJECT_ID)
FROM sys.Procedures
WHERE object_definition(OBJECT_ID) LIKE '%This part is commented%'
GO


Happy Living...
Happy Coding...
Happy Concepts ...

Thursday, June 11, 2015

Reset or Normalize default User Code Stylesheet of Browser

Here i am going to talk about "User Code Style sheet". It is default style sheet of browser get applied on Dom elements if nothing is specified about how to handle elements appearance on page.

Problem:

But it might get applied if the tags are not closed properly and will lead to different UI display.

Solution :


To resolve this issue we have 2 either to reset it or normalize stylesheet.

Reset CSS: (Get Reset Css)
Resets browsers defauts

Normalize CSS: 
Preserve useful browser defaults rather than erasing them. 
Normalize styles for a wide range of HTML elements.
Correct bugs and common browser inconsistencies. 
Improve usability with subtle improvements. 
Explain the code using comments and detailed documentation.

Note: Try to put it after all your style sheet to implement inherit property. 

Happy Living.....
Happy Concepts.....
Happy Coding.....

Friday, May 22, 2015

Enable Nuget packages in Visual Studio 2010

The NuGet is easier way to include dlls or other projects/utilities in your projects. If we aren't using it , in one way we are selecting some tough way to achieve something that can be implemented in straight forward way.

Open Visual studio in menu bar click on Tools-> Extension Manager


fig 1

It will open a new popup as shown below, In this popup you can see there isn't any Extension Manager installed. Once we install Nuget it will appear in this screen.

fig 2
Now we will do following steps:
1. Click on Online Gallery under Installed Extensions.
2. Type Nuget in search text box at right top corner
3. Now it will appear in middle area of window now click to Download.


fig 3
Now you will get another popup for installation read term and conditions and click on install.



fig 4

On completion of installation there will be a message box, close it.

fig 5

Once it get completed, Restart Visual Studio  you will able to see it under Installed Extensions.


fig 6
 

And its done. In next blog we will check how to use NuGet Package Manager.

Happy Living....
Happy Coding....
Happy Concepts....