public interface EbeanServer
Registration with the Ebean Singleton:
When a EbeanServer is constructed it can be registered with the Ebean
singleton (see ServerConfig.setRegister(boolean)
). The Ebean
singleton is essentially a map of EbeanServer's that have been registered
with it. The EbeanServer can then be retrieved later via
Ebean.getServer(String)
.
The 'default' EbeanServer
One EbeanServer can be designated as the 'default' or 'primary' EbeanServer
(see ServerConfig.setDefaultServer(boolean)
.  This is handy for
applications that use a single DataSource.
There is one EbeanServer per Database (javax.sql.DataSource). One EbeanServer
is referred to as the 'default' server and that is the one that
Ebean methods such as Ebean.find(Class)
use.
Constructing a EbeanServer
EbeanServer's are constructed by the EbeanServerFactory. They can be created
programmatically via EbeanServerFactory.create(ServerConfig)
or they
can be automatically constructed on demand using configuration information in
the ebean.properties file.
Example: Get a EbeanServer
// Get access to the Human Resources EbeanServer/Database
EbeanServer hrServer = Ebean.getServer("HR");
// fetch contact 3 from the HR database Contact contact =
hrServer.find(Contact.class, new Integer(3));
contact.setStatus("INACTIVE"); ...
// save the contact back to the HR database hrServer.save(contact);
EbeanServer has more API than Ebean
EbeanServer provides additional API compared with Ebean. For example it
provides more control over the use of Transactions that is not available in
the Ebean API.
External Transactions: If you wanted to use transactions created externally to eBean then EbeanServer provides additional methods where you can explicitly pass a transaction (that can be created externally).
Bypass ThreadLocal Mechanism: If you want to bypass the built in ThreadLocal transaction management you can use the createTransaction() method. Example: a single thread requires more than one transaction.
Ebean
,
EbeanServerFactory
,
ServerConfig
| Modifier and Type | Method and Description |
|---|---|
Transaction |
beginTransaction()
Start a transaction with 'REQUIRED' semantics.
|
Transaction |
beginTransaction(TxIsolation isolation)
Start a transaction additionally specifying the isolation level.
|
Transaction |
beginTransaction(TxScope scope)
Start a transaction typically specifying REQUIRES_NEW or REQUIRED semantics.
|
void |
commitTransaction()
Commit the current transaction.
|
CallableSql |
createCallableSql(String callableSql)
Create a CallableSql to execute a given stored procedure.
|
<T> CsvReader<T> |
createCsvReader(Class<T> beanType)
Create a CsvReader for a given beanType.
|
<T> T |
createEntityBean(Class<T> type)
Create a new instance of T that is an EntityBean.
|
<T> Query<T> |
createNamedQuery(Class<T> beanType,
String namedQuery)
Create a named query.
|
<T> Query<T> |
createQuery(Class<T> beanType)
Create a query for an entity bean and synonym for
find(Class) . |
<T> Query<T> |
createQuery(Class<T> beanType,
String eql)
Parse the Ebean query language statement returning the query which can then
be modified (add expressions, change order by clause, change maxRows, change
fetch and select paths etc).
|
SqlQuery |
createSqlQuery(String sql)
Create a SqlQuery for executing native sql
query statements.
|
SqlUpdate |
createSqlUpdate(String sql)
Create a sql update for executing native dml statements.
|
Transaction |
createTransaction()
Create a new transaction that is not held in TransactionThreadLocal.
|
Transaction |
createTransaction(TxIsolation isolation)
Create a new transaction additionally specifying the isolation level.
|
<T> Update<T> |
createUpdate(Class<T> beanType,
String ormUpdate)
Create a orm update where you will supply the insert/update or delete
statement (rather than using a named one that is already defined using the
@NamedUpdates annotation).
|
Transaction |
currentTransaction()
Returns the current transaction or null if there is no current transaction in scope.
|
int |
delete(Class<?> beanType,
Object id)
Delete the bean given its type and id.
|
int |
delete(Class<?> beanType,
Object id,
Transaction transaction)
Delete the bean given its type and id with an explicit transaction.
|
boolean |
delete(Object bean)
Delete the bean.
|
boolean |
delete(Object bean,
Transaction transaction)
Delete the bean with an explicit transaction.
|
<T> int |
delete(Query<T> query,
Transaction transaction)
Execute as a delete query deleting the 'root level' beans that match the predicates
in the query.
|
int |
deleteAll(Class<?> beanType,
Collection<?> ids)
Delete several beans given their type and id values.
|
int |
deleteAll(Class<?> beanType,
Collection<?> ids,
Transaction transaction)
Delete several beans given their type and id values with an explicit transaction.
|
int |
deleteAll(Collection<?> beans)
Delete all the beans in the collection.
|
int |
deleteAll(Collection<?> beans,
Transaction transaction)
Delete all the beans in the collection using an explicit transaction.
|
int |
deleteAllPermanent(Class<?> beanType,
Collection<?> ids)
Delete permanent for several beans given their type and id values.
|
int |
deleteAllPermanent(Class<?> beanType,
Collection<?> ids,
Transaction transaction)
Delete permanent for several beans given their type and id values with an explicit transaction.
|
int |
deleteAllPermanent(Collection<?> beans)
Delete all the beans in the collection permanently without soft delete.
|
int |
deleteAllPermanent(Collection<?> beans,
Transaction transaction)
Delete all the beans in the collection permanently without soft delete using an explicit transaction.
|
int |
deletePermanent(Class<?> beanType,
Object id)
Delete permanent given the bean type and id.
|
int |
deletePermanent(Class<?> beanType,
Object id,
Transaction transaction)
Delete permanent given the bean type and id with an explicit transaction.
|
boolean |
deletePermanent(Object bean)
Delete a bean permanently without soft delete.
|
boolean |
deletePermanent(Object bean,
Transaction transaction)
Delete a bean permanently without soft delete using an explicit transaction.
|
Map<String,ValuePair> |
diff(Object newBean,
Object oldBean)
Return a map of the differences between two objects of the same type.
|
DocumentStore |
docStore()
Return the Document store.
|
<T> T |
draftRestore(Class<T> beanType,
Object id)
Restore the draft bean back to the live state.
|
<T> T |
draftRestore(Class<T> beanType,
Object id,
Transaction transaction)
Restore the draft bean back to the live state.
|
<T> List<T> |
draftRestore(Query<T> query)
Restore the draft beans matching the query back to the live state.
|
<T> List<T> |
draftRestore(Query<T> query,
Transaction transaction)
Restore the draft beans matching the query back to the live state.
|
void |
endTransaction()
If the current transaction has already been committed do nothing otherwise
rollback the transaction.
|
int |
execute(CallableSql callableSql)
For making calls to stored procedures.
|
int |
execute(CallableSql callableSql,
Transaction transaction)
Execute explicitly passing a transaction.
|
int |
execute(SqlUpdate sqlUpdate)
Execute a Sql Update Delete or Insert statement.
|
int |
execute(SqlUpdate updSql,
Transaction transaction)
Execute explicitly passing a transaction.
|
<T> T |
execute(TxCallable<T> callable)
Execute a TxCallable in a Transaction with the default scope.
|
void |
execute(TxRunnable runnable)
Execute a TxRunnable in a Transaction with the default scope.
|
<T> T |
execute(TxScope scope,
TxCallable<T> callable)
Execute a TxCallable in a Transaction with an explicit scope.
|
void |
execute(TxScope scope,
TxRunnable runnable)
Execute a TxRunnable in a Transaction with an explicit scope.
|
int |
execute(Update<?> update)
Execute a ORM insert update or delete statement using the current
transaction.
|
int |
execute(Update<?> update,
Transaction transaction)
Execute a ORM insert update or delete statement with an explicit
transaction.
|
void |
externalModification(String tableName,
boolean inserted,
boolean updated,
boolean deleted)
Inform Ebean that tables have been modified externally.
|
<T> Filter<T> |
filter(Class<T> beanType)
Create a filter for sorting and filtering lists of entities locally without
going back to the database.
|
<T> Query<T> |
find(Class<T> beanType)
Create a query for a type of entity bean.
|
<T> T |
find(Class<T> beanType,
Object id)
Find a bean using its unique id.
|
<T> T |
find(Class<T> beanType,
Object id,
Transaction transaction)
Find a entity bean with an explicit transaction.
|
<T> int |
findCount(Query<T> query,
Transaction transaction)
Return the number of 'top level' or 'root' entities this query should return.
|
<T> void |
findEach(Query<T> query,
QueryEachConsumer<T> consumer,
Transaction transaction)
Execute the query visiting the each bean one at a time.
|
void |
findEach(SqlQuery query,
QueryEachConsumer<SqlRow> consumer,
Transaction transaction)
Execute the SqlQuery iterating a row at a time.
|
<T> void |
findEachWhile(Query<T> query,
QueryEachWhileConsumer<T> consumer,
Transaction transaction)
Execute the query visiting the each bean one at a time.
|
void |
findEachWhile(SqlQuery query,
QueryEachWhileConsumer<SqlRow> consumer,
Transaction transaction)
Execute the SqlQuery iterating a row at a time with the ability to stop consuming part way through.
|
<T> FutureRowCount<T> |
findFutureCount(Query<T> query,
Transaction transaction)
Execute find row count query in a background thread.
|
<T> FutureIds<T> |
findFutureIds(Query<T> query,
Transaction transaction)
Execute find Id's query in a background thread.
|
<T> FutureList<T> |
findFutureList(Query<T> query,
Transaction transaction)
Execute find list query in a background thread returning a FutureList object.
|
<A> List<A> |
findIds(Query<?> query,
Transaction transaction)
Return the Id values of the query as a List.
|
<T> QueryIterator<T> |
findIterate(Query<T> query,
Transaction transaction)
Return a QueryIterator for the query.
|
<T> List<T> |
findList(Query<T> query,
Transaction transaction)
Execute a query returning a list of beans.
|
List<SqlRow> |
findList(SqlQuery query,
Transaction transaction)
Execute the sql query returning a list of MapBean.
|
<K,T> Map<K,T> |
findMap(Query<T> query,
Transaction transaction)
Execute the query returning the entity beans in a Map.
|
<T> PagedList<T> |
findPagedList(Query<T> query,
Transaction transaction)
Return a PagedList for this query using firstRow and maxRows.
|
<T> Set<T> |
findSet(Query<T> query,
Transaction transaction)
Execute the query returning a set of entity beans.
|
<A> List<A> |
findSingleAttributeList(Query<?> query,
Transaction transaction)
Execute the query returning a list of values for a single property.
|
<T> T |
findUnique(Query<T> query,
Transaction transaction)
Execute the query returning at most one entity bean or null (if no matching
bean is found).
|
SqlRow |
findUnique(SqlQuery query,
Transaction transaction)
Execute the sql query returning a single MapBean or null.
|
<T> List<Version<T>> |
findVersions(Query<T> query,
Transaction transaction)
Return versions of a @History entity bean.
|
AutoTune |
getAutoTune()
Return AutoTune which is used to control the AutoTune service at runtime.
|
BackgroundExecutor |
getBackgroundExecutor()
Return the BackgroundExecutor service for asynchronous processing of
queries.
|
Object |
getBeanId(Object bean)
Return the value of the Id property for a given bean.
|
BeanState |
getBeanState(Object bean)
Return the BeanState for a given entity bean.
|
ExpressionFactory |
getExpressionFactory()
Return the ExpressionFactory for this server.
|
MetaInfoManager |
getMetaInfoManager()
Return the MetaInfoManager which is used to get meta data from the EbeanServer
such as query execution statistics.
|
String |
getName()
Return the name.
|
SpiServer |
getPluginApi()
Return the extended API intended for use by plugins.
|
<T> T |
getReference(Class<T> beanType,
Object id)
Get a reference object.
|
ServerCacheManager |
getServerCacheManager()
Return the manager of the server cache ("L2" cache).
|
void |
insert(Object bean)
Insert the bean.
|
void |
insert(Object bean,
Transaction transaction)
Insert the bean with a transaction.
|
void |
insertAll(Collection<?> beans)
Insert a collection of beans.
|
void |
insertAll(Collection<?> beans,
Transaction transaction)
Insert a collection of beans with an explicit transaction.
|
JsonContext |
json()
Return the JsonContext for reading/writing JSON.
|
void |
markAsDirty(Object bean)
Marks the entity bean as dirty.
|
Object |
nextId(Class<?> beanType)
Return the next unique identity value for a given bean type.
|
<T> T |
publish(Class<T> beanType,
Object id)
Publish a single bean given its type and id returning the resulting live bean.
|
<T> T |
publish(Class<T> beanType,
Object id,
Transaction transaction)
Publish a single bean given its type and id returning the resulting live bean.
|
<T> List<T> |
publish(Query<T> query)
Publish the beans that match the query returning the resulting published beans.
|
<T> List<T> |
publish(Query<T> query,
Transaction transaction)
Publish the beans that match the query returning the resulting published beans.
|
void |
refresh(Object bean)
Refresh the values of a bean.
|
void |
refreshMany(Object bean,
String propertyName)
Refresh a many property of an entity bean.
|
void |
register(TransactionCallback transactionCallback)
Register a TransactionCallback on the currently active transaction.
|
void |
rollbackTransaction()
Rollback the current transaction.
|
void |
save(Object bean)
Either Insert or Update the bean depending on its state.
|
void |
save(Object bean,
Transaction transaction)
Insert or update a bean with an explicit transaction.
|
int |
saveAll(Collection<?> beans)
Save all the beans in the collection.
|
int |
saveAll(Collection<?> beans,
Transaction transaction)
Save all the beans in the collection with an explicit transaction.
|
Object |
setBeanId(Object bean,
Object id)
Set the Id value onto the bean converting the type of the id value if necessary.
|
void |
shutdown(boolean shutdownDataSource,
boolean deregisterDriver)
Shutdown the EbeanServer programmatically.
|
<T> void |
sort(List<T> list,
String sortByClause)
Sort the list in memory using the sortByClause which can contain a comma delimited
list of property names and keywords asc, desc, nullsHigh and nullsLow.
|
<T> UpdateQuery<T> |
update(Class<T> beanType)
Create an Update query to perform a bulk update.
|
void |
update(Object bean)
Saves the bean using an update.
|
void |
update(Object bean,
Transaction transaction)
Update a bean additionally specifying a transaction.
|
void |
update(Object bean,
Transaction transaction,
boolean deleteMissingChildren)
Update a bean additionally specifying a transaction and the deleteMissingChildren setting.
|
<T> int |
update(Query<T> query,
Transaction transaction)
Execute the update query returning the number of rows updated.
|
void |
updateAll(Collection<?> beans)
Update a collection of beans.
|
void |
updateAll(Collection<?> beans,
Transaction transaction)
Update a collection of beans with an explicit transaction.
|
<T> Set<String> |
validateQuery(Query<T> query)
Returns the set of properties/paths that are unknown (do not map to known properties or paths).
|
void shutdown(boolean shutdownDataSource, boolean deregisterDriver)
This method is not normally required. Ebean registers a shutdown hook and shuts down cleanly.
If the under underlying DataSource is the Ebean implementation then you also have the option of shutting down the DataSource and deregistering the JDBC driver.
shutdownDataSource
- if true then shutdown the underlying DataSource if it is the EbeanORM
DataSource implementation.deregisterDriver
- if true then deregister the JDBC driver if it is the EbeanORM
DataSource implementation.AutoTune getAutoTune()
String getName()
Ebean.getServer(String)
to get a
EbeanServer that was registered with the Ebean singleton.ExpressionFactory getExpressionFactory()
MetaInfoManager getMetaInfoManager()
SpiServer getPluginApi()
BeanState getBeanState(Object bean)
This will return null if the bean is not an enhanced entity bean.
Object setBeanId(Object bean, Object id)
For example, if the id value passed in is a String but ought to be a Long or UUID etc then it will automatically be converted.
bean
- The entity bean to set the id value on.id
- The id value to set.Map<String,ValuePair> diff(Object newBean, Object oldBean)
When null is passed in for b, then the 'OldValues' of a is used for the difference comparison.
<T> T createEntityBean(Class<T> type)
Useful if you use BeanPostConstructListeners or @PostConstruct Annotations. In this case you should not use "new Bean...()". Making all bean construtors protected could be a good idea here.
<T> CsvReader<T> createCsvReader(Class<T> beanType)
<T> UpdateQuery<T> update(Class<T> beanType)
int rows = ebeanServer
.update(Customer.class)
.set("status", Customer.Status.ACTIVE)
.set("updtime", new Timestamp(System.currentTimeMillis()))
.where()
.gt("id", 1000)
.update();
T
- The type of entity beanbeanType
- The type of entity bean to update<T> Query<T> createNamedQuery(Class<T> beanType, String namedQuery)
For RawSql the named query is expected to be in ebean.xml.
T
- The type of entity beanbeanType
- The type of entity beannamedQuery
- The name of the query<T> Query<T> createQuery(Class<T> beanType)
find(Class)
.find(Class)
<T> Query<T> createQuery(Class<T> beanType, String eql)
// Find order additionally fetching the customer, details and details.product name.
String eql = "fetch customer fetch details fetch details.product (name) where id = :orderId ";
Query<Order> query = Ebean.createQuery(Order.class, eql);
query.setParameter("orderId", 2);
Order order = query.findUnique();
// This is the same as:
Order order = Ebean.find(Order.class)
.fetch("customer")
.fetch("details")
.fetch("detail.product", "name")
.setId(2)
.findUnique();
T
- The type of the entity beanbeanType
- The type of bean to fetcheql
- The Ebean query<T> Query<T> find(Class<T> beanType)
You can use the methods on the Query object to specify fetch paths, predicates, order by, limits etc.
You then use findList(), findSet(), findMap() and findUnique() to execute the query and return the collection or bean.
Note that a query executed by Query.findList()
Query.findSet()
etc will execute against the same EbeanServer from
which is was created.
// Find order 2 specifying explicitly the parts of the object graph to
// eagerly fetch. In this case eagerly fetch the associated customer,
// details and details.product.name
Order order = ebeanServer.find(Order.class)
.fetch("customer")
.fetch("details")
.fetch("detail.product", "name")
.setId(2)
.findUnique();
// find some new orders ... with firstRow/maxRows
List<Order> orders =
ebeanServer.find(Order.class)
.where().eq("status", Order.Status.NEW)
.setFirstRow(20)
.setMaxRows(10)
.findList();
Object nextId(Class<?> beanType)
This will only work when a IdGenerator is on the bean such as for beans that use a DB sequence or UUID.
For DB's supporting getGeneratedKeys and sequences such as Oracle10 you do not need to use this method generally. It is made available for more complex cases where it is useful to get an ID prior to some processing.
<T> Filter<T> filter(Class<T> beanType)
This produces and returns a new list with the sort and filters applied.
Refer to Filter
for an example of its use.
<T> void sort(List<T> list, String sortByClause)
If you leave off any keywords the defaults are ascending order and treating nulls as high values.
Note that the sorting uses a Comparator and Collections.sort(); and does not invoke a DB query.
// find orders and their customers
List<Order> list = ebeanServer.find(Order.class)
.fetch("customer")
.orderBy("id")
.findList();
// sort by customer name ascending, then by order shipDate
// ... then by the order status descending
ebeanServer.sort(list, "customer.name, shipDate, status desc");
// sort by customer name descending (with nulls low)
// ... then by the order id
ebeanServer.sort(list, "customer.name desc nullsLow, id");
list
- the list of entity beanssortByClause
- the properties to sort the list by<T> Update<T> createUpdate(Class<T> beanType, String ormUpdate)
The orm update differs from the sql update in that it you can use the bean name and bean property names rather than table and column names.
An example:
// The bean name and properties - "topic","postCount" and "id"
// will be converted into their associated table and column names
String updStatement = "update topic set postCount = :pc where id = :id";
Update<Topic> update = ebeanServer.createUpdate(Topic.class, updStatement);
update.set("pc", 9);
update.set("id", 3);
int rows = update.execute();
System.out.println("rows updated:" + rows);
SqlQuery createSqlQuery(String sql)
Note that you can use raw SQL with entity beans, refer to the SqlSelect annotation for examples.
SqlUpdate createSqlUpdate(String sql)
Use this to execute a Insert Update or Delete statement. The statement will be native to the database and contain database table and column names.
See SqlUpdate
for example usage.
CallableSql createCallableSql(String callableSql)
void register(TransactionCallback transactionCallback) throws javax.persistence.PersistenceException
transactionCallback
- The transaction callback to be registered with the current transaction.javax.persistence.PersistenceException
- If there is no currently active transactionTransaction createTransaction()
You will want to do this if you want multiple Transactions in a single thread or generally use transactions outside of the TransactionThreadLocal management.
Transaction createTransaction(TxIsolation isolation)
Note that this transaction is NOT stored in a thread local.
Transaction beginTransaction()
With REQUIRED semantics if an active transaction already exists that transaction will be used.
The transaction is stored in a ThreadLocal variable and typically you only need to use the returned Transaction IF you wish to do things like use batch mode, change the transaction isolation level, use savepoints or log comments to the transaction log.
Example of using a transaction to span multiple calls to find(), save() etc.
// start a transaction (stored in a ThreadLocal)
ebeanServer.beginTransaction();
try {
Order order = ebeanServer.find(Order.class,10);
ebeanServer.save(order);
ebeanServer.commitTransaction();
} finally {
// rollback if we didn't commit
// i.e. an exception occurred before commitTransaction().
ebeanServer.endTransaction();
}
Transaction txn = ebeanServer.beginTransaction();
try {
// explicitly turn on/off JDBC batch use
txn.setBatchMode(true);
txn.setBatchSize(50);
// control flushing when mixing save and queries
txn.setBatchFlushOnQuery(false);
// turn off persist cascade if needed
txn.setPersistCascade(false);
// for large batch insert processing when we do not
// ... need the generatedKeys, don't get them
txn.setBatchGetGeneratedKeys(false);
// explicitly flush the JDBC batch buffer
txn.flushBatch();
...
txn.commit();
} finally {
// rollback if necessary
txn.end();
}
If you want to externalise the transaction management then you use createTransaction() and pass the transaction around to the various methods on EbeanServer yourself.
Transaction beginTransaction(TxIsolation isolation)
Transaction beginTransaction(TxScope scope)
Note that this provides an try finally alternative to using execute(TxScope, TxCallable)
or
execute(TxScope, TxRunnable)
.
// Start a new transaction. If there is a current transaction
// suspend it until this transaction ends
Transaction txn = server.beginTransaction(TxScope.requiresNew());
try {
...
// commit the transaction
txn.commit();
} finally {
// end this transaction which:
// A) will rollback transaction if it has not been committed already
// B) will restore a previously suspended transaction
txn.end();
}
// start a new transaction if there is not a current transaction
Transaction txn = server.beginTransaction(TxScope.required());
try {
...
// commit the transaction if it was created or
// do nothing if there was already a current transaction
txn.commit();
} finally {
// end this transaction which will rollback the transaction
// if it was created for this try finally scope and has not
// already been committed
txn.end();
}
Transaction currentTransaction()
void commitTransaction()
void rollbackTransaction()
void endTransaction()
Useful to put in a finally block to ensure the transaction is ended, rather than a rollbackTransaction() in each catch block.

Query<Order> query = ebeanServer.find(Order.class)
.setId(1)
.fetch("customer")
.fetch("customer.shippingAddress")
.fetch("details")
.query();
// fetch associated products but only fetch their product id and name
query.fetch("details.product", "name");
Order order = query.findUnique();
// traverse the object graph...
Customer customer = order.getCustomer();
Address shippingAddress = customer.getShippingAddress();
List<OrderDetail> details = order.getDetails();
OrderDetail detail0 = details.get(0);
Product product = detail0.getProduct();
String productName = product.getName();
beanType
- the type of entity bean to fetchid
- the id value<T> T getReference(Class<T> beanType, Object id)
This will not perform a query against the database unless some property other that the id property is accessed.
It is most commonly used to set a 'foreign key' on another bean like:
Product product = ebeanServer.getReference(Product.class, 1);
OrderDetail orderDetail = new OrderDetail();
// set the product 'foreign key'
orderDetail.setProduct(product);
orderDetail.setQuantity(42);
...
ebeanServer.save(orderDetail);
Product product = ebeanServer.getReference(Product.class, 1);
// You can get the id without causing a fetch/lazy load
Long productId = product.getId();
// If you try to get any other property a fetch/lazy loading will occur
// This will cause a query to execute...
String name = product.getName();
beanType
- the type of entity beanid
- the id value<T> int findCount(Query<T> query, Transaction transaction)
Query.findCount()
,
Query.findFutureCount()
<A> List<A> findIds(Query<?> query, Transaction transaction)
Query.findIds()
<T> QueryIterator<T> findIterate(Query<T> query, Transaction transaction)
Generally using findEach(Query, QueryEachConsumer, Transaction)
or
findEachWhile(Query, QueryEachWhileConsumer, Transaction)
is preferred
to findIterate(). The reason is that those methods automatically take care of
closing the queryIterator (and the underlying jdbc statement and resultSet).
This is similar to findEach in that not all the result beans need to be held in memory at the same time and as such is good for processing large queries.
<T> void findEach(Query<T> query, QueryEachConsumer<T> consumer, Transaction transaction)
Unlike findList() this is suitable for processing a query that will return a very large resultSet. The reason is that not all the result beans need to be held in memory at the same time and instead processed one at a time.
Internally this query using a PersistenceContext scoped to each bean (and the beans associated object graph).
ebeanServer.find(Order.class)
.where().eq("status", Order.Status.NEW)
.order().asc("id")
.findEach((Order order) -> {
// do something with the order bean
System.out.println(" -- processing order ... " + order);
});
<T> void findEachWhile(Query<T> query, QueryEachWhileConsumer<T> consumer, Transaction transaction)
Compared to findEach() this provides the ability to stop processing the query results early by returning false for the QueryEachWhileConsumer.
Unlike findList() this is suitable for processing a query that will return a very large resultSet. The reason is that not all the result beans need to be held in memory at the same time and instead processed one at a time.
Internally this query using a PersistenceContext scoped to each bean (and the beans associated object graph).
ebeanServer.find(Order.class)
.where().eq("status", Order.Status.NEW)
.order().asc("id")
.findEachWhile((Order order) -> {
// do something with the order bean
System.out.println(" -- processing order ... " + order);
boolean carryOnProcessing = ...
return carryOnProcessing;
});
<T> List<Version<T>> findVersions(Query<T> query, Transaction transaction)
Generally this query is expected to be a find by id or unique predicates query. It will execute the query against the history returning the versions of the bean.
<T> List<T> findList(Query<T> query, Transaction transaction)
Generally you are able to use Query.findList()
rather than
explicitly calling this method. You could use this method if you wish to
explicitly control the transaction used for the query.
List<Customer> customers =
ebeanServer.find(Customer.class)
.where().ilike("name", "rob%")
.findList();
T
- the type of entity bean to fetch.query
- the query to execute.transaction
- the transaction to use (can be null).Query.findList()
<T> FutureRowCount<T> findFutureCount(Query<T> query, Transaction transaction)
This returns a Future object which can be used to cancel, check the execution status (isDone etc) and get the value (with or without a timeout).
query
- the query to execute the row count ontransaction
- the transaction (can be null).Query.findFutureCount()
<T> FutureIds<T> findFutureIds(Query<T> query, Transaction transaction)
This returns a Future object which can be used to cancel, check the execution status (isDone etc) and get the value (with or without a timeout).
query
- the query to execute the fetch Id's ontransaction
- the transaction (can be null).Query.findFutureIds()
<T> FutureList<T> findFutureList(Query<T> query, Transaction transaction)
This returns a Future object which can be used to cancel, check the execution status (isDone etc) and get the value (with or without a timeout).
This query will execute in it's own PersistenceContext and using its own transaction. What that means is that it will not share any bean instances with other queries.
query
- the query to execute in the backgroundtransaction
- the transaction (can be null).Query.findFutureList()
<T> PagedList<T> findPagedList(Query<T> query, Transaction transaction)
The benefit of using this over findList() is that it provides functionality to get the total row count etc.
If maxRows is not set on the query prior to calling findPagedList() then a PersistenceException is thrown.
PagedList<Order> pagedList = Ebean.find(Order.class)
.setFirstRow(50)
.setMaxRows(20)
.findPagedList();
// fetch the total row count in the background
pagedList.loadRowCount();
List<Order> orders = pagedList.getList();
int totalRowCount = pagedList.getTotalRowCount();
Query.findPagedList()
<T> Set<T> findSet(Query<T> query, Transaction transaction)
Generally you are able to use Query.findSet()
rather than
explicitly calling this method. You could use this method if you wish to
explicitly control the transaction used for the query.
Set<Customer> customers =
ebeanServer.find(Customer.class)
.where().ilike("name", "rob%")
.findSet();
T
- the type of entity bean to fetch.query
- the query to executetransaction
- the transaction to use (can be null).Query.findSet()
<K,T> Map<K,T> findMap(Query<T> query, Transaction transaction)
Generally you are able to use Query.findMap()
rather than
explicitly calling this method. You could use this method if you wish to
explicitly control the transaction used for the query.
T
- the type of entity bean to fetch.query
- the query to execute.transaction
- the transaction to use (can be null).Query.findMap()
<A> List<A> findSingleAttributeList(Query<?> query, Transaction transaction)
List<String> names =
Ebean.find(Customer.class)
.select("name")
.orderBy().asc("name")
.findSingleAttributeList();
List<String> names =
Ebean.find(Customer.class)
.setDistinct(true)
.select("name")
.where().eq("status", Customer.Status.NEW)
.orderBy().asc("name")
.setMaxRows(100)
.findSingleAttributeList();
Query.findSingleAttributeList()
@Nullable <T> T findUnique(Query<T> query, Transaction transaction)
This will throw a NonUniqueResultException if the query finds more than one result.
Generally you are able to use Query.findUnique()
rather than
explicitly calling this method. You could use this method if you wish to
explicitly control the transaction used for the query.
T
- the type of entity bean to fetch.query
- the query to execute.transaction
- the transaction to use (can be null).javax.persistence.NonUniqueResultException
- if more than one result was foundQuery.findUnique()
<T> int delete(Query<T> query, Transaction transaction)
Note that if the query includes joins then the generated delete statement may not be optimal depending on the database platform.
T
- the type of entity bean to fetch.query
- the query used for the deletetransaction
- the transaction to use (can be null)<T> int update(Query<T> query, Transaction transaction)
The update query must be created using update(Class)
.
T
- the type of entity beanquery
- the update query to executetransaction
- the optional transaction to use for the update (can be null)List<SqlRow> findList(SqlQuery query, Transaction transaction)
Generally you are able to use SqlQuery.findList()
rather than
explicitly calling this method. You could use this method if you wish to
explicitly control the transaction used for the query.
query
- the query to execute.transaction
- the transaction to use (can be null).SqlQuery.findList()
void findEach(SqlQuery query, QueryEachConsumer<SqlRow> consumer, Transaction transaction)
This streaming type query is useful for large query execution as only 1 row needs to be held in memory.
void findEachWhile(SqlQuery query, QueryEachWhileConsumer<SqlRow> consumer, Transaction transaction)
Returning false after processing a row stops the iteration through the query results.
This streaming type query is useful for large query execution as only 1 row needs to be held in memory.
@Nullable SqlRow findUnique(SqlQuery query, Transaction transaction)
This will throw a PersistenceException if the query found more than one result.
Generally you are able to use SqlQuery.findUnique()
rather than
explicitly calling this method. You could use this method if you wish to
explicitly control the transaction used for the query.
query
- the query to execute.transaction
- the transaction to use (can be null).SqlQuery.findUnique()
void save(Object bean) throws javax.persistence.OptimisticLockException
If there is no current transaction one will be created and committed for you automatically.
Save can cascade along relationships. For this to happen you need to specify a cascade of CascadeType.ALL or CascadeType.PERSIST on the OneToMany, OneToOne or ManyToMany annotation.
In this example below the details property has a CascadeType.ALL set so saving an order will also save all its details.
public class Order { ...
@OneToMany(cascade=CascadeType.ALL, mappedBy="order")
List<OrderDetail> details;
...
}
When a save cascades via a OneToMany or ManyToMany Ebean will automatically set the 'parent' object to the 'detail' object. In the example below in saving the order and cascade saving the order details the 'parent' order will be set against each order detail when it is saved.
javax.persistence.OptimisticLockException
int saveAll(Collection<?> beans) throws javax.persistence.OptimisticLockException
javax.persistence.OptimisticLockException
boolean delete(Object bean) throws javax.persistence.OptimisticLockException
This will return true if the bean was deleted successfully or JDBC batch is being used.
If there is no current transaction one will be created and committed for you automatically.
If the Bean does not have a version property (or loaded version property) and the bean does not exist then this returns false indicating that nothing was deleted. Note that, if JDBC batch mode is used then this always returns true.
javax.persistence.OptimisticLockException
boolean delete(Object bean, Transaction transaction) throws javax.persistence.OptimisticLockException
This will return true if the bean was deleted successfully or JDBC batch is being used.
If the Bean does not have a version property (or loaded version property) and the bean does not exist then this returns false indicating that nothing was deleted. However, if JDBC batch mode is used then this always returns true.
javax.persistence.OptimisticLockException
boolean deletePermanent(Object bean) throws javax.persistence.OptimisticLockException
javax.persistence.OptimisticLockException
boolean deletePermanent(Object bean, Transaction transaction) throws javax.persistence.OptimisticLockException
javax.persistence.OptimisticLockException
int deleteAllPermanent(Collection<?> beans) throws javax.persistence.OptimisticLockException
javax.persistence.OptimisticLockException
int deleteAllPermanent(Collection<?> beans, Transaction transaction) throws javax.persistence.OptimisticLockException
javax.persistence.OptimisticLockException
int delete(Class<?> beanType, Object id, Transaction transaction)
int deletePermanent(Class<?> beanType, Object id)
int deletePermanent(Class<?> beanType, Object id, Transaction transaction)
int deleteAll(Collection<?> beans) throws javax.persistence.OptimisticLockException
javax.persistence.OptimisticLockException
int deleteAll(Collection<?> beans, Transaction transaction) throws javax.persistence.OptimisticLockException
javax.persistence.OptimisticLockException
int deleteAll(Class<?> beanType, Collection<?> ids)
int deleteAll(Class<?> beanType, Collection<?> ids, Transaction transaction)
int deleteAllPermanent(Class<?> beanType, Collection<?> ids)
int deleteAllPermanent(Class<?> beanType, Collection<?> ids, Transaction transaction)
int execute(SqlUpdate sqlUpdate)
If you wish to execute a Sql Select natively then you should use the FindByNativeSql object.
Note that the table modification information is automatically deduced and you do not need to call the Ebean.externalModification() method when you use this method.
Example:
// example that uses 'named' parameters
String s = "UPDATE f_topic set post_count = :count where id = :id"
SqlUpdate update = ebeanServer.createSqlUpdate(s);
update.setParameter("id", 1);
update.setParameter("count", 50);
int modifiedCount = ebeanServer.execute(update);
String msg = "There where " + modifiedCount + "rows updated";
sqlUpdate
- the update sql potentially with bind valuesCallableSql
int execute(Update<?> update)
This returns the number of rows that where inserted, updated or deleted.
int execute(Update<?> update, Transaction transaction)
int execute(CallableSql callableSql)
Example:
String sql = "{call sp_order_modify(?,?,?)}";
CallableSql cs = ebeanServer.createCallableSql(sql);
cs.setParameter(1, 27);
cs.setParameter(2, "SHIPPED");
cs.registerOut(3, Types.INTEGER);
ebeanServer.execute(cs);
// read the out parameter
Integer returnValue = (Integer) cs.getObject(3);
CallableSql
,
Ebean.execute(SqlUpdate)
void externalModification(String tableName, boolean inserted, boolean updated, boolean deleted)
If you use ebeanServer.execute(UpdateSql) then the table modification information is automatically deduced and you do not need to call this method yourself.
This information is used to invalidate objects out of the cache and potentially text indexes. This information is also automatically broadcast across the cluster.
If there is a transaction then this information is placed into the current transactions event information. When the transaction is committed this information is registered (with the transaction manager). If this transaction is rolled back then none of the transaction event information registers including the information you put in via this method.
If there is NO current transaction when you call this method then this information is registered immediately (with the transaction manager).
tableName
- the name of the table that was modifiedinserted
- true if rows where inserted into the tableupdated
- true if rows on the table where updateddeleted
- true if rows on the table where deleted<T> T find(Class<T> beanType, Object id, Transaction transaction)
T
- the type of entity bean to findbeanType
- the type of entity bean to findid
- the bean id valuetransaction
- the transaction to use (can be null)void save(Object bean, Transaction transaction) throws javax.persistence.OptimisticLockException
javax.persistence.OptimisticLockException
int saveAll(Collection<?> beans, Transaction transaction) throws javax.persistence.OptimisticLockException
javax.persistence.OptimisticLockException
void markAsDirty(Object bean)
This is used so that when a bean that is otherwise unmodified is updated the version property is updated.
An unmodified bean that is saved or updated is normally skipped and this marks the bean as dirty so that it is not skipped.
Customer customer = ebeanServer.find(Customer, id);
// mark the bean as dirty so that a save() or update() will
// increment the version property
ebeanServer.markAsDirty(customer);
ebeanServer.save(customer);
void update(Object bean) throws javax.persistence.OptimisticLockException
Stateless updates: Note that the bean does not have to be previously fetched to call update().You can create a new instance and set some of its properties programmatically for via JSON/XML marshalling etc. This is described as a 'stateless update'.
Optimistic Locking: Note that if the version property is not set when update() is called then no optimistic locking is performed (internally ConcurrencyMode.NONE is used).
ServerConfig.setUpdatesDeleteMissingChildren(boolean)
: When cascade saving to a
OneToMany or ManyToMany the updatesDeleteMissingChildren setting controls if any other children
that are in the database but are not in the collection are deleted.
ServerConfig.setUpdateChangesOnly(boolean)
: The updateChangesOnly setting
controls if only the changed properties are included in the update or if all the loaded
properties are included instead.
// A 'stateless update' example
Customer customer = new Customer();
customer.setId(7);
customer.setName("ModifiedNameNoOCC");
ebeanServer.update(customer);
javax.persistence.OptimisticLockException
ServerConfig.setUpdatesDeleteMissingChildren(boolean)
,
ServerConfig.setUpdateChangesOnly(boolean)
void update(Object bean, Transaction transaction) throws javax.persistence.OptimisticLockException
javax.persistence.OptimisticLockException
void update(Object bean, Transaction transaction, boolean deleteMissingChildren) throws javax.persistence.OptimisticLockException
bean
- the bean to updatetransaction
- the transaction to use (can be null).deleteMissingChildren
- specify false if you do not want 'missing children' of a OneToMany
or ManyToMany to be automatically deleted.javax.persistence.OptimisticLockException
void updateAll(Collection<?> beans) throws javax.persistence.OptimisticLockException
javax.persistence.OptimisticLockException
void updateAll(Collection<?> beans, Transaction transaction) throws javax.persistence.OptimisticLockException
javax.persistence.OptimisticLockException
void insert(Object bean)
Compared to save() this forces bean to perform an insert rather than trying to decide based on the bean state. As such this is useful when you fetch beans from one database and want to insert them into another database (and you want to explicitly insert them).
void insert(Object bean, Transaction transaction)
void insertAll(Collection<?> beans)
void insertAll(Collection<?> beans, Transaction transaction)
int execute(SqlUpdate updSql, Transaction transaction)
int execute(CallableSql callableSql, Transaction transaction)
void execute(TxScope scope, TxRunnable runnable)
The scope can control the transaction type, isolation and rollback semantics.
// set specific transactional scope settings
TxScope scope = TxScope.requiresNew().setIsolation(TxIsolation.SERIALIZABLE);
ebeanServer.execute(scope, new TxRunnable() {
public void run() {
User u1 = Ebean.find(User.class, 1);
...
}
});
void execute(TxRunnable runnable)
The default scope runs with REQUIRED and by default will rollback on any exception (checked or runtime).
ebeanServer.execute(new TxRunnable() {
public void run() {
User u1 = ebeanServer.find(User.class, 1);
User u2 = ebeanServer.find(User.class, 2);
u1.setName("u1 mod");
u2.setName("u2 mod");
ebeanServer.save(u1);
ebeanServer.save(u2);
}
});
<T> T execute(TxScope scope, TxCallable<T> callable)
The scope can control the transaction type, isolation and rollback semantics.
// set specific transactional scope settings
TxScope scope = TxScope.requiresNew().setIsolation(TxIsolation.SERIALIZABLE);
ebeanServer.execute(scope, new TxCallable<String>() {
public String call() {
User u1 = ebeanServer.find(User.class, 1);
...
return u1.getEmail();
}
});
<T> T execute(TxCallable<T> callable)
The default scope runs with REQUIRED and by default will rollback on any exception (checked or runtime).
This is basically the same as TxRunnable except that it returns an Object (and you specify the return type via generics).
ebeanServer.execute(new TxCallable<String>() {
public String call() {
User u1 = ebeanServer.find(User.class, 1);
User u2 = ebeanServer.find(User.class, 2);
u1.setName("u1 mod");
u2.setName("u2 mod");
ebeanServer.save(u1);
ebeanServer.save(u2);
return u1.getEmail();
}
});
ServerCacheManager getServerCacheManager()
BackgroundExecutor getBackgroundExecutor()
JsonContext json()
This instance is safe to be used concurrently by multiple threads and this method is cheap to call.
JsonContext json = ebeanServer.json();
String jsonOutput = json.toJson(list);
System.out.println(jsonOutput);
// specify just the properties we want
PathProperties paths = PathProperties.parse("name, status, anniversary");
List<Customer> customers =
ebeanServer.find(Customer.class)
// apply those paths to the query (only fetch what we need)
.apply(paths)
.where().ilike("name", "rob%")
.findList();
// ... get the json
JsonContext jsonContext = ebeanServer.json();
String json = jsonContext.toJson(customers, paths);
FetchPath
,
Query.apply(FetchPath)
DocumentStore docStore()
<T> T publish(Class<T> beanType, Object id, Transaction transaction)
The values are published from the draft to the live bean.
T
- the type of the entity beanbeanType
- the type of the entity beanid
- the id of the entity beantransaction
- the transaction the publish process should use (can be null)<T> T publish(Class<T> beanType, Object id)
The values are published from the draft to the live bean.
T
- the type of the entity beanbeanType
- the type of the entity beanid
- the id of the entity bean<T> List<T> publish(Query<T> query, Transaction transaction)
The values are published from the draft beans to the live beans.
T
- the type of the entity beanquery
- the query used to select the draft beans to publishtransaction
- the transaction the publish process should use (can be null)<T> List<T> publish(Query<T> query)
The values are published from the draft beans to the live beans.
T
- the type of the entity beanquery
- the query used to select the draft beans to publish<T> T draftRestore(Class<T> beanType, Object id, Transaction transaction)
The values from the live beans are set back to the draft bean and the
@DraftDirty
and @DraftReset
properties are reset.
T
- the type of the entity beanbeanType
- the type of the entity beanid
- the id of the entity bean to restoretransaction
- the transaction the restore process should use (can be null)<T> T draftRestore(Class<T> beanType, Object id)
The values from the live beans are set back to the draft bean and the
@DraftDirty
and @DraftReset
properties are reset.
T
- the type of the entity beanbeanType
- the type of the entity beanid
- the id of the entity bean to restore<T> List<T> draftRestore(Query<T> query, Transaction transaction)
The values from the live beans are set back to the draft bean and the
@DraftDirty
and @DraftReset
properties are reset.
T
- the type of the entity beanquery
- the query used to select the draft beans to restoretransaction
- the transaction the restore process should use (can be null)<T> List<T> draftRestore(Query<T> query)
The values from the live beans are set back to the draft bean and the
@DraftDirty
and @DraftReset
properties are reset.
T
- the type of the entity beanquery
- the query used to select the draft beans to restore<T> Set<String> validateQuery(Query<T> query)
Validate the query checking the where and orderBy expression paths to confirm if they represent valid properties/path for the given bean type.
Copyright © 2016. All rights reserved.


In Pictures: Jose Mourinho's illustrious managerial career Jose Mourinho is back in management after replacing Mauricio Pochettino as Tottenham head coach. 20 Nov 2019, 12:04 Here, we take a look at his managerial career in pictures. Jose Mourinho's Porto beat Celtic to win the UEFA Cup in 2003 (Maurice McDonald/PA) Mourinho celebrates as Porto stun Manchester United in the 2004 Champions League at Old Trafford (Martin Rickett/PA) After Porto's shock Champions League success, Jose Mourinho was named the new Chelsea boss in 2004 (Andrew Parsons/PA) Mourinho holds up his first silverware as Chelsea boss following a Carling Cup final win over Liverpool (Rebecca Naden/PA) Mourinho's first season ends with Chelsea lifting their first league title in 50 years (Rebecca Naden/PA) Chelsea retained the title the following season (Sean Dempsey/PA) Mourinho tries to keep the peace during Chelsea's League Cup final win over Arsenal in 2007 (Nick Potts/PA) European success continued to elude Mourinho at Stamford Bridge as Chelsea lose to Liverpool in the Champions League semi-finals (Nick Potts/PA) Mourinho tells Chelsea fans to keep their chins up after missing out on the Premier League title to Manchester United (Sean Dempsey/PA) But Mourinho responds by leading his side to FA Cup success over Manchester United (Martin Rickett/PA) Mourinho left Chelsea by mutual consent in September 2007 (Andrew Stuart/PA) Mourinho heads to Inter Milan where, in his second season, a Champions League final win over Bayern Munich secures the treble (Martin Rickett/PA) A spell at Real Madrid included a LaLiga title and a win over Manchester United in Sir Alex Ferguson's last Champions League tie (Martin Rickett/PA) After departing Madrid, Mourinho returned to Chelsea (John Walton/PA) During a trophyless season, Mourinho gave a reminder of his tactical skills with a 2-0 win at Anfield that cost Liverpool the Premier League title (Peter Byrne/PA) Mourinho led Chelsea to League Cup success in 2015 (Nick Potts/PA) Chelsea made it a double by winning the Premier League (Daniel Hambury/PA) After a miserable start to the season, Mourinho was sacked in December 2015 (Steve Parsons/PA) Mourinho was hired as Manchester United's manager in May 2016 (Tim Goode/PA) Silverware soon followed as United won the 2017 EFL Cup (Nick Potts/PA) United won the Europa League as well in 2017, but it would prove the last trophy of Mourinho's spell (Nick Potts/PA) Mourinho's United finished a distant second to Pep Guardiola's Manchester City in the 2017-18 Premier League (Martin Rickett/PA) Mourinho consoles his players after losing the 2018 FA Cup final to Chelsea (David Davies/PA) Mourinho had a reported fallout with Paul Pogba (Martin Rickett/PA) Mourinho was sacked after a Premier League defeat at Liverpool (Peter Byrne/PA) body check tags ::


Show how many characters remaining in a HTML with pure JavaScript
With maxChars property defined:
maxChars
Without maxChars, the default value is 140:


Please ensure that Nuxeo is authorized to access Salesforce via the pop-up.
If you do not see the pop-up please check to see if your browser is blocking it.
An error occured.


Bill DeBlasio Cheers Donald Trump's Move to Florida
New York City Mayor Bill de Blasio cheered the news Thursday that President Donald Trump has decided to move his permanent residence to Florida.
by Charlie Spiering“Don’t let the door hit you on the way out or whatever,” he wrote on Twitter. “Our deepest condolences to the good people of Florida as Trump attempts to outrun his past (and near future)”:
Trump announced Thursday night that he and first lady Melania will leave New York City and make their permanent home in Florida.
New York Gov. Andrew Cuomo also signaled that he is happy to see Trump go.
“Good riddance,” he wrote on Twitter. “He’s all yours, Florida”:
By moving to Palm Beach, Florida, the Trumps will escape the combined New York State and New York City income tax of 12.7 percent. Their assets will also be free of a 16 percent New York estate tax on assets more than $5.75 million, according to Forbes.
The president and first lady will remain in the White House as long as Trump is president.
“I cherish New York, and the people of New York, and always will,” Trump said, pointing out he was badly mistreated by state and local officials despite paying millions in taxes every year.
“Few have been treated worse,” he continued. “I hated having to make this decision, but in the end it will be best for all concerned.”
Trump was born and raised in New York City, where he made a name for himself as a developer and a celebrity.
“As President, I will always be there to help New York and the great people of New York,” Trump said. “It will always have a special place in my heart!” he added:


More Website khalistan @ TemplateMonster.com - november,30 2017!
Emphasis
A room where everything gets equal importance will seem either scattered or boring. You need an anchor. Architectural spaces often have points of interest such as a fireplace or a window with a beautiful view. You can choose to enhance the built in focal point by arranging furniture around it to emphasize it. In a room that lacks such a built in point of interest you can create one through groupings of furniture or using an unusual or large piece.
Proportion and Scale
Proportion is the ratio between the size of one part to another, and scale is how the size of one object relates to another or to the space in which it is placed. For instance, a large overstuffed sectional in a small room will be out of scale.
Some proportional relationships are more pleasing than others. The ancient Greeks came up with the Golden Section, which sought to reduce all proportion to a simple formula: The ratio of the smaller section to the larger section should be the same as that of the larger section to the whole. This proportion is present in nature, and artists and architects have used it as well.

Tricks
1. Paint
Though painting is the cheapest investment you can make, it's also the one with the most dramatic result. Go ahead and put some color on those walls for a fresh — and inexpensive — new look.
2. Do It Yourself
The biggest budget buster is hiring others to do things you could do. Consider what you'll save by taking on some relatively simple projects: painting, tiling, installing a new floor, sewing curtain panels or throw pillows — whatever you feel up to trying.
3. Call in Family and Friends
You may not have a wad of cash or a lot of home-improvement know-how, but you have other resources that can help get your decorating project off the ground: the people you know. Call on a group of relatives, friends and neighbors who can supply the muscle to rip down wall paneling, roll on paint or assemble a room of flat-packed furniture. Just don't forget to feed them lunch.
4. Shop Secondhand Stores
Thrift stores, consignment shops, church rummage sales, online auction sites, estate sales and even salvage yards offer a bounty of discount decorating booty. Look for furniture with solid construction and classic lines that new upholstery or paint will bring back to life.
About us
We are just students of KPU and this is something releated to our lessons hope you liked our project.
Our Mission
Is to share some ideas , tricks,and designers names to make you design you home more beautifuly.


--------------------
HAS_ACCOUNT - Requests for whether iconex has any icon wallet.
> Result :
--------------------
HAS_ADDRESS - Requests for whether iconex has the icon wallet with specific address.
ICX Address :
> Result :
--------------------
ADDRESS - Requests for the address to use for service.
> Selected ICX Address :
--------------------
JSON-RPC - Requests for calling standard ICON JSON-RPC API.
* User confirmation is required.
Param Data:
> Result :
--------------------
Signing - Request for only signing tx hash. (User confirmation is always required.)
Tx Hash :
> Signature :


The Work of
.Steve
Branches: This was a simple project testing out branches in GitHub.
HTML
CSS
My First Week: A recap of all the things I learned at my first week at Epicodus
HTML
CSS
A Cool Place to Go: This project was about familiarizing ourselves with Bootstrap using floats, blockquotes, and the Jumbotron
HTML
CSS
Bootstrap
Adoption: A page about adopting adorable kittens.
HTML
CSS
Favorite Band: A page about the Foo Fighters. This project helped us learn about sidebars and floate, bringing together multiple skills we've learned from previous lesson and utilizing them all together.
HTML
CSS
Vacation: This was an early project showcasing images and text arranged together.
HTML
You've seen the work, now meet the man.
.Steve Facts
- Got his Bachelor's degree in Fine Arts, used it to work on a movie for Parmount Pictures
- Thinks cats are better than dogs
- Loves rock climbing and 3D printing
- Fell off a mountain once
- Likes to play all kinds of games with friends
- Is a Rock-Paper-Scissors Champion
Created by .Steve.
Github While using this site, you have agreed to be excellent to your fellow humans. Copyright 2020. All rights reserved.


Service Hub
Something short and leading about the collection below—its contents, the creator, etc. Make it short and sweet, but not too short so folks don’t simply skip over it entirely.
Find a ServiceTitle
This is a wider card with supporting text below as a natural lead-in to additional content. This content is a little bit longer.
Title
This is a wider card with supporting text below as a natural lead-in to additional content. This content is a little bit longer.
Title
This is a wider card with supporting text below as a natural lead-in to additional content. This content is a little bit longer.
Title
This is a wider card with supporting text below as a natural lead-in to additional content. This content is a little bit longer.
Title
This is a wider card with supporting text below as a natural lead-in to additional content. This content is a little bit longer.
Title
This is a wider card with supporting text below as a natural lead-in to additional content. This content is a little bit longer.
Title
This is a wider card with supporting text below as a natural lead-in to additional content. This content is a little bit longer.
Title
This is a wider card with supporting text below as a natural lead-in to additional content. This content is a little bit longer.
Title
This is a wider card with supporting text below as a natural lead-in to additional content. This content is a little bit longer.


Sweet Free Stuff
///////////////////////////////////////////
Free Subscription to Taste of Home Magazine
Posted: 28 Mar 2016 04:58 AM PDT
http://feedproxy.google.com/&edburner&utm_medium=email
Free Subscription to Taste of Home Magazine
The post Free Subscription to Taste of Home Magazine appeared first on
SweetFreeStuff.com.
CommentsI love this magazine by Barbara ElledgeI like taste of home, got
lots of recipes by Deb swift
///////////////////////////////////////////
Free River Brain Sticker
Posted: 28 Mar 2016 03:32 AM PDT
http://feedproxy.google.com/&edburner&utm_medium=email
Free River Brain Sticker
The post Free River Brain Sticker appeared first on SweetFreeStuff.com.
///////////////////////////////////////////
Free Knockerball Sticker
Posted: 28 Mar 2016 02:34 AM PDT
http://feedproxy.google.com/&edburner&utm_medium=email
Opt-in to receive the latest Knockerball updates and other goodies!  Free Knockerball Sticker
The post Free Knockerball Sticker appeared first on SweetFreeStuff.com.
///////////////////////////////////////////
Free PaintballRuinedMyLife.com Stickers
Posted: 28 Mar 2016 02:27 AM PDT
http://feedproxy.google.com/&edburner&utm_medium=email
Free PaintballRuinedMyLife.com Stickers
The post Free PaintballRuinedMyLife.com Stickers appeared first on
SweetFreeStuff.com.
///////////////////////////////////////////
Free Sample of Dove Dry Oil Moisture Nourishing Body Wash for Rite Aid
Shoppers
Posted: 27 Mar 2016 12:49 PM PDT
http://feedproxy.google.com/&edburner&utm_medium=email
You need a My wellness+Plenti card number to get the offer. Free Sample of
Dove Dry Oil Moisture Nourishing Body Wash for Rite Aid Shoppers
The post Free Sample of Dove Dry Oil Moisture Nourishing Body Wash for Rite
Aid Shoppers appeared first on SweetFreeStuff.com.
CommentsLove dove by Jamie TaylorThank you very much, I have very dry skin
and cant find … by Candy


There is something very odd going on in the orchard. At night, after sunset, there is a curious hubbub. It is the sound of talking fruit. Hanging from their branches, the orchard fruits chatter away in the darkness. Each has a characteristic tone. The apples are shrill, the pears engage in tirades, the persimmons mutter. All the fruits talk constantly and simultaneously, so it is extremely difficult to decipher a word any of them is saying, even if we understood their languages.
Are any of them listening to each other, or are they just babbling, incoherently, oblivious to their fellow fruits? Why do they wait to speak until nightfall? Why are the fallen fruits silent? Why does nobody come to gather the fallen fruits from the orchard floor? Why are they left to rot?
It is the most curious of orchards, over there beyond the railway track and the viaduct, surrounded by thick thorny hedges in which no bird will nest.


miRNAs miRNA miR expression target banana genes microRNAs plant targets {border-style Forward: Plant families sequences Metabolism PCR factor px;} #ffffff;} Zhang miR, sequence stem-loop predicted protein GSS/HN Table conserved identified potential using Putative family important Musa Transcription prime EST Identification RT-primer analysis fruit transcription used species Computational Wang development different expressed identification level levels Fig flowers, mature tissues RNA Reverse: gene leaves, miRNAs, microRNA order px; role stress {font-family ./s--- Arabidopsis GSS Liu Oryza Using banana. computational data font-size known miRBase prediction protein, qRT-PCR relative reported roots, targeted targets. (No. Bartel Cell Cell, GAMYB Hainan Pan Tropical development, double; flower highest plants primers registered response secondary study, (GSMUA_AchrT_) Acids National Prediction Res., Science Signal anther belonging border-color border-width consistent grants including indicates involved located lowest mac-miR miR/ miR/, miRNAs. miRa, number pairs patterns performed play previously reverse showed solid; structure study various {font-style {font-weight ./j.-...x ./journal.pone..t Analysis Anderson Biol., Chen China Davey EST/FF EST/FL F-box Foundation Glycine Guo JYW Natural Nucl. Province Target acuminata axis based bold chloroplastic citrus containing courier; em; energy folding free genes, genome hairpin length lower members metabolism methods miRd, newly plants. pt;} range regulation respectively, results rice roles sativa sequencing shown small synthase total transduction


Azure DevOps setup
This document explains how to setup Renovate for use on Azure DevOps.
Setting up a new pipeline
Create a brand new pipeline within Azure DevOps, and select your source:
Then select your repository.
Within Configure your pipeline select: Starter pipeline
Replace all content in the starter pipeline with:
schedules:
- cron: '0 3 * * *'
displayName: 'Every day at 3am'
branches:
include: [main]
trigger: none
pool:
vmImage: ubuntu-latest
steps:
- task: npmAuthenticate@0
inputs:
workingFile: .npmrc
- bash: |
git config --global user.email<EMAIL_ADDRESS>git config --global user.name 'Renovate Bot'
npx --userconfig .npmrc renovate
env:
TOKEN: $(System.AccessToken)
Create a .npmrc file
Create a .npmrc
file in your repository:
registry=https://pkgs.dev.azure.com/YOUR-ORG/_packaging/YOUR-FEED/npm/registry/
always-auth=true
For the registry
key, replace YOUR-ORG
with your Azure DevOps organization and YOUR-FEED
with your Azure Artifacts feed.
Create a config.js file
Create a config.js
file in your repository:
module.exports = {
platform: 'azure',
endpoint: 'https://dev.azure.com/YOUR-ORG/',
token: process.env.TOKEN,
hostRules: [
{
hostType: 'npm',
matchHost: 'pkgs.dev.azure.com',
username: 'apikey',
password: process.env.TOKEN,
},
],
repositories: ['YOUR-PROJECT/YOUR-REPO'],
};
For the endpoint
key, replace YOUR-ORG
with your Azure DevOps organization.
For the repositories
key, replace YOUR-PROJECT/YOUR-REPO
with your Azure DevOps project and repository.
Yarn users
To do a succesfull yarn install
you need to match the URL of the registry fully.
Use the matchHost
config option to specify the full path to the registry.
module.exports = {
platform: 'azure',
endpoint: 'https://myorg.visualstudio.com/',
token: process.env.TOKEN,
hostRules: [
{
matchHost:
'https://myorg.pkgs.visualstudio.com/_packaging/myorg/npm/registry/',
token: process.env.TOKEN,
hostType: 'npm',
},
{
matchHost: 'github.com',
token: process.env.GITHUB_COM_TOKEN,
},
],
repositories: ['YOUR-PROJECT/YOUR-REPO'],
};
Put this in your repository's .npmrc
file:
registry=https://myorg.pkgs.visualstudio.com/_packaging/myorg/npm/registry/
always-auth=true
Add renovate.json file
Additionally, you can create a renovate.json
file which holds the Renovate configuration, in the root of the repo.
Read more about the Renovate configuration options
Using a single pipeline to update multiple repositories
If you want to use a single Renovate pipeline to update multiple repositories you must take the following steps.
Add the names of the repositories to config.js
.
Make sure that the "Project Collection Build Service (YOUR-PROJECT)" user has the following permissions on the repositories:
- Contribute
- Contribute to pull requests
- Create branch


In 1999 I began taking 10mg of Paxil per day, just before bedtime, to treat depression. Within a few days I began seeing a visual motion blur of high contrast objects for a few minutes after waking each morning (I call them 'trailers'). I often paint my nails with intentionally intense colors so that I can virtually paint the ceiling with the smearing effect that I see from my moving fingertips. I also enjoy watching birds streak through the sky.
A few minutes after waking the effect completely disappears only to return the next morning. During 1999 I gradually increased my dosage to 40mg per day, and the effect continued every morning. In early 2000 I ceased taking Paxil, and the 'trailer' effect disappeared by the time withdrawl symptoms ended.
I returned to Paxil in late 2000, and as soon as I began taking 10mg per day the morning trailers resumed. I presently take 30mg per day, just before bed, and see the motion blurred 'trailer' effect every morning.
Experience Reports are the writings and opinions of the individual authors who submit them.
Some of the activities described are dangerous and/or illegal and none are recommended by Erowid.


jsWorkflow - a jsPlumb based Workflow API
Workflow Demo 3
: No States and no Transitions (create a dynamic workflow)
Add a new State


Try out our Premium Member services: Virtual Legal Assistant, Query Alert Service and an ad-free experience. Free for one month and pay only if you like it.
BEFORE THE NATIONAL GREEN TRIBUNAL (PRINCIPAL BENCH), NEW DELHI APPEAL No. 65/2012 Wednesday, 6th February, 2013 Quorum: 1. Hon'ble Shri Justice V.R. Kingaonkar (Judicial Member) 2. Hon'ble Shri P.S. Rao (Expert Member) 3. Hon'ble Shri Dr. P.C. Mishra (Expert Member) 4. Hon'ble Shri Ranjan Chatterjee (Expert Member) 5. Hon'ble Shri Bikram Singh Sajwan (Expert Member) B E T W E E N: M/s. Gujarat Eco Textile Park Limited, Village Baleshwar-Palsana NH-8, Besides Decent Hotel, Ta: Palsana, District: Surat, Gujarat. ... Appellant/ Petitioner AND 1. Ministry of Environment and Forests, Through its Secretary, Paryavaran Bhavan, CGO Complex, New Delhi. 2. The Expert Appraisal Committee Building Construction, Coastal Regulation Zone, Miscellaneous Project Infrastructure Development and Amendments, Lodhi Road, New Delhi. ... Respondents1
(Advocate appeared: Mr. Bhadrish S. Raju for appellant and none appeared for the Respondents) (ORAL JUDGEMENT) This appeal arises out of decision rendered in the 115th meeting of the Expert Appraisal Committee (EAC, for short) on 16th / 17th August, 2012 and subsequent follow up action. By the impugned decision, the Appellant was denied permission to accept membership of the industrial units which are operating outside the Gujarat Eco Textile Park for treatment of the effluents generated from their units.
2. M/s. Gujarat Eco Textile Park Ltd. (the Appellant) obtained necessary consent to establish and the required permission to operate Common Effluent Treatment Plant (CETP, for short). Gujarat Pollution Control Board (GPCB for short) also granted permission to amend consent to establish on 21st April, 2009. It is not necessary to elaborately state all the relevant facts in as much as the Respondents have not filed their counter. Nor they have appeared in the matter. The averments in the Appeal Memo are not traversed by the Respondents. There is no dispute about the fact that the Appellant has capacity to deal with the treatment of effluents upto 100 MLD. There is also no dispute about the fact that the capacity is not being fully utilized by the Appellant. The units which are located within the Gujarat Eco Textile Park of the Appellant are the members thereof. Considered together, even if the effluents of such 2 members are allowed to be treated in the CETP, the capacity of the plant will be utilized only upto 35 MLD. Thus, the Appellant has additional capacity of the treatment of balance 65 MLD in the plant. The Appellant, therefore, sought to accept membership of the other units located outside the Gujarat Eco Textile Park. It appears that such other units consented to become members of the Appellant's plant for the purpose of treatment of the effluents released from such units. Those units are mostly of dyeing and printing of clothes. It appears that the Appellant, therefore, requested to allow the units located outside the park to become members of the CETP for the purpose of treatment of effluents, discharged by them for common treatment.
3. Perusal of the impugned decision made in the minutes of 115th meeting of the EAC would show that the EAC declined to accept the proposal only on the ground that the industrial units located outside the park are already members of the other CETP, which was under construction and therefore the amendment sought by the Appellant could not be accepted. The only reason assigned by the Committee (EAC) is as follows:-
" The Committee noted since the industrial units located outside the Park are already members of the other CETP under construction decided to change its earlier recommendation and in view of the above and opinion of the GPCB, the committee recommended not 3 to amend the EC of CETP to take effluent outside the Industrial Park."
4. The Learned Counsel for the Appellant points out that previously the amendment sought by the Appellant was recommended by the EAC in its 98th meeting dated 3rd and 4th March, 2011. It appears that EAC came to the conclusion that the proposed amendment would not result in any increase in discharge of quantity of effluents and therefore shall not result in additional environmental burden, rather it would result in environmental amelioration as the amendment shall ensure discharge of only treated effluents in Khadi (creek/channel) and therefore it leads in improvement in quality of Khadi water. The learned counsel further points out that there is no rationale in denial of the amendment sought by the appellant in as much as the refusal is on the ground which is unconnected with any environment issue. It appears that those industrial units located outside the park, have now filed affidavits in order to show that EC is not required for their units. The record further shows that the appellant agreed to the condition that it will not undertake any additional burden in excess of the capacity i.e. 100 MLD. The Counsel would submit that if any additional burden is accepted by the appellant, the respondents may take appropriate action in view of the legal provisions made under the Water (Prevention and Control of Pollution) Act, 1974.
5. The only question to be determined in this appeal is: Whether the impugned decision is legal and proper?
4
6. We have gone through the record. We have given our anxious consideration to the submissions of Learned Counsel for the appellant. As stated before, there is no denial of the averments made in the appeal memo. The respondents have not placed on record any tangible material to show that the refusal to amend the EC is justified because of any adverse environmental impact. On the contrary, the EAC itself had recommended the amendment on earlier occasion because the amendment sought by the appellant could have positive environmental impact. For that matter, the effluents of the units located outside the park, would get appropriate treatment in the park of the Appellant. There was therefore, no plausible reason for deviation after reaching such a conclusion. The subsequent decision of the EAC was totally without consideration of the Environmental benefits. The fact that the units located outside the park were attached to some other CETP, could not be the consideration for denial of the amendment to the EC. The appraisal by the EAC is therefore on faulty grounds. As a matter of fact, the EAC reviewed its own previous decision vide the impugned decision. We are of the opinion that the impugned decision is arbitrary and without any substantial reason as such. In any case, the denial of the amendment is not on the ground of any adverse impact on the environment. Considering the reasons discussed herein above, we are of the opinion that the impugned decision will have to be set aside. 5
7. It is worthy to note that subsequently the proponent of the CETP, located outside the Park and who initially objected, the grant of EC to the appellant's CETP, withdrew his objection. The new members having units located outside the park of the Appellant have filed their affidavits to show that their units need not have ECs due to the small scale activities like dyeing and printing of clothes taken up by them. In fact, the treatment of the effluents released from such plants would be beneficial to the environment.
8. The net result of the foregoing conclusion is that the impugned decision is unsustainable in the eye of law and will have to be quashed. Hence the impugned decision is quashed and the respondents are directed to allow the amendment to the EC as sought by the appellant. The respondents may put required conditions while granting amended E.C. The Appeal is accordingly allowed. No costs.
............................................., JM (V. R. Kingaonkar) ............................................., EM (P.S. Rao) ............................................., EM (Dr. P.C. Mishra) ............................................, EM (Ranjan Chatterjee) ............................................, EM (Bikram Singh Sajwan) 6


What's Your Function?
August 29, 2015
Dear past self: I'm gonna teach you about functional programming. It sounds scary, I know. That's because it is. Well, at first. But remember, we fear what we don't understand. It'll get better, I promise.
There are two basic concepts you have to know when dealing with functional programs:
- Data must be immutable (unchanging). Instead of changing existing data, you just create a new data structure with the updated data.
- Programs should be without ‘memory’ of the past. So each time the program runs should be like the first time. Feel like the very first time.
Still sound scary? Shhh shhh, it's ok... After the initial learning pains, it won't hurt you. It's there to help! How, you ask? And is it worth it? Well...good questions. It can make your programs easier to understand and faster. Instead of looping (like going through a list of items and doing the same thing to each), functional programming is more like making a list of items where a function is being used on each. Ah...ok, that just confused both you and me more. Um...ok, usually, fucntional programming involves using other functions to help define the main function--sometimes even using the main function inside itself. (What!) It's like breaking up chunks of your code that work towards a similar task and giving them their own name.
Also, functional programming doesn't have side effects. Take this, for example:
function () {
console.log("Hello, world!")
};
That print
statement? That there's a side effect. Let's take a look at code without any.
function hello () {
greet = console.log("Hello, world!")
return greet
};
Now that there's a functional program! You see? Well...maybe not. Ok, so in second program, we're describing what we want done rather than executing or carrying it out. Just keep practicing, past self. This helped, but practice is the only way you'll really get it.


trend_plot.Rd
Simple function to show trend in percent (y_var) between different years
(x_var) using geom_smooth
.
trend_plot( df, x_var, y_var, y_breaks = 5, y_lim = c(54.9, 65.1), x_breaks = 5, y_lab = "Procent kvinnor", x_lab = "år", title = NULL, subtitle = NULL, title_size = 14, subtitle_size = 12, line_color = "#377EB8", line_size = 1, point_size = 1, background_color = "moccasin", panel_grid_color = "grey", panel_grid_size = 0.3, axis_size = 0.3, axis_text_angle = 0, text_size = 8, percent_accuracy = 1 )
| df | Data frame. |
|---|---|
| x_var, y_var | X and Y variable. |
| y_breaks | Length between each break on y-axis. |
| y_lim | Limit on y-axis. |
| x_breaks | Length between each break on x-axis. |
| x_lab, y_lab | X and Y-axis labels, use NULL for no label. |
| title | Plot title, NULL for no title. |
| subtitle | Small text under title, NULL for no subtitle. |
| title_size | Text size of title in pt. |
| subtitle_size | Text size of subtitle in pt. |
| line_color | Color of the line. |
| line_size | Size of the line. |
| point_size | Size of the points. |
| background_color | Color of the panel background. |
| panel_grid_color | Color of the panel grid lines. |
| panel_grid_size | Size of the panel grid lines in plot and contour lines around bars, useful to change if large dpi! |
| axis_size | Size of the axis lines. |
| axis_text_angle | Angle of the tick texts, 45 is recommended for many x levels. |
| text_size | Size of the text in pt. |
| percent_accuracy | Set accuracy for |
ggplot object containg trend plot.
# Creating data df <- data.frame(year = 2000:2017, prob = rnorm(18, 0.5, 0.02)) # Trend trend_plot(df, 'year', 'prob', y_breaks = 2, y_lim = range(df$prob) * 100)#>


--- layout: post title: 'Long Service? It was in! ' date: '2013-04-09T15:37:00.000-04:00' author: Bob Sica tags: - Image modified_time: '2013-08-01T16:06:03.648-04:00' blogger_id: tag:blogger.com,1999:blog-4599947215754335931.post-8296960142250235513 blogger_orig_url: http://blog.bobsica.com/2013/04/long-service-it-was-in.html ---


execline
Software
skarnet.org
The withstdinas program
withstdinas reads the entirety of its standard input in an
environment variable, and runs another program with that additional
environment variable.
Interface
In an execlineb script:
withstdinas [ -i | -D default ] [ -n ] variable prog...
- withstdinas reads its stdin until EOF.
- It then execs into prog..., with
variable added to the environment; the value of
variable is what was read on stdin.
Options
- -i : insist. If the data on stdin is invalid as
an environment variable, for instance if it contains a null
character, withstdinas exits 1.
- -D default : default value.
If the data on stdin is invalid, default is used as
variable's value. If neither the -i nor the -D
option have been given, withstdinas execs into
prog... with variable containing whatever value could be read on stdin,
cut before the first null character.
- -n : chomp an ending newline off stdin.
Notes
- You can start prog... with "import -u variable"
to perform variable substitution.


This is an R implementation of Fast and Scalable Learning of Sparse Changes in High-Dimensional Gaussian Graphical Model Structure (DIFFEE). The DIFFEE algorithm can be used to fast estimate the differential network between two related datasets. For instance, it can identify differential gene network from datasets of case and control. By performing data-driven network inference from two high-dimensional data sets, this tool can help users effectively translate two aggregated data blocks into knowledge of the changes among entities between two Gaussian Graphical Model. Please run demo(diffeeDemo) to learn the basic functions provided by this package. For further details, please read the original paper: Beilun Wang, Arshdeep Sekhon, Yanjun Qi (2018) <arXiv:1710.11223>.
| Version: | 1.1.0 |
| Depends: | R (≥ 3.0.0), igraph, pcaPP |
| Published: | 2018-07-03 |
| Author: | Beilun Wang [aut, cre], Yanjun Qi [aut], Zhaoyang Wang [aut] |
| Maintainer: | Beilun Wang <bw4mw at virginia.edu> |
| BugReports: | https://github.com/QData/DIFFEE |
| License: | GPL-2 |
| URL: | https://github.com/QData/DIFFEE |
| NeedsCompilation: | no |
| CRAN checks: | diffee results |
| Reference manual: | diffee.pdf |
| Package source: | diffee_1.1.0.tar.gz |
| Windows binaries: | r-devel: diffee_1.1.0.zip, r-release: diffee_1.1.0.zip, r-oldrel: diffee_1.1.0.zip |
| OS X binaries: | r-release: diffee_1.1.0.tgz, r-oldrel: diffee_1.1.0.tgz |
| Old sources: | diffee archive |
Please use the canonical form https://CRAN.R-project.org/package=diffee to link to this page.


http://www.speakers-podium.com/susangranger.
Susan Granger's review of "INSTINCT" (Touchstone Pictures)
Violence has become a negative catch-word recently, so it's refreshing to see how the concept is explored in this psychological thriller, based on Daniel Quinn's book "Ismael." Anthony Hopkins plays a highly respected primatologist who has been jailed for killing two Rwandan rangers and injuring others after choosing to live in the wild with mountain gorillas for nearly two years. Held captive in an overcrowded maximum security prison for the criminally insane, he is interrogated by a bright, ambitious psychiatrist, Cuba Gooding Jr., who is eager to understand the mysterious truth behind the scientist's actions in anticipation of writing a best-seller. While simplistic, Gerald DiPego's script is intelligent and thoughtful, delving into the concepts of illusion and freedom, combined with the lust for domination and control, ultimately dividing people into "givers" and "takers." Director Jon Turtletaub ("Phenomenon") integrates the brutal reality of prison life with memories of what transpired in Africa to motivate Hopkins' violent behavior. The challenging, combative chemistry between Anthony Hopkins and Cuba Gooding Jr. is palpable, escalating the tension level, which is already elevated by the hostile sadism of the prison's guards and warden. But a subplot involving Maura Tierney as Hopkins' daughter never jells, and the conclusion is cloyingly melodramatic. Arguably the most versatile and talented actor on the screen today, Anthony Hopkins evokes a volatile power and fury reminiscent of Hannibal Lechter in "The Silence of the Lambs," while Cuba Gooding Jr. displays a forceful, bruising intensity. And special-effects wizard Stan Winston works wonders with the gorillas. On the Granger Movie Gauge, "Instinct" is a compelling 7, commanding attention from start to finish.
The review above was posted to the
rec.arts.movies.reviews newsgroup (de.rec.film.kritiken for German reviews).
The Internet Movie Database accepts no responsibility for the contents of the
review and has no editorial control. Unless stated otherwise, the copyright
belongs to the author.
Please direct comments/criticisms of the review to relevant newsgroups.
Broken URLs inthe reviews are the responsibility of the author.
The formatting of the review is likely to differ from the original due
to ASCII to HTML conversion.
Related links: index of all rec.arts.movies.reviews reviews


DASC Bank App V10!!
** Generally speaking for viewing or deleting specific customers or accounts you WILL NEED to know the id in advance.
Oddities that we haven't quite figured out
- customerId in the accounts hashmap is a double rather than a long. Tried changing it across the board, seemed to work, but then customerID stopped existing in the
accounts hashmap
- Deleting a customer currently doesn't delete associated accounts. It probably should?
An account can be tied to a user as follows:
- When you start up there are four customers - ids 1 -> 4, basically the four of us.
- For any newly added ones you could get these by viewing all Customers or All Accounts in advance and taking a note of same.
- Click view customer by id and enter the ID num in the resultant form.
- You'll then see a crude row with the name / address and two form buttons - first one will delete the customer, BUT the second one will add an account (of no type as yet) to that customer.
- See that the Customer ID is passed to the form... this would more likely be a hidden field, but it WORKS!
- Chen wrote some code on getting account Balance - NOTE you need the Account Number field to return the balance, not the account ID


--- layout: post title: Mobiles for content creation date: 2004-09-22 00:00:00 category: mobile ---
"I believe mobile content creators need to start considering the phone as both a consumption and creation platform, not just a POS terminal."
Spot on. Rather than seeing mobile as just another way of getting people to consume, we need to encourage participation. We've gone through this on the web - look at blogging, P2P, Flickr...


|
Week |
Tue Lecture |
Tue/Thur Labs |
Thur Lecture |
Sun HW Due |
|
1 (1/27) |
Introduction Lecture videos: Other videos: Reading: Difference between Bioinformatics and Computational Biology Levels of Bioinformatics Research
|
Odyssey, LINUX, R markdown, BioConductor Lab slides: https://github.com/stat115/Lab_2020/tree/master/Lab01 Lab videos: R/bash Other videos:
|
NGS and Read mapping Lecture videos: Other videos: |
|
|
2 (2/3) |
RNA-seq read mapping, Quantification, Normalization Lecture videos: Other videos: |
Lab slides: https://github.com/stat115/Lab_2020/tree/master/Lab02 Lab videos: Odyssey/BWA/STAR Other Videos: |
Differential expression, FDR, GO Lecture videos: Other videos: |
(UNIX, Python, and R) |
|
3 (2/10) |
GSEA, Clustering Lecture videos: K-means Clustering Consensus Clustering Other videos:
|
RNA-seq QC, PCA, Batch Effects, Gene Set Enrichment Lab videos: Other videos: |
Unsupervised learning, Dimension reduction, Batch effect removal Lecture videos: Other videos:
|
|
|
4 (2/17) |
Classification, Machine learning |
Pseudoalignment, more Batch Effects, RNA-seq metrics Lab videos: Other videos: |
Single-cell RNA-seq Lecture videos: Other videos: |
(RNA-Seq) |
|
5 (2/24) |
Module I Review Lecture videos: scRNA-seq Batch Effect Removal |
Seurat, Supervised learning Lab videos: Lab slides https://github.com/stat115/Lab_2020/tree/master/Lab05 Other videos: Please see the final page of lab slides |
[On Module II page] |
|


Examines the internals of an QDOS Archive database file.
I wrote this utility to assist me in tracking down just how corrupted, an archive database file in my possession, actually was. As it turned out, very!
Much has been written about the internals of a database file, but much has been incorrect it seems!
The file is in 6 separate sections, as follows:
| File Header |
| Data Area |
| Index Table |
| Free Space Table |
| Gap |
| Structure Table |
The file header is 20 bytes in size and holds a number of values which correspond to the sizes of various internal tables.
| Offset | Length | Usage |
|---|---|---|
|
|
Control record length ($14). |
|
|
File Id: 'vrm1dbf0' for QL or OPD. |
|
|
Size of the data area + control area |
|
|
Size of the Index table |
|
|
Size of the Free Space table |
|
|
Size of the structure table |
In theory, the data area should start at the end of the header, it does. There is always the first byte of data at offset 20 into the file.
The size of the data area includes the size of the header, and together this makes up the starting address of the index table.
The size of the index table, when added to the start of itself, gives the start of the Free Space Table.
However, when the size of the Free Space Table is added to the start address of itself, we do not get the start of the Structure Table, we get an address that is exactly 20 bytes short! This is what I call The Gap. To get at the start of the Structure Table, we need to add an extra 20 bytes.
We shall use the following as an example - it is taken from a real (uncorrupted) database file. All sizes are in decimal.
| Offset | Length | Usage |
|---|---|---|
|
1914 | Size of the data area + control area |
|
|
Size of the Index table |
|
|
Size of the Free Space table |
|
|
Size of the structure table |
So, we expect to see the following start addresses for the various tables:
| AREA | Calculation | Offset |
|---|---|---|
| Header |
|
0 |
| Data Area |
|
20 |
| Index Table |
|
1914 |
| Free Space Table |
|
2384 |
| Structure Table |
|
2466 |
What we really see is as follows:
| AREA | Calculation | Offset |
|---|---|---|
| Header |
|
0 |
| Data Area |
|
20 |
| Index Table |
|
1914 |
| Free Space Table |
|
2384 |
| THE GAP |
|
2466** |
| Structure Table |
|
2486 |
So, the currently accepted documents appear to be incorrect, and that spare 20 bytes caused me no end of grief I can tell you!
The data area starts at address 20, just after the header and extends right up to the start of the Index Table. The size of the data area is the long word at offset 10 in the header, minus 20 bytes.
Within the data area we find all the fields of each record, grouped together. The organisation is not as you defined the fields though, all the numeric fields come first, 8 bytes for each one, then the string fields come next - which makes sense as these can all be different sizes.
Numbers are stored in 8 bytes, I have no idea which actual format this is, yet, it could be IEEE, it could be some variant of the QL's internal format, or it could be something else. I'm still working on this part of the file.
Strings are store as a single byte, limiting string data to a maximum of 255 bytes, followed by the bytes of the string itself. Empty fields are indicated by a single byte of zero. There are no apparent padding bytes to make sure that the strings are an even length.
The third major section of a database file is the index table. This structure is preceded by an 8 byte standard table header - there's one in front of all the "table" areas, but not all are used. This one is.
The address of the start of the header for this table is given in offset 10 of the file header, the long word found there indicates the start address of the index table.
The index table is not used if there are no sorted fields in the database.
Each entry in the index table is 6 bytes plus 8 bytes for each and every sorted field.
The index table data is preceded by a standard table header. This is 8 bytes in size and has the following format:
| Offset | Purpose |
|---|---|
|
Element size |
|
Granularity |
|
Elements in use |
|
Elements allocated |
This defines the size of each element in the following table. For an index table this is 6 + (8 * sorted_field_count).
The defines how many elements forth of space is allocated for the table when new entries are required. The number of bytes allocated is element_size * granularity).
How many of the elements in the table are in use. The first entry in any table appears to be a dummy, unused entry. It appears that archive likes to start counting from 1 rather than zero.
How big the table is, in elements.
The other tables in the database file have a similar header.
The index table entries start immediately after the header.
Each entry has a 6 byte record locator. This comes in two parts, the first 4 bytes are the offset into the database file, and not from the start of the data area, the next two bytes give the length, in bytes, of the entire record.
Following the record locator is 8 bytes of data for each sorted field in the record. For numeric fields the data here doesn't appear to be the same 8 bytes stored in the data area. I have yet to determine what goes here for string fields.
When the ArchiveExtractor walks the data area of an indexed database file it uses the valid index entries to extract only the valid records. When the database isn't sorted, it has to check each record isn't sitting in a free space area, which indicates that the record isn't valid anymore. Probably an old deleted record.
The free space table starts at the offset given by adding the size of the Index Table to the start of the Index Table address.
There is a standard table header in use by this table. Each element is 6 bytes long. The 6 bytes are made up of a 4 byte offset into the entire file, not just into the data area, where the free space area begins. The remaining two bytes are the size of the free space area, in bytes.
The gap starts at the offset given by adding the size of the free space table to the start address of the table itself.
The gap is simply 20 bytes that are never accessed. I suspect it's as a result of a bug as none of the documents I've seen mention it and, it's exactly 20 bytes long, which just happens to be the size of the file header. Interesting?
The structure table begins at offset 20 bytes on from the start of the gap.
The structure table has a standard 8 byte header, but it doesn't appear to be used. The entries in the structure table after the unused header are as follows:
| 13 bytes | Field name. Space padded. |
| 1 byte | Size of field name. |
| 1 byte | Type: 0 = numeric, 1 = string. |
| 1 byte | Sort indicator: 0 = unsorted, 1 = sorted. |
| 1 byte | Sort order: 0 = ascending, 1 = descending. |
| 3 bytes | Unknown. Always $00, $01, $02. |
It's interesting that the size of the field name comes at the end of the bytes making up the field name!
Reading a file begins by checking that the header is a word of 20, followed by the appropriate flag bytes. If the 'v' at offset 3 is a CHR$(0) then this file was opened in Archive but never closed. It's possible to revert this by opening the file and writing a 'v' to byte 3. When one of these files is deteced, the utility will print out a small SuperBASIC program to fix it for you.
If the file appears to be valid, the structure table is found and read next. This tells the organisation of the data area and whether the index table is in use or not.
The Free Space table has to be read next to determine where in the file there are chunks of free space, perhaps still holding potentially valid records which were deleted at some point in the past.
Finally, the data can be read from the start of the file. If the file is sorted, the the index table is read in order and the records found at the given offsets are printed out in order.
If the file is unsorted, the records are found in the data area, but when printed out are flagged with an indication that they may be deleted if the reside on one of the free space chuncks.


