matcher: function(item) {
var lowerCase = function (s) {
return s.toLowerCase();
};
var searchWords = this.query.split(' ').map(lowerCase);
var sourceWords = item.split(' ').map(lowerCase);
var result = sourceWords.filter(function (source) {
var found = searchWords.filter(function (w) {
return source == w;
});
return found.length > 0;
});
return result.length == searchWords.length;
}
$class = 'App\\Models\\' . Str::title($engine) . 'Parser';
function addToCart(id, count) {
var cart = localStorage.getItem('christGoods');
cart = JSON.parse(cart) || {};
cart[id] = cart[id] || 0;
cart[id] += count;
localStorage.setItem('christGoods', JSON.stringify(cart));
}
function getCart() {
var cart = localStorage.getItem('christGoods');
cart = JSON.parse(cart) || {};
return cart;
}
addToCart('001', 2);
getCart();
// Object {001: 2}
t, err := template.ParseFiles("C:\path\to\www\index.html")
t, err := template.ParseFiles("/path/to/www/index.html")
import (
"fmt"
"log"
"os"
"path/filepath"
)
func main() {
dir, err := filepath.Abs(filepath.Dir(os.Args[0]))
if err != nil {
log.Fatal(err)
}
fmt.Println(dir)
}
topics (int id, string title);
posts (int id, text content, int topic_id);
comments (int id, text content, int post_id);
brew install mcrypt