T
- the type of Entity bean this query will fetch.public interface Query<T>
Example: Create the query using the API.
List<Order> orderList = DB.find(Order.class)
.where()
.like("customer.name","rob%")
.gt("orderDate",lastWeek)
.orderBy("customer.id, id desc")
.setMaxRows(50)
.findList();
...
Example: The same query using the query language
String oql =
+" where customer.name like :custName and orderDate > :minOrderDate "
+" order by customer.id, id desc "
+" limit 50 ";
List<Order> orderList = DB.createQuery(Order.class, oql)
.setParameter("custName", "Rob%")
.setParameter("minOrderDate", lastWeek)
.findList();
...
Ebean has built in support for "AutoTune". This is a mechanism where a query can be automatically tuned based on profiling information that is collected.
This is effectively the same as automatically using select() and fetch() to build a query that will fetch all the data required by the application and no more.
It is expected that AutoTune will be the default approach for many queries in a system. It is possibly not as useful where the result of a query is sent to a remote client or where there is some requirement for "Read Consistency" guarantees.
Partial Objects
The find and fetch clauses support specifying a list of properties to fetch. This results in objects that are "partially populated". If you try to get a property that was not populated a "lazy loading" query will automatically fire and load the rest of the properties of the bean (This is very similar behaviour as a reference object being "lazy loaded").
Partial objects can be saved just like fully populated objects. If you do this you should remember to include the "Version" property in the initial fetch. If you do not include a version property then optimistic concurrency checking will occur but only include the fetched properties. Refer to "ALL Properties/Columns" mode of Optimistic Concurrency checking.
[ select [ ( * | {fetch properties} ) ] ]
[ fetch {path} [ ( * | {fetch properties} ) ] ]
[ where {predicates} ]
[ order by {order by properties} ]
[ limit {max rows} [ offset {first row} ] ]
SELECT [ ( * | {fetch properties} ) ]
With the select you can specify a list of properties to fetch.
FETCH {path} [ ( * | {fetch properties} ) ]
With the fetch you specify the associated property to fetch and populate. The path is a OneToOne, ManyToOne, OneToMany or ManyToMany property.
For fetch of a path we can optionally specify a list of properties to fetch. If you do not specify a list of properties ALL the properties for that bean type are fetched.
WHERE {list of predicates}
The list of predicates which are joined by AND OR NOT ( and ). They can
include named (or positioned) bind parameters. These parameters will need to
be bound by setParameter(String, Object)
.
ORDER BY {order by properties}
The list of properties to order the result. You can include ASC (ascending) and DESC (descending) in the order by clause.
LIMIT {max rows} [ OFFSET {first row} ]
The limit offset specifies the max rows and first row to fetch. The offset is optional.
Find orders fetching its id, shipDate and status properties. Note that the id property is always fetched even if it is not included in the list of fetch properties.
select (shipDate, status)
Find orders with a named bind variable (that will need to be bound via
setParameter(String, Object)
).
where customer.name like :custLike
Find orders and also fetch the customer with a named bind parameter. This will fetch and populate both the order and customer objects.
fetch customer
where customer.id = :custId
Find orders and also fetch the customer, customer shippingAddress, order details and related product. Note that customer and product objects will be "Partial Objects" with only some of their properties populated. The customer objects will have their id, name and shipping address populated. The product objects (associated with each order detail) will have their id, sku and name populated.
fetch customer (name)
fetch customer.shippingAddress
fetch details
fetch details.product (sku, name)
| Modifier and Type | Interface and Description |
|---|---|
static class |
Query.ForUpdate
For update mode.
|
| Modifier and Type | Method and Description |
|---|---|
Query<T> |
alias(String alias)
Set root table alias.
|
Query<T> |
apply(FetchPath fetchPath)
Apply the path properties replacing the select and fetch clauses.
|
Query<T> |
asDraft()
Execute the query against the draft set of tables.
|
<D> DtoQuery<D> |
asDto(Class<D> dtoClass)
Convert the query to a DTO bean query.
|
Query<T> |
asOf(Timestamp asOf)
Perform an 'As of' query using history tables to return the object graph
as of a time in the past.
|
UpdateQuery<T> |
asUpdate()
Convert the query to a UpdateQuery.
|
void |
cancel()
Cancel the query execution if supported by the underlying database and
driver.
|
Query<T> |
copy()
Return a copy of the query.
|
int |
delete()
Execute as a delete query deleting the 'root level' beans that match the predicates
in the query.
|
int |
delete(Transaction transaction)
Execute as a delete query returning the number of rows deleted using the given transaction.
|
boolean |
exists()
Execute the query returning true if a row is found.
|
Query<T> |
fetch(String path)
Specify a path to fetch eagerly including all its properties.
|
Query<T> |
fetch(String path,
FetchConfig fetchConfig)
Additionally specify a JoinConfig to specify a "query join" and or define
the lazy loading query.
|
Query<T> |
fetch(String path,
String fetchProperties)
Specify a path to fetch eagerly including specific properties.
|
Query<T> |
fetch(String path,
String fetchProperties,
FetchConfig fetchConfig)
Additionally specify a FetchConfig to use a separate query or lazy loading
to load this path.
|
Query<T> |
fetchLazy(String path)
Fetch the path lazily (via batch lazy loading).
|
Query<T> |
fetchLazy(String path,
String fetchProperties)
Fetch the path and properties lazily (via batch lazy loading).
|
Query<T> |
fetchQuery(String path)
Fetch the path eagerly using a "query join" (separate SQL query).
|
Query<T> |
fetchQuery(String path,
String fetchProperties)
Fetch the path and properties using a "query join" (separate SQL query).
|
ExpressionList<T> |
filterMany(String propertyName)
This applies a filter on the 'many' property list rather than the root
level objects.
|
int |
findCount()
Return the count of entities this query should return.
|
void |
findEach(java.util.function.Consumer<T> consumer)
Execute the query processing the beans one at a time.
|
void |
findEachWhile(java.util.function.Predicate<T> consumer)
Execute the query using callbacks to a visitor to process the resulting
beans one at a time.
|
FutureRowCount<T> |
findFutureCount()
Execute find row count query in a background thread.
|
FutureIds<T> |
findFutureIds()
Execute find Id's query in a background thread.
|
FutureList<T> |
findFutureList()
Execute find list query in a background thread.
|
<A> List<A> |
findIds()
Execute the query returning the list of Id's.
|
QueryIterator<T> |
findIterate()
Execute the query iterating over the results.
|
List<T> |
findList()
Execute the query returning the list of objects.
|
<K> Map<K,T> |
findMap()
Execute the query returning a map of the objects.
|
T |
findOne()
Execute the query returning either a single bean or null (if no matching
bean is found).
|
Optional<T> |
findOneOrEmpty()
Execute the query returning an optional bean.
|
PagedList<T> |
findPagedList()
Return a PagedList for this query using firstRow and maxRows.
|
Set<T> |
findSet()
Execute the query returning the set of objects.
|
<A> A |
findSingleAttribute()
Execute a query returning a single value of a single property/column.
|
<A> List<A> |
findSingleAttributeList()
Execute the query returning a list of values for a single property.
|
List<Version<T>> |
findVersions()
Return versions of a @History entity bean.
|
List<Version<T>> |
findVersionsBetween(Timestamp start,
Timestamp end)
Return versions of a @History entity bean between the 2 timestamps.
|
Query<T> |
forUpdate()
Execute using "for update" clause which results in the DB locking the record.
|
Query<T> |
forUpdateNoWait()
Execute using "for update" clause with "no wait" option.
|
Query<T> |
forUpdateSkipLocked()
Execute using "for update" clause with "skip locked" option.
|
Class<T> |
getBeanType()
Return the type of beans being queried.
|
ExpressionFactory |
getExpressionFactory()
Return the ExpressionFactory used by this query.
|
int |
getFirstRow()
Return the first row value.
|
Query.ForUpdate |
getForUpdateMode()
Return the "for update" mode to use.
|
String |
getGeneratedSql()
Return the sql that was generated for executing this query.
|
Object |
getId()
Return the Id value.
|
Class<? extends T> |
getInheritType()
Returns the inherit type.
|
int |
getMaxRows()
Return the max rows for this query.
|
QueryType |
getQueryType()
Return the type of query being executed.
|
ExpressionList<T> |
having()
Add Expressions to the Having clause return the ExpressionList.
|
Query<T> |
having(Expression addExpressionToHaving)
Add an expression to the having clause returning the query.
|
boolean |
isAutoTuned()
Returns true if this query was tuned by autoTune.
|
boolean |
isCountDistinct()
Return true if this is countDistinct query.
|
boolean |
isForUpdate()
Return true if this query has forUpdate set.
|
OrderBy<T> |
order()
Return the OrderBy so that you can append an ascending or descending
property to the order by clause.
|
Query<T> |
order(String orderByClause)
Set the order by clause replacing the existing order by clause if there is
one.
|
OrderBy<T> |
orderBy()
Return the OrderBy so that you can append an ascending or descending
property to the order by clause.
|
Query<T> |
orderBy(String orderByClause)
Set the order by clause replacing the existing order by clause if there is
one.
|
Query<T> |
orderById(boolean orderById)
Controls, if paginated queries should always append an 'order by id' statement at the end to
guarantee a deterministic sort result.
|
Query<T> |
select(FetchGroup<T> fetchGroup)
Apply the fetchGroup which defines what part of the object graph to load.
|
Query<T> |
select(String fetchProperties)
Specify the properties to fetch on the root level entity bean in comma delimited format.
|
Query<T> |
setAllowLoadErrors()
Execute the query allowing properties with invalid JSON to be collected and not fail the query.
|
Query<T> |
setAutoTune(boolean autoTune)
Explicitly specify whether to use AutoTune for this query.
|
Query<T> |
setBaseTable(String baseTable)
Set the base table to use for this query.
|
Query<T> |
setBeanCacheMode(CacheMode beanCacheMode)
Set the mode to use the bean cache when executing this query.
|
Query<T> |
setBufferFetchSizeHint(int fetchSize)
A hint which for JDBC translates to the Statement.fetchSize().
|
Query<T> |
setCountDistinct(CountDistinctOrder orderBy)
Extended version for setDistinct in conjunction with "findSingleAttributeList";
|
Query<T> |
setDisableLazyLoading(boolean disableLazyLoading)
Set true if you want to disable lazy loading.
|
Query<T> |
setDisableReadAuditing()
Disable read auditing for this query.
|
Query<T> |
setDistinct(boolean isDistinct)
Set whether this query uses DISTINCT.
|
Query<T> |
setDocIndexName(String indexName)
Set the index(es) to search for a document store which uses partitions.
|
Query<T> |
setFirstRow(int firstRow)
Set the first row to return for this query.
|
Query<T> |
setId(Object id)
Set the Id value to query.
|
Query<T> |
setIncludeSoftDeletes()
Execute the query including soft deleted rows.
|
Query<T> |
setInheritType(Class<? extends T> type)
Restrict the query to only return subtypes of the given inherit type.
|
Query<T> |
setLabel(String label)
Set a label on the query.
|
Query<T> |
setLazyLoadBatchSize(int lazyLoadBatchSize)
Set the default lazy loading batch size to use.
|
Query<T> |
setLoadBeanCache(boolean loadBeanCache)
Will be deprecated - migrate to use setBeanCacheMode(CacheMode.RECACHE).
|
Query<T> |
setMapKey(String mapKey)
Set the property to use as keys for a map.
|
Query<T> |
setMaxRows(int maxRows)
Set the maximum number of rows to return in the query.
|
Query<T> |
setOrder(OrderBy<T> orderBy)
Set an OrderBy object to replace any existing OrderBy clause.
|
Query<T> |
setOrderBy(OrderBy<T> orderBy)
Set an OrderBy object to replace any existing OrderBy clause.
|
Query<T> |
setParameter(int position,
Object value)
Set an ordered bind parameter according to its position.
|
Query<T> |
setParameter(String name,
Object value)
Set a named bind parameter.
|
Query<T> |
setPersistenceContextScope(PersistenceContextScope scope)
Specify the PersistenceContextScope to use for this query.
|
Query<T> |
setProfileId(int profileId)
Set an id to identify this query for profiling purposes.
|
Query<T> |
setProfileLocation(ProfileLocation profileLocation)
Set the profile location of this query.
|
Query<T> |
setRawSql(RawSql rawSql)
Set RawSql to use for this query.
|
Query<T> |
setReadOnly(boolean readOnly)
When set to true when you want the returned beans to be read only.
|
Query<T> |
setTimeout(int secs)
Set a timeout on this query.
|
default Query<T> |
setUseCache(boolean useCache)
Set this to false to not use the bean cache.
|
Query<T> |
setUseDocStore(boolean useDocStore)
Set to true if this query should execute against the doc store.
|
default Query<T> |
setUseQueryCache(boolean enabled)
|
Query<T> |
setUseQueryCache(CacheMode queryCacheMode)
Set the
CacheMode to use the query for executing this query. |
ExpressionList<T> |
text()
Add Full text search expressions for Document store queries.
|
int |
update()
Execute the UpdateQuery returning the number of rows updated.
|
int |
update(Transaction transaction)
Execute the UpdateQuery returning the number of rows updated using the given transaction.
|
Set<String> |
validate()
Returns the set of properties or paths that are unknown (do not map to known properties or paths).
|
ExpressionList<T> |
where()
Add Expressions to the where clause with the ability to chain on the
ExpressionList.
|
Query<T> |
where(Expression expression)
Add a single Expression to the where clause returning the query.
|
Query<T> asOf(Timestamp asOf)
To perform this query the DB must have underlying history tables.
asOf
- the date time in the past at which you want to view the data<D> DtoQuery<D> asDto(Class<D> dtoClass)
We effectively use the underlying ORM query to build the SQL and then execute and map it into DTO beans.
UpdateQuery<T> asUpdate()
Typically this is used with query beans to covert a query bean query into an UpdateQuery like the examples below.
int rowsUpdated = new QCustomer()
.name.startsWith("Rob")
.asUpdate()
.set("active", false)
.update();;
int rowsUpdated = new QContact()
.notes.note.startsWith("Make Inactive")
<EMAIL_ADDRESS>.customer.id.equalTo(42)
.asUpdate()
.set("inactive", true)
.setRaw("email = lower(email)")
.update();
void cancel()
This must be called from a different thread to the query executor.
Query<T> copy()
This is so that you can use a Query as a "prototype" for creating other query instances. You could create a Query with various where expressions and use that as a "prototype" - using this copy() method to create a new instance that you can then add other expressions then execute.
Query<T> setPersistenceContextScope(PersistenceContextScope scope)
ServerConfig.setPersistenceContextScope(PersistenceContextScope)
is used - this value defaults to PersistenceContextScope.TRANSACTION
.
Note that the same persistence Context is used for subsequent lazy loading and query join queries.
Note that #findEach uses a 'per object graph' PersistenceContext so this scope is ignored for
queries executed as #findIterate, #findEach, #findEachWhile.scope
- The scope to use for this query and subsequent lazy loading.Query<T> setDocIndexName(String indexName)
For example, when executing a query against ElasticSearch with daily indexes we can explicitly specify the indexes to search against.
// explicitly specify the indexes to search
query.setDocIndexName("logstash-2016.11.5,logstash-2016.11.6")
// search today's index
query.setDocIndexName("$today")
// search the last 3 days
query.setDocIndexName("$last-3")
If the indexName is specified with ${daily} e.g. "logstash-${daily}" ... then we can use $today and $last-x as the search docIndexName like the examples below.
// search today's index
query.setDocIndexName("$today")
// search the last 3 days
query.setDocIndexName("$last-3")
indexName
- The index or indexes to search againstExpressionFactory getExpressionFactory()
boolean isAutoTuned()
Query<T> setAutoTune(boolean autoTune)
If you do not call this method on a query the "Implicit AutoTune mode" is used to determine if AutoTune should be used for a given query.
AutoTune can add additional fetch paths to the query and specify which properties are included for each path. If you have explicitly defined some fetch paths AutoTune will not remove them.
Query<T> setAllowLoadErrors()
// fetch a bean with JSON content
EBasicJsonList bean= DB.find(EBasicJsonList.class)
.setId(42)
.setAllowLoadErrors() // collect errors into bean state if we have invalid JSON
.findOne();
// get the invalid JSON errors from the bean state
Map<String, Exception> errors = server().getBeanState(bean).getLoadErrors();
// If this map is not empty tell we have invalid JSON
// and should try and fix the JSON content or inform the user
Query<T> setLazyLoadBatchSize(int lazyLoadBatchSize)
When lazy loading is invoked on beans loaded by this query then this sets the batch size used to load those beans.
lazyLoadBatchSize
- the number of beans to lazy load in a single batchQuery<T> setIncludeSoftDeletes()
This means that Ebean will not add any predicates to the query for filtering out soft deleted rows. You can still add your own predicates for the deleted properties and effectively you have full control over the query to include or exclude soft deleted rows as needed for a given use case.
Query<T> setDisableReadAuditing()
This is intended to be used when the query is not a user initiated query and instead part of the internal processing in an application to load a cache or document store etc. In these cases we don't want the query to be part of read auditing.
Query<T> select(String fetchProperties)
The Id property is automatically included in the properties to fetch unless setDistinct(true) is set on the query.
Use fetch(String, String)
to specify specific properties to fetch
on other non-root level paths of the object graph.
List<Customer> customers = DB.find(Customer.class)
// Only fetch the customer id, name and status.
// This is described as a "Partial Object"
.select("name, status")
.where.ilike("name", "rob%")
.findList();
fetchProperties
- the properties to fetch for this bean (* = all properties).Query<T> select(FetchGroup<T> fetchGroup)
Query<T> fetch(String path, String fetchProperties)
Ebean will endeavour to fetch this path using a SQL join. If Ebean determines that it can not use a SQL join (due to maxRows or because it would result in a cartesian product) Ebean will automatically convert this fetch query into a "query join" - i.e. use fetchQuery().
// query orders...
List<Order> orders = DB.find(Order.class)
// fetch the customer...
// ... getting the customers name and phone number
.fetch("customer", "name, phoneNumber")
// ... also fetch the customers billing address (* = all properties)
.fetch("customer.billingAddress", "*")
.findList();
If columns is null or "*" then all columns/properties for that path are fetched.
// fetch customers (their id, name and status)
List<Customer> customers = DB.find(Customer.class)
.select("name, status")
.fetch("contacts", "firstName,lastName,email")
.findList();
path
- the property path we wish to fetch eagerly.fetchProperties
- properties of the associated bean that you want to include in the
fetch (* means all properties, null also means all properties).Query<T> fetchQuery(String path, String fetchProperties)
This is the same as:
fetch(path, fetchProperties, new FetchConfig().query())
This would be used instead of a fetch() when we use a separate SQL query to fetch this part of the object graph rather than a SQL join.
We might typically get a performance benefit when the path to fetch is a OneToMany or ManyToMany, the 'width' of the 'root bean' is wide and the cardinality of the many is high.
path
- the property path we wish to fetch eagerly.fetchProperties
- properties of the associated bean that you want to include in the
fetch (* means all properties, null also means all properties).Query<T> fetchLazy(String path, String fetchProperties)
This is the same as:
fetch(path, fetchProperties, new FetchConfig().lazy())
The reason for using fetchLazy() is to either:
path
- the property path we wish to fetch lazily.fetchProperties
- properties of the associated bean that you want to include in the
fetch (* means all properties, null also means all properties).Query<T> fetch(String path, String fetchProperties, FetchConfig fetchConfig)
// fetch customers (their id, name and status)
List<Customer> customers = DB.find(Customer.class)
.select("name, status")
.fetch("contacts", "firstName,lastName,email", new FetchConfig().lazy(10))
.findList();
path
- the property path we wish to fetch eagerly.Query<T> fetch(String path)
Ebean will endeavour to fetch this path using a SQL join. If Ebean determines that it can not use a SQL join (due to maxRows or because it would result in a cartesian product) Ebean will automatically convert this fetch query into a "query join" - i.e. use fetchQuery().
// fetch customers (their id, name and status)
List<Customer> customers = DB.find(Customer.class)
// eager fetch the contacts
.fetch("contacts")
.findList();
path
- the property path we wish to fetch eagerly.Query<T> fetchQuery(String path)
This is the same as:
fetch(path, new FetchConfig().query())
This would be used instead of a fetch() when we use a separate SQL query to fetch this part of the object graph rather than a SQL join.
We might typically get a performance benefit when the path to fetch is a OneToMany or ManyToMany, the 'width' of the 'root bean' is wide and the cardinality of the many is high.
path
- the property path we wish to fetch eagerlyQuery<T> fetchLazy(String path)
This is the same as:
fetch(path, new FetchConfig().lazy())
The reason for using fetchLazy() is to either:
path
- the property path we wish to fetch lazily.Query<T> fetch(String path, FetchConfig fetchConfig)
// fetch customers (their id, name and status)
List<Customer> customers = DB.find(Customer.class)
// lazy fetch contacts with a batch size of 100
.fetch("contacts", new FetchConfig().lazy(100))
.findList();
Query<T> apply(FetchPath fetchPath)
This is typically used when the FetchPath is applied to both the query and the JSON output.
@Nonnull <A> List<A> findIds()
This query will execute against the EbeanServer that was used to create it.
@Nonnull QueryIterator<T> findIterate()
Note that findIterate (and findEach and findEachWhile) uses a "per graph" persistence context scope and adjusts jdbc fetch buffer size for large queries. As such it is better to use findList for small queries.
Remember that with QueryIterator
you must call QueryIterator.close()
when you have finished iterating the results (typically in a finally block).
findEach() and findEachWhile() are preferred to findIterate() as they ensure the jdbc statement and resultSet are closed at the end of the iteration.
This query will execute against the EbeanServer that was used to create it.
Query<Customer> query = DB.find(Customer.class)
.where().eq("status", Status.NEW)
.order().asc("id");
// use try with resources to ensure QueryIterator is closed
try (QueryIterator<Customer> it = query.findIterate()) {
while (it.hasNext()) {
Customer customer = it.next();
// do something with customer ...
}
}
void findEach(java.util.function.Consumer<T> consumer)
This method is appropriate to process very large query results as the beans are consumed one at a time and do not need to be held in memory (unlike #findList #findSet etc)
Note that findEach (and findEachWhile and findIterate) uses a "per graph" persistence context scope and adjusts jdbc fetch buffer size for large queries. As such it is better to use findList for small queries.
Note that internally Ebean can inform the JDBC driver that it is expecting larger resultSet and specifically for MySQL this hint is required to stop it's JDBC driver from buffering the entire resultSet. As such, for smaller resultSets findList() is generally preferable.
Compared with #findEachWhile this will always process all the beans where as #findEachWhile provides a way to stop processing the query result early before all the beans have been read.
This method is functionally equivalent to findIterate() but instead of using an iterator uses the Consumer interface which is better suited to use with Java8 closures.
DB.find(Customer.class)
.where().eq("status", Status.NEW)
.order().asc("id")
.findEach((Customer customer) -> {
// do something with customer
System.out.println("-- visit " + customer);
});
consumer
- the consumer used to process the queried beans.void findEachWhile(java.util.function.Predicate<T> consumer)
Note that findEachWhile (and findEach and findIterate) uses a "per graph" persistence context scope and adjusts jdbc fetch buffer size for large queries. As such it is better to use findList for small queries.
This method is functionally equivalent to findIterate() but instead of using an iterator uses the Predicate (SAM) interface which is better suited to use with Java8 closures.
DB.find(Customer.class)
.fetch("contacts", new FetchConfig().query(2))
.where().eq("status", Status.NEW)
.order().asc("id")
.setMaxRows(2000)
.findEachWhile((Customer customer) -> {
// do something with customer
System.out.println("-- visit " + customer);
// return true to continue processing or false to stop
return (customer.getId() < 40);
});
consumer
- the consumer used to process the queried beans.@Nonnull List<T> findList()
This query will execute against the EbeanServer that was used to create it.
List<Customer> customers = DB.find(Customer.class)
.where().ilike("name", "rob%")
.findList();
@Nonnull Set<T> findSet()
This query will execute against the EbeanServer that was used to create it.
Set<Customer> customers = DB.find(Customer.class)
.where().ilike("name", "rob%")
.findSet();
@Nonnull <K> Map<K,T> findMap()
This query will execute against the EbeanServer that was used to create it.
You can use setMapKey() so specify the property values to be used as keys on the map. If one is not specified then the id property is used.
Map<String, Product> map = DB.find(Product.class)
.setMapKey("sku")
.findMap();
@Nonnull <A> List<A> findSingleAttributeList()
List<String> names =
DB.find(Customer.class)
.select("name")
.orderBy().asc("name")
.findSingleAttributeList();
List<String> names =
DB.find(Customer.class)
.setDistinct(true)
.select("name")
.where().eq("status", Customer.Status.NEW)
.orderBy().asc("name")
.setMaxRows(100)
.findSingleAttributeList();
<A> A findSingleAttribute()
String name =
DB.find(Customer.class)
.select("name")
.where().eq("id", 42)
.findSingleAttribute();
boolean isCountDistinct()
boolean exists()
The query is executed using max rows of 1 and will only select the id property. This method is really just a convenient way to optimise a query to perform a 'does a row exist in the db' check.
boolean userExists =
new QContact()
<EMAIL_ADDRESS>.exists();
boolean userExists = query()
.where().eq("email"<EMAIL_ADDRESS>.exists();
@Nullable T findOne()
If more than 1 row is found for this query then a NonUniqueResultException is thrown.
This is useful when your predicates dictate that your query should only return 0 or 1 results.
// assuming the sku of products is unique...
Product product = DB.find(Product.class)
.where().eq("sku", "aa113")
.findOne();
...
It is also useful with finding objects by their id when you want to specify further join information.
// Fetch order 1 and additionally fetch join its order details...
Order order = DB.find(Order.class)
.setId(1)
.fetch("details")
.findOne();
// the order details were eagerly loaded
List<OrderDetail> details = order.getDetails();
...
javax.persistence.NonUniqueResultException
- if more than one result was found@Nonnull Optional<T> findOneOrEmpty()
@Nonnull List<Version<T>> findVersions()
Note that this query will work against view based history implementations but not sql2011 standards based implementations that require a start and end timestamp to be specified.
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.
@Nonnull List<Version<T>> findVersionsBetween(Timestamp start, Timestamp end)
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.
int delete()
Note that if the query includes joins then the generated delete statement may not be optimal depending on the database platform.
int delete(Transaction transaction)
Note that if the query includes joins then the generated delete statement may not be optimal depending on the database platform.
int update()
int update(Transaction transaction)
int findCount()
This is the number of 'top level' or 'root level' entities.
@Nonnull FutureRowCount<T> findFutureCount()
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).
@Nonnull FutureIds<T> findFutureIds()
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).
@Nonnull FutureList<T> findFutureList()
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.
@Nonnull PagedList<T> findPagedList()
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 = DB.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<T> setParameter(String name, Object value)
// a query with a named parameter
String oql = "find order where status = :orderStatus";
List<Order> list = DB.find(Order.class, oql)
.setParameter("orderStatus", OrderStatus.NEW)
.findList();
name
- the parameter namevalue
- the parameter valueQuery<T> setParameter(int position, Object value)
// a query with a positioned parameter
String oql = "where status = ? order by id desc";
List<Order> list = DB.createQuery(Order.class, oql)
.setParameter(1, OrderStatus.NEW)
.findList();
position
- the parameter bind position starting from 1 (not 0)value
- the parameter bind value.Query<T> setId(Object id)
You can use this to have further control over the query. For example adding fetch joins.
Order order = DB.find(Order.class)
.setId(1)
.fetch("details")
.findOne();
// the order details were eagerly fetched
List<OrderDetail> details = order.getDetails();
Query<T> where(Expression expression)
List<Order> newOrders = DB.find(Order.class)
.where().eq("status", Order.NEW)
.findList();
...
ExpressionList<T> where()
List<Order> orders = DB.find(Order.class)
.where()
.eq("status", Order.NEW)
.ilike("customer.name","rob%")
.findList();
Expr
ExpressionList<T> text()
This is currently ElasticSearch only and provides the full text expressions such as Match and Multi-Match.
This automatically makes this query a "Doc Store" query and will execute against the document store (ElasticSearch).
Expressions added here are added to the "query" section of an ElasticSearch query rather than the "filter" section.
Expressions added to the where() are added to the "filter" section of an ElasticSearch query.
ExpressionList<T> filterMany(String propertyName)
Typically you will use this in a scenario where the cardinality is high on the 'many' property you wish to join to. Say you want to fetch customers and their associated orders... but instead of getting all the orders for each customer you only want to get the new orders they placed since last week. In this case you can use filterMany() to filter the orders.
List<Customer> list = DB.find(Customer.class)
.fetch("orders")
.where().ilike("name", "rob%")
.filterMany("orders").eq("status", Order.Status.NEW).gt("orderDate", lastWeek)
.findList();
Please note you have to be careful that you add expressions to the correct expression list - as there is one for the 'root level' and one for each filterMany that you have.
propertyName
- the name of the many property that you want to have a filter on.ExpressionList<T> having()
Currently only beans based on raw sql will use the having clause.
Note that this returns the ExpressionList (so you can add multiple expressions to the query in a fluent API way).
Expr
Query<T> having(Expression addExpressionToHaving)
Currently only beans based on raw sql will use the having clause.
This is similar to having()
except it returns the query rather
than the ExpressionList. This is useful when you want to further specify
something on the query.
addExpressionToHaving
- the expression to add to the having clause.Query<T> orderBy(String orderByClause)
This follows SQL syntax using commas between each property with the optional asc and desc keywords representing ascending and descending order respectively.
This is EXACTLY the same as order(String)
.
Query<T> order(String orderByClause)
This follows SQL syntax using commas between each property with the optional asc and desc keywords representing ascending and descending order respectively.
This is EXACTLY the same as orderBy(String)
.
OrderBy<T> order()
This will never return a null. If no order by clause exists then an 'empty' OrderBy object is returned.
This is EXACTLY the same as orderBy()
.
OrderBy<T> orderBy()
This will never return a null. If no order by clause exists then an 'empty' OrderBy object is returned.
This is EXACTLY the same as order()
.
Query<T> setOrder(OrderBy<T> orderBy)
This is EXACTLY the same as setOrderBy(OrderBy)
.
Query<T> setOrderBy(OrderBy<T> orderBy)
This is EXACTLY the same as setOrder(OrderBy)
.
Query<T> setDistinct(boolean isDistinct)
The select() clause MUST be specified when setDistinct(true) is set. The reason for this is that generally ORM queries include the "id" property and this doesn't make sense for distinct queries.
List<Customer> customers =
DB.find(Customer.class)
.setDistinct(true)
.select("name")
.findList();
Query<T> setCountDistinct(CountDistinctOrder orderBy)
List<CountedValue<Order.Status>> orderStatusCount =
DB.find(Order.class)
.select("status")
.where()
.gt("orderDate", LocalDate.now().minusMonths(3))
// fetch as single attribute with a COUNT
.setCountDistinct(CountDistinctOrder.COUNT_DESC_ATTR_ASC)
.findSingleAttributeList();
for (CountedValue<Order.Status> entry : orderStatusCount) {
System.out.println(" count:" + entry.getCount()+" orderStatus:" + entry.getValue() );
}
// produces
count:3 orderStatus:NEW
count:1 orderStatus:SHIPPED
count:1 orderStatus:COMPLETE
int getFirstRow()
Query<T> setFirstRow(int firstRow)
firstRow
- the first row to include in the query result.int getMaxRows()
Query<T> setMaxRows(int maxRows)
maxRows
- the maximum number of rows to return in the query.Query<T> setMapKey(String mapKey)
If no property is set then the id property is used.
// Assuming sku is unique for products...
Map<String,Product> productMap = DB.find(Product.class)
.setMapKey("sku") // sku map keys...
.findMap();
mapKey
- the property to use as keys for a map.default Query<T> setUseCache(boolean useCache)
This method is now superseded by setBeanCacheMode(CacheMode)
which provides more explicit options controlled bean cache use.
This method is likely to be deprecated in the future with migration over to setUseBeanCache().
Query<T> setBeanCacheMode(CacheMode beanCacheMode)
By default "find by id" and "find by natural key" will use the bean cache when bean caching is enabled. Setting this to false means that the query will not use the bean cache and instead hit the database.
By default findList() with natural keys will not use the bean cache. In that case we need to explicitly use the bean cache.
Query<T> setUseQueryCache(CacheMode queryCacheMode)
CacheMode
to use the query for executing this query.default Query<T> setUseQueryCache(boolean enabled)
Query<T> setProfileId(int profileId)
The profileId is expected to be unique for a given bean type.
Note that the profileId is treated as a short internally and has a MAX value of 32,767.
Query<T> setProfileLocation(ProfileLocation profileLocation)
Query<T> setLabel(String label)
This label can be used to help identify query performance metrics but we can also use profile location enhancement on Finders so for some that would be a better option.
Query<T> setUseDocStore(boolean useDocStore)
When setting this you may also consider disabling lazy loading.
Query<T> setReadOnly(boolean readOnly)
Query<T> setLoadBeanCache(boolean loadBeanCache)
When set to true all the beans from this query are loaded into the bean cache.
Query<T> setTimeout(int secs)
This will typically result in a call to setQueryTimeout() on a preparedStatement. If the timeout occurs an exception will be thrown - this will be a SQLException wrapped up in a PersistenceException.
secs
- the query timeout limit in seconds. Zero means there is no limit.Query<T> setBufferFetchSizeHint(int fetchSize)
Gives the JDBC driver a hint as to the number of rows that should be fetched from the database when more rows are needed for ResultSet.
Note that internally findEach and findEachWhile will set the fetch size if it has not already as these queries expect to process a lot of rows. If we didn't then Postgres and MySql for example would eagerly pull back all the row data and potentially consume a lot of memory in the process.
As findEach and findEachWhile automatically set the fetch size we don't have to do so generally but we might still wish to for tuning a specific use case.
String getGeneratedSql()
This is only available after the query has been executed and provided only for informational purposes.
Query<T> forUpdate()
Query<T> forUpdateNoWait()
This is typically a Postgres and Oracle only option at this stage.
Query<T> forUpdateSkipLocked()
This is typically a Postgres and Oracle only option at this stage.
boolean isForUpdate()
Query.ForUpdate getForUpdateMode()
Query<T> setBaseTable(String baseTable)
Typically this is used when a table has partitioning and we wish to specify a specific partition/table to query against.
QOrder()
.setBaseTable("order_2019_05")
.status.equalTo(Status.NEW)
.findList();
Class<T> getBeanType()
Query<T> setInheritType(Class<? extends T> type)
List<Animal> animals =
new QAnimal()
.name.startsWith("Fluffy")
.setInheritType(Cat.class)
.findList();
type
- An inheritance subtype of theClass<? extends T> getInheritType()
QueryType getQueryType()
Query<T> setDisableLazyLoading(boolean disableLazyLoading)
That is, once the object graph is returned further lazy loading is disabled.
Set<String> validate()
Validate the query checking the where and orderBy expression paths to confirm if they represent valid properties or paths for the given bean type.
Query<T> orderById(boolean orderById)
Copyright © 2019. All rights reserved.


