How to merge two arrays in javascript and keep unique values
How to merge two arrays in javascript and have unique values
How to merge two arrays in javascript and have unique values
In order to achieve the fade effect instead of callbacks
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
When you need to display an html file as a returned string
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…
The following example will display a password field that usess some custom specifications to validate.
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
This is the jQuery code on how to sort a the options of a select control alphabetically
When in linux use the TAR command to preserve file permissions