// Retrieve all posts that have three or more comments...
$posts = Post::has('comments', '>=', 3)->get();
UPDATE catalog_product_entity_decimal cd
JOIN (SELECT cp.store_id, cp.entity_id, cp.value, cp.value * cr.rate as value_rate
FROM catalog_product_entity_varchar cp
JOIN directory_currency_rate cr ON cr.currency_from = 'RUB' AND cr.currency_to = 'EUR'
WHERE cp.attribute_id = 138) j ON cd.store_id = j.store_id AND cd.entity_id = j.entity_id
SET cd.value = j.value_rate;
gulp.task('sass', function () {
gulp.src('**/sass/*.scss')
.pipe(plumber({errorHandler: onError}))
.pipe(sass())
.pipe(flatten({includeParents: 0}))
.pipe(gulp.dest(function (file) {
var dir = path.dirname(file.path).split('/scss')
return dir[1] ? path.join(dir[0], 'css', dir[1]) : path.join(dir[0], 'css');
}))
});
Почему?
И как выровнять текст из не фиксированного кол-ва строк в родителе с фиксированной высотой?
// Tabs
var tik = [];
$(".tabgroup > div, .tabgroup .massage").hide();
$(".tabs a").click(function(e){
e.preventDefault();
var $this = $(this),
tabgroup = '#'+$this.parents('.tabs').data('tabgroup'),
others = $this.closest('li').siblings().children('a'),
target = $this.attr('href');
others.removeClass('active');
$this.addClass('active');
$(tabgroup).children('div').hide().removeClass("active");
$(tabgroup).find(".massage").hide();
$(target).show().addClass("active");
if(tik.length){
for(var i = 0; i < tik.length; i++){
if(tik[i]) clearInterval(tik[i]);
}
tik = [];
}
$(target).each(function(index){
// Show massage
var i = 0,
massage = $(target).find(".massage"),
massageLength = massage.length;
tik[index] = setInterval(function(){
if (i < massageLength) {
$(massage[i]).fadeIn(500);
i++;
$(".massageList, .custom-scroll_inner").animate({
scrollTop: 9999
}, 1000);
} else {
clearInterval(tik[index]);
}
}, 2000);
});
});
// Auto show first
$(".tabs li:first-of-type a").click();