Bgenerator
CDF note 2655
- BGEN manual by P.Sphicas
bgenerator FORTRAN
- FORTRAN source file
CDF note 5092
- BGEN II manual by K.Anikeev, P.Murat, Ch.Paus
Bgenerator class
- C++ interface to BGEN
TBgeneratorModule.cc
- source code of the CDF AC++ module
Bgenerator is presently maintained by
Christoph Paus
Modified: Tue Mar 6 21:05:39 CST 2001
Christoph Paus


Tom
Job Title
userID
email
Office Number
Bobert
Job Title
userID
email
University - Boston College
Danimal
Job Title
userID
email
University - Harvard Law School


Basic uppercase pipe (no precedence considerations necessary): {{ 'text' | uppercase }}
The following shows that a pipe has higher precedence than a ternary operator. If the pipe precedence were lower than the ternary operator precedence, the output would be in uppercase as in 'TRUE'. Instead "true" is lowercase: {{ true ? 'true' : 'false' | uppercase }}
The following shows how parentheses help Angular evaluate the whole statement: {{ (true ? 'true' : 'false') | uppercase }}


The rectangle is 50px wide and 50px high.
Press Esc to move focus away from the code area (Tab inserts a tab character).


Food & Drink
The Tyranny of CICO (with Chocolate Muffins)
The Great Muffin Experiment, No. 5 (Jump to the Recipe) I've lost about 40 pounds this year through the only real "scientific" method of weight-loss: CICO — Calories In/Calories Out. That is to say, I've taken in fewer calories than my body has used. Now that I'm weightlifting, however, I'm...
The Better Peanut Butter Cookie Recipe
Now that it's fall, I'm hoping that I can spend more time baking cookies. This spring and summer, the fruit CSA has kept me busy making cakes and pies and crumbles and the like. And those are all delicious, don't get me wrong. But I love cookies. I'm toying with...
Making Substitutions in Muffins (and a Quick Lesson on Buttermillk)
The Great Muffin Experiment, No. 4 (Jump to the Recipe) I'm a big fan of The New York Times Cooking, and I happily pay for a subscription to the website/app. I enjoy browsing the recipes; I even like the recipe recommendations, in part because they seem to operate off of...
What to Do with Leftover Muffins?
The Great Muffin Experiment, No. 3 (Jump to the Recipe) I'm only a couple of bakes into this project, and already I am faced with the question: what the hell am I going to do with all these muffins? Ideally, everything goes in the freezer, and I thaw a couple...
What Is a Healthy Muffin?
The Great Muffin Experiment, No. 2 (Jump to the Recipe) I have always paid some attention to my nutrition. Growing up, my mother made sure that every dinner had a protein, a starch, and a vegetable, for example, as well as the requisite glass of milk for my brother and...
What Is a Muffin?
The Great Muffin Experiment, No. 1 (Jump to the Recipe) Sometimes when I bake cupcakes, Kin will call them "muffins" just to annoy me. "They're cupcakes," I insist. "Are they?" he'll tease. Are they, indeed. What exactly is a muffin, and how is it different than a cupcake? Or is...
The Great Muffin Experiment
I'm starting a new project, one I'm calling The Great Muffin Experiment. I'm going to document some of it here — and perhaps eventually it will become a standalone website (or subdomain). The project grows out of my 2021 turn towards a more healthy lifestyle: I've quit drinking, for starters....
Eating 'Healthy'
I have been quite remiss in keeping this blog up-to-date, which is a shame considering "food" has been a major focus on my life lately. No doubt, I have put a lot of energy into what I cook and what I eat in order to distract me from my deep,...
Dinner after Death
For the past three or so weeks, we have had dinner delivered to the house every night — or almost every night — thanks to the kindness of friends who want to support me following Isaiah's death. It's been a relief, no doubt, to not have to cook. It is...
Garlic and Onions
I'd have him chop the onions and garlic for me. He was so much more fastidious than me. I don't mind if they're all different sizes. I try to accomplish the prep work for meal quickly. He would spend so long, making sure everything was diced, not chopped, and uniformly...


