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
<CodeSnippets | |
xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet"> | |
<CodeSnippet Format="1.0.0"> | |
<Header> | |
<Title> | |
Add Elmah try catch | |
</Title> | |
</Header> | |
<Snippet> | |
<Code Language="CSharp"> |
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 path = require('path'); | |
var fs = require('fs'); | |
var walkSync = function (dir) { | |
var idStringRex = /ID="+[\w]+"/; | |
var idRex = /[^ID="]+[^"]/; | |
var files = fs.readdirSync(dir); | |
files.forEach(function (file) { | |
if (fs.statSync(dir + file).isDirectory()) { | |
walkSync(dir + file + '/'); |
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 array = [5, 2, 4, 6, 1, 3]; | |
for (j = 0; j <= array.length; j++) | |
{ | |
var key = array[j]; | |
var i = j - 1; | |
while (i >= 0 && array[i] > key) | |
{ | |
array[i + 1] = array[i]; | |
i = i - 1; | |
array[i + 1] = key; |
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
hj |
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 FetchFilePermission(FileColl, callback) { | |
$.each(FileColl, function (key, value) { | |
var requestHeaders = { "accept": "application/json;odata=verbose" }; | |
$.ajax({ | |
url: value.MetadataURI + "/RoleAssignments/GetByPrincipalId(" + CurrentUserID + ")/RoleDefinitionBindings", | |
contentType: "application/json;odata=verbose", | |
headers: requestHeaders, | |
async: false, | |
success: function (data) { | |
var FullControlTest = $.grep(data.d.results, function (element, index) { if (element.Id == 1073741829) { return element; } }); |
NewerOlder