-
Open Ampps Application -> MySQL Tab -> Configuration.
-
In [mysqld] section, add the following line:
innodb_force_recovery = 1 -
Save the file and try starting MySQL
-
Remove that line which you just added and Save.
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 | |
| /** | |
| * Contact form 7 | |
| * custom tag: [posts show:12] | |
| * show parameter is optional | |
| */ | |
| add_action('wpcf7_init', 'custom_add_form_tag_posts'); | |
| function custom_add_form_tag_posts() | |
| { |
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 | |
| // Ensure cart contents update when products are added to the cart via AJAX (place the following in functions.php) | |
| add_filter( 'woocommerce_add_to_cart_fragments', 'woocommerce_header_add_to_cart_fragment' ); | |
| function woocommerce_header_add_to_cart_fragment( $fragments ) { | |
| ob_start(); | |
| ?> | |
| <a class="cart-contents" href="<?php echo wc_get_cart_url(); ?>" title="<?php _e( 'View your shopping cart' ); ?>"><?php echo sprintf (_n( '%d item', '%d items', WC()->cart->get_cart_contents_count() ), WC()->cart->get_cart_contents_count() ); ?> - <?php echo WC()->cart->get_cart_total(); ?></a> | |
| <?php |
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 | |
| //save theme active time | |
| function my_theme_activation_init() { | |
| // Check if already saved the activation date & time | |
| // to prevent over-writing if user deactive & active theme | |
| // multiple time | |
| if(!get_option('mytheme_activation_time', false)){ |
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 | |
| $loop = new WP_Query( array( | |
| 'post_type' => 'Property', | |
| 'posts_per_page' => -1 | |
| ) | |
| ); | |
| ?> | |
| <?php while ( $loop->have_posts() ) : $loop->the_post(); ?> |
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
| # http to https | |
| RewriteEngine On | |
| RewriteCond %{HTTPS} !=on | |
| RewriteRule ^/?(.*) https://%{SERVER_NAME}/$1 [R,L] | |
| RewriteCond %{HTTPS} off | |
| RewriteRule (.*)https://%{HTTP_HOST}%{REQUEST_URI} | |
| RewriteCond %{HTTPS} off | |
| RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301] |
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,}))$/; | |
| return re.test(String(email).toLowerCase()); | |
| } |
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
| <!doctype html> | |
| <html lang=en> | |
| <head> | |
| <title>full screen video</title> | |
| <style> | |
| html, body { | |
| width: 100%; | |
| height: 100%; | |
| padding: 0; |
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 changeDigitsEtoB( $digits ) { | |
| $bangla = numfmt_format(numfmt_create( 'bn_BD', NumberFormatter::TYPE_DEFAULT ),$digits); //Bangla locale | |
| return $bangla; | |
| } | |
| echo changeDigitsEtoB(1234); //output ১২৩৪ |
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
| white-space: pre-wrap; /* css-3 */ | |
| white-space: -moz-pre-wrap; /* Mozilla, since 1999 */ | |
| white-space: -pre-wrap; /* Opera 4-6 */ | |
| white-space: -o-pre-wrap; /* Opera 7 */ | |
| word-wrap: break-word; /* IE 5.5+ */ |
NewerOlder