d2rq:Database
)
d2rq:Configuration
)
d2rq:ClassMap
)
d2rq:PropertyBridge
)
d2rq:PropertyBridge
mailto:
URIsd2rq:alias
d2rq:TranslationTable
)
d2rq:DownloadMap
)
The D2RQ Mapping Language is a declarative language for describing the relation between a relational database schema and RDFS vocabularies or OWL ontologies.
A D2RQ mapping is itself an RDF document written in Turtle syntax. The mapping is expressed using terms in the D2RQ namespace:
http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#
The terms in this namespace are formally defined in the D2RQ RDF schema (Turtle version, RDF/XML version).
The mapping defines a virtual RDF graph that contains information from the database. This is similar to the concept of views in SQL, except that the virtual data structure is an RDF graph instead of a virtual relational table. The virtual RDF graph can be accessed in various ways, depending on what's offered by the implementation. The D2RQ Platform provides SPARQL access, a Linked Data server, an RDF dump generator, a simple HTML interface, and Jena API access to D2RQ-mapped databases.
D2RQ mappings can be written by hand in a text editor, but usually it is much faster to start with the generate-mapping tool that generates a skeleton “default mapping” from the database schema.
The figure below shows the structure of an example D2RQ map:
The database is mapped to RDF terms, shown on the right, using
d2rq:ClassMap
s and d2rq:PropertyBridge
s.
The most important objects within the mapping are the class maps.
A class map represents a class or a group of similar classes of the ontology.
A class map specifies how URIs (or blank nodes) are generated for
the instances of the class. It has a set of property bridges,
which specify how the properties of an instance are created.
ISWC example: We are using an example database which stores information about conferences, papers, authors and topics throughout this manual. The database is mapped to the International Semantic Web Community (ISWC) Ontology.
Wordpress example: Another example maps the Wordpress database schema to RDF.
Template: The following example D2RQ map relates the table conferences in a database to the class conference in an ontology. You can use the map as a template for writing your own maps.
# D2RQ Namespace @prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> . # Namespace of the ontology @prefix : <http://annotation.semanticweb.org/iswc/iswc.daml#> . # Namespace of the mapping file; does not appear in mapped data @prefix map: <file:///Users/d2r/example.ttl#> . # Other namespaces @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> . @prefix xsd: <http://www.w3.org/2001/XMLSchema#> . map:Database1 a d2rq:Database; d2rq:jdbcDSN "jdbc:mysql://localhost/iswc"; d2rq:jdbcDriver "com.mysql.jdbc.Driver"; d2rq:username "user"; d2rq:password "password"; . # ----------------------------------------------- # CREATE TABLE Conferences (ConfID int, Name text, Location text); map:Conference a d2rq:ClassMap; d2rq:dataStorage map:Database1; d2rq:class :Conference; d2rq:uriPattern "http://conferences.org/comp/confno@@Conferences.ConfID@@"; . map:eventTitle a d2rq:PropertyBridge; d2rq:belongsToClassMap map:Conference; d2rq:property :eventTitle; d2rq:column "Conferences.Name"; d2rq:datatype xsd:string; . map:location a d2rq:PropertyBridge; d2rq:belongsToClassMap map:Conference; d2rq:property :location; d2rq:column "Conferences.Location"; d2rq:datatype xsd:string; .
The individual constructs of the D2RQ mapping language are described in detail below.
d2rq:Database
)A d2rq:Database
defines a JDBC connection to a local or
remote relational database.
A D2RQ map can
contain several d2rq:Database
s for accessing different databases.
d2rq:Database
| d2rq:jdbcDSN | The JDBC database URL. This is a string of the form
jdbc:subprotocol:subname . For a MySQL database,
this is something like jdbc:mysql://hostname:port/dbname .
Examples for other databases |
|---|---|
| d2rq:jdbcDriver | The JDBC driver class name for the database. Used together with d2rq:jdbcDSN .
Example: com.mysql.jdbc.Driver for MySQL. |
| d2rq:username | A username if required by the database. |
| d2rq:password | A password if required by the database. |
| d2rq:resultSizeLimit | An integer value that will be added as a LIMIT clause to all
generated SQL queries. This sets an upper bound for the number
of results returned from large databases. Note that this effectively
“cripples” the server and can cause unpredictable
results. Also see d2rq:limit
and d2rq:limitInverse ,
which may be used to impose
result limits on individual property bridges. |
| d2rq:fetchSize | An integer value that specifies the number of rows to retrieve
with every database request. This value is particularily important to control memory resources
of both the D2RQ and the database server when performing dumps.
dump-rdf sets this value to 500 by default, or to Integer.MIN_VALUE for MySQL in order to
enable streaming mode. |
| d2rq:startupSQLScript | URL of a SQL script to be executed on startup. Useful for initializing the connection and testing. To load from the file system relative to the mapping file's location, use this syntax: d2rq:startupSQLScript <file:script.sql>; |
| d2rq:textColumn d2rq:numericColumn d2rq:dateColumn d2rq:timestampColumn d2rq:timeColumn d2rq:binaryColumn d2rq:booleanColumn d2rq:bitColumn d2rq:intervalColumn |
These properties are used to declare the column type of database
columns. This affects the kind of SQL literal that D2RQ will use to
query for values in this column.
The objects of the properties are column names in
Table_name.column_name notation.
These properties do not need to be specified unless
the engine is for some reason unable to determine the correct
column type by itself. The d2rq:timestampColumn
is for column types that combine a date and a time. The
d2rq:binaryColumn is for column types that contain
binary data, such as BLOB s.
|
map:Database1 a d2rq:Database; d2rq:jdbcDSN "jdbc:mysql://localhost/iswc"; d2rq:jdbcDriver "com.mysql.jdbc.Driver"; d2rq:username "user"; d2rq:password "password"; .
Most JDBC drivers offer a range of JDBC connection properties,
which specify advanced configuration options for the JDBC database connection.
A D2RQ mapping file can be made to use arbitrary connection properties when
setting up the JDBC connection. This is done through the jdbc:
namespace
(namespace URI: http://d2rq.org/terms/jdbc/
). RDF properties in that
namespace will be passed as connection properties.
Consult your JDBC driver's documentation for a list of available properties.
@prefix jdbc: <http://d2rq.org/terms/jdbc/> . map:database a d2rq:Database; # ... other database configuration ... jdbc:autoReconnect "true"; jdbc:zeroDateTimeBehavior "convertToNull"; .
The example uses two connection properties which are understood by the MySQL
JDBC driver: autoReconnect=true
and
zeroDateTimeBehavior=convertToNull
.
Some database servers like MySQL may terminate open client connections after some
interval (MySQL default is 8 hours). To keep alive long-term connections, D2R can be
configured to periodically run "noop" queries. This feature can be enabled with the
special property jdbc:keepAlive
. An example is given below:
@prefix jdbc: <http://d2rq.org/terms/jdbc/> . map:database a d2rq:Database; # ... other database configuration ... jdbc:keepAlive "3600"; # value in seconds jdbc:keepAliveQuery "SELECT 1"; # (optionally to override default noop query) .
By default the noop query is “SELECT 1
”, which may not work with some DBMS.
For this purpose, the default query may be overridden with a custom noop query.
d2rq:Configuration
)A d2rq:Configuration
controls global behaviour of D2RQ. It is generally not required if the defaults are satisfactory.
d2rq:Configuration
| d2rq:serveVocabulary | Whether to serve inferred and user-supplied vocabulary data (boolean; true by default). This option is automatically set when using D2R Server's --fast command-line option. |
|---|---|
| d2rq:useAllOptimizations | Whether to use bleeding edge optimizations (boolean; false by default). |
In order to activate bleeding edge optimizations, a d2rq:Configuration
block with the property d2rq:useAllOptimizations
set to true
is created:
map:Configuration a d2rq:Configuration; d2rq:useAllOptimizations true.
d2rq:ClassMap
)A d2rq:ClassMap
represents a class or a group of similar classes
of an OWL ontology or RDFS schema. A class map defines how instances of the
class are identified. It is connected to a d2rq:Database
and has
a set of d2rq:PropertyBridges
which attach properties to the instances.
D2RQ provides four different mechanisms of assigning identifiers to the instances in the database:
A URI pattern is instantiated by inserting values of certain database columns into a pattern. Examples:
http://example.org/persons/@@Persons.ID@@ http://example.org/lineItems/item@@Orders.orderID@@-@@LineItems.itemID@@ urn:isbn:@@Books.isbn@@ mailto:@@Persons.email@@
The parts between @@
's mark database columns in
Table.Column
notation. URI patterns are used
with the d2rq:uriPattern
property.
Certain characters, like spaces or the hash sign, are not allowed in URIs or have special meaning. Columns that contain such characters need to be encoded before their values can be inserted into a URI pattern:
@@Table.Column|urlencode@@
,
then URL encoding
is applied before the string is inserted.@@Table.Column|urlify@@
,
then URL encoding is applied, with an additional rule that spaces are
converted to underscores (_
). Some people find that this
produces friendlier URIs.@@Table.Column|encode@@
,
then percent encoding
(as defined in W3C's Direct Mapping) is applied before the string
is inserted.Warning: If the URIs produced by
a URI pattern with encoding are also produced elsewhere
in the D2RQ mapping without the use of the same encoding
(e.g., from a
d2rq:uriColumn
or
d2rq:constantValue
),
then SPARQL queries that “join” over those URIs may not work
as expected.
A relative URI pattern is a URI pattern that generates relative URIs:
persons/@@Persons.ID@@
They will be combined with a base URI provided by
the processing environment to form full URIs. Relative
URI patterns allow the creation of portable mappings that
can be used for multiple instances of the same database
schema. Relative URI patterns are generated
with the d2rq:uriPattern
property.
In some cases, the database may already contain URIs that
can be used as resource identifiers, such as web page and
document URLs. URI are generated from columns
with the d2rq:uriColumn
property.
URIs can be generated with a SQL expression, specified
via d2rq:uriSqlExpression
. The expression
must yield a valid URI.
RDF also has the concept of blank nodes, existential qualifiers
that denote some resource that exists and has certain properties,
but is not named. In D2RQ, blank nodes can be generated from one or
more columns. A distinct blank node will be generated for each distinct
set of values of these columns. The columns are specified using the
with the d2rq:bNodeIdColumns
property.
Note that blank nodes cannot be referenced from outside the RDF graph they exist in. This limits their usefulness, and they are best avoided.
A d2rq:ClassMap
usually produces many resources. Sometimes
it is desirable to have a class map that only produces a single resource
with fixed, static identity. In that case, one can use the
d2rq:constantValue
property to provide the URI for the
single instance.
d2rq:ClassMap
| d2rq:dataStorage | Reference to a d2rq:Database where the instance data is stored. |
|---|---|
| d2rq:class | An RDF-S or OWL class. All resources generated by this ClassMap are instances of this class. |
| d2rq:uriPattern | Specifies a URI pattern that will be used to identify instances of this class map. |
| d2rq:uriColumn | A database column containing URIrefs for identifying
instances of this class map. The column name has to be in the form
"TableName.ColumnName" . |
| d2rq:uriSqlExpression | A SQL expression that generates the URI identifiers
for instances of this class map. Similar to d2rq:sqlExpression .
The output must be a valid URI. Note that querying
for such a computed value might put a heavy load on the database.
See example below. |
| d2rq:bNodeIdColumns | A comma-seperated list of column names in
"TableName.ColumnName" notation. The instances of
this class map will be blank nodes, one distinct blank node
per distinct tuple of these columns. |
| d2rq:constantValue | This class map will only have a single instance, which is named by the value of this property. This can be a blank node or a URI. |
| d2rq:containsDuplicates | Must be specified if a class map uses information from tables
that are not fully normalized. If the d2rq:containsDuplicates property value
is set to "true", then D2RQ adds a DISTINCT clause to all queries using
this classMap. "False" is the default value, which doesn't have
to be explicitly declared. Adding this property to class maps based on normalized
database tables degrades query performance, but doesn't affect query results. |
| d2rq:additionalProperty | Adds an AdditionalProperty
to all instances of this class.
This might be useful for adding rdfs:seeAlso properties or other fixed
statements to all instances of the class. |
| d2rq:condition | Specifies an SQL WHERE condition. An instance of this class
will only be generated for database rows that satisfy the condition. Conditions
can be used to hide parts of the database from D2RQ, e.g. deny access to
data which is older or newer than a certain date. See section Conditional
Mappings for details. |
| d2rq:classDefinitionLabel | Specifies a label that will be served as rdfs:label
for all associated class definitions. Multiple lables, e.g. in several languages, are supported. |
| d2rq:classDefinitionComment | Specifies a comment that will be served as rdfs:comment
for all associated class definitions. Multiple comments are supported. |
| d2rq:additionalClassDefinitionProperty | Adds an AdditionalProperty to all associated class definitions. |
Furthermore,
d2rq:valueMaxLength
,
d2rq:valueRegex
,
d2rq:valueContains
,
and d2rq:translateWith
can be used and work the same way as on property bridges.
d2rq:join
and
d2rq:alias
can be used too,
and are inherited by the map's property bridges.
map:PaperClassMap a d2rq:ClassMap; d2rq:uriPattern "http://www.conference.org/conf02004/paper#Paper@@Papers.PaperID@@"; d2rq:class :Paper; d2rq:classDefinitionLabel "paper"@en; d2rq:classDefinitionComment "A conference paper."@en; d2rq:dataStorage map:Database1; .
The d2rq:class
property is used to state that all resources generated by the
d2rq:ClassMap
are instances of an RDFS or OWL class. D2RQ automatically creates
the necessary rdf:type
triples.
map:Topic a d2rq:ClassMap; d2rq:bNodeIdColumns "Topics.TopicID"; d2rq:class :Topic; d2rq:classDefinitionLabel "topic"@en; d2rq:classDefinitionComment "A topic."@en; d2rq:dataStorage map:Database1; .
If you want to use one ClassMap for a group of classes with the same properties
(like Person, Professor, Researcher, Student) that all come from the same table,
you must create the rdf:type
statements with an object property bridge instead of
using d2rq:class
.
map:PersonsClassMap a d2rq:ClassMap; d2rq:uriColumn "Persons.URI"; d2rq:dataStorage map:Database1; . map:PersonsType a d2rq:PropertyBridge; d2rq:property rdf:type; d2rq:pattern "http://annotation.semanticweb.org/iswc/iswc.daml#@@Persons.Type@@"; d2rq:belongsToClassMap map:PersonsClassMap .
Here, the class of each person is obtained by prefixing the values of the Persons.Type column with an ontology namespace. If the class names within the ontology can't be constructed directly from values of the Persons.Type column, then a TranslationTable could be used for aligning class names and database values.
d2rq:PropertyBridge
)A d2rq:PropertyBridge
relates a database column to
an RDF property. Property bridges are
used to attach properties to the RDF resources created by a class map.
The values of these properties are often literals, but can also be URIs
or blank nodes that relate the resource to other resources, e.g. the value
of a paper's :author
property could be a URI representing a person.
If the one of the columns used in a property bridge is NULL
for some database rows, then no property is created for the resources
corresponding to these rows.
d2rq:PropertyBridge
| d2rq:belongsToClassMap | Specifies that the property bridge belongs to a d2rq:ClassMap .
Must be specified for every property bridge. |
|---|---|
| d2rq:property | The RDF property that connects the ClassMap
with the object or literal created by the bridge. Must be specified for
every property bridge. If multiple d2rq:properties are
specified, then one triple with each property is generated per resource. |
| d2rq:dynamicProperty | A URI pattern that is used to generate the property URI at runtime. If multiple d2rq:dynamicProperty are specified, then one triple with each property is generated per resource. |
| d2rq:column | For properties with literal values.
The database column that contains the literal values.
Column names have to be given in the form "TableName.ColumnName" .
|
| d2rq:pattern | For properties with literal values. Can be used to extend and combine column values before they are used as a literal property value. If a pattern contains more than one column, then a separating string, which cannot occur in the column values, has to be used between the column names, in order to allow D2RQ reversing given literals into column values. |
| d2rq:sqlExpression | For properties with literal values. Generates literal values by evaluating a SQL expression. Note that querying for such a computed value might put a heavy load on the database. See example below. |
| d2rq:datatype | For properties with literal values. Specifies the RDF datatype of the literals. |
| d2rq:lang | For properties with literal values. Specifies the language tag of the literals. |
| d2rq:constantValue | For properties that have the same constant value on all instances of the class map. The value can be a literal, blank node, or URI. See example below. |
| d2rq:refersToClassMap | For properties that correspond to a foreign key.
References another
d2rq:ClassMap that creates the instances which are used
as the values of this bridge. If these instances
come from another table, then one or more
d2rq:join properties
must be specified to select the correct instances. See
example below. |
| d2rq:uriColumn d2rq:uriPattern d2rq:uriSqlExpression |
For properties where the value is supposed to be a URI instead of a literal. They work the same as on class maps. |
| d2rq:join | If the columns used to create the literal value or object
are not from the database table(s) that contains the ClassMap's columns,
then the tables have to be joined together using one or more d2rq:join
properties.
See examples below. |
| d2rq:alias | Aliases take the form "Table AS Alias"
and are used when a table needs to be joined to itself.
The table can be referred to using the alias within the
property bridge. See example below. |
| d2rq:condition | Specifies an SQL WHERE condition. The bridge will only generate
a statement if the condition holds. A common usage is to suppress triples
with empty literal values: d2rq:condition "Table.Column <> ''" .
See section Conditional Mappings for details.
|
| d2rq:translateWith | Assigns a d2rq:TranslationTable to the property bridge. Values
from the d2rq:column or d2rq:pattern will be translated by the table. See
section TranslationTables for details. |
| d2rq:valueMaxLength | Asserts that all values of this bridge are not longer than a number of characters. This allows D2RQ to speed up queries. See section Performance Optimization for details. |
| d2rq:valueContains | Asserts that all values of this bridge always contain a given
string. This allows D2RQ to speed up queries. Most useful in conjunction
with d2rq:column. See section Performance Optimization
for details. |
| d2rq:valueRegex | Asserts that all values of this bridge match a given regular
expression. This allows D2RQ to speed up queries. Most useful in conjunction
with d2rq:column on columns whose values are very different from other columns
in the database. See section Performance Optimization
for details. |
| d2rq:propertyDefinitionLabel | Specifies a label that will be served as rdfs:label
for all associated property definitions. Multiple lables, e.g. in several languages, are supported. |
| d2rq:propertyDefinitionComment | Specifies a comment that will be served as rdfs:comment
for all associated property definitions. Multiple comments are supported. |
| d2rq:additionalPropertyDefinitionProperty | Adds an AdditionalProperty to all associated property definitions. |
| d2rq:limit | The maximum number of results to retrieve from the database for this PropertyBridge. Also see d2rq:resultSizeLimit . |
| d2rq:limitInverse | The maximum number of results to retrieve from the database for the inverse statements for this PropertyBridge. |
| d2rq:orderAsc | The column after which to sort results in ascending order for this PropertyBridge. Useful when results are limited using d2rq:limit . |
| d2rq:orderDesc | The column after which to sort results in descending order for this PropertyBridge. Useful when results are limited using d2rq:limit . |
map:PaperTitle a d2rq:PropertyBridge; d2rq:belongsToClassMap map:Paper; d2rq:property :title; d2rq:column "Papers.Title"; d2rq:lang "en"; d2rq:propertyDefinitionLabel "title"@en; d2rq:propertyDefinitionComment "A paper's title."@en; .
This attaches a :title
property to all resources generated
by the map:Paper
class map. The property values are
taken from the Papers.Title
column. The generated literals
will have a language tag of "en".
map:authorName a d2rq:PropertyBridge; d2rq:belongsToClassMap map:Papers; d2rq:property :authorName; d2rq:column "Persons.Name"; d2rq:join "Papers.PaperID <= Rel_Person_Paper.PaperID"; d2rq:join "Rel_Person_Paper.PersonID => Persons.PerID"; d2rq:datatype xsd:string; d2rq:propertyDefinitionLabel "name"@en; d2rq:propertyDefinitionComment "Name of an author."@en; .
This property bridge adds the names of authors to papers.
If a paper has several authors, then several :authorName
properties are added. The tables Papers
and Persons
are in an n:m relation. The d2rq:join
is used to join the tables over the Rel_Person_Paper
. The join condition contains
directed arrows that indicate the foreign key relationship and are used as an optimization hint.
In the example above, the arrow directions indicate that all possible values of Rel_Person_Paper.PaperID
and
Rel_Person_Paper.PersonID
are present in Papers.PaperID
and Persons.PerID
, respectively.
Where this is unclear, a simple equation sign (=
) may be used.
mailto:
URIsmap:PersonsClassEmail a d2rq:PropertyBridge; d2rq:belongsToClassMap map:PersonsClassMap; d2rq:property :email; d2rq:uriPattern "mailto:@@Persons.Email@@"; .
The pattern mailto:@@Persons.Email@@
is used to
attach a mailto:
prefix to the values of the
"Persons.Email" column. The example uses
d2rq:uriPattern
instead of d2rq:pattern
because the bridge should produce URIs, not literals.
The popular FOAF vocabulary has a
property foaf:mbox_sha1sum
for publishing email addresses in an
encoded form. This prevents spammers from harvesting the address, while still
letting us recognize if the same email address is used in two different
places.
map:UserEmailSHA1 a d2rq:PropertyBridge; d2rq:belongsToClassMap map:User; d2rq:property foaf:mbox_sha1sum; d2rq:sqlExpression "SHA1(CONCAT('mailto:', user.email))"; .
The values of the foaf:mbox_sha1sum
are computed by evaluating
the d2rq:sqlExpression
. We first create a mailto:
URI
from the email address, as required by FOAF. Then we apply the SHA1
hash function, again as required by FOAF. The result will be a literal value.
Note that querying for a specific foaf:mbox_sha1sum
value will
put a heavy load on the database because the hash has to be computed for every
user in the database. For a large database, it would be better to store the
encoded values in a column in the database.
map:HomepageURL a d2rq:PropertyBridge; d2rq:belongsToClassMap map:PersonsClassMap; d2rq:property foaf:homepage; d2rq:uriSqlExpression "CONCAT('http://www.company.com/homepages/', user.username)"; .
The pattern mailto:@@Persons.Email@@
is used to
attach a mailto:
prefix to the values of the
"Persons.Email" column. The example uses
d2rq:uriPattern
instead of d2rq:pattern
because the bridge should produce URIs, not literals.
map:PaperConference a d2rq:PropertyBridge; d2rq:belongsToClassMap map:Paper; d2rq:property :conference; d2rq:refersToClassMap map:Conference; d2rq:join "Papers.Conference => Conferences.ConfID"; .
The example attaches a :conference
property to papers.
The values of the property are generated by the map:Conference
class map, not shown here. It may use a d2rq:uriPattern
,
d2rq:uriColumn
or blank nodes to identify the conferences.
The appropriate instance is found using the d2rq:join
on the foreign key Papers.Conference
.
Foreign keys can span multiple columns. To create a property that
links instances along such a foreign key, use multiple
d2rq:join
properties on the property bridge, one for
each pair of columns in the key:
map:PaperConference a d2rq:PropertyBridge; d2rq:belongsToClassMap map:Paper; d2rq:property :journalIssue; d2rq:refersToClassMap map:JournalIssue; d2rq:join "Papers.Journal => Journal.JournalID"; d2rq:join "Papers.Issue => Journal.IssueID"; .
In the example, the Journal
table has a composite
key consisting of JournalID
and IssueID
.
The foreign key constraint that assigns papers to journals covers
two columns, and hence two d2rq:join
s are needed.
d2rq:alias
map:ParentTopic a d2rq:PropertyBridge; d2rq:belongsToClassMap map:Topic; d2rq:property :parentTopic; d2rq:refersToClassMap map:Topic; d2rq:join "Topics.ParentID => ParentTopics.ID"; d2rq:alias "Topics AS ParentTopics"; .
Here, a topic may have a parent topic whose ID is found in
the Topics.ParentID
column. This foreign key refers
back to the Topics.ID
column. The table has to be
joined to itself. A d2rq:alias
is declared, and
the join is established between the original table and the
aliased table. This pattern is typical for hierarchical
or graph-style relationships.
Sometimes it is desirable to add a property with a constant value
to every resource that is created by a class map. To achieve this,
use a d2rq:PropertyBridge
that uses d2rq:constantValue
:
map:PersonsClassMap a d2rq:ClassMap; d2rq:class :Person; . map:seeAlsoBridge a d2rq:PropertyBridge; d2rq:belongsToClassMap map:PersonsClassMap; d2rq:property rdfs:seeAlso; d2rq:constantValue <http://annotation.semanticweb.org/iswc2003/>; .
This adds an rdfs:seeAlso
statement with a fixed URL object
to every instance of the map:PersonsClassMap
class map.
d2rq:TranslationTable
)A d2rq:TranslationTable
is an additional layer between the
database and the RDF world. It translates back and forth between values taken
from the database and RDF URIs or literals. A translation table can be attached
to a class map or a property bridge using the d2rq:translateWith
property. Translation tables
can be used only for mappings that are unique in both directions (1:1).
Warning:
If URIs produced using a translation table are also produced elsewhere
in the D2RQ mapping without the same translation table (e.g., from a
d2rq:uriColumn
or
d2rq:constantValue
),
then SPARQL queries that “join” over those URIs may not work
as expected.
d2rq:TranslationTable
| d2rq:translation | Adds a d2rq:Translation
to the table. |
|---|---|
| d2rq:href | Links to a CSV file containing translations. Each line of the file is a translation and contains two strings separated by a comma. The first one is the DB value, the second the RDF value. |
| d2rq:javaClass | The qualified name of a Java class that performs the mapping. The class must implement the Translator interface. Custom Translators might be useful for encoding and decoding values, but are limited to 1:1 translations. Further datails can be found in the D2RQ javadocs. |
A d2rq:Translation
is a single entry in a
d2rq:TranslationTable
.
| d2rq:databaseValue | A value that might appear in a database column
or might be generated by a d2rq:pattern . |
|---|---|
| d2rq:rdfValue | A translation of that value to be used in RDF constructs. |
A typical application are database columns containing type codes or similar
enumerated values. A translation table can be used to turn them into RDF resources.
In this example, the column ShinyObject.Color contains a color code: "R" for
red, "G" for green etc. These codes must be translated into RDF resources: :red
,
:green
etc.
:red a :Color; :green a :Color; # ... more colors omitted ... :blue a :Color; map:ColorBridge a d2rq:PropertyBridge; d2rq:belongsToClassMap map:ShinyObjectMap; d2rq:property :color; d2rq:uriColumn "ShinyObject.Color"; d2rq:translateWith map:ColorTable; . map:ColorTable a d2rq:TranslationTable; d2rq:translation [ d2rq:databaseValue "R"; d2rq:rdfValue :red; ]; d2rq:translation [ d2rq:databaseValue "G"; d2rq:rdfValue :green; ]; # ... more translations omitted ... d2rq:translation [ d2rq:databaseValue "B"; d2rq:rdfValue :blue; ]; .
The d2rq:translateWith
statement tells D2RQ to look up database values in the
map:ColorTable
. There, a translation must be given for each possible value.
If the database contains values which are not in the translation table, D2RQ
will not generate a :color
statement for that :ShinyObject
instance.
Note that the type of the resulting RDF node is determined by the bridge
and not by the node type of the rdfValues. map:ColorBridge
uses d2rq:uriColumn
.
Thus, the translation will create URI nodes. If it used d2rq:column
,
then literals would be created.
d2rq:DownloadMap
)Some databases contain entire files, such as PDFs or PNGs, in database
columns (often of types like BLOB
). D2R Server can make the
contents of such columns downloadable using a
d2rq:DownloadMap
.
A d2rq:DownloadMap
specifies the name of the column that
contains the downloadable content, and a
URI pattern in the server's URI space
from where the content is to be made downloadable. An instance of
d2rq:DownloadMap
can have the following properties:
d2rq:DownloadMap
| d2rq:dataStorage | A d2rq:Database instance |
|---|---|
| d2rq:contentDownloadColumn | The column containing downloadable resources, in
[SCHEMA.]TABLE.COLUMN notation |
| d2rq:uriPattern d2rq:uriColumn d2rq:uriSqlExpression d2rq:constantValue |
Specifies the URIs where the server will make downloadable URIs
available. Details are the same as for
d2rq:ClassMap
and d2rq:PropertyBridge .
Only one may be used. |
| d2rq:mediaType | The Internet media type
of the files served from this download map. This will be sent in the HTTP
Content-Type header. Examples include application/pdf ,
image/png , text/plain and text/html .
If absent, application/octet-stream will be sent to indicate
a generic binary file. The value can be obtained from the database using
the d2rq:pattern syntax (see
example). |
| d2rq:condition d2rq:join d2rq:alias |
Same meaning as on d2rq:ClassMap
and d2rq:PropertyBridge |
| d2rq:belongsToClassMap | Can be used instead of d2rq:dataStorage to point to an existing
d2rq:ClassMap instance. The class map's
data storage will be used, and any conditions, joins and aliases of the
class map will be inherited by the download map. This facilitates the use
of a single resource as both download map and
property bridge,
see example. |
In the following example, the PAPER.PDF
column is
assumed to contain PDF files.
map:PaperDownload a d2rq:DownloadMap; d2rq:dataStorage map:database; d2rq:uriPattern "downloads/@@PAPER.ID@@.pdf"; d2rq:contentDownloadColumn "PAPER.PDF"; d2rq:mediaType "application/pdf"; .
This download maps makes the PDFs downloadable at URIs such as
http://serverbase/papers/123/download
, and serves
them with the correct media type application/pdf
.
Sometimes the URI where content can be downloaded should also be
the value of a property of some resource. To make such mappings easy,
a single resource can be declared as both a
d2rq:DownloadMap
and d2rq:PropertyBridge
.
The download map will inherit the class map's data storage,
as well as any conditions, aliases and joins.
map:PaperDownload a d2rq:DownloadMap, d2rq:PropertyBridge; d2rq:belongsToClassMap map:Paper; d2rq:uriPattern "downloads/@@PAPER.ID@@.pdf"; d2rq:contentDownloadColumn "PAPER.PDF"; d2rq:mediaType "application/pdf"; d2rq:property ex:download; d2rq:condition "PAPER.PDF IS NOT NULL"; .
This makes the contents of the PAPER.PDF
column
downloadable at URIs like http://serverbase/papers/123/download
,
and at the same time adds these URIs as values of the
ex:download
properties to the instances generated
by the map:Paper
class map.
Also note the d2rq:condition
, which suppresses creation of
the ex:download
triple if the value of PAPER.PDF
is NULL
.
Sometimes, the files in a download column are not in a single
format, but in multiple formats, with the format indicated in
an additional column. This can be handled by defining multiple
download maps with appropriate d2rq:condition
s.
map:PaperDownloadPDF a d2rq:DownloadMap; d2rq:dataStorage map:database; d2rq:uriPattern "downloads/@@PAPER.ID@@.pdf"; d2rq:contentDownloadColumn "PAPER.DOWNLOAD"; d2rq:mediaType "application/pdf"; d2rq:condition "PAPER.FORMAT = 'PDF'"; . map:PaperDownloadWord a d2rq:DownloadMap; d2rq:dataStorage map:database; d2rq:uriPattern "downloads/@@PAPER.ID@@.doc"; d2rq:contentDownloadColumn "PAPER.DOWNLOAD"; d2rq:mediaType "application/msword"; d2rq:condition "PAPER.FORMAT = 'DOC'"; .
The d2rq:mediaType
of a download map can be a
pattern that is instantiated with column values:
map:PaperDownloadPDF a d2rq:DownloadMap; d2rq:dataStorage map:database; d2rq:uriPattern "downloads/@@PAPER.ID@@"; d2rq:contentDownloadColumn "PAPER.DOWNLOAD"; d2rq:mediaType "@@PAPER.MIMETYPE@@"; .
In the spirit of Linked Data, the URIs of classes and properties should be dereferenceable.
In a mapping file auto-generated by the generate-mapping
utility, the classes and properties have QNames such as vocab:TableName
and vocab:TableName_ColumnName
. The vocab:
prefix expands to a URI relative to the base URI of the server, yielding URIs such as http://baseURI/vocab/TableName
. These URIs can be dereferenced in D2R Server.
By default, the only statement about these URIs is an rdf:type
statement that declares the URI as an rdfs:Class
or rdf:Property
. However, further statements can be added in the mapping file. This is done by adding additional properties, described in this section, to the class map or property map. The following mapping illustrates the intended usage:
@prefix vocabClass: <http://localhost:2020/vocab/resource/class/> . @prefix vocabProperty: <http://localhost:2020/vocab/resource/property/> . map:offer a d2rq:ClassMap; d2rq:classDefinitionLabel "Offer"@en; d2rq:classDefinitionComment "This is an offer"@en; d2rq:class vocabClass:Offer; .
When dereferenced, http://localhost:2020/vocab/resource/class/Offer
will return the specified label and comment as well as the automatically inferred type rdfs:Class
. Note that the prefixes are bound to absolute URIs because relative URIs would be based under http://localhost:2020/resource/
.
This feature only works for simple (URI, ANY, ANY) or (ANY, ANY, URI) find patterns that touch on vocabulary resources. In other words, it only works when dereferencing the class or property URI, or when describing the URI using a a SPARQL DESCRIBE
query. It currently does not work within other SPARQL queries such as SELECT
or CONSTRUCT
.
An rdfs:label
can be added to a term URI by ading d2rq:classDefinitionLabel
or d2rq:propertyDefinitionLabel
to the class map or property map.
An rdfs:comment
can be added by adding d2rq:classDefinitionComment
and d2rq:propertyDefinitionComment
to the class map or property map.
Other properties can be added by creating a d2rq:AdditionalProperty
construct, described below, and by linking to it from the class map or property map using d2rq:additionalClassDefinitionProperty
and d2rq:additionalPropertyDefinitionProperty
.
A d2rq:AdditionalProperty
construct can be used to add a fixed statement
to all class definitions of a class map, or to all property definitions of a property bridge.
The statement is added to the result sets, if patterns like (ANY, ANY, ANY), (URI, ANY, ANY) or (URI, additionalPropertyName,
ANY) are used.
The usage of d2rq:AdditionalProperty
to add instance data is now deprecated (details).
The d2rq:additionalClassDefinitionProperty
and d2rq:additionalPropertyDefinitionProperty
properties are used to link from the class map
or property bridge to the d2rq:AdditionalProperty
definition.
| d2rq:propertyName | The RDF property to be used as the predicate of all fixed statements. |
|---|---|
| d2rq:propertyValue | The value to be used as the object of all fixed statements. |
map:PersonsClassMap a d2rq:ClassMap; d2rq:class :Person; d2rq:additionalClassDefinitionProperty map:PersonEquivalence; . map:PersonEquivalence a d2rq:AdditionalProperty; d2rq:propertyName owl:equivalentClass; d2rq:propertyValue foaf:Person; .
This adds an owl:equivalentClass
statement with the fixed object foaf:Person
to every related class definition.
map:PaperTitle a d2rq:PropertyBridge; d2rq:belongsToClassMap map:Paper; d2rq:property :title; d2rq:column "Papers.Title"; d2rq:additionalPropertyDefinitionProperty map:PaperTitleEquivalence; . map:PaperTitleEquivalence a d2rq:AdditionalProperty; d2rq:propertyName owl:equivalentProperty; d2rq:propertyValue dc:title; .
This adds an owl:equivalentProperty
statement with the fixed object dc:title
to every related property definition.
Vocabulary serving is enabled by default. In order to deactivate it, a d2rq:Configuration
block
with the property d2rq:serveVocabulary
set to false
must be created:
map:Configuration a d2rq:Configuration; d2rq:serveVocabulary false.
Sometimes only certain information from a database should be accessible, because
parts of the database might be confidential or outdated. Using d2rq:condition
you can specify conditions, which must be satisfied by all accessible data.
You can use d2rq:condition
on class map and property bridge level. The d2rq:condition
value is added as an additional SQL WHERE
clause to all queries generated using
the class map or property bridge. If the condition evaluates to FALSE for a
SQL result set row, then no triples will be generated from that row.
d2rq:condition
on a d2rq:ClassMap
map:Paper a d2rq:ClassMap; d2rq:class :Paper; d2rq:uriPattern "http://www.conference.org/conf02004/paper#Paper@@Papers.PaperID@@"; d2rq:condition "Papers.Publish = 1"; d2rq:dataStorage map:Database1; .
Only those papers with a value of 1 in the Papers.Publish column will be accessible. All other papers are ignored.
Usually, the special value NULL
is used in a database to indicate that some
field has no value, or that the value is unknown. Some databases, however, are
using a zero-length string ("") instead. D2RQ doesn't generate RDF statements
from NULL
values, but it doesn't recognize zero-length strings and will generate
statements like :Person123 :firstName "".
if the person's first name
is a zero-length string. In oder to suppress these statements, a d2rq:condition
can be added to the property bridge:
map:PersonsClassFirstName a d2rq:PropertyBridge; d2rq:property :firstName; d2rq:column "Persons.FirstName"; d2rq:belongsToClassMap map:PersonsClassMap; d2rq:condition "Persons.FirstName <> ''"; .
Imagine a table Rel_Paper_Topic that associates rows from a Papers table with rows from a Topics table. The Rel_Paper_Topic table contains a PaperID column to reference the papers, a TopicID to reference the topics, and a RelationshipType column which contains 1 if the topic is a primary topic of the paper, and 2 if it is a secondary topic.
For primary topic relationships, the :primaryTopic
property shall be used,
and for others the :secondaryTopic
property.
We can build a map for this scenario by creating two property bridges.
One for :primaryTopic,
one for :secondaryTopic.
We add a d2rq:condition
to both bridges to suppress those statements where the RelationshipType
column doesn't have the correct value.
map:primaryTopic a d2rq:PropertyBridge; d2rq:belongsToClassMap map:Paper; d2rq:property :primaryTopic; d2rq:refersToClassMap map:Topic; d2rq:join "Papers.PaperID <= Rel_Paper_Topic.PaperID"; d2rq:join "Rel_Paper_Topic.TopicID => Topics.TopicID"; d2rq:condition "Rel_Paper_Topic.RelationType = 1"; . map:secondaryTopic a d2rq:PropertyBridge; d2rq:belongsToClassMap map:Paper; d2rq:property :secondaryTopic; d2rq:refersToClassMap map:Topic; d2rq:join "Papers.PaperID <= Rel_Paper_Topic.PaperID"; d2rq:join "Rel_Paper_Topic.TopicID => Topics.TopicID"; d2rq:condition "Rel_Paper_Topic.RelationType = 2"; .
This section covers hint properties that can be added to property bridges in
order to speed up queries: d2rq:valueMaxLength
,
d2rq:valueRegex
and d2rq:valueContains
.
You are geting the largest performance gain by providing hints for property
bridges which are using d2rq:column
. You should define hints on columns of large
tables and on columns that are not indexed by the database. These are the cases
where a well-placed optimization hint can result in an order-of-magnitude improvement
for some queries. Don't bother to provide hints for property bridges based on
d2rq:pattern
. These can be optimized very well without hints. In general,
the biggest payoff is expected for hints on large tables. If you have a few
very large tables with non-indexed columns in your database, that's where you
should focus your efforts.
Please keep in mind that hint properties are not intended for filtering of
unwanted database values. They are only performance hints. Values that do not
fulfill the criteria will still appear in query results if find patterns like
(URI, ANY, ANY) are used. In oder to filter values, use d2rq:condition
or a translation table with a custom Java class
that returns null
for unwanted database values.
map:PersonsClassFirstName a d2rq:PropertyBridge; d2rq:property :firstName; d2rq:column "Persons.FirstName"; d2rq:belongsToClassMap map:PersonsClassMap; d2rq:valueMaxLength "15"; .
The d2rq:valueMaxLength
property can be used to tell D2RQ that the length of
Persons.FirstName values is limited to 15 characters. Using this information,
D2RQ doesn't have to look in the database anymore to figure out, that a given
FirstName which is longer than 15 characters isn't fitting.
map:PaperYear a d2rq:PropertyBridge; d2rq:property :year; d2rq:column "Papers.Year"; d2rq:belongsToClassMap map:Paper; d2rq:datatype xsd:gYear; d2rq:valueRegex "^[0-9]{4}$" .
Here, the d2rq:valueRegex
property is used to provide a regular
expression for the Papers.Year column. The statement asserts that all values
match the regular expression (or are NULL
). The expression ^[0-9]{4}$
matches every four-digit number. If you don't want to use the full regular expression
machinery, you can use d2rq:valueContains
to assert that all values generated
by the property bridge contain a certain phrase.
This section lists several language constructs from older versions of the D2RQ mapping language that have been replaced by better alternatives and should no longer be used.
d2rq:DatatypePropertyBridge
and d2rq:ObjectPropertyBridge
Older versions of the language used two different classes to distinguish between property bridges that produce literals, and bridges that produce resources.
In the current version, both cases
are handled by the d2rq:PropertyBridge
class. The distinction
is made by using an appropriate property on the bridge declaration:
d2rq:column
and d2rq:pattern
for literals,
d2rq:uriColumn
, d2rq:uriPattern
and
d2rq:bNodeIdColumns
for resources.
d2rq:additionalProperty
Up until D2RQ 0.5.1, the d2rq:AdditionalProperty
construct could be used
to add a constant property-value pairs to all instances of a class map. An example
is shown below:
map:PersonsClassMap a d2rq:ClassMap; d2rq:class :Person; d2rq:additionalProperty map:SeeAlsoStatement. map:SeeAlsoStatement a d2rq:AdditionalProperty; d2rq:propertyName rdfs:seeAlso; d2rq:propertyValue <http://annotation.semanticweb.org/iswc2003/>.
This adds an rdfs:seeAlso
statement with a fixed URL object to every instance of
the persons class map. In recent versions of the mapping language, the same is
achieved by adding a property bridge to the class map, and giving it a
d2rq:constantValue
property with the fixed URL as the object, as
shown in this example.
d2rq:AdditionalProperty
constructs
are still used with
d2rq:additionalClassDefinitionProperty
and d2rq:additionalPropertyDefinitionProperty
.
d2rq:classMap
and d2rq:propertyBridge
properties| d2rq:classMap | Specifies that a d2rq:ClassMap is used
to create instances of a given OWL or RDFS class. Use its inverse,
d2rq:class , instead. |
|---|---|
| d2rq:propertyBridge | Specifies that a d2rq:PropertyBridge
is used to create triples with a given RDF property in the predicate
position. Use its inverse, d2rq:property , instead. |
d2rq:odbcDSN
and d2rq:allowDistinct
These are deprecated properties of d2rq:Database
:
| d2rq:odbcDSN | Up to D2RQ 0.7, the d2rq:odbcDSN property could be
used on d2rq:Database to connect to ODBC data sources
using Sun's ODBC-JDBC bridge. This has been deprecated since JDBC
drivers are now readily available for most if not all data sources
and generally work better. Users can still use ODBC data sources by downloading an
ODBC-JDBC bridge from a vendor and using it like any other
JDBC driver, with a d2rq:jdbcDSN such as
jdbc:odbc:mydatabase . |
|---|---|
| d2rq:allowDistinct | In D2RQ up to v0.8, this indicated the database's ability to handle
DISTINCT correctly. Value: true or false .
For example MSAccess cuts fields longer than 256 chars. The property is no
longer necessary, as D2RQ now determines the correct value automatically. |


