Thursday, 3 September 2015

Useful links while working with BOOTSTRAP

How to change specific column of a table using CSS/Jquery

Using CSS:

table tr td:first-child + td + td {...} /* third column */
table tr td:first-child + td + td + td {...} /* fourth column */
table tr td:first-child + td + td + td +td {...} /* fifth column */

Using Jquery:

$(function() {
$('td:first-child').addClass("firstChild");
$(".table-class tr").each(function() {
$(this).find('td:eq(1)').addClass("secondChild");
$(this).find('td:eq(2)').addClass("thirdChild");
});
});

Friday, 24 April 2015

List out all table procedures or specified table/column in sqlserver

List out all procedures which are used specific table


SELECT DISTINCT so.name FROM syscomments sc INNER JOIN sysobjects so on sc.id=so.id WHERE sc.text LIKE '%tablename%'


Get List of programs that used(mentioned) particular  column in side the query.

  •  This script search stored procedures, views, functions as well other objects.


           SELECT OBJECT_NAME(OBJECT_ID), definition FROM sys.sql_modules WHERE              definition LIKE '%' + 'EMAIL' + '%'

  • This script search only stored procedure for specified column.

            SELECT DISTINCT OBJECT_NAME(OBJECT_ID), object_definition(OBJECT_ID)
            FROM sys.Procedures WHERE object_definition(OBJECT_ID) LIKE '%' + 'EMAIL' + '%'

Monday, 30 March 2015

Getting json response as object

 [WebMethod]
    [ScriptMethod(ResponseFormat = ResponseFormat.Json)]
    public static IEnumerable<SearchInfluencers.InfCategories> GetICategories()
    {
        return DAFindInflueners.GetInfluencersCountByCategory().OrderBy(i => i.ICATEGORYNAME).ToList();
    }


//---In js file
 success: function (Catlist) {
            $.each(Catlist.d, function (index, Cat) {
                alert(Cat.ICATEGORYID + Cat.ICATEGORYNAME + Cat.ICATINFCOUNT')
            });  

Sunday, 29 March 2015

Create and consume wcf service..

http://www.webcodeexpert.com/2013/04/how-to-create-and-consume-wcf-services.html

Wednesday, 18 February 2015

Selecting multiple rows as single row in sql server

SELECT STUFF((SELECT DISTINCT ','+CONVERT(VARCHAR(10), MO_CC_ID) from NEWMAKE_OFFER WHERE MO_FU_ID=546 for XML path('')),1,1,'')

Extracting Nupkg files using command line

Rename it to zip first then extract files as below 1.     Rename-Item -Path A_Package.nupkg -NewName A_Package.zip 2.     Make sure to repla...