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
// date picker | |
$(function() { | |
var dates = $( "#from, #to" ).datepicker({ | |
defaultDate: "+1w", | |
changeMonth: true, | |
numberOfMonths: 3, | |
firstDay: 1, | |
dayNamesMin: ['Nd', 'Pn', 'Wt', 'Śr', 'Cz', 'Pt', 'So'], | |
monthNames: ['Styczeń', 'Luty', 'Marzec', 'Kwiecień', 'Maj', 'Czerwiec', 'Lipiec', 'Sierpień', 'Wrzesień', 'Październik', 'Listopad', 'Grudzień'], |
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 | |
$conn = new Mongo('localhost'); | |
// access database | |
$db = $conn->benchmark; | |
// access collection | |
$stats = $db->coll3; | |
$map = new MongoCode("function() { emit(this.shop_hash,1); }"); |
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 | |
try { | |
// open connection to MongoDB server | |
$conn = new Mongo('localhost'); | |
// access database | |
$db = $conn->benchmark; | |
// access collection | |
$collection = $db->coll; |
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 | |
function request_headers() | |
{ | |
if(function_exists("apache_request_headers")) // If apache_request_headers() exists... | |
{ | |
if($headers = apache_request_headers()) // And works... | |
{ | |
return $headers; // Use it | |
} | |
} |