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
| SELECT | |
| TABLE_NAME AS `Table Name`, | |
| TABLE_ROWS AS `Rows`, | |
| CONCAT( | |
| (FORMAT((DATA_LENGTH + INDEX_LENGTH) / POWER(1024,2),2)) | |
| , ' Mb') | |
| AS `Size`, | |
| TABLE_COLLATION AS `Collation` | |
| FROM information_schema.TABLES | |
| WHERE TABLE_SCHEMA = 'your_db' |
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 | |
| /** | |
| * Add the field to the checkout | |
| **/ | |
| add_action('woocommerce_after_order_notes', 'my_custom_checkout_field'); | |
| function my_custom_checkout_field( $checkout ) { | |
| echo '<div id="my_custom_checkout_field"><h3>'.__('My Field').'</h3>'; |
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
| LOAD DATA LOCAL INFILE 'G:/Floyd/small/small.csv' INTO TABLE `csv_data` | |
| FIELDS TERMINATED BY ',' | |
| OPTIONALLY ENCLOSED BY '"' | |
| LINES TERMINATED BY '\r' | |
| IGNORE 1 LINES; |
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 | |
| $actual_headers = array(); | |
| foreach ($data['fields'] as $field) | |
| { | |
| $actual_headers [] = $data['actual_headers'][$field]; | |
| } | |
| $path = realpath(BASEPATH."../assets/fmt/xls/"); | |
| $fname = $title."-".time().".csv"; |
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 | |
| $sql_query = array(); | |
| foreach ($select_columns as $column) | |
| { | |
| $sql_query [] = "( SELECT group_concat( DISTINCT $column ) FROM $master_grid_section_table WHERE 1 {$_search_filter_query} {$created_by} {$denied_data_entries} ) as $column"; | |
| } | |
| if( $result = $this->db->query("SELECT ". join(', ', $sql_query ))) | |
| { |
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 type="text/javascript"> | |
| var BASE_URL = '<?php echo base_url(); ?>'; | |
| var BASE_ICONS = BASE_URL+'assets/icons/'; | |
| var grid_state_id = 'grid_<?php echo $section_id;?>'; | |
| var grid_panel_id = 'tab-grid-<?php echo $section_id;?>'; | |
| Ext.Loader.setConfig({enabled: true}); | |
| Ext.Loader.setPath('Ext.ux', BASE_URL+'assets/js/ext/ux/'); |
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
| What Comes | |
| ------------------------------------------------- | |
| id | type | pet_name | |
| 1 | aardvark | NULL | |
| 2 | dog | Charlie | |
| 3 | dog | Rover | |
| 4 | cat | Tabby | |
| 5 | cat | Sandy | |
| 6 | cat | MeowMeow |
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
| //default filter params | |
| var filters = { | |
| ftype: 'filters', | |
| autoReload: false, | |
| local : false, | |
| encode: false, // json encode the filter query | |
| }; | |
| // docked elements |
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
| stackoverflow.com/questions/19699257/uncaught-syntaxerror-unexpected-token-in-google-chrome | |
| You are using a default parameter feature which is supported only by Firefox now. | |
| function errorNotification(text) { | |
| text = text || "Something went wrong!"; | |
| $.pnotify({ | |
| title: 'Error', | |
| text: text, | |
| type: 'error' |
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 validateEmail(email){ | |
| var re = /^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/; | |
| if(re.test(email)){ | |
| return true; | |
| }else{ | |
| return false; | |
| } | |
| }; |