sudo apt-get install openjdk-7-jre-headless -y
wget -qO - http://packages.elasticsearch.org/GPG-KEY-elasticsearch | sudo apt-key add -
| /** | |
| * | |
| * Input any number in Bengali and the following function will return the English number. | |
| * | |
| */ | |
| function bn2enNumber ($number){ | |
| $search_array= array("১", "২", "৩", "৪", "৫", "৬", "৭", "৮", "৯", "০"); | |
| $replace_array= array("1", "2", "3", "4", "5", "6", "7", "8", "9", "0"); | |
| $en_number = str_replace($search_array, $replace_array, $number); |
| public static function convertUTF8($string) | |
| { | |
| //$sampleString = 'u0986u09a8u09c7u09beu09dfu09beu09b0 u09b9u09c7u09beu09b8u09beu0987u09a8'; | |
| $string = preg_replace('/u([0-9a-fA-F]+)/', '&#x$1;', $string); | |
| return html_entity_decode($string, ENT_COMPAT, 'UTF-8'); | |
| } |
| function toBangla (str) | |
| { | |
| //check if the `str` is not string | |
| if(!isNaN(str)){ | |
| //if not string make it string forcefully | |
| str = String(str); | |
| } | |
| //start try catch block | |
| try { |
| ### Install Oracle Java 8, this means you agree to their binary license!! | |
| cd ~ | |
| sudo add-apt-repository -y ppa:webupd8team/java | |
| sudo apt-get update | |
| echo debconf shared/accepted-oracle-license-v1-1 select true | sudo debconf-set-selections | |
| echo debconf shared/accepted-oracle-license-v1-1 seen true | sudo debconf-set-selections | |
| sudo aptitude -y install oracle-java8-installer | |
| ### Download and Install ElasticSearch |
| #!/bin/bash | |
| ### USAGE | |
| ### | |
| ### ./ElasticSearch.sh 1.7 will install Elasticsearch 1.7 | |
| ### ./ElasticSearch.sh will fail because no version was specified (exit code 1) | |
| ### | |
| ### CLI options Contributed by @janpieper | |
| ### Check http://www.elasticsearch.org/download/ for latest version of ElasticSearch |
| <div id="google_translate_element"></div><script type="text/javascript"> | |
| function googleTranslateElementInit() { | |
| new google.translate.TranslateElement({pageLanguage: 'en', includedLanguages: 'ar,en', layout: google.translate.TranslateElement.InlineLayout.SIMPLE, multilanguagePage: true}, 'google_translate_element'); | |
| } | |
| </script><script type="text/javascript" src="//translate.google.com/translate_a/element.js?cb=googleTranslateElementInit"></script> |
| <?php | |
| $image_file=$_GET['filename']; | |
| echo $image_file; | |
| header("Content-type; application/octect-stream"); | |
| header("Content-disposition: attachment; filename=$image_file"); | |
| readfile("images/$image_file"); | |
| ?> |