Question 5
Continue from last post, now let’s support VIP services.
User could buy VIP services using his acccount balance.
class ProService {
int userId;
double money;
long endTime;
public addMoney(){}
public buyPro(){}
}
Q5.1: System crash when purchasing VIP
Solution: transaction with log
WriteLOG
Transaction_1123: BEGIN
money=20; endTime=16_07_2016
If system crash happens here, system will read the log, recover and roll back all original data. Try not to complete the transaction - just fail it.
WriteLOG
Transaction_1123: BEGIN
money=20; endTime=16_07_2016
WriteLOG
Transaction_1123: END
money=10; endTime=16_08_2016
What happens if system crash during writing the log? or during the rollback?
Q5.2: dataset contains bad data
- one user id have 2 corresponding pro-services information.
- Shallow user: a pro-services info does not have corresponding user.
Solution: have a checker class.
Q5.3: simutaneous purchase by 2 users
Solution: lock.
- first process lock money & endTime.
- Read money = 20
- another process try to lock, but end up waiting (sleeping).
- first process do the job, and release the lock.
- another process wakes up.
lock have time-out settings. It can be applied in distributed system as well.
Question: does lock make your execution slow?
If another process is sleeping, CPU will be fully consumed by other process. So it won’t impact.
You can do some async processing, too.
When you lock, try to lock only a small piece of code, not the entire method. In DB, lock only a row, not a table.
Java CAS (Compare and swap )
Q5.4: Server crash
Solution: duplication.
How many copies?
Google did 3. Normally 2 in same data center, and 1 in another location.
Backup data normally is on another machine. But there’s also RAID (redundant array of independent disks) which:
combines multiple physical disk drive components into a single logical unit for the purposes of data redundancy, performance improvement, or both.
When does the copy happen?
Option 1 is doing everyday nightly. This is called a ‘check point’.
Option 2 is use another server to support Shadow Redundancy. All data from Machine 0 will be copied to Machine 1 WHILE it happens. The result is, Machine 1 is identical to Machine 0. If Machine 0 crashes, Machine 1 may be behind less than 1 second.
The way to duplicate is either re-play all the actions, or to read Machine 0’s log and apply the new data.
How to copy?
User send data to 1 server, and from that server, pipeline. This ensures good usage of server bandwith, and serial transfer of data ensures low latency (several ms).
It’s also possible to do tree-like transfer, but the above method is preferred cuz all machine consume same bandwidth.
What is log?
It is actually ‘checkpoint’ + log. It allows you to rollback.
Data redundancy - Summary:
Final note: Data inconsistency
Main sources of inconsistency comes from:
- network fault
- disk error
The disk eror is solved by checksum (compare during disk writing).
Summary
ACID (Atomicity, Consistency, Isolation, Durability) is a set of properties that guarantee that database transactions are processed reliably.
Atomicity: all or nothing
Q5.1: System crash when purchasing VIP
Consistency: validate according to defined rules
Q5.2: dataset contains bad data
Isolation: independency between transactions (lock)
Q5.3: simutaneous purchase by 2 users
Durability: stored permanently
Q5.4: Server crash
Additional Questions:
- design a user system (Netflix 2015)
Hint: table design, register, login/out, password check, find password.
- Design payment system (Yelp, BigCommerce 2015)
Hint: the question does not ask about table/ds design itself, but rather the problems associated with payment. Read about ACID principle.


{% extends "bases/bootstrap-with-nav.html" %} {% load staticfiles %} {% load bootstrap3 %} {% block content %}
This page groups together all of the bulletin boards for each poll of the event. Within each board you can audit your own votes.
| Poll | No. Votes | No. Voters | Turnout | View |
|---|---|---|---|---|
| {{ poll.question_text }} | {{ poll.total_votes }} | {% load custom_filters_tags %} {{ poll.uuid|get_total_num_voters }} | {{ poll.uuid|get_turnout }}% | View |


Gateway
BOT
05-Sep-18 05:09 PM
[dscrdeql] <! ariewayq ! The Real Human> hai my beloved Eqli friends
[dscrdeql] <! ariewayq ! The Real Human> time friends
[dscrdeql] <c2k>
[dscrdeql] <CrytoHunter> The price is very cheap exrates.me
[dscrdeql] <c2k> yes it is
[dscrdeql] <c2k> did you buy your bag yet?
[dscrdeql] <c2k> give up that starbucks for a month or happy hour binge and put that money to good use! lol
[dscrdeql] <CrytoHunter> yeah that make the kmd I invested in the dico worth nothing.
[dscrdeql] <CrytoHunter> anyone know how many eqil out there?
[dscrdeql] <c2k> agree, unfortunately. many of us participated in dico but then whale came in
[dscrdeql] <c2k> i have some stats somewhere ...lemme look
Richlist for KMD and EQL Assetchains
[dscrdeql] <CrytoHunter> it's like 500M
[dscrdeql] <c2k> yyup thats it
[dscrdeql] <c2k> many of whch are held by devs and founders
[dscrdeql] <c2k> i thikn the founders are supposed to clean up some of those addresses because they each hold multiple addresses...was for security purposes i believe
[dscrdeql] <CrytoHunter> damn. you know how much was raised?
[dscrdeql] <c2k> im sure thats somewhere in the dexstats info too but i dont know off hand
(edited)
[dscrdeql] <CrytoHunter> just want to figure out. how much I over paid.
[dscrdeql] <c2k> i think the dico was 2000sats but cant remember exactly
[dscrdeql] <c2k> which is prob around 7c
[dscrdeql] <CrytoHunter> That is about right. hope some will get burned so it will worth more each token or increase the number of token to all dico holders.


Class for the line-primitive in S3D. More...
#include <S3DLine.h>
Public Member Functions | |
| S3DLine (S3DPoint a, S3DPoint b) | |
| Creates a line between two (3D-)Points. | |
| void | draw (S3DDevice *disp, S3DSurface window, S3DContext gc, S3DZBuffer *zbuffer) |
| Draws the line. | |
| void | move (double dx, double dy, double dz) |
| Moves the line (translates it) relative to its coordinates. | |
| void | scale (double fx, double fy, double fz) |
| Scales the line. | |
| void | rotate (double rx, double ry, double rz, S3DPoint *anchor=NULL) |
| Rotates the line around its center or another anchor point. | |
| double | getZ () |
| Returns the z-coordinate for the center of the line. | |
| void | setColor (unsigned long c) |
| Sets the color of the line. | |
| unsigned long | getColor () |
| Returns the color of the line. | |
| void | setProjected (bool p) |
| Setting the coordinate mode to projected coordinates. |
Class for the line-primitive in S3D.
This class implements three-dimensional lines as the basis of all other primitives in S3D The line is the only primitive that is drawn using platform-dependent functions, all superior primitives will use this class to draw themselves.
Creates a line between two (3D-)Points.
| [in] | a | First endpoint of the line |
| [in] | b | Second endpoint of the line |
| void S3DLine::draw | ( | S3DDevice * | disp, | |
| S3DSurface | window, | |||
| S3DContext | gc, | |||
| S3DZBuffer * | zbuffer | |||
| ) | [virtual] |
Draws the line.
| [in] | disp | The display device, the line will be drawn to |
| [in] | window | The surface, the line will be drawn to |
| [in] | gc | The context, the line will be drawn to |
| zbuffer | Pointer to the S3DZBuffer-Instance of the Simple3D-Instance. |
This method is used to draw the line on screen, by using the platform-specific way of drawing points on some sort of screen. The meaning and neccessity of disp, window and gc may vary between different platforms
Implements S3DPrimitive.
| unsigned long S3DLine::getColor | ( | ) |
Returns the color of the line.
Reimplemented from S3DPrimitive.
| double S3DLine::getZ | ( | ) | [virtual] |
Returns the z-coordinate for the center of the line.
This function is used for Z-Buffering and currently also for the painter's algorithm to determine the order in which the entities get drawn.
Implements S3DPrimitive.
| void S3DLine::move | ( | double | dx, | |
| double | dy, | |||
| double | dz | |||
| ) | [virtual] |
Moves the line (translates it) relative to its coordinates.
| [in] | dx | The distance the line is moved in x-direction |
| [in] | dy | The distance the line is moved in y-direction |
| [in] | dz | The distance the line is moved in z-direction |
Implements S3DPrimitive.
| void S3DLine::rotate | ( | double | rx, | |
| double | ry, | |||
| double | rz, | |||
| S3DPoint * | anchor = NULL | |||
| ) | [virtual] |
Rotates the line around its center or another anchor point.
| [in] | rx | The angle the line should be rotated around the x-axis |
| [in] | ry | The angle the line should be rotated around the y-axis |
| [in] | rz | The angle the line should be rotated around the z-axis |
| [in] | anchor | Optional. The point the line should be rotated around, instead of its own center. |
This function allows to rotate the line around all three axis in any angle. If no anchor-point is passed, the line will be rotated around its own center, else it will rotate around the given point.
Implements S3DPrimitive.
| void S3DLine::scale | ( | double | fx, | |
| double | fy, | |||
| double | fz | |||
| ) |
Scales the line.
| [in] | fx | Scaling factor along the x-axis |
| [in] | fy | Scaling factor along the y-axis |
| [in] | fz | Scaling factor along the z-axis |
This method scales the line according to the given factors and translates it, to preserve its center's coordinates.
| void S3DLine::setColor | ( | unsigned long | c | ) |
Sets the color of the line.
| [in] | c | The color (as unsigned long, as produced by the RGB-macro) the line should be drawn in. |
Reimplemented from S3DPrimitive.
| void S3DLine::setProjected | ( | bool | p | ) |
Setting the coordinate mode to projected coordinates.
| [in] | p | Set this to "true", if you used projected 2D-coordinates in the constructor, else set this to false. |
The draw-Method usually projects the three-dimensional coordinates to 2D screen-coordinates. This can be suppressed by setting the coordinate mode to projected via calling setProjected(true).


I18n module
This module provides internationalisation and localisation functionality.
Usage
To use this module, just do: i18n = import('i18n')
. The following functions will then be available as methods on the object with the name i18n
. You can, of course, replace the name i18n
with anything else.
gettext
Sets up gettext localisation so that translations are built and placed into their proper locations during install. Takes one positional argument which is the name of the gettext module.
languages
: list of languages that are to be generated. As of 0.37.0 this is optional and the LINGUAS file is read.data_dirs
: (Added 0.36.0) list of directories to be set forGETTEXTDATADIRS
env var, used for local its filespreset
: (Added 0.37.0) name of a preset list of arguments, current option is'glib'
, see source for for their valueargs
: list of extra arguments to pass toxgettext
when generating the pot file
This function also defines targets for maintainers to use:
Note: These output to the source directory
<project_id>-pot
: runsxgettext
to regenerate the pot file
merge_file
This merges translations into a text file using msgfmt
. See custom_target for normal keywords. In addition it accepts these keywords:
po_dir
: directory containing translations, relative to current directorytype
: type of file, valid options are'xml'
(default) and'desktop'
Added 0.37.0
The results of the search are