Festival Guide:
[Festival of Darkness - Bonus Information]
1. Awarding of Bonuses
Bonuses are awarded to the victors of the competition. They are given in the form of ancient adena. Having the top score does not assure the bonus, the party must have also been victorious in battle. If no party in a certain level is eligible for a bonus, the bonus is divided equally between the top scorers of the other levels.
2. Amounts of Bonuses
All parties that participate in the festival must pay a fee. These fees are distributed as bonuses. Naturally, the more parties that participate in the festival, the greater the bonues will be.
3. Bonus Periods
Since some parties challenge the Festival of Darkness more then others, bonuses are not determined until the competition is complete, during the seal validation period. The leader of the highest-scoring victorious party of each level must visit the oracle to recieve the reward.
Go back.


"ZARDOZ" (UK, 1974) A Film Review by James Kendrick * (out of ****)
Director: John Boorman || Screenplay: John Boorman || Stars: Sean Connery (Zed), Charlotte Rampling (Consuella), Sara Kestelman (May), Sally Anne Newton (Avalow), John Alderton (Friend), Niall Buggy (Zardoz/Arthur Frayn), Bosco Hogan (George Saden), Jessica Swift (Apathetic) || MPAA Rating: R
John Boorman's "Zardoz" is a goofy cinematic debacle so fundamentally misconceived and laughably executed that it takes on a bizarre enjoyment quality all its own. Not since the rampant bumblings of one Edward D. Wood Jr. has a movie been so silly and so serious at the same time.
Of course, Wood's career can be explained by two things: he had no money and he had no talent. Boorman, on the other hand, cannot court such excuses to explain "Zardoz" (or his follow-up film, the equally awful "Exorcist II: The Heretic"). Boorman obviously had a sizable budget, a matinee idol movie star (Sean Connery) in the lead role, and although you wouldn't know it from this film, Boorman does indeed have talent.
This is the man who made the slick modern masterpiece "Deliverance" (1972), as well as the autobiographical World War II drama "Hope and Glory" (1987), the slightly over-conceived Arthurian epic "Excalibur" (1981) and the father-son jungle adventure "The Emerald Forest" (1985). His films all show that Boorman is never lacking in imagination, but sometimes that comes at the cost of coherence and taste. If Boorman is anything, he's ambitious, and when he succeeds, it's in grand fashion. Unfortunately, the bigger they are, the harder they fall, and when Boorman falls, the resounding impact can be heard for miles around.
"Zardoz" is meant to takes its place among the grandest of mystical movies, an obsession of Boorman's. His screenplay tries to elicit the same mythological connotations of the Arthurian legends or even "The Wizard of Oz," a book which figures into the movie's plot. But, despite all this reaching, the resulting movie is more unintentionally funny than intentionally enigmatical or compelling.
The events take place in the distant year 2293, but there is little of the typical futuristic movie-ness to be found. In fact, things seems to have moved backwards, with people riding horses, shooting old-style guns, and living in large Victorian mansions. It's more Middle Ages than Space Age.
  However, if one breaks the rules, that person is punished by being aged so many years. If someone breaks the rules enough, he or she is aged to the point of senility, and imprisoned to an eternal existence in a geriatric home with others aged criminals.
