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
class CardList { | |
constructor(element) { | |
this.list = []; | |
this.element = element; | |
} | |
/** | |
* генерируем карточки | |
* @param {*} initialCard | |
*/ | |
render(initialCard) { |
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 (popupName.value.length > 1 && popupName.value.length < 31 && ((popupLink.value.slice(0, 7) == "http://" && popupLink.value.length > 7) || | |
* (popupLink.value.slice(0, 8) == "https://" && popupLink.value.length > 8))) { | |
* Ну во первых мы в качестве параметров передаём объекты | |
* и разбиваем на две функции | |
*/ | |
function _checkLength(item, min, max) { |
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
[ | |
{ | |
"likes": [ | |
{ | |
"name": "Tim Berners-Lee", | |
"about": "Inventor, scientist", | |
"avatar": "https://media.wired.com/photos/5c86f3dd67bf5c2d3c382474/4:3/w_2400,h_1800,c_limit/TBL-RTX6HE9J-(1).jpg", | |
"_id": "d285e3dceed844f902650f40" | |
} | |
], |
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
class Component { | |
constructor() { | |
if (new.target === Component) { | |
throw new Error(`Can't instantiate Component, only concrete one.`); | |
} | |
} | |
get template() { | |
throw new Error(`You have to define template.`); |
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
module.exports.noSql = { | |
dbo: null, | |
connectionDB: function () { | |
if(!this.dbo){ | |
this.dbo = db.db("mydb"); | |
} | |
}, | |
setDB: function (param) { | |
this.connectionDB(); |
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
// SQLSTATE[HY093]: Invalid parameter number | |
// (SQL: select (select `user`.`id` from `user` | |
// where `user`.`id` in (2013, 2015) limit 1) as ff | |
// from `user` as `tmp_user` | |
// where `tmp_user`.`year` in (2016, 2017, 2018, ?, ?)) | |
$arrayUser = [5,6]; | |
$arrayYear = [2013,2015,2016,2017,2018]; | |
$subSelect = DB::table('user') |
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
//SQLSTATE[HY093]: Invalid parameter number | |
// (SQL: select (select `user`.`id` from `user` | |
// where `user`.`id` in (2013, 2015, ?, ?, ?, ?) limit 1) as ff | |
// from `user` as `tmp_user` where `tmp_user`.`year` in (?, ?)) | |
$arrayUser = [5,6,7,8,9,10]; | |
$arrayYear = [2013,2015]; | |
$subSelect = DB::table('user') | |
->select('user.id') |
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
// (SQL: select (select `user`.`id` from `user` where `user`.`id` in (2013, 2015) limit 1) | |
// as ff from `user` as `tmp_user` | |
// where `tmp_user`.`year` in (?, ?)) | |
public function arrayUser(){ | |
$arrayUser = [5,6]; | |
$arrayYear = [2013,2015]; | |
$subSelect = DB::table('user') | |
->select('user.id') | |
->wherein('user.id',$arrayUser) |
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
2=20000000000000000 | |
4=6000000000000000 | |
6=5001000000000000 | |
7=5100000000000000 | |
8=5001000000000000 | |
9=5100000000000000 | |
17=6000000000000000 | |
18=5100000000000000 | |
19=5100000000000000 | |
20=8000000000000000 |
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
pragma solidity ^0.4.23; | |
/// @title Interface new rabbits address | |
contract FromInterface { | |
function getBunny(uint32 _bunny) public view returns( | |
uint32 mother, | |
uint32 sire, | |
uint birthblock, | |
uint birthCount, | |
uint birthLastTime, |