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
| const m = 4; | |
| const n = 3; | |
| const matrix = [ | |
| [1, 2], | |
| [3, 4, 5], | |
| [6, 7, 8, 9], | |
| ]; | |
| const arr = []; |
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
| AVURLAsset *textURLAsset; | |
| NSString *textUri = [_textTracks objectAtIndex:i][@"uri"]; | |
| if ([[textUri lowercaseString] hasPrefix:@"http"]) { | |
| textURLAsset = [AVURLAsset URLAssetWithURL:[NSURL URLWithString:textUri] options:assetOptions]; | |
| } else { | |
| textURLAsset = [AVURLAsset URLAssetWithURL:[self urlFilePath:textUri] options:nil]; | |
| } | |
| [textURLAsset loadValuesAsynchronouslyForKeys:@[@"playable",@"tracks"] completionHandler:^{ |
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 longestSubseq(s1, s2) { | |
| const s1Arr = s1.split(''); | |
| const s2Arr = s2.split(''); | |
| let result = []; | |
| while (s1Arr.length) { | |
| const tmpResult = []; | |
| let startIndex = 0; | |
| s1Arr.forEach((s1Char, index) => { |
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
| #!/bin/bash | |
| for i in {1..650} | |
| do | |
| if [ $(curl -LI https://virtualland.ru/rg-semenovskiy-park/flats/1-$i -o /dev/null -w '%{http_code}\n' -s) == "200" ]; then | |
| echo "https://virtualland.ru/rg-semenovskiy-park/flats/1-$i"; | |
| fi | |
| done |
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
| // Генерация временной ссылки | |
| $this->say( | |
| "Вот ссылка на файл ".$file->name.":\n". | |
| URL::temporarySignedRoute( | |
| 'download', | |
| now()->addMinutes(2), | |
| ['file' => $file->id] | |
| ). | |
| "Ссылка будет действовать 2 минуты" | |
| ); |
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 search(obj, value, path = '') { | |
| if (!obj) { | |
| return undefined; | |
| } | |
| if (Array.isArray(obj)) { | |
| let found; | |
| obj.some((item, index) => { | |
| found = search(item, value, `${path}[${index}]`); | |
| return found; | |
| }); |
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
| if ($('#header .button-ugps span').hasClass('choose-city')) { | |
| $.ajax({ | |
| url: '/index.php?route=ugps/city/get&json=Y', | |
| type: 'GET', | |
| dataType: 'json', | |
| error: function() { | |
| return console.error(); | |
| }, | |
| success: function(res) { | |
| if (res.name !== void 0) { |
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
| include_once "library/sxgeo/SxGeo.php"; | |
| $sxGeoBase = "library/sxgeo/SxGeoCity.dat"; | |
| $sxGeo = new SxGeo($sxGeoBase, SXGEO_BATCH | SXGEO_MEMORY); | |
| $city = $sxGeo->getCity($this->request->server['REMOTE_ADDR'])['city']['name_ru']; |