One of the Immortals, Arthur Frayn (Niall Buggy ), a squirmy man with a mustache and goatee tattooed on his face, is charged with keeping order in the Outlands and forcing the residents to farm so the Immortals can be fed.  (This flying head is one of the movie's opening images, and it's a dead giveaway of the lunacy to come.)
 From inside his giant, stone head, Zardoz bellows seriously laugh-inducting statements like, "The gun is good.  That line alone is worth the movie's cult following.
One day, an Exterminator named Zed (Sean Connery), sneaks into Zardoz's flying stone, pushes Frayn out, and goes back to the Vortex. Once there, the Immortals label him a "Brutal" and study him like a lab rat, taking great, perverse care in exploring his sexuality, which is a mystery to them. They seem especially interested in his ability to gain an erection, and there is one downright hilarious sequence where a bunch of scantily-clad female scientists show Zed erotic footage on a video screen in an attempt to determine what gets him worked up.
I say "hilarious" because that is exactly what "Zardoz" is. It is obvious that Boorman did not intend it to be so; he made this film with the straightest of faces, although I have a hard time believing that as production moved forward, he didn't get even the slightest inkling of how patently ridiculous it was becoming. Just looking at Connery is enough to give one the giggles - he spends most of the film running around in a red loin cloth that resembles a diaper, a mane of hair braided halfway down his back, a Wyatt Earp-style handlebar mustache, and a pair of thigh-high patent leather boots that would look more appropriate on a cheap Hollywood hooker.
Boorman made the film right after the critical and financial success of "Deliverance," which is the only reason I can imagine a studio would green-light this effort. He attracted some rich talent on both sides of the camera, including cinematographer Geoffrey Unsworth ("2001"), whose striking visuals are about the only good thing in "Zardoz" besides the inadvertent humor. Sean Connery had made his last James Bond film in 1971, and perhaps he was looking for a change in pace. He got exactly that in "Zardoz," and it's a wonder it didn't end his career.
I'm sure Boorman intended for this movie to make some grand statements. Is it a treatise about the infallibility of eternal life? Is it a condemnation of those who consider growing old to be a bad thing? Or is it a social statement, something about the inherent negativity of class distinctions and the violence it creates? Karl Marx might like it if he were more like Timothy Leary. Come to think of it, maybe Boorman made it as an extended LSD trip. People high on illicit substances are the only ones I can imagine enjoying this asinine silliness as anything more than a completely unintentional comedy.
©1998 James Kendrick
The review above was posted to the
rec.arts.movies.reviews newsgroup (de.rec.film.kritiken for German reviews).
The Internet Movie Database accepts no responsibility for the contents of the
review and has no editorial control. Unless stated otherwise, the copyright
belongs to the author.
Please direct comments/criticisms of the review to relevant newsgroups.
Broken URLs inthe reviews are the responsibility of the author.
The formatting of the review is likely to differ from the original due
to ASCII to HTML conversion.
Related links: index of all rec.arts.movies.reviews reviews


