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
| @echo off | |
| TITLE MySQL Backup Executor | |
| :: Change the values that match your environment | |
| SET backup_dir=D:\mysql_daily_backups\ | |
| SET mysqldb=zxy_mis | |
| SET mysqlpassword=123456 | |
| SET mysqluser=root | |
| SET mysqlpath=mysqldump |
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 url_slug($string = null, $separator = "-") { | |
| if (is_null($string)) { | |
| return ""; | |
| } | |
| // Remove spaces from the beginning and from the end of the string | |
| $string = trim($string); |
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 wordwrap( str, width, brk, cut ) { | |
| brk = brk || '\n'; | |
| width = width || 75; | |
| cut = cut || false; | |
| if (!str) { return str; } | |
| var regex = '.{1,' +width+ '}(\\s|$)' + (cut ? '|.{' +width+ '}|.+$' : '|\\S+?(\\s|$)'); | |
| return str.match( new RegExp(regex, 'g') ).join( brk ); |
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
| $("body").delegate('input[data-group]','click',function () { | |
| var name = $(this).data('group'); | |
| $(this).closest('.group_checkbox').find('input[name=' + name +']').attr('checked', this.checked); | |
| }); | |
| $("body").delegate('input[type=checkbox]:not([data-group])','change',function () { | |
| var name = $(this).attr("name"); | |
| var groupEl=$(this).closest('.group_checkbox'); |
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
| EasyPOSPrinter.setJustification(1); | |
| EasyPOSPrinter.selectPrintMode(32); | |
| EasyPOSPrinter.text("Umar Biz LTD.\n"); | |
| EasyPOSPrinter.selectPrintMode(); | |
| EasyPOSPrinter.setJustification(1); | |
| EasyPOSPrinter.text("Dhaka\n"); | |
| EasyPOSPrinter.text("017XXXXXXXX\n"); | |
| EasyPOSPrinter.feed(); |
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
| chrome --kiosk --new-window --incognito --kiosk-printing --user-data-dir=c:\temp http://192.168.1.24:8080/ |
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 | |
| class CombinationGenerator implements \Iterator | |
| { | |
| private $array; | |
| private $length; | |
| private $itemCount; | |
| private $pos = -1; | |
| private $binArray = array(); | |
| private $cache = array(); |
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 | |
| class KillingRoom { | |
| private $peoples; | |
| private $survivor; | |
| public function __construct($people) | |
| { | |
| $this->newGame($people); | |
| } |
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
| # Keep in mind that when asking for a `return` after another, only the first one will be output. | |
| # This example is meant as a simple starting point, to show how to get the information in the simplest available way. | |
| # Google Chrome | |
| tell application "Google Chrome" to return URL of active tab of front window | |
| tell application "Google Chrome" to return title of active tab of front window | |
| # Google Chrome Canary | |
| tell application "Google Chrome Canary" to return URL of active tab of front window | |
| tell application "Google Chrome Canary" to return title of active tab of front window | |
| # Chromium |