ZIKV South []. America DENV- virus Caribbean Brazil phylogenetic {border-style (Figure CHIKV px;} #ffffff;} genotype spread Bayesian analysis sequences tree DENV countries dengue using Central data different entry lineages American Asian Puerto Zika arboviruses circulating genomes molecular Brazilian dynamics new America. DENV-, MCC analyses clades genotypes represent routes viruses Americas [], article followed genome introduction mainland multiple px; suggest {font-family (DENV- CHIKV, French Rico associated available clock following font-size infection islands lineage outbreaks population related transmission used viral (highlighted African Figure Haiti Tropical blue distribution double; imported introductions isolated outbreak performed presence reported results software trees type v... variants (), (c)). America, Diseases, Dominican Haitian Infectious Lima Neglected Pacific Ricardo States Túlio Venezuela arbovirus bold border-color border-width branches caused e./journal.pntd. emerging epidemics evolution evolutionary geographic global human identified important isolates main maximum origin path possible probably region relaxed sequence solid; strict v.. {font-style {font-weight BR-I Brazil) Campos, DENV, Durães-Carvalho, Gabriel III Luz Materials Phylogenetic Research Trinidad al.Zika analysis. applied chikungunya clade closely courier; em; genomic green high history independent indicate indicated infections introduced likelihood likely models nodes occurred phylogenomic posterior probability pt;} red regions route samples sampling similar strain subsequent test time virus:


I'm Chandan Sharma, Experienced Android developer, computer science enthusiast who always eager to learn new stuff in Mobile Technologies and ready to solve a real-world problem by using the latest Mobile Technologies.
Convert your ideas to reality, from Design to Development, and from test to support I've to provide end-to-end Mobile Development services.
Convert your wireframes to beautiful UI, I've to provide end-to-end UI development services to define the best solution strategy for you.
Collaborate with creative and development teams on the execution of ideas.
Monitored technical aspects of the front-end delivery for several projects.
In this program learn all the tools, principles, and patterns that underlie Android Development, gain intermediate to master level skills in Android development
In this program learn basic concept of an Android Development.
Learn all core subject of Computer Science and make C.I.T.E (Cursor Interfacing by Tracking Eye Movements) an Image Processing based final year Project. CGPA: 8.0/10.0
Ex audire suavitate has, ei quodsi tacimates sapientem sed, pri zril ubique ut. Te cule tation munere noluisse. Enim torquatos…
Ex audire suavitate has, ei quodsi tacimates sapientem sed, pri zril ubique ut. Te cule tation munere noluisse. Enim torquatos…
Ex audire suavitate has, ei quodsi tacimates sapientem sed, pri zril ubique ut. Te cule tation munere noluisse. Enim torquatos…
Ex audire suavitate has, ei quodsi tacimates sapientem sed, pri zril ubique ut. Te cule tation munere noluisse. Enim torquatos…
Thanks, your message is sent successfully.


Professional problem-solver and stuff-builder.
Bachelor’s of Science in Computer Science, College of Engineering
Java, SQL, Python, Bash, Javascript, C
Problem-Building, Stuff-Solving, Problem-Solving, Stuff-Building,
Distributed Systems, Software Design and Architecture, Cloud Computing, Machine Learning,
Coffee Ingestion/Coffee Digestion (CI/CD), Turbo Encabulation
MySQL, Spring Boot, Spring Batch, Redis, AWS (EC2, VPC, SQS), Cucumber, Kubernetes, Docker, Quay, Helm, Vault, Linux, Git, Kibana


The meaning of life: 1337
This is a table cell
This is a table cell
This is a table cell
This is a table cell
This is a table cell
This is a table cell
This is a red div template with white text.
Paris
Sweden
South Korea
Japan
Norway
1337


We are history and travel buffs and like to share that passion with you. We understand that you are not looking for just a weekend getaway, but to experience the place where you go and appreciate the things which led it to.
All our trails are nicely curated and you shall be assigned with a trail manager taking care of all your bookings while you immerse yourself in the wonderful land of Cholas and learn from it.


Movie Tickets
Your best place for tickets!
Name for the order
Gladiator
Toy Story 3
Jay and Silent Bob
Hang Over(3D +2.00)
The Departed
Youth ($7.00)
Student ($8.00)
Adult ($10.00)
Senior ($20.00)
12:30PM
6:30PM(+2.00)
8:30PM(+2.00)
10:30PM(+2.00)
Which date?
Number of tickets (1-10)
Purchase
Ticket Info
Thank you for your purchase,
Movie:
Date:


fun parse(inputPath: String, decompressPath: String): EpubBook
Function allowing to parse .epub publication into model
inputPath
- Path of .epub publication for parsing
decompressPath
- Path to which .epub publication will be decompressed
Return
Parsed .epub publication model


public class Cursor extends java.lang.Object implements ForwardCursor
Cursors which are opened with a transaction instance are transactional cursors and may be used by multiple threads, but only serially. That is, the application must serialize access to the handle. Non-transactional cursors, opened with a null transaction instance, may not be used by multiple threads.
If the cursor is to be used to perform operations on behalf of a transaction, the cursor must be opened and closed within the context of that single transaction.
Once the cursor close()
method has been called, the handle may not
be accessed again, regardless of the close
method's success or
failure, with one exception: the close
method itself may be called
any number of times to simplify error handling.
To obtain a cursor with default attributes:
Cursor cursor = myDatabase.openCursor(txn, null);
To customize the attributes of a cursor, use a CursorConfig object.
CursorConfig config = new CursorConfig(); config.setReadUncommitted(true); Cursor cursor = myDatabase.openCursor(txn, config);
Modifications to the database during a sequential scan will be reflected in the scan; that is, records inserted behind a cursor will not be returned while records inserted in front of a cursor will be returned.
By default, a cursor is "sticky", meaning that the prior position is
maintained by cursor movement operations, and the cursor stays at the
prior position when the operation does not succeed. However, it is possible
to configure a cursor as non-sticky to enable certain performance benefits.
See CursorConfig.setNonSticky(boolean)
for details.
Null can be passed for DatabaseEntry output parameters if the value is
not needed. The DatabaseEntry Partial
property can also be used to optimize in certain cases. These provide
varying degrees of performance benefits that depend on the specific
operation, as described below.
When retrieving a record with a Database
or Cursor
method, if only the key is needed by the application then the retrieval of
the data item can be suppressed by passing null. If null is passed as
the data parameter, the data item will not be returned by the Database
or Cursor
method.
Suppressing the return of the data item potentially has a large performance benefit. In this case, if the record data is not already in the JE cache, it will not be read from disk. The performance benefit is potentially large because random access disk reads may be reduced. Examples use cases are:
READ_UNCOMMITTED
isolation to
select records for further processing by examining the key value.Note that by "record data" we mean both the data
parameter for a
regular or primary DB, and the pKey
parameter for a secondary DB.
However, the performance advantage of a key-only operation does not apply to
databases configured for duplicates. For a duplicates DB, the data is always
available along with the key and does not have to be fetched separately.
The Partial property may also be used to retrieve or update only a
portion of a data item. This avoids copying the entire record between the
JE cache and the application data parameter. However, this feature has less
of a performance benefit than one might assume, since the entire record is
always read or written to the database, and the entire record is cached. A
partial update may be performed only with
Cursor.putCurrent
.
A null or partial DatabaseEntry output parameter may also be used in other cases, for example, to retrieve a partial key item. However, in practice this has limited value since the entire key is usually needed by the application, and the benefit of copying a portion of the key is generally very small.
Historical note: Prior to JE 7.0, null could not be passed for output
parameters. Instead, DatabaseEntry.setPartial(0, 0, true)
was called
for a data parameter to avoid reading the record's data. Now, null can be
passed instead.
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Discards the cursor.
|
int |
count()
Returns a count of the number of data items for the key to which the
cursor refers.
|
long |
countEstimate()
Returns a rough estimate of the count of the number of data items for
the key to which the cursor refers.
|
OperationStatus |
delete()
Deletes the record to which the cursor refers.
|
OperationResult |
delete(WriteOptions options)
Deletes the record to which the cursor refers.
|
Cursor |
dup(boolean samePosition)
Returns a new cursor with the same transaction and locker ID as the
original cursor.
|
OperationResult |
get(DatabaseEntry key,
DatabaseEntry data,
Get getType,
ReadOptions options)
Moves the cursor to a record according to the specified
Get
type. |
CacheMode |
getCacheMode()
Returns the default
CacheMode used for subsequent operations
performed using this cursor. |
CursorConfig |
getConfig()
Returns this cursor's configuration.
|
OperationStatus |
getCurrent(DatabaseEntry key,
DatabaseEntry data,
LockMode lockMode)
Returns the key/data pair to which the cursor refers.
|
Database |
getDatabase()
Returns the Database handle associated with this Cursor.
|
OperationStatus |
getFirst(DatabaseEntry key,
DatabaseEntry data,
LockMode lockMode)
Moves the cursor to the first key/data pair of the database, and returns
that pair.
|
OperationStatus |
getLast(DatabaseEntry key,
DatabaseEntry data,
LockMode lockMode)
Moves the cursor to the last key/data pair of the database, and returns
that pair.
|
OperationStatus |
getNext(DatabaseEntry key,
DatabaseEntry data,
LockMode lockMode)
Moves the cursor to the next key/data pair and returns that pair.
|
OperationStatus |
getNextDup(DatabaseEntry key,
DatabaseEntry data,
LockMode lockMode)
If the next key/data pair of the database is a duplicate data record for
the current key/data pair, moves the cursor to the next key/data pair of
the database and returns that pair.
|
OperationStatus |
getNextNoDup(DatabaseEntry key,
DatabaseEntry data,
LockMode lockMode)
Moves the cursor to the next non-duplicate key/data pair and returns
that pair.
|
OperationStatus |
getPrev(DatabaseEntry key,
DatabaseEntry data,
LockMode lockMode)
Moves the cursor to the previous key/data pair and returns that pair.
|
OperationStatus |
getPrevDup(DatabaseEntry key,
DatabaseEntry data,
LockMode lockMode)
If the previous key/data pair of the database is a duplicate data record
for the current key/data pair, moves the cursor to the previous key/data
pair of the database and returns that pair.
|
OperationStatus |
getPrevNoDup(DatabaseEntry key,
DatabaseEntry data,
LockMode lockMode)
Moves the cursor to the previous non-duplicate key/data pair and returns
that pair.
|
OperationStatus |
getSearchBoth(DatabaseEntry key,
DatabaseEntry data,
LockMode lockMode)
Moves the cursor to the specified key/data pair, where both the key and
data items must match.
|
OperationStatus |
getSearchBothRange(DatabaseEntry key,
DatabaseEntry data,
LockMode lockMode)
Moves the cursor to the specified key and closest matching data item of
the database.
|
OperationStatus |
getSearchKey(DatabaseEntry key,
DatabaseEntry data,
LockMode lockMode)
Moves the cursor to the given key of the database, and returns the datum
associated with the given key.
|
OperationStatus |
getSearchKeyRange(DatabaseEntry key,
DatabaseEntry data,
LockMode lockMode)
Moves the cursor to the closest matching key of the database, and
returns the data item associated with the matching key.
|
OperationStatus |
put(DatabaseEntry key,
DatabaseEntry data)
Stores a key/data pair into the database.
|
OperationResult |
put(DatabaseEntry key,
DatabaseEntry data,
Put putType,
WriteOptions options)
Inserts or updates a record according to the specified
Put
type. |
OperationStatus |
putCurrent(DatabaseEntry data)
Replaces the data in the key/data pair at the current cursor position.
|
OperationStatus |
putNoDupData(DatabaseEntry key,
DatabaseEntry data)
Stores a key/data pair into the database.
|
OperationStatus |
putNoOverwrite(DatabaseEntry key,
DatabaseEntry data)
Stores a key/data pair into the database.
|
void |
setCacheMode(CacheMode cacheMode)
Sets the
CacheMode default used for subsequent operations
performed using this cursor. |
long |
skipNext(long maxCount,
DatabaseEntry key,
DatabaseEntry data,
LockMode lockMode)
Skips forward a given number of key/data pairs and returns the number by
which the cursor is moved.
|
long |
skipPrev(long maxCount,
DatabaseEntry key,
DatabaseEntry data,
LockMode lockMode)
Skips backward a given number of key/data pairs and returns the number
by which the cursor is moved.
|
public Database getDatabase()
getDatabase
in interface ForwardCursor
public CursorConfig getConfig()
This may differ from the configuration used to open this object if the cursor existed previously.
public CacheMode getCacheMode()
CacheMode
used for subsequent operations
performed using this cursor. If setCacheMode(com.sleepycat.je.CacheMode)
has not been
called with a non-null value, the configured Database or Environment
default is returned.CacheMode
default used for subsequent operations
using this cursor.public void setCacheMode(CacheMode cacheMode)
CacheMode
default used for subsequent operations
performed using this cursor. This method may be used to override the
defaults specified using DatabaseConfig.setCacheMode(com.sleepycat.je.CacheMode)
and EnvironmentMutableConfig.setCacheMode(com.sleepycat.je.CacheMode)
. Note that the default is always
overridden by a non-null cache mode that is specified via
ReadOptions
or WriteOptions
.cacheMode
- is the default CacheMode
used for subsequent
operations using this cursor, or null to configure the Database or
Environment default.for further details.
public void close()
The cursor handle may not be used again after this method has been
called, regardless of the method's success or failure, with one
exception: the close
method itself may be called any number of
times.
WARNING: To guard against memory leaks, the application should discard all references to the closed handle. While BDB makes an effort to discard references from closed objects to the allocated memory for an environment, this behavior is not guaranteed. The safe course of action for an application is to discard all references to closed BDB objects.
close
in interface ForwardCursor
close
in interface java.io.Closeable
close
in interface java.lang.AutoCloseable
EnvironmentFailureException
- if an unexpected, internal or
environment-wide failure occurs.public Cursor dup(boolean samePosition)
This is useful when an application is using locking and requires two or more cursors in the same thread of control.
samePosition
- If true, the newly created cursor is initialized
to refer to the same position in the database as the original cursor
(if any) and hold the same locks (if any). If false, or the original
cursor does not hold a database position and locks, the returned
cursor is uninitialized and will behave like a newly created cursor.DatabasePreemptedException
- in a replicated
environment if the master has truncated, removed or renamed the
database.OperationFailureException
- if this exception occurred earlier and
caused the transaction to be invalidated.EnvironmentFailureException
- if an unexpected, internal or
environment-wide failure occurs.java.lang.IllegalStateException
- if the cursor or database has been closed.public OperationResult delete(WriteOptions options)
The cursor position is unchanged after a delete, and subsequent calls to cursor functions expecting the cursor to refer to an existing record will fail.
options
- the WriteOptions, or null to use default options.OperationFailureException
- if one of the Write
Operation Failures occurs.EnvironmentFailureException
- if an unexpected, internal or
environment-wide failure occurs.java.lang.UnsupportedOperationException
- if the database is transactional
but this cursor was not opened with a non-null transaction parameter,
or the database is read-only.java.lang.IllegalStateException
- if the cursor or database has been closed,
or the cursor is uninitialized (not positioned on a record), or the
non-transactional cursor was created in a different thread.public OperationStatus delete()
The cursor position is unchanged after a delete, and subsequent calls to cursor functions expecting the cursor to refer to an existing record will fail.
Calling this method is equivalent to calling delete(WriteOptions)
.
OperationStatus.KEYEMPTY
if the record at the cursor position has
already been deleted; otherwise, OperationStatus.SUCCESS
.OperationFailureException
- if one of the Write
Operation Failures occurs.EnvironmentFailureException
- if an unexpected, internal or
environment-wide failure occurs.java.lang.UnsupportedOperationException
- if the database is transactional
but this cursor was not opened with a non-null transaction parameter,
or the database is read-only.java.lang.IllegalStateException
- if the cursor or database has been closed,
or the cursor is uninitialized (not positioned on a record), or the
non-transactional cursor was created in a different thread.public OperationResult put(DatabaseEntry key, DatabaseEntry data, Put putType, WriteOptions options)
Put
type.
If the operation succeeds, the record will be locked according to the
lock mode
specified, the cursor will
be positioned on the record, and a non-null OperationResult will be
returned. If the operation fails because the record already exists (or
does not exist, depending on the putType), null is returned.
When the database has associated secondary databases, this method also inserts or deletes associated index records as necessary.
The following table lists each allowed operation. See the individual
Put
operations for more information.
| Put operation | Description | Returns null when? | Other special rules |
|---|---|---|---|
Put.OVERWRITE |
Inserts or updates a record depending on whether a matching record is already present. | Never returns null. | Without duplicates, a matching record is one with the same key; with duplicates, it is one with the same key and data. |
Put.NO_OVERWRITE |
Inserts a record if a record with a matching key is not already present. | When an existing record matches. | If the database has duplicate keys, a record is inserted only if there are no records with a matching key. |
Put.NO_DUP_DATA |
Inserts a record in a database with duplicate keys if a record with a matching key and data is not already present. | When an existing record matches. | Without duplicates, this operation is not allowed. |
Put.CURRENT |
Updates the data of the record at the cursor position. | When the record at the cursor position has been deleted. | With duplicates, the data must be considered equal by the
duplicate comparator, meaning that changing the data is only
possible if a custom duplicate comparator is configured.
Cannot be used to update the key of an existing record and in fact the key parameter must be null. A partial data item may be specified to optimize for partial data update. |
key
- the key used as
input. Must be null when
putType is Put.CURRENT
.data
- the data used as
input. May be partial only when
putType is Put.CURRENT
.putType
- the Put operation type. May not be null.options
- the WriteOptions, or null to use default options.DuplicateDataException
- if putType is Put.CURRENT and the old and
new data are not equal according to the configured duplicate comparator
or default comparator.OperationFailureException
- if one of the Write
Operation Failures occurs.EnvironmentFailureException
- if an unexpected, internal or
environment-wide failure occurs.java.lang.UnsupportedOperationException
- if the database is transactional
but this cursor was not opened with a non-null transaction parameter,
or the database is read-only, or putType is Put.NO_DUP_DATA and the
database is not configured for duplicates.java.lang.IllegalStateException
- if the cursor or database has been closed,
or the non-transactional cursor was created in a different thread.java.lang.IllegalArgumentException
- if an invalid parameter is specified.
This includes passing a null putType, a null input key/data parameter,
an input key/data parameter with a null data array, a partial key/data
input parameter.public OperationStatus put(DatabaseEntry key, DatabaseEntry data)
Calling this method is equivalent to calling put(DatabaseEntry, DatabaseEntry, Put, WriteOptions)
with
Put.OVERWRITE
.
If the put method succeeds, the cursor is positioned to refer to the newly inserted item.
If the key already appears in the database and duplicates are supported, the new data value is inserted at the correct sorted location, unless the new data value also appears in the database already. In the later case, although the given key/data pair compares equal to an existing key/data pair, the two records may not be identical if custom comparators are used, in which case the existing record will be replaced with the new record. If the key already appears in the database and duplicates are not supported, the data associated with the key will be replaced.
key
- the key used as
input..data
- the data used as
input.OperationStatus.SUCCESS
.OperationFailureException
- if one of the Write
Operation Failures occurs.EnvironmentFailureException
- if an unexpected, internal or
environment-wide failure occurs.java.lang.UnsupportedOperationException
- if the database is transactional
but this cursor was not opened with a non-null transaction parameter,
or the database is read-only.java.lang.IllegalStateException
- if the cursor or database has been closed,
or the non-transactional cursor was created in a different thread.java.lang.IllegalArgumentException
- if an invalid parameter is specified.public OperationStatus putNoOverwrite(DatabaseEntry key, DatabaseEntry data)
Calling this method is equivalent to calling put(DatabaseEntry, DatabaseEntry, Put, WriteOptions)
with
Put.NO_OVERWRITE
.
If the putNoOverwrite method succeeds, the cursor is positioned to refer to the newly inserted item.
If the key already appears in the database, putNoOverwrite will
return OperationStatus.KEYEXIST
.
key
- the key used as
input..data
- the data used as
input.OperationStatus.KEYEXIST
if the key already appears in the database,
else OperationStatus.SUCCESS
OperationFailureException
- if one of the Write
Operation Failures occurs.EnvironmentFailureException
- if an unexpected, internal or
environment-wide failure occurs.java.lang.UnsupportedOperationException
- if the database is transactional
but this cursor was not opened with a non-null transaction parameter,
or the database is read-only.java.lang.IllegalStateException
- if the cursor or database has been closed,
or the non-transactional cursor was created in a different thread.java.lang.IllegalArgumentException
- if an invalid parameter is specified.public OperationStatus putNoDupData(DatabaseEntry key, DatabaseEntry data)
Calling this method is equivalent to calling put(DatabaseEntry, DatabaseEntry, Put, WriteOptions)
with
Put.NO_DUP_DATA
.
If the putNoDupData method succeeds, the cursor is positioned to refer to the newly inserted item.
Insert the specified key/data pair into the database, unless a
key/data pair comparing equally to it already exists in the database.
If a matching key/data pair already exists in the database, OperationStatus.KEYEXIST
is
returned.
key
- the key used as
input..data
- the data used as
input.OperationStatus.KEYEXIST
if the key/data pair already appears in the
database, else OperationStatus.SUCCESS
OperationFailureException
- if one of the Write
Operation Failures occurs.EnvironmentFailureException
- if an unexpected, internal or
environment-wide failure occurs.java.lang.UnsupportedOperationException
- if the database is transactional
but this cursor was not opened with a non-null transaction parameter, or
the database is read-only, or the database is not configured for
duplicates.java.lang.IllegalStateException
- if the cursor or database has been closed,
or the non-transactional cursor was created in a different thread.java.lang.IllegalArgumentException
- if an invalid parameter is specified.public OperationStatus putCurrent(DatabaseEntry data)
Calling this method is equivalent to calling put(DatabaseEntry, DatabaseEntry, Put, WriteOptions)
with
Put.CURRENT
.
Overwrite the data of the key/data pair to which the cursor refers with the specified data item. This method will return OperationStatus.NOTFOUND if the cursor currently refers to an already-deleted key/data pair.
For a database that does not support duplicates, the data may be
changed by this method. If duplicates are supported, the data may be
changed only if a custom partial comparator is configured and the
comparator considers the old and new data to be equal (that is, the
comparator returns zero). For more information on partial comparators
see DatabaseConfig.setDuplicateComparator(java.util.Comparator<byte[]>)
.
If the old and new data are unequal according to the comparator, a
DuplicateDataException
is thrown. Changing the data in this
case would change the sort order of the record, which would change the
cursor position, and this is not allowed. To change the sort order of a
record, delete it and then re-insert it.
data
- the data used as
input.
A partial data item may be
specified to optimize for partial data update.OperationStatus.KEYEMPTY
if the key/pair at the cursor position has
been deleted; otherwise, OperationStatus.SUCCESS
.DuplicateDataException
- if the old and new data are not equal
according to the configured duplicate comparator or default comparator.OperationFailureException
- if one of the Write
Operation Failures occurs.EnvironmentFailureException
- if an unexpected, internal or
environment-wide failure occurs.java.lang.UnsupportedOperationException
- if the database is transactional
but this cursor was not opened with a non-null transaction parameter,
or the database is read-only.java.lang.IllegalStateException
- if the cursor or database has been closed,
or the cursor is uninitialized (not positioned on a record), or the
non-transactional cursor was created in a different thread.java.lang.IllegalArgumentException
- if an invalid parameter is specified.public OperationResult get(DatabaseEntry key, DatabaseEntry data, Get getType, ReadOptions options)
Get
type.
If the operation succeeds, the record at the resulting cursor
position will be locked according to the lock mode
specified, the key and/or data will
be returned via the (non-null) DatabaseEntry parameters, and a non-null
OperationResult will be returned. If the operation fails because the
record requested is not found, null is returned.
The following table lists each allowed operation and whether the key
and data parameters are input or
output parameters. Also specified is whether the cursor must be
initialized (positioned on a record) before calling this method. See the
individual Get
operations for more information.
| Get operation | Description | 'key' parameter | 'data' parameter | Cursor position must be initialized? |
|---|---|---|---|---|
Get.SEARCH |
Searches using an exact match by key. | input | output | no |
Get.SEARCH_BOTH |
Searches using an exact match by key and data. | input | input | no |
Get.SEARCH_GTE |
Searches using a GTE match by key. | input/output | output | no |
Get.SEARCH_BOTH_GTE |
Searches using an exact match by key and a GTE match by data. | input | input/output | no |
Get.CURRENT |
Accesses the current record | output | output | yes |
Get.FIRST |
Finds the first record in the database. | output | output | no |
Get.LAST |
Finds the last record in the database. | output | output | no |
Get.NEXT |
Moves to the next record. | output | output | no** |
Get.NEXT_DUP |
Moves to the next record with the same key. | output | output | yes |
Get.NEXT_NO_DUP |
Moves to the next record with a different key. | output | output | no** |
Get.PREV |
Moves to the previous record. | output | output | no** |
Get.PREV_DUP |
Moves to the previous record with the same key. | output | output | yes |
Get.PREV_NO_DUP |
Moves to the previous record with a different key. | output | output | no** |
** - For these 'next' and 'previous' operations the cursor may be uninitialized, in which case the cursor will be moved to the first or last record, respectively.
get
in interface ForwardCursor
key
- the key input or output parameter, depending on getType.data
- the data input or output parameter, depending on getType.getType
- the Get operation type. May not be null.options
- the ReadOptions, or null to use default options.OperationFailureException
- if one of the Read Operation
Failures occurs.EnvironmentFailureException
- if an unexpected, internal or
environment-wide failure occurs.java.lang.IllegalStateException
- if the cursor or database has been closed,
the cursor is uninitialized (not positioned on a record) and this is not
permitted (see above), or the non-transactional cursor was created in a
different thread.java.lang.IllegalArgumentException
- if an invalid parameter is specified.
This includes passing a null getType, a null input key/data parameter,
an input key/data parameter with a null data array, a partial key/data
input parameter, and specifying a lock mode
of READ_COMMITTED.public OperationStatus getCurrent(DatabaseEntry key, DatabaseEntry data, LockMode lockMode)
Calling this method is equivalent to calling get(DatabaseEntry, DatabaseEntry, Get, ReadOptions)
with
Get.CURRENT
.
getCurrent
in interface ForwardCursor
key
- the key returned as
output.data
- the data returned as
output.lockMode
- the locking attributes; if null, default attributes are
used. LockMode.READ_COMMITTED
is not allowed.OperationStatus.KEYEMPTY
if the key/pair at the cursor position has
been deleted; otherwise, OperationStatus.SUCCESS
.OperationFailureException
- if one of the Read Operation
Failures occurs.EnvironmentFailureException
- if an unexpected, internal or
environment-wide failure occurs.java.lang.IllegalStateException
- if the cursor or database has been closed,
or the cursor is uninitialized (not positioned on a record), or the
non-transactional cursor was created in a different thread.java.lang.IllegalArgumentException
- if an invalid parameter is specified.public OperationStatus getFirst(DatabaseEntry key, DatabaseEntry data, LockMode lockMode)
Calling this method is equivalent to calling get(DatabaseEntry, DatabaseEntry, Get, ReadOptions)
with
Get.FIRST
.
key
- the key returned as
output.data
- the data returned as
output.lockMode
- the locking attributes; if null, default attributes are
used. LockMode.READ_COMMITTED
is not allowed.OperationStatus.NOTFOUND
if no matching key/data pair is found;
otherwise, OperationStatus.SUCCESS
.OperationFailureException
- if one of the Read Operation
Failures occurs.EnvironmentFailureException
- if an unexpected, internal or
environment-wide failure occurs.java.lang.IllegalStateException
- if the cursor or database has been closed,
or the non-transactional cursor was created in a different thread.java.lang.IllegalArgumentException
- if an invalid parameter is specified.public OperationStatus getLast(DatabaseEntry key, DatabaseEntry data, LockMode lockMode)
Calling this method is equivalent to calling get(DatabaseEntry, DatabaseEntry, Get, ReadOptions)
with
Get.LAST
.
key
- the key returned as
output.data
- the data returned as
output.lockMode
- the locking attributes; if null, default attributes are
used. LockMode.READ_COMMITTED
is not allowed.OperationStatus.NOTFOUND
if no matching key/data pair is found;
otherwise, OperationStatus.SUCCESS
.OperationFailureException
- if one of the Read Operation
Failures occurs.EnvironmentFailureException
- if an unexpected, internal or
environment-wide failure occurs.java.lang.IllegalStateException
- if the cursor or database has been closed,
or the non-transactional cursor was created in a different thread.java.lang.IllegalArgumentException
- if an invalid parameter is specified.public OperationStatus getNext(DatabaseEntry key, DatabaseEntry data, LockMode lockMode)
Calling this method is equivalent to calling get(DatabaseEntry, DatabaseEntry, Get, ReadOptions)
with
Get.NEXT
.
If the cursor is not yet initialized, move the cursor to the first key/data pair of the database, and return that pair. Otherwise, the cursor is moved to the next key/data pair of the database, and that pair is returned. In the presence of duplicate key values, the value of the key may not change.
getNext
in interface ForwardCursor
key
- the key returned as
output.data
- the data returned as
output.lockMode
- the locking attributes; if null, default attributes are
used. LockMode.READ_COMMITTED
is not allowed.OperationStatus.NOTFOUND
if no matching key/data pair is found;
otherwise, OperationStatus.SUCCESS
.OperationFailureException
- if one of the Read Operation
Failures occurs.EnvironmentFailureException
- if an unexpected, internal or
environment-wide failure occurs.java.lang.IllegalStateException
- if the cursor or database has been closed,
or the non-transactional cursor was created in a different thread.java.lang.IllegalArgumentException
- if an invalid parameter is specified.public OperationStatus getNextDup(DatabaseEntry key, DatabaseEntry data, LockMode lockMode)
Calling this method is equivalent to calling get(DatabaseEntry, DatabaseEntry, Get, ReadOptions)
with
Get.NEXT_DUP
.
key
- the key returned as
output.data
- the data returned as
output.lockMode
- the locking attributes; if null, default attributes are
used. LockMode.READ_COMMITTED
is not allowed.OperationStatus.NOTFOUND
if no matching key/data pair is found;
otherwise, OperationStatus.SUCCESS
.OperationFailureException
- if one of the Read Operation
Failures occurs.EnvironmentFailureException
- if an unexpected, internal or
environment-wide failure occurs.java.lang.IllegalStateException
- if the cursor or database has been closed,
or the cursor is uninitialized (not positioned on a record), or the
non-transactional cursor was created in a different thread.java.lang.IllegalArgumentException
- if an invalid parameter is specified.public OperationStatus getNextNoDup(DatabaseEntry key, DatabaseEntry data, LockMode lockMode)
Calling this method is equivalent to calling get(DatabaseEntry, DatabaseEntry, Get, ReadOptions)
with
Get.NEXT_NO_DUP
.
If the cursor is not yet initialized, move the cursor to the first key/data pair of the database, and return that pair. Otherwise, the cursor is moved to the next non-duplicate key of the database, and that key/data pair is returned.
key
- the key returned as
output.data
- the data returned as
output.lockMode
- the locking attributes; if null, default attributes are
used. LockMode.READ_COMMITTED
is not allowed.OperationStatus.NOTFOUND
if no matching key/data pair is found;
otherwise, OperationStatus.SUCCESS
.OperationFailureException
- if one of the Read Operation
Failures occurs.EnvironmentFailureException
- if an unexpected, internal or
environment-wide failure occurs.java.lang.IllegalStateException
- if the cursor or database has been closed,
or the non-transactional cursor was created in a different thread.java.lang.IllegalArgumentException
- if an invalid parameter is specified.public OperationStatus getPrev(DatabaseEntry key, DatabaseEntry data, LockMode lockMode)
Calling this method is equivalent to calling get(DatabaseEntry, DatabaseEntry, Get, ReadOptions)
with
Get.PREV
.
If the cursor is not yet initialized, move the cursor to the last key/data pair of the database, and return that pair. Otherwise, the cursor is moved to the previous key/data pair of the database, and that pair is returned. In the presence of duplicate key values, the value of the key may not change.
key
- the key returned as
output.data
- the data returned as
output.lockMode
- the locking attributes; if null, default attributes are
used. LockMode.READ_COMMITTED
is not allowed.OperationStatus.NOTFOUND
if no matching key/data pair is found;
otherwise, OperationStatus.SUCCESS
.OperationFailureException
- if one of the Read Operation
Failures occurs.EnvironmentFailureException
- if an unexpected, internal or
environment-wide failure occurs.java.lang.IllegalStateException
- if the cursor or database has been closed,
or the non-transactional cursor was created in a different thread.java.lang.IllegalArgumentException
- if an invalid parameter is specified.public OperationStatus getPrevDup(DatabaseEntry key, DatabaseEntry data, LockMode lockMode)
Calling this method is equivalent to calling get(DatabaseEntry, DatabaseEntry, Get, ReadOptions)
with
Get.PREV_DUP
.
key
- the key returned as
output.data
- the data returned as
output.lockMode
- the locking attributes; if null, default attributes are
used. LockMode.READ_COMMITTED
is not allowed.OperationStatus.NOTFOUND
if no matching key/data pair is found;
otherwise, OperationStatus.SUCCESS
.OperationFailureException
- if one of the Read Operation
Failures occurs.EnvironmentFailureException
- if an unexpected, internal or
environment-wide failure occurs.java.lang.IllegalStateException
- if the cursor or database has been closed,
or the cursor is uninitialized (not positioned on a record), or the
non-transactional cursor was created in a different thread.java.lang.IllegalArgumentException
- if an invalid parameter is specified.public OperationStatus getPrevNoDup(DatabaseEntry key, DatabaseEntry data, LockMode lockMode)
Calling this method is equivalent to calling get(DatabaseEntry, DatabaseEntry, Get, ReadOptions)
with
Get.PREV_NO_DUP
.
If the cursor is not yet initialized, move the cursor to the last key/data pair of the database, and return that pair. Otherwise, the cursor is moved to the previous non-duplicate key of the database, and that key/data pair is returned.
key
- the key returned as
output.data
- the data returned as
output.lockMode
- the locking attributes; if null, default attributes are
used. LockMode.READ_COMMITTED
is not allowed.OperationStatus.NOTFOUND
if no matching key/data pair is found;
otherwise, OperationStatus.SUCCESS
.OperationFailureException
- if one of the Read Operation
Failures occurs.EnvironmentFailureException
- if an unexpected, internal or
environment-wide failure occurs.java.lang.IllegalStateException
- if the cursor or database has been closed,
or the non-transactional cursor was created in a different thread.java.lang.IllegalArgumentException
- if an invalid parameter is specified.public long skipNext(long maxCount, DatabaseEntry key, DatabaseEntry data, LockMode lockMode)
Without regard to performance, calling this method is equivalent to
repeatedly calling getNext
with LockMode.READ_UNCOMMITTED
to skip over the desired number of key/data
pairs, and then calling getCurrent
with the lockMode
parameter to return the final key/data pair.
With regard to performance, this method is optimized to skip over
key/value pairs using a smaller number of Btree operations. When there
is no contention on the bottom internal nodes (BINs) and all BINs are in
cache, the number of Btree operations is reduced by roughly two orders
of magnitude, where the exact number depends on the EnvironmentConfig.NODE_MAX_ENTRIES
setting. When there is contention
on BINs or fetching BINs is required, the scan is broken up into smaller
operations to avoid blocking other threads for long time periods.
If the returned count is greater than zero, then the key/data pair at the new cursor position is also returned. If zero is returned, then there are no key/value pairs that follow the cursor position and a key/data pair is not returned.
maxCount
- the maximum number of key/data pairs to skip, i.e., the
maximum number by which the cursor should be moved; must be greater
than zero.key
- the key returned as
output.data
- the data returned as
output.lockMode
- the locking attributes; if null, default attributes are
used. LockMode.READ_COMMITTED
is not allowed.OperationFailureException
- if one of the Read Operation
Failures occurs.EnvironmentFailureException
- if an unexpected, internal or
environment-wide failure occurs.java.lang.IllegalStateException
- if the cursor or database has been closed,
or the cursor is uninitialized (not positioned on a record), or the
non-transactional cursor was created in a different thread.java.lang.IllegalArgumentException
- if an invalid parameter is specified.public long skipPrev(long maxCount, DatabaseEntry key, DatabaseEntry data, LockMode lockMode)
Without regard to performance, calling this method is equivalent to
repeatedly calling getPrev
with LockMode.READ_UNCOMMITTED
to skip over the desired number of key/data
pairs, and then calling getCurrent
with the lockMode
parameter to return the final key/data pair.
With regard to performance, this method is optimized to skip over
key/value pairs using a smaller number of Btree operations. When there
is no contention on the bottom internal nodes (BINs) and all BINs are in
cache, the number of Btree operations is reduced by roughly two orders
of magnitude, where the exact number depends on the EnvironmentConfig.NODE_MAX_ENTRIES
setting. When there is contention
on BINs or fetching BINs is required, the scan is broken up into smaller
operations to avoid blocking other threads for long time periods.
If the returned count is greater than zero, then the key/data pair at the new cursor position is also returned. If zero is returned, then there are no key/value pairs that follow the cursor position and a key/data pair is not returned.
In a replicated environment, an explicit transaction must have been
specified when opening the cursor, unless read-uncommitted isolation is
specified via the CursorConfig
or LockMode
parameter.
maxCount
- the maximum number of key/data pairs to skip, i.e., the
maximum number by which the cursor should be moved; must be greater
than zero.key
- the key returned as
output.data
- the data returned as
output.lockMode
- the locking attributes; if null, default attributes are
used. LockMode.READ_COMMITTED
is not allowed.OperationFailureException
- if one of the Read Operation
Failures occurs.EnvironmentFailureException
- if an unexpected, internal or
environment-wide failure occurs.java.lang.IllegalStateException
- if the cursor or database has been closed,
or the cursor is uninitialized (not positioned on a record), or the
non-transactional cursor was created in a different thread.java.lang.IllegalArgumentException
- if an invalid parameter is specified.public OperationStatus getSearchKey(DatabaseEntry key, DatabaseEntry data, LockMode lockMode)
Calling this method is equivalent to calling get(DatabaseEntry, DatabaseEntry, Get, ReadOptions)
with
Get.SEARCH
.
key
- the key used as
input.data
- the data returned as
output.lockMode
- the locking attributes; if null, default attributes are
used. LockMode.READ_COMMITTED
is not allowed.OperationStatus.NOTFOUND
if no matching key/data pair is found;
otherwise, OperationStatus.SUCCESS
.OperationFailureException
- if one of the Read Operation
Failures occurs.EnvironmentFailureException
- if an unexpected, internal or
environment-wide failure occurs.java.lang.IllegalStateException
- if the cursor or database has been closed,
or the non-transactional cursor was created in a different thread.java.lang.IllegalArgumentException
- if an invalid parameter is specified.public OperationStatus getSearchKeyRange(DatabaseEntry key, DatabaseEntry data, LockMode lockMode)
Calling this method is equivalent to calling get(DatabaseEntry, DatabaseEntry, Get, ReadOptions)
with
Get.SEARCH_GTE
.
The returned key/data pair is for the smallest key greater than or equal to the specified key (as determined by the key comparison function), permitting partial key matches and range searches.
key
- the key used as
input and returned as output.data
- the data returned as
output.lockMode
- the locking attributes; if null, default attributes
are used. LockMode.READ_COMMITTED
is not allowed.OperationStatus.NOTFOUND
if no matching key/data pair is found;
otherwise, OperationStatus.SUCCESS
.OperationFailureException
- if one of the Read Operation
Failures occurs.EnvironmentFailureException
- if an unexpected, internal or
environment-wide failure occurs.java.lang.IllegalStateException
- if the cursor or database has been closed,
or the non-transactional cursor was created in a different thread.java.lang.IllegalArgumentException
- if an invalid parameter is specified.public OperationStatus getSearchBoth(DatabaseEntry key, DatabaseEntry data, LockMode lockMode)
Calling this method is equivalent to calling get(DatabaseEntry, DatabaseEntry, Get, ReadOptions)
with
Get.SEARCH_BOTH
.
key
- the key used as
input.data
- the data used as
input.lockMode
- the locking attributes; if null, default attributes are
used. LockMode.READ_COMMITTED
is not allowed.OperationStatus.NOTFOUND
if no matching key/data pair is found;
otherwise, OperationStatus.SUCCESS
.OperationFailureException
- if one of the Read Operation
Failures occurs.EnvironmentFailureException
- if an unexpected, internal or
environment-wide failure occurs.java.lang.IllegalStateException
- if the cursor or database has been closed,
or the non-transactional cursor was created in a different thread.java.lang.IllegalArgumentException
- if an invalid parameter is specified.public OperationStatus getSearchBothRange(DatabaseEntry key, DatabaseEntry data, LockMode lockMode)
Calling this method is equivalent to calling get(DatabaseEntry, DatabaseEntry, Get, ReadOptions)
with
Get.SEARCH_BOTH_GTE
.
In the case of any database supporting sorted duplicate sets, the returned key/data pair is for the smallest data item greater than or equal to the specified data item (as determined by the duplicate comparison function), permitting partial matches and range searches in duplicate data sets.
In the case of databases that do not support sorted duplicate sets, this method is equivalent to getSearchBoth.
key
- the key used as
input.data
- the data used as
input and returned as output.lockMode
- the locking attributes; if null, default attributes are
used. LockMode.READ_COMMITTED
is not allowed.OperationStatus.NOTFOUND
if no matching key/data pair is found;
otherwise, OperationStatus.SUCCESS
.OperationFailureException
- if one of the Read Operation
Failures occurs.EnvironmentFailureException
- if an unexpected, internal or
environment-wide failure occurs.java.lang.IllegalStateException
- if the cursor or database has been closed,
or the non-transactional cursor was created in a different thread.java.lang.IllegalArgumentException
- if an invalid parameter is specified.public int count()
If the database is configured for duplicates, the database is scanned
internally, without taking any record locks, to count the number of
non-deleted entries. Although the internal scan is more efficient under
some conditions, the result is the same as if a cursor were used to
iterate over the entries using LockMode.READ_UNCOMMITTED
.
If the database is not configured for duplicates, the count returned is always zero or one, depending on the record at the cursor position is deleted or not.
The cost of this method is directly proportional to the number of records scanned.
OperationFailureException
- if one of the Read Operation
Failures occurs.EnvironmentFailureException
- if an unexpected, internal or
environment-wide failure occurs.java.lang.IllegalStateException
- if the cursor or database has been closed,
or the cursor is uninitialized (not positioned on a record), or the
non-transactional cursor was created in a different thread.public long countEstimate()
If the database is configured for duplicates, a quick estimate of the
number of records is computed using information in the Btree. Because
the Btree is unbalanced, in some cases the estimate may be off by a
factor of two or more. The estimate is accurate when the number of
records is less than the configured NodeMaxEntries
.
If the database is not configured for duplicates, the count returned is always zero or one, depending on the record at the cursor position is deleted or not.
The cost of this method is fixed, rather than being proportional to
the number of records scanned. Because its accuracy is variable, this
method should normally be used when accuracy is not required, such as
for query optimization, and a fixed cost operation is needed. For
example, this method is used internally for determining the index
processing order in a JoinCursor
.
OperationFailureException
- if one of the Read Operation
Failures occurs.EnvironmentFailureException
- if an unexpected, internal or
environment-wide failure occurs.java.lang.IllegalStateException
- if the cursor or database has been closed,
or the cursor is uninitialized (not positioned on a record), or the
non-transactional cursor was created in a different thread.Copyright (c) 2002, 2017 Oracle and/or its affiliates. All rights reserved.


-
Bilevel Arbitrage Potential Evaluation for Grid-Scale Energy Storage Considering Wind Power and LMP Smoothing Effect
Cui, Hantao,
Li, Fangxing,
Fang, Xin,
Chen, Hao,
and
Wang, Honggang
IEEE Transactions on Sustainable Energy
2018
-
Multichannel continuous wavelet transform approach to estimate electromechanical oscillation modes, mode shapes and coherent groups from synchrophasors in bulk power grids
Li, Xue,
Cui, Hantao,
Jiang, Tao,
Xu, Yao,
Jia, Hongjie,
and
Li, Fangxing
International Journal of Electrical Power & Energy Systems
2018
-
A measurement-based VSI for voltage dependent loads using angle difference between tangent lines of load and PV curves
Yuan, Haoyu,
Li, Fangxing,
Cui, Hantao,
Lu, Xiao,
Shi, Di,
and
Wang, Zhiwei
Electric Power Systems Research
2018
-
Cyber-Physical Testbed for Power System Wide-Area Measurement-Based Control Using Open-Source Software
Cui, Hantao,
Li, Fangxing,
Tomsovic, Kevin,
Wang, Siqi,
Azim, Riyasat,
Lu, Yidan,
and
Yuan, Haoyu
arXiv preprint arXiv:1803.02337
2018
-
Optimal dispatch strategy for integrated energy systems with CCHP and wind power
Li, Guoqing,
Zhang, Rufeng,
Jiang, Tao,
Chen, Houhe,
Bai, Linquan,
Cui, Hantao,
and
Li, Xiaojing
Applied energy
2017
-
GPU-based fast decoupled power flow with preconditioned iterative solver and inexact newton method
Li, Xue,
Li, Fangxing,
Yuan, Haoyu,
Cui, Hantao,
and
Hu, Qinran
IEEE Transactions on Power Systems
2017
-
Control and Limit Enforcements for VSC Multi-Terminal HVDC in Newton Power Flow
Cui, Hantao,
Li, Fangxing,
and
Yuan, Haoyu
arXiv preprint arXiv:1703.07231
2017
-
A hybrid dynamic demand control strategy for power system frequency regulation
Shi, Qingxin,
Cui, Hantao,
Li, Fangxing,
Liu, Yilu,
Ju, Wenyun,
and
Sun, Yonghui
CSEE Journal of Power and Energy Systems
2017
-
Security-based active demand response strategy considering uncertainties in power systems
Han, Haiteng,
Gao, Shan,
Shi, Qingxin,
Cui, Hantao,
and
Li, Fangxing
IEEE Access
2017
-
Probabilistic Load Flow Analysis Using Randomized Quasi–Monte Carlo Sampling and Johnson Transformation
Gao, Shan,
Liu, Yu,
Cui, Hantao,
and
Wang, Shenzhe
Journal of Energy Engineering
2017
-
Power management strategy combining energy storage and demand response for microgrid emergency autonomous operation
Azim, Riyasat,
Cui, Hantao,
and
Li, Fangxing
In Power and Energy Engineering Conference (APPEEC), 2016 IEEE PES Asia-Pacific
2016
-
Strategic scheduling of energy storage for load serving entities in locational marginal pricing market
Fang, Xin,
Li, Fangxing,
Wei, Yanli,
and
Cui, Hantao
IET Generation, Transmission & Distribution
2016
-
Day-ahead coordinated operation of utility-scale electricity and natural gas networks considering demand response based virtual power plants
Cui, Hantao,
Li, Fangxing,
Hu, Qinran,
Bai, Linquan,
and
Fang, Xin
Applied Energy
2016
-
Mitigate overestimation of voltage stability margin by coupled single-port circuit models
Yuan, Haoyu,
Li, Xue,
Li, Fangxing,
Fang, Xin,
Cui, Hantao,
and
Hu, Qinran
In Power and Energy Society General Meeting (PESGM), 2016
2016
-
Probabilistic load flow considering correlations of input variables following arbitrary distributions
Liu, Yu,
Gao, Shan,
Cui, Hantao,
and
Yu, Le
Electric Power Systems Research
2016
-
A two-stage MILP formulation for source-load coordinated dispatch with wind power considering peak-valley regulation and ramping requirements
Zhang, Rufeng,
Li, Guoqing,
Chen, Houhe,
Li, Xue,
Jiang, Tao,
Ning, Ruoxi,
Cui, Hantao,
and
Bai, Linquan
In Power and Energy Society General Meeting (PESGM), 2016
2016
-
Application of battery-supercapacitor energy storage system for smoothing wind power output: An optimal coordinated control strategy
Bai, Linquan,
Li, Fangxing,
Hu, Qinran,
Cui, Hantao,
and
Fang, Xin
In Power and Energy Society General Meeting (PESGM), 2016
2016
-
Risk Constrained Scheduling of Energy Storage for Load Serving Entities Considering Load and LMP Uncertainties
Fang, Xin,
Li, Fangxing,
Cui, Hantao,
Bai, Linquan,
Yuan, Haoyu,
Hu, Qinran,
and
Wang, Beibei
IFAC-PapersOnLine
2016
-
QV interaction evaluation and pilot voltage-reactive power coupling area partitioning in bulk power systems
Jiang, Tao,
Bai, Linquan,
Yuan, Haoyu,
Jia, Hongjie,
Li, Fangxing,
and
Cui, Hantao
IET Science, Measurement & Technology
2016
-
Interval optimization based operating strategy for gas-electricity integrated energy systems considering demand response and wind uncertainty
Bai, Linquan,
Li, Fangxing,
Cui, Hantao,
Jiang, Tao,
Sun, Hongbin,
and
Zhu, Jinxiang
Applied Energy
2016


→ Please don't spam click, or things may break and you'll have to restart the server! ←
After changing a position, you have to wait for about 2 seconds, otherwise the game can't keep up.
If nothing works anymore, stop the emulator via ssh by pressing Ctrl + C and restart it.
Make sure not to exceed the item limit on each position when switching or placing objects (left/right: 3, middle: 1)!!!
Click an entry to remove it from the ToyPad.


0.7.x (in git)
0.7.1 2012-01-15
=== New Features * Support for Rails 3.2. (David Demaree)
Bugfixes
* Truncation resets the id count on SQLite. (Jordan Hollinger) * AR delete strategy now disables referential integrity. (Ben Mabey) * Fixes Postgres adapter for JRuby. (Dmytrii Nagirniak, Uģis Ozols) * Documenation fixes. (Josh Rendek, Joshua Flanagan) * Fixes bad error message when no database is specified for AR. (issue #72, Ben Mabey)
0.7.0 2011-11-12
=== New Features * Sequel Support (Corin Langosch) * Updates DataMapper strategies to work with DataMapper 1.1 (Xavier Shay and Anthony Williams) * for AR and PSQL, truncate all tables with one command, improving performance due to avoiding cascades (Leonid Shevtsov)
Bugfixes
* Avoids trying to load the ':default' ActiveRecord config. #72 (Ben Mabey)
0.6.7 2011-04-21
Bugfixes
* Explicity require ERB. (Vít Ondruch) * Cache DB connections, fixes referential integrity bug when using multiple DBs. (John Ferlito)
0.6.6 2011-03-16
Bugfixes
* Don't modify the array passed in with the :except key. (Eric Wollesen) * Fixes version checking for postgresql. (Greg Barnett)
0.6.5 2011-03-08
Bugfixes
* When truncating in postgresql (>= 8.4) sequences are now reset. (Greg Barnett) * Fixes the MongoDB truncation so non system collections starting with 'system' are not excluded for truncation. (Dmitry Naumov)
0.6.4 2011-02-21
Bugfixes
* Avoids trying to drop views in Postgres. (Bernerd Schaefer)
0.6.3 2011-02-09
=== New Features * Configurable logger to aid in debugging database cleaner. (Marty Haught)
0.6.2 2011-02-04
=== New Features * Support IBM_DB Adapter for table truncation. This is for DB2 >= 9.7 (GH-39 Samer Abukhait) === Bugfixes * Reversed GH-41 after larger community discussion. Mongo indexes are no longer dropped. (Ben Mabey) * Truncation strategy works on SqlServer tables with FKs. (GH-33, Hugo Freire)
0.6.1 2011-01-27
=== New Features * Default strategies for all ORM libs are defined. (GH-36, GH-38 Prem Sichanugrist) * Add a NullStrategy. (GH-6 Ben Mabey) === Bugfixes * Mongo colletion indexes are dropped for collections being removed. (GH-41 Ben Mabey) * Exclude database views from tables_to_truncate, if the connection adapter supports reading from the ANSI standard information_schema views. (GH-25 Samer Abukhait) * ORM types can be specified in string format and not mysteriously blowup. (GH-26 Ben Mabey) * Do not remove MongoDB reserved system collections. (GH-24 Ches Martin)
0.6.0 2010-10-25 - The Multi-ORM/Connection Release
This release has the often asked for functionality of being able to clean multiple databases within the same project. This involves being able to clean databases managed by the same ORM (i.e. different connections) and also being able to clean databases managed by distinct ORMs. So, for example you can now use DatabaseCleaner on a project that has ActiveRecord and Mongoid to help ensure all DBs all in a clean state. Please see the README for more information. The old API has been preserved so this release is backwards compatible.
This release is a result of Jon Rowe’s hard work. Many thanks to Jon for all of the hours and effort he put into making this feature request a reality.
=== New Features * Ability to clean multiple database connections managed by the same ORM. (Jon Rowe) * Ability to clean multiple DBs managed by different ORMs in same project. (Jon Rowe) * Allows for the ActiveRecord config file (database.yml) to contain ERB and process it. (Fletcher Nichol) * Mysql2Adapter support. (Kamal Fariz Mahyuddin and John Ferlito) * Deletion strategy for ActiveRecord (Mikl Kurkov) === Bugfixes * Updates the DataMapper truncation strategy to version 0.10.3. (Robert Rouse) * Addresses Ruby 1.9 and 1.8 differences causing a bug in the AR PostgreSQLAdapter truncation strategy. (GH-14, James B. Byrne) * Fixes syntax error that MySQL was throwing during DataMapper truncation. (Blake Gentry) * Fixes truncation for PostgreSQL (Bodaniel Jeanes and Gabriel Sobrinho) * Workaround for superclass mismatches for the ActiveRecord-jdbc-adapter (Toms Mikoss)
0.5.2
=== Bugfixes * Removes extraneous puts call from configuration.rb. (Ben Mabey)
0.5.1 - The Mongoid Release
This release also attempts to fix AR for Rails 3 support. I have seen mixed reviews on this. Some people claim the fixes allow for use in Rails3 while others have not had good luck with it. I plan on reworking the way AR support is added so that it is more friendly with how Rails 3 uses autoload.
=== New features * Clean and clean_with methods are now aliased to clean! and clean_with!. (Ben Mabey) * Mongoid Support! (Sidney Burks)
Bugfixes
* Check PostgreSQL version >= 8.2 before using TRUNCATE CASCADE (James B. Byrne) * Correct superclass is used in ActiveRecord connection adapters. (johnathan, Aslak Hellesoy, Ben Mabey)
0.5.0 2010-02-22 - The CouchPotato Release
=== New features * Basic truncation support for CouchPotato / CouchDB. (Martin Rehfeld) * SQLite3 on JRuby will fall back to delete if truncate doesn't work. (Darrin Holst) * JDBC is used for ActiveRecord automaticaly when JRuby is detected. (Darrin Holst) === Bufixes * MongoMapper truncation strategy now works with :only and :except options. (Ben Mabey)
0.4.3 2010-01-17
=== New features * Truncation for ActiveRecord oracle_enhanced adapter. (Edgars Beigarts)
0.4.2 2010-01-12
=== Bufixes * Datamapper truncation now uses 'select' instead of deprecated the 'query' method. (Steve Tooke)
0.4.1 2010-01-07
=== Bufixes * Postgres tables with FKs now truncate (added TRUNCADE CASCADE) using Datamapper. (Ben Mabey)
0.4.0 2009-12-23 (The MongoMapper Edition)
=== New features * MongoMapper support for the truncation strategy. (Aubrey Holland)
0.3.0 2009-12-20
=== New features * DataMapper 0.10.0 Compatible. (Martin Gamsjaeger) === Bufixes * Postgres tables with FKs now truncate (added TRUNCADE CASCADE). (Vika - yozhyk on github)
0.2.3 2009-05-30
=== New features * Support for SQL Server truncation (Adam Meehan)
0.2.2 2009-05-08
=== Bufixes * Added proper gemspec description and summary. (Ben Mabey, thanks to Martin Gamsjaeger) === New features
0.2.1 2009-05-08
=== Bufixes * Removed extraneous TruncationBase class definition. (Ben Mabey)
0.2.0 2009-05-08 - The Datamapper Release
=== New features * DataMapper strategies (Martin Gamsjaeger) * Transaction * Truncation - working SQLite3, MySQL adapters. Experimental Postgres adapter (not tested).
0.1.3 2009-04-30
=== New features * PostgresSQLAdapter for AR to support the truncation strategy. (Alberto Perdomo) === Bufixes * Added missing quotes around table names in truncation calls. (Michael MacDonald)
0.1.2 2009-03-05
=== New features * JDBC Adapter to enable AR truncation strategy to work. (Kamal Fariz Mahyuddin)
0.1.1 2009-03-04 - Initial Release (Ben Mabey)
* Basic infrastructure * Features, RSpec code examples * ActiveRecord strategies * Truncation - with MySQL, and SQLite3 adapters. * Transaction - wrap your modifications and roll them back.


26-Apr-2017 | Milku
I'm not hoping to interest the Ghost Adventures Crew here, just my thoughts on where hamsters may roam.
Although hamsters were discovered in Syria, we are also native to Greece, Romania, Belgium and northern China…albeit that we have made most countries our home over recent years.
But even before the situation in Syria deteriorated, Wild Syrian hamsters weren’t commonplace there. They certainly weren’t found outside of agricultural fields around Aleppo. I wonder where my ancestors roamed before humans started to cultivate the land in that part of the world. Did they move in to the wheat fields to enjoy some tasty seeds? Or did they adapt in situ when their natural habit was cleared to make way for agriculture?
I’ve been wondering too whether places that have ‘hamster’ in their name were also once home to hordes of hamsters...
However, I’ve had to acknowledge that Hamsterley Forest, a large area of woodland near Durham in the North East of England, might not suit a population of wild hamsters… even if it does claim to house many varieties of insects, reptiles and mammals. In the wild, hamsters like to live in warm, dry areas, like steppes, sand dunes and the edges of deserts. That really doesn’t describe England. We’ve got lovely sand dunes, but probably too much rain to suit my furry friends.
Kissimmee in Florida seems like it would welcome hamsters…there’s Hamster Lane, Hamster Court, Hamster Place…
And the Germans use hamster place names, like here in Hamsterstraße, Berlin.
But the obvious locale for any discerning hamster must be in the Netherlands…(H)Amsterdam, of course!


You can change the marker icons, using the default Leaflet marker icons functions, or using helper libraries like AwesomeMarkers, VectorMarkers, MakiMarkers or ExtraMarker.
Blue Red Green
Tag USD Heart Home Cog Star Certificate
Blue Red Green Purple
Rocket Beer Warehouse Shop
Square Star Circle


I’m a journalist, telling stories through text and multimedia.
In the past 2 years, I wrote more than 100 reports and designing digital works of them.
60% of prisons in Taiwan were faced with the predicament of overcrowding. The worst overcrowding took place at Taoyuan Prison, which housed over 50% more inmates
than the approved capacity.
Taking in more inmates than legally approved not only violates human rights, but goes against the goals of rehabilitation and correction. Forced to live in horrible conditions in prison, inmates are more likely to engage in criminal activities after returning to society, which leads to more recidivism.
The multimedia project "Room for Remorse" analyzes the negative effects of
prison overcrowding upon inmates, prison workers and the entire society, and also
discusses the causes of overcrowding and possible solutions.
Given that a wide range of data was used in the report, I chose to tell the story with interactive infographics to present information in a more accessible way.
Aside from interactive infographics, I also constructed a virtual reality model of the actual prison cell based on interviews with prison workers, helping viewers to experience the inferior living condition faced by inmates.
As Deuze(2005) points out, the production, transmission and reception of digital news involve multiple new media technologies, which are different from traditional media in terms of function. New media technologies usually combine text, video and graphics to make a “story package” in one web interface, which is also called “Convergence Continuum”.
Room for Remorse is a package of text, infographics, 360 video and VR. The landing page shows 8 articles, as well as infographics and VR button on nav-bar for easy access to other parts of the project.
As Oh & Sundar(2015) points out, Modality Interactivity means the diversity of tools and forms in interactive interfaces, including actions like Sliders, Mouse-overs and Zoom Feature. Oh & Sundar argue that Modality Interactivity helps web users become more immersed in their browsing behavior. When they perform “Sliders”, they need to move their mouses, which makes users’ brains accept, respond to and finally absorb the information instead of just reading through passively.
The webpage that features infographics utilizes scrolling to guide viewers through 4 aspects of overcrowding: current state, impacts, causes, and solutions. I used a wide range of visual elements such as infographics and illustrations to present data in more engaging ways.
For better user experience on mobile devices, the project adopts the Responsive Web Design (RWD).
To strengthen “Modality Interactivity”, all infographics are designed to fade in through mouse-moves.
First, I use maps and charts to describe the overall overcrowding situation in 2016.
Then I provide a quick international comparison of imprisonment rate and accommodation rate among Asian countries.
To help viewers compare the overcrowding rates of all the prisons in Taiwan in a more intuitive way, I made area charts to show the difference between the space each prisoner actually occupies with the space approved by law.
These two charts show that half of the inmates were sentenced to incarceration for drug offenses, and the recidivism rate of drug-related offenses is also higher than the average level. These charts are designed to answer the question of what are the major causes of prison overcrowding.
To introduce the government officials, experts, prison workers I interviewed for the project, I designed their profile images with their respective quote lines, giving readers a quick summary of the main themes of each article.
Immersive Journalism is a narrative mode that lets viewers experience certain news events through First-Person Perspective (1PP).
Immersive journalists use panoramic cameras to capture scenes and sound to build 3D models. They also add avatars and interactive materials to the virtual environment. Finally, with the help of a virtual reality device, the original scene is presented to viewers in its most original form. More than imagining what happened through second-hand sources, viewers now can experience the whole story by themselves.
To present the living environment of 17 prisoners squeezed in a prison cell designed for 8 inmates with the highest precision, I consulted with prison guard Wen-Wei Lin of I-Lan prison and Graham Roberts from the VR team of New York Times. Given that VR gadgets would be unavailable to most viewers, the project provides two formats for the immersive section: the 360 video version and the VR version.
To watch 360 video, users can click the video on Youtube, or use Google Cardboard to immerse themselves. Considering that the viewing angle is fixed in the 360 video, I placed 5 observation spots in the project.
To experience virtual reality, users need to use VR software like Steam VR and wear devices like HTC VIVE, Gear VR or Play Station VR. They can try to walk in prison space, and change their positions by themselves, experiencing what it is like to live in a tiny space, with roommates laying on the floor and nearly no spare room for walking.
After watching 360 video or VR, viewers can have a more vivid idea of life in overcrowded prison and approach the issue from the prisoners’ perspective.
Screenshot of 360 video
Sketchup draft
A special focus is on user experience, with inputs from my classmates and friends regarding the user experience of the VR model. The model was thus modified multiple times according to those feedbacks.
In the past, without the resource enjoyed by peers living in major cities like Taipei, it could be difficult for students living in rural areas to enter National Taiwan University, the most prestigious higher education institution in Taiwan. In order to narrow the gap between rich students and poor students, The Taiwaneses government unveils a new admission program called “Star Plan” 10 years ago, providing equal opportunities for entering higher education institutions to students regardless of socioeconomic backgrounds.
Through this program, students from humble origins applying for top-rated universities will be evaluated based on their grades and merits in prior education without submitting standardized test scores.
Star Plan has been in place for a decade. Does it really help to alleviate education inequality across the whole country? how did Star Plan students perform in prestigious universities? The project "Who Can Get into NTU?" tried to answer all the questions through data and graphics.
I used line chart, illustration graphics, javascript effect like mouse-overs, mouse-moves, to show information about Star Plan students, such as how many students enter higher education through Star Plan, how many NTU students are from Star Plan, and how Star Plan students perform academically in college.
This transforms dry data into engaging graphics and charts, and viewers would be more likely to understand what Star Plan policy has achieved in recent years.
Firstly, I explained the differences between Star Plan and other admission programs.
I then used a line chart to show the rising popularity of Star Plan among students. The fade-in image is designed to have a visual impact upon readers.
I borrowed the concept of “scales” to help explain to readers the fact that the urban/rural ratio of NTU students from Star Plan is nearly equal. The blue image represents the percentage of the student from Taipei while the green one represents the percentage of students from the rural area.
The interactive graphics showed the number of different high schools in which Star Plan students in NTU received their secondary education. Readers can easily discern the increase through animated effect triggered by mouse scrolling. Overall, the two graphics above showed that Star Plan has improved social equality and justice in the education system.
Through a few mouse clicks, users can find out that the academic performance of Star Plan students is much better than students who were admitted through the other channels, regardless of being at NTU or other universities.
Zero animal euthanasia policy has been in place in Taiwan since 2017. However, ensuing overcrowding in animal shelters keeps putting pressure on the animal protection system. To solve the problem, animal shelters run more campaigns to promote adoption. But instead of receiving decent care, some adopted animals fell into the hands of mean adopters and led tragic lives. Is Taiwan really prepared for zero animal euthanasia? Through data, I tried to tell an engaging story about the policy.
The making of the project covers a wide range of media production skills, including research, interview, graphic design and animation.
I used Adobe After Effects to produce the animation, in which I highlighted the number of animals accommodated in shelters in each county, human headcounts of shelters, and the adoption ratio of animals in shelters. Coupled with illustration and graphics, the animation transformed the complex issue to bite-sized graphics, helping viewers to know more about living conditions of stray animals in Taiwan.
CakeResume is One of the most popular resume making services in Taiwan. I designed visual content for social media use, which usually included simple graphics and illustrations.
I was invited to the exhibition of designers who learn digital skills by themselves. I chose to design posters for famous movies in experimental and abstract styles.
I made the banner of Taiwan YouTuber Charlie's channel, which has over 400,000 fans.


Lower Back Pain
Executive summary
Introduction
Lower back pain is a very common presentation in General Medical Practice. Up to 80-90% of people will suffer lower back pain (LBP) in their lifetime.  Most lower pain results from benign acute musculoskeletal conditions, relating to the strain put on the back during work, leisure and daily life
Target users
· Nurses
· Doctors
Target area of use
· Gate Clinic
· OPD
Key areas of focus / New additions / Changes
Features suggestive of serious or unusual causes of lower back pain should be sought for during history and physical examination. Investigations are most useful for patients with unremitting acute lower back pain and in other patients with severe or suspicious features. General measures for treatment include lifestyle changes, analgesia and physical therapy.
Limitations
Patients may need referral for physiotherapy and specialist services which are not available in our facility.
Common causes of LBP
· Minor tissue injuries – by far the commonest. Settles easily usually
· Mechanical back pain – dysfunction of elements of facet joint, intervertebral joint (with its disc) and the ligamentous and muscular attachments (also known as ‘non-specific back pain’).
· Lumbar spondylosis
· Spondylolisthesis
· Musculoligamentous strain/tears
· Spondyloarthropathies: Ankylosing spondylitis, reactive arthritis
· Malignant disease: Metastasis
· Depression
History
A focused history taking should be conducted to place patient with low back pain into one of three categories:
1. Non-specific low back pain: SOCRATES- Site Onset Character Radiation Activity inTensity Exacerbating/Relieving factors & Symptoms associated
2. Back pain potentially associated with radiculopathy or spinal stenosis
3. Back pain associated with another specific spinal cause (tumour, infection, fracture).
Diagnostic pointers
· Continuous pain (day and night), fever +/- Constitutional symptoms = Neoplasia or infection.
· Pain with standing/walking (relief with sitting) = Spondylolisthesis
· Pain (and stiffness) at rest, relief with activity = Inflammation
· Stiffness at rest, pain with or after activity, relief with rest = osteoarthritis.
· Pain provoked by activity, relieved with rest = mechanical dysfunction
· Pain in bed at early morning = depression then inflammation, or malignancy/infection.
Red flags for serious causes of LBP
· Unremitting/constant pain- worse at night pain
· Unexplained weight loss
· Symptoms in other systems e.g. cough, breast mass
· Progressive neurological deficit: e.g. weakness in limbs, loss of sphincteric control
· Bilateral sciatica
· Age at onset> 50 years and < 20 years
· Associated temperature > 37.8ºC
· Significant/violent trauma
· No improvement after one month
· Recent onset bladder dysfunction
· History of cancer
Yellow flag signs in LBP (Psychosocial issues that impede recovery)
· Compensation issues
· Failure to return to work
· Refusal of treatment
· Unsatisfactory response to treatment
· Atypical physical signs
· Unsupportive home environment
· Inappropriate expectations
· Belief that activity & physiotherapy are harmful
Examination- Gait, Look, Move & Special Tests
The main components of the physical examination are:
· Inspection: abnormalities of gait (stance & sway), spine curvatures, scars revealing previous spine procedure or trauma, spine abnormalities (e.g. gibbus) etc.
· Active movements: These includes forward flexion (to reproduce patient symptoms), extension (to reproduce patient’s symptoms), lateral flexion (R&L) to reproduce patient’s symptoms.
· Provocative tests (to reproduce the patient’s symptoms) e.g. Slump test, Lasegue or straight leg raising test, Cross straight leg raising test
· Palpation (to detect level of tenderness).
· Neurological examination of lower limbs (if appropriate).
· Testing of related joints (hip, sacroiliac).
· Assessment of pelvis and lower limbs for any deformity (e.g. leg shortening).
· General medical examination, including rectal examination as indicated in patients presentation
Management
For acute lower back pain
Explanation and reassurance.
Back education:
· Lie down on side with pillow in between thigh, avoid lying down on the back.
· Do not slouch when sitting on chairs.
· Sit up straight with back abutting on the chair back.
· Place on foot on a small stool/platform if prolonged sitting for 2 hours or more warranted.
· Walk around for 15 minutes after every two hours of sitting down.
Encouragement of normal daily activities according to degree of comfort.
Prescribe simple exercises (provided no aggravation of pain).
Regular non-opioid analgesics (e.g. paracetamol).
Consider physiotherapy based on your assessment of the severity.
If very severe, review in about 5 days – one week (probably best time for physiotherapy).
No investigation is needed initially!!
For sub-acute lower back pain
If severe or any diagnostic pointer (as listed above) present:
· Plain x- rays of the affected part. Review this with the most experienced clinician around after going through it yourself.
· ESR, PSA (for staff or where they can afford it) in males older than 50 years.
· Blood culture if pyogenic infection suspected.
· For longstanding disorders especially mechanical disorders e.g. CT scan, MRI.
For chronic lower back pain
Investigate as under sub-acute lower back pain.
Back education (as highlighted above) and ongoing support
Encouragement of normal activity
Prescription of simple exercise as the client’s body permits.
Analgesics (e.g. P.O. Paracetamol 500 mg - 1 g up to QDS for 4 days).
NSAIDs for 14–21 days (especially if inflammation is suspected).
Graded physiotherapy with trial of mobilisation (at least three treatments) – if no contraindications.
Consider amitriptyline 10-25 mg (nocte) increasing to maximum 75–100 mg
Refer appropriately based on what you find while investigating.
A multidisciplinary team approach is recommended – Primary care physician, physiotherapist and the orthopaedic surgeon.
Follow up
Patients should be informed that an ongoing back care program should give them an excellent outlook.
Prevention
· Education about back care.
· Golden rules to live by: how to lift, sit, and bend.
· An exercise program: a tailor-made program for the patient.
When to refer to a specialist – orthopaedic, neurosurgeon or spine specialist
· Myelopathy, especially acute cauda equina compression syndrome.
· Severe radiculopathy with progressive neurologic deficit.
· Spinal fractures.
References
Murtagh JM General Practice . 2015. McGraw Hill, Australia Pgs. 401-421
Royal College of General Practitioners et al. Clinical Guidelines for the Management of Acute Low Back Pain. London: RCGP, 1996.
Sloane P, Slatt M, Baker R. Essentials of Family Medicine. Baltimore: Williams & Wilkins, 1988: 228–35.
Kenna C, Murtagh J. Back Pain and Spinal Manipulation (2nd edn). Oxford: Butterworth Heinemann, 1997: 70–164
American Chronic Pain association-Guidelines on management of Low back pain.
American Physical Therapy Low back pain clinical guidelines on the International classification of functioning disability and health
|
Written by: |
Name: Babatunde Awokola |
Date: 13 May 2018 |
|
Reviewed by: |
Name: Fatai Akemokwe |
Date: 4 July 2018 |
|
Version: |
Change history: |
Review due date: |
|
1.0 |
New document |
|
|
2.0 |
Rewritten and updated |
31 July 2020 |
|
2.1 |
Executive summary added |
31 July 2020 |
|
Review Comments (if applicable) |
|
|


apache_beam.io.gcp package¶
Subpackages¶
- apache_beam.io.gcp.datastore package
- Subpackages
- apache_beam.io.gcp.datastore.v1 package
- Submodules
- apache_beam.io.gcp.datastore.v1.datastoreio module
- apache_beam.io.gcp.datastore.v1.datastoreio_test module
- apache_beam.io.gcp.datastore.v1.fake_datastore module
- apache_beam.io.gcp.datastore.v1.helper module
- apache_beam.io.gcp.datastore.v1.helper_test module
- apache_beam.io.gcp.datastore.v1.query_splitter module
- apache_beam.io.gcp.datastore.v1.query_splitter_test module
- Module contents
- apache_beam.io.gcp.datastore.v1 package
- Module contents
- Subpackages
- apache_beam.io.gcp.internal package
- apache_beam.io.gcp.tests package
Submodules¶
apache_beam.io.gcp.bigquery module¶
BigQuery sources and sinks.
This module implements reading from and writing to BigQuery tables. It relies on several classes exposed by the BigQuery API: TableSchema, TableFieldSchema, TableRow, and TableCell. The default mode is to return table rows read from a BigQuery source as dictionaries. Similarly a Write transform to a BigQuerySink accepts PCollections of dictionaries. This is done for more convenient programming. If desired, the native TableRow objects can be used throughout to represent rows (use an instance of TableRowJsonCoder as a coder argument when creating the sources or sinks respectively).
Also, for programming convenience, instances of TableReference and TableSchema have a string representation that can be used for the corresponding arguments:
- TableReference can be a PROJECT:DATASET.TABLE or DATASET.TABLE string.
- TableSchema can be a NAME:TYPE{,NAME:TYPE}* string (e.g. ‘month:STRING,event_count:INTEGER’).
The syntax supported is described here: https://cloud.google.com/bigquery/bq-command-line-tool-quickstart
BigQuery sources can be used as main inputs or side inputs. A main input (common case) is expected to be massive and will be split into manageable chunks and processed in parallel. Side inputs are expected to be small and will be read completely every time a ParDo DoFn gets executed. In the example below the lambda function implementing the DoFn for the Map transform will get on each call one row of the main table and all rows of the side table. The runner may use some caching techniques to share the side inputs between calls in order to avoid excessive reading::
main_table = pipeline | 'very_big' >> beam.io.Read(beam.io.BigQuerySource()
side_table = pipeline | 'not_big' >> beam.io.Read(beam.io.BigQuerySource()
results = (
main_table
| 'process data' >> beam.Map(
lambda element, side_input: ..., AsList(side_table)))
There is no difference in how main and side inputs are read. What makes the side_table a ‘side input’ is the AsList wrapper used when passing the table as a parameter to the Map transform. AsList signals to the execution framework that its input should be made available whole.
The main and side inputs are implemented differently. Reading a BigQuery table as main input entails exporting the table to a set of GCS files (currently in JSON format) and then processing those files. Reading the same table as a side input entails querying the table for all its rows. The coder argument on BigQuerySource controls the reading of the lines in the export files (i.e., transform a JSON object into a PCollection element). The coder is not involved when the same table is read as a side input since there is no intermediate format involved. We get the table rows directly from the BigQuery service with a query.
Users may provide a query to read from rather than reading all of a BigQuery table. If specified, the result obtained by executing the specified query will be used as the data of the input transform.:
query_results = pipeline | beam.io.Read(beam.io.BigQuerySource(
query='SELECT year, mean_temp FROM samples.weather_stations'))
When creating a BigQuery input transform, users should provide either a query or a table. Pipeline construction will fail with a validation error if neither or both are specified.
* Short introduction to BigQuery concepts * Tables have rows (TableRow) and each row has cells (TableCell). A table has a schema (TableSchema), which in turn describes the schema of each cell (TableFieldSchema). The terms field and cell are used interchangeably.
- TableSchema: Describes the schema (types and order) for values in each row.
- Has one attribute, ‘field’, which is list of TableFieldSchema objects.
- TableFieldSchema: Describes the schema (type, name) for one field.
- Has several attributes, including ‘name’ and ‘type’. Common values for the type attribute are: ‘STRING’, ‘INTEGER’, ‘FLOAT’, ‘BOOLEAN’. All possible values are described at: https://cloud.google.com/bigquery/preparing-data-for-bigquery#datatypes
- TableRow: Holds all values in a table row. Has one attribute, ‘f’, which is a
- list of TableCell instances.
- TableCell: Holds the value for one cell (or field). Has one attribute,
- ‘v’, which is a JsonValue instance. This class is defined in apitools.base.py.extra_types.py module.
-
class
apache_beam.io.gcp.bigquery.
TableRowJsonCoder
(table_schema=None)[source]¶ Bases:
apache_beam.coders.coders.Coder
A coder for a TableRow instance to/from a JSON string.
Note that the encoding operation (used when writing to sinks) requires the table schema in order to obtain the ordered list of field names. Reading from sources on the other hand does not need the table schema.
-
class
apache_beam.io.gcp.bigquery.
BigQueryDisposition
[source]¶ Bases:
object
Class holding standard strings used for create and write dispositions.
-
CREATE_IF_NEEDED
= 'CREATE_IF_NEEDED'¶
-
CREATE_NEVER
= 'CREATE_NEVER'¶
-
WRITE_APPEND
= 'WRITE_APPEND'¶
-
WRITE_EMPTY
= 'WRITE_EMPTY'¶
-
WRITE_TRUNCATE
= 'WRITE_TRUNCATE'¶
-
-
class
apache_beam.io.gcp.bigquery.
BigQuerySource
(table=None, dataset=None, project=None, query=None, validate=False, coder=None, use_standard_sql=False, flatten_results=True)[source]¶ Bases:
apache_beam.runners.dataflow.native_io.iobase.NativeSource
A source based on a BigQuery table.
-
format
¶ Source format name required for remote execution.
-
-
class
apache_beam.io.gcp.bigquery.
BigQuerySink
(table, dataset=None, project=None, schema=None, create_disposition='CREATE_IF_NEEDED', write_disposition='WRITE_EMPTY', validate=False, coder=None)[source]¶ Bases:
apache_beam.runners.dataflow.native_io.iobase.NativeSink
A sink based on a BigQuery table.
-
format
¶ Sink format name required for remote execution.
-
apache_beam.io.gcp.bigquery_test module¶
Unit tests for BigQuery sources and sinks.
-
class
apache_beam.io.gcp.bigquery_test.
TestBigQueryReader
(methodName='runTest')[source]¶ Bases:
unittest.case.TestCase
-
class
apache_beam.io.gcp.bigquery_test.
TestBigQuerySink
(methodName='runTest')[source]¶ Bases:
unittest.case.TestCase
-
class
apache_beam.io.gcp.bigquery_test.
TestBigQuerySource
(methodName='runTest')[source]¶ Bases:
unittest.case.TestCase
-
class
apache_beam.io.gcp.bigquery_test.
TestBigQueryWrapper
(methodName='runTest')[source]¶ Bases:
unittest.case.TestCase
-
class
apache_beam.io.gcp.bigquery_test.
TestBigQueryWriter
(methodName='runTest')[source]¶ Bases:
unittest.case.TestCase
-
class
apache_beam.io.gcp.bigquery_test.
TestRowAsDictJsonCoder
(methodName='runTest')[source]¶ Bases:
unittest.case.TestCase
apache_beam.io.gcp.gcsio module¶
Google Cloud Storage client.
This library evolved from the Google App Engine GCS client available at https://github.com/GoogleCloudPlatform/appengine-gcs-client.
-
class
apache_beam.io.gcp.gcsio.
GcsBufferedReader
(client, path, mode='r', buffer_size=16777216, segment_timeout=60)[source]¶ Bases:
object
A class for reading Google Cloud Storage files.
-
read
(size=-1)[source]¶ Read data from a GCS file.
Parameters: size – Number of bytes to read. Actual number of bytes read is always equal to size unless EOF is reached. If size is negative or unspecified, read the entire file. Returns: data read as str. Raises: IOError
– When this buffer is closed.
-
readline
(size=-1)[source]¶ Read one line delimited by ‘n’ from the file.
Mimics behavior of the readline() method on standard file objects.
A trailing newline character is kept in the string. It may be absent when a file ends with an incomplete line. If the size argument is non-negative, it specifies the maximum string size (counting the newline) to return. A negative size is the same as unspecified. Empty string is returned only when EOF is encountered immediately.
Parameters: size – Maximum number of bytes to read. If not specified, readline stops only on ‘n’ or EOF. Returns: The data read as a string. Raises: IOError
– When this buffer is closed.
-
seek
(offset, whence=0)[source]¶ Set the file’s current offset.
Note if the new offset is out of bound, it is adjusted to either 0 or EOF.
Parameters: - offset – seek offset as number.
- whence – seek mode. Supported modes are os.SEEK_SET (absolute seek), os.SEEK_CUR (seek relative to the current position), and os.SEEK_END (seek relative to the end, offset should be negative).
Raises: IOError
– When this buffer is closed.ValueError
– When whence is invalid.
-
-
class
apache_beam.io.gcp.gcsio.
GcsBufferedWriter
(client, path, mode='w', mime_type='application/octet-stream')[source]¶ Bases:
object
A class for writing Google Cloud Storage files.
-
class
PipeStream
(recv_pipe)[source]¶ Bases:
object
A class that presents a pipe connection as a readable stream.
-
class
-
class
apache_beam.io.gcp.gcsio.
GcsIO
(storage_client=None)[source]¶ Bases:
object
Google Cloud Storage I/O client.
-
copy
(*args, **kwargs)¶
-
copy_batch
(src_dest_pairs)[source]¶ Copies the given GCS object from src to dest.
Parameters: src_dest_pairs – list of (src, dest) tuples of gs://<bucket>/<name> files paths to copy from src to dest, not to exceed MAX_BATCH_OPERATION_SIZE in length. - Returns: List of tuples of (src, dest, exception) in the same order as the
- src_dest_pairs argument, where exception is None if the operation succeeded or the relevant exception if the operation failed.
-
copytree
(src, dest)[source]¶ Renames the given GCS “directory” recursively from src to dest.
Parameters: - src – GCS file path pattern in the form gs://<bucket>/<name>/.
- dest – GCS file path pattern in the form gs://<bucket>/<name>/.
-
delete
(*args, **kwargs)¶
-
delete_batch
(paths)[source]¶ Deletes the objects at the given GCS paths.
Parameters: paths – List of GCS file path patterns in the form gs://<bucket>/<name>, not to exceed MAX_BATCH_OPERATION_SIZE in length. - Returns: List of tuples of (path, exception) in the same order as the paths
- argument, where exception is None if the operation succeeded or the relevant exception if the operation failed.
-
exists
(*args, **kwargs)¶
-
glob
(*args, **kwargs)¶
-
open
(filename, mode='r', read_buffer_size=16777216, mime_type='application/octet-stream')[source]¶ Open a GCS file path for reading or writing.
Parameters: - filename – GCS file path in the form gs://<bucket>/<object>.
- mode – ‘r’ for reading or ‘w’ for writing.
- read_buffer_size – Buffer size to use during read operations.
- mime_type – Mime type to set for write operations.
Returns: file object.
Raises: ValueError
– Invalid open file mode.
-
rename
(src, dest)[source]¶ Renames the given GCS object from src to dest.
Parameters: - src – GCS file path pattern in the form gs://<bucket>/<name>.
- dest – GCS file path pattern in the form gs://<bucket>/<name>.
-
size
(*args, **kwargs)¶
-
size_of_files_in_glob
(*args, **kwargs)¶
-
-
exception
apache_beam.io.gcp.gcsio.
GcsIOError
[source]¶ Bases:
exceptions.IOError
,apache_beam.utils.retry.PermanentException
GCS IO error that should not be retried.
apache_beam.io.gcp.gcsio_test module¶
Tests for Google Cloud Storage client.
-
class
apache_beam.io.gcp.gcsio_test.
FakeFile
(bucket, obj, contents, generation)[source]¶ Bases:
object
-
class
apache_beam.io.gcp.gcsio_test.
TestGCSIO
(methodName='runTest')[source]¶ Bases:
unittest.case.TestCase
apache_beam.io.gcp.pubsub module¶
Google Cloud PubSub sources and sinks.
Cloud Pub/Sub sources and sinks are currently supported only in streaming pipelines, during remote execution.
-
class
apache_beam.io.gcp.pubsub.
PubSubSink
(topic, coder=StrUtf8Coder)[source]¶ Bases:
apache_beam.runners.dataflow.native_io.iobase.NativeSink
Sink for writing to a given Cloud Pub/Sub topic.
-
format
¶ Sink format name required for remote execution.
-
-
class
apache_beam.io.gcp.pubsub.
PubSubSource
(topic, subscription=None, id_label=None, coder=StrUtf8Coder)[source]¶ Bases:
apache_beam.runners.dataflow.native_io.iobase.NativeSource
Source for reading from a given Cloud Pub/Sub topic.
-
topic
¶ Cloud Pub/Sub topic in the form “/topics/<project>/<topic>”.
-
subscription
¶ Optional existing Cloud Pub/Sub subscription to use in the form “projects/<project>/subscriptions/<subscription>”.
-
id_label
¶ The attribute on incoming Pub/Sub messages to use as a unique record identifier. When specified, the value of this attribute (which can be any string that uniquely identifies the record) will be used for deduplication of messages. If not provided, Dataflow cannot guarantee that no duplicate data will be delivered on the Pub/Sub stream. In this case, deduplication of the stream will be strictly best effort.
-
coder
¶ The Coder to use for decoding incoming Pub/Sub messages.
-
format
¶ Source format name required for remote execution.
-
apache_beam.io.gcp.pubsub_test module¶
Unit tests for PubSub sources and sinks.


Checks that the
label
parameter is set for updateTransition calls that create Compose transition animations.


My name is Karen Okoroafor, and I am a college student who aims to write and encourage artists in such a way that I can share the love of God with the people I interact with. Feel free to peruse my website and send me your thoughts on the contact page!


Shop Calculator
Beverage
Blockchain
Autonomous Things
Immersive Experience
Amount
Sub Total
Discount @ 30%
+ VAT @ 40%
Total


The first step to learning Excel is to knowing you want to go fast. This lesson is the beginning of that.
In general, working in Excel is about being efficient, it's a powerful tool, so you won't want to limit yourself. Excel experts will tell you a few things:
I specifically cover these navigation pieces first because it'll be something you'll use in every exercise hereafter, and it'll make you faster once you get to doing any analysis. Excel has a cult following around its shortcuts, so much so that the lack of shortcuts on the Mac version or changing of shortcuts from one version to another has caused outrage from users. You can find a handy and nearly comprehensive list of them here.
Before we get started, you'll want to download the files below for this lesson:
(A note on answers: They are obviously here so you can see the completed exercise, but if you cheat and look ahead, you're only slowing down your learning.)
When you open a blank Excel canvas, anything is possible, but the first thing you must do is walk. Excel is organized like a grid, where each individual "cell" has a coordinate. You can see these coordinates along the top and left side of your Excel window, where the columns are given letters, and the rows are given numbers. "A1", for example, refers to the top-left-most cell in your document.
There are two ways to navigate from cell to cell in Excel:
To do this is fairly straight forward. We can use the directional arrow keys on your keyboard to move around from one cell to another. Try this a bit to get familiar, and when you feel like you have your legs (hopefully this will take ~60 seconds), move over to the right side of the "Lesson 1" box and enter your name in the grey boxes to complete the lesson.
Okay congratulations, now you can move around! However, notice that at any given moment, you are only at one coordinate (cell) at a time. This is great, but often times, you'll want to select multiple cells at the same time. Imagine being able to play battleship, but being able to sink the entire aircraft carrier in one turn. Excel can do this.
To do this, just hold the [SHIFT] key while moving around. Play around with this for a bit and once you're comfortable, complete the exercise for Lesson 2.
All right, lesson 3, moving fast. This is perhaps the most important part of navigation. Lesson 1 taught us to walk. Lesson 2 taught us to be in multiple places at once. This lesson is about running.
Excel is smart, and for any given cell you're in, knows whether there is information next to it. That is - it can skip to the end of all information or skip blank information to the next piece of information. Let's take two examples:
To navigate this, we use the:
Holding CTRL / COMMAND while using the arrow keys serves two main purposes:
Practice this a bit, try a few scenarios in a blank Excel sheet. And again, once comfortable, proceed to finish Lesson 3's exercise.
The last shortcut for navigation! You'll find in this document, and many others you encounter, that there are multiple sheets (they look like tabs at the bottom of the page). This is of course to help us organize information in different areas and break up discrete pieces of analysis.
We'll cover more about sheets later, but for now, we are interested in navigating them quickly and using our keyboard.
Again, take some time to familiarize yourself with these shortcuts, as they will be used frequently. Once it's in your muscle memory, proceed to complete Lesson 4's exercise.
Every section in this course will contain a "capstone" challenge that covers the concepts learned prior. In this case, we cover the lessons above. In general, the challenges will be related to real applications of the lessons learned, so you can get a taste of how you will use the skills. Also, anything from previous sections will be fair game for the challenges, to ensure that the learnings are being used and practiced throughout the course.
In this section's challenge, we'll go through tab switching and skipping cells in more detail. Give it a shot!