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; } }); |
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
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
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
<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
/* | |
http://pastebin.com/0dV84hBa | |
g++ -o test_font_features test_font_features-2.cpp -ltesseract | |
*/ | |
#include <tesseract/baseapi.h> | |
#include <leptonica/allheaders.h> | |
int main() { | |
tesseract::TessBaseAPI *api = new tesseract::TessBaseAPI(); |
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
import { Component, ViewChild, EventEmitter, Output} from '@angular/core'; | |
@Component({ | |
selector: 'ck-editor', | |
template: '<textarea class="editor" #editor></textarea>' | |
}) | |
export class CKEditorComponent { | |
@Output() change = new EventEmitter(); | |
@ViewChild('editor') editor; | |
editorInstance: any = {}; |
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
let counterLimit; | |
function setCounterLimit(){ | |
counterLimit=10; | |
} | |
function validateLimit(){ | |
if(currentValue>counterLimit){ | |
return false; | |
} | |
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
let counterLimit; | |
function setCounterLimit(){ | |
counterLimit=10; | |
} | |
function validateLimit(){ | |
if(currentValue>counterLimit){ | |
return false; | |
} | |
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
function validateLimit(limit){ | |
if(currentValue>limit){ | |
return false; | |
} | |
return true; | |
} |
OlderNewer