/** * Compile and return SQLite VM for SQL statement. Only available * in SQLite 2.8.0 and above, otherwise a no-op. * * @param sql SQL statement to be compiled * @return a Vm object */ public Vm compile(String sql) throws SQLite.Exception { synchronized(this) { Vm vm = new Vm(); vm_compile(sql, vm); return vm; } }
/** * Compile and return SQLite VM for SQL statement. Only available * in SQLite 3.0 and above, otherwise a no-op. * * @param sql SQL statement to be compiled * @param args arguments for the SQL statement, '%q' substitution * @return a Vm object */ public Vm compile(String sql, String args[]) throws SQLite.Exception { synchronized(this) { Vm vm = new Vm(); vm_compile_args(sql, vm, args); return vm; } }
function Vm{ this.gifts = ko.observableArray(); // gifts will be an array of Gift classes this.addGift = function () { this.gifts.push(new Gift({ Title: "", Price: "" })); }; this.removeGift = function (gift) { this.gifts.remove(gift); }; this.totalCost = ko.computed(function () { var total = 0; for (var i = 0; i < this.gifts().length; i++) { total += parseFloat(this.gifts()[i].Price()); }; return total; }, this); } var viewModelForTemplated = new Vm();
var Vm = function() { var self = this; self.date = ko.observable(); self.dateFormatted = ko.computed(function() { return moment(self.date()).format("DD/MM/YYYY HH:mm:ss") }); setInterval(function() { self.date(new Date()); }, 1000); }; var vm = new Vm(); ko.applyBindings(vm, $("body")[0]);
}; var vm = new Vm(); ko.applyBindings(vm, $("body")[0]); </script>
/** * Compile and return SQLite VM for SQL statement. Only available * in SQLite 2.8.0 and above, otherwise a no-op. * * @param sql SQL statement to be compiled * @return a Vm object */ public Vm compile(String sql) throws SQLite.Exception { synchronized(this) { Vm vm = new Vm(); vm_compile(sql, vm); return vm; } }
/** * Compile and return SQLite VM for SQL statement. Only available * in SQLite 2.8.0 and above, otherwise a no-op. * * @param sql SQL statement to be compiled * @return a Vm object */ public Vm compile(String sql) throws SQLite.Exception { synchronized(this) { Vm vm = new Vm(); vm_compile(sql, vm); return vm; } }
/** * Compile and return SQLite VM for SQL statement. Only available * in SQLite 3.0 and above, otherwise a no-op. * * @param sql SQL statement to be compiled * @param args arguments for the SQL statement, '%q' substitution * @return a Vm object */ public Vm compile(String sql, String args[]) throws SQLite.Exception { synchronized(this) { Vm vm = new Vm(); vm_compile_args(sql, vm, args); return vm; } }
/** * Compile and return SQLite VM for SQL statement. Only available * in SQLite 2.8.0 and above, otherwise a no-op. * * @param sql SQL statement to be compiled * @return a Vm object */ public Vm compile(String sql) throws SQLite.Exception { synchronized(this) { Vm vm = new Vm(); vm_compile(sql, vm); return vm; } }
/** * Compile and return SQLite VM for SQL statement. Only available * in SQLite 2.8.0 and above, otherwise a no-op. * * @param sql SQL statement to be compiled * @return a Vm object */ public Vm compile(String sql) throws SQLite.Exception { synchronized(this) { Vm vm = new Vm(); vm_compile(sql, vm); return vm; } }