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 WorkingTimeCounter | |
{ | |
const LARGEST_GAP_BETWEEN_RECORDS = 57600; // 16*60*60 = 57600 | |
const RECORD_TYPE_EXIT = 0; | |
public function getAll($records) | |
{ | |
$records = $this->sortByTime($records); |
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
create temporary table tmpTable (id int); | |
insert tmpTable | |
(id) | |
select id | |
from disease_products yt | |
where exists | |
( | |
select * | |
from disease_products yt2 |
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
// Virtual host add 3 lines. | |
ProxyPreserveHost On | |
ProxyPass /[linkName] http://localhost:[PortNumber] | |
ServerName localhost | |
a2enmod proxy | |
a2enmod proxy_http | |
a2enmod proxy_ajp | |
a2enmod rewrite | |
a2enmod deflate |
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 pvz_2 | |
clc, close all, clear all | |
%KONSTRUKCIJOS DUOMENYS | |
% MAZGU (MASIU) KONSTANTOS | |
m1 = 1; m2 = 3; | |
% ELEMENTU (SPYRUOKLIU) KONSTANTOS | |
k1 = 2000; | |
% VEIKIANCIU JEGOS (N) | |
f1=800; f2=400; |
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
public function getByCategoryAndCulture($category, $culture) | |
{ | |
$rsm = new ResultSetMapping; | |
$rsm->addEntityResult('FarmCatalog\Entity\Product', 'p'); | |
$rsm->addFieldResult('p', 'id', 'id'); | |
$rsm->addFieldResult('p', 'name', 'name'); | |
$rsm->addMetaResult('p', 'category', 'category_id', true); | |
$sql = "SELECT p.* FROM products p"; |