interface ManagedCameraStatus
Consumers of ManagedCamera need to supply an implementation of this interface to allow the camera instance to communicate back as required |
val CAMERASTATE_IDLE: Int
Camera state: Idle / Not started. |
|
val CAMERASTATE_PICTURE_TAKEN: Int
Camera state: Picture was taken. |
|
val CAMERASTATE_PREVIEW: Int
Camera state: Showing camera preview. |
|
val CAMERASTATE_WAITING_LOCK: Int
Camera state: Waiting for the focus to be locked. |
|
val CAMERASTATE_WAITING_NON_PRECAPTURE: Int
Camera state: Waiting for the exposure state to be something other than precapture. |
|
val CAMERASTATE_WAITING_PRECAPTURE: Int
Camera state: Waiting for the exposure to be precapture state. |


11 Shuffling cards
When you draw cards faces, you will notice that duplicating filenames list produces a very orderly sequence that makes playing the game easy (and boring). We need to shuffle() the filename list before we create cards
. Note that shuffle() shuffles list item in place using the fact that the list is mutable. That means you simply call the function and pass the list as an argument. The list gets modified, nothing is returned and nothing need to be assigned back of filenames
variable.
Put your code into code10.py
.
11.1 Let us have a break!
We covered a lot of ground, so it might be a good point to take a break and submit your code for my review.
11.1.1 Adding main game loop
In our game, the player will click on a card to “turn it around.” We will implement a mouse interaction shortly but, first, modify the code to have the main presentation loop as we did in PsychoPy seminarm i.e., a loop that repeats while games is not over. In the loop, you should draw the card (based on its "side"
) and exit the loop if a player pressed escape (getKeys).
Put your code into code08.py
.
11.1.2 Detecting a mouse click
Before you can use a mouse in PsychoPy, you must create it via mouse = event.Mouse(visible=True, win=win)
call, where win
is the PsychoPy window you already created. This code should appear immediately below the line where you create the window itself.
Now, you can check whether the left button was pressed using mouse.getPressed() method. It returns a three-item list with True
/False
values indicating whether each of the three buttons are currently being pressed. Use it the main loop, so that if the player pressed left button (its index in the returned list is 0
), you change card["side"]
to "front"
(this assumes that you initialize the card with its "back"
shown).
If you run the code and click anywhere, this should flip the card.
Put your code into code09.py
.
11.2 Position to index
Currently, the card is flipped if you click anywhere. But it should flip only when the player clicked on that specific card. For this we need to implement a function index_from_position
that is an inverse of position_from_index
. It should take an argument pos
, which is a list of (<x>, <y>)
values (that would be a mouse position within the window), and return an integer card index. You have float values (with decimal points) in the pos
argument (because it ranges from -1 to 1 for norm units) and by default the values you compute from them will also be float. However, the index is integer, so you will need to wrap it in int() function call, before returning it.
I think going backwards — from position to index — is easier. First, you need to think how you can convert x coordinate (goes from -1 to 1) to a column index (goes from 0 to 3) given that you have 4 columns. Similarly, you translate y (from -1 to 1) into raw index given that there are only two rows. Once you know row and column index, you can compute the index itself (keeping in mind that there are four card in a row). As with position_from_index
, if think it is easier to first play with formulas in a Jupyter Notebook, before turning the code into a function, documenting it, and putting it into utilities.py
.
Put index_from_position
into utilities.py
.
11.3 Flip on click
Now that you have function that returns an index from position (don’t forget to import it), you can check whether the player did click on the card itself. For this, you need to extend the card-flipping code inside the if left-mouse button was pressed code.
You can get the position of the mouse within the window by calling mouse.getPos(). This will return a pair of (x, y)
values, which you can pass to your index_from_position()
function. This, in turn will return the index of the card the player click on. If it matches the index of your only card (stored in "index"
field of the card
dictionary), then and only then you flip the card.
Put your code into exercise10.py.


