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
# Only listen on http; disable ajp and https | |
web: java -jar jenkins.war --httpPort=$PORT --ajp13Port=-1 --httpsPort=-1 |
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
/* | |
* CHALLANGE: | |
* Cache `index.html` file using service worker. | |
* | |
* This bit of code is included in <script> tag of index.html | |
* if (navigator.serviceWorker) { | |
* navigator.serviceWorker.register('serviceworker.js', {scope: '/'}) | |
* } | |
* | |
*/ |
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
// Approach 1 | |
function getMapping(){ | |
const tagMap = {}; | |
this.selectedTags.forEach(( tag, index ) => { | |
if ( tag !== undefined ) { | |
tagMap[ tag ] = this.headers[ index ]; | |
} | |
} ) | |
return tagMap; | |
} |
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
getCounterLimit(limit=10){ | |
return limit | |
} | |
validateLimit(getCounterLimit()); | |
// want to overwrite the value for special case | |
validateLimit(getCounterLimit(15)); |
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
validateLimit(10); | |
. | |
. | |
. | |
validateLimit(10); | |
. | |
. | |
. | |
validateLimit(10); |
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; | |
} |
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
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
/* | |
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(); |
NewerOlder