This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var tempTable = $('#tbl').clone(true); | |
var tableBody = $(tempTable).children(); | |
$(tableBody).children().each(function(index , item){ | |
var currentRow = item; | |
$(currentRow).children().each(function(index1, item1){ | |
if($(item1).attr("rowspan")) | |
{ | |
// copy the cell | |
var item2 = $(item1).clone(true); | |
// Remove rowspan |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class ReferenceFinder | |
{ | |
public void Find(string methodName) | |
{ | |
string solutionPath = @"C:\Users\achoudhary\Documents\Visual Studio 2013\Projects\ConsoleForEverything\ConsoleForEverything.sln"; | |
var msWorkspace = MSBuildWorkspace.Create(); | |
List<ReferencedSymbol> referencesToMethod = new List<ReferencedSymbol>(); | |
Console.WriteLine("Searching for method \"{0}\" reference in solution {1} ", methodName, Path.GetFileName(solutionPath)); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
///<summary> | |
/// Usage - | |
/// if (QueryHelper.PropertyExists<Club>(orderBy)) | |
/// { | |
/// query = query.OrderByProperty(orderBy); | |
/// - OR - | |
/// query = query.OrderByPropertyDescending(orderBy); | |
/// } | |
///</summary> | |
public static class QueryHelper |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Copyright (C) Microsoft Corporation. All rights reserved. | |
using System; | |
using System.Collections.Generic; | |
using System.Text; | |
using System.Linq; | |
using System.Linq.Expressions; | |
using System.Reflection; | |
using System.Reflection.Emit; | |
using System.Threading; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.ComponentModel; | |
using System.Diagnostics; | |
using System.IO; | |
using System.Runtime.InteropServices; | |
using System.Security; | |
namespace Shared.ApplicationLoaderUtil | |
{ | |
/// <summary> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Diagnostics; | |
using System.IO; | |
using System.Runtime.Serialization.Json; | |
using System.ServiceModel; | |
using System.ServiceModel.Channels; | |
using System.ServiceModel.Description; | |
using System.ServiceModel.Dispatcher; | |
using System.Text; | |
using System.Threading; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Configuration; | |
using System.IO; | |
using System.Linq; | |
using System.Net; | |
using System.Net.Http; | |
using System.Net.Http.Headers; | |
using System.Reflection; | |
using System.Web; | |
using System.Web.Http; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public async Task<long> UpdateBulk<T>(IMongoCollection<T> _collection, IEnumerable<T> items, FilterDefinition<T> filter, params string[] propertiesToSkip) | |
{ | |
if (!items.Any()) | |
{ | |
return 0; | |
} | |
var updates = new List<WriteModel<T>>(); | |
var filterBuilder = Builders<T>.Filter; | |
var updater = Builders<T>.Update; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static void FindLongStrings(object testObject) | |
{ | |
foreach (FieldInfo propInfo in testObject.GetType().GetFields()) | |
{ | |
foreach (ColumnAttribute attribute in propInfo.GetCustomAttributes(typeof(ColumnAttribute), true)) | |
{ | |
if (attribute.DbType.ToLower().Contains("varchar")) | |
{ | |
string dbType = attribute.DbType.ToLower(); | |
int numberStartIndex = dbType.IndexOf("varchar(") + 8; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Escape special characters in a string to use in batch file | |
var arg = "^hU$xgjX4ku*Hc0p%#F^UH"; | |
arg.replace(/([\(\)%!\^<>|;, ])/g,'^$1').replace(/&/g, '&&'); | |
console.log(arg); |
NewerOlder