Comments
-
Greg Hurrell
Interesting ideas. I agree the animations could potentially become quite horrible, but there's also potential for good in there.
As for the Photoshop idea I don't think it would be a very high priority for me to implement that feature because there's no native support for opening PS files within Cocoa (at least, as far as I know). I think one of the real strings of Mac OS X's bundle system is that you can browse a bundle in the file and see all its components without having to rely on other applications (especially very expensive ones like Photoshop which many people can't afford). Of course, I'm always ready for someone to come and change my mind...
So for now we have the core proposal: an animation-capable button set format.
And some options for how these animations could be stored:
1. Photoshop layers 2. Animated GIFs 3. Numbered files 4. QuickTime movies
-
Greg Hurrell
Changing assignment to reflect my new email address.
https://wincent.com/a/news/archives/2006/05/change_of_email.php
Add a comment
Comments are now closed for this issue.


sample 2
sample 3 text
sample 3 repetition
sample 3 repetition with fragment
inner
tag
href with whitespaces


Hello, Monster!
Wallet
| Cash | + / - |
|---|---|
Last updated less than one hour ago
Buy Stocks
| Stock | Price | Buy |
|---|
The oldest stock exchange in the United States, opened in Philadelphia, in 1790.
Your Stocks
| Stock | Price | Sell |
|---|
Monster League
| # | Username | $ |
|---|---|---|
| 1 | @Maike | $55,000 |
| 2 | @Nick | $47,500 |
| 3 | @Nathan | $45,700 |
| 4 | @Chris | $32,050 |
| 5 | @Kristine | $30,800 |
Last updated less than one hour ago
“Price is what you pay. Value is what you get.”
Wall Street was laid out behind a 12-foot-high wood stockade across lower Manhattan in 1685. The stockade was built to protect the Dutch settlers from British and Native American attacks.


Multi Playback Demo
This demo shows parallel (timed) playback using two different jukebox.Player instances.
The visualized bar is the spritemap position.
This demo shows parallel (timed) playback using two different jukebox.Player instances.
The visualized bar is the spritemap position.


We choice to go to The Moon
not because it's easy, but because it's hard
John F. Kennedy
Dear visitor!!! You have a perfect opportunity to explore the gratest space exploration history in our live - History of United States Space exploration!!! This application include all main mailstones in history. Please show all information in all parts. I will be very glady if you sent me little survey about site. If you want to support this project please make donation. You can send a survey if you want. Use "Survey" button for this action. Thank you!!! Regards, Denys Shabelnyk<EMAIL_ADDRESS>Date
Event


unFocus.History Keeper, Testing unFocus.FlashPlayerInfo:
Testing
Notes:
- Some releases of the Flash Player which are labeled as beta, and have an internal beta number (like 9.0.60.xx) contain the release code of "r", which I assumed meant release at one point. So there is no real good way to test for beta status, except to check the $version variable from within Flash, in PlugIn based Players.


This only works with Chrome browser
Make sure you create your Dummy URL with your tenant id or it wont work
1. Copy the Dummy URL and paste it to the Chrome browser.
2. When you access delete all the cookies and create a cookie with the following properties
4. Change the value of cookie x-ms-RefreshTokenCredential to this new value
5. Complete the MFA and you are DONE!
While login with Teams, maybe it shows an error regarding to enable third party cookies or something weird.
To solve this, click on the signout button and login again, don't worry, while login back the PRT generated token will be used so there is no need to generate the token again.


Welcome to the Laser-Cut Maze Designer, by Aaron Rodriguez
With this tool and a laser cutter such as a Glowforge or an Epilog, you can create your own wooden toy maze. You can then assemble it and play with it by rolling around a small marble through the hallways.
Get started here


