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
/** | |
* | |
* @param str | |
* @returns | |
*/ | |
function reversePolish(str) { | |
str = str.split(" "), result = []; | |
if (str === "" || str === null) return; | |
let haystack = str.map((i) => { |
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
After installing SolR, you need to add your collection in solr by running : sudo su - solr -c "/opt/solr/bin/solr create -c mysolrcollection -n data_driven_schema_configs" | |
Your Solr collection link should look like: | |
-> http://your_domain_or_ip:8983/solr/mysolrcollection | |
Your SolR AWS Security Group should allow ip from your Drupal domain, then try to reconnect Drupal and SolR. | |
Cheers!!! |
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
//Write JavaScript code to find a ten letter string of characters that contains only letters | |
//I've been tested with this and here is the solution for those it may interest | |
/* | |
Here is the given pseudo code that I changed to retrieve my company's name | |
It's in 10 words. | |
I call it a Hasher | |
*/ | |
function hasher(hashedValue) |
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
/** | |
* Format an interval to show all existing components. Human Readable Time | |
* If the interval doesn't have a time component (years, months, etc) | |
* That component won't be displayed. | |
* | |
* @param DateInterval $interval The interval | |
* | |
* @return string Formatted interval string. | |
*/ | |
function format_interval(DateInterval $interval) { |