--- layout: default ---
New projects set up lightening fast
Oya with its ecosystem of powerful, reusable packs lets you bootstrap deployable projects without a hassle.
At Tooploox we work with startups both big and small, often building products from the ground up. To us writing boilerplate code, be it bootstrapping a project or setting up CI/CD, is a time that can be way better spent. Oya enables us to deliver things faster, better and with greater satisfaction among engineers.


{% extends "base_template.html" %} {% block title %} Informant consent {% endblock %} {% block page_specific_stylesheet %} {% endblock %} {% block page_specific_scripts %} {% endblock %} {% block progress_consent %}{% endblock %} {% block content %}
Participation requirements
Participants who are at least 18 years old are eligible to participate.
Procedure
Participants have to perform some experiments in which they evaluate and create domains.
In the last part, participants may answer some demographic questions and questions about their security awareness.
Data Privacy
In this survey you will be asked to answer some personal questions about your age, gender and education level.
Additionally, we collect information about the device you are using and the time it takes to complete the survey and answer the questions.
The responses will be stored together with a unique, pseudonymous user ID that is not associated with any identifying information (we do not ask for your name or contact data).
YOUR INFORMATION HERE
Voluntary Participation
Your participation in this research is voluntary.
You may discontinue participation at any time during the research.
Right to Ask Questions and Contact Information
YOUR INFORMATION HERE
Also contact this e-mail address with any requests regarding your privacy rights including the objecting to processing, deletion of data and access to the data stored about you.
Please note that we might require additional information to re-identify the data set that contains your information.