Pirate (ARRR) is a cryptocurrency that solves the issue of financial privacy on the blockchain through forced anonymous transactions. Protect your wallet and transactions with Pirate’s completely anonymous network. With forced private transactions, your privacy cannot be compromised by another users’ activity on the network. If you wish to learn more, please join the official Pirate Discord at https://pirate.black/discord/ or message FishyGuts#5085, who will be happy to help out.
100 messages
Before 05-Dec-19 12:00 AM
Flexatron29-Sep-18 05:34 PM
actionslacks29-Sep-18 05:34 PM
My otc ta says we’re all gonna be filthy rich
bishop29-Sep-18 05:34 PM
No no, trollface is reserved for 1000M
when polo
Flexatron29-Sep-18 05:34 PM
Then steadily grow in cap with the emission
The key is hodl
actionslacks29-Sep-18 05:36 PM
Or do the genie thing and just rake in the kmd
Alright29-Sep-18 05:37 PM
yea just don't sleep if you try that
2
3
2
2
3
1
1
1
1
actionslacks29-Sep-18 05:37 PM
This is nuts
Flexatron29-Sep-18 05:38 PM
Genie has to pay back his miners
And warehouse + island rent
actionslacks29-Sep-18 05:39 PM
Its the pirate way
bishop29-Sep-18 05:42 PM
i need a new node to connect to as I keep getting stuck at block 36719 using the node in the pin
1
Third time's the charm!
Alright29-Sep-18 05:44 PM
I'll sell you 125k PIRATE on that chain for $100 @bishop
bishop29-Sep-18 05:44 PM
I bet you will sugar
someone give me their peers, stat!
Por favor.
Seko29-Sep-18 05:47 PM
User Wil on Telegrams question about the onboarding on dexstats:
„Can I use the same z address or do i have to get a new receivingaddress for every new transaction?“
Deleted User29-Sep-18 05:47 PM
Update komodo and you won t have sync issues anymore ^^
1
bishop29-Sep-18 05:47 PM
christ, I ran it from the wrong folder
doh
I need to clean up all these old builds
I'm like a collector
FishyGuts29-Sep-18 05:58 PM
@Seko you can use the same one or get a new one for each tx
1
ComputerGenie 👴👴👴29-Sep-18 06:11 PM
buys up all the onboarding funds and raises the price to 0.2KMD
Flexatron29-Sep-18 06:12 PM
Lolol
With your 0.12 kmd offer money
ComputerGenie 👴👴👴29-Sep-18 06:14 PM
no, with all the KMD I made mining SUPERNET
oblox29-Sep-18 06:20 PM
Did you really accumulate a large stash at 0.001 block rewards off SUPERNET???
Alright29-Sep-18 06:21 PM
only about 10k KMD
oblox29-Sep-18 06:22 PM
The blocks are 0.001 are they not?
Alright29-Sep-18 06:24 PM
both
oblox29-Sep-18 06:24 PM
That will do it.
jl777c29-Sep-18 06:36 PM
50 Msols
2
bishop29-Sep-18 06:41 PM
...oh....my....
I think it's great it isn't even listed on WTM or other sites yet.
jl777c29-Sep-18 06:42 PM
seems hashrate would double or more, once it gets onto the mining sites
Organize anything, together. Trello is a collaboration tool that organizes your projects into boards. In one glance, know what's being worked on, who's working on what, and where something is in a process.
 You're talking about CryptoProphet right?
What is PIRATE?
PIRATE is about freedom of privacy
The chain is one of the most private and most secure blockchains available
Take a look at the info below and stop by our website or discord to learn more
#dPoW $KMD
#PrivacyIsNotPiracy
#ARRR4Privacy
https://t.co/dc58...
You all know what to do.
DR3WSKi29-Sep-18 08:23 PM
Idk trello but yes
FishyGuts29-Sep-18 08:23 PM
@SHossain can we pin the public trello board too?
It's super easy. I didn't know it 6 mos ago either.
Organize anything, together. Trello is a collaboration tool that organizes your projects into boards. In one glance, know what's being worked on, who's working on what, and where something is in a process.
SHossain29-Sep-18 08:23 PM
Pinned a message.
DR3WSKi29-Sep-18 08:23 PM
K
FishyGuts29-Sep-18 08:23 PM
Ill do it real quick and you can see it.
I want the public to feel free to contribute.


[ all classes ]
[ emily.games.gameofsticks ]
Coverage Summary for Class: GameOfSticks (emily.games.gameofsticks)
| Class | Class, % | Method, % | Line, % |
|---|---|---|---|
| GameOfSticks | 0% (0/ 1) | 0% (0/ 10) | 0% (0/ 23) |
1 /*
2 * Copyright 2017 github.com/kaaz
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17 package emily.games.gameofsticks;
18
19 import emily.games.meta.AbstractGame;
20 import emily.games.meta.GameState;
21 import net.dv8tion.jda.core.entities.User;
22
23 /**
24 * Created on 9-9-2016
25 */
26 public class GameOfSticks extends AbstractGame<GoSTurn> {
27
28 private int sticksleft;
29
30 public GameOfSticks() {
31 reset();
32 }
33
34 public void reset() {
35 super.reset();
36 sticksleft = 20;
37 }
38
39 @Override
40 public String getCodeName() {
41 return "gos";
42 }
43
44 @Override
45 public String[] getReactions() {
46 return new String[]{
47 "1", "2", "3"
48 };
49 }
50
51 @Override
52 public String getFullname() {
53 return "Game of sticks";
54 }
55
56 @Override
57 public int getTotalPlayers() {
58 return 2;
59 }
60
61 @Override
62 protected boolean isTheGameOver() {
63 if (sticksleft == 0) {
64 setWinner(1 - getActivePlayerIndex());
65 return true;
66 }
67
68 return false;
69 }
70
71 @Override
72 public boolean isValidMove(User player, GoSTurn turnInfo) {
73 return turnInfo.getSubstract() <= 3 && (sticksleft - turnInfo.getSubstract()) >= 0;
74 }
75
76 @Override
77 protected void doPlayerMove(User player, GoSTurn turnInfo) {
78 sticksleft -= turnInfo.getSubstract();
79 }
80
81 @Override
82 public String toString() {
83 String ret = "A Game of sticks.\n";
84 ret += "Take away a few sticks, the player to take away the last stick loses!\n";
85 ret += "There are currently **" + sticksleft + "** Sticks left\n\n";
86 if (getGameState().equals(GameState.IN_PROGRESS) || getGameState().equals(GameState.READY)) {
87 ret += "It's the turn of " + getActivePlayer().getAsMention() + "\n";
88 ret += "to play type **" + getLastPrefix() + "game 1-3**";
89 } else if (getGameState().equals(GameState.OVER)) {
90 ret += "Its over! The winner is " + getPlayer(getWinnerIndex()).getAsMention();
91 }
92 return ret;
93 }
94 }


[viewBag] title = "Walking Group" url = "/whats-on/walking-group" layout = "default" hidden = "0" navigation_hidden = "0" seo_description = "Walking Group - a group from Crockenhill Baptist Church who meet for walks" robot_index = "index" robot_follow = "follow" ==
Leisurely morning walks in the local countryside, not exclusively for senior citizens.


MoSKito Commiters
Fingers and Brains behind MoSKito
MoSKito is an open source project and it is developed entirely by volunteers.
Want to help? Jump to the help section to learn how you can involve yourself.
Maintainer
The project is maintained by the Maintainer. The job of the maintainer is to
- discuss and accept pull requests on GitHub,
- prescan and assign jira tickets
- prepare and perform releases
- ask new commiters to fill out and sign the Contributor License Agreement.
MoSKito's maintainer and founder is:
Leon RosenbergYou can always reach current maintainer at<EMAIL_ADDRESS>Commiters
Current and past commiters and contributors in alphabetic order
- Alexandr Bolbat
- Alexandr Osadchy
- Alecsey Samoilich
- Andrey Fedorenko
- Bogdan Didukh
- Dmitriy Agafonov
- Denys Metelin
- Dmitry Zhmud
- Dmytro Mrachkovskyi (documentations)
- Dmitriy Silenko
- Eugen Lihovidov
- Eugen Smakula
- Georgiy Sokolov
- Gleb Zgonikov
- Roman Sukharnik
- Ilja bogatyrchuk
- Igor Mercuriev
- Ksenia Solodovnik
- Leon Rosenberg
- Michael König
- Michael Schütz
- Miroslav Gannoha
- Roman Potopa
- Sergiy Sergeichuk
- Vladyslav Bezuhlyi
- Valeriy Kazhdan
- Vitaliy Zhovtiuk
- Yuriy Koval
Want to help?
MoSKito is an open source project maintained by volunteers. This means, that we urgently depend on your help.
There are multiple ways to help. Here are some:
- Check jira for unresolved issues.
- Check how MoSKito integrates with your favorite tech and provide an example or documentation or a blog post.
- Generally everything that makes the documentation better, will give you hundreds of additional karma points.
- Or maybe you have a feature idea? Discuss it on the user list.
- ..... or maybe just send us a pizza ;-)


Market open until {{timestampToString marketCloseTime true true}} {{> whatisthis section="expiring-market"}}
{{else}}
Market closed on {{timestampToString marketCloseTime true true}}.
{{> whatisthis section="expiring-market"}}
Please cancel your orders.
Could not find the contract on your current blockchain environment.
{{/if}}


Variable Class
Definition
Line
441
of
scmlg/Model.cm
Constructors & Destructor
public
Variable
(
Node
* type_,
const
String
<
uchar
>& name_)
Member Functions
public
Node
*
GetType
()
const
public
const
String
<
uchar
>&
Name
()
const
Member Variables
private
String
<
uchar
>
name
private
UniquePtr
<
Node
>
type
Constructor& Destructor Details
Variable Constructor
public
Variable(
Node
* type_,
const
String
<
uchar
>& name_)
Definition
Line
443
of
scmlg/Model.cm
Member Function Details
GetType Member Function
public
Node
* GetType()
Definition
Line
447
of
scmlg/Model.cm
Name Member Function
public
const
String
<
uchar
>& Name()
Definition
Line
451
of
scmlg/Model.cm


10 reviews per page
25 reviews per page
50 reviews per page
Filter by Rating
Ascending
Decending
1
2
3
4
5
>
>>


Your Order History
Placeholder
Order
Macros
Carbs: 52g
Protein: 25g
Calories: 500
Fat: 15g
Price
$14.96
Date Ordered
14/01/2020
Placeholder
Order
Macros
Carbs: 52g
Protein: 25g
Calories: 500
Fat: 15g
Price
$14.96
Date Ordered
14/01/2020


The
Star Wars
Hang(wo)man
REFRESH
Mistakes:
Remaining:
Guess the letter by typing it into the box below:


A collection of visualization examples leveraging the data and APIs of CivicData.com.
These examples were built with:
Built by: Seth Axthelm.
Code available on GitHub.


--- layout: main title: Portfolio ---
Mackenzie Hill is a recent graduate with a Bachelor of Science in Mechanical Engineering with a focus on Lean Practices at Oakland University. She is attracted towards problems regarding efficiency that are able to reduce the largest amount of waste, especially in topics of manufacturing, visual design, or even event planning. Presently, Mackenzie is seeking to use her engineering study to reinvent modern manufacturing in a paradigm shift of scalable autonomous technologies. Additionally, she is involved in projects afterhours including graphic design, mechatronics, lean implementation, and machine learning.


Turn On The Lights In Your Productions And Events. Turn Off The Heat
Chidex International is a top dealer in quality lights and equipment used in cinemas, concerts, studios, clubs, bars, stage shows and so on. All our lights and equipment are sold at highly competitive prices and are guaranteed to give you
optimum value for your money
Some Of Our Lights
Click To BargainPlanning events, productions and parties can be hard, and the last thing you want are lights that do not function properly, killing the vibes you have worked so hard to give off. Our lights and equipment are from the best companies and give you the exact effect you want while emitting low heat and consuming lower energy.


My Work
Neuronsim
This is a test system of a solitary neuron, you can change the estimations of loads, inclination, inputs and so forth and get a yield dependent on the initiation work
- HTML
- CSS
- JavaScript
- Firebase
Password Manager
My own Password Manager Using Python & SQL, still under work. But for now only linux users can use.
- Python
- SQL
- Linux
- Apache2
Python-Firebase-Login
About a web-app based on python, flask and firebase which can be used to login/signup a user, and the best part of my code is it's free to use.
- HTML
- CSS
- Python
- PHP.SQL
Experence With
About Me
My name is Harsh Sinha, I am Full-Stack-Devloper, Programmer and a Penetration Tester. I have been to many IT events, winning and participating equally well. My intrest drives me to the level of becoming a polymath. I have a vast range of intrest including Cryptorgraphy, Steganography and Adobe PS, PR and Æ. Not an expert at AI/ML, but love playing with Tensorflow, PyTorch, and OpenCV.
My Resume


