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
def solutionC(a): | |
g = {} | |
maxnum = 1 | |
for i in range(0, len(a)): | |
if a[i] > 0: | |
g[a[i]] = 1 | |
maxnum = max(maxnum, a[i]) | |
for j in range(1, maxnum+2): | |
if j not in g: | |
return j |
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 catalog_custom extends def_module | |
{ | |
public function mysearch() | |
{ | |
$searchStr = getRequest('search_str'); | |
$pages = new selector_custom('pages'); | |
$pages->types('hierarchy-type')->name('catalog', 'object'); | |
$pages->where('description')->cslike('%'.$searchStr.'%'); | |
$pages->where('photo')->regexp('jpg$'); |
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
openssl req -x509 -newkey rsa:2048 -keyout test.key -out test.crt -days 1 -nodes -subj "/C=RU/CN=*.localhost" |
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
#server { | |
#... | |
pagespeed on; | |
# Needs to exist and be writable by nginx. Use tmpfs for best performance. | |
pagespeed FileCachePath /var/ngx_pagespeed_cache; | |
# Ensure requests for pagespeed optimized resources go to the pagespeed handler | |
# and no extraneous headers get set. | |
location ~ "\.pagespeed\.([a-z]\.)?[a-z]{2}\.[^.]{10}\.[^.]+" { |