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
declare(strict_types=1); | |
/** | |
* Resolution to the problem: | |
* Five Dwarves ( Gimli Fili Ilif Ilmig and Mark) met at the Prancing Pony and played | |
* a word game to determine which combinations of their names resulted in a palindrome. | |
* Write a program in that prints out all of those combinations | |
* */ | |
//Class to pipe functions for better readability |
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
{ | |
"sort": [ | |
{ | |
"_script": { | |
"type": "number", | |
"script": { | |
"lang": "painless", | |
"inline": "def date = LocalDateTime.ofInstant(Instant.ofEpochMilli(doc.start_date_time.value), ZoneId.of(\"+01:00\")); return Integer.parseInt(date.format(DateTimeFormatter.ofPattern(\"yyyyMMdd\")))" | |
}, | |
"order": "asc" |
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
My mapping template is defined this way for the above field: | |
curl -X POST -H "Content-Type: application/json" -H "Cache-Control: no-cache" -H "Postman-Token: c5cae459-7bcb-55fa-ad4d-593aa5a5c289" -d '{ | |
"template" : "journeys-*", | |
"settings" : { | |
}, | |
"mappings": { | |
"journeys": { |
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
receive(){ | |
//Arrow function to not change this context | |
return new Promise((resolve, reject) => { | |
let params = { | |
QueueUrl: this.url, | |
WaitTimeSeconds: this.waitTimeSeconds, | |
MaxNumberOfMessages: this.maxNumberOfMessages, | |
MessageAttributeNames: [ | |
'reprocess' | |
] |
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
receive(){ | |
//Arrow function to not change this context | |
return new Promise((resolve, reject) => { | |
let params = { | |
QueueUrl: this.url, | |
WaitTimeSeconds: this.waitTimeSeconds, | |
MaxNumberOfMessages: this.maxNumberOfMessages, | |
MessageAttributeNames: [ | |
'reprocess' | |
] |