# This example does an AJAX lookup and is in CoffeeScript
$('.typeahead').typeahead(
# source can be a function
source: (typeahead, query) ->
# this function receives the typeahead object and the query string
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*global _, Backbone*/ | |
// By Martin Angers (PuerkitoBio) | |
// This should be inside a module pattern. Defines a base Model class, could/should be merged with your | |
// own base Model. | |
// Dependencies: underscore (_) and Backbone. | |
var ComputedProperties = function(model) { | |
this.model = model; | |
this.properties = {}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package org.scalaquery.demo | |
import scala.reflect._ | |
import org.scalaquery.ql._ | |
import org.scalaquery.ql.extended.{ExtendedTable => Table} | |
import org.scalaquery.ql.extended.H2Driver.Implicit._ | |
import org.scalaquery.simple.StaticQuery.updateNA | |
import org.scalaquery.session.Database | |
import org.scalaquery.session.Database.threadLocalSession |