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
var yandex1 = { | |
"write_attachment": { | |
"id": "qODQAJDkJn89UwyIlDBdOTBZSTRAD1LMn6y36QJOlhFH%2F%2FESrlRgYknmeF39ttRt4XiQDayc2G4%3D", | |
"previewUrl": "https://webattach.mail.yandex.net/message_part_real/?sid=qODQAJDkJn89UwyIlDBdOTBZSTRAD1LMn6y36QJOlhFH%2F%2FESrlRgYknmeF39ttRtGdj2%2A%2FVPrWs%3D&thumb=y", "viewLargeUrl": "https://webattach.mail.yandex.net/message_part_real/?sid=qODQAJDkJn89UwyIlDBdOTBZSTRAD1LMn6y36QJOlhFH%2F%2FESrlRgYknmeF39ttRtGdj2%2A%2FVPrWs%3D&no_disposition=y", "downloadUrl": "https://webattach.mail.yandex.net/message_part_real/?sid=qODQAJDkJn89UwyIlDBdOTBZSTRAD1LMn6y36QJOlhFH%2F%2FESrlRgYknmeF39ttRtGdj2%2A%2FVPrWs%3D&name=mermaid_by_pascalblanche.jpg", | |
"contentType": "image/jpeg", | |
"attachmentType": "image", | |
"timer_logic": "272597" | |
} | |
}; |
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 | |
$address_list = <<<ADDRESS_LIST | |
",<\"\"FJI\"'<>[]," <[email protected]>, "sdfsdf" <[email protected]>, "SDFsdf\")@(*$@!#" <[email protected]>, <[email protected]> | |
ADDRESS_LIST; | |
$address_list = rcube_mime::decode_address_list($address_list); | |
print '<pre>'; | |
print_r($address_list); |
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
mysql> select * from km_sms order by rand() limit 20; | |
+------+------------+------------+--------+--------------+------------------------------------------------------------------------------------------+ | |
| id | service_id | timestamp | sender | phone | msg | | |
+------+------------+------------+--------+--------------+------------------------------------------------------------------------------------------+ | |
| 2947 | 773392969 | 1382691123 | | +89032711209 | V10-NIKA3-ICMP | | |
| 919 | 269962847 | 1348358343 | | +79250354848 | Checking http://knigi.km.ru failed: code 502 size 173 response time 0.001959 | | |
| 274 | 249776054 | 1343652422 | | +79250354848 | Checking http://vkrugudruzei.ru/ failed: code 302 size 145 response time 0.028719 | | |
| 1592 | 385108759 | 1359709957 | | +89162180882 | BACKUP1- |
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 | |
session_start(); | |
if ($_SERVER['REQUEST_METHOD'] === 'POST') { | |
if (!empty($_SESSION['favourite'])) { | |
unset($_SESSION['favourite']); | |
$text = 'Добавить в избранное'; | |
} | |
else { |
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
History.Adapter.bind(window, 'statechange',function(){ // Note: We are using statechange instead of popstate | |
var State = History.getState(); // Note: We are using History.getState() instead of event.state | |
if (State.data.state !== undefined) { | |
var url = State.url; | |
$.ajax({ | |
url: url | |
}).done(function(data) { | |
$('.content').html(data); |
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 | |
/** | |
* @Route("/test", name="test") | |
* @Template() | |
*/ | |
public function testAction(Request $request) | |
{ | |
/** @var User $user */ | |
$user = $this->getUser(); |
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
select | |
td.tid, td.name, count(n.nid) as cnt | |
from `term_data` as td | |
inner join `content_field_author` ca on ca.field_author_value = td.tid | |
inner join node n on n.nid = ca.nid | |
where (td.vid = 2 and n.type = 'article') | |
and (n.created >= 1396310400 and n.created <= 1398816000) | |
group by n.nid | |
order by cnt desc; |
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 AppController extends Controller | |
{ | |
/** | |
* @Route("/test-collection-form", name="test-collection-form") | |
* @Template() | |
*/ | |
public function testCollectionFormAction(Request $request) | |
{ |
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 | |
/** | |
* {@inheritdoc} | |
*/ | |
public function setDefaultOptions(OptionsResolverInterface $resolver) | |
{ | |
$resolver->setDefaults(array( | |
'type' => 'new', | |
)); |
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
<!doctype html> | |
<html lang="ru"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Document</title> | |
<!--<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>--> | |
<script src="http://www.km.ru/misc/jquery.js"></script> | |
<script> |