001package io.ebean; 002 003import javax.annotation.Nonnull; 004import javax.annotation.Nullable; 005import javax.persistence.NonUniqueResultException; 006import java.sql.Connection; 007import java.sql.Timestamp; 008import java.util.List; 009import java.util.Map; 010import java.util.Optional; 011import java.util.Set; 012import java.util.function.Consumer; 013import java.util.function.Predicate; 014import java.util.stream.Stream; 015 016/** 017 * Object relational query for finding a List, Set, Map or single entity bean. 018 *
 019 * Example: Create the query using the API. 020 *
 021 *
 022 *
{@code 023 * 024 * List<Order> orderList = DB.find(Order.class) 025 * .where() 026 * .like("customer.name","rob%") 027 * .gt("orderDate",lastWeek) 028 * .order("customer.id, id desc") 029 * .setMaxRows(50) 030 * .findList(); 031 * 032 * ... 033 * }
 034 *
 035 * Example: The same query using the query language 036 *
 037 *
{@code 038 * 039 * String oql = 040 * +" where customer.name like :custName and orderDate > :minOrderDate " 041 * +" order by customer.id, id desc " 042 * +" limit 50 "; 043 * 044 * List<Order> orderList = DB.createQuery(Order.class, oql) 045 * .setParameter("custName", "Rob%") 046 * .setParameter("minOrderDate", lastWeek) 047 * .findList(); 048 * ... 049 * }
 050 *
AutoTune
 051 *
 052 * Ebean has built in support for "AutoTune". This is a mechanism where a query 053 * can be automatically tuned based on profiling information that is collected. 054 *
 055 *
 056 * This is effectively the same as automatically using select() and fetch() to 057 * build a query that will fetch all the data required by the application and no 058 * more. 059 *
 060 *
 061 * It is expected that AutoTune will be the default approach for many queries 062 * in a system. It is possibly not as useful where the result of a query is sent 063 * to a remote client or where there is some requirement for "Read Consistency" 064 * guarantees. 065 *
 066 *
Query Language
 067 *
 068 * Partial Objects 069 *
 070 *
 071 * The find and fetch clauses support specifying a list of 072 * properties to fetch. This results in objects that are "partially populated". 073 * If you try to get a property that was not populated a "lazy loading" query 074 * will automatically fire and load the rest of the properties of the bean (This 075 * is very similar behaviour as a reference object being "lazy loaded"). 076 *
 077 *
 078 * Partial objects can be saved just like fully populated objects. If you do 079 * this you should remember to include the "Version" property in the 080 * initial fetch. If you do not include a version property then optimistic 081 * concurrency checking will occur but only include the fetched properties. 082 * Refer to "ALL Properties/Columns" mode of Optimistic Concurrency checking. 083 *
 084 *
{@code 085 * [ select [ ( * | {fetch properties} ) ] ] 086 * [ fetch {path} [ ( * | {fetch properties} ) ] ] 087 * [ where {predicates} ] 088 * [ order by {order by properties} ] 089 * [ limit {max rows} [ offset {first row} ] ] 090 * }
 091 *
 092 * SELECT [ ( * | {fetch properties} ) ] 093 *
 094 *
 095 * With the select you can specify a list of properties to fetch. 096 *
 097 *
 098 * FETCH {path} [ ( * | {fetch properties} ) ] 099 *
 100 *
 101 * With the fetch you specify the associated property to fetch and populate. The 102 * path is a OneToOne, ManyToOne, OneToMany or ManyToMany property. 103 *
 104 *
 105 * For fetch of a path we can optionally specify a list of properties to fetch. 106 * If you do not specify a list of properties ALL the properties for that bean 107 * type are fetched. 108 *
 109 *
 110 * WHERE {list of predicates} 111 *
 112 *
 113 * The list of predicates which are joined by AND OR NOT ( and ). They can 114 * include named (or positioned) bind parameters. These parameters will need to 115 * be bound by {@link Query#setParameter(String, Object)}. 116 *
 117 *
 118 * ORDER BY {order by properties} 119 *
 120 *
 121 * The list of properties to order the result. You can include ASC (ascending) 122 * and DESC (descending) in the order by clause. 123 *
 124 *
 125 * LIMIT {max rows} [ OFFSET {first row} ] 126 *
 127 *
 128 * The limit offset specifies the max rows and first row to fetch. The offset is 129 * optional. 130 *
 131 *
Examples of Ebean's Query Language
 132 *
 133 * Find orders fetching its id, shipDate and status properties. Note that the id 134 * property is always fetched even if it is not included in the list of fetch 135 * properties. 136 *
 137 *
{@code 138 * 139 * select (shipDate, status) 140 * 141 * }
 142 *
 143 * Find orders with a named bind variable (that will need to be bound via 144 * {@link Query#setParameter(String, Object)}). 145 *
 146 *
{@code 147 * 148 * where customer.name like :custLike 149 * 150 * }
 151 *
 152 * Find orders and also fetch the customer with a named bind parameter. This 153 * will fetch and populate both the order and customer objects. 154 *
 155 *
{@code 156 * 157 * fetch customer 158 * where customer.id = :custId 159 * 160 * }
 161 *
 162 * Find orders and also fetch the customer, customer shippingAddress, order 163 * details and related product. Note that customer and product objects will be 164 * "Partial Objects" with only some of their properties populated. The customer 165 * objects will have their id, name and shipping address populated. The product 166 * objects (associated with each order detail) will have their id, sku and name 167 * populated. 168 *
 169 *
{@code 170 * 171 * fetch customer (name) 172 * fetch customer.shippingAddress 173 * fetch details 174 * fetch details.product (sku, name) 175 * 176 * }
 177 * 178 * @param <T> the type of Entity bean this query will fetch. 179 */ 180public interface Query<T> { 181 182 /** 183 * The lock type (strength) to use with query FOR UPDATE row locking. 184 */ 185 enum LockType { 186 /** 187 * The default lock type being either UPDATE or NO_KEY_UPDATE based on 188 * PlatformConfig.forUpdateNoKey configuration (Postgres option). 189 */ 190 DEFAULT, 191 192 /** 193 * FOR UPDATE. 194 */ 195 UPDATE, 196 197 /** 198 * FOR NO KEY UPDATE (Postgres only). 199 */ 200 NO_KEY_UPDATE, 201 202 /** 203 * FOR SHARE (Postgres only). 204 */ 205 SHARE, 206 207 /** 208 * FOR KEY SHARE (Postgres only). 209 */ 210 KEY_SHARE 211 } 212 213 /** 214 * FOR UPDATE wait mode. 215 */ 216 enum LockWait { 217 /** 218 * Standard For update clause. 219 */ 220 WAIT, 221 222 /** 223 * For update with No Wait option. 224 */ 225 NOWAIT, 226 227 /** 228 * For update with Skip Locked option. 229 */ 230 SKIPLOCKED 231 } 232 233 /** 234 * Set RawSql to use for this query. 235 */ 236 Query<T> setRawSql(RawSql rawSql); 237 238 /** 239 * Perform an 'As of' query using history tables to return the object graph 240 * as of a time in the past. 241 *
 242 * To perform this query the DB must have underlying history tables. 243 *
 244 * 245 * @param asOf the date time in the past at which you want to view the data 246 */ 247 Query<T> asOf(Timestamp asOf); 248 249 /** 250 * Execute the query against the draft set of tables. 251 */ 252 Query<T> asDraft(); 253 254 /** 255 * Convert the query to a DTO bean query. 256 *
 257 * We effectively use the underlying ORM query to build the SQL and then execute 258 * and map it into DTO beans. 259 */ 260 <D> DtoQuery<D> asDto(Class<D> dtoClass); 261 262 /** 263 * Convert the query to a UpdateQuery. 264 *
 265 * Typically this is used with query beans to covert a query bean 266 * query into an UpdateQuery like the examples below. 267 *
 268 * 269 *
{@code 270 * 271 * int rowsUpdated = new QCustomer() 272 * .name.startsWith("Rob") 273 * .asUpdate() 274 * .set("active", false) 275 * .update();; 276 * 277 * }
 278 * 279 *
{@code 280 * 281 * int rowsUpdated = new QContact() 282 * .notes.note.startsWith("Make Inactive") 283 *<EMAIL_ADDRESS>284 * .customer.id.equalTo(42) 285 * .asUpdate() 286 * .set("inactive", true) 287 * .setRaw("email = lower(email)") 288 * .update(); 289 * 290 * }
 291 */ 292 UpdateQuery<T> asUpdate(); 293 294 /** 295 * Cancel the query execution if supported by the underlying database and 296 * driver. 297 *
 298 * This must be called from a different thread to the query executor. 299 *
 300 */ 301 void cancel(); 302 303 /** 304 * Return a copy of the query. 305 *
 306 * This is so that you can use a Query as a "prototype" for creating other 307 * query instances. You could create a Query with various where expressions 308 * and use that as a "prototype" - using this copy() method to create a new 309 * instance that you can then add other expressions then execute. 310 *
 311 */ 312 Query<T> copy(); 313 314 /** 315 * Specify the PersistenceContextScope to use for this query. 316 *
 317 * When this is not set the 'default' configured on {@link io.ebean.config.DatabaseConfig#setPersistenceContextScope(PersistenceContextScope)} 318 * is used - this value defaults to {@link PersistenceContextScope#TRANSACTION}. 319 *
 320 * Note that the same persistence Context is used for subsequent lazy loading and query join queries. 321 *
 322 * Note that #findEach uses a 'per object graph' PersistenceContext so this scope is ignored for 323 * queries executed as #findIterate, #findEach, #findEachWhile. 324 * 325 * @param scope The scope to use for this query and subsequent lazy loading. 326 */ 327 Query<T> setPersistenceContextScope(PersistenceContextScope scope); 328 329 /** 330 * Set the index(es) to search for a document store which uses partitions. 331 *
 332 * For example, when executing a query against ElasticSearch with daily indexes we can 333 * explicitly specify the indexes to search against. 334 *
 335 *
{@code 336 * 337 * // explicitly specify the indexes to search 338 * query.setDocIndexName("logstash-2016.11.5,logstash-2016.11.6") 339 * 340 * // search today's index 341 * query.setDocIndexName("$today") 342 * 343 * // search the last 3 days 344 * query.setDocIndexName("$last-3") 345 * 346 * }
 347 *
 348 * If the indexName is specified with ${daily} e.g. "logstash-${daily}" ... then we can use 349 * $today and $last-x as the search docIndexName like the examples below. 350 *
 351 *
{@code 352 * 353 * // search today's index 354 * query.setDocIndexName("$today") 355 * 356 * // search the last 3 days 357 * query.setDocIndexName("$last-3") 358 * 359 * }
 360 * 361 * @param indexName The index or indexes to search against 362 * @return This query 363 */ 364 Query<T> setDocIndexName(String indexName); 365 366 /** 367 * Return the ExpressionFactory used by this query. 368 */ 369 ExpressionFactory getExpressionFactory(); 370 371 /** 372 * Returns true if this query was tuned by autoTune. 373 */ 374 boolean isAutoTuned(); 375 376 /** 377 * Explicitly specify whether to use AutoTune for this query. 378 *
 379 * If you do not call this method on a query the "Implicit AutoTune mode" is 380 * used to determine if AutoTune should be used for a given query. 381 *
 382 *
 383 * AutoTune can add additional fetch paths to the query and specify which 384 * properties are included for each path. If you have explicitly defined some 385 * fetch paths AutoTune will not remove them. 386 *
 387 */ 388 Query<T> setAutoTune(boolean autoTune); 389 390 /** 391 * Execute the query allowing properties with invalid JSON to be collected and not fail the query. 392 *
{@code 393 * 394 * // fetch a bean with JSON content 395 * EBasicJsonList bean= DB.find(EBasicJsonList.class) 396 * .setId(42) 397 * .setAllowLoadErrors() // collect errors into bean state if we have invalid JSON 398 * .findOne(); 399 * 400 * 401 * // get the invalid JSON errors from the bean state 402 * Map<String, Exception> errors = server().getBeanState(bean).getLoadErrors(); 403 * 404 * // If this map is not empty tell we have invalid JSON 405 * // and should try and fix the JSON content or inform the user 406 * 407 * }
 408 */ 409 Query<T> setAllowLoadErrors(); 410 411 /** 412 * Set the default lazy loading batch size to use. 413 *
 414 * When lazy loading is invoked on beans loaded by this query then this sets the 415 * batch size used to load those beans. 416 * 417 * @param lazyLoadBatchSize the number of beans to lazy load in a single batch 418 */ 419 Query<T> setLazyLoadBatchSize(int lazyLoadBatchSize); 420 421 /** 422 * Execute the query including soft deleted rows. 423 *
 424 * This means that Ebean will not add any predicates to the query for filtering out 425 * soft deleted rows. You can still add your own predicates for the deleted properties 426 * and effectively you have full control over the query to include or exclude soft deleted 427 * rows as needed for a given use case. 428 *
 429 */ 430 Query<T> setIncludeSoftDeletes(); 431 432 /** 433 * Disable read auditing for this query. 434 *
 435 * This is intended to be used when the query is not a user initiated query and instead 436 * part of the internal processing in an application to load a cache or document store etc. 437 * In these cases we don't want the query to be part of read auditing. 438 *
 439 */ 440 Query<T> setDisableReadAuditing(); 441 442 /** 443 * Specify the properties to fetch on the root level entity bean in comma delimited format. 444 *
 445 * The Id property is automatically included in the properties to fetch unless setDistinct(true) 446 * is set on the query. 447 *
 448 *
 449 * Use {@link #fetch(String, String)} to specify specific properties to fetch 450 * on other non-root level paths of the object graph. 451 *
 452 *
{@code 453 * 454 * List<Customer> customers = DB.find(Customer.class) 455 * // Only fetch the customer id, name and status. 456 * // This is described as a "Partial Object" 457 * .select("name, status") 458 * .where.ilike("name", "rob%") 459 * .findList(); 460 * 461 * }
 462 * 463 * @param fetchProperties the properties to fetch for this bean (* = all properties). 464 */ 465 Query<T> select(String fetchProperties); 466 467 /** 468 * Apply the fetchGroup which defines what part of the object graph to load. 469 */ 470 Query<T> select(FetchGroup<T> fetchGroup); 471 472 /** 473 * Specify a path to fetch eagerly including specific properties. 474 *
 475 * Ebean will endeavour to fetch this path using a SQL join. If Ebean determines that it can 476 * not use a SQL join (due to maxRows or because it would result in a cartesian product) Ebean 477 * will automatically convert this fetch query into a "query join" - i.e. use fetchQuery(). 478 *
 479 *
{@code 480 * 481 * // query orders... 482 * List<Order> orders = DB.find(Order.class) 483 * // fetch the customer... 484 * // ... getting the customers name and phone number 485 * .fetch("customer", "name, phoneNumber") 486 * 487 * // ... also fetch the customers billing address (* = all properties) 488 * .fetch("customer.billingAddress", "*") 489 * .findList(); 490 * }
 491 *
 492 * If columns is null or "*" then all columns/properties for that path are fetched. 493 *
 494 *
{@code 495 * 496 * // fetch customers (their id, name and status) 497 * List<Customer> customers = DB.find(Customer.class) 498 * .select("name, status") 499 * .fetch("contacts", "firstName,lastName,email") 500 * .findList(); 501 * 502 * }
 503 * 504 * @param path the property path we wish to fetch eagerly. 505 * @param fetchProperties properties of the associated bean that you want to include in the 506 * fetch (* means all properties, null also means all properties). 507 */ 508 Query<T> fetch(String path, String fetchProperties); 509 510 /** 511 * Fetch the path and properties using a "query join" (separate SQL query). 512 *
 513 * This is the same as: 514 *
 515 *
{@code 516 * 517 * fetch(path, fetchProperties, FetchConfig.ofQuery()) 518 * 519 * }
 520 *
 521 * This would be used instead of a fetch() when we use a separate SQL query to fetch this 522 * part of the object graph rather than a SQL join. 523 *
 524 *
 525 * We might typically get a performance benefit when the path to fetch is a OneToMany 526 * or ManyToMany, the 'width' of the 'root bean' is wide and the cardinality of the many 527 * is high. 528 *
 529 * 530 * @param path the property path we wish to fetch eagerly. 531 * @param fetchProperties properties of the associated bean that you want to include in the 532 * fetch (* means all properties, null also means all properties). 533 */ 534 Query<T> fetchQuery(String path, String fetchProperties); 535 536 /** 537 * Fetch the path and properties using L2 bean cache. 538 * 539 * @param path The path of the beans we are fetching from L2 cache. 540 * @param fetchProperties The properties that should be loaded. 541 */ 542 Query<T> fetchCache(String path, String fetchProperties); 543 544 /** 545 * Fetch the path and properties lazily (via batch lazy loading). 546 *
 547 * This is the same as: 548 *
 549 *
{@code 550 * 551 * fetch(path, fetchProperties, FetchConfig.ofLazy()) 552 * 553 * }
 554 *
 555 * The reason for using fetchLazy() is to either: 556 *
 557 *
 558 *
Control/tune what is fetched as part of lazy loading
 559 *
Make use of the L2 cache, build this part of the graph from L2 cache
 560 *
 561 * 562 * @param path the property path we wish to fetch lazily. 563 * @param fetchProperties properties of the associated bean that you want to include in the 564 * fetch (* means all properties, null also means all properties). 565 */ 566 Query<T> fetchLazy(String path, String fetchProperties); 567 568 /** 569 * Additionally specify a FetchConfig to use a separate query or lazy loading 570 * to load this path. 571 *
{@code 572 * 573 * // fetch customers (their id, name and status) 574 * List<Customer> customers = DB.find(Customer.class) 575 * .select("name, status") 576 * .fetch("contacts", "firstName,lastName,email", FetchConfig.ofLazy(10)) 577 * .findList(); 578 * 579 * }
 580 * 581 * @param path the property path we wish to fetch eagerly. 582 */ 583 Query<T> fetch(String path, String fetchProperties, FetchConfig fetchConfig); 584 585 /** 586 * Specify a path to fetch eagerly including all its properties. 587 *
 588 * Ebean will endeavour to fetch this path using a SQL join. If Ebean determines that it can 589 * not use a SQL join (due to maxRows or because it would result in a cartesian product) Ebean 590 * will automatically convert this fetch query into a "query join" - i.e. use fetchQuery(). 591 *
 592 *
{@code 593 * 594 * // fetch customers (their id, name and status) 595 * List<Customer> customers = DB.find(Customer.class) 596 * // eager fetch the contacts 597 * .fetch("contacts") 598 * .findList(); 599 * 600 * }
 601 * 602 * @param path the property path we wish to fetch eagerly. 603 */ 604 Query<T> fetch(String path); 605 606 /** 607 * Fetch the path eagerly using a "query join" (separate SQL query). 608 *
 609 * This is the same as: 610 *
 611 *
{@code 612 * 613 * fetch(path, FetchConfig.ofQuery()) 614 * 615 * }
 616 *
 617 * This would be used instead of a fetch() when we use a separate SQL query to fetch this 618 * part of the object graph rather than a SQL join. 619 *
 620 *
 621 * We might typically get a performance benefit when the path to fetch is a OneToMany 622 * or ManyToMany, the 'width' of the 'root bean' is wide and the cardinality of the many 623 * is high. 624 *
 625 * 626 * @param path the property path we wish to fetch eagerly 627 */ 628 Query<T> fetchQuery(String path); 629 630 /** 631 * Fetch the path eagerly using L2 cache. 632 */ 633 Query<T> fetchCache(String path); 634 635 /** 636 * Fetch the path lazily (via batch lazy loading). 637 *
 638 * This is the same as: 639 *
 640 *
{@code 641 * 642 * fetch(path, FetchConfig.ofLazy()) 643 * 644 * }
 645 *
 646 * The reason for using fetchLazy() is to either: 647 *
 648 *
 649 *
Control/tune what is fetched as part of lazy loading
 650 *
Make use of the L2 cache, build this part of the graph from L2 cache
 651 *
 652 * 653 * @param path the property path we wish to fetch lazily. 654 */ 655 Query<T> fetchLazy(String path); 656 657 /** 658 * Additionally specify a JoinConfig to specify a "query join" and or define 659 * the lazy loading query. 660 *
{@code 661 * 662 * // fetch customers (their id, name and status) 663 * List<Customer> customers = DB.find(Customer.class) 664 * // lazy fetch contacts with a batch size of 100 665 * .fetch("contacts", FetchConfig.ofLazy(100)) 666 * .findList(); 667 * 668 * }
 669 */ 670 Query<T> fetch(String path, FetchConfig fetchConfig); 671 672 /** 673 * Apply the path properties replacing the select and fetch clauses. 674 *
 675 * This is typically used when the FetchPath is applied to both the query and the JSON output. 676 *
 677 */ 678 Query<T> apply(FetchPath fetchPath); 679 680 /** 681 * Execute the query using the given transaction. 682 */ 683 Query<T> usingTransaction(Transaction transaction); 684 685 /** 686 * Execute the query using the given connection. 687 */ 688 Query<T> usingConnection(Connection connection); 689 690 /** 691 * Execute the query using the given database. 692 */ 693 Query<T> usingDatabase(Database database); 694 695 /** 696 * Execute the query returning the list of Id's. 697 *
 698 * This query will execute against the Database that was used to create it. 699 *
 700 */ 701 @Nonnull 702  List findIds(); 703 704 /** 705 * Execute the query iterating over the results. 706 *
 707 * Note that findIterate (and findEach and findEachWhile) uses a "per graph" 708 * persistence context scope and adjusts jdbc fetch buffer size for large 709 * queries. As such it is better to use findList for small queries. 710 *
 711 *
 712 * Remember that with {@link QueryIterator} you must call {@link QueryIterator#close()} 713 * when you have finished iterating the results (typically in a finally block). 714 *
 715 *
 716 * findEach() and findEachWhile() are preferred to findIterate() as they ensure 717 * the jdbc statement and resultSet are closed at the end of the iteration. 718 *
 719 *
 720 * This query will execute against the Database that was used to create it. 721 *
 722 *
{@code 723 * 724 * Query<Customer> query = DB.find(Customer.class) 725 * .where().eq("status", Status.NEW) 726 * .order().asc("id"); 727 * 728 * // use try with resources to ensure QueryIterator is closed 729 * 730 * try (QueryIterator<Customer> it = query.findIterate()) { 731 * while (it.hasNext()) { 732 * Customer customer = it.next(); 733 * // do something with customer ... 734 * } 735 * } 736 * 737 * }
 738 */ 739 @Nonnull 740 QueryIterator<T> findIterate(); 741 742 /** 743 * Execute the query returning the result as a Stream. 744 *
 745 * Note that this can support very large queries iterating 746 * any number of results. To do so internally it can use 747 * multiple persistence contexts. 748 *
 749 *
{@code 750 * 751 * // use try with resources to ensure Stream is closed 752 * 753 * try (Stream<Customer> stream = query.findStream()) { 754 * stream 755 * .map(...) 756 * .collect(...); 757 * } 758 * 759 * }
 760 */ 761 @Nonnull 762 Stream<T> findStream(); 763 764 /** 765 * Deprecated - migrate to findStream. 766 *
 767 * Execute the query returning the result as a Stream. 768 *
 769 * Note that this uses multiple persistence contexts such that we can use 770 * it with a large number of results. 771 *
 772 *
{@code 773 * 774 * // use try with resources to ensure Stream is closed 775 * 776 * try (Stream<Customer> stream = query.findLargeStream()) { 777 * stream 778 * .map(...) 779 * .collect(...); 780 * } 781 * 782 * }
 783 */ 784 @Nonnull 785 @Deprecated 786 Stream<T> findLargeStream(); 787 788 /** 789 * Execute the query processing the beans one at a time. 790 *
 791 * This method is appropriate to process very large query results as the 792 * beans are consumed one at a time and do not need to be held in memory 793 * (unlike #findList #findSet etc) 794 *
 795 *
 796 * Note that findEach (and findEachWhile and findIterate) uses a "per graph" 797 * persistence context scope and adjusts jdbc fetch buffer size for large 798 * queries. As such it is better to use findList for small queries. 799 *
 800 *
 801 * Note that internally Ebean can inform the JDBC driver that it is expecting larger 802 * resultSet and specifically for MySQL this hint is required to stop it's JDBC driver 803 * from buffering the entire resultSet. As such, for smaller resultSets findList() is 804 * generally preferable. 805 *
 806 *
 807 * Compared with #findEachWhile this will always process all the beans where as 808 * #findEachWhile provides a way to stop processing the query result early before 809 * all the beans have been read. 810 *
 811 *
 812 * This method is functionally equivalent to findIterate() but instead of using an 813 * iterator uses the Consumer interface which is better suited to use with closures. 814 *
 815 *
{@code 816 * 817 * DB.find(Customer.class) 818 * .where().eq("status", Status.NEW) 819 * .order().asc("id") 820 * .findEach((Customer customer) -> { 821 * 822 * // do something with customer 823 * System.out.println("-- visit " + customer); 824 * }); 825 * 826 * }
 827 * 828 * @param consumer the consumer used to process the queried beans. 829 */ 830 void findEach(Consumer<T> consumer); 831 832 /** 833 * Execute findEach streaming query batching the results for consuming. 834 *
 835 * This query execution will stream the results and is suited to consuming 836 * large numbers of results from the database. 837 *
 838 * Typically we use this batch consumer when we want to do further processing on 839 * the beans and want to do that processing in batch form, for example - 100 at 840 * a time. 841 * 842 * @param batch The number of beans processed in the batch 843 * @param consumer Process the batch of beans 844 */ 845 void findEach(int batch, Consumer<List<T>> consumer); 846 847 /** 848 * Execute the query using callbacks to a visitor to process the resulting 849 * beans one at a time. 850 *
 851 * Note that findEachWhile (and findEach and findIterate) uses a "per graph" 852 * persistence context scope and adjusts jdbc fetch buffer size for large 853 * queries. As such it is better to use findList for small queries. 854 *
 855 *
 856 * This method is functionally equivalent to findIterate() but instead of using an 857 * iterator uses the Predicate interface which is better suited to use with closures. 858 *
 859 *
{@code 860 * 861 * DB.find(Customer.class) 862 * .fetchQuery("contacts") 863 * .where().eq("status", Status.NEW) 864 * .order().asc("id") 865 * .setMaxRows(2000) 866 * .findEachWhile((Customer customer) -> { 867 * 868 * // do something with customer 869 * System.out.println("-- visit " + customer); 870 * 871 * // return true to continue processing or false to stop 872 * return (customer.getId() < 40); 873 * }); 874 * 875 * }
 876 * 877 * @param consumer the consumer used to process the queried beans. 878 */ 879 void findEachWhile(Predicate<T> consumer); 880 881 /** 882 * Execute the query returning the list of objects. 883 *
 884 * This query will execute against the Database that was used to create it. 885 *
 886 *
{@code 887 * 888 * List<Customer> customers = DB.find(Customer.class) 889 * .where().ilike("name", "rob%") 890 * .findList(); 891 * 892 * }
 893 */ 894 @Nonnull 895 List<T> findList(); 896 897 /** 898 * Execute the query returning the set of objects. 899 *
 900 * This query will execute against the Database that was used to create it. 901 *
 902 *
{@code 903 * 904 * Set<Customer> customers = DB.find(Customer.class) 905 * .where().ilike("name", "rob%") 906 * .findSet(); 907 * 908 * }
 909 */ 910 @Nonnull 911 Set<T> findSet(); 912 913 /** 914 * Execute the query returning a map of the objects. 915 *
 916 * This query will execute against the Database that was used to create it. 917 *
 918 *
 919 * You can use setMapKey() so specify the property values to be used as keys 920 * on the map. If one is not specified then the id property is used. 921 *
 922 *
{@code 923 * 924 * Map<String, Product> map = DB.find(Product.class) 925 * .setMapKey("sku") 926 * .findMap(); 927 * 928 * }
 929 */ 930 @Nonnull 931 <K> Map<K, T> findMap(); 932 933 /** 934 * Execute the query returning a list of values for a single property. 935 *
 936 *
Example 1:
 937 *
{@code 938 * 939 * List<String> names = 940 * DB.find(Customer.class) 941 * .select("name") 942 * .order().asc("name") 943 * .findSingleAttributeList(); 944 * 945 * }
 946 *
 947 *
Example 2:
 948 *
{@code 949 * 950 * List<String> names = 951 * DB.find(Customer.class) 952 * .setDistinct(true) 953 * .select("name") 954 * .where().eq("status", Customer.Status.NEW) 955 * .order().asc("name") 956 * .setMaxRows(100) 957 * .findSingleAttributeList(); 958 * 959 * }
 960 * 961 * @return the list of values for the selected property 962 */ 963 @Nonnull 964  List findSingleAttributeList(); 965 966 /** 967 * Execute a query returning a single value of a single property/column. 968 *
 969 *
{@code 970 * 971 * String name = 972 * DB.find(Customer.class) 973 * .select("name") 974 * .where().eq("id", 42) 975 * .findSingleAttribute(); 976 * 977 * }
 978 */ 979  A findSingleAttribute(); 980 981 /** 982 * Return true if this is countDistinct query. 983 */ 984 boolean isCountDistinct(); 985 986 /** 987 * Execute the query returning true if a row is found. 988 *
 989 * The query is executed using max rows of 1 and will only select the id property. 990 * This method is really just a convenient way to optimise a query to perform a 991 * 'does a row exist in the db' check. 992 *
 993 * 994 *
Example using a query bean:
 995 *
{@code 996 * 997 * boolean userExists = 998 * new QContact() 999 *<EMAIL_ADDRESS>1000 * .exists(); 1001 * 1002 * }
 1003 * 1004 *
Example:
 1005 *
{@code 1006 * 1007 * boolean userExists = query() 1008 * .where().eq("email"<EMAIL_ADDRESS>1009 * .exists(); 1010 * 1011 * }
 1012 * 1013 * @return True if the query finds a matching row in the database 1014 */ 1015 boolean exists(); 1016 1017 /** 1018 * Execute the query returning either a single bean or null (if no matching 1019 * bean is found). 1020 *
 1021 * If more than 1 row is found for this query then a NonUniqueResultException is 1022 * thrown. 1023 *
 1024 *
 1025 * This is useful when your predicates dictate that your query should only 1026 * return 0 or 1 results. 1027 *
 1028 *
{@code 1029 * 1030 * // assuming the sku of products is unique... 1031 * Product product = DB.find(Product.class) 1032 * .where().eq("sku", "aa113") 1033 * .findOne(); 1034 * ... 1035 * }
 1036 *
 1037 * It is also useful with finding objects by their id when you want to specify 1038 * further join information. 1039 *
 1040 *
{@code 1041 * 1042 * // Fetch order 1 and additionally fetch join its order details... 1043 * Order order = DB.find(Order.class) 1044 * .setId(1) 1045 * .fetch("details") 1046 * .findOne(); 1047 * 1048 * // the order details were eagerly loaded 1049 * List<OrderDetail> details = order.getDetails(); 1050 * ... 1051 * }
 1052 * 1053 * @throws NonUniqueResultException if more than one result was found 1054 */ 1055 @Nullable 1056 T findOne(); 1057 1058 /** 1059 * Execute the query returning an optional bean. 1060 */ 1061 @Nonnull 1062 Optional<T> findOneOrEmpty(); 1063 1064 /** 1065 * Return versions of a @History entity bean. 1066 *
 1067 * Note that this query will work against view based history implementations 1068 * but not sql2011 standards based implementations that require a start and 1069 * end timestamp to be specified. 1070 *
 1071 *
 1072 * Generally this query is expected to be a find by id or unique predicates query. 1073 * It will execute the query against the history returning the versions of the bean. 1074 *
 1075 */ 1076 @Nonnull 1077 List<Version<T>> findVersions(); 1078 1079 /** 1080 * Return versions of a @History entity bean between the 2 timestamps. 1081 *
 1082 * Generally this query is expected to be a find by id or unique predicates query. 1083 * It will execute the query against the history returning the versions of the bean. 1084 *
 1085 */ 1086 @Nonnull 1087 List<Version<T>> findVersionsBetween(Timestamp start, Timestamp end); 1088 1089 /** 1090 * Execute as a delete query deleting the 'root level' beans that match the predicates 1091 * in the query. 1092 *
 1093 * Note that if the query includes joins then the generated delete statement may not be 1094 * optimal depending on the database platform. 1095 *
 1096 * 1097 * @return the number of beans/rows that were deleted. 1098 */ 1099 int delete(); 1100 1101 /** 1102 * Execute as a delete query returning the number of rows deleted using the given transaction. 1103 *
 1104 * Note that if the query includes joins then the generated delete statement may not be 1105 * optimal depending on the database platform. 1106 *
 1107 * 1108 * @return the number of beans/rows that were deleted. 1109 */ 1110 int delete(Transaction transaction); 1111 1112 /** 1113 * Execute the UpdateQuery returning the number of rows updated. 1114 * 1115 * @return the number of beans/rows updated. 1116 */ 1117 int update(); 1118 1119 /** 1120 * Execute the UpdateQuery returning the number of rows updated using the given transaction. 1121 * 1122 * @return the number of beans/rows updated. 1123 */ 1124 int update(Transaction transaction); 1125 1126 /** 1127 * Return the count of entities this query should return. 1128 *
 1129 * This is the number of 'top level' or 'root level' entities. 1130 *
 1131 */ 1132 int findCount(); 1133 1134 /** 1135 * Execute find row count query in a background thread. 1136 *
 1137 * This returns a Future object which can be used to cancel, check the 1138 * execution status (isDone etc) and get the value (with or without a 1139 * timeout). 1140 *
 1141 * 1142 * @return a Future object for the row count query 1143 */ 1144 @Nonnull 1145 FutureRowCount<T> findFutureCount(); 1146 1147 /** 1148 * Execute find Id's query in a background thread. 1149 *
 1150 * This returns a Future object which can be used to cancel, check the 1151 * execution status (isDone etc) and get the value (with or without a 1152 * timeout). 1153 *
 1154 * 1155 * @return a Future object for the list of Id's 1156 */ 1157 @Nonnull 1158 FutureIds<T> findFutureIds(); 1159 1160 /** 1161 * Execute find list query in a background thread. 1162 *
 1163 * This query will execute in it's own PersistenceContext and using its own transaction. 1164 * What that means is that it will not share any bean instances with other queries. 1165 *
 1166 * 1167 * @return a Future object for the list result of the query 1168 */ 1169 @Nonnull 1170 FutureList<T> findFutureList(); 1171 1172 /** 1173 * Return a PagedList for this query using firstRow and maxRows. 1174 *
 1175 * The benefit of using this over findList() is that it provides functionality to get the 1176 * total row count etc. 1177 *
 1178 *
 1179 * If maxRows is not set on the query prior to calling findPagedList() then a 1180 * PersistenceException is thrown. 1181 *
 1182 *
{@code 1183 * 1184 * PagedList<Order> pagedList = DB.find(Order.class) 1185 * .setFirstRow(50) 1186 * .setMaxRows(20) 1187 * .findPagedList(); 1188 * 1189 * // fetch the total row count in the background 1190 * pagedList.loadRowCount(); 1191 * 1192 * List<Order> orders = pagedList.getList(); 1193 * int totalRowCount = pagedList.getTotalRowCount(); 1194 * 1195 * }
 1196 * 1197 * @return The PagedList 1198 */ 1199 @Nonnull 1200 PagedList<T> findPagedList(); 1201 1202 /** 1203 * Set a named bind parameter. Named parameters have a colon to prefix the name. 1204 *
{@code 1205 * 1206 * // a query with a named parameter 1207 * String oql = "find order where status = :orderStatus"; 1208 * 1209 * List<Order> list = DB.find(Order.class, oql) 1210 * .setParameter("orderStatus", OrderStatus.NEW) 1211 * .findList(); 1212 * 1213 * }
 1214 * 1215 * @param name the parameter name 1216 * @param value the parameter value 1217 */ 1218 Query<T> setParameter(String name, Object value); 1219 1220 /** 1221 * Set an ordered bind parameter according to its position. Note that the 1222 * position starts at 1 to be consistent with JDBC PreparedStatement. You need 1223 * to set a parameter value for each ? you have in the query. 1224 *
{@code 1225 * 1226 * // a query with a positioned parameter 1227 * String oql = "where status = ? order by id desc"; 1228 * 1229 * List<Order> list = DB.createQuery(Order.class, oql) 1230 * .setParameter(1, OrderStatus.NEW) 1231 * .findList(); 1232 * 1233 * }
 1234 * 1235 * @param position the parameter bind position starting from 1 (not 0) 1236 * @param value the parameter bind value. 1237 */ 1238 Query<T> setParameter(int position, Object value); 1239 1240 /** 1241 * Bind the next positioned parameter. 1242 * 1243 *
{@code 1244 * 1245 * // a query with a positioned parameters 1246 * String oql = "where status = ? and name = ?"; 1247 * 1248 * List<Order> list = DB.createQuery(Order.class, oql) 1249 * .setParameter(OrderStatus.NEW) 1250 * .setParameter("Rob") 1251 * .findList(); 1252 * 1253 * }
 1254 */ 1255 Query<T> setParameter(Object value); 1256 1257 /** 1258 * Bind all the positioned parameters. 1259 *
 1260 * A convenience for multiple calls to {@link #setParameter(Object)} 1261 */ 1262 Query<T> setParameters(Object... values); 1263 1264 /** 1265 * Set the Id value to query. This is used with findOne(). 1266 *
 1267 * You can use this to have further control over the query. For example adding 1268 * fetch joins. 1269 *
 1270 *
{@code 1271 * 1272 * Order order = DB.find(Order.class) 1273 * .setId(1) 1274 * .fetch("details") 1275 * .findOne(); 1276 * 1277 * // the order details were eagerly fetched 1278 * List<OrderDetail> details = order.getDetails(); 1279 * 1280 * }
 1281 */ 1282 Query<T> setId(Object id); 1283 1284 /** 1285 * Return the Id value. 1286 */ 1287 Object getId(); 1288 1289 /** 1290 * Add a single Expression to the where clause returning the query. 1291 *
{@code 1292 * 1293 * List<Order> newOrders = DB.find(Order.class) 1294 * .where().eq("status", Order.NEW) 1295 * .findList(); 1296 * ... 1297 * 1298 * }
 1299 */ 1300 Query<T> where(Expression expression); 1301 1302 /** 1303 * Add Expressions to the where clause with the ability to chain on the 1304 * ExpressionList. You can use this for adding multiple expressions to the 1305 * where clause. 1306 *
{@code 1307 * 1308 * List<Order> orders = DB.find(Order.class) 1309 * .where() 1310 * .eq("status", Order.NEW) 1311 * .ilike("customer.name","rob%") 1312 * .findList(); 1313 * 1314 * }
 1315 * 1316 * @return The ExpressionList for adding expressions to. 1317 * @see Expr 1318 */ 1319 ExpressionList<T> where(); 1320 1321 /** 1322 * Add Full text search expressions for Document store queries. 1323 *
 1324 * This is currently ElasticSearch only and provides the full text 1325 * expressions such as Match and Multi-Match. 1326 *
 1327 *
 1328 * This automatically makes this query a "Doc Store" query and will execute 1329 * against the document store (ElasticSearch). 1330 *
 1331 *
 1332 * Expressions added here are added to the "query" section of an ElasticSearch 1333 * query rather than the "filter" section. 1334 *
 1335 *
 1336 * Expressions added to the where() are added to the "filter" section of an 1337 * ElasticSearch query. 1338 *
 1339 */ 1340 ExpressionList<T> text(); 1341 1342 /** 1343 * This applies a filter on the 'many' property list rather than the root 1344 * level objects. 1345 *
 1346 * Typically you will use this in a scenario where the cardinality is high on 1347 * the 'many' property you wish to join to. Say you want to fetch customers 1348 * and their associated orders... but instead of getting all the orders for 1349 * each customer you only want to get the new orders they placed since last 1350 * week. In this case you can use filterMany() to filter the orders. 1351 *
 1352 *
{@code 1353 * 1354 * List<Customer> list = DB.find(Customer.class) 1355 * .fetch("orders") 1356 * .where().ilike("name", "rob%") 1357 * .filterMany("orders").eq("status", Order.Status.NEW).gt("orderDate", lastWeek) 1358 * .findList(); 1359 * 1360 * }
 1361 *
 1362 * Please note you have to be careful that you add expressions to the correct 1363 * expression list - as there is one for the 'root level' and one for each 1364 * filterMany that you have. 1365 *
 1366 * 1367 * @param propertyName the name of the many property that you want to have a filter on. 1368 * @return the expression list that you add filter expressions for the many to. 1369 */ 1370 ExpressionList<T> filterMany(String propertyName); 1371 1372 /** 1373 * Add Expressions to the Having clause return the ExpressionList. 1374 *
 1375 * Currently only beans based on raw sql will use the having clause. 1376 *
 1377 *
 1378 * Note that this returns the ExpressionList (so you can add multiple 1379 * expressions to the query in a fluent API way). 1380 *
 1381 * 1382 * @return The ExpressionList for adding more expressions to. 1383 * @see Expr 1384 */ 1385 ExpressionList<T> having(); 1386 1387 /** 1388 * Add an expression to the having clause returning the query. 1389 *
 1390 * Currently only beans based on raw sql will use the having clause. 1391 *
 1392 *
 1393 * This is similar to {@link #having()} except it returns the query rather 1394 * than the ExpressionList. This is useful when you want to further specify 1395 * something on the query. 1396 *
 1397 * 1398 * @param addExpressionToHaving the expression to add to the having clause. 1399 * @return the Query object 1400 */ 1401 Query<T> having(Expression addExpressionToHaving); 1402 1403 /** 1404 * Set the order by clause replacing the existing order by clause if there is 1405 * one. 1406 *
 1407 * This follows SQL syntax using commas between each property with the 1408 * optional asc and desc keywords representing ascending and descending order 1409 * respectively. 1410 */ 1411 Query<T> orderBy(String orderByClause); 1412 1413 /** 1414 * Set the order by clause replacing the existing order by clause if there is 1415 * one. 1416 *
 1417 * This follows SQL syntax using commas between each property with the 1418 * optional asc and desc keywords representing ascending and descending order 1419 * respectively. 1420 */ 1421 Query<T> order(String orderByClause); 1422 1423 /** 1424 * Return the OrderBy so that you can append an ascending or descending 1425 * property to the order by clause. 1426 *
 1427 * This will never return a null. If no order by clause exists then an 'empty' 1428 * OrderBy object is returned. 1429 *
 1430 * This is the same as orderBy() 1431 */ 1432 OrderBy<T> order(); 1433 1434 /** 1435 * Return the OrderBy so that you can append an ascending or descending 1436 * property to the order by clause. 1437 *
 1438 * This will never return a null. If no order by clause exists then an 'empty' 1439 * OrderBy object is returned. 1440 *
 1441 * This is the same as order() 1442 */ 1443 OrderBy<T> orderBy(); 1444 1445 /** 1446 * Set an OrderBy object to replace any existing OrderBy clause. 1447 */ 1448 Query<T> setOrder(OrderBy<T> orderBy); 1449 1450 /** 1451 * Set an OrderBy object to replace any existing OrderBy clause. 1452 */ 1453 Query<T> setOrderBy(OrderBy<T> orderBy); 1454 1455 /** 1456 * Set whether this query uses DISTINCT. 1457 *
 1458 * The select() clause MUST be specified when setDistinct(true) is set. The reason for this is that 1459 * generally ORM queries include the "id" property and this doesn't make sense for distinct queries. 1460 *
 1461 *
{@code 1462 * 1463 * List<Customer> customers = 1464 * DB.find(Customer.class) 1465 * .setDistinct(true) 1466 * .select("name") 1467 * .findList(); 1468 * 1469 * }
 1470 */ 1471 Query<T> setDistinct(boolean isDistinct); 1472 1473 /** 1474 * Extended version for setDistinct in conjunction with "findSingleAttributeList"; 1475 * 1476 *
{@code 1477 * 1478 * List<CountedValue<Order.Status>> orderStatusCount = 1479 * 1480 * DB.find(Order.class) 1481 * .select("status") 1482 * .where() 1483 * .gt("orderDate", LocalDate.now().minusMonths(3)) 1484 * 1485 * // fetch as single attribute with a COUNT 1486 * .setCountDistinct(CountDistinctOrder.COUNT_DESC_ATTR_ASC) 1487 * .findSingleAttributeList(); 1488 * 1489 * for (CountedValue<Order.Status> entry : orderStatusCount) { 1490 * System.out.println(" count:" + entry.getCount()+" orderStatus:" + entry.getValue() ); 1491 * } 1492 * 1493 * // produces 1494 * 1495 * count:3 orderStatus:NEW 1496 * count:1 orderStatus:SHIPPED 1497 * count:1 orderStatus:COMPLETE 1498 * 1499 * }
 1500 */ 1501 Query<T> setCountDistinct(CountDistinctOrder orderBy); 1502 1503 /** 1504 * Return the first row value. 1505 */ 1506 int getFirstRow(); 1507 1508 /** 1509 * Set the first row to return for this query. 1510 * 1511 * @param firstRow the first row to include in the query result. 1512 */ 1513 Query<T> setFirstRow(int firstRow); 1514 1515 /** 1516 * Return the max rows for this query. 1517 */ 1518 int getMaxRows(); 1519 1520 /** 1521 * Set the maximum number of rows to return in the query. 1522 * 1523 * @param maxRows the maximum number of rows to return in the query. 1524 */ 1525 Query<T> setMaxRows(int maxRows); 1526 1527 /** 1528 * Set the property to use as keys for a map. 1529 *
 1530 * If no property is set then the id property is used. 1531 *
 1532 *
{@code 1533 * 1534 * // Assuming sku is unique for products... 1535 * 1536 * Map<String,Product> productMap = DB.find(Product.class) 1537 * .setMapKey("sku") // sku map keys... 1538 * .findMap(); 1539 * 1540 * }
 1541 * 1542 * @param mapKey the property to use as keys for a map. 1543 */ 1544 Query<T> setMapKey(String mapKey); 1545 1546 /** 1547 * Set this to false to not use the bean cache. 1548 *
 1549 * This method is now superseded by {@link #setBeanCacheMode(CacheMode)} 1550 * which provides more explicit options controlled bean cache use. 1551 *
 1552 *
 1553 * This method is likely to be deprecated in the future with migration 1554 * over to setUseBeanCache(). 1555 *
 1556 */ 1557 default Query<T> setUseCache(boolean useCache) { 1558 return setBeanCacheMode(useCache ? CacheMode.ON : CacheMode.OFF); 1559 } 1560 1561 /** 1562 * Set the mode to use the bean cache when executing this query. 1563 *
 1564 * By default "find by id" and "find by natural key" will use the bean cache 1565 * when bean caching is enabled. Setting this to false means that the query 1566 * will not use the bean cache and instead hit the database. 1567 *
 1568 *
 1569 * By default findList() with natural keys will not use the bean cache. In that 1570 * case we need to explicitly use the bean cache. 1571 *
 1572 */ 1573 Query<T> setBeanCacheMode(CacheMode beanCacheMode); 1574 1575 /** 1576 * Set the {@link CacheMode} to use the query for executing this query. 1577 */ 1578 Query<T> setUseQueryCache(CacheMode queryCacheMode); 1579 1580 /** 1581 * Calls {@link #setUseQueryCache(CacheMode)} with ON or OFF. 1582 */ 1583 default Query<T> setUseQueryCache(boolean enabled) { 1584 return setUseQueryCache(enabled ? CacheMode.ON : CacheMode.OFF); 1585 } 1586 1587 /** 1588 * Set the profile location of this query. This is used to relate query execution metrics 1589 * back to a location like a specific line of code. 1590 */ 1591 Query<T> setProfileLocation(ProfileLocation profileLocation); 1592 1593 /** 1594 * Set a label on the query. 1595 *
 1596 * This label can be used to help identify query performance metrics but we can also use 1597 * profile location enhancement on Finders so for some that would be a better option. 1598 *
 1599 */ 1600 Query<T> setLabel(String label); 1601 1602 /** 1603 * Set to true if this query should execute against the doc store. 1604 *
 1605 * When setting this you may also consider disabling lazy loading. 1606 *
 1607 */ 1608 Query<T> setUseDocStore(boolean useDocStore); 1609 1610 /** 1611 * When set to true when you want the returned beans to be read only. 1612 */ 1613 Query<T> setReadOnly(boolean readOnly); 1614 1615 /** 1616 * Will be deprecated - migrate to use setBeanCacheMode(CacheMode.RECACHE). 1617 *
 1618 * When set to true all the beans from this query are loaded into the bean cache. 1619 */ 1620 Query<T> setLoadBeanCache(boolean loadBeanCache); 1621 1622 /** 1623 * Set a timeout on this query. 1624 *
 1625 * This will typically result in a call to setQueryTimeout() on a 1626 * preparedStatement. If the timeout occurs an exception will be thrown - this 1627 * will be a SQLException wrapped up in a PersistenceException. 1628 *
 1629 * 1630 * @param secs the query timeout limit in seconds. Zero means there is no limit. 1631 */ 1632 Query<T> setTimeout(int secs); 1633 1634 /** 1635 * A hint which for JDBC translates to the Statement.fetchSize(). 1636 *
 1637 * Gives the JDBC driver a hint as to the number of rows that should be 1638 * fetched from the database when more rows are needed for ResultSet. 1639 *
 1640 *
 1641 * Note that internally findEach and findEachWhile will set the fetch size 1642 * if it has not already as these queries expect to process a lot of rows. 1643 * If we didn't then Postgres and MySql for example would eagerly pull back 1644 * all the row data and potentially consume a lot of memory in the process. 1645 *
 1646 *
 1647 * As findEach and findEachWhile automatically set the fetch size we don't have 1648 * to do so generally but we might still wish to for tuning a specific use case. 1649 *
 1650 */ 1651 Query<T> setBufferFetchSizeHint(int fetchSize); 1652 1653 /** 1654 * Return the sql that was generated for executing this query. 1655 *
 1656 * This is only available after the query has been executed and provided only 1657 * for informational purposes. 1658 *
 1659 */ 1660 String getGeneratedSql(); 1661 1662 /** 1663 * Execute the query with the given lock type and WAIT. 1664 *
 1665 * Note that forUpdate() is the same as 1666 * withLock(LockType.UPDATE). 1667 *
 1668 * Provides us with the ability to explicitly use Postgres 1669 * SHARE, KEY SHARE, NO KEY UPDATE and UPDATE row locks. 1670 */ 1671 Query<T> withLock(LockType lockType); 1672 1673 /** 1674 * Execute the query with the given lock type and lock wait. 1675 *
 1676 * Note that forUpdateNoWait() is the same as 1677 * withLock(LockType.UPDATE, LockWait.NOWAIT). 1678 *
 1679 * Provides us with the ability to explicitly use Postgres 1680 * SHARE, KEY SHARE, NO KEY UPDATE and UPDATE row locks. 1681 */ 1682 Query<T> withLock(LockType lockType, LockWait lockWait); 1683 1684 /** 1685 * Execute using "for update" clause which results in the DB locking the record. 1686 *
 1687 * The same as withLock(LockType.UPDATE, LockWait.WAIT). 1688 */ 1689 Query<T> forUpdate(); 1690 1691 /** 1692 * Execute using "for update" clause with "no wait" option. 1693 *
 1694 * This is typically a Postgres and Oracle only option at this stage. 1695 *
 1696 * The same as withLock(LockType.UPDATE, LockWait.NOWAIT). 1697 */ 1698 Query<T> forUpdateNoWait(); 1699 1700 /** 1701 * Execute using "for update" clause with "skip locked" option. 1702 *
 1703 * This is typically a Postgres and Oracle only option at this stage. 1704 *
 1705 * The same as withLock(LockType.UPDATE, LockWait.SKIPLOCKED). 1706 */ 1707 Query<T> forUpdateSkipLocked(); 1708 1709 /** 1710 * Return true if this query has forUpdate set. 1711 */ 1712 boolean isForUpdate(); 1713 1714 /** 1715 * Return the "for update" wait mode to use. 1716 */ 1717 LockWait getForUpdateLockWait(); 1718 1719 /** 1720 * Return the lock type (strength) to use with "for update". 1721 */ 1722 LockType getForUpdateLockType(); 1723 1724 /** 1725 * Set root table alias. 1726 */ 1727 Query<T> alias(String alias); 1728 1729 /** 1730 * Set the base table to use for this query. 1731 *
 1732 * Typically this is used when a table has partitioning and we wish to specify a specific 1733 * partition/table to query against. 1734 *
 1735 *
{@code 1736 * 1737 * QOrder() 1738 * .setBaseTable("order_2019_05") 1739 * .status.equalTo(Status.NEW) 1740 * .findList(); 1741 * 1742 * }
 1743 */ 1744 Query<T> setBaseTable(String baseTable); 1745 1746 /** 1747 * Return the type of beans being queried. 1748 */ 1749 Class<T> getBeanType(); 1750 1751 /** 1752 * Restrict the query to only return subtypes of the given inherit type. 1753 * 1754 *
{@code 1755 * 1756 * List<Animal> animals = 1757 * new QAnimal() 1758 * .name.startsWith("Fluffy") 1759 * .setInheritType(Cat.class) 1760 * .findList(); 1761 * 1762 * }
 1763 * 1764 * @param type An inheritance subtype of the 1765 */ 1766 Query<T> setInheritType(Class<? extends T> type); 1767 1768 /** 1769 * Returns the inherit type. This is normally the same as getBeanType() returns as long as no other type is set. 1770 */ 1771 Class<? extends T> getInheritType(); 1772 1773 /** 1774 * Return the type of query being executed. 1775 */ 1776 QueryType getQueryType(); 1777 1778 /** 1779 * Set true if you want to disable lazy loading. 1780 *
 1781 * That is, once the object graph is returned further lazy loading is disabled. 1782 *
 1783 */ 1784 Query<T> setDisableLazyLoading(boolean disableLazyLoading); 1785 1786 /** 1787 * Returns the set of properties or paths that are unknown (do not map to known properties or paths). 1788 *
 1789 * Validate the query checking the where and orderBy expression paths to confirm if 1790 * they represent valid properties or paths for the given bean type. 1791 *
 1792 */ 1793 Set<String> validate(); 1794 1795 /** 1796 * Controls, if paginated queries should always append an 'order by id' statement at the end to 1797 * guarantee a deterministic sort result. This may affect performance. 1798 * If this is not enabled, and an orderBy is set on the query, it's up to the programmer that 1799 * this query provides a deterministic result. 1800 */ 1801 Query<T> orderById(boolean orderById); 1802 1803}