Your doctor will recommend how long you shouldn’t work for. This is sometimes called being “signed off”. If you’re still unwell after this time you need to go back and see them again.
Your doctor will confirm to us that you still shouldn’t be working.
If you don’t want us to confirm with your doctor that you’re still unwell you’ll need to send a copy of your sick note in the post.


writing my way out of trouble since the year dot
But I will definitely write you an e-mail. Or a paper letter if you feel fancy. Writing has always come naturally to me. It has done my thoughts justice, arguably much more than any other human expression. Back in my teenage years, I reasoned my parents into buying a dog via a sequence of well-argued letters. Despite our family’s propensity for severe allergies. Nowadays, I call myself copywriter, but not much has changed since then. I help others with telling stories that convince and bring value.
After all, our dog was the best thing that could happen to us. His name was Churchill, and he loved drinking beer.
HTML5 & CSS3
JavaScript
UX & UI
Indesign
Photoshop
Microsoft Office
Apple iWork
English | level C1 | CAE
French | level C1 | DALF


Home
Archives
Categories
Tags
About
Tags
steem
2018-09-05
Collect Your HUNT Today!
steemhunt
2018-09-01
Defense Distributed and Why We Need Steem
freedom
2018-08-27
Steem User Authority Is Here!
ua
2018-08-09
My Two Year Steem Birthday - Where's Your Steem Home
steem
2018-08-08
Exciting Day For DLive! New Content Creators!
dlive
2018-07-16
Picked Up Your Byteball Yet? Opportunity To Increase Your Steem Power
dlive
2018-06-21
Let Media Know About DLive
dlive
2018-06-14
@steemmonsters Have Added Gold Foils!
steemmonsters
2018-06-02
WooCommerce Steem Plugin Assistance
steemdev
2018-05-22
Bitcoin (& STEEM?) Pizza Day
steempizzaday
2018-05-17
NYC Here I Come
dlivemeetup
2018-05-12
I'm Going To New York City and I'm Relying On Steem!
dlive
2018-03-11
Help Me Test Community Bot by @yabapmatt
bots
2018-01-27
Blockchain and Beers - Hopcat
bitcoin
2018-01-20
Thank You To My First 500 Followers!
follower500
2017-12-03
Does Content From Other Steem Networks Bother You In Your Steemit Feed?
steem
2017-10-26
How You Can Help Bring Steem to Bitcoin ATMs!
steem
Previous
Next
1
2
3
4
Your browser is out-of-date!
Update your browser to view this website correctly.
Update my browser now
×


{% extends "base_generic.html" %} {% load crispy_forms_tags %} {% block pagetitle %}Server Entry{% endblock %} {% block content %} {% if form.errors %} {% for field in form %} {% for error in field.errors %}
Fill-out this form as completely as possible with information related to this server.
Servers created/edited through this form should be servers that are reused and tracked (i.e. servers you own). Virtual private servers spun up for a single project are tracked from within the project with the Add a Transient Server button.


{% extends "base.html" %} {% block content %} {% import "macros/forms.html" as forms %} {% import "macros/loops.html" as loops %}


