How to merge two arrays in javascript and keep unique values
How to merge two arrays in javascript and have unique values
Transitions on the CSS display property without javascript
In order to achieve the fade effect instead of callbacks
CSS style based on the number of children or siblings
One of the major problems that I have come up to in my coding career is on how to style children according to the number of it’s siblings. The solution comes
PHP Output Buffering in WordPress
When you need to display an html file as a returned string
Apache: How to Redirect All Root Domain Traffic to Subdomain
Problem: Traffic comes to http://krevatas.net/{something} but they really need to go to http://kostas.krevatas.net/{something}. Solution: 301 Redirect via Apache with mod_rewrite. Simple easy addition to your httpd.conf or .htaccess, I placed mine right above my wordpress mod_rewrite rules. If you are using .htaccess just dump it in that file above the wordpress redirect, if you having…
Password validation with auto checking rules
The following example will display a password field that usess some custom specifications to validate.
Get substring between two strings PHP
Right below lies a function that returns the string between two other strings. That’s it.
|
1 2 3 4 5 6 7 8 9 10 11 12 |
function get_string_between($string, $start, $end){ $string = ' ' . $string; $ini = strpos($string, $start); if ($ini == 0) return ''; $ini += strlen($start); $len = strpos($string, $end, $ini) - $ini; return substr($string, $ini, $len); } // USAGE $fullstring = 'this is my [tag]dog[/tag]'; $parsed = get_string_between($fullstring, '[tag]', '[/tag]'); |
Source : http://stackoverflow.com/questions/5696412/get-substring-between-two-strings-php
Sorting options of a select control alphabetically using jQuery
This is the jQuery code on how to sort a the options of a select control alphabetically
TAR command to preserve file permissions
When in linux use the TAR command to preserve file permissions
