This file contains 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
1. Open cmd | |
2. Go to the directory for which you need the listings | |
3. Run tree /a /f > output.txt | |
A file will be created in the directory with the name output.txt |
This file contains 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 | |
/* To add custom field in order review table in checkout page, you will have to use some of the hooks listed below. | |
do_action( 'woocommerce_review_order_before_cart_contents' ); | |
do_action( 'woocommerce_review_order_after_cart_contents' ); | |
do_action( 'woocommerce_review_order_before_shipping' ); | |
do_action( 'woocommerce_review_order_after_shipping' ); | |
do_action( 'woocommerce_review_order_before_order_total' ); | |
do_action( 'woocommerce_review_order_after_order_total' ); |
This file contains 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 | |
$cleaned = preg_replace('/'. preg_quote($remove, '/') . '$/', '', $cleaned); | |
//$remove -> The string to be removed which is input by the user | |
// Or you can use a regular expression as shown below | |
$cleaned = preg_replace('/\[\]$/', '', $cleaned); // => Removes square brackets at the end of the string. |
This file contains 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
CSS rules have weight, and you should leverage those rules to correctly cascade styles. | |
element = 1 pt | |
class = 10 pt | |
id = 100 pt | |
inline = 1000 pt | |
An ID has a relatively high specificity of 100. A class has a specificity of 10. | |
#idname.classname - Now this selector has a specificity of 110. |
This file contains 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
If you see the command screen get stuck for minutes after running "npm install" then check if package-lock.json is still in the folder. | |
Remove the package-lock.json file before running "npm install". | |
If issue still persists, please follow the guide below. | |
http://www.jonahnisenson.com/running-npm-install-hangs-and-hangs-and-hangs/ |
This file contains 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> | |
if(event.target.tagName.toLowerCase() === 'div'){ | |
} | |
</script> |
This file contains 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
If wrapper has flex applied and children is in the following structure | |
col1 col2 col3 | |
And you want to break col3 to a new line, then apply flex-wrap:wrap to the wrapper and flex-basis:100% to the child who | |
should igonre the parent flex style (Here col3). | |
If still the childs are arranged as rows, then add width to other childs except which should ignore the flex style ( Here Col1 and Col 2) |
This file contains 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
//Choose first two and last two childs | |
p:nth-child(-n + 2) { | |
color: orange; | |
} | |
p:nth-last-child(-n + 2) { | |
color: orange; | |
} |
This file contains 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 json_encode(){ | |
var content = []; | |
content.field1 = { width: "100px", height: "400px", label : "Width"}; | |
content.field2 = { width: "200px", height: "500px", label : "Height"}; | |
console.log(JSON.stringify(content)); | |
} | |
// The above function return [] because the key used here is a string. | |
//The array key should be integer for JSON.stringify to return proper value |
NewerOlder