Before Change
self.log.debug("Fit neural network with total training cost "
+ str(self.tf_session.run(
self.loss_func,
feed_dict={self.input_placeholder: params,
self.output_placeholder: [[c] for c in costs],
self.regularisation_coefficient_placeholder: self.regularisation_coefficient,
}))
+ ", with unregularized cost "
+ str(self.tf_session.run(
self.loss_func,
feed_dict={self.input_placeholder: params,
self.output_placeholder: [[c] for c in costs],
self.regularisation_coefficient_placeholder: 0,
})))
def cross_validation_loss(self, params, costs):
"""
After Change
// - if the new loss is greater than the threshold then we haven"t improved much, so stop
// - else start from the top
while True:
threshold = 0.8 * self._loss(params, costs)[0]
for i in range(self.train_epochs):
// Split the data into random batches, and train on each batch
indices = np.random.permutation(len(params))
for j in range(math.ceil(len(params) / self.batch_size)):


NPC Generator
I play D&D. We're talking rolling dice every Saturday with 10 dyed-in-the-wool nerds. My DM (that's Dungeon Master for the uninitiated) has been begging me for a way to create and track NPC's (anybody in the world who isn't one of the players).
This was my first Rails project. Now that I know more about HTML/CSS, I can improve the way it looks. It's also going a refactor. I know that the controllers for Rails apps can be huge, but I had an epiphany. There was a way I could cut the code down at least 60%, make it more modular and easier to read. So I'm doing that between this website's upgrade segments.
- Platform
- Ruby on Rails
- Language
- Ruby
- Database
- PostgreSQL
- Hosting
- Amazon AWS, Electric Beanstalk, Linux Server
- Other Details
- Previously hosted on Heroku. Was planning to use SQLite but Heroku didn't support it. Now that I know more about PostgreSQL, I probably wouldn't have cared about making the switch. PostgreSQL has more functionality than SQLite, and switching database types was easy. 10/10 would recommend
- Code Repository
- Github
SuperHappyFunQuiz
Offers quiz questions and maintains leaderboard for a Shiny Robots' Wednesday night pub quiz
- Platform
- Django
- Language
- Python
- Database
- SQLite
- Hosting
- Cerberus, a Linux server for Westminster students
- Other Details
- Class assignment with a partner. She couldn't get Django to work on her computer, so her job was to fill up the database with all the pub quiz questions. There were a lot of them. Django was easy to use, but limited. It seems to be designed for dabblers, but it did the job.
- Code Repository
- Github
Matherator Extreme, Pretty Princess Edition
Game designed for 1st through 3rd graders to enhance their maths skill.
- Platform
- Deploys on Mac
- Language
- Java
- Database
- MySQL
- Hosting
- Currently not hosted yet
- Other Details
- Group effort. I was responsible for the client-side GUI, and the Battleship game.
- Code Repository
- Github


Write a chord in the input (try C13 b9 or maybe Fsus4 maj#11 ) above and hit enter. You can drag your way around the wave function.