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
function Trim(x) { | |
return x.replace(/^\s+|\s+$/gm, ''); | |
} | |
function ClearFormValidation(formid) { | |
var $form = jQuery('#' + formid); | |
//reset jQuery Validate's internals | |
$form.validate().resetForm(); | |
//reset unobtrusive validation summary, if it exists |
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
function IsNullOrEmpty(str) { | |
var returnValue = false; | |
if (!str | |
|| str == null | |
|| str === 'null' | |
|| str === '' | |
|| str === '{}' | |
|| str === 'undefined' | |
|| str.length === 0) { | |
if (str.trim().length > 0) { |
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
<add key="aspnet:MaxJsonDeserializerMembers" value="2147483647" /> | |
Response.Write(new ScriptingJsonSerializationSection().MaxJsonLength); |
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
<add key="aspnet:MaxJsonDeserializerMembers" value="2147483647" /> | |
Response.Write(new ScriptingJsonSerializationSection().MaxJsonLength); |
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
function submitHandler() | |
{ | |
submitVal = $('#submitButton').val(); | |
$('#myForm').append("<input type='hidden' name='submitValue' value='"+ | |
submitVal+"' />"); | |
return true; | |
} |
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
int y = Nullable.Compare<DateTime>(DateTime.UtcNow, x); | |
if y=-1 means x is greater | |
if y=1 means x is lesser | |
if y=0 means equal |
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
[AuthoriseUser(Module = EnumModuleName.INVENTORYPIPELINE)] | |
public ActionResult GetReport(InventoryPipelineReportModel model) | |
{ | |
string branchName = UserData.BranchName; | |
_productionSnapshotReportService = new InventoryPipelineReportService(); | |
DataTable dt = _productionSnapshotReportService.GetReportData(model, branchName); | |
GenericReportDetailsViewModel genericReportDetailsViewModel = new GenericReportDetailsViewModel(); | |
genericReportDetailsViewModel.Data = dt; | |
byte[] bytes = null; | |
if (model.ExportToExcel) |
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
*.o *.lo *.la *.al .libs *.so *.so.[0-9]* *.a *.pyc *.pyo __pycache__ *.rej *~ #*# .#* .*.swp .DS_Store [Tt]humbs.db */bin */obj */Release */Debug *.suo *.err *.log *.obj *.bin *.dll *.exe *.LOG *.user *.pdb [tT]emp [tT]empPE Ankh.Load thumbs.db *.resharper *.vspscc *.vsssccc *.scc */_ReSharper* */_ReSharper.* bin obj *.resharperoptions *.db *.bak *_ReSharper* *.snk logs output TestResults *.crunchsolution.* *.crunchproject.* */vs packages |
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
select f.*, | |
count(*) over ( | |
partition by title, uk_release_date | |
) ct | |
from films f; | |
select * | |
from ( | |
select f.*, | |
count(*) over ( |
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
Pivot C# Array or DataTable: Convert a Column To a Row with LINQ | |
var data = new[] { | |
new { Product = "Product 1", Year = 2009, Sales = 1212 }, | |
new { Product = "Product 2", Year = 2009, Sales = 522 }, | |
new { Product = "Product 1", Year = 2010, Sales = 1337 }, | |
new { Product = "Product 2", Year = 2011, Sales = 711 }, | |
new { Product = "Product 2", Year = 2012, Sales = 2245 }, | |
new { Product = "Product 3", Year = 2012, Sales = 1000 } | |
}; |
OlderNewer