home
flights
hotels
cars
cruises
passports
visas
Welcome to Contoso Travel!
Translate a sign
Tell us what someone looks like
Find out who's in a picture


No matches found for your query. Please try with different date range or update filter.
Rs. {{record.price}}
{{record.flight.depart.no}} {{record.flight.depart.airline}}
{{record.from}} > {{record.to}}
Depart : {{record.depart | date : 'hh:mm a'}}
Arrive : {{record.arrive | date : 'hh:mm a'}}
{{record.flight.return.no}} {{record.flight.return.airline}}
{{record.to}} > {{record.from}}
Depart : {{record.depart | date : 'hh:mm a'}}
Arrive : {{record.arrive | date : 'hh:mm a'}}
Book flight


Tutorial
This tutorial is heavily based on "Get Started With Viewing And Changing The DOM" by Kayce Basques at Chrome.
View DOM Nodes
Inspect Carol
Carol
Marc
Inspect the button below
Inspect Sokka
- Aang
- Katara
- Sokka
- Toph
Inspect Josh. Then, scroll to the top
Josh
Dan
Search for 150 Years of Light
Edit the DOM
Replace Gale with Peeta
- Katniss
- Gale
Change the background-color
of Terrance
- Terrance
- Avi
Turn George into a button
- Meredith
- Alex
- George
- Izzy
- Cristina
Drag Hufflepuff to the top of the list
- Gryffindor
- Slytherin
- Ravenclaw
- Hufflepuff
Force 70 to stay in :hover state
- 70
- 61A
- 61B
Hide Conan
- Johnny
- Jay
- Conan
- Jimmy
Delete Coronavirus
- Chickenpox
- Coronavirus
- Influenza
Access nodes in the Console
Access Catcher in the Rye in the Console using $0
- The Bell Jar
- Catcher in the Rye
Store Wizards of Waverly Place as global variable temp1
- Good Luck Charlie
- Suite Life on Deck
- Wizards of Waverly Place
Modify nodes in the Console
Change the text color


Lorem ipsum dolor sit amet consectetur adipisicing elit. Perspiciatis maxime nulla laudantium! Ducimus, itaque est! Consectetur cupiditate ipsam adipisci accusamus.
Watch your favorite
animals online
Observe different animals from around the world online in live time.
Help vulunteers to take a good care of animals, donate to your
favorite ones.


Class ProxyServer
This class is the backbone of proxy. One can create as many instances as needed. However care should be taken to avoid using the same listening ports across multiple instances.
Implements
Inherited Members
Namespace: Titanium.Web.Proxy
Assembly: Titanium.Web.Proxy.dll
Syntax
public class ProxyServer : IDisposable
Constructors
| Improve this Doc View SourceProxyServer(Boolean, Boolean, Boolean)
Initializes a new instance of ProxyServer class with provided parameters.
Declaration
public ProxyServer(bool userTrustRootCertificate = true, bool machineTrustRootCertificate = false, bool trustRootCertificateAsAdmin = false)
Parameters
| Type | Name | Description |
|---|---|---|
| Boolean | userTrustRootCertificate | Should fake HTTPS certificate be trusted by this machine's user certificate store? |
| Boolean | machineTrustRootCertificate | Should fake HTTPS certificate be trusted by this machine's certificate store? |
| Boolean | trustRootCertificateAsAdmin | Should we attempt to trust certificates with elevated permissions by prompting for UAC if required? |
ProxyServer(String, String, Boolean, Boolean, Boolean)
Initializes a new instance of ProxyServer class with provided parameters.
Declaration
public ProxyServer(string rootCertificateName, string rootCertificateIssuerName, bool userTrustRootCertificate = true, bool machineTrustRootCertificate = false, bool trustRootCertificateAsAdmin = false)
Parameters
| Type | Name | Description |
|---|---|---|
| String | rootCertificateName | Name of the root certificate. |
| String | rootCertificateIssuerName | Name of the root certificate issuer. |
| Boolean | userTrustRootCertificate | Should fake HTTPS certificate be trusted by this machine's user certificate store? |
| Boolean | machineTrustRootCertificate | Should fake HTTPS certificate be trusted by this machine's certificate store? |
| Boolean | trustRootCertificateAsAdmin | Should we attempt to trust certificates with elevated permissions by prompting for UAC if required? |
Properties
| Improve this Doc View SourceBufferPool
The buffer pool used throughout this proxy instance. Set custom implementations by implementing this interface. By default this uses DefaultBufferPool implementation available in StreamExtended library package. Buffer size should be at least 10 bytes.
Declaration
public IBufferPool BufferPool { get; set; }
Property Value
| Type | Description |
|---|---|
| IBufferPool |
CertificateManager
Manages certificates used by this proxy.
Declaration
public CertificateManager CertificateManager { get; }
Property Value
| Type | Description |
|---|---|
| CertificateManager |
CheckCertificateRevocation
Should we check for certificate revocation during SSL authentication to servers Note: If enabled can reduce performance. Defaults to false.
Declaration
public X509RevocationMode CheckCertificateRevocation { get; set; }
Property Value
| Type | Description |
|---|---|
| X509RevocationMode |
ClientConnectionCount
Total number of active client connections.
Declaration
public int ClientConnectionCount { get; }
Property Value
| Type | Description |
|---|---|
| Int32 |
ConnectionTimeOutSeconds
Seconds client/server connection are to be kept alive when waiting for read/write to complete. This will also determine the pool eviction time when connection pool is enabled. Default value is 60 seconds.
Declaration
public int ConnectionTimeOutSeconds { get; set; }
Property Value
| Type | Description |
|---|---|
| Int32 |
ConnectTimeOutSeconds
Seconds server connection are to wait for connection to be established. Default value is 20 seconds.
Declaration
public int ConnectTimeOutSeconds { get; set; }
Property Value
| Type | Description |
|---|---|
| Int32 |
CustomUpStreamProxyFailureFunc
A callback to provide a chance for an upstream proxy failure to be handled by a new upstream proxy. User should return the ExternalProxy object with valid credentials or null.
Declaration
public Func<SessionEventArgsBase, Task<IExternalProxy>> CustomUpStreamProxyFailureFunc { get; set; }
Property Value
| Type | Description |
|---|---|
| Func<SessionEventArgsBase, Task<IExternalProxy>> |
Enable100ContinueBehaviour
Does this proxy uses the HTTP protocol 100 continue behaviour strictly? Broken 100 continue implementations on server/client may cause problems if enabled. Defaults to false.
Declaration
public bool Enable100ContinueBehaviour { get; set; }
Property Value
| Type | Description |
|---|---|
| Boolean |
EnableConnectionPool
Should we enable server connection pool. Defaults to true. When you enable connection pooling, instead of creating a new TCP connection to server for each client TCP connection, we check if a server connection is available in our cached pool. If it is available in our pool, created from earlier requests to the same server, we will reuse those idle connections. There is also a ConnectionTimeOutSeconds parameter, which determine the eviction time for inactive server connections. This will help to reduce TCP connection establishment cost, both the wall clock time and CPU cycles.
Declaration
public bool EnableConnectionPool { get; set; }
Property Value
| Type | Description |
|---|---|
| Boolean |
EnableHttp2
Enable disable HTTP/2 support. Warning: HTTP/2 support is very limited
- only enabled when both client and server supports it (no protocol changing in proxy)
- cannot modify the request/response (e.g header modifications in BeforeRequest/Response events are ignored)
Declaration
public bool EnableHttp2 { get; set; }
Property Value
| Type | Description |
|---|---|
| Boolean |
EnableTcpServerConnectionPrefetch
Should we enable tcp server connection prefetching? When enabled, as soon as we receive a client connection we concurrently initiate corresponding server connection process using CONNECT hostname or SNI hostname on a separate task so that after parsing client request we will have the server connection immediately ready or in the process of getting ready. If a server connection is available in cache then this prefetch task will immediately return with the available connection from cache. Defaults to true.
Declaration
public bool EnableTcpServerConnectionPrefetch { get; set; }
Property Value
| Type | Description |
|---|---|
| Boolean |
EnableWinAuth
Enable disable Windows Authentication (NTLM/Kerberos). Note: NTLM/Kerberos will always send local credentials of current user running the proxy process. This is because a man in middle attack with Windows domain authentication is not currently supported. Defaults to false.
Declaration
public bool EnableWinAuth { get; set; }
Property Value
| Type | Description |
|---|---|
| Boolean |
ExceptionFunc
Callback for error events in this proxy instance.
Declaration
public ExceptionHandler ExceptionFunc { get; set; }
Property Value
| Type | Description |
|---|---|
| ExceptionHandler |
ForwardToUpstreamGateway
Gets or sets a value indicating whether requests will be chained to upstream gateway. Defaults to false.
Declaration
public bool ForwardToUpstreamGateway { get; set; }
Property Value
| Type | Description |
|---|---|
| Boolean |
GetCustomUpStreamProxyFunc
A callback to provide authentication credentials for up stream proxy this proxy is using for HTTP(S) requests. User should return the ExternalProxy object with valid credentials.
Declaration
public Func<SessionEventArgsBase, Task<IExternalProxy>> GetCustomUpStreamProxyFunc { get; set; }
Property Value
| Type | Description |
|---|---|
| Func<SessionEventArgsBase, Task<IExternalProxy>> |
MaxCachedConnections
Maximum number of concurrent connections per remote host in cache. Only valid when connection pooling is enabled. Default value is 2.
Declaration
public int MaxCachedConnections { get; set; }
Property Value
| Type | Description |
|---|---|
| Int32 |
NoDelay
Gets or sets a Boolean value that specifies whether server and client stream Sockets are using the Nagle algorithm. Defaults to true, no nagle algorithm is used.
Declaration
public bool NoDelay { get; set; }
Property Value
| Type | Description |
|---|---|
| Boolean |
ProxyAuthenticationRealm
Realm used during Proxy Basic Authentication.
Declaration
public string ProxyAuthenticationRealm { get; set; }
Property Value
| Type | Description |
|---|---|
| String |
ProxyAuthenticationSchemes
A collection of scheme types, e.g. basic, NTLM, Kerberos, Negotiate, to return if scheme authentication is required. Works in relation with ProxySchemeAuthenticateFunc.
Declaration
public IEnumerable<string> ProxyAuthenticationSchemes { get; set; }
Property Value
| Type | Description |
|---|---|
| IEnumerable<String> |
ProxyBasicAuthenticateFunc
A callback to authenticate proxy clients via basic authentication. Parameters are username and password as provided by client. Should return true for successful authentication.
Declaration
public Func<SessionEventArgsBase, string, string, Task<bool>> ProxyBasicAuthenticateFunc { get; set; }
Property Value
| Type | Description |
|---|---|
| Func<SessionEventArgsBase, String, String, Task<Boolean>> |
ProxyEndPoints
A list of IpAddress and port this proxy is listening to.
Declaration
public List<ProxyEndPoint> ProxyEndPoints { get; set; }
Property Value
| Type | Description |
|---|---|
| List<ProxyEndPoint> |
ProxyRunning
Is the proxy currently running?
Declaration
public bool ProxyRunning { get; }
Property Value
| Type | Description |
|---|---|
| Boolean |
ProxySchemeAuthenticateFunc
A pluggable callback to authenticate clients by scheme instead of requiring basic authentication through ProxyBasicAuthenticateFunc. Parameters are current working session, schemeType, and token as provided by a calling client. Should return success for successful authentication, continuation if the package requests, or failure.
Declaration
public Func<SessionEventArgsBase, string, string, Task<ProxyAuthenticationContext>> ProxySchemeAuthenticateFunc { get; set; }
Property Value
| Type | Description |
|---|---|
| Func<SessionEventArgsBase, String, String, Task<ProxyAuthenticationContext>> |
ReuseSocket
Should we reuse client/server tcp sockets. Default is true (disabled for linux/macOS due to bug in .Net core).
Declaration
public bool ReuseSocket { get; set; }
Property Value
| Type | Description |
|---|---|
| Boolean |
ServerConnectionCount
Total number of active server connections.
Declaration
public int ServerConnectionCount { get; }
Property Value
| Type | Description |
|---|---|
| Int32 |
SupportedSslProtocols
List of supported Ssl versions.
Declaration
public SslProtocols SupportedSslProtocols { get; set; }
Property Value
| Type | Description |
|---|---|
| SslProtocols |
TcpTimeWaitSeconds
Number of seconds to linger when Tcp connection is in TIME_WAIT state. Default value is 30.
Declaration
public int TcpTimeWaitSeconds { get; set; }
Property Value
| Type | Description |
|---|---|
| Int32 |
ThreadPoolWorkerThread
Customize the minimum ThreadPool size (increase it on a server)
Declaration
public int ThreadPoolWorkerThread { get; set; }
Property Value
| Type | Description |
|---|---|
| Int32 |
UpStreamEndPoint
Local adapter/NIC endpoint where proxy makes request via. Defaults via any IP addresses of this machine.
Declaration
public IPEndPoint UpStreamEndPoint { get; set; }
Property Value
| Type | Description |
|---|---|
| IPEndPoint |
UpStreamHttpProxy
External proxy used for Http requests.
Declaration
public IExternalProxy UpStreamHttpProxy { get; set; }
Property Value
| Type | Description |
|---|---|
| IExternalProxy |
UpStreamHttpsProxy
External proxy used for Https requests.
Declaration
public IExternalProxy UpStreamHttpsProxy { get; set; }
Property Value
| Type | Description |
|---|---|
| IExternalProxy |
Methods
| Improve this Doc View SourceAddEndPoint(ProxyEndPoint)
Add a proxy end point.
Declaration
public void AddEndPoint(ProxyEndPoint endPoint)
Parameters
| Type | Name | Description |
|---|---|---|
| ProxyEndPoint | endPoint | The proxy endpoint. |
DisableAllSystemProxies()
Clear all proxy settings for current machine.
Declaration
public void DisableAllSystemProxies()
DisableSystemHttpProxy()
Clear HTTP proxy settings of current machine.
Declaration
public void DisableSystemHttpProxy()
DisableSystemHttpsProxy()
Clear HTTPS proxy settings of current machine.
Declaration
public void DisableSystemHttpsProxy()
DisableSystemProxy(ProxyProtocolType)
Clear the specified proxy setting for current machine.
Declaration
public void DisableSystemProxy(ProxyProtocolType protocolType)
Parameters
| Type | Name | Description |
|---|---|---|
| ProxyProtocolType | protocolType |
Dispose()
Dispose the Proxy instance.
Declaration
public void Dispose()
RemoveEndPoint(ProxyEndPoint)
Remove a proxy end point. Will throw error if the end point doesn't exist.
Declaration
public void RemoveEndPoint(ProxyEndPoint endPoint)
Parameters
| Type | Name | Description |
|---|---|---|
| ProxyEndPoint | endPoint | The existing endpoint to remove. |
RestoreOriginalProxySettings()
Restores the original proxy settings.
Declaration
public void RestoreOriginalProxySettings()
SetAsSystemHttpProxy(ExplicitProxyEndPoint)
Set the given explicit end point as the default proxy server for current machine.
Declaration
public void SetAsSystemHttpProxy(ExplicitProxyEndPoint endPoint)
Parameters
| Type | Name | Description |
|---|---|---|
| ExplicitProxyEndPoint | endPoint | The explicit endpoint. |
SetAsSystemHttpsProxy(ExplicitProxyEndPoint)
Set the given explicit end point as the default proxy server for current machine.
Declaration
public void SetAsSystemHttpsProxy(ExplicitProxyEndPoint endPoint)
Parameters
| Type | Name | Description |
|---|---|---|
| ExplicitProxyEndPoint | endPoint | The explicit endpoint. |
SetAsSystemProxy(ExplicitProxyEndPoint, ProxyProtocolType)
Set the given explicit end point as the default proxy server for current machine.
Declaration
public void SetAsSystemProxy(ExplicitProxyEndPoint endPoint, ProxyProtocolType protocolType)
Parameters
| Type | Name | Description |
|---|---|---|
| ExplicitProxyEndPoint | endPoint | The explicit endpoint. |
| ProxyProtocolType | protocolType | The proxy protocol type. |
Start()
Start this proxy server instance.
Declaration
public void Start()
Stop()
Stop this proxy server instance.
Declaration
public void Stop()
Events
| Improve this Doc View SourceAfterResponse
Intercept after response event from server.
Declaration
public event AsyncEventHandler<SessionEventArgs> AfterResponse
Event Type
| Type | Description |
|---|---|
| AsyncEventHandler<SessionEventArgs> |
BeforeRequest
Intercept request event to server.
Declaration
public event AsyncEventHandler<SessionEventArgs> BeforeRequest
Event Type
| Type | Description |
|---|---|
| AsyncEventHandler<SessionEventArgs> |
BeforeResponse
Intercept response event from server.
Declaration
public event AsyncEventHandler<SessionEventArgs> BeforeResponse
Event Type
| Type | Description |
|---|---|
| AsyncEventHandler<SessionEventArgs> |
ClientCertificateSelectionCallback
Event to override client certificate selection during mutual SSL authentication.
Declaration
public event AsyncEventHandler<CertificateSelectionEventArgs> ClientCertificateSelectionCallback
Event Type
| Type | Description |
|---|---|
| AsyncEventHandler<CertificateSelectionEventArgs> |
ClientConnectionCountChanged
Event occurs when client connection count changed.
Declaration
public event EventHandler ClientConnectionCountChanged
Event Type
| Type | Description |
|---|---|
| EventHandler |
OnClientConnectionCreate
Customize TcpClient used for client connection upon create.
Declaration
public event AsyncEventHandler<Socket> OnClientConnectionCreate
Event Type
| Type | Description |
|---|---|
| AsyncEventHandler<Socket> |
OnServerConnectionCreate
Customize TcpClient used for server connection upon create.
Declaration
public event AsyncEventHandler<Socket> OnServerConnectionCreate
Event Type
| Type | Description |
|---|---|
| AsyncEventHandler<Socket> |
ServerCertificateValidationCallback
Event to override the default verification logic of remote SSL certificate received during authentication.
Declaration
public event AsyncEventHandler<CertificateValidationEventArgs> ServerCertificateValidationCallback
Event Type
| Type | Description |
|---|---|
| AsyncEventHandler<CertificateValidationEventArgs> |
ServerConnectionCountChanged
Event occurs when server connection count changed.
Declaration
public event EventHandler ServerConnectionCountChanged
Event Type
| Type | Description |
|---|---|
| EventHandler |


