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
| We have a vector of integer numbers. Size of this vector between 1 and 4. | |
| And we need write function which transformate that vector on way like this: | |
| [2 2 2 2] => [4 4] | |
| [4 2 2] => [4 4] | |
| [2 2 4] => [4 4] | |
| [2 2 2] = [4 2] | |
| [2 4 2 4] => [2 4 2 4] | |
| [2 4 2] => [2 4 2] | |
| [2 4 2 2] = [2 4 4] |
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
| (ns main.core) | |
| (defn recur-call [f x n] | |
| (if (= n 1) | |
| (f x) | |
| (recur-call f (f x) (dec n)))) | |
| (defn sum-pairs [row] | |
| (mapv + row (rest row))) | |
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
| <!-- | |
| index.html | |
| Copyright 2017 vlad <vlad@vlad-Presario-CQ58-Notebook-PC> | |
| This program is free software; you can redistribute it and/or modify | |
| it under the terms of the GNU General Public License as published by | |
| the Free Software Foundation; either version 2 of the License, or | |
| (at your option) any later version. | |
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
| <script type="text/x-template" id="cell-template"> | |
| <div> | |
| <span | |
| v-show="edit == false" | |
| @click="$emit('set-focus', cell)" | |
| >{{cell.value}}</span> | |
| <input | |
| v-show="edit == true" | |
| v-model="cell.value" | |
| > |
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 | |
| require_once('utils.php'); | |
| $table = json_decode('[ | |
| { | |
| "id": 1, | |
| "parent": 0, | |
| "name": "Каталог", | |
| "path": "catalog", |
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
| window.onload= function(){ | |
| var stringCell = function(field,value){ | |
| return {field:field,value:value,edit:false,type:'string'} | |
| }; | |
| var binaryCell = function(field,value = 0){ | |
| return {field:field,value:value,edit:value == 0 ? true: false,type:'binary'} | |
| } | |
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
| $mask = "SELECT | |
| l.UID | |
| , l.Tel | |
| , l.Region | |
| , l.service_base | |
| , t.NResult | |
| , sd_sex$ | |
| , sd_age$ | |
| , l.service_blocked | |
| , l.service_dtimport |
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
| import unittest | |
| def get_cases(fields): | |
| res = [] | |
| return res | |
| def get_fields_from_str(): | |
| pass | |
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
| /my_project | |
| __init__.py | |
| /foo | |
| __init__.py | |
| bar.py | |
| /test | |
| __init__.py | |
| test.py |
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
| import random | |
| def get_current_values(number,values): | |
| while values: | |
| value = values.pop(-1) | |
| if number//value: | |
| values.append(value) | |
| return values | |
| def print_row(row): |
NewerOlder