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
SELECT | |
zero.name, | |
(min(lng - offset - if(lng-offset>180, 360, 0)) + 360) % 360 + offset as min, | |
max(lng - offset - if(lng-offset>=180, 360, 0)) + offset as max | |
FROM | |
(SELECT | |
min(lng) as offset, | |
name FROM places group by name | |
) as zero | |
LEFT JOIN places ON (places.name = zero.name) |
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 | |
interface Discount | |
{ | |
/** | |
* @return int | |
*/ | |
function getDiscountValue(Order $order); | |
} |
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 | |
$data = [ | |
["calendar_id" => 1, "doctor_id" => 1, "date" => "2013-01-01"], | |
["calendar_id" => 1, "doctor_id" => 2, "date" => "2013-01-03"], | |
["calendar_id" => 1, "doctor_id" => 1, "date" => "2013-01-03"], | |
["calendar_id" => 2, "doctor_id" => 4, "date" => "2013-01-01"], | |
["calendar_id" => 2, "doctor_id" => 4, "date" => "2013-01-01"], |
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
#!/usr/local/bin/node | |
var irc = require('irc'); | |
var http = require('http'); | |
var opts = { | |
userName: 'docplanner', | |
realName: 'Doctor Planner', | |
autoRejoin: false, | |
channels: ['#docplanner'], |
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
root@bob /h/mlebkowski# docker run -t -d base bash -c 'trap date SIGTERM SIGKILL SIGSTOP; while true; do sleep 1; done' | |
57a333488199 | |
root@bob /h/mlebkowski# docker logs 57a333488199 | |
root@bob /h/mlebkowski# docker stop 57a333488199 | |
57a333488199 | |
root@bob /h/mlebkowski# docker logs 57a333488199 | |
Fri Dec 6 13:09:40 UTC 2013 |
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
web: node index.js |
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 updateSphinxRTIndex($isDelete = false) | |
{ | |
$indexer = Xplod::getInstance()->getContainer()->get('search.listener.realtime_indexer'); | |
$propelModel = $this->toPropelModel(); | |
if ($this->isNew()) | |
{ | |
$indexer->queueInsert($propelModel); | |
} |
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 | |
class SeasonalityFactor | |
{ | |
const FORMAT = 'M'; | |
/** | |
* @var array | |
*/ | |
private $modifiers = array (); |
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
INSERT INTO `reach` (`id`, `day`, `value`) | |
VALUES | |
(1, 1, 0.0743), | |
(2, 2, 0.1244), | |
(3, 3, 0.1682), | |
(4, 4, 0.2060), | |
(5, 5, 0.2407), | |
(6, 6, 0.2780), | |
(7, 7, 0.3153), | |
(8, 8, 0.3496), |
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
DROP TABLE IF EXISTS `address_service_copy`; | |
DROP TABLE IF EXISTS `address_service_temp2`; | |
ALTER TABLE `crm_gratis_commercial` CHANGE `trader_id` `trader_id` INTEGER(10) NOT NULL; | |
ALTER TABLE `disease_section` ADD CONSTRAINT `disease_section_FK_1` | |
FOREIGN KEY (`disease_id`) | |
REFERENCES `disease` (`id`); |