Use the WLM_GET_WORK_ACTION_SET_STATS table function to access the work action set statistics in memory to get the number of times specific activity types have been run. Note that running the following query shows only the load_wc, ddl_wc, and the read_wc work classes since they are the only three work classes that have a work action applied to them. All the other activities end up being counted under *.
Notice again, that one of the activities has a SQLCODE of -4712, this time because of the stop_large_activities service class threshold that was created in step 9 that was breached because the estimated cost for that select statement was too large. Also notice that all read activities are being run under the work1_sc_read service subclass.


| People only want to hear Kedron's mellifluous voice | Club forgot to come. | "Join our GroupMe." | Silent Q&A | Tech demo has a bug |
| "Forget about the other clubs." | Presenters have to stall | Question that makes club look bad | "Why can't I just co-op?" | Crimson Defense uses too many buzzwords |
| "But I don't know how to code?" | "Join our Discord." | Bingo Tyop | Makes fun of non-CS majors | Jerk leaves after signing in |
| Club uses food as bait | AI Club uses too many buzzwords | "Join our Slack." | Makes fun of professor | Student falls asleep |
| Idiot forgets to pass sign-in sheet | "Why isn't there a club for ______." | Calls out student for talking | Q&A runs too long | Slideshow typo |


Ethereum (ETH) Holding Key Support But For How Long?
- Ethereum price is trading nicely above the key $182 and $180 support levels against the US Dollar.
- The price is currently facing many resistances such as $187, $188 and $190.
- Recently, there was a break above a connecting bearish trend line with resistance near $185 on the hourly chart of ETH/USD (data feed via Kraken).
- Bitcoin is holding the $8,650 support, but it remains at a risk of more downsides.
Ethereum price is still stuck in a broad range versus the US Dollar, while bitcoin is facing selling pressure. ETH price might recover higher unless the bulls fail near $180.
Ethereum Price Analysis
In the past three sessions, there were mostly range moves in Ethereum above the $182 support against the US Dollar. ETH tested the $182 support recently, settled below the 100 hourly simple moving average, and it is currently recovering higher.
It corrected above the 23.6% Fib retracement level of the downward move from the $192 swing high to $182 low. Moreover, there was a break above a connecting bearish trend line with resistance near $185 on the hourly chart of ETH/USD.
However, the price faced a strong resistance near the $187 level. It represents the 50% Fib retracement level of the downward move from the $192 swing high to $182 low.
At the outset, Ethereum is trading with a bearish angle below $187 and the 100 hourly SMA. It might continue to decline, but there are many supports on the downside, starting with $184.
The next key support is near the $182 area, where the bulls are likely to take a stand. To push the price further into a bearish zone, the bears need to gain pace below the $182 and $180 support levels.
On the upside, the $187 level and the 100 hourly SMA are initial hurdles. A convincing break above the $187 and $188 resistance levels could push the price towards the $192 high.
Finally, a clear break above the $192 level is must for upside continuation. The next key resistance are near the $198 and $200 levels, above which it could test $205.
Looking at the chart, Ethereum price is showing a few positive signs, but it is facing a lot of hurdles such as $187, $188 and $190. On the downside, the $182 and $180 support levels hold the key. If there is a breakdown below $180, the price may perhaps decline towards $168.
ETH Technical Indicators
Hourly MACD – The MACD for ETH/USD is struggling to gain strength in the bullish zone.
Hourly RSI – The RSI for ETH/USD is currently declining and it is now just below the 50 level.
Major Support Level – $182
Major Resistance Level – $188


"MOREH "an archer, teacher; fruitful. (1.) A Canaanite probably who inhabited the district south of Shechem, between Mounts Ebal and Gerizim, and gave his name to the “plain” there (Genesis 12:6). Here at this “plain,” or rather (R.V.) “oak,” of Moreh, Abraham built his first altar in the land of Palestine; and here the Lord appeared unto him. He afterwards left this plain and moved southward, and pitched his tent between Bethel on the west and Hai on the east (Genesis 12:7, 8).
"MOREH "an archer, teacher; fruitful. (1.) A Canaanite probably who inhabited the district south of Shechem, between Mounts Ebal and Gerizim, and gave his name to the “plain” there (Genesis 12:6). Here at this “plain,” or rather (R.V.) “oak,” of Moreh, Abraham built his first altar in the land of Palestine; and here the Lord appeared unto him. He afterwards left this plain and moved southward, and pitched his tent between Bethel on the west and Hai on the east (Genesis 12:7, 8).