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
| //need angular. ljs = array de objetos | |
| function getLocation(ljs){ | |
| angular.forEach(ljs, function(value, key){ | |
| setTimeout(function(){ | |
| $.getJSON('http://maps.googleapis.com/maps/api/geocode/json?address='+value.MAPS+'&sensor=false', null, function (data) { | |
| ljs[key] = $.extend(ljs[key],data.results[0].geometry) | |
| console.log(JSON.stringify(ljs)); | |
| }); | |
| }, 1000); |
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
| param = 'KEY_PARAMETRO'; | |
| q = location.search.replace('?', '&').split('&'); | |
| i = 0; | |
| while(i < q.length){ | |
| value = (q[i].split('=')[0] == param? q[i].split('=')[1] : null); | |
| i++; | |
| } | |
| console.log(value); |
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 GetUserIP() { | |
| if (isset($_SERVER)) { if (isset($_SERVER["HTTP_X_FORWARDED_FOR"])) | |
| { $ip = $_SERVER["HTTP_X_FORWARDED_FOR"]; } | |
| elseif(isset($_SERVER["HTTP_CLIENT_IP"])) | |
| { $ip = $_SERVER["HTTP_CLIENT_IP"]; } | |
| else { $ip = $_SERVER["REMOTE_ADDR"]; } | |
| } | |
| else { if ( getenv( 'HTTP_X_FORWARDED_FOR' ) ) | |
| { $ip = getenv( 'HTTP_X_FORWARDED_FOR' ); } | |
| elseif ( getenv( 'HTTP_CLIENT_IP' ) ) |
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
| $directory = dir(getcwd()); | |
| $directory->$path; |
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
| //funciona com motor do safari e chrome | |
| function getTimestamp(brDate){ | |
| return new Date(brDate.split('/').reverse().join("-")); | |
| } |
NewerOlder