SELECT `r`.`id_zadakur` AS `taskId`,
sum(BS_TIME_DIFF(`r`.`arrival`, `r`.`departure`)) AS `wait`,
sum(BS_TIME_DIFF(IFNULL(`r2`.`departure`, `r`.`arrival`), `r`.`arrival`)) AS `active`
FROM `routes` AS `r`
LEFT JOIN `routes` AS `r2` ON `r2`.`id_zadakur` = `r`.`id_zadakur` AND `r2`.`series` = `r`.`series`-1
GROUP BY `r`.`id_zadakur`
function changeIconChat() {
$('.chat').each(function() {
if ($(this).hasClass('gray'))
$(this).removeClass('gray');
else
$(this).addClass('gray');
});
}
setInterval(changeIconChat, 2000);
function myEncode($value, $alphabet, $length) {
$base = strlen($alphabet);
$encoded = '';
while ($length > 0 && $value > 0) {
$encoded = $alphabet[$value % $base].$encoded;
$value = ($value - $value % $base) /$base;
$length--;
}
while ($length > 0) {
$encoded = $alphabet[0].$encoded;
$length--;
}
return $encoded;
}
$alphabet = 'abcdefghijklmnopqrstuvwxyz';
echo myEncode(2, $alphabet, 3)."\n";
echo myEncode(555, $alphabet, 3)."\n";
function myEncode_1($value) {
return chr(($value - $value % 676) / 676 + 97).
chr(($value % 676 - $value % 26) / 26 + 97).
chr($value % 26 + 97);
}
echo myEncode_1(2)."\n";
echo myEncode_1(555)."\n";
SELECT `p`.*
FROM `products` AS `p`
JOIN `PropertyPivot` AS `pp1` ON `pp1`.`product_id` = `p`.`id`
AND `pp1`.`property_id` = :p1_property AND `pp1`.`option_id` = :p1_value
JOIN `PropertyPivot` AS `pp2` ON `pp2`.`product_id` = `p`.`id`
AND `pp2`.`property_id` = :p2_property AND `pp2`.`option_id` = :p2_value
auth_method: ldap
ldap_servers:
- "10.149.0.209"
- "10.149.0.211"
ldap_encrypt: none
ldap_port: 389
ldap_rootdn: "cn=readonly,cn=users,dc=domain,dc=local"
ldap_password: "password"
ldap_base: "cn=users,dc=domain,dc=local"
ldap_uids:
"sAMAccountName": "%u"
ldap_filter: "(&(objectClass=user)(memberOf:1.2.840.113556.1.4.1941:=cn=JabberAccess,ou=Permissions,dc=domain,dc=local))"
state is available only if the state feature is enabled or if it is prefixed withCORE::
. The state feature is enabled automatically with ause v5.10
(or higher) declaration in the current scope.