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
| package main | |
| import ( | |
| "fmt" | |
| "sync" | |
| "time" | |
| ) | |
| type Fetcher interface { | |
| // Fetch returns the body of URL and |
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
| package main | |
| import ( | |
| "golang.org/x/tour/tree" | |
| "fmt" | |
| ) | |
| // Walk walks the tree t sending all values | |
| // from the tree to the channel ch. | |
| func Walk(t *tree.Tree, ch chan int) { |
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
| islands = [ | |
| [0, 1, 1, 1, 1], | |
| [0, 1, 1, 0, 1], | |
| [0, 0, 0, 1, 0], | |
| [1, 1, 1, 0, 0], | |
| ]; | |
| def islands_num(matr): | |
| m = len(matr) | |
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
| 2020-07-08 10:25:48.396 7867-7909/com.hardworkers.development E/GraphResponse: {HttpStatus: 400, errorCode: 100, subErrorCode: 33, errorType: GraphMethodException, errorMessage: Unsupported get request. Object with ID '1639923286166934' does not exist, cannot be loaded due to missing permissions, or does not support this operation. Please read the Graph API documentation at https://developers.facebook.com/docs/graph-api} |
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 stdin = process.openStdin(); | |
| stdin.addListener("data", function(d) { | |
| var a = d.toString().split(" "); | |
| console.log(parseInt(a[0]) + parseInt(a[1])); | |
| }); |
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 convert(tokens) { | |
| const token = tokens.splice(0, 1)[0]; | |
| if (token === 'NOT') { | |
| return `(${token} ${convert(tokens)})`; | |
| } | |
| if (['AND', 'OR'].includes(token)) { | |
| return `(${convert(tokens)} ${token} ${convert(tokens)})`; | |
| } |
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 reverse = str => { | |
| let rev = ''; | |
| for (let i = str.length-1; i >= 0; i--) { | |
| rev += str[i]; | |
| } | |
| return rev; | |
| }; |
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 COUNT(t.product_id) | |
| FROM | |
| (SELECT ppc.product_id AS product_id | |
| FROM product__product_category ppc | |
| LEFT JOIN classification__category cc ON ppc.category_id = cc.id | |
| WHERE cc.context = 'brands' | |
| GROUP BY ppc.product_id | |
| HAVING COUNT(ppc.category_id) > 1 | |
| ) AS t; |
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 | |
| COUNT(DISTINCT v.id) FILTER (WHERE ce.timestamp >= '2016-11-01' AND ce.timestamp <= '2016-12-01' AND vg.price IS NULL) AS november_2016_null, | |
| COUNT(DISTINCT v.id) FILTER (WHERE ce.timestamp >= '2016-11-01' AND ce.timestamp <= '2016-12-01' AND vg.price < 1000000 AND vg.price IS NOT NULL) AS november_2016_to_1M, | |
| COUNT(DISTINCT v.id) FILTER (WHERE ce.timestamp >= '2016-11-01' AND ce.timestamp <= '2016-12-01' AND vg.price >= 1000000 AND vg.price < 3000000 AND vg.price IS NOT NULL) AS november_2016_from_1M_to_3M, | |
| COUNT(DISTINCT v.id) FILTER (WHERE ce.timestamp >= '2016-11-01' AND ce.timestamp <= '2016-12-01' AND vg.price >= 3000000 AND vg.price < 5000000 AND vg.price IS NOT NULL) AS november_2016_from_3M_to_5M, | |
| COUNT(DISTINCT v.id) FILTER (WHERE ce.timestamp >= '2016-11-01' AND ce.timestamp <= '2016-12-01' AND vg.price >= 5000000 AND vg.price < 8000000 AND vg.price IS NOT NULL) AS november_2016_from_5M_to_8M, | |
| COUNT(DISTINCT v.id) FILTER (WHERE ce.timestamp >= '2016-11-01' AND ce.timestamp <= '20 |
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
| $(document.body).on('submit', 'form.valuation-request-form', function (event) { | |
| event.preventDefault(); | |
| var title = 'Заявка принята'; | |
| var message = 'Мы свяжемся с вами в ближайшее время'; | |
| var modal = $('#md-after-subscribe'); | |
| var form = $(this); | |
| $.ajax({ | |
| type: 'POST', |
NewerOlder