[abc] A single character: a, b or c
[^abc] Any single character but a, b, or c
[a-z] Any single character in the range a-z
[a-zA-Z] Any single character in the range a-z or A-Z
^ Start of line
$ End of line
\A Start of string
\z End of string
. Any single character
\s Any whitespace character
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 | |
| /* | |
| * In configuration file | |
| * ... | |
| * 'as AccessBehavior' => [ | |
| * 'class' => 'app\components\AccessBehavior', | |
| * 'allowedRoutes' => [ | |
| * '/', | |
| * ['/user/registration/register'], |
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
| \*-----view----*/ | |
| use yii\bootstrap\modal; | |
| \*-----id'=>'modalButton' untuk mengambil id dari js/main.js yang sudah di definisikan di asset----*/ | |
| <?= Html::button('Create Kodepos', ['value'=>url::to('index.php?r=kodepos/create'),'class' => 'btn btn-success','id'=>'modalButton']) ?> | |
| \*----untuk membuat header kodepos di atas form popup dengan ukuran <h4></h4>-----*/ | |
| <?php | |
| Modal::begin([ | |
| 'header'=>'<h4>KodePos</h4>', |
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
| public function inportResult() { | |
| /* echo '<pre>'; | |
| print_r($_FILES); | |
| exit; */ | |
| $config['upload_path'] = 'upload'; | |
| $config['allowed_types'] = 'text/plain|text/anytext|csv|text/x-comma-separated-values|text/comma-separated-values|application/octet-stream|application/vnd.ms-excel|application/x-csv|text/x-csv|text/csv|application/csv|application/excel|application/vnd.msexcel'; | |
| $this->load->library('upload', $config); |
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
| //Found on: https://stackoverflow.com/questions/15725814/upload-an-image-from-camera-or-gallery-in-webview | |
| private ValueCallback<Uri> mUploadMessage; | |
| private Uri mCapturedImageURI = null; | |
| private ValueCallback<Uri[]> mFilePathCallback; | |
| private String mCameraPhotoPath; | |
| private static final int INPUT_FILE_REQUEST_CODE = 1; | |
| private static final int FILECHOOSER_RESULTCODE = 1; | |
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
| { | |
| // The plugin looks for a .jsbeautifyrc file in the same directory as the | |
| // source file you're prettifying (or any directory above if it doesn't exist, | |
| // or in your home folder if everything else fails) and uses those options | |
| // along the default ones. | |
| // Details: https://github.com/victorporof/Sublime-HTMLPrettify#using-your-own-jsbeautifyrc-options | |
| // Documentation: https://github.com/einars/js-beautify/ | |
| "html": { | |
| "allowed_file_extensions": ["htm", "html", "xhtml", "shtml", "xml", "svg", "dust"], |
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 | |
| /** | |
| * Convert date/time format between `date()` and `strftime()` | |
| * | |
| * Timezone conversion is done for Unix. Windows users must exchange %z and %Z. | |
| * | |
| * Unsupported date formats : S, n, t, L, B, G, u, e, I, P, Z, c, r | |
| * Unsupported strftime formats : %U, %W, %C, %g, %r, %R, %T, %X, %c, %D, %F, %x | |
| * |
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 | |
| // Run from the command line, so we'll grab arguments from there | |
| // input arguments: 0=>script, 1=>file_name, 2=>temp_file | |
| $file_name = $argv[1]; | |
| $temp_file = $argv[2]; | |
| $uploads = '/opt/lampp/htdocs/user_uploads/'; | |
| // Set up file location strings |
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
| package | |
| { | |
| /** | |
| * ActionScript 3.0 Code Snippet | |
| * Convert Number to Rupiah & vice versa | |
| * https://gist.github.com/845309 | |
| * | |
| * Copyright 2011-2012, Faisalman | |
| * Licensed under The MIT License | |
| * http://www.opensource.org/licenses/mit-license |
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
| /** | |
| * A Javascript module to loadeding/refreshing options of a select2 list box using ajax based on selection of another select2 list box. | |
| * | |
| * @url : https://gist.github.com/ajaxray/187e7c9a00666a7ffff52a8a69b8bf31 | |
| * @auther : Anis Uddin Ahmad <anis.programmer@gmail.com> | |
| * | |
| * Live demo - https://codepen.io/ajaxray/full/oBPbQe/ | |
| * w: http://ajaxray.com | t: @ajaxray | |
| */ | |
| var Select2Cascade = ( function(window, $) { |