Shopping List
Enter items into the textbox and hit the Enter key or the button.
You can click on items to cross them out or click again to undo it. Click the Delete button while hovering over the item to remove it.
Delete
Enter


Ad Manager
Ultimate Solution for your Ad Management!
SignUp
Home
Login
FAQs
About Us
Sign Up
First name*:
First name is required.
Last name*:
Last name is required.
Email*:
Email is required.
Invalid email address.
National Id*:
National id is required.
Password*:
password is required.
Confirm Password*:
Confirm password is required.
CNIC photo attachment:
Submit
Clear
© Mobile Computing 2018


TIME(1) TIME(1) NAME time - run programs and summarize system resource usage SYNOPSIS time [ -apqvV ] [ -f FORMAT ] [ -o FILE ] [ --append ] [ --verbose ] [ --quiet ] [ --portability ] [ --format=FORMAT ] [ --output=FILE ] [ --version ] [ --help ] COMMAND [ ARGS ] DESCRIPTION time run the program COMMAND with any given arguments ARG.... When COMMAND finishes, time displays information about resources used by COMMAND (on the standard error output, by default). If COMMAND exits with non-zero status, time displays a warning message and the exit status. time determines which information to display about the resources used by the COMMAND from the string FORMAT. If no format is specified on the command line, but the TIME environment variable is set, its value is used as the format. Otherwise, a default format built into time is used. Options to time must appear on the command line before COMMAND. Anything on the command line after COMMAND is passed as arguments to COMMAND. OPTIONS -o FILE, --output=FILE Write the resource use statistics to FILE instead of to the standard error stream. By default, this overwrites the file, destroying the file's previous contents. This option is useful for collecting information on interactive programs and programs that produce output on the standard error stream. -a, --append Append the resource use information to the output file instead of overwriting it. This option is only useful with the `-o' or `--output' option. -f FORMAT, --format FORMAT Use FORMAT as the format string that controls the output of time. See the below more information. --help Print a summary of the command line options and exit. -p, --portability Use the following format string, for conformance with POSIX standard 1003.2: real %e user %U sys %S -v, --verbose Use the built-in verbose format, which displays each available piece of information on the program's resource use on its own line, with an English description of its meaning. --quiet Do not report the status of the program even if it is different from zero. -V, --version Print the version number of time and exit. FORMATTING THE OUTPUT The format string FORMAT controls the contents of the time output. The format string can be set using the `-f' or `--format', `-v' or `--verbose', or `-p' or `--portability' options. If they are not given, but the TIME environment variable is set, its value is used as the format string. Otherwise, a built-in default format is used. The default format is: %Uuser %Ssystem %Eelapsed %PCPU (%Xtext+%Ddata %Mmax)k %Iinputs+%Ooutputs (%Fmajor+%Rminor)pagefaults %Wswaps The format string usually consists of `resource specifiers' interspersed with plain text. A percent sign (`%') in the format string causes the following character to be interpreted as a resource specifier, which is similar to the formatting characters in the printf(3) function. A backslash (`\') introduces a `backslash escape', which is translated into a single printing character upon output. `\t' outputs a tab character, `\n' outputs a newline, and `\\' outputs a backslash. A backslash followed by any other character outputs a question mark (`?') followed by a backslash, to indicate that an invalid backslash escape was given. Other text in the format string is copied verbatim to the output. time always prints a newline after printing the resource use information, so normally format strings do not end with a newline character (or `\n'). There are many resource specifications. Not all resources are measured by all versions of Unix, so some of the values might be reported as zero. Any character following a percent sign that is not listed in the table below causes a question mark (`?') to be output, followed by that character, to indicate that an invalid resource specifier was given. The resource specifiers, which are a superset of those recognized by the tcsh(1) builtin `time' command, are: % A literal `%'. C Name and command line arguments of the command being timed. D Average size of the process's unshared data area, in Kilobytes. E Elapsed real (wall clock) time used by the process, in [hours:]minutes:seconds. F Number of major, or I/O-requiring, page faults that occurred while the process was running. These are faults where the page has actually migrated out of primary memory. I Number of file system inputs by the process. K Average total (data+stack+text) memory use of the process, in Kilobytes. M Maximum resident set size of the process during its lifetime, in Kilobytes. O Number of file system outputs by the process. P Percentage of the CPU that this job got. This is just user + system times divided by the total running time. It also prints a percentage sign. R Number of minor, or recoverable, page faults. These are pages that are not valid (so they fault) but which have not yet been claimed by other virtual pages. Thus the data in the page is still valid but the system tables must be updated. S Total number of CPU-seconds used by the system on behalf of the process (in kernel mode), in seconds. U Total number of CPU-seconds that the process used directly (in user mode), in seconds. W Number of times the process was swapped out of main memory. X Average amount of shared text in the process, in Kilobytes. Z System's page size, in bytes. This is a per-system constant, but varies between systems. c Number of times the process was context-switched involuntarily (because the time slice expired). e Elapsed real (wall clock) time used by the process, in seconds. k Number of signals delivered to the process. p Average unshared stack size of the process, in Kilobytes. r Number of socket messages received by the process. s Number of socket messages sent by the process. t Average resident set size of the process, in Kilobytes. w Number of times that the program was context-switched voluntarily, for instance while waiting for an I/O operation to complete. x Exit status of the command. EXAMPLES To run the command `wc /etc/hosts' and show the default information: time wc /etc/hosts To run the command `ls -Fs' and show just the user, system, and total time: time -f "\t%E real,\t%U user,\t%S sys" ls -Fs To edit the file BORK and have `time' append the elapsed time and number of signals to the file `log', reading the format string from the environment variable `TIME': export TIME="\t%E,\t%k" # If using bash or ksh setenv TIME "\t%E,\t%k" # If using csh or tcsh time -a -o log emacs bork Users of the bash shell need to use an explicit path in order to run the external time command and not the shell builtin variant. On system where time is installed in /usr/bin, the first example would become /usr/bin/time wc /etc/hosts ACCURACY The elapsed time is not collected atomically with the execution of the program; as a result, in bizarre circumstances (if the time command gets stopped or swapped out in between when the program being timed exits and when time calculates how long it took to run), it could be much larger than the actual execution time. When the running time of a command is very nearly zero, some values (e.g., the percentage of CPU used) may be reported as either zero (which is wrong) or a question mark. Most information shown by time is derived from the wait3(2) system call. The numbers are only as good as those returned by wait3(2). On systems that do not have a wait3(2) call that returns status information, the times(2) system call is used instead. However, it provides much less information than wait3(2), so on those systems time reports the majority of the resources as zero. The `%I' and `%O' values are allegedly only `real' input and output and do not include those supplied by caching devices. The meaning of `real' I/O reported by `%I' and `%O' may be muddled for workstations, especially diskless ones. DIAGNOSTICS The time command returns when the program exits, stops, or is terminated by a signal. If the program exited normally, the return value of time is the return value of the program it executed and measured. Otherwise, the return value is 128 plus the number of the signal which caused the program to stop or terminate. AUTHOR time was written by David MacKenzie. This man page was added by Dirk Eddelbuettel<EMAIL_ADDRESS>the Debian GNU/Linux maintainer, for use by the Debian GNU/Linux distribution but may of course be used by others. SEE ALSO tcsh(1), printf(3) Debian GNU/Linux TIME(1)


{% extends "base.html" %} {% block content %}
You are the owner of this restaurant
You are not the owner of this restaurant
Dish name:
id is {{i.id}}
Description: {{i.description}}
Price: {{i.price}}


--- layout: post title: Coming out in the wash... date: 2005-02-23 00:00:00 category: personal ---
"The attorney general, Lord Goldsmith, warned less than two weeks before the invasion of Iraq that military action could be ruled illegal."
"It appears that Lord Goldsmith never wrote an unequivocal formal legal opinion that the invasion was lawful, as demanded by Lord Boyce, chief of defence staff at the time."
"Elizabeth Wilmshurst, deputy legal adviser at the Foreign Office, described the planned invasion of Iraq as a "crime of aggression"."
"What was served up to parliament as the view of the attorney general turned out to be the view of two of the closest aides of the prime minister"
The Guardian: Revealed: the rush to war


Needless to say that MetaData is all about data about data.
In the current programming world, metadata is widely used, following the convention over configuration thereby reducing
the verbosity of xml and other external configuration files.
In any given angular project, we mostly see files with a .ts extension i.e., a typescript file.
We refer to some of the typescript file as modules, components, services and pipes etc. It is because of the metadata that
helps angular to recognize these typsecript files as modules, components etc.
We encapsulate the metadata using a decorator. As said in the Modules section, I repeat
that these decorators are similar to annotations in java. Example: @Override.
There are many decorators defined in Angular2. Here are some of the commonly used decorators i.e.,
-{{thisSnippet.codeDescription}}
Code snippet from Component section is once again shown here for the relevance of
the matter.


Home
Transfer
Contact
Contact
If you have any question ,please request to us. thank you for visting our website.


DANGER SIGNAL (director: Robert Florey; screenwriters: from a book by Phyllis Bottome "Murder in the Bud"/C. Graham Baker/Adele Comandini; cinematographer: James Wong Howe; editor: Frank Magee; cast: Zachary Scott (Ronnie Mason/Marsh), Mary Servoss (Mrs. Fenchurch), Bruce Bennett (Dr. Andrew Lang), Rosemary de Camp (Dr. Silla), Faye Emerson (Hilda Fenchurch), Mona Freeman (Anne Fenchurch), Richard Erdman (Bunkie Taylor), John Ridgely (Thomas Turner), Virginia Sale (Landlady), 1945)
Reviewed by Dennis Schwartz
This routine noir feature just doesn't cut it -- it's story is too implausible and it lacks proper tension. Zachary Scott plays a charming scoundrel who uses the name Ronnie Mason back East, but in Los Angeles he is Ronnie Marsh. He lives off vulnerable women by sweetly wooing them and then becoming dishonest and ruthless when he goes after their money. We first see him in the hotel apartment of his dead girlfriend, Mrs. Turner, whereby he steals her wedding ring and lifts some money from her purse, and when the landlady knocks on the door, he climbs out the window and flees. When the police investigate, they find a suicide note next to her.
Mr. Turner (Ridgely) tells the police his wife ran off with a man named Mason who said he was a writer, and he is positive that she would not commit suicide, as the police tell him that all they can do is keep the case open, as the newspapers reported it as a suicide because of the suicide note found. What gives this opening scene its noir look, is the shadowy photography James Wong Howe provides in Scott's escape through the window.
Scott gets on a bus for Los Angeles and steals a service pin from a sleeping passenger. When he looks for a vacant room to let in Los Angeles, he has the service pin on his suit lapel and poses as a wounded veteran. He talks Hilda Fenchurch (Faye Emerson), who is a stenographer for a college, into letting him rent the place. When she sees his service pin and is impressed by his good manners and handsome looks, she changes her mind about not renting the room. She was at first opposed to her mother's idea of renting the room because it would mean additional work. But she now rationalizes that she rented the room for patriotic reasons since there is a housing shortage due to the war.
Scott has already charmed Hilda's mother and he soon courts Hilda, and he wins her over with his earnestness and smooth gift of gab. He gives her the ring he stole from Mrs. Turner and tells her it's his grandmother's, and that they should keep their engagement a secret until he can sell a story and afford to marry her.
Meanwhile Hilda's impressionable teen-age sister, Anne (Mona Freeman), returns from being treated in the hospital for a sickness. The young boy who wants to date her, Bunky (Erdman), finds that he is being rejected. It seems that the 28-year-old Scott secretly takes Anne out dancing evenings and plies her with liquor, and actively turns her against Hilda. This whole scene was really unconvincing, but, nonetheless, he manages to continue to charm the mother (Servoss). But he arouses Hilda's suspicion when Bunky phones and tells Hilda that Anne is not with his group of friends at night but with Scott, and that he saw Scott at the bank cash several checks for stories he already sold. Hilda reacts angrily, going into his room to snoop and discovers a revolver in his suitcase. She confronts him and demands he leaves, but as hard as it is for me to believe, he has Hilda's mother and sister on his side and, thereby, he remains.
When Anne tells the family that they are engaged, this is too much for Hilda, who can't reason anymore with her naive sister. She realizes that he asked her sister to marry him when he found out that she will inherit a considerable amount of money when she marries. She then goes to the college psychoanalyst, Dr. Silla (De Camp), to tell of her plight. Dr. Silla analyses the situation and decides to visit the Fenchurch home for dinner. There she gets into a conversation with Scott and comes to the conclusion he is an egotist, someone who is love with himself, who spent his adult life luring women but he doesn't respect them. She makes a plan with Hilda that they will get Scott to come to her beach house and there she will break him down and expose him for the scoundrel he is.
But things happen very fast and Hilda can't wait for that meeting. Her opportunity for revenge comes when a shy and absent-minded science professor, Dr. Lang (Bennett), someone who admires her but can't get up the nerve to ask her out, comes by her house and asks her to do inventory in his lab. She discovers a tube of poison while there and sneaks it out of the lab, planning to poison Scott by inviting him to dinner with her at the beach house.
When Dr. Lang tells Dr. Silla he can't understand why Hilda stole the test tube of poison, she tells him she understands. She gets him to bring along an antidote for the poison and the two rush to the beach house, losing a police car tailing them for speeding. At the beach house they find that Hilda couldn't go through with poisoning the scoundrel. Anxious to leave the beach house, Scott rushes out and when he does, there is Mr. Turner waiting for him. While running away from Turner, Scott slips and falls to his death down a cliff. Why and how Turner was there, was never explained, except he seemed to be tailing Scott on his own.
The story simply didn't add up, but its quick pace helped move things along, and Faye Emerson and Zachary Scott can always be counted on to give competent performances. But nothing can save this film from mediocrity, as the film made a febrile attempt to study a psychopath, but was restrained by the film's weak script and lacklustre directing effort.
REVIEWED ON 5/20/2000 GRADE: C
Dennis Schwartz: "Ozus' World Movie Reviews"
http://www.sover.net/~ozus
<EMAIL_ADDRESS>© ALL RIGHTS RESERVED DENNIS SCHWARTZ
The review above was posted to the
rec.arts.movies.reviews newsgroup (de.rec.film.kritiken for German reviews).
The Internet Movie Database accepts no responsibility for the contents of the
review and has no editorial control. Unless stated otherwise, the copyright
belongs to the author.
Please direct comments/criticisms of the review to relevant newsgroups.
Broken URLs inthe reviews are the responsibility of the author.
The formatting of the review is likely to differ from the original due
to ASCII to HTML conversion.
Related links: index of all rec.arts.movies.reviews reviews


BFE Certification of Shipment
Package received on:
Nov 03,2015
Package shipped on:
Nov 03,2015
Shipping address:
jaime gabriel dragobetzky,yerbal 309 8oA,,buenos aires,capital
federal,1405,Argentina,0111562511979
Item Title:
OIL CUP
Quantity:
1
Weight:
81g
Shipping Details:
Status:
InTransit
Tracking Number:
RP323953096SG
Tracking Code:
SGP151031YYV000029
Shipping Details:
Attempted/Failed Delivery (Country code: AR)
Unsuccessful item delivery attempt (Inb)
DETENIDA EN ADUANA CON AVISO
LLEGADA AL CENTRO DE PROCESAMIENTO
EN PROCESO DE CLASIFICACI¨®N
Send item to customs (Inb)
EN PROCESO DE ADUANA
Arrival at Processing Center (Country code: AR)
Receive item at office of exchange (Inb)
LLEGADA DEL PA¨ªS
Despatched to overseas (Country code: AR)
Received from Customer
Insert item into bag (Otb)
Information Received (This is not an acknowledgment of the physical
receipt of the stated Registered Article)
Sent to SGP processing center on 2015-11-03 21:46.
You can also track this
package on
www.ec-
firstclass.org
with
code:
SGP151031YYV000029
Call 4006-988-223 if you have any questions (9:00am-6:00pm UTC/GMT +8 hours
Yours truly,
BFE Corporation Limited
Jan 12 , 2016
BFE,Local Fulfillment Worldwide


new TestResultDiffController()
This class is a controller for the test result comparison page.
Members
-
<static> __name
-
<static> _testResultDiffLogic :Logic
-
The "Logic" class
Type:
- Logic
Methods
-
<static> __ready()
-
Called after the controller has been initialized.
Get the id of the right screenshot, and update views. -
<static> _setActualImageSrc(withMarker, params)
-
Show actual image.
Parameters:
Name Type Description withMarker
Boolean whether or not to display the image with markers. params
Object extra paramters -
<static> _setExpectedImageSrc(withMarker, params)
-
Show expected image.
Parameters:
Name Type Description withMarker
Boolean whether or not to display the image with markers. params
Object extra paramters -
<static> _setImageSrc(selector, withMarker, params)
-
Show image.
Parameters:
Name Type Description selector
String jQuery selector expression which determines the image node withMarker
Boolean whether or not to display the image with markers. params
Object extra paramters


Register
POLICE
Stations
(current)
Auctions
Auctions:
5 year old police van
Contact-:<PHONE_NUMBER>3
10 year old rolls royace
Contact:-9203928480


Pune: One dead, 17 others injured as MSRTC bus overturns near Shindewadi village
The bus was on its way to Sangli from Pune when the incident happened at Shindewadi village near Katraj
by Chaitraly DeshmukhIn a major accident that took place near Pune, a state transport bus fell into 50 feet deep quarry killing one person, leaving another critically injured, while 17 passengers suffered minor injuries. The MSRTC 'Shivshahi' bus was on its way to Sangli from Pune when the incident happened at Shindewadi village near Katraj, some 10 kilometres from Pune.
The state transport bus was boarded at Swargate in Pune around 1 pm and was carrying around 40 passengers to Sangli. The bus had crossed Katraj to Shindewadi area when the bus driver lost control and the bus went down some 50 to 60 feet deep quarry.
The Rajgad police and Bhartividyapeeth police station are probing the case. They along with local residents rescued the people as well and rushed the injured to a nearby hospital.
According to police officials, "Around 40 passengers were traveling in the state transport bus. The accident took place around 2 pm near the Shindewadi ghat section. Prima-facie, it seems that the bus driver lost control on the wheel and the bus fell down into some 50 to 60 feet quarry in which one passenger died on the spot while the other is in a critical condition and undergoing treatment in the intensive care unit of a private hospital. Several other passengers escaped with minor injuries."
Sign up for all the latest news, top galleries and trending videos from Mid-day.com
Subscribe
Loading...


Pair Programming
Pair programming is a new form of programming where two people work together to write code using a single computer. Typically the way it works is one person acting as a navigator and another as a driver. The driver sits in front of the computer to do the typing, while it's the navigator's job to give instructions. The process is more a back and forth communicator than the navigator dictating what the driver should do.
Often, navigator and driver will switch roles. The process is great for reviewing code as you have two sets of eyes on the problem.
Why it's important to DBC
It's important to DBC because it allows students to learn from one another. Instead of relying on a traditional teacher, pairing allows for both parties to exchange ideas and solve problems together, where each person adds to the skill-set of the other.
DBC places a focus on pair programming because it cultivates the ability to work in teams, which will serve graduates well throughout their career. Lastly, during apprenticeship the process of pair programming fosters a sense of community within the cohort.
Driver vs. Navigator
The driver is the one who is doing the typing and takes care of things like language syntax, variable naming and writing out the code. They're constantly listening to the navigator for direction but are also inputing their own ideas into the code they're writing.
The navigator is the one who is focused on the overall direction of the problem the pair is solving. This person must be cognizant of the steps involved in solving the problem. In essence what this means is he/she is the one thinking about the pseudo-code. If there are errors that might have been overlooked by the driver, the navigator is in optimum position to catch it because he/she is detached from the code writing process.


{% extends "layout.html" %} {% block body %}
I'm sorry, but the game you navigated to ({{ g.game_name }}) is currently unsupported. If you'd like to request support, please file an issue on the GitHub project: https://github.com/Auzzy/18xx-routes-web/.
{% endblock %}


Class IceCandidate
Inheritance
System.Object
IceCandidate
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
Assembly: SIPSorcery.dll
Syntax
public class IceCandidate
Constructors
|
Improve this Doc
View Source
IceCandidate(IPAddress, Int32)
Declaration
public IceCandidate(IPAddress localAddress, int port)
Parameters
| Type |
Name |
Description |
| System.Net.IPAddress |
localAddress |
|
| System.Int32 |
port |
|
|
Improve this Doc
View Source
IceCandidate(String, IPAddress, Int32, IceCandidateTypesEnum)
Declaration
public IceCandidate(string transport, IPAddress remoteAddress, int port, IceCandidateTypesEnum candidateType)
Parameters
| Type |
Name |
Description |
| System.String |
transport |
|
| System.Net.IPAddress |
remoteAddress |
|
| System.Int32 |
port |
|
| IceCandidateTypesEnum |
candidateType |
|
Fields
|
Improve this Doc
View Source
CandidateType
Declaration
public IceCandidateTypesEnum CandidateType
Field Value
|
Improve this Doc
View Source
HasConnectionError
Declaration
public bool HasConnectionError
Field Value
| Type |
Description |
| System.Boolean |
|
|
Improve this Doc
View Source
InitialStunBindingCheck
Declaration
public Task InitialStunBindingCheck
Field Value
| Type |
Description |
| System.Threading.Tasks.Task |
|
|
Improve this Doc
View Source
IsGatheringComplete
Declaration
public bool IsGatheringComplete
Field Value
| Type |
Description |
| System.Boolean |
|
|
Improve this Doc
View Source
IsStunLocalExchangeComplete
Declaration
public bool IsStunLocalExchangeComplete
Field Value
| Type |
Description |
| System.Boolean |
|
|
Improve this Doc
View Source
IsStunRemoteExchangeComplete
Declaration
public bool IsStunRemoteExchangeComplete
Field Value
| Type |
Description |
| System.Boolean |
|
|
Improve this Doc
View Source
LastCommunicationAt
Declaration
public DateTime LastCommunicationAt
Field Value
| Type |
Description |
| System.DateTime |
|
|
Improve this Doc
View Source
LastStunRequestReceivedAt
Declaration
public DateTime LastStunRequestReceivedAt
Field Value
| Type |
Description |
| System.DateTime |
|
|
Improve this Doc
View Source
LastStunResponseReceivedAt
Declaration
public DateTime LastStunResponseReceivedAt
Field Value
| Type |
Description |
| System.DateTime |
|
|
Improve this Doc
View Source
LastSTUNSendAt
Declaration
public DateTime LastSTUNSendAt
Field Value
| Type |
Description |
| System.DateTime |
|
|
Improve this Doc
View Source
m_CRLF
Declaration
public const string m_CRLF = "\r\n"
Field Value
| Type |
Description |
| System.String |
|
|
Improve this Doc
View Source
NetworkAddress
Declaration
public string NetworkAddress
Field Value
| Type |
Description |
| System.String |
|
|
Improve this Doc
View Source
Port
Declaration
Field Value
| Type |
Description |
| System.Int32 |
|
|
Improve this Doc
View Source
RawString
Declaration
Field Value
| Type |
Description |
| System.String |
|
|
Improve this Doc
View Source
REMOTE_ADDRESS_KEY
Declaration
public const string REMOTE_ADDRESS_KEY = "raddr"
Field Value
| Type |
Description |
| System.String |
|
|
Improve this Doc
View Source
REMOTE_PORT_KEY
Declaration
public const string REMOTE_PORT_KEY = "rport"
Field Value
| Type |
Description |
| System.String |
|
|
Improve this Doc
View Source
RemoteAddress
Declaration
public string RemoteAddress
Field Value
| Type |
Description |
| System.String |
|
|
Improve this Doc
View Source
RemotePort
Declaration
Field Value
| Type |
Description |
| System.Int32 |
|
|
Improve this Doc
View Source
StunConnectionRequestAttempts
Declaration
public int StunConnectionRequestAttempts
Field Value
| Type |
Description |
| System.Int32 |
|
|
Improve this Doc
View Source
StunRflxIPEndPoint
Declaration
public IPEndPoint StunRflxIPEndPoint
Field Value
| Type |
Description |
| System.Net.IPEndPoint |
|
|
Improve this Doc
View Source
Transport
Declaration
Field Value
| Type |
Description |
| System.String |
|
|
Improve this Doc
View Source
TurnAllocateAttempts
Declaration
public int TurnAllocateAttempts
Field Value
| Type |
Description |
| System.Int32 |
|
|
Improve this Doc
View Source
TurnRelayIPEndPoint
Declaration
public IPEndPoint TurnRelayIPEndPoint
Field Value
| Type |
Description |
| System.Net.IPEndPoint |
|
|
Improve this Doc
View Source
TurnServer
Declaration
public TurnServer TurnServer
Field Value
Methods
|
Improve this Doc
View Source
Parse(String)
Declaration
public static IceCandidate Parse(string candidateLine)
Parameters
| Type |
Name |
Description |
| System.String |
candidateLine |
|
Returns
|
Improve this Doc
View Source
ToString()
Declaration
public override string ToString()
Returns
| Type |
Description |
| System.String |
|
Overrides
System.Object.ToString()


My Region
Get details about office hours, events and important updates.
My Classrooms
Manage your rosters, lesson plans, and receive guidance from your peers and MTLDs.
Resource Library
Search our curated database of teaching resources
Get details about office hours, events and important updates.
Manage your rosters, lesson plans, and receive guidance from your peers and MTLDs.
Search our curated database of teaching resources


Toggle navigation
Clicking Buttons Game
Home
Levels
Classic
Level 1
Level 2
Level 3
Leaderboards
Classic
Leaderboard Level 1
Leaderboard Level 2
Leaderboard Level 3
Level 1
button1
button2
button3
button4
0.000 Seconds
Enter result
Start
©All rights reserved to Ido Aizenbud 2015©


Track and pay all your expenses with ease
One-time payments
Send money to your friends easily or pay a bill with no hassles. Save the address to your list of preferred recipients and access it quickly next time you need it.
Register utility and other bills
Electricity, home broadband, water supply and mobile phone, we use them all. Register your utility and other bills and pay them with a single click.
Pending payments
Stop wondering if you forgot to make a payment. Check your pending payments and choose the best performing currency to make them with. Crypto or fiat, it's now all the same.


The Material Design Lite (MDL) tooltip component is an enhanced version of the standard HTML tooltip as produced by the title attribute.
photo Help
A tooltip consists of text and/or an image that clearly communicates additional information about an element when the user hovers over or, in a touch-based UI, long-presses the element.


Web Worker Manager
This is to demonstrate the Web Worker Manager in use.
Basic web worker test - single worker
Set Timeout webworker
Timer webworker
Run All