Click here to go to the corresponding page for the latest version of DIALS
DPF3 Part 2: A question of centring¶
Introduction¶
The second part of this tutorial continues from the results obtained in the DPF3 Part 1: Correcting poor initial geometry tutorial. You should work through that first to fix the incorrect beam centre recorded in the image headers and produce a correct indexing solution. Following those steps to the end, you will have two files:
bravais_setting_5.json
- the experimental geometry including a crystal model with a primitive orthorhombic latticeindexed.pickle
- the spot list from indexing
Viewing these files using the dials.image_viewer and the reciprocal lattice points in the dials.reciprocal_lattice_viewer reveals the presence of split spots and minor lattices. Nevertheless, these do not cause great difficulties in processing. More thought is required when considering the issue of possible pseudocentring. The structure can be solved in more than one space group. In cases such as this, the true symmetry may not be known until late stages of refinement. Even then, it might not be completely clear. Here we will investigate some features of the images that warn us of the challenges that lie ahead.
If we were to integrate this dataset using the oP solution from the first part
and continue on to the CCP4 data reduction pipeline, we would see
that Pointless chooses the space group \(P 2_1 2_1 2_1\) but
warns that the data were integrated on a primitive lattice, but may belong to
a centered lattice
. Accordingly, cTruncate finds strong evidence
for translational NCS, for this basis along a vector of \((0.0, 0.5,
0.5)\). The fact that this vector corresponds to a half integral step along a
face diagonal should lead us to question the space group assignment.
Questioning the lattice symmetry¶
It is always good advice to spend some time looking at the images and the reciprocal lattice before integrating a dataset. If we did so, we may notice the subtle features in the diffraction pattern that are the cause of the warnings from Pointless and cTruncate.
First the reciprocal lattice:
dials.reciprocal_lattice_viewer bravais_setting_5.json indexed.pickle
Here the view has been aligned almost down the long axis of the reciprocal cell, which is \(a^\star\) for this choice of basis vectors. We see the columns of reciprocal lattice points with Miller indices differing by \(h\) as lines of closely-spaced points. However, we can also see that the lengths of the lines alternate between long and short as we move, for example, in the \(c^\star\) direction. At this point should suspect a pseudocentred lattice.
Now the image viewer:
dials.image_viewer bravais_setting_5.json indexed.pickle
Here we have zoomed in on a region of the central module on the 5th image. The line of indexed spots have Miller indices in \((3,-13,l)\). Looking closely we see that spots with even \(l\) are systematically weaker than spots with odd \(l\). This fits the theory of a pseudocentred lattice, however we also see that the spot profile differs between the two sets.
To investigate further we can enforce the centred lattice and see where that takes us…
Converting to a centred lattice¶
Although dials.refine_bravais_settings did not give us a centred lattice as an option, it is easy to convert the current primitive solution. First, note that for the currently chosen basis, the centring operation should be on the A face, not the conventional C face:
dials.reindex bravais_setting_5.json space_group=A222
Here is part of the output:
New crystal:
Crystal:
Unit cell: (56.312, 99.662, 121.361, 90.000, 90.000, 90.000)
Space group: A 2 2 2
We now have a face centred space group, but the indexed reflections still include those which are now disallowed by the centring operation. An easy way to fix this is simply to reindex the spot list using the new model. We also request output of the unindexed reflections to explore later:
dials.index reindexed_experiments.json strong.pickle output.unindexed_reflections=unindexed.pickle
This produces a properly indexed spot list, but the space group is in an unconventional setting. We can fix this as follows:
dials.refine_bravais_settings experiments.json indexed.pickle
Solution 5 is what we want:
----------------------------------------------------------------------------------------------------------------
Solution Metric fit rmsd min/max cc #spots lattice unit_cell volume cb_op
----------------------------------------------------------------------------------------------------------------
* 5 0.0000 0.096 0.760/0.855 20000 oC 99.64 121.38 56.32 90.00 90.00 90.00 681108 b-c,b+c,a
* 4 0.0000 0.095 0.768/0.768 20000 mC 99.64 121.38 56.32 90.00 90.01 90.00 681106 b-c,b+c,a
* 3 0.0000 0.095 0.760/0.760 20000 mC 121.35 99.61 56.30 90.00 89.98 90.00 680582 b+c,-b+c,a
* 2 0.0000 0.095 0.855/0.855 20000 mP 78.43 56.27 78.48 90.00 101.23 90.00 339743 -b,a,c
* 1 0.0000 0.096 -/- 20000 aP 56.26 78.41 78.46 78.77 89.99 90.00 339502 a,b,c
----------------------------------------------------------------------------------------------------------------
The table tells us that the indexed spots need a change of basis to be consistent with the conventional oC lattice:
dials.reindex indexed.pickle change_of_basis_op=b-c,b+c,a
This gives us reindexed_reflections.pickle
. Before passing this along with
bravais_setting_5.json
to refinement and then to integration it is worth
exploring this result with dials.image_viewer and
dials.reciprocal_lattice_viewer.
Here is a view of the same region of image 5 as we saw before, but now with only the spots allowed by centring being indexed:
Now a view of the reciprocal lattice, aligned down the \(c^\star\) axis to show off the systematic absences.
Exploring the unindexed reflections¶
When we indexed with the oC lattice we wrote out the unindexed reflections as a separate file. We know that the spots in the positions disallowed by the oC lattice do themselves form an orthorhombic lattice. In views from the dials.reciprocal_lattice_viewer you may also have seen hints of a third lattice in some parts of reciprocal space. We might try to index these lattices now:
dials.index optimized_datablock.json unindexed.pickle output.experiments=minor.json output.reflections=minor.pickle unit_cell="99 121 56 90 90 90" space_group=P222 max_lattices=2
Here is some output:
model 1 (12265 reflections):
Crystal:
Unit cell: (100.027, 121.370, 56.258, 90.000, 90.000, 90.000)
Space group: P 2 2 2
model 2 (2969 reflections):
Crystal:
Unit cell: (99.735, 121.858, 56.487, 90.000, 90.000, 90.000)
Space group: P 2 2 2
The first lattice is essentially the same as our original primitive solution, however because we have now excluded all the reflections that were indexed by the centred lattice, this model now only indexes the spots that should be systematically absent with an oC lattice. The second lattice comes from a separate crystallite, rotated about 11 degrees from the first and therefore easily disentangled from the others. We can combine this result with the previous one:
dials.combine_experiments bravais_setting_5.json reindexed_reflections.pickle minor.json minor.pickle beam=0 detector=0 scan=0 goniometer=0 compare_models=False
Here, the beam=0
etc. specify that the combined result should have all
experimental models apart from the crystal taken from the first experiment,
which is the one described by bravais_setting_5.json
. The option
compare_models=False
is required in order to force this. The result is
about 65000 indexed reflections, split between three lattices:
----------------------
| Experiment | Nref |
----------------------
| 0 | 50384 |
| 1 | 12265 |
| 2 | 2969 |
----------------------
Here is a view of reciprocal space, aligned down the shared \(c^\star\) axes of the oC lattice, and its complement, the oP lattice that indexes the disallowed reflections:
dials.reciprocal_lattice_viewer combined_experiments.json combined_reflections.pickle
It is worth spending some time with the
dials.reciprocal_lattice_viewer at different zoom levels and
orientations, and with different Min Z
and Max Z
limits. See how the
lattice of ‘disallowed’ reflections is stronger (i.e. more sufficiently strong
spots found) in latter half of the dataset (images 100 onwards).
We can see this more directly if we create an HTML report for the combined experiments:
dials.report combined_experiments.json combined_reflections.pickle
Load the resulting dials-report.html
in a web browser. This includes
a useful plot of the number of indexed reflections for each lattice versus
the image number. Unfortunately the colours of curves on this plot do not
match the colours in the dials.reciprocal_lattice_viewer!
Nevertheless, the plot shows how the reflections allowed for the oC lattice
dominate throughout the data collection. The second ‘lattice’, which
consists only of the reflections of the oP solution that are disallowed by
the oC reflection conditions, is present from the start but becomes more
prominent in the second half of the data collection. The third lattice is a
genuinely separate component, misaligned from the frst by about 11 degrees,
and is present only on images in the first quarter of the dataset.
Intriguingly, the pattern of number of found strong spots for lattice 2
(which roughly corresponds to the intensity of those spots) follows a
sinusoidal pattern, which is weakest around image 60 and strongest around
image 150 (after a 90 degrees rotation of the crystal). Using the image
viewer with the Basis vectors
button ticked you can see how this
corresponds to being weakest when the beam is approximately parallel to the
plane of the pseudocentred C face, and stronger when the beam is orthogonal
to that face, that is when the suggested tNCS vector is orthogonal to the
beam:
Centred or pseudocentred?¶
We have two ways we can model this crystal:
- Primitive orthorhombic (\(P 2_1 2_1 2_1\)) with translational NCS mimicking centring on the C face
- C-centred orthorhombic (\(C 2 2 2_1\)), ignoring the systematically weak intensities
The purpose of this exercise was mainly to demonstrate the use of DIALS viewers as diagnostic tools and some of the less commonly used options that allowed us to isolate the sub-lattice of strong reflections before integration.
If we continued with integration of the \(C 2 2 2_1\) data and proceeded onwards to structure solution, model rebuilding and refinement, then we would have reproduced the structure presented by PDB entry 5I3L. Refinement of this structure with isotropic B-factors against the \(C 2 2 2_1\) data integrated with DIALS results in an R-cryst of 0.18 and an R-free of 0.21.
On the contrary, if we had chosen the primitive lattice and included the systematically weak reflections in integration, the structure solution process would not have been straightforward and the results would be ambiguous, even if we would have used e.g. chain A of the PDB entry 5I3L as the search model for molecular replacement. Firstly, there would have been several different molecular replacement solutions with almost equal scores and subsequent refinement would favour \(P 2_1 2_1 2_1\) with a small margin of only a few percent in R factors compared to other solutions in space groups \(P 2 2 2_1\) and \(P 2_1 2_1 2\). In all these solutions the pseudo-translation vector relating two dimers would deviate by no more than 0.2 Angstroms from \((b+c)/2\) (this corresponds to the crystallographic translation \((a+b)/2\) in \(C 2 2 2_1\)). We did not try to rebuild the \(P 2_1 2_1 2_1\) solution but instead superposed two copies of the entire PDB entry 5I3L onto the two dimers forming its asymmetric unit. We ended up with R-cryst of 0.27 and R-free of 0.29, which are considerably worse than the values for the \(C 2 2 2_1\) structure.
There could be several reasons for poor refinement statistics in \(P 2_1 2_1 2_1\): the space group assignment was incorrect, the refinement program had problems with the weak structure amplitudes, or the crystal was partially disordered or has undergone a phase transition during data collection and it was not possible in the first place to describe the weak reflections with a single crystal structure. In any case, the ‘thorough’ \(P 2_1 2_1 2_1\) model gives no improvement in density or refinement statistics and provides no new structural information and we conclude that it should not be used for structural analysis. Ultimately it is true that for a real crystal any space group assignment is only an approximation.
Conclusions¶
- Diffraction data may display a sub-lattice of weak spots (pseudocentring) indicating pseudo-translation in the crystal structure and, possibly, some degree of crystal disorder.
- In many cases the weak reflections are not as weak as in this example and their intensities grow or oscillate with resolution. In those cases, good maps and refinement statistics can only be obtained by refinement against all the available data. It is important then to make sure that indexing picks up all the spots, strong and weak.
- In many other cases, similar to the current example, the weak spots have no practical meaning and should be excluded. Ideally this should be done before the integration, which we did here in the section Converting to a centred lattice.
- Use the DIALS viewers to make sure you know what to expect from your data!
Acknowledgements¶
Thanks to Wolfram Tempel for making this dataset available and inspiring the writing of this tutorial. Thanks also to Andrey Lebedev for detailed analysis of the primitive versus the centred lattice structures.


