font-weight:700
,то у шрифта все равно жирность не поменяется.@font-face {
font-family: Helvetica;
src: url(/fonts/Helvetica/HelveticaRegular.ttf);
font-weight:400;
}
@font-face {
font-family: Helvetica;
src: url(/fonts/Helvetica/HelveticaLight.ttf);
font-weight:300;
}
@font-face {
font-family: Helvetica;
src: url(/fonts/Helvetica/HelveticaBold.ttf);
font-weight:700
}
function getTimestamps(from, to, step) {
function f(timestamps, current) {
return current.isBefore(to)
? f([...timestamps, current.clone()], current.add(step, 'minutes'))
: [...timestamps, to.clone()];
}
return f([], from)
}
const timestamps = getTimestamps(
moment('1745', 'hmm'),
moment('2000', 'hmm'),
30
);
console.log(
timestamps
.map(t => t.format('HH:mm'))
.toString()
) // 17:45,18:15,18:45,19:15,19:45,20:00
const timePoints = (start, end, period = 30) => {
const iter = (current, acc) => {
if (moment(current).diff(moment(end), "minutes") > 0) {
acc[acc.length] = end;
return acc;
}
return iter(moment(current).add(period, "minutes"), acc[acc.length] = current)
}
return iter(start, [])
}
const mytimePoints = timePoints('17:45', '20:00', 30)
console.log(mytimePoints)
computed: {
brands() {
return [...new Set(this.profiles.map(n => n.brand.name))];
},
},
<option v-for="brand in brands" :value="brand">{{ brand }}</option>
function setNestedValue(root, ...args) {
const val = args.pop();
const key = (args = args.join('.').split('.')).pop();
args.reduce((p, c) => p[c] = p[c] || {}, root)[key] = val;
}
const obj = {};
setNestedValue(obj, 'xxx', 'yyy', 'zzz', 69);
setNestedValue(obj, 'xxx.a.b.c', 187);
setNestedValue(obj, '_', 666);
.toggle
$.fn.extend({
toggleText: function(a, b){
return this.text(this.text() == b ? a : b);
}
});
$(".example").on('click', function(){
$(this).toggleText('создать textarea', 'сохранить результат').toggleClass('active');
if($(this).hasClass('active')) {
alert('открыли textarea для редактирования');
}else{
alert('созранили и закрыли');
}
});
const ip = str.split(':', 1)[0];
const ip = str.slice(0, str.indexOf(':'));
const ip = str.match(/[\d.]+/).pop();
const ip = str.replace(/:.+$/, '');
const [ ip ] = /.+(?=:)/.exec(str);
Route::get('1.0/d/{guid}', 'Files\v1b0\Files@inputFileName');
Route::get('2.0/d/{guid}', 'Files\v2b0\Files@inputFileName');
Route::get('2.1/d/{guid}', 'Files\v2b1\Files@inputFileName');
сразу практикуюсь без теории)
Я тут начинаю изучать php с фреймворка yii2
Stacks
Blade allows you to push to named stacks which can be rendered somewhere else in another view or layout. This can be particularly useful for specifying any JavaScript libraries required by your child views:@push('scripts') <script src="/example.js"></script> @endpush
You may push to a stack as many times as needed. To render the complete stack contents, pass the name of the stack to the@stack
directive:<head> <!-- Head Contents --> @stack('scripts') </head>
[
[ 'region_id', 'regionName' ],
[ 'district_id', 'districtName' ],
[ 'area_id', 'areaName' ],
[ 'city_id', 'cityName' ],
[ 'place_id', 'cityName' ],
[ 'name', 'streetName' ],
].forEach(([ del, search ]) => {
if (this.tableParam[del]) {
delete this.tableParam[del];
this.searchForm.get(search).patchValue(null);
}
});