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
<script type="text/javascript" src="https://maps.googleapis.com/maps/api/js?key=123&sensor=false&language=el"></script> | |
<script> | |
var directionsDisplay; | |
var directionsService = new google.maps.DirectionsService(); | |
function initialize() { | |
directionsDisplay = new google.maps.DirectionsRenderer(); | |
var mapOptions = { | |
zoom: 9, | |
mapTypeId: google.maps.MapTypeId.ROADMAP, |
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
<?php | |
libxml_use_internal_errors(true); | |
$sxe = simplexml_load_string("<?xml version='1.0'><broken><xml></broken>"); | |
if ($sxe === false) { | |
echo "Failed loading XML\n"; | |
foreach(libxml_get_errors() as $error) { | |
echo "\t", $error->message; | |
} | |
} | |
?> |
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 inputUppercase(input) | |
{ | |
input.bind('keyup', function (e) { | |
qq = input.val().toUpperCase(); | |
//fix greek accented characters | |
data = qq.replace(/[ΈΆΌΎΊΉ]/g, function (m) { | |
return { | |
'Έ': 'Ε', |
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
// Auto Password Generator | |
function makePasswd() | |
{ | |
var text = ""; | |
var possible = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"; | |
for( var i=0; i < 8; i++ ) | |
text += possible.charAt(Math.floor(Math.random() * possible.length)); | |
return text; | |
} |
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
SET @a = 0; | |
UPDATE favorits SET order = @a:=@a+1; |
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
<?php | |
function validateDate($date, $format = 'Y-m-d H:i:s') | |
{ | |
$d = DateTime::createFromFormat($format, $date); | |
return $d && $d->format($format) == $date; | |
} | |
var_dump(validateDate('2012-02-28 12:12:12')); # true | |
var_dump(validateDate('2012-02-30 12:12:12')); # false |
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
<?php | |
class Connection { | |
private $uname = ""; | |
private $password = ""; | |
private $host = "localhost"; | |
private $port; | |
private $database = ""; | |
private static $__instance = NULL; | |
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
<meta http-equiv="cache-control" content="max-age=0" /> | |
<meta http-equiv="cache-control" content="no-cache" /> | |
<meta http-equiv="expires" content="0" /> | |
<meta http-equiv="expires" content="Tue, 01 Jan 1980 1:00:00 GMT" /> | |
<meta http-equiv="pragma" content="no-cache" /> |
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
<!--1. φτιαχνεις εναν holder (gmap-holder) εξω απο το map-canvas που φόρτώνει ο χάρτης. | |
2. Βαζεις καρφωτο pointer-events:none; στο style του map-canvas (ή με αρχείο css). | |
3. Με jquery ελεγχεις το κλικ του holder και αφαιρείς το pointer-events στον χαρτη | |
--> | |
<div class="gmap-holder"> | |
<div id="map-canvas" style="pointer-events:none;height: 650px;width: 100%;"></div> | |
</div> | |
<script> | |
$(document).ready(function(){ |
NewerOlder