<?php
error_reporting(error_reporting() & ~E_WARNING);
$std = new stdClass();
$std->first = new stdClass();
$std->first->third = 3;
gulp.task('sass', function () {
return gulp.src(paths.styles)
.pipe(sass({ compass: true, style: 'expanded', sourcemap: true }))
.pipe(prefix('last 3 version', 'ie 8', 'ie 9', 'Opera 12.1'))
.pipe(gulp.dest('css/'));
});
gulp.task('css', ['sass'], function () {
return gulp.src(["/css", "!/css/*.min.css", "!/css/styles.css", "/external/**/*.css"])
.pipe(concat('styles.css'))
.pipe(gulp.dest('css/'))
.pipe(rename({ suffix: 'min'}))
.pipe(minCSS())
.pipe(gulp.dest('css/'));
});
gulp.task('default', ['css'], function () {
gulp.watch(paths.styles, ['css']);
});
select *
from (select b.*
from (select a.*, (
if(`sid` = 8 AND `rid` = 1 AND `nid` IS NULL, 1<<0, 0)
| if(`sid` IS NULL AND `rid` IS NULL AND `nid` = "привет", 1<<1, 0)
| if(`sid` = 1 AND rid = 2 AND `nid` IS NULL, 1<<2, 0) ) flag
from `table` a
where 1=1) b
group by b.main
having bit_or(b.flag) = 7 )c
join (select a.*, (
if(`sid` = 8 AND `rid` = 1 AND `nid` IS NULL, 1<<0, 0)
| if(`sid` IS NULL AND `rid` IS NULL AND `nid` = "привет", 1<<1, 0)
| if(`sid` = 1 AND rid = 2 AND `nid` IS NULL, 1<<2, 0) ) flag
from `table` a
where 1=1) d using(main)
<div id="example">
<input type="text" data-field="name" placeholder="Название"/>
<input type="text" data-field="price" placeholder="Цена"/>
<ul class="list">
</ul>
</div>
var options = {
item: '<li><h3 class="name"></h3><p class="price"></p></li>'
};
var values = [
{ name: 'Пример с ценой x', price:'150' }
, { name: 'Пример с ценой y', price:'300' }
];
var userList = new List('example', options, values);
$('input[data-field]').on('keyup', function(e){
userList.search($(this).val(), [""+$(this).data('field')]);
});