This file has been truncated, but you can view the full file.
This file contains hidden or 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
| <?php | |
| function mdfisheryates(&$arr) | |
| { | |
| $x = []; | |
| $hasil = []; | |
| $j=0; | |
| for($i = count($arr)-1; $i > 0; --$i) { | |
| $r = rand(0, $i); |
This file contains hidden or 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 downloaddoc() { | |
| var header = "<html xmlns:o='urn:schemas-microsoft-com:office:office' "+ | |
| "xmlns:w='urn:schemas-microsoft-com:office:word' "+ | |
| "xmlns='http://www.w3.org/TR/REC-html40'>"+ | |
| "<head><meta charset='utf-8'><title></title></head><body>"; | |
| var footer = "</body></html>"; | |
| var sourceHTML = header+document.getElementById("printarea").innerHTML+footer; | |
| var source = 'data:application/vnd.ms-word;charset=utf-8,' + encodeURIComponent(sourceHTML); | |
| var fileDownload = document.createElement("a"); |
This file contains hidden or 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
| <script> | |
| function exportexcel() { | |
| var htmls = ""; | |
| var uri = 'data:application/vnd.ms-excel;base64,'; | |
| var template = '<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:x="urn:schemas-microsoft-com:office:excel" xmlns="http://www.w3.org/TR/REC-html40"><head><!--[if gte mso 9]><xml><x:ExcelWorkbook><x:ExcelWorksheets><x:ExcelWorksheet><x:Name>{worksheet}</x:Name><x:WorksheetOptions><x:DisplayGridlines/></x:WorksheetOptions></x:ExcelWorksheet></x:ExcelWorksheets></x:ExcelWorkbook></xml><![endif]--></head><body><table>{table}</table></body></html>'; | |
| var base64 = function(s) { | |
| return window.btoa(unescape(encodeURIComponent(s))) | |
| }; | |
| var format = function(s, c) { |
This file contains hidden or 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
| #!/usr/bin/env bash | |
| # https://developers.supportbee.com/blog/setting-up-cucumber-to-run-with-Chrome-on-Linux/ | |
| # https://gist.github.com/curtismcmullan/7be1a8c1c841a9d8db2c | |
| # http://stackoverflow.com/questions/10792403/how-do-i-get-chrome-working-with-selenium-using-php-webdriver | |
| # http://stackoverflow.com/questions/26133486/how-to-specify-binary-path-for-remote-chromedriver-in-codeception | |
| # http://stackoverflow.com/questions/40262682/how-to-run-selenium-3-x-with-chrome-driver-through-terminal | |
| # http://askubuntu.com/questions/760085/how-do-you-install-google-chrome-on-ubuntu-16-04 | |
| # Versions | |
| CHROME_DRIVER_VERSION=`curl -sS chromedriver.storage.googleapis.com/LATEST_RELEASE` |
This file contains hidden or 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
| <?php | |
| $a = "-"; | |
| $b = "-"; | |
| $e = "-"; | |
| $a = (is_null(getbalance($a))) ? 0 : getbalance($a); | |
| $b = (is_null(getbalance($b))) ? 0 : getbalance($b); | |
| $e = (is_null(getbalance($e))) ? 0 : getbalance($e); | |
| echo "{$a} - {$b} = {$e} | "; | |
| if($e == (intVal($a) - intVal($b)) && (intVal($a) != 0 && intVal($b) != 0 && intVal($e) != 0)){ | |
| echo "OK"; |
This file contains hidden or 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
| <?php | |
| function sendFCM($title, $message, $firebasedevicetoken) | |
| { | |
| $curl = curl_init(); | |
| $notification = [ | |
| 'title' => $title, | |
| 'body' => $message, | |
| 'image' => $image, | |
| ]; |
This file contains hidden or 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
| ffle($data, $count) | |
| { | |
| $retVal = array(); | |
| $ind = array(); | |
| $index = 0; | |
| for ($i = 0; $i < $count; ++$i) | |
| $ind[$i] = 0; | |
| for ($i = 0; $i < $count; ++$i) |
This file contains hidden or 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
| <?php | |
| /** | |
| * It's an algorithm for generating a random permutation of a finit sequence - in plain terms, the algorithm shuffles the sequence. | |
| * | |
| * Reference: https://en.wikipedia.org/wiki/Fisher%E2%80%93Yates_shuffle | |
| */ | |
| function MyShuffle(&$arr) { |
This file contains hidden or 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
| Install python 3 | |
| create a virtualenv and then | |
| pip install selenium | |
| then install chrome driver: | |
| brew install chromedriver | |
| to test, run this script - notice the location of the chrome driver |
This file contains hidden or 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
| Steps To Remove index.php using .htaccess:- | |
| Step:-1 Open the file config.php located in application/config path. Find and Replace the below code in config.php file. | |
| // Find the below code | |
| $config['index_page'] = "index.php" | |
| // Remove index.php |
NewerOlder