|
|
|
@855
|
5 months |
mmckerns |
updated copyright to 2016
|
|
|
|
@795
|
11 months |
mmckerns |
fix: Finalize for fmin_powell should call cost unless solver is live
|
|
|
|
@794
|
11 months |
mmckerns |
add _update_objective and _live, to queue state changes to cost, penalty, …
|
|
|
|
@793
|
11 months |
mmckerns |
add scale to wrap_function, enable wrap_function in diffev2 and ensemble
|
|
|
|
@792
|
11 months |
mmckerns |
for speed, use contains instead of get and has_key
|
|
|
|
@791
|
11 months |
mmckerns |
use len(stepmon) more uniformly; fix _fcalls for DESolvers;
generations …
|
|
|
|
@787
|
15 months |
mmckerns |
remove return cost from SetObjective?; enable change cost and args in Step …
|
|
|
|
@785
|
15 months |
mmckerns |
refactor Solve is Step while not Terminated; radius, xtol, strategy are …
|
|
|
|
@784
|
15 months |
mmckerns |
added SolverInterrupt? as termination; pull _EARLYEXIT into …
|
|
|
|
@783
|
15 months |
mmckerns |
fix: add _SetEvaluationLimits to ensemble CheckTermination?;
Step now …
|
|
|
|
@782
|
15 months |
mmckerns |
moved _SetEvaluationLimits inside CheckTermination?;
moved _termination and …
|
|
|
|
@781
|
15 months |
mmckerns |
rename _bootstrap_decorate to _bootstrap_objective;
fix: diffev solver …
|
|
|
|
@776
|
17 months |
mmckerns |
copyright updated to 2015; added to examples2
|
|
|
|
@760
|
20 months |
mmckerns |
convert most eq and ne checks against None to is and is not
|
|
|
|
@759
|
20 months |
mmckerns |
rollback: apparently wrap_nested imposes constraints poorly
|
|
|
|
@758
|
20 months |
mmckerns |
diffev2 uses wrap_nested to apply constraints and evaluate cost in …
|
|
|
|
@748
|
22 months |
mmckerns |
add solver one-liners for ensemble solvers; fix: reducer in ensemble …
|
|
|
|
@737
|
22 months |
mmckerns |
simplified internal reducer state to always use arraylike; added …
|
|
|
|
@729
|
22 months |
mmckerns |
fix: DE solvers convert len-1 arrays to scalars for return values for cost
|
|
|
|
@727
|
22 months |
mmckerns |
add SetReducer? to solvers; add reduced in tools; use SetReducer? in …
|
|
|
|
@713
|
2 years |
mmckerns |
added license and copyright to each file
|
|
|
|
@698
|
3 years |
mmckerns |
fix: Solve does not recompute when Step has been already called
|
|
|
|
@683
|
3 years |
mmckerns |
activated npop=4 default in diffev solver one-liners
|
|
|
|
@673
|
3 years |
mmckerns |
started migration from self._map and all kwds as attributes to new …
|
|
|
|
@654
|
3 years |
mmckerns |
migrate termination from Solve to SetTermination?; *args in _termination …
|
|
|
|
@651
|
3 years |
mmckerns |
changed default for NP from None to 4 in DESolvers
|
|
|
|
@649
|
3 years |
mmckerns |
added SetSaveFrequency? method, and accompanying test for solver restarts
|
|
|
|
@648
|
3 years |
mmckerns |
can now serialize solvers; added SaveSolver? method, LoadSolver? function; …
|
|
|
|
@642
|
3 years |
mmckerns |
added _exitMain method, leverage abstract_solver.Solve in powell;
fix: …
|
|
|
|
@641
|
3 years |
mmckerns |
moved _SetEvaluationLimits, _Decorate, and _process_inputs into …
|
|
|
|
@639
|
3 years |
mmckerns |
more uniformity in _process_inputs in Solve method
|
|
|
|
@638
|
3 years |
mmckerns |
fix: updated sumt penalty restarts for changes to solver internals;
fix: …
|
|
|
|
@637
|
3 years |
mmckerns |
add _map_solver attribute, merge trialPop to trialSolution (2D for map …
|
|
|
|
@636
|
3 years |
mmckerns |
fix: all methods for initial populations produce a nested list of lists; …
|
|
|
|
@634
|
3 years |
mmckerns |
removed some unnecessary (hopefully) slices in desolvers;
removed …
|
|
|
|
@633
|
3 years |
mmckerns |
generations, bestEnergy, and bestSolution point to other solver internals; …
|
|
|
|
@632
|
3 years |
mmckerns |
add two quick solver sanity tests; added zdelt to fmin (scipy-0.9);
fix …
|
|
|
|
@631
|
3 years |
mmckerns |
merge energy_history with stepmonitor;
converted CONTINUE in …
|
|
|
|
@630
|
3 years |
mmckerns |
added randomly_bin to grid; enable LatticeSolver? to randomly_bin;
abstract …
|
|
|
|
@625
|
3 years |
mmckerns |
added EvaluationLimits? as termination condition;
termination from …
|
|
|
|
@607
|
3 years |
mmckerns |
add 'penalty' keyword to Solve; remove extraneous call to func in …
|
|
|
|
@604
|
3 years |
mmckerns |
added SetPenalty? method for penalty functions, and penalty kwd for …
|
|
|
|
@589
|
4 years |
mmckerns |
convert VTR to VTRCOG in fmin, fmin_powell, diffev*
return cost = inf when …
|
|
|
|
@577
|
4 years |
mmckerns |
turn off handler for one-line solver interface (ticket #177)
|
|
|
|
@559
|
4 years |
mmckerns |
fmin_powell with full_output return more standard (moved direc to end)
|
|
|
|
@540
|
4 years |
mmckerns |
migrated compound termination conditions to trunk;
added info channel for …
|
|
|
|
@536
|
4 years |
mmckerns |
added guard against null and empty logs in munge; added isNull;
allow …
|
|
|
|
@519
|
4 years |
mmckerns |
bugfix: overriding default monitors was broken in solver one-liners
|
|
|
|
@518
|
4 years |
mmckerns |
enable diffev solvers to accept strategy;
allow impose_feasible to accept …
|
|
|
|
@517
|
4 years |
mmckerns |
bugfix: bounds in single line solvers now work even if given as array
|
|
|
|
@512
|
4 years |
mmckerns |
enable solver one-liners to accept constraints; add three constraints …
|
|
|
|
@511
|
4 years |
mmckerns |
enable one-line solvers to accept kwds[monitor]
|
|
|
|
@510
|
4 years |
mmckerns |
bugfix for fixed kwds in diffev2
|
|
|
|
@505
|
4 years |
mmckerns |
added toggle for signal handler for one-line solvers
|
|
|
|
@473
|
5 years |
mmckerns |
converted 'constraints' keyword to SetConstraints? method;
enabled use of …
|
|
|
|
@470
|
5 years |
mmckerns |
migrated "Null" to monitors; set StepMon/Evalmon? is now a method
|
|
|
|
@466
|
5 years |
mmckerns |
moved monitors from mystic.tools to mystic.monitors
|
|
|
|
@465
|
5 years |
mmckerns |
all solvers import through 'solvers', and tools through 'tools'
renamed …
|
|
|
|
@462
|
5 years |
mmckerns |
extended solver interface to include solver.evaluations (ticket #138)
|
|
|
|
@456
|
5 years |
mmckerns |
allow use of scheduler in mapped solvers
|
|
|
|
@448
|
5 years |
mmckerns |
allow constraints=None kwds for DE solver and also for impose_expect; …
|
|
|
|
@372
|
6 years |
mmckerns |
marker toggleable on log_reader; all=False is default on Sows
|
|
|
|
@296
|
6 years |
mmckerns |
extended Sows/Solvers? to log solver 'rank' (see ticket #94)
|
|
|
|
@251
|
6 years |
mmckerns |
typos and minor cleaning
|
|
|
|
@249
|
6 years |
mmckerns |
'diffev' function now also has 'best' defaults for CrossProb? & Scaling
|
|
|
|
@247
|
6 years |
mmckerns |
DEsolver uses 'best' defaults (see ticket #113);
SOW always prints or logs …
|
|
|
|
@242
|
6 years |
mmckerns |
edits to fix epydoc formatting and content
|
|
|
|
@233
|
6 years |
mmckerns |
modified DESolver2 to turn off EvaluationMonitor? unless self._map = …
|
|
|
|
@231
|
6 years |
mmckerns |
merged pp version of DESolver from ppmystic, and examples
|
|
|
|
@226
|
6 years |
mmckerns |
added the AbstractMapSolver? base class, providing solvers with methods for …
|
|
|
|
@219
|
6 years |
mmckerns |
bugfix for #102, DE uses initial population;
SOW now captures initial …
|
|
|
|
@218
|
6 years |
mmckerns |
added option in DESolver to allow application of 'constraint' function
|
|
|
|
@185
|
6 years |
mmckerns |
added "practical advice" on configuring the DESolver internals
|
|
|
|
@149
|
7 years |
mmckerns |
fixed bugs from ticket #69
|
|
|
|
@140
|
7 years |
mmckerns |
moved parallel_desolve to differential_evolution;
differential_evolution …
|
|
|
|
@135
|
7 years |
mmckerns |
add 'disp' convergence display to DE solvers (ticket #26)
|
|
|
|
@124
|
7 years |
mmckerns |
coerce source to mostly play nice with epydoc;
added epydoc config file
|
|
|
|
@123
|
7 years |
mmckerns |
most of remaining module and method documentation for mystic-0.1a1; …
|
|
|
|
@122
|
7 years |
mmckerns |
clarify documentation on x0 in diffev
|
|
|
|
@121
|
7 years |
mmckerns |
migrated handler to abstract_solver by building _handlerFactory;
minor …
|
|
|
|
@119
|
7 years |
mmckerns |
added more extensive documentation to all solvers;
docs still required for …
|
|
|
|
@117
|
7 years |
mmckerns |
DEsolvers now comply with abstract_solver.Solve interface (ticket #4); …
|
|
|
|
@116
|
7 years |
mmckerns |
fixed bug from ticket #17 (DEsolver throws error when given numpy.inf as …
|
|
|
|
@112
|
7 years |
mmckerns |
enabled sigint_handler in all 'one-liner' interfaces
|
|
|
|
@111
|
7 years |
mmckerns |
created SetEvaluationLimits? method in abstract_solver;
propagated changes …
|
|
|
|
@110
|
7 years |
mmckerns |
added maxfun & scipy's callback to DE;
maxiter, maxfun are now kwds, with …
|
|
|
|
@109
|
7 years |
mmckerns |
added 'minimal' (one-line) interface for DE Solvers;
added ExtraArgs? to …
|
|
|
|
@105
|
7 years |
mmckerns |
added AbstractSolver? class; added documentation for most methods;
changed …
|
|
|
|
@104
|
7 years |
mmckerns |
moved fmin_powell to scipy_optimize;
removed scipy dependency;
cleanup of …
|
|
|
|
@102
|
7 years |
mmckerns |
renamed "bounds" methods for more consistency;
added method to ensure …
|
|
|
|
@95
|
7 years |
mmckerns |
refactored major filters, strategies into filters.py and strategy.py; …
|
|
|
|
@89
|
7 years |
mmckerns |
restructured top-level to have trunk for mystic & pyina (also branches)
|
|
copied from branches/merge-pyina-at-r87/trunk/mystic/mystic/differential_evolution.py:
|
|
|
|
@88
|
7 years |
mmckerns |
added branch that merges mystic/trunk and branches/pyina at r87;
reduced …
|


"We are all taught, and, being taught, believe that Man, sprung from an Ape, is Ape at heart.". |
PRINCESS IDA
Original Cast 1884
| King Hildebrand | Mr. Rutland Barrington |
| Hilarion, his son | Mr. H. Bracy |
| Cyril, Hilarion's friend | Mr. Durward Lely |
| Florian, Hilarion's friend | Mr. Ryley |
| King Gama | Mr. George Grossmith |
| Arac, his son | Mr. Richard Temple |
| Guron, his son | Mr. William Lugg |
| Scynthius, his son | Mr. Warwick Grey |
| Princess Ida, Gama's daughter | Miss Leonora Braham |
| Lady Blanche, Professor of Abstract Science | Miss Brandram |
| Lady Psyche, Professor of Humanities | Miss Chard |
| Melissa, Lady Blanche's daughter | Miss Jessie Bond |
| Sacharissa, a girl graduate | Miss Sybil Grey |
| Chloe, a girl graduate | Miss Heathcote |
| Ada, a girl graduate | Miss Twyman |
Chorus of Soldiers, Courtiers, 'Girl Graduates', 'Daughters of the Plough', etc. |
| Original Costumes |
George Grossmith as King Gama |
Rutland Barrington as King Hildebrand |
Rosina Brandram as Lady Blanche |
Charles Ryley, Henry Bracy and Durward Lely as Florian, Hilarion and Cyril |
| Return to the Princess Ida main page |
| Check out the history of Princess Ida in Australia. |
| Check out these other historic photos: |


Lets add some content...
Simple template driven form
Component Output
Two way binding
Material Dialogs
Exercise 7.1
Add footer with add button to item list and dialog
Show mat-dialog in material doku.
Template Syntax
object?.property
object!.property
The Angular safe navigation operator (?.) is a fluent and convenient way to guard against null and undefined values in property paths. Here it is, protecting against a view render failure if the currentHero is null.
The Angular non-null assertion operator (!): typed variables disallow null and undefined by default. The type checker throws an error if you leave a variable unassigned or try to assign null or undefined to a variable whose type disallows null and undefined.
Form Directives
ngForm
ngModel
#var
<input #phone placeholder="phone number">
Call
ngForm
The variable safeitemForm
is now a reference to the NgForm directive that governs the form as a whole.
ngModel
two-way-binding: display in, listen to changes and extract from the input field
Each input element has a name property that is required by Angular forms to register the control with the form.
ref-var: #var
template reference variable: reference to a DOM element within a template
Form Validation
required
pattern
<input type="text" [(ngModel)]="model.name"
name="name" #name="ngModel"
required pattern="[0-9]*">
<div [hidden]="name.valid || name.pristine"
class="alert alert-danger">
Name is required or pattern does not match
</div>
Here you created a variable called name and gave it the value "ngModel".
Form Rest
@Output() ngSubmit
FormGroup
FormControl
@Output() ngSubmit
EventEmitter
FormGroup
Tracks the value and validity state of a group of FormControl instances
FormControl
Tracks the value and validation status of an individual form control
Exercise 7.2
Create a template driven form inside a dialog
Recap
What is two way binding?
What shall the Output annotation be used for?


Jenafer Zwyer
Republican
Teacher - Platte River Academy for Homeschoolers, employed by Douglas County Schools
M.A. Education, The Ohio State University, 2000 Ed. Cert, Secondary Social Studies, Ohio Dominican University, 1997 B.A. History, The Ohio State University, 1996 B.A. Political Science, The Ohio State University, 1992
80228
As a teacher of teenagers, I organize and consider the interests of various groups on a regular basis. Teaching, especially currently, involves multiple stakeholders with a variety of priorities. Finding the right path that meets the needs of the variety of families involved takes patience, communication skills, creative problem solving and planning. I am not afraid to speak up to help to make sure the best solution is found.
I am politically active in that I keep myself and my neighbors politically informed. As a secondary social studies teacher, I also keep my students informed of current and historical political trends. I have not belonged to any political organizations since college in the late 1990s.
Since I have two sons, I have been active in the local scouting community. I was Treasurer for Pack 548 from 2015-2017, and during this time we increased our membership from 12 scouts in grades 1-5 to over 30. Other community organizations that I have been involved in in the last five years have been my local PTA, and Jeffco Eats, an organization that helps with food insecurity among school age children. I also have taken part in the annual Point in Time count of the homeless population for the last several years. I have been active at meetings for these groups but have not held a leadership position in them.
Primarily, I want to serve on the commission because of my deep felt belief in "one man, one vote". I have taught citizenship to middle schoolers and high schoolers who a required to take it as well as adults who are voluntarily taking their US citizenship test. I am proud to be a part of this process. I am a first generation American, and my immigrant mother instilled in me her belief of the privilege of voting and the responsibilities that come with it. I agree with Winston Churchill when he said, "Democracy is the worst form of government, except for all the others." It may be messy, but the voting process in the US is the best way to balance all the competing ideas and interests while still maintaining both freedom and order.
I teach history, politics and government during a time when people are afraid to discuss these topics with their friends, much less strangers. I pride myself on the fact that my students regularly ask me whether I am conservative or liberal because they can not figure it out based on my comments in class. Just as I create an environment of fair and moderated discussion in a classroom, I believe I would be able to do the same on the commission.
As a person, I am very logical and analytical. When I give my students an assessment, I also assess myself as a teacher. Using the data of both the content of the questions missed as well as the type of question missed, I can assess whether it was a topic that I need to cover more versus a type of question that the students struggled with. In addition to gathering data after the fact, I use pre-tests to help guide curriculum choices. Collecting, collating, and analyzing data is a large part of the educational environment today, and I use those skills regularly.
female


Athens offers visitors a unique combination of old and new, located on the spectacular Mediterranean coast. The archaeological centre of Athens offers a pedestrian-only path that encircles Europe’s largest Archaeological Park for a close-up view of some of the world’s most significant ancient treasures. Details about visiting Athens can be found in the Greek National Tourism Organization official website, as well as in the City of Athens official visitors’ website.
Famous tourist sites in Athens, most of which are only minutes away from central subway stations, include:
Acropolis
Ancient Agora
photo by Mykola Swarnyk
CC BY 3.0
Theatre of Dionysus and Herodus Atticus
photo by WestportWiki
CC BY-SA 3.0
Thissio
photo by Nikos D
CC BY-SA 3.0
Monastiraki
photo by Barcex
CC BY SA 2.5
Kerameikos
photo by Shadowgate
CC BY 2.0
Syntagma Square
photo by Tango7174
CC BY-SA 3.0
Archaeological Museum
photo by Dimboukas
Lycabettus hill
photo by Barcex
CC BY-SA-2.5
Temple of Olympian Zeus
photo by Ank@
CC BY 2.0
National Gardens
photo by Argos'DadA long list of activities and places to visit in Athens and the local vicinity is provided by visitgreece.gr, the official Greek Tourism Organisation travel guide site.
Also, many clean and beautiful beaches are within easy access of the city center via tram or bus!
With evocative ruins surrounded by breathtaking mountain scenery, Delphi is among the most beautiful ancient sites in Greece. For the ancient Greeks, Delphi was considered the center of the world, as the site was marked by the sacred Omphalos, or "navel stone." Believed to be blessed by Apollo, Delphi was the holiest site in the world for the ancient Greeks. The ruins of Ancient Delphi range in date from Mycenean times to the early Christian era. The site can be visited as a day trip, as it is a scenic 2.5 hours drive or bus ride northwest from Athens.
In the western Peloponnese, in the "Valley of Gods", lies the most celebrated sanctuary of ancient Greece, and the birthplace of the most important athletic mega-event of all times; the Olympic Games. The site includes the remnants of an old stadium and sprint track, as well as the ruins of the once great Temple of Zeus. The Temple of Zeus once housed the great Statue of Zeus, which was one of the Seven Wonders of the Ancient World. It is less than 4 hours away from Athens and only 1 hour from Patras port, or Kalamata airport. There are numerous daily buses and trains that connect Athens to Olympia.
Salamina, Aegina, the peninsula of Methana, Agkistri, Poros, Spetses, Hydra form the island complex of the Argosaronic Gulf in southern Greece. Sprinkled over the Argosaronic Gulf and steeped in ancient mythology, these islands are small havens in close proximity to Athens. Daily ferry connection from the port of Piraeus makes them a lovely, easily accessible all-year-round destination for the Athenians. Visitors here will enjoy natural beauty, historical treasures, unique architecture, and glamorous, yet romantic atmosphere.
Cape Sounion is located 69 kilometres (43 miles) southeast of Athens, at the southernmost tip of the Attica peninsula. It is noted as the site of ruins of the ancient Greek temple of Poseidon, the god of the sea in classical mythology. The remains are perched on the headland, surrounded on three sides by the sea. The site is a popular day-excursion for tourists from Athens, with sunset over the Aegean Sea, as viewed from the ruins.
This part of the guide is taken from VisitGreece and provided as a helpful resource to this site's visitors.
The copyright remains with the respective author(s).


MR IDRIS MAKAFI BANK OF AFRICA. OUAGADOUGOU -BURKINA FASO. Reply me here please. Email<EMAIL_ADDRESS>Dear Friend, This message might meet you in utmost surprise, however,it's just my urgent need for foreign partner that made me to contact you for this transaction. I am a banker by profession from Burkina faso in west Africa and currently holding the post of Director Auditing and Accounting unit of the bank.I have the opportunity of transfering the left over funds ($11.5million) of one of my bank clients who died along with his entire family on 31 july 2000 in a plane crash.You can confirm the genuiness of the deceased death by clicking on this web site http://news.bbc.co.uk/1/hi/world/europe/859479.stm Hence,i am inviting you for a business deal where this money can be shared between us in the ratio of 60/30 while 10% will be mapped out for expenses.If you agree to my business proposal.further details of the transfer will be forwarded to you as soon as i receive your return mail. have a great day. yours, Mr Idris Makafi Send your Reply to my new email address. Email<EMAIL_ADDRESS>_________________________________________________________________ MSN Hotmail : créez votre adresse e-mail gratuite & à vie ! http://www.msn.fr/newhotmail/Default.asp?Ath=f


You should solve the following using grid design. You should try to make all hens happy by feeding them grains!
The hens only want grains in the same color as. I.e. red grains for red hens etc
The following gallery should work in all screen sizes. Images marked with the class "prominent" should be twice the size in both horizontal and vertical dimensions. You should create a grid design. No @media are needed. Also try to ensure that you never have any gaps in your layout, except for at the bottom row where the images might not fill the full grid! The images should be displayed two and two on a iPhone 6 sized mobile (375px in width). You don't need to cater for any smaller screen than that.
The gallery should behave somthing like the following video:
Images from placekitten.com. Please check the image attribution.


C
6
H
5
−
CHO
X
=
Y
≡
Z
A
−
B
=
C
≡
D
A
−
B
=
C
≡
D
A
-
-
-
B
-
-
-
−
C
A
-
-
-
−
−
B
-
-
-
−
−
C
−
-
-
-
−
D
A
⋅
⋅
⋅
B
⋅
⋅
⋅
⋅
C
A
→
B
←
C
A
??
B


Schedule Planner
–
Introduction
Sorts your schedules generated by Schedule Planner by distance traveled between classes
TEST ME


smtp-mime.c
Download smtp-mime.c raw
/***************************************************************************
* _ _ ____ _
* Project ___| | | | _ \| |
* / __| | | | |_) | |
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
* Copyright (C) 1998 - 2017, Daniel Stenberg<EMAIL_ADDRESS>et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
* are also available at https://curl.haxx.se/docs/copyright.html.
*
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
* copies of the Software, and permit persons to whom the Software is
* furnished to do so, under the terms of the COPYING file.
*
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
* KIND, either express or implied.
*
***************************************************************************/
/* <DESC>
* SMTP example showing how to send mime e-mails
* </DESC>
*/
#include <stdio.h>
#include <string.h>
#include <curl/curl.h>
/* This is a simple example showing how to send mime mail using libcurl's SMTP
* capabilities. For an example of using the multi interface please see
* smtp-multi.c.
*
* Note that this example requires libcurl 7.56.0 or above.
*/
#define FROM<EMAIL_ADDRESS>#define TO<EMAIL_ADDRESS>#define CC<EMAIL_ADDRESS>static const char *headers_text[] = {
"Date: Tue, 22 Aug 2017 14:08:43 +0100",
"To: " TO,
"From: " FROM " (Example User)",
"Cc: " CC " (Another example User)",
"Message-ID: <dcd7cb36-11db-487a-9f3a-e652a9458efd@"
"rfcpedant.example.org>",
"Subject: example sending a MIME-formatted message",
NULL
};
static const char inline_text[] =
"This is the inline text message of the e-mail.\r\n"
"\r\n"
" It could be a lot of lines that would be displayed in an e-mail\r\n"
"viewer that is not able to handle HTML.\r\n";
static const char inline_html[] =
"\r\n"
"
This is the inline HTML message of the e-mail.
"
"
\r\n"
"
It could be a lot of HTML data that would be displayed by "
"e-mail viewers able to handle HTML.
"
"\r\n";
int main(void)
{
CURL *curl;
CURLcode res = CURLE_OK;
struct curl_slist *headers = NULL;
struct curl_slist *recipients = NULL;
struct curl_slist *slist = NULL;
curl_mime *mime;
curl_mime *alt;
curl_mimepart *part;
const char **cpp;
curl = curl_easy_init();
if(curl) {
/* This is the URL for your mailserver */
curl_easy_setopt(curl, CURLOPT_URL, "smtp://mail.example.com");
/* Note that this option isn't strictly required, omitting it will result
* in libcurl sending the MAIL FROM command with empty sender data. All
* autoresponses should have an empty reverse-path, and should be directed
* to the address in the reverse-path which triggered them. Otherwise,
* they could cause an endless loop. See RFC 5321 Section 4.5.5 for more
* details.
*/
curl_easy_setopt(curl, CURLOPT_MAIL_FROM, FROM);
/* Add two recipients, in this particular case they correspond to the
* To: and Cc: addressees in the header, but they could be any kind of
* recipient. */
recipients = curl_slist_append(recipients, TO);
recipients = curl_slist_append(recipients, CC);
curl_easy_setopt(curl, CURLOPT_MAIL_RCPT, recipients);
/* Build and set the message header list. */
for(cpp = headers_text; *cpp; cpp++)
headers = curl_slist_append(headers, *cpp);
curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headers);
/* Build the mime message. */
mime = curl_mime_init(curl);
/* The inline part is an alternative proposing the html and the text
versions of the e-mail. */
alt = curl_mime_init(curl);
/* HTML message. */
part = curl_mime_addpart(alt);
curl_mime_data(part, inline_html, CURL_ZERO_TERMINATED);
curl_mime_type(part, "text/html");
/* Text message. */
part = curl_mime_addpart(alt);
curl_mime_data(part, inline_text, CURL_ZERO_TERMINATED);
/* Create the inline part. */
part = curl_mime_addpart(mime);
curl_mime_subparts(part, alt);
curl_mime_type(part, "multipart/alternative");
slist = curl_slist_append(NULL, "Content-Disposition: inline");
curl_mime_headers(part, slist, 1);
/* Add the current source program as an attachment. */
part = curl_mime_addpart(mime);
curl_mime_filedata(part, "smtp-mime.c");
curl_easy_setopt(curl, CURLOPT_MIMEPOST, mime);
/* Send the message */
res = curl_easy_perform(curl);
/* Check for errors */
if(res != CURLE_OK)
fprintf(stderr, "curl_easy_perform() failed: %s\n",
curl_easy_strerror(res));
/* Free lists. */
curl_slist_free_all(recipients);
curl_slist_free_all(headers);
/* curl won't send the QUIT command until you call cleanup, so you should
* be able to re-use this connection for additional messages (setting
* CURLOPT_MAIL_FROM and CURLOPT_MAIL_RCPT as required, and calling
* curl_easy_perform() again. It may not be a good idea to keep the
* connection open for a very long time though (more than a few minutes
* may result in the server timing out the connection), and you do want to
* clean up in the end.
*/
curl_easy_cleanup(curl);
/* Free multipart message. */
curl_mime_free(mime);
}
return (int)res;
}


Starting XI: Bafana v Sudan
by Soccer Laduma2021 Africa Cup of Nations Qualifier
Teams: South Africa v Sudan
Date: 17 November 2019
Venue: Orlando Stadium
Bafana Bafana play host to Group C leaders Sudan at Orlando Stadium as they look to claim their first 2021 Africa Cup of Nations qualifying win.
The match is scheduled to get underway at 15h00.
Read: Tau & Co. Silenced As Bafana Start AFCON Journey With Loss
The South Africans got their campaign off to a disappointing start on Thursday evening following a 2-0 loss to Ghana at the Cape Coast Stadium.
Molefi Ntseki's troops will be desperate for three points against this afternoon's opponents, who thrashed Sao Tome and Principe 4-0 on Wednesday night.
Despite Sudan's big win earlier this week, Bafana will still fancy themselves heading into the encounter after winning the last two matches between the two nations.
Bafana were sweating on the fitness of Bongani Zungu, who limped off in the defeat to Ghana, but the Amiens midfielder does miss out this afternoon.
The match will be televised on SABC One.
Earn Airtime & Data With Soccer Laduma’s Social Media App - Download Now
Here's how they line up:
South Africa: Williams, Morena, Hlanti, Mathoho, Hlatshwayo (C), Mokotjo, Furman, Phiri, Tau, Serero, Mothiba.
Subs: Keet (GK), Goss (GK), Lebusa, Mkhwanazi, Lorch , Manyama, Mvala, Modiba, Maela, Grobler, Mokeke, Erasmus.
Sudan: Aboeshren, Atahir Mohamed, Suliman, Ismaeil, Mahmoud Ahmed, Mahamoud, Shareif, Abdelrahman, Hamid.


Enter a project number to view all analysis areas for that project. To view just a specific analysis area, enter as project-analysis area ID, e.g. "1234-1".


First ensure you have Protractor and TSLint installed, setup for TypeScript and updated Webdriver
Tests will execute after a build is executed via Karma, and it will automatically watch your files for changes.
You can run tests a single time via --watch=false, and turn off building of the app via --build=false (useful for running it at the same time as ng serve).
Before running the tests make sure you are serving the app via ng serve.
End-to-end tests are ran via Protractor.
You can lint your app code by running ng lint. This will use the lint npm script that in generated projects uses tslint.


#include <controller/python/ChipDeviceController-StorageDelegate.h>
◆ PythonPersistentStorageDelegate()
| chip::Controller::PythonPersistentStorageDelegate::PythonPersistentStorageDelegate |
( |
| ) |
|
|
inline |
◆ AsyncDeleteKeyValue()
| void chip::Controller::PythonPersistentStorageDelegate::AsyncDeleteKeyValue |
( |
const char * |
key | ) |
|
|
overridevirtual |
◆ AsyncSetKeyValue()
| void chip::Controller::PythonPersistentStorageDelegate::AsyncSetKeyValue |
( |
const char * |
key, |
|
|
const char * |
value |
|
) |
| |
|
overridevirtual |
Set the value for the key to a null terminated string.
- Parameters
-
| [in] | key | Key to be set |
| [in] | value | Value to be set |
Implements chip::PersistentStorageDelegate.
◆ SetStorageDelegate()
Set the callback object with methods that are called on completion of the operation.
- Parameters
-
| [in] | delegate | The callback object |
Implements chip::PersistentStorageDelegate.
◆ SyncGetKeyValue()
| CHIP_ERROR chip::Controller::PythonPersistentStorageDelegate::SyncGetKeyValue |
( |
const char * |
key, |
|
|
char * |
value, |
|
|
uint16_t & |
size |
|
) |
| |
|
overridevirtual |
This is a synchronous Get API, where the value is returned via the output buffer.
This API should be used sparingly, since it may block for some duration.
- Parameters
-
| [in] | key | Key to lookup |
| [out] | value | Value for the key. This will always be null-terminated if the function succeeds. |
| [in,out] | size | Input value buffer size, output size of buffer needed to store the value. Note that due to null-termination this will be 1 bigger than the "length" of the value. |
The output size could be larger than input value. In such cases, the user should allocate the buffer large enough (>= output size), and call the API again. In this case SyncGetKeyValue will place as many bytes as it can in the buffer and return CHIP_ERROR_NO_MEMORY.
If value is null, the input size is treated as 0.
- Returns
- CHIP_ERROR_KEY_NOT_FOUND there is no value for the given key.
-
CHIP_ERROR_NO_MEMORY if the input buffer is not big enough for the value.
-
CHIP_ERROR_BUFFER_TOO_SMALL if the value's size is too large to be expressed as a uint16_t.
Reimplemented from chip::PersistentStorageDelegate.
The documentation for this class was generated from the following files:


Casino Royale is the best bond movie ever filmed. Here are some reasons why.
Casino Royale was released in November of 2006. It stars Daniel Craig and Eva Green. The film revolves around James Bond battling a French financier and math genius by the name of Le Chiffre. The film grossed 599 million dollars on a budget of 150 million dollars.
He was very successful in following his predecesor Pierce Brosnan.
| Leading Cast Members | |
|---|---|
| Actor | Character |
| Daniel Craig | James Bond |
| Eva Green | Vesper Lynd |
| Mads Mikkelsen | Le Chiffre |
| Judi Dench | M |
Quick Survey:


Non-negative integer less than or equal to 50; optional
Specifies the number of parallel shards to use to run the test.
This value will override any heuristics used to determine the number of
parallel shards with which to run the test. Note that for some test
rules, this parameter may be required to enable sharding
in the first place. Also see --test_sharding_strategy
.
Sharding requires the test runner to support the test sharding protocol. If it does not, then it will most likely run every test in every shard, which is not what you want.


{% extends "base.html" %} {% block styles %} {{super()}} {% endblock %} {% block content %}
Data has been successfully loaded into the {{ tablename }} table.
User: {{ username }}
Data source: {{ original_file_name }}
First 10 rows of data previewed below


--- layout: page title: "About" description: "TJ Torres" header-img: "img/about-bg.jpg" ---
Currently I am a physics PhD student at UC Santa Cruz, slated to graduate June 2015. This blog represents some of my work and thoughts on Data Science and Machine Learning subjects as I transition into this new field. I'll try to keep it updated as I come accross topics I find interesting, or finish working on new projects.
Additionally, even if I don't explicitly reference it in the post, most of my code mentioned here (including the code for this blog) will be available on my GitHub page.


Male Female
Email: Password:
Birthday: Month April May June Day 01 02 03 Year 1999 1998 1997
I agree to the terms and conditions


[gecode-users] Custom constraint to external progam
Tias Guns
tias.guns at cs.kuleuven.be
Thu Nov 13 13:24:56 CET 2008
Cool, I didn't know adding a custom propagator could be as easy as
including the implementation in your model directly !
Note that in the example the 'propagate' function misses the ModEventDelta
parameter:
line 57 should be: virtual ExecStatus propagate(Space* home,
ModEventDelta);
line 93 should be: DisEq<View>::propagate(Space* home, ModEventDelta) {
Thanks for the tip,
Tias
On Thu, 13 Nov 2008 12:05:07 +0100, Mikael Zayenz Lagerkvist
<zayenz at gmail.com> wrote:
> Hi,
>
> There are no examples currently in Gecode that implement custom
> propagators.
>
> There is an old post in the mailinglist with a custom
> propagator-example [1]. Note that there is a bug in the logic, the
> line
> GECODE_ME_CHECK(x1.inter_r(home, u12, false));
> should be
> GECODE_ME_CHECK(x0.inter_r(home, u12, false));
> I missed that on a variable-renaming before posting it.
>
> Hope that helps,
> Mikael
>
> [1] http://article.gmane.org/gmane.comp.lib.gecode.user/1276/
>
>
> On Thu, Nov 13, 2008 at 11:51 AM, Pedro Salgueiro <pds at di.uevora.pt>
> wrote:
>> Ok, I think thats what I want to do.
>>
>> Is there any examples in Gecode that implement a custom propagator?
>>
>> Pedro Salgueiro
>>
>> On Thu, 2008-11-13 at 11:10 +0100, Mauricio Toro wrote:
>>> Hello,
>>>
>>>
>>> I made something similar once.
>>> My approach was writting a propagator
>>> that waits until cvars[0] and cvars[1]
>>> are assigned. Once they are assigned
>>> it calls run_something.
>>>
>>>
>>> I hope that helps,
>>>
>>>
>>> Mauricio
>>>
>>> 2008/11/13 Pedro Salgueiro <pds at di.uevora.pt>
>>> Hi!
>>>
>>> I have been experimenting Gecode for a while, and now I want
>>> to make
>>> something wich I don't know if its possible:
>>>
>>> I want to create a new "custom" constraint that allows to
>>> relate/constraint a variable with a function that receives two
>>> other
>>> gecode variables as parameters. This function will be
>>> something
>>> completely external to gecode, and evan c++, so, by the the
>>> this
>>> function is called the gecode variables that are used on it
>>> should
>>> already have some values assigned to it.
>>>
>>> Here's how it would look:
>>>
>>> post(this, cvars[0] < 5)
>>> post(this, cvars[1] < cvars[0] + 2)
>>> post(this, new_constraint(cvars[2], run_something(cvars[0],
>>> cvars[1])
>>>
>>> In this example, we could just assume that the
>>> "new_constraint" is used
>>> to make sure that cvars[2] "<"
>>> run_something(cvars[0],cvars[1]).
>>>
>>> Is this possible to do? If so, where should I start?
>>>
>>> Thank you all
>>> Pedro Salgueiro
>>>
>>>
>>> _______________________________________________
>>> Gecode users mailing list
>>> users at gecode.org
>>> https://www.gecode.org/mailman/listinfo/gecode-users
>>>
>>>
>>>
>>> --
>>> Mauricio Toro Bermudez
>>> Estudiante de Ingeniería de Sistemas
>>> Pontificia Universidad Javeriana, Colombia
>>>
>>> Stagiare à l'Ircam
>>> 1, place Igor-Stravinsky 75004 Paris,
>>> France de 2008 à 2009
>>>
>>
>>
>> _______________________________________________
>> Gecode users mailing list
>> users at gecode.org
>> https://www.gecode.org/mailman/listinfo/gecode-users
>>
>
>
>
More information about the gecode-users
mailing list