|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Marshaller
An instance of Marshaller
may be obtained by the
JAXB user to serialize JAXB objects to various flavours of XML.
The created XML may be:
A byte streamOutputStream |
marshal(Object, java.io.OutputStream) |
|---|---|
A character streamWriter |
marshal(Object, java.io.Writer) |
| Field Summary | |
|---|---|
static java.lang.String |
JAXB_ENCODING
Name of the property that allows to choose the encoding. |
static java.lang.String |
JAXB_FORMATTED_OUTPUT
Name of the property that allows to choose whether the generated XML should be formatted (human readable, indented) or not. |
static java.lang.String |
JAXB_NO_NAMESPACE_SCHEMA_LOCATION
If this property is set to another value than null, then the Marshaller will create an attribute
xsi:noNamespaceSchemaLocation. |
static java.lang.String |
JAXB_SCHEMA_LOCATION
If this property is set to another value than null, then the Marshaller will create an attribute
xsi:schemaLocation. |
| Method Summary | |
|---|---|
ValidationEventHandler |
getEventHandler()
Returns an event handler previously registered by the application. |
org.w3c.dom.Node |
getNode(java.lang.Object pObject)
Returns a DOM view of the given JAXB object. |
java.lang.Object |
getProperty(java.lang.String pName)
Returns the value of the marshaller property pName . |
void |
marshal(java.lang.Object pObject,
org.xml.sax.ContentHandler pTarget)
Marshals the given JAXB object by emitting SAX events into into the given SAX ContentHandler . |
void |
marshal(java.lang.Object pObject,
org.w3c.dom.Node pTarget)
Marshals the given JAXB object by creating a DOM tree below the given node. |
void |
marshal(java.lang.Object pObject,
java.io.OutputStream pTarget)
Marshals the given JAXB object pObject and
serializes it into the byte stream pTarget . |
void |
marshal(java.lang.Object pObject,
javax.xml.transform.Result pTarget)
Marshals the given JAXB object pObject to the
Result pTarget . |
void |
marshal(java.lang.Object pObject,
java.io.Writer pTarget)
Marshals the given JAXB object pObject and
serializes it into the character stream pTarget . |
void |
setEventHandler(ValidationEventHandler pHandler)
Allows the application to set an event handler. |
void |
setProperty(java.lang.String pName,
java.lang.Object pValue)
Sets the marshaller property pName to the value
pValue . |
| Field Detail |
|---|
static final java.lang.String JAXB_ENCODING
Name of the property that allows to choose the encoding.
The encoding applies when marshalling to an
OutputStream
, to a Writer
,
or to a StreamResult
.
It is ignored, if the target is a ContentHandler
,
a DOM Node
, or another flavour of
Result
.
The encoding may be used both to choose the characters being escaped (as &#ddd;) or to convert characters into byte sequences.
The property value is the encoding name, for example
UTF-8, which is the default. Note, that a
JAXB implementation need not support other encodings than
UTF-8, UTF-16, and US-ASCII.
Usually you may expect that the encodings supported by the
JVM itself will work for the Marshaller
as well.
marshal(Object, java.io.OutputStream)
,
marshal(Object, java.io.Writer)
,
marshal(Object, javax.xml.transform.Result)
,
Constant Field Valuesstatic final java.lang.String JAXB_FORMATTED_OUTPUT
Name of the property that allows to choose whether the
generated XML should be formatted (human readable, indented)
or not. By default the generated XML is formatted.
The property value is an instance of Boolean
,
by default Boolean.TRUE
.
The formatting property is supported when marshalling to
a character or byte stream. It is ignored, if the target is
a ContentHandler
, a DOM
Node
, or an instance of
Result
, the exception being a
StreamResult
, which is
in fact a character or byte stream.
marshal(Object, java.io.OutputStream)
,
marshal(Object, java.io.Writer)
,
marshal(Object, javax.xml.transform.Result)
,
Constant Field Valuesstatic final java.lang.String JAXB_SCHEMA_LOCATION
If this property is set to another value than null,
then the Marshaller
will create an attribute
xsi:schemaLocation. The attribute value is
the property value. By default the property is set to
null and no such attribute is generated.
JAXB_NO_NAMESPACE_SCHEMA_LOCATION
,
Constant Field Valuesstatic final java.lang.String JAXB_NO_NAMESPACE_SCHEMA_LOCATION
If this property is set to another value than null,
then the Marshaller
will create an attribute
xsi:noNamespaceSchemaLocation. The attribute
value is the property value. By default the property is set to
null and no such attribute is generated.
JAXB_SCHEMA_LOCATION
,
Constant Field Values| Method Detail |
|---|
void marshal(java.lang.Object pObject, javax.xml.transform.Result pTarget) throws JAXBException
Marshals the given JAXB object pObject
to the
Result
pTarget
. All
JAXB provider must support DOMResult
,
SAXResult
, and
StreamResult
, which can easily
be mapped to marshal(Object, org.w3c.dom.Node)
,
marshal(Object, org.xml.sax.ContentHandler)
,
marshal(Object,java.io.OutputStream)
, or
marshal(Object,java.io.Writer)
. The use of a
Result
as a target isn't
portable beyond these subinterfaces.
pObject
- The JAXB object being marshalled.pTarget
- The Result
being created.
JAXBException
- An unexcpected problem occurred. This may be used,
for example, to throw a nested IOException
.
MarshalException
- Whereever possible, one should throw a
MarshalException
, and not a JAXBException
.
java.lang.IllegalArgumentException
- Any of the parameters was null.JAXB_SCHEMA_LOCATION
,
JAXB_NO_NAMESPACE_SCHEMA_LOCATION
void marshal(java.lang.Object pObject, java.io.OutputStream pTarget) throws JAXBException
Marshals the given JAXB object pObject
and
serializes it into the byte stream pTarget
. Note,
that serialization into a byte stream demands the use of an
encoding. It may be required to set the parameter
JAXB_ENCODING
. By default the created output is
formatted, which may be turned off using
JAXB_FORMATTED_OUTPUT
.
pObject
- The JAXB object being marshalled.pTarget
- The output byte stream.
JAXBException
- An unexpected problem occurred. This may be used,
for example, to throw a nested IOException
.
MarshalException
- Whereever possible, one should prefer the
MarshalException
over the JAXBException
.
java.lang.IllegalArgumentException
- Any of the parameters was null.JAXB_ENCODING
,
JAXB_FORMATTED_OUTPUT
,
JAXB_NO_NAMESPACE_SCHEMA_LOCATION
,
JAXB_SCHEMA_LOCATION
void marshal(java.lang.Object pObject, java.io.Writer pTarget) throws JAXBException
Marshals the given JAXB object pObject
and
serializes it into the character stream pTarget
.
Unlike serialization to a byte stream, an encoding is not
required, but a Marshaller
may use the encoding
whether to escape a character or not. Use of the
JAXB_ENCODING
property is still recommended. By
default the created output is
formatted, which may be turned off using
JAXB_FORMATTED_OUTPUT
.
pObject
- The JAXB object being marshalled.pTarget
- The output character stream.
JAXBException
- An unexpected problem occurred. This may be used,
for example, to throw a nested IOException
.
MarshalException
- Whereever possible, one should prefer the
MarshalException
over the JAXBException
.
java.lang.IllegalArgumentException
- Any of the parameters was null.JAXB_ENCODING
,
JAXB_FORMATTED_OUTPUT
,
JAXB_NO_NAMESPACE_SCHEMA_LOCATION
,
JAXB_SCHEMA_LOCATION
void marshal(java.lang.Object pObject, org.xml.sax.ContentHandler pTarget) throws JAXBException
Marshals the given JAXB object by emitting SAX events into
into the given SAX ContentHandler
. This
includes the events ContentHandler.startDocument()
and ContentHandler.endDocument()
.
pObject
- The JAXB Object being marshalled.pTarget
- The target event handler.
JAXBException
- An unexpected problem occurred. This may be used,
for example, to throw a nested SAXException
.
MarshalException
- Whereever possible, one should prefer the
MarshalException
over the JAXBException
.
java.lang.IllegalArgumentException
- Any of the parameters was null.JAXB_NO_NAMESPACE_SCHEMA_LOCATION
,
JAXB_SCHEMA_LOCATION
void marshal(java.lang.Object pObject, org.w3c.dom.Node pTarget) throws JAXBException
Marshals the given JAXB object by creating a DOM tree below the given node.
pObject
- The JAXB object being marshalled.pTarget
- The target node. This node must be ready to accept a
child element. For example, it may be a Document
,
a DocumentFragment
, or an
Element
.
JAXBException
- An unexpected problem occurred. This may be used,
for example, to throw a nested DOMException
.
MarshalException
- Whereever possible, one should prefer the
MarshalException
over the JAXBException
.
java.lang.IllegalArgumentException
- Any of the parameters was null.JAXB_NO_NAMESPACE_SCHEMA_LOCATION
,
JAXB_SCHEMA_LOCATION
org.w3c.dom.Node getNode(java.lang.Object pObject) throws JAXBException
Returns a DOM view of the given JAXB object. This view is life in the sense that modifications of its DOM tree will trigger updates on the original JAXB object.
Note: This is an optional feature and not supported by all JAXB providers.
pObject
- The JAXB object being viewed.
java.lang.UnsupportedOperationException
- The JAXB provider does not
support DOM views.
JAXBException
- An unexpected problem occurred. This may be used,
for example, to throw a nested DOMException
.
java.lang.IllegalArgumentException
- The parameter was null.void setProperty(java.lang.String pName, java.lang.Object pValue) throws PropertyException
Sets the marshaller property pName
to the value
pValue
. Note, that the value type depends on the
property being set. For example, the property
JAXB_ENCODING
requires a string, but the property
JAXB_FORMATTED_OUTPUT
requires a Boolean
.
pName
- The property name.
PropertyException
- An error occurred while processing the property.
java.lang.IllegalArgumentException
- The name parameter was null.java.lang.Object getProperty(java.lang.String pName) throws PropertyException
Returns the value of the marshaller property pName
.
Note, that the value type depends on the
property being set. For example, the property
JAXB_ENCODING
requires a string, but the property
JAXB_FORMATTED_OUTPUT
requires a Boolean
.
pName
- The property name.
PropertyException
- An error occurred while processing the property.
java.lang.IllegalArgumentException
- The name parameter was null.void setEventHandler(ValidationEventHandler pHandler) throws JAXBException
Allows the application to set an event handler. The event handler will be invoked in case of a validation event.
Note: The ability to register an event handler does not
indicate that a JAXB provider is required to validate the objects
being marshalled. If you want to ensure, that only valid objects
are marshalled, you should perform an explicit validation using a
Validator
.
pHandler
- An application specific event handler or null to
revert to the default event handler. The default handler is
throwing an exception in case of errors.
JAXBException
ValidationEventHandler getEventHandler() throws JAXBException
Returns an event handler previously registered by the application. The event handler will be invoked in case of a validation event.
Note: The ability to register an event handler does not
indicate that a JAXB provider is required to validate the objects
being marshalled. If you want to ensure, that only valid objects
are marshalled, you should perform an explicit validation using a
Validator
.
JAXBException
- An error occurred while getting the event
handler.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |


Demo pages
Widget you can include in your page
Gene query example widget - zinc finger
BRCA2 gene as seen in Ensembl
Version for experiment page of Expression Atlas
Baseline experiment
Baseline experiment, one gene with its coexpressions
Differential RNASeq experiment
Microarray experiment


Further, I don’t understand startup culture at all. Surely the goal is to create a long-term, successful, profitable place where you enjoy spending your time. If you’re spending your whole life perpetually starting over again surely you’re doing something wrong.
Surely?


Introduction
Calculate splits for a goal time over a certain race distance and
split length. This calculator was designed for track and field
distances, it can also be used for ultra marathons, road races,
cycling races, swim races, etc. Just enter your goal time, race
distance, and your desired distance for splits.
Examples
Calculate 1km splits for a 10km race
Calculate 400m track lap splits for a 1500m race
Use split distance larger than race to estimate endtime; Predict 3km race time based on 400m split


fun getDeviceType(context: Context, activity: Activity): String
Get device type. Please note: This functions needs a reference to a Context as well as to an Activity.
context - pass a context
context
activity - pass an activity
activity
Return device type as encoded in the API spec.


Path:
Key:
Value (in hexadecimal, must be multiple of 16 bytes):
Encrypt:
Encrypt
Ask on encrypt:
Ask on encrypt
Ask on decrypt:
Ask on decrypt
Encrypt/decrypt
Result:


|
ovs all
|
#include <rstp-common.h>
Data Fields | |
| struct ovs_refcount | ref_cnt |
| uint32_t | rx_rstp_bpdu_cnt |
| struct rstp* rstp rstp_port::OVS_GUARDED_BY | ( | rstp_mutex | ) |
| struct hmap_node node rstp_port::OVS_GUARDED_BY | ( | rstp_mutex | ) |
| struct rstp_bpdu received_bpdu_buffer rstp_port::OVS_GUARDED_BY | ( | rstp_mutex | ) |
| void* aux rstp_port::OVS_GUARDED_BY | ( | rstp_mutex | ) |
| bool mac_operational rstp_port::OVS_GUARDED_BY | ( | rstp_mutex | ) |
| bool is_administrative_bridge_port rstp_port::OVS_GUARDED_BY | ( | rstp_mutex | ) |
| enum rstp_admin_point_to_point_mac_state admin_point_to_point_mac rstp_port::OVS_GUARDED_BY | ( | rstp_mutex | ) |
| bool oper_point_to_point_mac rstp_port::OVS_GUARDED_BY | ( | rstp_mutex | ) |
| bool admin_edge rstp_port::OVS_GUARDED_BY | ( | rstp_mutex | ) |
| bool auto_edge rstp_port::OVS_GUARDED_BY | ( | rstp_mutex | ) |
| uint16_t port_number rstp_port::OVS_GUARDED_BY | ( | rstp_mutex | ) |
| uint8_t priority rstp_port::OVS_GUARDED_BY | ( | rstp_mutex | ) |
| uint32_t port_path_cost rstp_port::OVS_GUARDED_BY | ( | rstp_mutex | ) |
| uint16_t edge_delay_while rstp_port::OVS_GUARDED_BY | ( | rstp_mutex | ) |
| uint16_t fd_while rstp_port::OVS_GUARDED_BY | ( | rstp_mutex | ) |
| uint16_t hello_when rstp_port::OVS_GUARDED_BY | ( | rstp_mutex | ) |
| uint16_t mdelay_while rstp_port::OVS_GUARDED_BY | ( | rstp_mutex | ) |
| uint16_t rb_while rstp_port::OVS_GUARDED_BY | ( | rstp_mutex | ) |
| uint16_t rcvd_info_while rstp_port::OVS_GUARDED_BY | ( | rstp_mutex | ) |
| uint16_t rr_while rstp_port::OVS_GUARDED_BY | ( | rstp_mutex | ) |
| uint16_t tc_while rstp_port::OVS_GUARDED_BY | ( | rstp_mutex | ) |
| uint32_t ageing_time rstp_port::OVS_GUARDED_BY | ( | rstp_mutex | ) |
| bool agree rstp_port::OVS_GUARDED_BY | ( | rstp_mutex | ) |
| bool agreed rstp_port::OVS_GUARDED_BY | ( | rstp_mutex | ) |
| struct rstp_priority_vector designated_priority_vector rstp_port::OVS_GUARDED_BY | ( | rstp_mutex | ) |
| struct rstp_times designated_times rstp_port::OVS_GUARDED_BY | ( | rstp_mutex | ) |
| bool disputed rstp_port::OVS_GUARDED_BY | ( | rstp_mutex | ) |
| uint8_t fdb_flush rstp_port::OVS_GUARDED_BY | ( | rstp_mutex | ) |
| bool forward rstp_port::OVS_GUARDED_BY | ( | rstp_mutex | ) |
| bool forwarding rstp_port::OVS_GUARDED_BY | ( | rstp_mutex | ) |
| enum rstp_info_is info_is rstp_port::OVS_GUARDED_BY | ( | rstp_mutex | ) |
| bool learn rstp_port::OVS_GUARDED_BY | ( | rstp_mutex | ) |
| bool learning rstp_port::OVS_GUARDED_BY | ( | rstp_mutex | ) |
| bool mcheck rstp_port::OVS_GUARDED_BY | ( | rstp_mutex | ) |
| struct rstp_priority_vector msg_priority rstp_port::OVS_GUARDED_BY | ( | rstp_mutex | ) |
| struct rstp_times msg_times rstp_port::OVS_GUARDED_BY | ( | rstp_mutex | ) |
| bool new_info rstp_port::OVS_GUARDED_BY | ( | rstp_mutex | ) |
| bool oper_edge rstp_port::OVS_GUARDED_BY | ( | rstp_mutex | ) |
| bool port_enabled rstp_port::OVS_GUARDED_BY | ( | rstp_mutex | ) |
| uint16_t port_id rstp_port::OVS_GUARDED_BY | ( | rstp_mutex | ) |
| struct rstp_priority_vector port_priority rstp_port::OVS_GUARDED_BY | ( | rstp_mutex | ) |
| struct rstp_times port_times rstp_port::OVS_GUARDED_BY | ( | rstp_mutex | ) |
| bool proposed rstp_port::OVS_GUARDED_BY | ( | rstp_mutex | ) |
| bool proposing rstp_port::OVS_GUARDED_BY | ( | rstp_mutex | ) |
| bool rcvd_bpdu rstp_port::OVS_GUARDED_BY | ( | rstp_mutex | ) |
| enum rstp_rcvd_info rcvd_info rstp_port::OVS_GUARDED_BY | ( | rstp_mutex | ) |
| bool rcvd_msg rstp_port::OVS_GUARDED_BY | ( | rstp_mutex | ) |
| bool rcvd_rstp rstp_port::OVS_GUARDED_BY | ( | rstp_mutex | ) |
| bool rcvd_stp rstp_port::OVS_GUARDED_BY | ( | rstp_mutex | ) |
| bool rcvd_tc rstp_port::OVS_GUARDED_BY | ( | rstp_mutex | ) |
| bool rcvd_tc_ack rstp_port::OVS_GUARDED_BY | ( | rstp_mutex | ) |
| bool rcvd_tcn rstp_port::OVS_GUARDED_BY | ( | rstp_mutex | ) |
| bool re_root rstp_port::OVS_GUARDED_BY | ( | rstp_mutex | ) |
| bool reselect rstp_port::OVS_GUARDED_BY | ( | rstp_mutex | ) |
| enum rstp_port_role role rstp_port::OVS_GUARDED_BY | ( | rstp_mutex | ) |
| enum rstp_port_role selected_role rstp_port::OVS_GUARDED_BY | ( | rstp_mutex | ) |
| bool selected rstp_port::OVS_GUARDED_BY | ( | rstp_mutex | ) |
| bool send_rstp rstp_port::OVS_GUARDED_BY | ( | rstp_mutex | ) |
| bool sync rstp_port::OVS_GUARDED_BY | ( | rstp_mutex | ) |
| bool synced rstp_port::OVS_GUARDED_BY | ( | rstp_mutex | ) |
| bool tc_ack rstp_port::OVS_GUARDED_BY | ( | rstp_mutex | ) |
| bool tc_prop rstp_port::OVS_GUARDED_BY | ( | rstp_mutex | ) |
| bool tick rstp_port::OVS_GUARDED_BY | ( | rstp_mutex | ) |
| uint16_t tx_count rstp_port::OVS_GUARDED_BY | ( | rstp_mutex | ) |
| bool updt_info rstp_port::OVS_GUARDED_BY | ( | rstp_mutex | ) |
| uint32_t error_count rstp_port::OVS_GUARDED_BY | ( | rstp_mutex | ) |
| enum rstp_state rstp_state rstp_port::OVS_GUARDED_BY | ( | rstp_mutex | ) |
| uint32_t uptime rstp_port::OVS_GUARDED_BY | ( | rstp_mutex | ) |
| enum bridge_detection_state_machine bridge_detection_sm_state rstp_port::OVS_GUARDED_BY | ( | rstp_mutex | ) |
| enum port_information_state_machine port_information_sm_state rstp_port::OVS_GUARDED_BY | ( | rstp_mutex | ) |
| bool state_changed rstp_port::OVS_GUARDED_BY | ( | rstp_mutex | ) |
| enum port_state_transition_state_machine port_state_transition_sm_state rstp_port::OVS_GUARDED_BY | ( | rstp_mutex | ) |
| enum port_receive_state_machine port_receive_sm_state rstp_port::OVS_GUARDED_BY | ( | rstp_mutex | ) |
| enum port_protocol_migration_state_machine port_protocol_migration_sm_state rstp_port::OVS_GUARDED_BY | ( | rstp_mutex | ) |
| enum topology_change_state_machine topology_change_sm_state rstp_port::OVS_GUARDED_BY | ( | rstp_mutex | ) |
| enum port_transmit_state_machine port_transmit_sm_state rstp_port::OVS_GUARDED_BY | ( | rstp_mutex | ) |
| enum port_role_transition_state_machine port_role_transition_sm_state rstp_port::OVS_GUARDED_BY | ( | rstp_mutex | ) |
| struct ovs_refcount rstp_port::ref_cnt |
| uint32_t rstp_port::rx_rstp_bpdu_cnt |


The type of the documents being indexed.
const documents = [
{
id: 1,
title: 'Moby Dick',
text: 'Call me Ishmael. Some years ago...',
category: 'fiction'
},
{
id: 2,
title: 'Zen and the Art of Motorcycle Maintenance',
text: 'I can see by my watch...',
category: 'fiction'
},
{
id: 3,
title: 'Neuromancer',
text: 'The sky above the port was...',
category: 'fiction'
},
{
id: 4,
title: 'Zen and the Art of Archery',
text: 'At first sight it must seem...',
category: 'non-fiction'
},
// ...and more
]
// Create a search engine that indexes the 'title' and 'text' fields for
// full-text search. Search results will include 'title' and 'category' (plus the
// id field, that is always stored and returned)
const miniSearch = new MiniSearch({
fields: ['title', 'text'],
storeFields: ['title', 'category']
})
// Add documents to the index
miniSearch.addAll(documents)
// Search for documents:
let results = miniSearch.search('zen art motorcycle')
// => [
// { id: 2, title: 'Zen and the Art of Motorcycle Maintenance', category: 'fiction', score: 2.77258 },
// { id: 4, title: 'Zen and the Art of Archery', category: 'non-fiction', score: 1.38629 }
// ]
Configuration options
// Create a search engine that indexes the 'title' and 'text' fields of your
// documents:
const miniSearch = new MiniSearch({ fields: ['title', 'text'] })
// Your documents are assumed to include a unique 'id' field, but if you want
// to use a different field for document identification, you can set the
// 'idField' option:
const miniSearch = new MiniSearch({ idField: 'key', fields: ['title', 'text'] })
// The full set of options (here with their default value) is:
const miniSearch = new MiniSearch({
// idField: field that uniquely identifies a document
idField: 'id',
// extractField: function used to get the value of a field in a document.
// By default, it assumes the document is a flat object with field names as
// property keys and field values as string property values, but custom logic
// can be implemented by setting this option to a custom extractor function.
extractField: (document, fieldName) => document[fieldName],
// tokenize: function used to split fields into individual terms. By
// default, it is also used to tokenize search queries, unless a specific
// `tokenize` search option is supplied. When tokenizing an indexed field,
// the field name is passed as the second argument.
tokenize: (string, _fieldName) => string.split(SPACE_OR_PUNCTUATION),
// processTerm: function used to process each tokenized term before
// indexing. It can be used for stemming and normalization. Return a falsy
// value in order to discard a term. By default, it is also used to process
// search queries, unless a specific `processTerm` option is supplied as a
// search option. When processing a term from a indexed field, the field
// name is passed as the second argument.
processTerm: (term, _fieldName) => term.toLowerCase(),
// searchOptions: default search options, see the `search` method for
// details
searchOptions: undefined,
// fields: document fields to be indexed. Mandatory, but not set by default
fields: undefined
// storeFields: document fields to be stored and returned as part of the
// search results.
storeFields: []
})
The number of documents discarded since the most recent vacuuming
A number between 0 and 1 giving an indication about the proportion of documents that are discarded, and can therefore be cleaned up by vacuuming. A value close to 0 means that the index is relatively clean, while a higher value means that the index is relatively dirty, and vacuuming could release memory.
Total number of documents available to search
Is true
if a vacuuming operation is ongoing, false
otherwise
Number of terms in the index
Adds a document to the index
The document to be indexed
Adds all the given documents to the index
An array of documents to be indexed
Adds all the given documents to the index asynchronously.
Returns a promise that resolves (to undefined
) when the indexing is done.
This method is useful when index many documents, to avoid blocking the main
thread. The indexing is performed asynchronously and in chunks.
An array of documents to be indexed
Configuration options
A promise resolving to undefined
when the indexing is done
Provide suggestions for the given search query
The result is a list of suggested modified search queries, derived from the given search query, each with a relevance score, sorted by descending score.
By default, it uses the same options used for search, except that by
default it performs prefix search on the last term of the query, and
combine terms with 'AND'
(requiring all query terms to match). Custom
options can be passed as a second argument. Defaults can be changed upon
calling the MiniSearch
constructor, by passing a autoSuggestOptions
option.
// Get suggestions for 'neuro':
miniSearch.autoSuggest('neuro')
// => [ { suggestion: 'neuromancer', terms: [ 'neuromancer' ], score: 0.46240 } ]
// Get suggestions for 'zen ar':
miniSearch.autoSuggest('zen ar')
// => [
// { suggestion: 'zen archery art', terms: [ 'zen', 'archery', 'art' ], score: 1.73332 },
// { suggestion: 'zen art', terms: [ 'zen', 'art' ], score: 1.21313 }
// ]
// Correct spelling mistakes using fuzzy search:
miniSearch.autoSuggest('neromancer', { fuzzy: 0.2 })
// => [ { suggestion: 'neuromancer', terms: [ 'neuromancer' ], score: 1.03998 } ]
// Get suggestions for 'zen ar', but only within the 'fiction' category
// (assuming that 'category' is a stored field):
miniSearch.autoSuggest('zen ar', {
filter: (result) => result.category === 'fiction'
})
// => [
// { suggestion: 'zen archery art', terms: [ 'zen', 'archery', 'art' ], score: 1.73332 },
// { suggestion: 'zen art', terms: [ 'zen', 'art' ], score: 1.21313 }
// ]
Query string to be expanded into suggestions
Search options. The supported options and default values
are the same as for the search
method, except that by default prefix
search is performed on the last term in the query, and terms are combined
with 'AND'
.
A sorted array of suggestions sorted by relevance score.
Discards the document with the given ID, so it won't appear in search results
It has the same visible effect of MiniSearch.remove (both cause the document to stop appearing in searches), but a different effect on the internal data structures:
MiniSearch.remove requires passing the full document to be removed as argument, and removes it from the inverted index immediately.
MiniSearch.discard instead only needs the document ID, and works by
marking the current version of the document as discarded, so it is
immediately ignored by searches. This is faster and more convenient than
remove
, but the index is not immediately modified. To take care of
that, vacuuming is performed after a certain number of documents are
discarded, cleaning up the index and allowing memory to be released.
After discarding a document, it is possible to re-add a new version, and only the new version will appear in searches. In other words, discarding and re-adding a document works exactly like removing and re-adding it. The MiniSearch.replace method can also be used to replace a document with a new version.
Repetite calls to this method would leave obsolete document references in the index, invisible to searches. Two mechanisms take care of cleaning up: clean up during search, and vacuuming.
Upon search, whenever a discarded ID is found (and ignored for the results), references to the discarded document are removed from the inverted index entries for the search terms. This ensures that subsequent searches for the same terms do not need to skip these obsolete references again.
In addition, vacuuming is performed automatically by default (see the
autoVacuum
field in Options) after a certain number of documents
are discarded. Vacuuming traverses all terms in the index, cleaning up
all references to discarded documents. Vacuuming can also be triggered
manually by calling MiniSearch.vacuum.
The ID of the document to be discarded
Discards the documents with the given IDs, so they won't appear in search results
It is equivalent to calling MiniSearch.discard for all the given IDs, but with the optimization of triggering at most one automatic vacuuming at the end.
Note: to remove all documents from the index, it is faster and more convenient to call MiniSearch.removeAll with no argument, instead of passing all IDs to this method.
Returns the stored fields (as configured in the storeFields
constructor
option) for the given document ID. Returns undefined
if the document is
not present in the index.
The document ID
Returns true
if a document with the given ID is present in the index and
available for search, false
otherwise
The document ID
Removes the given document from the index.
The document to remove must NOT have changed between indexing and removal, otherwise the index will be corrupted.
This method requires passing the full document to be removed (not just the ID), and immediately removes the document from the inverted index, allowing memory to be released. A convenient alternative is MiniSearch.discard, which needs only the document ID, and has the same visible effect, but delays cleaning up the index until the next vacuuming.
The document to be removed
Removes all the given documents from the index. If called with no arguments, it removes all documents from the index.
The documents to be removed. If this argument is omitted, all documents are removed. Note that, for removing all documents, it is more efficient to call this method with no arguments than to pass all documents.
It replaces an existing document with the given updated version
It works by discarding the current version and adding the updated one, so it is functionally equivalent to calling MiniSearch.discard followed by MiniSearch.add. The ID of the updated document should be the same as the original one.
Since it uses MiniSearch.discard internally, this method relies on vacuuming to clean up obsolete document references from the index, allowing memory to be released (see MiniSearch.discard).
The updated document to replace the old version with
Search for documents matching the given search query.
The result is a list of scored document IDs matching the query, sorted by descending score, and each including data about which terms were matched and in which fields.
// Search for "zen art motorcycle" with default options: terms have to match
// exactly, and individual terms are joined with OR
miniSearch.search('zen art motorcycle')
// => [ { id: 2, score: 2.77258, match: { ... } }, { id: 4, score: 1.38629, match: { ... } } ]
// Search only in the 'title' field
miniSearch.search('zen', { fields: ['title'] })
// Boost a field
miniSearch.search('zen', { boost: { title: 2 } })
// Search for "moto" with prefix search (it will match documents
// containing terms that start with "moto" or "neuro")
miniSearch.search('moto neuro', { prefix: true })
// Search for "ismael" with fuzzy search (it will match documents containing
// terms similar to "ismael", with a maximum edit distance of 0.2 term.length
// (rounded to nearest integer)
miniSearch.search('ismael', { fuzzy: 0.2 })
// Mix of exact match, prefix search, and fuzzy search
miniSearch.search('ismael mob', {
prefix: true,
fuzzy: 0.2
})
// Perform fuzzy and prefix search depending on the search term. Here
// performing prefix and fuzzy search only on terms longer than 3 characters
miniSearch.search('ismael mob', {
prefix: term => term.length > 3
fuzzy: term => term.length > 3 ? 0.2 : null
})
// Combine search terms with AND (to match only documents that contain both
// "motorcycle" and "art")
miniSearch.search('motorcycle art', { combineWith: 'AND' })
There is also an AND_NOT combinator, that finds documents that match the first term, but do not match any of the other terms. This combinator is rarely useful with simple queries, and is meant to be used with advanced query combinations (see later for more details).
// Filter only results in the 'fiction' category (assuming that 'category'
// is a stored field)
miniSearch.search('motorcycle art', {
filter: (result) => result.category === 'fiction'
})
It is possible to combine different subqueries with OR, AND, and AND_NOT, and even with different search options, by passing a query expression tree object as the first argument, instead of a string.
// Search for documents that contain "zen" and ("motorcycle" or "archery")
miniSearch.search({
combineWith: 'AND',
queries: [
'zen',
{
combineWith: 'OR',
queries: ['motorcycle', 'archery']
}
]
})
// Search for documents that contain ("apple" or "pear") but not "juice" and
// not "tree"
miniSearch.search({
combineWith: 'AND_NOT',
queries: [
{
combineWith: 'OR',
queries: ['apple', 'pear']
},
'juice',
'tree'
]
})
Each node in the expression tree can be either a string, or an object that
supports all SearchOptions
fields, plus a queries
array field for
subqueries.
Note that, while this can become complicated to do by hand for complex or deeply nested queries, it provides a formalized expression tree API for external libraries that implement a parser for custom query languages.
Search query
Allows serialization of the index to JSON, to possibly store it and later
deserialize it with MiniSearch.loadJSON
.
Normally one does not directly call this method, but rather call the
standard JavaScript JSON.stringify()
passing the MiniSearch
instance,
and JavaScript will internally call this method. Upon deserialization, one
must pass to loadJSON
the same options used to create the original
instance that was serialized.
// Serialize the index:
let miniSearch = new MiniSearch({ fields: ['title', 'text'] })
miniSearch.addAll(documents)
const json = JSON.stringify(miniSearch)
// Later, to deserialize it:
miniSearch = MiniSearch.loadJSON(json, { fields: ['title', 'text'] })
A plain-object serializable representation of the search index.
Triggers a manual vacuuming, cleaning up references to discarded documents from the inverted index
Vacuuming is only useful for applications that use the MiniSearch.discard or MiniSearch.replace methods.
By default, vacuuming is performed automatically when needed (controlled by
the autoVacuum
field in Options), so there is usually no need to call
this method, unless one wants to make sure to perform vacuuming at a
specific moment.
Vacuuming traverses all terms in the inverted index in batches, and cleans up references to discarded documents from the posting list, allowing memory to be released.
The method takes an optional object as argument with the following keys:
batchSize
: the size of each batch (1000 by default)
batchWait
: the number of milliseconds to wait between batches (10 by
default)
On large indexes, vacuuming could have a non-negligible cost: batching avoids blocking the thread for long, diluting this cost so that it is not negatively affecting the application. Nonetheless, this method should only be called when necessary, and relying on automatic vacuuming is usually better.
It returns a promise that resolves (to undefined) when the clean up is completed. If vacuuming is already ongoing at the time this method is called, a new one is enqueued immediately after the ongoing one, and a corresponding promise is returned. However, no more than one vacuuming is enqueued on top of the ongoing one, even if this method is called more times (enqueuing multiple ones would be useless).
Configuration options for the batch size and delay. See VacuumOptions.
Returns the default value of an option. It will throw an error if no option with the given name exists.
Name of the option
The default value of the given option
// Get default tokenizer
MiniSearch.getDefault('tokenize')
// Get default term processor
MiniSearch.getDefault('processTerm')
// Unknown options will throw an error
MiniSearch.getDefault('notExisting')
// => throws 'MiniSearch: unknown option "notExisting"'
Deserializes a JSON index (serialized with JSON.stringify(miniSearch)
)
and instantiates a MiniSearch instance. It should be given the same options
originally used when serializing the index.
// If the index was serialized with:
let miniSearch = new MiniSearch({ fields: ['title', 'text'] })
miniSearch.addAll(documents)
const json = JSON.stringify(miniSearch)
// It can later be deserialized like this:
miniSearch = MiniSearch.loadJSON(json, { fields: ['title', 'text'] })
JSON-serialized index
configuration options, same as the constructor
An instance of MiniSearch deserialized from the given JSON.
Generated using TypeDoc
MiniSearch is the main entrypoint class, implementing a full-text search engine in memory.


Structuring Content
This paragraph contains an overview of the entire page which may contain multiple articles or sections. To better fit the new scrolling page design ethic, we're using a more suitable hierarchy and nomenclature inspired by print publications. Gone are the topics and screens of old; say hello to Pages, Articles, Blocks and Components!
Standard Components
There are several different components available for formatting your content. The Snap! Framework is built on the WET template and utilizes the widgets that have been created at part of that template. To align the look and feel of courses built using the Snap! Framework with those built in Adapt, we will be using a 2-column layout.
Colours and Icons
Colours need to have a high enough contrast to be visible to learners with low vision or colour blindness for example. Icons must be accompanied by descriptive text and have a simple design that is easily discerned.
Customizable Elements
Article text is dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s,printer took a galley of type and scrambled it to make a type specimen book.
Exercises
Article text is dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book.
Big sample page
Article text is dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book.


Alexcoin.github.io
Pris: 1859 kr. Inbunden, 2014. Skickas inom 11-20 vardagar. Köp The Italian-American Immigrant Theatre of New York City 1746-1899 av Emelise Aleandri på Bokus.com. Art Exhibitions In The Interlaken And Thun Region. Marcel Dzama (born 1974 in Winnipeg/Canada, lives in Brooklyn) studied at the University of Manitoba. . Marcel Dzama / Augustin Rebetez / U5 Kunstmuseum Thun; 06. Apr 11. May Marcel Dzama. Puppets, Pawns, and Prophets David Zwirner - New York; Dzama, Marcel WorldCat Identities. Marcel Dzama Parallel to the first institutional solo exhibition Hollow Laughter by the renowned Canadian artist Marcel Dzama in Switzerland, the young Swiss artist positions Augustin Rebetez and the collective U5 are represented with smaller solo shows – when your dreams trickle down your umbrella, the weather is nice and Parasite.
Marcel Dzama first gained fame with his drawings, but has recently expanded his practice to encompass film and three-dimensional work, developing an immediately recognizable language that draws from a diverse range of references and influences, including Dada and Marcel Duchamp.
News Page 43 Galleri Magnus Karlsson. Parallel to the first institutional solo exhibition Hollow Laughter by the renowned Canadian artist Marcel Dzama in Switzerland, the young Swiss artist positions Augustin Rebetez and the collective U5 are represented with smaller solo shows – when your dreams trickle down your umbrella, the weather is nice and Parasite. Marcel Dzama: Hollow Laughter at Sies + Höke.
See more like this Marcel Dzama / Augustin Rebetez / U5 Barbara Berger Marcel Dzama: The Book of Ballet (La Chose La Plus Incroyable Dans Le Monde) Dza Brand. Marcel Dzama Galleri Magnus Karlsson. The Italian-American Immigrant Theatre The leading figure in the summer’s (2014) exhibition was the Canadian artist Marcel Dzama. His work was supported by smaller retrospectives featuring the young Swiss artists Augustin Rebetez and the U5 collective. Results for Barbara-Berger Book Depository. Discover Book Depository s huge selection of Barbara-Berger books online. Free delivery worldwide on over 18 million titles. We use cookies to give you the best possible experience. Marcel Dzama / Augustin Rebetez / U5. Barbara Berger. 30 Oct 2014. Paperback. US$31.96 US$34.78. Save US$2.82. Add to basket. Gott mit neuen Augen sehen.


--- layout: post title: "What Is a Healthy Muffin?" date: 2021-10-06 15:15:00 +0000 tags: muffins image: imagecredits: ---
The Great Muffin Experiment, No. 2 (Jump to the Recipe)
I have always paid some attention to my nutrition. Growing up, my mother made sure that every dinner had a protein, a starch, and a vegetable, for example, as well as the requisite glass of milk for my brother and me. I learned about the food pyramid in school. Cartoon PSAs taught me that "You are what you eat" and that cheese and crackers were a good choice for snacking. Much to my family's chagrin, I became a vegetarian when I left home at age 16 — I'd never really liked meat — but didn't really think much about protein until I became pregnant at 20. All that is to say, I've paid some attention to my nutrition, but I've actually known very little about it, other than the received knowledge from school, family, and television.
Now that my attention has turned to my health and well-being, I'm trying to learn more. But wow, I see so much of the conflicting messaging — the "science" and the bullshit — about what we should be eating, about what I should be eating as someone who's very physically active (and trying to put on muscle through weight-training). And what makes it worse, I'd argue, is that the more you search online for answers or products, the more you get ads that try to sell you on the latest trend: keto, paleo, whatever.
When you search for healthy recipes, you also run into similar sorts of problems — both with the business of "clicks" and the business of "health." Recipe blogging is a finely-tuned SEO machine. The photos — let me tell you — are gorgeous. The prose isn't always that bad. But the recipes, particularly when you're interested in items that are "healthy" or that have more protein, are pretty hit-or-miss. Indeed, I've found that in order to boost the protein levels, many of these recipes simply include protein powder.
Take this one, for example:
{% assign recipes = site.data.recipes %} {% for recipe in recipes %} {% if recipe.title == "Banana Buckwheat Protein Muffins" %} {% assign title = recipe.title %} {% assign description = recipe.description %} {% assign category = recipe.category %} {% assign ingredients = recipe.ingredients %} {% assign cuisine = recipe.cuisine %} {% assign date = recipe.date %} {% assign instructions = recipe.instructions %} {% assign calories = recipe.calories %} {% assign preptime = recipe.preptime %} {% assign cooktime = recipe.cooktime %} {% assign servings = recipe.servings %} {% endif %} {% endfor %}{{ description }}
Prep time: {{ preptime }} minutes · Cooking time: {{ cooktime }} minutes · Servings: {{ servings }} · Calories: {{ calories }}
Ingredients:
Instructions:
I followed the recipe for these fairly closely, substituting Greek yogurt for the soy and whey isolate protein for the plant-based one in the original. I made 12 muffins, not 8 as the kits.eats' recipe indicated. The batter was very runny, and I was concerned the muffins wouldn't hold together. They did, although they didn't really rise much and they were a bit too chewy. (I don't think I over-mixed the batter — often the cause of a chewy muffin. I'll write more soon on how to troubleshoot things like flat muffin-tops.) The texture of the crumb was fine, but they were rather bland — they didn't taste much like banana or buckwheat (and the cacao was more of a crunch than a flavor).
Buckwheat flour, for what it's worth, does have slightly more protein than wheat flour, and I'll experiment with more protein-rich flours in my bakes in lieu of just adding a protein powder.
Here's what I am looking for in a healthy muffin: lots of protein and fiber and very little sugar or sodium. Or, at least 5 grams of protein; at least 2.5 grams of fiber; less than 10 grams of sugar; less than 10 grams of fat; and less than 200 milligrams of sodium. (These numbers might seem arbitrary. In many ways, they are! The main questions I'm working with in this series are: can I make a muffin that has more protein than any ol' basic muffin, and can I make a healthy muffin that tastes great?)
For comparison, the Basic Muffin has 3.5 grams of protein; .7 grams of fiber; 5.4 grams of sugar; 3.8 grams of fat; and 238.5 milligrams of sodium. This Banana Buckwheat Protein muffin has 7.6 grams of protein; 2.7 grams of fiber; 8.5 grams of sugar; 2.5 grams of fat; and 189.3 milligrams of sodium. (Yes, it has twice the protein than the basic muffin, but that comes almost entirely from adding the two scoops of protein powder.)


On this page you can find links to some interactive visualisations of things I have worked on. But first, enjoy this interactive animation of what I think my cat dreams about:
  Bounding Box (Flaherty, Sato & Kirby, in prep)
Body-wrist distance (Flaherty, Sato & Kirby, in prep)
Spread of Variants in a Microcommunity (Segovia-Martin & Tamariz, 2019)


| 項目 | 技能 | 專業度 |
|---|---|---|
| 01 | Adobe Photoshop | ★★★★ |
| 02 | Adobe Illustrator | ★★★★ |
| 03 | Html >> BOOTSTRAP | ★★★ |
| 04 | VS Code | ★★★★ |
| 05 | Java | ★★★ |
My name is Annie,I graduated from Information Technology and Communication in Shih Chine University .
It is my trait that smiling always hangs on my face. This advantage makes it easy for me to identify with my classmates and groups. After class , I even like to combine the photos and albums of my life with the vdieo films of a department and editing of audiovisual works.
I learned a line from my English teacher, which is "Not until you give it a try will you not know the result." I got passion and expectation to myself, and wish you would give me an opportunity to make my dream come true.
">


{% extends "layout.html" %} {% block title %}Editor{% endblock %} {% block content %}
Select something in the left pane to start editing.
Download


about me
- major: cs and asian + middle eastern studies (ames)
- hometown: norman, ok + guangzhou, china
- class: 2019, junior
- hobbies: watching asian dramas, reading manga, watching swimming/diving/tennis/figure skating, traveling, eating good food
cs bio
- i was introduced to computers at a very young age, around 7 or so. my mom was getting a new laptop at work, so she retired her old one to me. i mainly used windows computers until freshman year of high school, when my parents bought me a macbook air. i was against switching from windows at first, but i'm so comfortable with using macs now that i'm now on my second macbook.
- my mom is a software engineer, so i've been exposed to the field for a long time. however, i never really thought about majoring in computer science until i came to duke. before college, i thought about studying maybe math or bme with east asian studies. then i took cs 201, which i had a love-hate relationship with, but ultimately decided to major. currently, i'm confused about what exactly i want to do with this degree but mainly just trying to live my best (and least stressful) life. probably either going to work in corporate tech for a few years and then go to medical school in the future.
- 50% of the time, i use a computer for entertainment, so like watching tv or youtube. 40% for school work, so coding, writing papers, or googling things. 10% for online shopping and other miscellaneous tasks.
- depending on how one defines "computer scientist," i envision the work to be a combination of programming, algorithms/systems/AI/other research, and teaching.
- i am taking this course because:
- i want to become more proficient in html, css, and javascript.
- i want to become more familiar with how to build web apps.
- i want an excuse to build a personal website.
- i needed a cs elective.
- not very familiar with building websites (why i'm taking this class), but i assume one needs to understand some combination of ui/ux, how to incorporate databases, and html/css/javascript to build a good website.
links
- i like the airbnb website because i like clean and minimalist designs. i also like the who what wear blog for the same reasons: clean and easy to navigate.
- i don't like buzzfeed's website because it looks like one of those pop-up ad websites that open when you're on a sketchy website. i should like duke's website, but the fonts and layout are pretty unattractive.
- here is a resource from mozilla on web apis. here is a resource on the latest css properties.
- if you are interested in reading up about boba, click here.
about this course
this website was created specifically for compsci 290.2: web development. the course website can be reached here.


Effect move character
Through this effect we will be able to move the selected character to the selected position.
Create a move character effect:
- Select the effect: Select the effect on the creation effects panel. Press OK.
- Creation effect panel: afterwards an edition panel will appear:
- In the first place we can move the aimed character.
Afterwards we can select a scene from the chapter. As with other effects, the selection of the scene has the only purpose of preview, because the effect does not need to be related to the scene shown here.
- The movement of the person selected will be executed in the scene where this effect was defined. Once you have chosen the scene, you choose the position that the character will move, either filling in the X and Y coordinates or by clicking on the chosen position on the stage


John Denvir
Pink's idea of justice seems
a bit hard-hearted, but we must admit that in the end, it's Pink
who escapes alive with the diamonds so maybe his self-interested
approach has more advantages than his more passionate colleagues
realize.
|
Just Us
by John Denvir
We too often remember Quentin
Tarantino's films for their images of violence. The image of
a thug slicing off a policeman's ear in Reservoir Dogs
is a hard one to forget-even though it never appears in the movie.
The actual mutilation takes place off screen, a fact that indicates
Tarantino is interested in more than violence for violence's
sake. I find Reservoir Dogs more interesting as a movie
about justice than one about violence. Tarantino's idea of justice
has little to do the "legal justice system" with its
juries and prisons and such, but with justice as the hope that
everyone gets what they deserve, their just deserts. Each of
the film's main characters is motivated by a sense of justice,
but what justice demands varies dramatically from individual
to individual and these differing perceptions lead inevitably
to violence.
Since
most readers have not seen the film recently, I would like to
start with a short plot summary to refresh our memories. Reservoir
Dogs is a "heist" film, or more accurately, a "heist
gone bad" film. A group of crooks plans a robbery of a jewelry
warehouse. Tipped off by an undercover policeman (Tim Roth as
Mr. Orange) who has infiltrated the gang, the police show up
to interrupt the robbery. Two of the gang are killed and another
(the same Mr. Orange) is seriously wounded.
We pick up the action when Mr. White (Harvey Keitel) is bringing
the "gut-shot" Mr. Orange to a deserted warehouse where
the gang had agreed to meet after the heist. They are met there
first by Mr. Pink (Steve Buscemi) and a little later by Mr. Blonde
(Michael Madsen) who has brought with him a tied-up policeman
the gang members hope can identify the snitch. They are soon
joined by Nice Guy Eddie (Chris Penn), the gang leader's son
and deputy, who assigns Blonde to guard the prisoner while he,
White, and Pink retrieve the jewels.
When Blonde is alone, he proceeds
to torture his captive. He candidly explains that he doesn't
care whether the policeman tells him the truth or not; it just
amuses him to torture a cop. This is where the ear slicing takes
place. He also intends to burn his victim alive. Just before
Blonde is able to set the policeman aflame, he is shot dead by
Orange who he had mistakenly believed was unconscious. Nice Guy
Eddie, White, and Pink return, soon joined by the gang's leader
Joe (Lawrence Tierney). Joe has no doubt about the identity of
the informer; he "knows" it is Orange because Orange
is the only one he had not worked with for years. He pulls out
his gun to execute Orange, only to be confronted by Mr. White
who claims that Orange is innocent. He asks Joe what his proof
is, but Joe responds. "You don't need proof when you have
instinct." White draws his gun and tells Joe that if he
shoots Orange, he will shoot Joe. At which point Nice guy Eddie
draws his gun and tells White that if he shoots his dad, he will
shoot him. A triple shoot-out ensues, leaving both Joe and Nice
Guy Eddie dead.
At this point Mr. Pink decides to leave with the jewels, feeling
risking capture by the cops is safer than remaining with his
homicidal colleagues. That leaves Mr. White and Mr. Orange. Orange
knows that the police are about to arrive to rescue him and arrest
White, but still he tells White " I'm a cop. I'm sorry,
terribly sorry." At this point the police enter the building
and shoot White dead, but not before he kills Orange.
We can see five different conceptions of justice operating here,
each motivating a different character. Mr. Blonde represents
the first conception of justice. White is a psychopath who has
already killed a whole slew of warehouse employees during the
robbery. He clearly enjoys mutilating the cop for no better reason
than the enjoyment he experiences torturing a cop. This seems
more like sadism than justice. But in Blonde's defense, we must
admit he would not complain if the policeman held the knife and
acted the same way towards him. Justice to White is no more or
less than inflicting pain on your enemy as circumstances allow.
Joe represents another idea of justice, the charismatic leader's
justice. Joe is the gang's boss, the man who gives the orders.
It's Joe who insisted that all the participants in the actual
robbery take the names of colors to keep their true identities
secret. He's an affectionate, generous man towards his workers,
but insists on total obedience. He takes responsibility for the
group's success and claims the right to decide questions of guilt
and punishment. He figures Orange must be the snitch since Orange
is the only new man on the job. No more need of proof than that.
Once he makes that decision, permitting opposition would be perceived
as a sign of weakness, undermining his authority. Orange is a
dead man.
Consider the difference between Joe's idea of justice and that
of Mr. Pink. Mr. Pink is the individualist in the group, always
thinking about what will profit him personally. But he too is
bound by an idea of proper conduct toward his fellows, an idea
that appears to be driven by the idea of contract. He is willing
to perform any obligations he has voluntarily undertaken, but
nothing beyond the terms of the contract. Tarantino allows Pink
to explain his ideas in a very funny monologue about why Pink
doesn't tip waitresses. They are paid to serve the food; he has
agreed to pay the bill. He hasn't agreed to add a tip and chooses
not to. The fact that "society" wishes to place this
nonconsensual burden on him does not move him in the least. He's
also supremely indifferent to his colleagues' arguments that
waitresses need the money. If they don't like the pay, they should
find a new job.
Yet Pink believes himself a professional and acts like one. For
instance, he rescues the diamonds and rather than abscond with
them brings them to the rendez-vous as agreed. He is also the
first to realize someone must have tipped off the cops and insists
they discuss rationally what to do next to identify the snitch.
Pink's idea of justice seems a bit hard-hearted, but we must
admit that in the end, it's Pink who escapes alive with the diamonds
so maybe his self-interested approach has more advantages than
his more passionate colleagues realize.
Mr. White and Mr. Orange both exhibit morally more ambitious
conceptions of justice than the others. White feels that his
relationship with his fellow crooks gives them a claim on his
sympathy. Not willing to be bound by the letter of their agreement,
White reacts spontaneously to Orange's injury and feels something
should be done to relieve his pain. This empathy with suffering
should not surprise us; it was White who was enraged by Pink's
hard-heartedness towards waitresses. He takes responsibility
for Orange because Orange is his colleague and (he thinks) friend.
Unfortunately, this need for human connection makes White less
"professional" than Pink by giving Orange information
that the cop plans to use against him. Also Tarantino cleverly
undercuts White's stance by showing how easily he has been fooled
by the undercover cop. It turns out that White has killed his
friend Joe to save a man who knows that the police are coming
in a few minutes to arrest them all, including White. Empathy
that is not mediated by prudence can be dangerous.
That leaves Mr. Orange who goes beyond even White to embrace
what I will call a "redemptive" concept of justice.

It's only when the blood, including his own, starts to flow that
he realizes that law enforcement impacts heavily on human lives.
In order to stop a burglary that only involved the theft of insured
diamonds, he has set in motion a series of events that will result
in several deaths, including his own. After the shootout when
his protector White crawls to his side, he has a decision to
make. Should he remain silent and wait for the police or confess
his perfidy. Remaining silent is clearly the smart move, but
he can't do it. White's caring for him has created a personal
bond he can't ignore. He feels responsible for the pain he has
caused. Forgiveness-, self-forgiveness- requires action. "I'm
a cop. I'm sorry, terribly sorry." This is a call for his
own death, but one he feels compelled to give.
I think there are some lessons we can take away from this film.
First, the need to act according to some idea of justice seems
hard-wired into the human brain. Crooks are just as justice-obsessed
as the police who pursue them. Secondly, this need for justice
does not break down neatly into procedural and substantive components
the way law school teaches us. It concerns what we owe our fellows.
Thirdly, individual and group disputes, like Joe and White's,
often stem, not from an opposition of justice to injustice, but
differing ideas of what justice requires. Maybe this realization
could make us more understanding of our enemies' motivations.
We should recognize that none of us operate from a pure concept
of justice, but rather an amalgam of these five conceptions and
probably many more. For instance, Pink thinks himself a rationalist,
but enters into kicking the defenseless cop with abandon just
like Blonde. Do we not, like Blonde, enjoy our enemies' pain?
Or like Joe, prefer submission to our authority to the rigors
of proof? Pink's attempt to determine what obligations he has
voluntarily assumed is also an everyday experience. So too we
are inspired by White's taking responsibility for his fellow's
welfare and admire, if not wholly understand, Orange's need to
atone for his misdeeds. In the end, we may find that "justice"
turns out to be "just us."
Posted August 1, 2006
Would
you like to comment on this article? Please submit your comments
here.
|


I'm VR game developer with experience leading projects and working with end users of various skill levels.
I'm interested in all kinds of software development, but my major focus is on designing experiences in Virtual Reality as well as integrating AWS Services together.
Most of my development is with Unity, Java, Python and LAMP web applications, but I have additional experience with AWS services including S3, EC2, KMS, RDS, IAM, and CodeStar suite.
I also have skills in other fields like instruction, usability and project management.
I care about my team mates, and strive to make my project great through encouraging contributions from everyone.
I am a life long learner, and am looking for my next challenge.
AWS Config Rules
AWS Docs Build Tools
AWS SDK and Tools (Java SDK, PHP SDK, Python SDK - Boto3)
Corretto - OpenJDK
AWS Code Example Catalog
Mechanical Turk Team
AWS
Evaluate and Maintain Support for Office 365 Education Products
Develop Sample Content using Product
Usability Tests and Information Architecture
Worked on team of 3 to implement Virtual Relity Game for Occulus Rift and Vive
Utilized Unity 5.5, NewtonVR, and C#.
Used GitHub Repository for version control.
Worked on team of 4 to implement web survey using Bootstrap, PHP, jQuery, and MySQL.
Utilized Usability tests and Paper Prototypes for Design.
Team employed Scrum and Agile methodologies to assign roles and prioritize tasks to be completed.
Used Waffle.io as our Kanban board.
Used GitHub Repository for version control.
Worked on team of 3 to add new features and documentation
Utilized Usability tests and Paper Prototypes for Design and Functionality Testing.
Project was built with Fat Free Framework
Used GitHub Repository for version control.
Worked with programmers to build a game in Unity within 72 Hours.
Designed Levels, performed QA tests, promoted game in community.
Manage listserv for board members.
Organize information on web for better usability.
Kept WordPress site up to date with plug-ins and content management.
Built a simple website using Bootstrap for small buisness owner.
Utilized Usability tests and Paper Prototypes for Design.
Used GitHub Repository for version control.
Worked on team of 2 to recreate card game online using Meteor's Javascript Framework and MongoDB.
Utilized Usability tests and Paper Prototypes for Design.
Used Waffle.io as our Kanban board.
Used GitHub Repository for version control.
Scrum Master for 3 Sprints.
Worked on team of 3 to implement website using Bootstrap, PHP, jQuery, and MySQL.
Utilized Usability tests and Paper Prototypes for Design.
Team employed Agile methodologies to assign roles on Waffle.io.
Used GitHub Repository for version control.
Installed and built a customized theme for WordPress that utilized BadgeOS and BuddyPress.
Developed and Implemented Services for 19 locations.
Provided Outreach Support to 13 School Districts.
Lead 3 Annual Projects. Served on cross departmental committees.
Worked with end user to troubleshoot common technology issues.
Tested website features and desktop images before staff launch.
Green River Community College
Indiana University
Butler University


PHP-FPM real-time status page |
| Status URL | |
| Ajax status | |
| Refresh Rate | |
| Actions |
| PID↓ | Start Time | Start Since | Requests Served | Request Duration | Request method | Request URI | Content Length | User | Script |
|---|
| PID↓ | Start Time | Start Since | Requests Served | Request Duration | Request method | Request URI | Content Length | User | Script | Last Request %CPU | Last Request Memory |
|---|


Log in with your account. If you don't have an account, please register here.
Email or Password invalid, please verify
Forgot password?


Assignment 1: Wireframe
25/Aug/2018
Assignment 2: Responsiveness Assignment
1/Sept/2018
Assignment 3: JavaScript
8/Sept/2018
Assignment 4: jQuery
15/Sept/2018
Assignment 5: Javascript Timers
22/Sept/2018
Assignment 6: APIs GifTastic
29/Sept/2018
Assignment 7: Firebase Assignment - Train Scheduler
6/Oct/2018
Project 1 - Purchasing Orders Follow Up System
13/Oct/2018
Assignment X: Porfolio Update
20/Oct/2018
Assignment 8: Liri Node JS App
27/Oct/2018
Assignment 9: Constructor Word Guess
3/Nov/2018
Assignment 10: Node.js & MySQL
10/Nov/2018
Assignment 11: Friend Finder - Node and Express Servers
17/Nov/2018
Assignment 12: Node Express Handlebars
24/Nov/2018
Assignment 13: Node Express Handlebars Sequelize
1/Dec/2018
Project 2: I Already Saw That Movie App
8/Dec/2018
Assignment XX: Portfolio Update 2
12/Dec/2018
Assignment 14: All the News That's Fit to Scrape
19/Jan/2019
Assignment 15: React Clicky Game
26/Jan/2019
Assignment 16: NYT React Search
02/Feb/2019


finance
Source⧉Crypto
finance
35 messages
⧉infominer
07-Aug-18 11:50 PM
The RiskBlock Alliance, whose members include insurance giants Chubb, Marsh and Liberty Mutual, has decided to build its blockchain on R3's Corda.
⧉infominer
08-Aug-18 12:07 AM
Paul Brassil, vice president of information technology at the Boston branch of the Federal Reserve System stated that blockchain tech can disrupt central banking as any other industry. Speaking at...
⧉infominer
08-Aug-18 12:55 AM
Security Token Offerings will revolutionize the traditional finance world.
By Tatiana Koffman
⧉infominer
08-Aug-18 09:19 PM
A top venture capitalist grades the state of his industry—from payments to crypto.
⧉infominer
16-Aug-18 06:03 PM
Several of the largest financial institutions in the world are investing in this enterprise blockchain startup, and actually using the technology.
⧉infominer
22-Aug-18 11:50 PM
35. (just found) Bitspark providing a blockchain based remittance platform in Tajikistan with the UNDP since 2017 Bitspark now switching to Bitshares blockchain for this purpose.
https://t.co/F1ck85ZJqz
Twitter
⧉infominer
25-Aug-18 09:55 PM
The RiskBlock Alliance, whose members include insurance giants Chubb, Marsh and Liberty Mutual, has decided to build its blockchain on R3's Corda.
⧉infominer
26-Aug-18 12:22 AM
Today we make history by creating the first global blockchain bond. The World Bank has mandated the Commonwealth Bank of Australia as the sole arranger for bond-i, the first global bond to use distributed ledger technology.
Learn more: https://t.co/tieQoQ9uLe #blockchain...
Retweets
112
Likes
122
Twitter
⧉infominer
26-Aug-18 12:35 AM
Fairly big news that has gone under the radar... US investors will now be able to buy #Bitcoin through their @Fidelity accounts. https://t.co/pCwMBd7G8M
Retweets
536
Likes
1113
Twitter
⧉infominer
28-Aug-18 03:27 PM
The Bank of Thailand has revealed a major collaborative project to develop a wholesale Central Bank Digital Currency using R3’s Corda platform.
⧉infominer
30-Aug-18 07:51 PM
⧉infominer
30-Aug-18 08:06 PM
Neon Exchange (NEX), a decentralized exchange and payment service platform is now gearing up for their token sale which is just one week away. Today, the team informed that they have received regulatory approval...
Neon Exchange security token ICO to begin on September 3rd
⧉infominer
03-Sep-18 05:49 PM
The World Bank's blockchain bond raised $110 million AUD, and is based on a private ethereum network.
⧉infominer
28-Sep-18 12:23 AM
What are 5 Ways #Blockchain Will Revolutionize #Business?
[@CentricDigital] MT @Fisher85M
#CyberSecurity #fintech #cryptocurrency #Industry40 #DigitalTransformation #IIoT #CX #infosec
Twitter
⧉infominer
28-Sep-18 07:27 PM
Enterprise software firm R3, the UK’s Financial Conduct Authority (FCA), RBS and another unnamed bank have built a prototype application for regulatory re
⧉infominer
30-Sep-18 09:35 PM
Crypto highlights of the of the DLA Piper report include: 31% of Financial Services firms believe central banks will hold Cryptos on their balance sheet [...]
⧉infominer
30-Sep-18 11:16 PM
Perhaps worth clarifying that the JPMorgan IIN in its current form is for payment issue resolution, not actual payment processing or liquidity management. “Blockchain Payments” in the headline makes it nice clickbait though. https://t.co/1FvFFgEan6
Twitter
Enterprise bitcoin adoption is already very real at payments startup Veem, and that's without this $25 million cash infusion from Google and Goldman Sachs.
⧉infominer
30-Sep-18 11:33 PM
Realising the benefits that Open Banking will deliver will take time.
⧉infominer
08-Oct-18 01:31 AM
The Austrian government is planning to use the ethereum blockchain to notarize the auction of a bond worth around $1.3 billion.
⧉infominer
04-Nov-18 09:54 AM
An overview of the technologies that are shaping the future of finance on the blockchain
⧉infominer
04-Nov-18 01:28 PM
0/ A primer on legal risk assessment & mitigation.
Institutional investors & blue chip companies spend a ton of time & resources analyzing & managing legal risk. If you're investing or working in crypto, you should probably give it some thought too.
Thread.
Twitter
⧉infominer
05-Nov-18 08:23 AM
How is Illiquidity hurting the stakeholders?
⧉infominer
05-Nov-18 09:33 AM
Excited to publish the @fabric_vc Investment Thesis in this 2nd edition of the State of the Token Market Report!
https://t.co/QxJjoM4GhT
Investment Thesis: pages 28-44
@richardmuirhead @Anastasiya_B94 @JulienThevenard @maciejrymarz
 Core Arguments Below
Twitter
⧉infominer
08-Dec-18 11:57 PM
Hi all! Two favorite topics of mine over the past few years have been Islamic Finance and blockchain technology. Though it might not get as much press as crypto, Islamic Finance has similarly enjoyed a recent period of enormous growth.
⧉infominer
22-Dec-18 07:38 PM
0/ @Bakkt plans to launch next month on December 12, and some people are hoping it kicks off another crypto bull run. Now seems like a good time for a quick discussion on:
- what Bakkt is
- why it might be exciting
- when it will get regulatory approval
Thread.
Retweets
1351
Likes
2907
Twitter
A couple reflections on what regulators and central bankers are thinking about, having attended the 'cryptoasset' days of the DC Fintech week at the IMF
Retweets
111
Likes
354
Twitter
14/ Going even deeper into the existing infrastructure, @APompliano wrote up how a consortium of 15 banks is working with the DTCC (who process 95% of all credit derivates globally) to experiment with a blockchain system of trading credit derivates. https://t.co/HQUD93ZXid
Twitter
⧉infominer
23-Dec-18 01:54 AM
In her opening remarks at the #BlockFS conference, @cmoyall, executive director for blockchain at J.P. Morgan, says: “We just put into production our blockchain system for inter-bank transactions, and over a 100 banks have signed up.
Retweets
137
Likes
304
Twitter
⧉infominer
11-Mar-19 09:58 PM
https://www.ccn.com/70-of-central-banks-are-working-on-digital-currencies-no-hurry-to-issue-them-bis
A survey commissioned by the bank of central banks, the Bank of International Settlements, has disclosed that even though Central Bank Digital Currencies (CBDC) are being researched by a big number of reserve banks, the
Raphael Auer, Principal Economist of Monetary and Economic Department at the Bank for International Settlements (BIS), wrote a paper titled “Beyond the doomsday economics of “proof-of-work” in cryptocurrencies.” BIS, an international financial institution owned by cen...
⧉infominer
23-May-19 10:53 PM
What is DeFi?
Twitter
ON GITHUB
Share on
Twitter Facebook LinkedIn RedditSUPPORT THE CAUSE
Feel free to contact me, especially if you're interested in bitcoin related content or research!
| Bitcoin | DOGE |
|---|---|
| 1A1DZfw4VgpHCgnMjnmfDnMjddKf8xdYbd | DQKkzfJjqnXUD8Z7C3e84vKzvghPe9dXSa |


(current)
Hello Doggy
Introducing dog-friendly companies to human-friendly doggies
Select City:
Chi
SF
LA
More Below
Sign up to get Updates!
Cool! You will now recieve a periodic newsletter
Sign up!


On the list 1::2:: ... n::nil
Build a function computing the list
1::2:: ... n::nil for every n of type
nat.
Solution
Look at this file
Note
This solution uses an anonymous recursive function (with fix).
If you want to prove some properties of the main function, it could be
useful to give a name to this auxiliary function (i.e to define
it with Fixpoint).


Udis86 is an easy-to-use minimalistic disassembler library (libudis86) for the x86 and AMD64 (x86-64) range of instruction set architectures. The primary intent of the design and development of udis86 is to aid software development projects that entail binary code analysis.
libudis86
- Full support for the x86 and x86-64 (AMD64) range of instruction set architectures.
- Full support for all AMD-V, INTEL-VMX, MMX, SSE, SSE2, SSE3, FPU(x87), and AMD 3Dnow! instructions.
- Supports 16bit, 32bit, and 64bit disassembly modes.
- Generates output in AT&T or INTEL assembler language syntaxes.
- Supports flexbile input methods: File, Buffer, and Hooks.
- Thread-safe and Reentrant.
- Clean and very easy-to-use API.
- New! The new standalone build system makes udis86 usable and embeddable in kernel code (or other environments which, say, lack libc).
udcli
A front-end incarnation of this library, udcli is a small command-line tool for your quick disassembly needs.Author
Udis86 is a creation of Vivek Mohan. You can reach me at vivek[at]sig9[dot]com. Please let me know if you are using udis86, have ideas for it, or would like to comment on it.
© 2006 Vivek Mohan


Treebank Statistics: UD_French-Sequoia: Features: NumType
This feature is universal.
It occurs with 2 different values: Card
, Ord
.
2054 tokens (3%) have a non-empty value of NumType
.
456 types (5%) occur at least once with a non-empty value of NumType
.
430 lemmas (6%) occur at least once with a non-empty value of NumType
.
The feature is used with 3 part-of-speech tags: NUM (1724; 2% instances), ADJ (212; 0% instances), NOUN (118; 0% instances).
NUM
1724 NUM tokens (100% of all NUM
tokens) have a non-empty value of NumType
.
NUM
tokens may have the following values of NumType
:
Card
(1724; 100% of non-emptyNumType
): deux, 5, trois, 2, 2006, 10, 1, 30, 3, 4EMPTY
(1): 3000
NumType
seems to be lexical feature of NUM
. 100% lemmas (368) occur only with one value of NumType
.
ADJ
212 ADJ tokens (5% of all ADJ
tokens) have a non-empty value of NumType
.
The most frequent other feature values with which ADJ
and NumType
co-occurred: Number=Sing (153; 72%).
ADJ
tokens may have the following values of NumType
:
Ord
(212; 100% of non-emptyNumType
): première, premier, dernier, 3e, deuxième, 1er, premiers, troisième, quatrième, 21eEMPTY
(4190): autres, tous, ancien, indésirables, autre, zolédronique, européenne, rénale, politique, même
NumType
seems to be lexical feature of ADJ
. 100% lemmas (27) occur only with one value of NumType
.
NOUN
118 NOUN tokens (1% of all NOUN
tokens) have a non-empty value of NumType
.
The most frequent other feature values with which NOUN
and NumType
co-occurred: Gender=Masc (70; 59%).
NOUN
tokens may have the following values of NumType
:
Card
(118; 100% of non-emptyNumType
): millions, milliards, 1/10, 2006-08-07, 1/100, milliard, 1/1000, million, -1,5, -2,5EMPTY
(15069): patients, affaire, %, bivalirudine, commission, ans, perfusion, traitement, mg, président
NumType
seems to be lexical feature of NOUN
. 100% lemmas (38) occur only with one value of NumType
.
Relations with Agreement in NumType
The 10 most frequent relations where parent and child node agree in NumType
:
NUM –[conj]–> NUM (39; 100%),
NUM –[obl:arg]–> NUM (19; 100%),
NUM –[nmod]–> NUM (13; 100%),
ADJ –[conj]–> ADJ (4; 100%),
NOUN –[conj]–> NOUN (4; 57%),
NUM –[fixed]–> NUM (2; 100%),
NOUN –[obl:arg]–> NOUN (1; 100%),
NUM –[nummod]–> NUM (1; 100%),
NUM –[parataxis]–> NUM (1; 100%).


You can pick up a prize near registrations for your coins. After you type value of the prize in CZK, it will be subtracted from all your coins evenly based on current rate. After the transaction is confirmed, the attendant will give you your prize. Note that you can't cash out to actual money, only prizes (until they run out).


 But why do I need to run them all myself. There are plenty of options coming such as SXIP that will allow me to use someone elses application (running elsewhere) for login.
One of the good things about building your site(s) as a community of applications instead of a community of components in a framework, is that you've created a decoupled system where migration to and from these external services is not a painful or architecture-changing process.
until you want to run a report like
select u.id, count(*) from users u, forums f where u.id = f.user_id group by u.id
if your login app is separate from your forum app, you're kinda screwed at that point.
(But I guess if you're treating the database like a slightly brain-damaged object store, this isn't a problem since this sort of thing wouldn't occur to you. :)
Separating the login doesn't necessarily mean you cease to keep track of users for your web application, it merely means that the login/logout is handled outside. Single-Sign-on systems generally work in such a way. The user signs on, does some sort of authentication, then you get a token for that user which you store as their identifier in your user database. You still store user data necessary for your web application, the other system handles logging them on/off.
If you made your own WSGI login app, I'd do a similar thing. Once they login, setup a unique token in the environment for the web application, then inside the web application it will still have its own user database, etc.


Calculates the (localised) length of the shorth and supplies corresponding diagnostic plots.
| Version: | 0.1-6 |
| Published: | 2013-06-08 |
| Author: | G. Sawitzki |
| Maintainer: | G. Sawitzki <gs at statlab.uni-heidelberg.de> |
| License: | LGPL-2 | LGPL-2.1 | LGPL-3 [expanded from: LGPL] |
| URL: | http://lshorth.r-forge.r-project.org/ |
| NeedsCompilation: | no |
| Citation: | lshorth citation info |
| CRAN checks: | lshorth results |
| Reference manual: | lshorth.pdf |
| Package source: | lshorth_0.1-6.tar.gz |
| Windows binaries: | r-devel: lshorth_0.1-6.zip, r-release: lshorth_0.1-6.zip, r-oldrel: lshorth_0.1-6.zip |
| OS X binaries: | r-release: lshorth_0.1-6.tgz, r-oldrel: lshorth_0.1-6.tgz |
Please use the canonical form https://CRAN.R-project.org/package=lshorth to link to this page.


Code for the example is under the cmajor/projects/xmlSerializationTests directory in the attr_model and attr_test projects.
Suppose you are writing a traffic simulation application. A traffic simulation may contain a person class and classes for various vehicles:
A person has a name and it may own some vehicles. A vehicle has a color and a pointer to its owner. A car derives from a vehicle and has a registration number. A bicycle derives also from a vehicle and has a price.
In this example we build classes that can be serialized to XML and constructed from an XML representation.
Cmajor provides an automatic mechanism for serializing objects as XML. This works by declaring classes with an [xml] attribute. The compiler generates ToXml and FromXml member functions for classes having that attribute. They do the actual serialization to and from XML.
Here's code for an XML serializable person class:
The Person class has an [xml] attribute, so the compiler generates XML serialization code for it. The member variables of an XML class are serialized automatically unless they have an [xml="false"] attribute, so name and vehicles are serialized when Person object is serialized.
In addition to ToXml and FromXml member functions, the compiler generates member variables for storing an integer class identifier for an XML serializable class and stroring an object ID for each XML serializable object. They can be accessed using the ClassId and ObjectId member functions.
The UniqueXmlPtr is a unique ownership pointer class that contains an object ID of the object it points to. A UniqueXmlPtr pointer deletes the pointed-to object when it goes out of scope.
Let's move on to the Vehicle class:
Value of an enumerated type such as VehicleColor is serialized as a long value. This handles the color member variable of the Vehicle class. For the owner member variable, we have used the XmlPtr class that is like an ordinary pointer but in addition it contains an object ID of the object it points to.
The Car class derives from the Vehicle class, so the compiler overrides the ToXml and FromXml member functions. The overridden member functions call the base class member functions and in addition have serialization code for properties of the derived class:
The Bicycle is like the Car class and is here for completeness:
Now we are ready to create an example model consisting of XML classes and save the model to an XML file. Here's the code that does this:
We have created an instance of the XmlContainer class, and then created instances of Car, Bicycle and Person classes and added them to the container. The container does not own the objects added to it, so have we used UniqueXmlPtr for the Car, Bicycle and Person. The vehicles are released and added to the person object, because the person takes ownership of the vehicles added to it.
Then we have created an XmlBundle from the container by calling the CreateBundle function of the container. The XML bundle contains a reference to a root object, an object passed to the CreateBundle function, and also references to objects reachable from the root by traversing them using the XmlPtr and UniqueXmlPtr pointer objects. There are two kinds of bundles: shallow and deep. The shallow container does not contain other than the root object, but the deep container contains closure of objects reachable from the root up a depth. By default the depth is -1 which means the depth is unlimited.
Finally we have serialized the bundle to a string by calling the ToXmlString member function of the bundle, created a text file, and written the XML string to the file.
Here's the contents of the generated XML file:
<xmlBundle rootObjectId="1d897be9-da8b-3291-31ca-24819238918a"> <object classId="0" className="model.Car" objectId="ed184f7f-ac6d-d70b-8738-905f4f88741a"> <color value="0"/> <owner objectId="1d897be9-da8b-3291-31ca-24819238918a"/> <registrationNumber value="ABC-123"/> </object> <object classId="2" className="model.Person" objectId="1d897be9-da8b-3291-31ca-24819238918a"> <name value="Joe Coder"/> <vehicles> <item objectId="ed184f7f-ac6d-d70b-8738-905f4f88741a"/> <item objectId="51e07f96-05aa-748e-0090-a8108855c0b5"/> </vehicles> </object> <object classId="1" className="model.Bicycle" objectId="51e07f96-05aa-748e-0090-a8108855c0b5"> <color value="1"/> <owner objectId="1d897be9-da8b-3291-31ca-24819238918a"/> <price value="1000"/> </object> </xmlBundle>
The object IDs are string representations of the UUID class. For the XmlPtr and UniqueXmlPtr only the object ID of the pointed-to object is serialized. When reading an XmlBundle from an XML file, the bundle can recreate relations of the objects using the contained object IDs. The className attributes in the XML file are not used by the implementation in any way. They are generated so that classes can better be recognized by human readers.
For the system to be able to create XML serializable classes when reading their XML representation, the classes has to be registered. The registration is done by calling the compiler-generated static Register member function of an XML serializable class with an integer class identifier. The class identifiers should be unique within a program:
In addition to registration code, we have added full instantiation requests for the ConcreteXmlSerializableExtractor class template specializations of Vehicle, Car, Bicycle and Person classes, because the compiler is not able to automatically generate instantiations for them.
Now that we have the classes registered, they can be read from an XML file. Here's the code that loads the model:
The ToXmlBundle function parses an XML document from the passed XML string, creates the XML classes using class identifiers contained by the object elements, and resolves the relations of objects using object IDs. By default the bundle returned from the ToXmlBundle function destroys objects that are not owned by UniqueXmlPtrs.
Here's the main program that completes this example:
Implementation of the XML serialization scheme is done in half by the compiler and in half by the System.Xml.Serialization library.
The intf_model and intf_test projects under the cmajor/projects/xmlSerializationTests directory contain manual implementation of the XmlSerializable interface for the example classes Person, Vehicle, Car and Bicycle. The compiler implements this interface automatically for classes having an [xml] attribute.
The XmlSerializable interface has a key role in the XML serialization scheme. The compiler implements the XmlSerializable interface for each class that has an [xml] attribute. In the picture above the MyXmlSerializableClass represents such a class. The MyXmlSerializableClasses do not have to derive from a common base class. We need an interface because Cmajor lacks multiple inheritance. This interface contains member function signatures for generating an XML representation, the ToXml method, and on the other hand reading member variable values from an XML representation, the FromXml method. It also enables putting of XML serializable classes to an XmlContainer or to an XmlBundle.
When the compiler generates an implementation of the ToXml member function for a MyXmlSerializableClass, it generates a call to one of the ToXml overloads contained by the System.Xml.Serialization library for each member variable of the MyXmlSerializableClass. Similarly when the compiler generates an implementation of the FromXml member function of a MyXmlSerializableClass, it generates a call to one of the FromXml overloads contained by the System.Xml.Serialization library for each member variable of the MyXmlSerializableClass. The overloads are selected by the compiler using concept-based overloading.
The reason that the XmlContainer does not directly contain XmlSerializable interfaces is because interface objects cannot be directly put to containers in Cmajor. We need an intermediate class that is called XmlSerializableProxy that contains the interface object. Instances of XmlSerializableProxy class on the other hand can be put to containers,. So the Add member function of the XmlContainer creates a proxy object that holds the interface object and adds the proxy. The member functions of the XmlSerializableProxy delegate calls to the contained interface.
There's also an excuse why you can not directly put MyXmlSerializableClass* to an XmlContainer*, but you have to call free Add function template to do that. It's because Cmajor lacks member function templates.
The XmlContainer class has two mappings. From an object IDs to an XmlSerializableProxy* and from MyXmlSerializableClass* (represented as void*) to an XmlSerializableProxy*. This means that you can get XmlSerializableProxy* by object ID or by object pointer. You can also remove object and XmlSerializableProxy* by object ID, and create an XmlBundle from an object pointer.
An XmlBundle contains a root object and objects reachable from the root using those XmlPtrs and UniqueXmlPtrs.
When constructing an XmlBundle from an XML string, the ToXmlBundle function uses the XmlClassRegistry singleton to create a MyXmlSerializableClass associated with the class identifier read from an object XML element contained by the XML representation of the bundle.
The XmlSerializableExtractor is an abstract class that contains an abstract member function for creating an XmlSerializable interface from an object pointer. The ConcreteXmlSerializableExtractor overrides that member function for some class registered to XmlClassRegistry by a class identifier.
The XmlClassRegistry is a singleton class that has two maps and can create a MyXmlSerializableClass using class identifier, and extract an XmlSerializable interface from that object pointer using an XmlSerializableExtractor. The first map associates a class identifier to a function pointer that creates an object and the second map associates a class identifier to an XmlSerializableExtractor.


We're sorry but app doesn't work properly without JavaScript enabled. Please enable it to continue.
Home
Logout
Online Devices :
{{ device.name }}
Listen in this device
Current Song :
{{ media.current_song.title }}
{{ media.current_song.description }}
Play
Stop
Volume
Playlist :
Music Empty
{{ music.title }}
{{ music.description }}
Play
Logout
add