- Visual Studio Build Tools 2022
- Visual Studio Build Tools 2019
- Visual Studio Build Tools 2017
- Visual Studio Build Tools 2015
Visual Studio 2022:
| pragma solidity ^0.4.19; | |
| contract ERC20Basic { | |
| string public constant name = "ERC20Basic"; | |
| string public constant symbol = "BSC"; | |
| uint8 public constant decimals = 18; | |
| event Approval(address indexed tokenOwner, address indexed spender, uint tokens); |
| pragma solidity ^0.4.24; | |
| // ---------------------------------------------------------------------------- | |
| // Sample token contract | |
| // | |
| // Symbol : LCST | |
| // Name : LCS Token | |
| // Total supply : 100000 | |
| // Decimals : 2 | |
| // Owner Account : 0xde0B295669a9FD93d5F28D9Ec85E40f4cb697BAe |
| #### IMAGE PROTECTION #### | |
| #protect images from hotlinking | |
| RewriteEngine on | |
| RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?domainname.com [NC] | |
| RewriteRule \.(jpg|jpeg|png|gif|bmp|tiff|svg)$ - [NC,F,L] | |
| #protect images from hotlinking send new image | |
| RewriteEngine on | |
| RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?domainname.com [NC] |
| /** | |
| * This code should be added to functions.php of your theme | |
| **/ | |
| add_filter('woocommerce_default_catalog_orderby', 'custom_default_catalog_orderby'); | |
| function custom_default_catalog_orderby() { | |
| return 'date'; // Can also use title and price | |
| } | |
| add_filter('wp_get_attachment_image_attributes', 'change_attachement_image_attributes', 20, 2); | |
| function change_attachement_image_attributes( $attr, $attachment ){ | |
| // Get post parent | |
| $parent = get_post_field( 'post_parent', $attachment); | |
| // Get post type to check if it's product | |
| $type = get_post_field( 'post_type', $parent); | |
| if( $type != 'product' ){ | |
| return $attr; |
| CREATE TABLE IF NOT EXISTS `country` ( | |
| `id` int(11) NOT NULL AUTO_INCREMENT, | |
| `iso` char(2) NOT NULL, | |
| `name` varchar(80) NOT NULL, | |
| `nicename` varchar(80) NOT NULL, | |
| `iso3` char(3) DEFAULT NULL, | |
| `numcode` smallint(6) DEFAULT NULL, | |
| `phonecode` int(5) NOT NULL, | |
| PRIMARY KEY (`id`) | |
| ) ENGINE=MyISAM DEFAULT CHARSET=latin1; |
| <?php | |
| function custom_wcaf_fee_amount_subtotal( $subtotal ) { | |
| $subtotal = 0; | |
| $category_id = '61'; // Your category ID here. | |
| $cart_items = WC()->cart->get_cart(); | |
| foreach ( $cart_items as $key => $item ) { |
| jQuery(function() { |