I hereby claim:
- I am piterden on github.
- I am piterden (https://keybase.io/piterden) on keybase.
- I have a public key ASDmxpvFwUgHjRafMhVUiBjKPgTCa8FLZQ7VEuCdsaXn6go
To claim this, I am signing this object:
this.myForm.get('myCheckbox').valueChanges.subscribe((value) => { | |
if (value) { | |
this.myForm.get('myEmailField').setValidators(Validators.required); | |
} else { | |
this.myForm.get('myEmailField').clearValidators(); | |
} | |
}); |
<h2>My form</h2> | |
<form [formGroup]="myForm" (ngSubmit)="onSubmit()"> | |
<div> | |
Make email mandatory <input formControlName="myCheckbox" | |
type="checkbox"> | |
</div> | |
<div> | |
Email: <input formControlName="myEmailField" | |
type="email"> |
ngOnInit() { | |
this.myForm = this.fb.group({ | |
myCheckbox: [''], | |
myEmailField: [ | |
'', | |
[ | |
Validators.maxLength(250), | |
Validators.minLength(5), | |
Validators.pattern(/.+@.+\..+/), | |
], |
const fs = require('fs'); | |
var wordsSql = `-- MySQL dump 10.13 Distrib 5.7.24, for Linux (x86_64) | |
-- | |
-- Host: localhost Database: crossword | |
-- ------------------------------------------------------ | |
-- Server version 5.7.24-0ubuntu0.16.04.1 | |
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; | |
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; |
I hereby claim:
To claim this, I am signing this object:
'dash-cased-string'.split('-').map((part, idx) => idx ? part.charAt(0).toUpperCase() + part.slice(1) : part).join('') | |
'camelCasedString'.replace(/([A-Z])/g, '-$1').toLowerCase() |
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"/> | |
<title>else vs return #jsbench #jsperf</title> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/benchmark/1.0.0/benchmark.min.js"></script> | |
<script src="./suite.js"></script> | |
</head> | |
<body> | |
<h1>Open the console to view the results</h1> |
String.prototype.visualLength = function() { | |
var ruler = document.getElementById("ruler"); | |
ruler.innerHTML = this; | |
return ruler.offsetWidth + 30; | |
}; | |
(function(document, window, webix, visax, undefined) { | |
/** | |
* Lexicon helper |
let el = document.getElementById('telegram-passport').parentElement | |
const code = [] | |
let cls = '' | |
let comment = '' | |
while (el.nextElementSibling && el.nextElementSibling.tagName !== 'H3') { | |
if (el.nextElementSibling.tagName === 'H4') { | |
cls = `${cls}export type ${el.nextElementSibling.innerText}` | |
} |
Алексей Онацко — специалист по урбанистике не в теории, а на практике: начинал с рейвов и выставок на заброшенных заводах, набил руку на реновации объектов в Москве, а теперь взялся за пространство «Порт Севкабель» и обещает нам Бруклин в районе Гавани.
Алексей Онацко — партнер и директор по развитию управляющей компании Miles & Yards, которая занимается реализацией проекта «Порт Севкабель».
Мне нравится бороться с заборами, которые у нас — в России — повсюду: и на улицах, и в головах...
Если же серьезно, сейчас я занимаюсь проектами, связанными с развитием новых городских общественных пространств, создаю фундаменты для людей, приходящих следом, людей, делающих на этой концептуальной и хозяйственной базе что-то свое, наполняющих объекты новыми смыслами и функциями. Началось это лет пятнадцать назад — нам с друзьями хотелось творчества и сам