Class
CompressedSAA suffix array storing only a few suffix array entries and computing the remaining on demand.
A suffix array storing only a few suffix array entries and computing the remaining on demand.
| Implements | ContainerConcept |
|---|---|
| All Impl'd | AssignableConcept, ContainerConcept, DestructibleConcept |
| Defined in | <seqan/index.h> |
| Signature |
template <typename TText, typename TSpec, typename TConfig>
class CompressedSA;
|
Template Parameters
TSpec |
Possibility to specialize a compressed suffix array. Default: void. |
|---|---|
TText |
The type of the text the compressed suffix array is created from. Types: String, StringSet |
TConfig |
A configuration object that can be used to change the types of the fibres easily. This possibility is provided for convenience. |
Interface Function Overview
-
TIterator begin(compressedSA, tag);
Returns an iterator pointing to the first position of a compresses suffix array. -
void clear(compressedSA);
Resets the compressed suffix array. -
void createCompressedSa(compressedSA, completeSA, compressionFactor[, offset]);
This function creates a compressed suffix array with a specified compression factor. -
bool empty(compressedSA);
Checks whether or not a compressed suffix array contains any elements. -
TIterator end(compressedSA, tag);
Returns an iterator pointing to the position behind the last element of a compresses suffix array. -
TFibre getFibre(compressedSA, fibreTag);
Returns a specific fibre of a compressed suffix array. -
TSize length(compressedSA);
Returns the number of elements in the compressed suffix array. -
bool open(compressedSA, fileName[, mode]);
This functions opens a compressed suffix array from disk. -
TSize resize(compressedSA, newLength);
Resets the number of elements in the compressed suffix array. -
bool save(compressedSA, fileName[, mode]);
This functions saves a compressed suffix array to disk. -
void setFibre(compressedSa, lf, fibreLF);
Set the LF of the compressed suffix array. * -
TValue value(compressedSA, pos);
Returns the value stored at a specified position in the compressed suffix-array.
Interface Functions Inherited From AssignableConcept
Interface Functions Inherited From ContainerConcept
Interface Metafunction Overview
Interface Metafunctions Inherited From ContainerConcept
Detailed Description
Remarks
The compressed suffix array can only be used together with a LF.
Interface Functions Detail
TIterator begin(compressedSA, tag);
Returns an iterator pointing to the first position of a compresses suffix array.
Parameters
compressedSA
|
The compresses suffix array to be traversed. |
|---|---|
tag
|
The specialisation of the iterator to be returned by the function. Types: Standard, Rooted |
Returns
TIterator |
Returns an iterator pointing to the first position of a compresses suffix array. Types: The result of Iterator<Index<TText, TIndexSpec>, TSpec>::Type |
|---|
Data Races
Thread safety unknown!
void clear(compressedSA);
Resets the compressed suffix array.
Parameters
compressesSA
|
The compressed suffix array to be cleared. |
|---|
Data Races
Thread safety unknown!
void createCompressedSa(compressedSA, completeSA, compressionFactor[, offset]);
This function creates a compressed suffix array with a specified compression factor.
Parameters
compressedSA
|
The compressed suffix array. |
|---|---|
completeSA
|
A complete suffix array containing all values. Types: String |
compressionFactor
|
The compression factor. A compression factor of x means that the compressed suffix array specifically stores a value for every x values in the complete suffix array. Types: UnsignedIntegerConcept |
offset
|
The offset determines how many empty values should be inserted into the compressed suffix array at the beginning. This possibility accounts for the sentinel positions of the FMIndex. |
Data Races
Thread safety unknown!
bool empty(compressedSA);
Checks whether or not a compressed suffix array contains any elements.
Parameters
compressesSA
|
The compressed suffix array to be cleared. |
|---|
Returns
bool |
Returns true if the compressed suffix array is empty and false otherwise. |
|---|
Data Races
Thread safety unknown!
TIterator end(compressedSA, tag);
Returns an iterator pointing to the position behind the last element of a compresses suffix array.
Parameters
compressedSA
|
The compresses suffix array to be traversed. |
|---|---|
tag
|
The specialisation of the iterator to be returned by the function. Types: Standard, Rooted |
Returns
TIterator |
Returns an iterator pointing to the position behind the last element of a compresses suffix array. Types: The result of Iterator<Index<TText, TIndexSpec>, TSpec>::Type |
|---|
Data Races
Thread safety unknown!
TFibre getFibre(compressedSA, fibreTag);
Returns a specific fibre of a compressed suffix array.
Parameters
fibreTag
|
A tag that identifies the Fibre. Types: CompressedSAFibres. |
|---|---|
compressedSA
|
The container holding the fibre. |
Returns
TFibre |
A reference to the specified fibre of type Fibre<CompressedSA<TText, TSpec, TConfig>, FibreSparseString>::Type. |
|---|
Data Races
Thread safety unknown!
TSize length(compressedSA);
Returns the number of elements in the compressed suffix array.
Parameters
compressesSA
|
The compressed suffix array. |
|---|
Returns
TSize |
The number of elements in the compressed suffix array. Types: The result of Size of the compressed suffix array. |
|---|
Data Races
Thread safety unknown!
bool open(compressedSA, fileName[, mode]);
This functions opens a compressed suffix array from disk.
Parameters
compressedSA
|
The compressed suffix array to be opened. |
|---|---|
fileName
|
char const * containing the file name. |
mode
|
The combination of flags defining how the file should be opened. To open a file read-only, write-only or to read and write use OPEN_RDONLY, OPEN_WRONLY, or OPEN_RDWR.To create or overwrite a file add OPEN_CREATE. To append a file if existing add OPEN_APPEND. To circumvent problems, files are always opened in binary mode. Default: OPEN_RDWR | OPEN_CREATE | OPEN_APPEND |
Returns
bool |
true on success. |
|---|
Data Races
Thread safety unknown!
TSize resize(compressedSA, newLength);
Resets the number of elements in the compressed suffix array.
Parameters
compressesSA
|
The compressed suffix array. |
|---|---|
newLength
|
The number of elements which should be stored in the compressed suffix array. Types: UnsignedIntegerConcept. |
Returns
TSize |
The number of elements in the compressed suffix array. Types: The result of Size of the compressed suffix array. |
|---|
If the new length is smaller than the actual one then the last x items of the compressed suffix array are deleted with x = oldLength - newLength.
Data Races
Thread safety unknown!
bool save(compressedSA, fileName[, mode]);
This functions saves a compressed suffix array to disk.
Parameters
compressedSA
|
The compressed suffix array to be opened. |
|---|---|
fileName
|
char const * containing the file name. |
mode
|
The combination of flags defining how the file should be opened. To open a file read-only, write-only or to read and write use OPEN_RDONLY, OPEN_WRONLY, or OPEN_RDWR.To create or overwrite a file add OPEN_CREATE. To append a file if existing add OPEN_APPEND. To circumvent problems, files are always opened in binary mode. Default: OPEN_RDWR | OPEN_CREATE | OPEN_APPEND |
Returns
bool |
true on success. |
|---|
Data Races
Thread safety unknown!
void setFibre(compressedSa, lf, fibreLF);
Set the LF of the compressed suffix array. *
Parameters
compressesSa
|
The compressed suffix array. |
|---|---|
lf
|
The LF table to be used by the compressed suffix array. |
fibreLF
|
A tag to specify the LF table Fibre |
Data Races
Thread safety unknown!
TValue value(compressedSA, pos);
Returns the value stored at a specified position in the compressed suffix-array.
Parameters
compressedSA
|
The compressed suffix array to access. |
|---|---|
pos
|
Position at which to access the suffix array. Types: UnsignedIntegerConcept. |
Note that the compressed suffix array is read only. Therefore a const reference is return by this function.
Data Races
Thread safety unknown!


{% extends "layout.html" %} {% block title %} Minimal demo of Flask and SQLAlchemy {% endblock %} {% block body %}
Using SQLite to store data, SQLAlchemy to access SQLite, Flask as controller and server of the views, Flask-Jinja2 to create html views and Bootstrap to format the views.
{% if not session['username'] %}Do you want to log in?
{% else %}{{session['username']}}, do you want to log out?
{% endif %}


This tutorial assumes that OpenAdaptor has already been installed, the Java classpath has been set appropriately the simple adaptor will run correctly. If not, please refer to the instructions in example/readme.html.
This tutorial is organised as a series of adaptors which, when executed, illustrate how OpenAdaptor works. The instructions show how to run these from the command prompt or shell. The examples are deliberately kept simple to make them easy to run and experiment with. All of the adaptors are expressed as Spring framework configuration files.
Some of the examples illustrate database (JDBC) interaction, and thus require a running database - for simplicity the Hypersonic db is suggested. Others require a JMS implementation. For these, jBoss is suggested.
Note, however, that familiarity with jBoss or Hypersonic is not expected.
Launch a command prompt or shell and follow these these instructions:
cd example\tutorial .\setclasspath.bat
cd example/tutorial source setclasspath.sh
For convenience this sets the CLASSPATH
environment variable relative to the tutorial
directory; as the entire tutorial will be run from this directory, this should suffice.
This first adaptor step01.xml exposes a servlet interface and outputs data that it receives to the console (stdout). This is deliberately contrived to enable data to be injected into the adaptor using a test web page. Ultimately this will be replaced with something a bit more realistic. To launch this adaptor, invoke it as follows (through the aforementioned command prompt or shell):
java org.openadaptor.spring.SpringAdaptor -config step01.xml
This should result in a series of logging messages (including the OpenAdaptor copyright notice and licence). The last few log entries should resemble this:
INFO [Adaptor] Writer registered with Pipeline INFO [Adaptor] Servlet registered with Pipeline INFO [Adaptor] Writer started 2008-01-31 10:31:03.874::INFO: Logging to STDERR via org.mortbay.log.StdErrLog 2008-01-31 10:31:03.874::INFO: jetty-6.0.1 2008-01-31 10:31:03.905::INFO: Started SocketConnector @ <IP_ADDRESS>:9999 INFO [Adaptor] Servlet added servlet http://oa_server:9999/* INFO [Adaptor] Servlet started INFO [Adaptor] waiting for runnables to stop INFO [Servlet] Servlet running
The adaptor should now be ready for use (the log information, and the configuration file will be explained further later).
The tutorial includes a web page (test.html) which contains a form to allow data to be POSTed to the adaptor servlet interface. Assuming the adaptor is running, it should now be possible to open this page in a web browser and submit data. It should then result in the the fields that were input being echoed by the adaptor:
{buySell=BUY, ticker=XYZ, price=100}
Finally, use Ctrl-C
to tell the adaptor process to shutdown.
The rest of this section provides additional detail on the execution of this adaptor.
The java program executed org.openadaptor.spring.SpringAdaptor
is a
helper class that is provide in openadaptor-spring.jar
.
The configuration argument -config
is a url for a spring XML configuration.
If the configuration url does not specify a protocol, then SpringAdaptor assumes that it is a file url; hence the following are equivalent:
java org.openadaptor.spring.SpringAdaptor -config step01.xml java org.openadaptor.spring.SpringAdaptor -config file:step01.xml
The first part of the configuration file to examine is the "Adaptor" bean:
<bean id="Adaptor" class="org.openadaptor.core.adaptor.Adaptor"> <property name="messageProcessor" ref="Router"/> </bean>
This describes the top level organisation of the adaptor components. It manages the processing
lifecycle and co-ordinates the ReadConnector
s, Processor
s and
WriteConnector
s. This simple example has one ReadConnector
and one
WriteConnector
, called "Servlet" and "Writer" respectively. The ReadConnector
waits (blocks) for data to be POST
ed; whilst the Writer prints any data it receives
to the console (stdout). The beans corresponding to these two components are shown here:
<bean id="Servlet" class="org.openadaptor.auxil.connector.http.ReadConnectorServlet"> <property name="port" value="9999"/> </bean> <bean id="Writer" class="org.openadaptor.auxil.connector.iostream.writer.FileWriteConnector"/>
These are linked together by the Router
bean. The processors
property may be
used to supply an ordered list of components which will ultimately be wired together in sequence.
In this case, it means that output from the Servlet connector should be forwarded to the Writer
.
<bean id="Router" class="org.openadaptor.core.router.Router"> <property name="processors"> <list> <ref bean="Servlet"/> <ref bean="Writer"/> </list> </property> </bean>
When the adaptor bean is initialised (as part of launching the adaptor) it uses the Router
configuration to identify and register each of the processors with the Adaptor. Examination of the log
output will show the various components as they are registered.
The adaptor then starts any ReadConnector
s, and waits for them to stop, before performing a
graceful shutdown of the adaptor itself.
As OpenAdaptor uses the Apache Commons Logging framework, it can utilise any compatible logging implementation, and resolves behaviour based on the Java classpath. The tutorial examples pick up the log4j logging package and thus is configured via the log4j.properties file in the tutorial directory.
Try uncommenting the DEBUG line (and other example configurations) and re-running the adaptor. Further discussion on logging is beyond the scope of the tutorial - refer to log4j for more information on how to configure log4j.
The SpringAdaptor
can actually accept multiple config URLs. Typically this may be
favoured to re-use common spring components or to 'mix-in' environment specific properties
(test, uat, production, etc.). For example:
java org.openadaptor.spring.SpringAdaptor -config step01.xml -config uat.xml
The config url supports the following protocols:
The program accepts a bean argument, which identifies the Adaptor bean that it should run. If this is not specified then the program searches for a bean of type Adaptor, and if exactly one is found it defaults to using it. Hence the following is equivalent:
java org.openadaptor.spring.SpringAdaptor -config step01.xml java org.openadaptor.spring.SpringAdaptor -config step01.xml -bean Adaptor
The program can also accept a JMX port number argument, If this is specified then the helper class
will automatically start a JMX server and HTTP adaptor, and any named beans in the config that have
MBean
s will be automatically registered with the MBeanServer
. Note: standard
Spring mechanisms for JMX instrumentation may alternatively be used.
Try re-running the adaptor thus:
java org.openadaptor.spring.SpringAdaptor -config step01.xml -jmxport 9001
Some additonal log output relating to the JMX MBeanServer and the HTTP adaptor will be generated. The JMX HTTP interface may they be accessed via http://localhost:9001.
This adaptor step02.xml
extends the previous adaptor by adding a processor bean into the processing pipeline.
This processor converts the Map that the ServletReadConnector outputs into an XML document.
Here is the additional bean and the modified config for the Router
.
<bean id="Router" class="org.openadaptor.core.router.Router"> <property name="processors"> <list> <ref bean="Servlet"/> <ref bean="XMLConverter"/> <ref bean="Writer"/> </list> </property> </bean> <bean id="XMLConverter" class="org.openadaptor.auxil.convertor.xml.OrderedMapToXmlConvertor"> <property name="rootElementTag" value="Trade"/> </bean>
It may be started with the following (ensure the previous adaptor is not still running):
java org.openadaptor.spring.SpringAdaptor -config step02.xml
Again it may be exercised with the test webpage test.html.
In this example, the output from the Servlet is passed to the XMLConverter
bean.
This converts the map of data into an XML document (with a root element named "Trade"),
this output is then passed to the Writer
bean which writes the output to the
console (stdout) as before. The output should take the form of an XML Document similar to:
<?xml version="1.0" encoding="ISO-8859-1"?> <Trade><buySell>SELL</buySell><ticker>ABC</ticker><price>123.56</price></Trade>
This adaptor step03.xml extends the previous adaptor by adding another processor into the pipeline. This processor validates that XML against an XML schema file. Here is the additional bean and the modified config for the Pipeline bean:
<bean id="Router" class="org.openadaptor.core.router.Router"> <property name="processors"> <list> <ref bean="Servlet"/> <ref bean="XMLConverter"/> <ref bean="Validator"/> <ref bean="Writer"/> </list> </property> </bean> <bean id="Validator" class="org.openadaptor.auxil.processor.xml.XmlValidator"> <property name="schemaURL" value="schema.xsd"/> </bean>
The processor uses an XML Schema definition (contained in schema.xsd) to validate the XML.
It may be launched as follows:
java org.openadaptor.spring.SpringAdaptor -config step03.xml
Again it may be tested with the test webpage test.html.
If a numeric price is input, the adaptor should behave as previously.
However, if a non-numeric price is input, the adaptor will fail and exit.
This is because the XML validator will throw a processing exception, which will propagate back
to the ReadConnector
(the Servlet), and ultimately cause the adaptor to stop.
Note that OpenAdaptor components can additionally be configured to catch exceptions and process them,
thus enabling the adaptor to keep running. The Routing component (which provides simple routing) can be
configured with a WriteConnector
, any processing exceptions in the adaptor will
be caught and routed to the configured component. This adaptor
step03a.xml illustrates how this may be configured.
In this simple case exceptions are simply forwarded to a file Writer
and written to an
error file. The additional bean and the modified configuration is:
<bean id="Router" class="org.openadaptor.core.router.Router"> <property name="processors"> <list> <ref bean="Servlet"/> <ref bean="XMLConverter"/> <ref bean="Validator"/> <ref bean="Writer"/> </list> </property> <property name="exceptionProcessor" ref="ExceptionHandler"/> </bean> <bean id="ExceptionHandler" class="org.openadaptor.auxil.connector.iostream.writer.FileWriteConnector"> <property name="filename" value="output/puberror.txt"/> </bean>
Run this as in previous examples:
java org.openadaptor.spring.SpringAdaptor -config step03a.xml
If invalid input is supplied (via test.html) the invalid xml will be filtered out and written to the configured file (puberror.txt). Note that unlike in the previous example, the adaptor will not halt.
This adaptor step04.xml extends the previous adaptor (including
exception handler) by writing the output to a file instead of the console.
This can be trivially achieved by setting the filename
property of
the Writer
:
<bean id="Writer" class="org.openadaptor.auxil.connector.iostream.writer.FileWriteConnector"> <property name="filename" value="output/trades.xml"/> </bean>
It may be run as before:
java org.openadaptor.spring.SpringAdaptor -config step04.xml
Now, instead of outputing the information to the console, the adaptor will output the valid XML documents created from data input from test.html to the configured file.
This adaptor step05.xml extends the adaptor from step 3 to discard trades which have a ticker value of 'XXX'.
It is achieved by introducing a filter processor which uses the return value of a script to pass or discard (filter) data as it passes through:
<bean id="Router" class="org.openadaptor.core.router.Router"> <property name="processors"> <list> <ref bean="Servlet"/> <ref bean="TickerFilter"/> <ref bean="XMLConverter"/> <ref bean="Validator"/> <ref bean="Writer"/> </list> </property> <property name="exceptionProcessor" ref="ExceptionHandler"/> </bean> <bean id="TickerFilter" class="org.openadaptor.auxil.processor.script.ScriptFilterProcessor"> <property name="scriptProcessor"> <bean class="org.openadaptor.auxil.processor.script.ScriptProcessor"> <property name="script"> <value> <![CDATA[ //Return true if the ticker is 'XXX'; oa_data.get('ticker') == 'XXX'; ]]> </value> </property> </bean> </property> </bean>
It may be run as before:
java org.openadaptor.spring.SpringAdaptor -config step05.xml
This time, if the ticker 'XXX' is chosen in test.html, the adaptor will discard the data completely.
It is worth noting that the filter's location in the processing pipeline dictates that it acts upon the
Map
data as read in from the original servlet.
The script may be altered to, for example, only allow records with ticker 'XXX' by inverting the test (!=) in the script. The script itself may be as complex as desired. The filter only uses the final result value to determine whether to pass or fail the data record.
This adaptor step06.xml extends the previous adaptor by replacing
the FileWriteConnector
with a JMSWriteConnector
.
This connector will publishes the Trade XML onto a JMS queue.
To use this, a suitable JMS implementation is required.
The tutorial is designed to work with a default installation of the jBoss application server, which is free to download and should be trivial to install and run.
run.bat
or
run.sh
scripts provided in the jBoss bin dir.
jbossall-client.jar
from the jboss distribution
into the opendapator lib/3rdparty
dir
Additional beans for JNDI and JMS will be required, in addition to the JMSWriteConnector
.
These can be seen here:
<bean id="JndiConnection" class="org.openadaptor.auxil.connector.jndi.JNDIConnection"> <property name="initialContextFactory" value="org.jnp.interfaces.NamingContextFactory"/> <property name="providerUrl" value="jnp://localhost:1099"/> </bean> <bean id="JmsConnection" class="org.openadaptor.auxil.connector.jms.JMSConnection"> <property name="jndiConnection" ref="JndiConnection"/> <property name="connectionFactoryName" value="ConnectionFactory"/> </bean> <bean id="Writer" class="org.openadaptor.auxil.connector.jms.JMSWriteConnector"> <property name="destinationName" value="queue/testQueue"/> <property name="jmsConnection" ref="JmsConnection"/> </bean>
Launch the adaptor as before:
java org.openadaptor.spring.SpringAdaptor -config step06.xml
Now, each time (valid) trade info is submitted via test.html, the
adaptor will publish the XML documents to the configured JMS queue. To verify, adjust the
log4j.properties
file so that it logs OpenAdaptor code at DEBUG. Alternatively, subsequent
steps in the tutorial will create a second adaptor which will consume messages from the JMS queue.
This adaptor step07.xml illustrates how to subscribe to the JMS
queue. It contains a single read connector (JMSReadConnector
) and a single write connector
(FileWriteConnector
). Its function is simply to fetch messages from the queue and print them
to the console (stdout).
Note: As this example is intended to be used in conjunction with the previous example which serves as the JMS publisher, that example should already be running separately in its own command window or shell.
A new command window or shell should be created, and the initialisation steps from set up again followed in the new window. Once set up correctly, the subscriber may then be launched with:
java org.openadaptor.spring.SpringAdaptor -config step07.xml
When this adaptor starts, any trades that have previously been input via the publisher should appear on the console output (i.e. anything published to JMS via Step 6)
Additionally, any further trades that are input via the publisher test.html will continue to appear on the console whilst the subscriber is running.
The messages that were published to the queue from Step 6, should appear. This adaptor and the publisher (step 6) may be run concurrently. Everytime a test trade is input using the web page test.html the message should be received in the adaptor that is subscribing to the queue.
The JNDI and JMS connection beans are identical to those from the previous example. The router, reader and writer definitions are as follows:
<bean id="Router" class="org.openadaptor.core.router.Router"> <property name="processors"> <list> <ref bean="Reader"/> <ref bean="Writer"/> </list> </property> </bean> <bean id="Reader" class="org.openadaptor.auxil.connector.jms.JMSReadConnector"> <property name="destinationName" value="queue/testQueue"/> <property name="jmsConnection" ref="JmsConnection"/> <property name="transacted" value="true"/> </bean> <bean id="Writer" class="org.openadaptor.auxil.connector.iostream.writer.FileWriteConnector"/>
This adaptor step08.xml extends the previous example
to illustrate how the the retrieved XML data may be converted into Map
data. In addition,
the fields of interest are extracted and renamed (for later database insertion).
The XML conversion, modified routing, and script beans may be seen here:
<bean id="Router" class="org.openadaptor.core.router.Router"> <property name="processors"> <list> <ref bean="Reader"/> <ref bean="XmlToMap"/> <ref bean="Writer"/> </list> </property> </bean> <bean id="XmlToMap" class="org.openadaptor.auxil.convertor.xml.XmlToOrderedMapConvertor"/> </bean> <bean id="FormatterScript" class="org.openadaptor.auxil.processor.script.ScriptProcessor"> <property name="script"> <value> <![CDATA[ var trade=oa_data.get('Trade'); oa_data.put('SIDE',trade.get('buySell')); oa_data.put('STOCK',trade.get('ticker')); oa_data.put('PRICE',trade.get('price')); oa_data.remove('Trade'); //No longer needed ]]> </value> </property> </bean>
This adaptor step09.xml extends the previous example to output the resulting trade information into a database table via JDBC.
The tutorial was developed to use Hypersonic, a 100% Java light-weight database.
For this example, an instance of the Hypersonic database (with an appropriate schema) must be available. This is straightforward to achieve. From a command prompt execute the following:
cd example\tutorial\db java -classpath ..\..\..\lib\3rdparty\hsqldb.jar org.hsqldb.Server -database.0 hsql -dbname.0 xdb
cd example/tutorial/db java -classpath ../../../lib/3rdparty/hsqldb.jar org.hsqldb.Server -database.0 hsql -dbname.0 xdb
Once the Hypersonic database is ready, it should then be possible to run the example.
The corresponding changes from the previous step include configuration of the JDBC connection and a
JDBCWriteConnector
. These are shown here:
<bean id="JdbcConnection" class="org.openadaptor.auxil.connector.jdbc.JDBCConnection"> <property name="driver" value="org.hsqldb.jdbcDriver"/> <property name="url" value="jdbc:hsqldb:hsql://localhost/xdb"/> <property name="username" value="sa"/> <property name="password" value=""/> </bean> <bean id="Writer" class="org.openadaptor.auxil.connector.jdbc.writer.JDBCWriteConnector"> <property name="jdbcConnection" ref="JdbcConnection" /> <property name="writer"> <bean class="org.openadaptor.auxil.connector.jdbc.writer.map.MapTableWriter"> <property name="tableName" value="TRADE" /> </bean> </property> </bean>
Note that the router config doesn't need to change because the Writer
bean has simply been
replaced with an alternative configuration. To run it, ensure the previous version is not running
(but leave the JMS publisher from Step 6 running to allow data to be input):
java org.openadaptor.spring.SpringAdaptor -config step09.xml
The webpage test.html may again be used to inject data into the JMS queue. This adaptor will retrieve the messages, format the data and write it to the Hypersonic db. There are a couple of ways to verify the behaviour:
Or:
A Router
also permits more complex linkage between ReadConnector
s,
Processor
s and WriteConnector
s.
This example step10.xml extends the previous example to additionally store the trade information in a file of comma-separated entries.
The Router
configuration in this example is more complex, with the configuration of both
fan-out (one processor forwards to multiple downstream components), and of discard routing (alternative
routing of data which has been discarded by a filter):
<bean id="Router" class="org.openadaptor.core.router.Router"> <property name="processMap"> <map> <entry key-ref="Reader" value-ref="XmlToMap" /> <entry key-ref="XmlToMap" value-ref="FormatterScript" /> <entry key-ref="FormatterScript"> <list> <ref bean="Writer" /> <ref bean="BuySellFilter" /> </list> </entry> <entry key-ref="BuySellFilter" value-ref="BuyToCSV" /> <entry key-ref="BuyToCSV" value-ref="BuyWriter" /> <entry key-ref="SellToCSV" value-ref="SellWriter" /> </map> </property> <property name="discardMap"> <map> <entry key-ref="BuySellFilter" value-ref="SellToCSV" /> </map> </property> </bean>
Firstly this variation on the Router
configuration specifies a processMap
,
which is a map of source Component
s, and the downstream components to which they are
connected. This variant allows a single source component to forward to multiple destination components,
supplied as a list (see the FormatterScript
entry above).
Additionally, the discardMap
specifies routing information for data which would otherwise
be discarded by a filter; in the above example it's the newly added BuySellFilter
shown here:
<bean id="BuySellFilter" class="org.openadaptor.auxil.processor.script.ScriptFilterProcessor"> <property name="scriptProcessor"> <bean class="org.openadaptor.auxil.processor.script.ScriptProcessor"> <property name="script"> <value> <![CDATA[ oa_data.get('SIDE') != ('BUY'); //Keep only buys ]]> </value> </property> </bean> </property> </bean>
Again, to run it, ensure the previous version is not running (but leave the JMS publisher from Step 6 running to allow data to be input):
java org.openadaptor.spring.SpringAdaptor -config step10.xml
This step step11.xml extends the previous step to include a
somewhat contrived custom Processor
, to filter out illegal Buy/Sell requests.
This has custom code that is included as part of the tutorial - src/CustomBuySellValidator.java. The processor can be configured to either discard bad values, or to throw an exception.
The custom bean is configured as follows:
<bean id="CustomValidator" class="CustomBuySellValidator"> <property name="fieldName" value="SIDE" /> <property name="legalValues"> <list> <value>BUY</value> <value>SELL</value> </list> </property> <property name="discardBadValues" value="true"/> </bean>
It checks that the incoming Map
has one of the supplied values in the named field. If not,
it either discards the input, or throws an exception depending on the configured value of
discardBadValues
.
Before running the example, the custom code must be compiled (naturally this requires the availability of a suitable Java compiler - a JRE won't suffice). The following should be executed in a command shell which has the classpath appropriately setup as for the earlier steps:
javac -d . src\CustomProcessor.java
javac -d . src/CustomProcessor.java
This should create a Java class file called CustomProcessor.class in the tutorial directory, which should already be included on the classpath. To run the adaptor (ensuring that the adaptor from Step 10 has first been stopped):
java org.openadaptor.spring.SpringAdaptor -config step11.xml
This adaptor step12.xml modifies the adaptor from Step 6, in that it replaces the servlet input with a read connector which instead reads lines of input data from a file coupled to a processor which parses delimited fields from those lines.
Here is the replacement bean:
<bean id="FileReader" class="org.openadaptor.core.node.ReadNode"> <property name="connector"> <bean class="org.openadaptor.auxil.connector.iostream.reader.FileReadConnector"> <property name="filename" value="input/data.txt"/> <property name="dataReader"> <bean class="org.openadaptor.auxil.connector.iostream.reader.string.LineReader"/> </property> </bean> </property> <property name="processor"> <bean class="org.openadaptor.auxil.convertor.delimited.DelimitedStringToOrderedMapConvertor"> <property name="delimiter" value=","/> <property name="fieldNames"> <list> <value>buySell</value> <value>ticker</value> <value>price</value> </list> </property> </bean> </property> </bean>
The input is taken from input/data.txt. This example illustrates how file-based connectors can be used for both batch file processing and as part of testing. It is also intended to highlight some of the implementations within OpenAdaptor.
In the previous examples adaptors were assembled from ReadConnector
s, DataProcessor
s
and WriteConnectors
. In fact, the adaptor framework deals with implementations of
IMessageProcessor
and IRunnable
(see the JavaDoc for further information).
The classes that actually implement these interfaces are ReadNode
, ProcessorNode
and WriteNode
, respectively. These classes provide lifecycle, transaction, batching and
exception management capabilities for the components they generally contain.
Note: there is a component type that does not occur in previous examples - an
EnrichmentProcessor
, with a corresponding EnrichmentProcessorNode
.
For convenience, consistency, (and brevity in the configurations), Router
s wrap (a.k.a. "autobox")
ReadConnector
s, Processor
s and WriteConnector
s. However a connector
and processor may be coupled together directly by creating Node
beans explicitly, as we do
in this somewhat contrived case.
To launch the adaptor (assuming the previous publisher from Step 6 has been stopped), leave the subscriber adaptor from later steps running (to see the output from the JMS queue), and use:
java org.openadaptor.spring.SpringAdaptor -config step12.xml
Note that a FileWriteConnector
and Processor
could just as easily have
been assembled by chaining them in the Router
configuration - this example is purely
illustrative.
Exception handling refers to an adaptor's behaviour when one of its components raises a Java exception.
By default, adaptors are not configured to handle exceptions, meaning that when an exception is raised, it will be logged, and then propagate back to the call that instantiated OpenAdaptor. In practice, it means that the adaptor will halt with a non-zero exit status.
To configure exception handling, the exceptionProcessor
property should be configured within
the Router
. Any appropriate node (for example data processors, write connectors, can be used
as an exceptionProcessor
), though typically it may simply be a file writer connector:
<bean id="Router" class="org.openadaptor.core.router.Router"> <property name="processors"> ... </property> <property name="exceptionProcessor" ref="ExceptionHandler"/> </bean> <bean id="ExceptionHandler" class="org.openadaptor.auxil.connector.iostream.writer.FileWriteConnector"> <property name="filename" value="errors.log"/> </bean>
This straightforward approach will generally prove sufficient for the majority of adaptors.
It will cause all instances of java.lang.Exception
and subclasses thrown in any of an
adaptor's nodes to be caught and processed by the node configured as the ExceptionHandler
(here a FileWriteConnector
). When an exception is raised, it will be written to the log
file as configured. Then the adaptor is free to process subsequent data records.
If this basic exception handling isn't enough, OA provides alternatives for more fine-grained exception handling.
This example step14.xml demonstrates OpenAdaptor's compount exception handling capabilities.
The exceptionProcessor
can consist of any number of nodes which can fan out just like any
other nodes that participate in the normal processing flow. Such composite exceptionProcessor
s
however, should be assembled with care, and any user-defined implementations of OA interfaces that take
part in exception handling should be programmed defensively to try to avoid throwing exceptions themselves.
Exceptions thrown by the exceptionProcessor
will not be handled to avoid a potential
indefinite exception catch-rethrow cycle; they will not have any exception handling, meaning they will
be logged as indicated, and the adaptors in which they are raised will terminate.
Fan-out in the exception handler may be useful in situations when information about errors is to be sent to multiple destinations.
For example, an exception may need to be logged, but also generate an e-mail alert to application owners and issue a warning (via a chat mechanism) to the organisation's instant messaging system.
Consider this contrived example:
<bean id="Router" class="org.openadaptor.core.router.Router"> <property name="processors"> <!-- Normal flow path --> <entry key-ref="Reader" value-ref="Processor"/> <entry key-ref="Processor" value-ref="Writer"/> <!-- Exception processing path --> <entry key-ref="ExceptionHandlerProxy"> <list> <ref bean="ExceptionConverter"/> <ref bean="FileWriter"/> </list> </entry> <entry key-ref="ExceptionConverter" value-ref="XMLConverter"/> <entry key-ref="XMLConverter" value-ref="ConsoleWriter"/> </property> <property name="exceptionProcessor" ref="ExceptionHandlerProxy"/> </bean> <bean id="ExceptionHandlerProxy" class="org.openadaptor.core.exception.ExceptionHandlerProxy"/>
In the simple example above the org.openadaptor.core.exception.ExceptionHandlerProxy
is used
as an exception handling entry point that implements a fan-out and redirects handling to
ExceptionConverter
and FileWriter
. The ExceptionConverter
converts
exceptions to key-value pairs which are then sent to the XMLConverter
and then
printed to the console as XML. The exceptions are also written in parallel directly to a log file.
Defining an exceptionProcessor
on the Router
makes it the default handler for
all exception types. This means all exceptions will be handled by that exceptionProcessor
(perhaps consisting of a number of different nodes as shown in the preceding paragraph, but as a whole
one processor nonetheless). This behaviour can be fine-tuned.
Different exception processors can be set up to handle different exception types.
This may be achieved by defining the exceptionProcessor
as an
org.openadaptor.core.exception.ExceptionHandlerProxy
with a corresponding exception routing map,
as in this sample:
<bean id="Router" class="org.openadaptor.core.router.Router"> <property name="processors"> ... </property> <property name="exceptionProcessor" ref="ExceptionHandler"/> </bean> <bean id="ExceptionHandler" class="org.openadaptor.core.exception.ExceptionHandlerProxy"> <property name="exceptionMap"> <map> <entry key="org.openadaptor.core.exception.ProcessingException" value-ref="ProcessingExceptionLog"/> <entry key="java.lang.Exception" value-ref="OtherExceptionsLog"/> </map> </property> </bean> <bean id="ProcessingExceptionLog" class="org.openadaptor.auxil.connector.iostream.writer.FileWriteConnector"> <property name="filename" value="output/processingExceptions.log"/> </bean> <bean id="OtherExceptionsLog" class="org.openadaptor.auxil.connector.iostream.writer.FileWriteConnector"> <property name="filename" value="output/otherExceptions.log"/> </bean>
All ProcessingException
s (including subclasses) here will be written to the processor called
ProcessingExceptionLog
, all other exceptions will go to OtherExceptionsLog
.
The ExceptionHandler
has a property called exceptionMap
, which defines
how processing exceptions are handled. The value is a map of maps, where the key to the first map is
either a bean or a wildcard (as in the example above) and the value is a map between the exception and
a bean (or list of beans). In the example above this means that ProcessingException
s
thrown by any bean in the adaptor will be routed to the ErrorLog
bean; this is configured
in the example as a FileWriteConnector
.
Lastly, an exception handler conventionally called the Message Hospital (example step16.xml)
can be used to write exceptions to a
predefined table in a database (see Step 9: Writing to a Database for guidance on
how to setup an appopriate HSQL database for this example). Excepting that the Message Hospital respects the
format of the table it is
writing to, there is nothing special about it. It uses two standard components -
ExceptionToOrderedMapConverter
to convert exceptions to a map, and JDBCWriteConnector
to store the exceptions in the database.
The Message Hospital stores information such as exception class name, originating component name, exception
timestamp and - most importantly - the user data which caused the exception. The table can either be used for
informative purposes only, or as a staging area where the user data can be fixed and then read back to
OpenAdaptor for another attempt at processing. The HospitalReader
can be used to inject the
data from the Message Hospital back into an adaptor. Again, the HospitalReader
is nothing more
than a plain JDBCReadConnector
that reads from the hospital schema.
Openadaptor does not provide any ready-to-use tools for editing user data in the hospital at present.
Although any RDBMS can be used for the hospital, HospitalWriter
and HospitalReader
connectors assume certain structure of the table which needs to be created beforehand. Openadaptor provides
SQL scripts for Sybase and HSQL, though others should be straightforward to create.
<bean id="Router" class="org.openadaptor.core.router.Router"> <property name="processMap"> <map> <!-- Normal flow --> ... <!-- Processing exceptions --> <entry key-ref="ExceptionConvertor" value-ref="HospitalWriter"/> </map> </property> <property name="exceptionProcessor" ref="ExceptionConvertor"/> </bean> <bean id="ExceptionConvertor" class="org.openadaptor.auxil.convertor.exception.ExceptionToOrderedMapConvertor"/> <bean id="HospitalWriter" class="org.openadaptor.auxil.connector.jdbc.writer.JDBCWriteConnector"> <property name="jdbcConnection" ref="jdbcConnection" /> <property name="writer"> <bean class="org.openadaptor.auxil.connector.jdbc.writer.map.MapTableWriter"> <property name="tableName" value="OA_Exception" /> </bean> </property> </bean>
Here is how to run sample adaptor:
java org.openadaptor.spring.SpringAdaptor -config step16.xml
In the notes and info below
oa_data is the name of the payload object.
oa_metadata is the name of the metadata associated with the payload, oa_data.
Change to contents of oa_data and oa_metadata when an exception occurs
When an exception occurs, if there is an exception handler, then the component that receives the exception
receives is not the oa_data object being processed by the failing component but an instance of org.openadaptor.core.exception.MessageException object.
That MessageException object contains a number of useful pieces of information, including the exception, the
contents of oa_data as they were at the start of the failing component and the oa_metadata as it was when
the component failed. See the javadoc for org.openadaptor.core.exception.MessageException for more information.
The oa_metadata after an exception is usually empty, though it can contain the component path taken since
the exception if <property name="historyEnabled" value="true"/>
has been specified in the
Router bean.
Looking at the contents of oa_data after an Exception
The example peekingAtPreAndPostExceptionData.xml shows how
to look at the contents of the MessageException object (oa_data) and oa_metadata once an exception has been caught.
The example processes the payload through a script processor, displays the payload and metadata, amends
the data, throws an exception and then displays the post-exception payload and metadata.
Note, testing has shown that if the exception occurs within the same (script) component as the change
to the oa_data payload, the changes to the oa_data is not retained, but changes to oa_metadata are!
Examples of how to 'send exception to hospital database'
i.e. When an exception occurs write it to a database for capture/fix/retry.
Remembering that the contents of oa_data may be changed by components before the component that experiences
the exception, you have to consider whether the captured exception wants to be stored on the hospital database
with the possibly modified oa_data (as received by the failing component) or the original oa_data (the oa_data passed from the reader).
An example that shows the writing of the (possibly modified) oa_data as received by the failing component
to the hospital is sybase-exception-writer.xml
An example that shows the writing of the original oa_data as it was when it came out of the reader
to the hospital is writeCachedOaDataToHospital.xml
Faning out an exception after it has been caught
Step 15) Exception Map shows how to catch different types of exceptions and route them to different components based on the exception type.
But how do you cater for routing a single exception to different locations depending on the contents of the pre-exception oa_data?
Example postExceptionFiltering.xml shows one solution.
It caches the original oa_data early in the routing and interogates that data in the MessageException object using a script to filter what
gets routed where.
Exception handling was designed to be simple but flexible. For basic scenarios, all that users need to
do to enable exception handling is to set a file writer as an exceptionProcessor
on the
Router
.
There are however, mechanisms to set up more sophisticated exception handlers as users' needs and
experience with OpenAdaptor dictate. The mechanisms not mutually exclusive, and may be used in combination
to suit complex needs, e.g. to create an exceptionProcessor
consisting of several nodes,
some of which could branch off, include the Message Hospital and equally handle different exception
types differently by using the exceptionMap
.
This example (step19.xml) demonstrates how to populate a cache in OpenAdaptor with a enrichment processor and script.
The ability to populate a cache (once only) before processing the first message is sometimes required. The requirement could be a database lookup to get additional information, while processing the reader messages. This scenario could arise due to performance issues. If a database request is done for each message, sometimes fetching the same data for multiple messages then it may be better to cache the data once and then lookup on the cache instead of the database.
The "best practice" for solving this issue is demonstrated in the following example.
The functional background
In this example it's required to get additional information from a database. This additional information will be stored in an internal cache (hashmap). This internal cache have to be build once only. Each incoming message will be updated with information stored in the internal cache.
The following bullets specify the whole prcoess:
For more details take a close look into the configuration file (step19.xml). The follwing xml configuration snippet specify the route of the example adaptor:
<bean class="org.openadaptor.core.router.Router"> <property name="processMap"> <map> <entry key-ref="Reader" value-ref="MapConverter"/> <entry key-ref="MapConverter"> <list> <ref bean="Filter1"/> <ref bean="Filter2"/> </list> </entry> <entry key-ref="Filter1" value-ref="CounterpartyIdReplace"/> <entry key-ref="Filter2" value-ref="CounterpartyIdLookup"/> <entry key-ref="CounterpartyIdLookup" value-ref="BuildCache"/> <entry key-ref="BuildCache" value-ref="CounterpartyIdReplace"/> <entry key-ref="CounterpartyIdReplace" value-ref="ExtractMessageId"/> <entry key-ref="ExtractMessageId"> <list> <ref bean="FixedWidthConvertor"/> <ref bean="XmlConverter"/> </list> </entry> <entry key-ref="FixedWidthConvertor" value-ref="FixedWidthWriter"/> <entry key-ref="XmlConverter" value-ref="XMLWriter"/> </map> </property> <property name="exceptionProcessor" ref="ExceptionHandler"/> </bean>
The configuration above describes the adaptor behavior.
The first entry is the Reader
which reads a input file, each line as one message.
The read message is passed to the MapConverter
.
This result as a message (map) is passed to a chain of two script filter processor (Filter1
and Filter2
).
These script filter processors checks if the internal cache (hashmap) is empty or not.
Depending of the result the message is going to pass only one of both filters.
If the internal cache is empty the next entry of the route will be the CounterpartyIdLookup
entry (first time round),
else the next entry will be the CounterpartyIdReplace
entry (second and subsequent times round).
Coming from the CounterpartyIdLookup
(generic enrichment processor) this component does the database lookup and stores the data.
The next entry comming from the CounterpartyIdLookup is the BuildCache
entry.
This component builds the internal cache (hashmap) with the stored data from the database lookup and pass the message (map) to the CounterpartyIdReplace
.
For further messages the internal cache (hashmap) is built and the the filters pass the message also to the CounterpartyIdReplace
.
This components replace the message (map) value with the "PartyId" key, with the value of the data from the internal cache.
Adter this process the modified message (map) is passed to the further components, which fan out the message (map) in a text and xml file.
Here is how to run the sample adaptor:
java org.openadaptor.spring.SpringAdaptor -config step19.xml
This example relies on a hypersonic database running (http://www.hsqldb.org) to run
up the server make sure hsqldb.jar is in your class path and run the following...
Note: The command needs to be executed from a folder containing Hypersonic script and properties
(hsql.script and hsql.properties) located in /tutorial/db/caching
java org.hsqldb.Server -database.0 hsql -dbname.0 xdb
This tutorial is intended to provide an introduction to creating adaptors with OpenAdaptor. In the process, it creates multiple adaptors, illustrating how they might integrate with a Message Oriented Middleware (MOM) as part of an organisation's integration solution. The adaptors illustrate reading and writing multiple data formats, publishing and subscribing to JMS, interacting with databases, exception handling, and more.
Nonetheless, for a more comprehensive view of OpenAdaptor, readers are invited to view the numerous Spring
examples (in the spring/examples
section of the distribution, for a more focussed view on many of
the features of OpenAdaptor.
Additionally, the JavaDocs will also provide substantial information, particularly on bean properties of the various components, and on the various interfaces that are core to OpenAdaptor.


Tabs are connected using paths specified in the data-tab
attribute.
Multiple Tab Groups are sometimes needed so you can specify different groups.
If you have nested tabs, you can specify paths for them so that if a parent is selected it will open up all the children recursively.
The history of the page can also be taken into account when when navigating through the tabs.
A set of directives that work together to create tabs.
| Usage | Description | |
|---|---|---|
| .ui.tab |

 | This is the content that should be displayed when the tab is active. |
| [data-tab]:not(.ui.tab) |  | This is the trigger that will open a specific tab when clicked. |
| [tabContext] |

 | This is the context this tab can trigger in; it is best to have both the tabs and the triggers. |
Settings that can be added to the elements to change the functionality of the tabs.
| Default | Context | Description | |
|---|---|---|---|
| [tab] | [data-tab] | *required | any | The attribute that determines the tab content as well as the tab triggers. |
| .active | false | .ui.tab | [data-tab]:not(.ui.tab) | Determine if this is the default tab that should be opened if one is not selected. |
| [history] | false | [tabContext] | Whether the tab should be pushed to the url history of the application. |
Callbacks that can be added to the elements to add extra functionality on the events.
| Parameters | Context | Description | |
|---|---|---|---|
| (visible) | isVisible | .ui.tab | Event that will occur once the tab becomes visible. |


Ruby Enumerable Methods - Map
In Ruby, we sometimes deal with collections of information. Often times, we're storing these collections in containter objects like arrays and hashes. Sometimes, we want to alter the information in the existing array, sometimes we want a new array containing the altered information. The Ruby enumerable .map method is a powerful method that returns a new object containing the result of the object that .map was called upon.
.map and .each are very similar, but serve two different purposes. Whereas .each returns its receiver, having not saved anything to the object it was called upon, .map takes the output of object.map and stores it in a new container object. Check it out...
Here map has allowed us to keep our original input (the name strings) intact, while giving us a new container object with the updated values after mapping each input with the code block. This is especially useful if you need to reference original vs updated values, or you don't wish to use any methods that would permanently alter your original values.
Whereas you would typically use .each in iterative situations, and theng write the bulk of the method after passing it to an object, map handles the iteration as well as an operation as specified within the code block that follows. Depending on your purposes, this could save you a few steps, as help to keep your code short sweet and to the point.


He's the most intriguing trade prospect in a long time, maybe ever. Stamkos, who can be an unrestricted free agent after the season, has said he wants to stay with the Lightning. But the longer he goes without a new contract the better the chance he will be traded. The Lightning can't risk letting Stamkos walk in the offseason without getting anything of value in return.
There are so many variables to Stamkos' situation, particularly because he has a no-trade clause in his current contract.
Do the Lightning want to re-sign him? Can they afford to trade him if they make a push up the standings between now and the deadline? Where would Stamkos want to go? Does he even want to go anywhere in the middle of the season? Are the Toronto Maple Leafs, his hometown team, willing to trade assets for him, or wait until July 1 when all they need to get him is money?
There is more than enough drama in the Stamkos story to keep everyone interested. What makes it even better is where the Lightning will be on trade deadline day: Toronto.
Hamonic has requested a trade for personal reasons that have to do with his family. He is from St. Malo, Manitoba, about an hour drive south from Winnipeg.
Islanders coach Jack Capuano said in November, when Hamonic's trade request became public, that he has known about the defenseman's situation for several months. The fact the Islanders haven't traded him yet suggests they haven't found the right partner and terms.
Then again, trading Hamonic can't be easy for Islanders general manager Garth Snow, especially because defenseman Johnny Boychuk will be out 4-6 weeks with an upper-body injury sustained Dec. 31. The Islanders need Hamonic now more than ever to stay in the race in the Metropolitan Division.
Hamonic is an all-situation defenseman who leads the Islanders in ice time at 23:53 per game and is signed for four more seasons with an extremely reasonable salary cap charge of $3.857 million, according to war-on-ice.com.
Top Headlines
Anaheim Ducks
Arizona Coyotes
Boston Bruins
Buffalo Sabres
Calgary Flames
Carolina Hurricanes
Chicago Blackhawks
Colorado Avalanche
Columbus Blue Jackets
Dallas Stars
Detroit Red Wings
Edmonton Oilers
Florida Panthers
Los Angeles Kings
Minnesota Wild
Montreal Canadiens
Nashville Predators
New Jersey Devils
New York Islanders
New York Rangers
Philadelphia Flyers
Pittsburgh Penguins
Ottawa Senators
San Jose Sharks
St Louis Blues
Tampa Bay Lightning
Toronto Maple Leafs
Vancouver Canucks
Washington Capitals
Winnipeg Jets


Text to Speech
Enter Text:
Language:
Voice:
Loading Languages...
Loading Voices...
Effect:
none
Pitch
Speed
Duration
Echo
Reverb
Flanger
Phase
Bullhorn
Whisper
Level:


Water Treatment and Usage
Water Usage in 2006 (million m3)
The graph below demonstrates water usage from top 10 countries in 2006. The color represents the significance of data value (e.g., the deeper color means a higher number). It shows that United State has the highest water usage, while Japan has the second highest usage. Mexico has almost the same amount of water usage as that in Japan. The other five years demonstrate similar patterns.
Water Usage in 2007 (million m3)
The graph below demonstrates water usage from top 10 countries in 2007. The color represents the significance of data value (e.g., the deeper color means a higher number).
Water Usage in 2008 (million m3)
The graph below demonstrates water usage from top 10 countries in 2008. The color represents the significance of data value (e.g., the deeper color means a higher number).
Water Usage in 2009 (million m3)
The graph below demonstrates water usage from top 10 countries in 2009. The color represents the significance of data value (e.g., the deeper color means a higher number).
Water Usage in 2010 (million m3)
The graph below demonstrates water usage from top 10 countries in 2010. The color represents the significance of data value (e.g., the deeper color means a higher number).
Water Usage in 2011 (million m3)
The graph below demonstrates water usage from top 10 countries in 2011. The color represents the significance of data value (e.g., the deeper color means a higher number).


I have tried 2c-i twice now. My first experience with phens was 2c-d and I loved how sharp I felt. I did not expect to trip as hard as I did off of 2c-i. I took about 10mg the first time before I went to the mall with my daughter and my friends to buy costumes. I felt very much in control and I enjoyed being with my daughter and my friends.
So the next day I went to a day long concert and took about 20 mgs. Once again I felt incredibly happy to be with people, my friends my family. I felt at ease around police officers, even though we got kicked off of the subway and I was barefoot because of giving my sister my shoes.  My paranoia wasn't that high considering how hard I was tripping. Morphing, feeling like someone is behind me, trails, these were pretty intense. I never really had these type of effects unless I took at least three hits of acid. Oh and I am a very experienced tripper that's why I am so amazed at these effects.
But what was weird was that I wanted every guy I saw. Not want to have sex with them, but want them to want me. This pertained to both experiences. It has been said that I am very sexy and attractive so I often get alot of stares. This time I would stare back, and stare guys down and they would have to drop down first. I felt very beautiful, sexy and lustful. I was also surprisingly hungry. Starving in fact I spent about $80 at Red Lobster. The best part was the lack of hangover or 'chemical-ly' after effects. After taking LSD I always feel like I got ran over by a train loaded with chemical supplies.
I like 2c-i, even though I didn't have any huge revelations, I have found that I am more comfortable with myself and I feel more joyful and understanding of others. I noticed myself thinking about how other people acted and kind of became an amatuer sociologist. It gave me new perspective on several people. I benefited from it and I will do it again. I can handle trippier stuff because of my schizophrenia. Contrary to popular belief, I find psychedelics beneficial to my disease, but cannabis makes me absolutely out of control.
Thank you for your time.
Lissi
Experience Reports are the writings and opinions of the individual authors who submit them.
Some of the activities described are dangerous and/or illegal and none are recommended by Erowid.


Part 1
#1 Explain in your own words the point of the jitter plot.
A jitter point is used to make graphs of data-points that are clustered together in specific points, therefore getting a good idea of how many data points are identical.#2 Explain in your own words the point of figure 2-3. (I'm going to skip saying "in your own words" going forward, but I hope you get the point; I expect all answers to be in your own words).
Figure 2-3 show the how big difference can make the alignment of the bins, and how easily a dataset can be misunderstood. By having the bin that large we lose information in the visualization.#3 The author of DAOST (Philipp Janert) likes KDEs (and think they're better than histograms). And I don't. I didn't give a detailed explanation in the video, but now that works to my advantage. I'll ask you guys to think about this and thereby create an excellent exercise: When can KDEs be misleading?
KDE can be misleading because it makes the visualization smooth, thus it looks that the graph has many data-points, when it can have just a couple.#4 I've discussed some strengths of the CDF - there are also weaknesses. Janert writes "[CDFs] have less intuitive appeal than histograms of KDEs". What does he mean by that?
CDF may be less intuitive because it visualizes a different kind of data instead of showing the amplitude it shows the frequency of the data-points.#5 What is a Quantile plot? What is it good for.
Its a CDF plot with the axis switched, visualizing how often the data-points occur.#6 How is a Probability plot defined? What is it useful for? Have you ever seen one before?
Probability plot is defined as a technique to compare data sets and specifically if set of points of some data set behaves similar to for example: Gaussian distribution or other emperical observations. We did not specifically encounter plots related to probability plot.#7 One of the reasons I like DAOST is that Janert is so suspicious of mean, median, and related summary statistics. Explain why one has to be careful when using those - and why visualization of the full data is always better.
This is the problem that is described in Simpson's paradox. If the data is grouped the trends are different compared with the trends that are generated from the aggregated data. By visualizing the data this error can be spotted very easily.#8 I love box plots. When are box plots most useful?
Box plots are used a lot in visualizing stocks, a lot of information can be shown using this plot, each box containing the median, min&max observations and lower&upper quartile.#9 The book doesn't mention violin plots. Are those better or worse than box plots? Why?
The violin plots show more data than the box-plots, the violin plot shows the full distribution if the data.Part 2
#1 Looking at Fig 3-1, Janert writes "the data itself shows clearly that the amount of random noise in the data is small". What do you think his argument is?
Fig 3-1 shows a graph that follows a specific pattern which could follow a specific equation. To the human mind, the graph looks like a recognizable pattern without any anomalities not following the "bouncy" uniform path.#2 Can you think of a real-world example of a multivariate relationship like the one in Fig 3-3 (lower right panel)?
A real world example of a multivariate relationship could be when examining the marketing impact of an advertisement, let's say for a betting site, in terms of turnover generated from males depending on the number of times the ad has featured in television. One could introduce a new variable e.g. females and measure the impact between males and females exposed to the ad. In this example the variables would be independent of each other.#3 What are the two methods Janert mentions for smoothing noisy data? Can you think of other ones?
The two methods for smoothiung noisy data are called splines and LOESS.. Splines are used for smoothing globally while LOESS are particularly useful for smoothing local details. Other methods includes applying a filter to the data. e.g. low-pass filter or Gaussian filter.#4 What are residuals? Why is it a good idea to plot the residuals of your fit?
Residuals are the reminder of the smoothening process, by looking at the residuals one can verify if the smoothening is accurate, the residuals shouldn't have a trend it should be balanced, having both positive and negative values.#5 Explain in your own words the point of the smooth tube in figure 3-7.
It is just a double-check, or how the book says, gives confidence, of how accurate the smooth representation is.#6 What kind of relationships will a semi-log plot help you discover?
Semi-log plots are very good at discovering relative changes e.g. in the context of stock charts. The book includes an example of the usefulness of seeing exchange loss relatively to the invested amount of money.#7 What kind of functions will loglog plots help you see?
LogLog plots help in visualizing data that spans many orders of magnitude#8 What the h#ll is banking and what element from our visual system does it use to help us see patterns? What are potential problems with banking?
Banking is the process where the scale of the graph is changed so the slopes are ~ 45 degrees, this change makes it much easier for the human bran to perceive change. In some cases to achieve 45 degrees the graph needs to be skewed to much the graph becomes unreadable, or it has to be stacked.#9 I think figure 3-14 makes an important point about linear fits that is rarely made. What is it?
Figure 3-14 underlines the important point that the purpose of regression technique is to predict the values rather than to summarize the data, therefore making linear regression not a best fit but much more like a best predictor.#10 Summarize the discussion of Graphical Analysis and Presentation Graphics on pp. 68-69 in your own words.
Graphical Analysis is the step that comes before the Presentation Graphics. The analysis is the part where one figures out what the dataset is about, figuring out the trend that data data fallows, at this point the visualization and the message that the plot transmits doesn't have to be 100% clear, as the person who is making the visualizations knows what he is looking at. While the presentation is more about transmitting the data to the audience in the most intuitive and easy to grasp way. At this point its more important that the message gets transmitted to the audience and that everything is clear, and self explanatory.Part 3
This is a reproduction of http://iquantny.tumblr.com/post/129373499164/this-is-quantifiably-the-best-month-to-go-to-the as the first line
As part of a homework assignment, I ask my students at Pratt to go out and chart something of interest to them, and Katherine Savarese came back with a simple chart about farmers markets that I loved-it inspired this post.
You probably know that farmers markets are a staple across all five boroughs of New York City, but September happens to be a very special month. Why is that? Well, it turns out September is the month with the most unique types of fresh produce- forty three to be exact.
To show the current offerings, we charted how many types of fruits and vegetables are available by month, and showed if they were fresh or from storage.
If you miss the month of September, you might be behind the fruit curve, but there are plenty more months of vegetables left. The chart shows that fresh vegetables are available 9 out of 12 months, but fruit is only available 5 out of 12. Now if only we could quantify how delicious the produce is…
By pressing one of the four buttons: "Fresh Fruit", "Fresh Vegetable", "Storage Fruit", "Storage Vegetable", the data for the selected item is displayed over 12 months of the year.
Stacked Bar Chart
The same data for fresh/storage fruits and vegetables is displayed below in a stacked bar chart, giving the ability to the user to see all the data at once, compared to pressing buttons in the previous example.
Part 4
The Boston Marathon is an annual marathon held in the Greater Boston area in Massachusetts. The event is held on Patriots Day, the third Monday of April. The Boston Marathon has been held annually since 1897 and is the oldest annual marathon in the world.
All Data
Only Women
Only Men


var runtime.ticks
6 uses
runtime (current package)
runtime.go#L16: var ticks struct {
runtime.go#L24: r := int64(atomic.Load64(&ticks.val))
runtime.go#L28: lock(&ticks.lock)
runtime.go#L29: r = int64(ticks.val)
runtime.go#L43: atomic.Store64(&ticks.val, uint64(r))
runtime.go#L45: unlock(&ticks.lock)
The pages are generated with Golds v0.2.7-preview. (GOOS=darwin GOARCH=amd64)


The GUI allows user to control the tour by checkboxes for the variable selection, slider for the speed, and toggle boxes for pause.
| Version: | 0.4 |
| Depends: | R (≥ 2.14.0), tourr (≥ 0.5.1), colorspace, RGtk2, gWidgets, Cairo |
| Suggests: | rggobi, TeachingDemos, ggplot2, ash |
| Published: | 2012-06-18 |
| Author: | Bei, Dianne Cook, Hadley Wickham |
| Maintainer: | Dianne Cook <dicook at iastate.edu> |
| License: | MIT | GPL-2 |
| NeedsCompilation: | no |
| Citation: | tourrGui citation info |
| CRAN checks: | tourrGui results |
| Reference manual: | tourrGui.pdf |
| Package source: | tourrGui_0.4.tar.gz |
| Windows binaries: | r-devel: tourrGui_0.4.zip, r-release: tourrGui_0.4.zip, r-oldrel: tourrGui_0.4.zip |
| OS X binaries: | r-release: not available, r-oldrel: not available |
| Old sources: | tourrGui archive |
Please use the canonical form https://CRAN.R-project.org/package=tourrGui to link to this page.


odsMultiHighcharts
ods-widgets
This widget can display a multiple chart generated using the "Charts" interface of Opendatasoft.
<ods-multi-highcharts context="{CatalogContext}" chart-config="{string|Object}"> </ods-multi-highcharts>
Catalog Context to use
A complete configuration, as a object or as a base64 string. The parameter directly expects an angular expression, so a base64 string needs to be quoted.
(default: none)


open fun teleopInit(): Unit
This method is meant to be called at the beginning of each teleop program. If this is
overridden, the method should always run super.teleopInit()
. Please keep in mind it is
illegal to initialize servo positions in the init phase of teleop.


| admonitions.xsl |
1,203 |
25 Oct 2022 at 09:20 |
ndw |
ef850e6c |
Deploying to master from @ docbook/xslTNG@1da0ab5506429867a2966… |
| annotations.xsl |
2,291 |
25 Oct 2022 at 09:20 |
ndw |
ef850e6c |
Deploying to master from @ docbook/xslTNG@1da0ab5506429867a2966… |
| attributes.xsl |
14,688 |
25 Oct 2022 at 09:20 |
ndw |
ef850e6c |
Deploying to master from @ docbook/xslTNG@1da0ab5506429867a2966… |
| bibliography.xsl |
7,318 |
25 Oct 2022 at 09:20 |
ndw |
ef850e6c |
Deploying to master from @ docbook/xslTNG@1da0ab5506429867a2966… |
| blocks.xsl |
10,541 |
25 Oct 2022 at 09:20 |
ndw |
ef850e6c |
Deploying to master from @ docbook/xslTNG@1da0ab5506429867a2966… |
| chunk-cleanup.xsl |
27,822 |
25 Oct 2022 at 09:20 |
ndw |
ef850e6c |
Deploying to master from @ docbook/xslTNG@1da0ab5506429867a2966… |
| chunk-output.xsl |
9,483 |
25 Oct 2022 at 09:20 |
ndw |
ef850e6c |
Deploying to master from @ docbook/xslTNG@1da0ab5506429867a2966… |
| chunk.xsl |
14,751 |
25 Oct 2022 at 09:20 |
ndw |
ef850e6c |
Deploying to master from @ docbook/xslTNG@1da0ab5506429867a2966… |
| components.xsl |
1,419 |
25 Oct 2022 at 09:20 |
ndw |
ef850e6c |
Deploying to master from @ docbook/xslTNG@1da0ab5506429867a2966… |
| divisions.xsl |
929 |
25 Oct 2022 at 09:20 |
ndw |
ef850e6c |
Deploying to master from @ docbook/xslTNG@1da0ab5506429867a2966… |
| errors.xsl |
1,883 |
25 Oct 2022 at 09:20 |
ndw |
ef850e6c |
Deploying to master from @ docbook/xslTNG@1da0ab5506429867a2966… |
| footnotes.xsl |
5,789 |
25 Oct 2022 at 09:20 |
ndw |
ef850e6c |
Deploying to master from @ docbook/xslTNG@1da0ab5506429867a2966… |
| functions.xsl |
26,628 |
25 Oct 2022 at 09:20 |
ndw |
ef850e6c |
Deploying to master from @ docbook/xslTNG@1da0ab5506429867a2966… |
| gentext.xsl |
5,803 |
25 Oct 2022 at 09:20 |
ndw |
ef850e6c |
Deploying to master from @ docbook/xslTNG@1da0ab5506429867a2966… |
| glossary.xsl |
6,390 |
25 Oct 2022 at 09:20 |
ndw |
ef850e6c |
Deploying to master from @ docbook/xslTNG@1da0ab5506429867a2966… |
| head.xsl |
7,960 |
25 Oct 2022 at 09:20 |
ndw |
ef850e6c |
Deploying to master from @ docbook/xslTNG@1da0ab5506429867a2966… |
| highlight.xsl |
4,856 |
25 Oct 2022 at 09:20 |
ndw |
ef850e6c |
Deploying to master from @ docbook/xslTNG@1da0ab5506429867a2966… |
| index.xsl |
26,302 |
25 Oct 2022 at 09:20 |
ndw |
ef850e6c |
Deploying to master from @ docbook/xslTNG@1da0ab5506429867a2966… |
| info.xsl |
17,009 |
25 Oct 2022 at 09:20 |
ndw |
ef850e6c |
Deploying to master from @ docbook/xslTNG@1da0ab5506429867a2966… |
| inlines.xsl |
25,162 |
25 Oct 2022 at 09:20 |
ndw |
ef850e6c |
Deploying to master from @ docbook/xslTNG@1da0ab5506429867a2966… |
| links.xsl |
10,045 |
25 Oct 2022 at 09:20 |
ndw |
ef850e6c |
Deploying to master from @ docbook/xslTNG@1da0ab5506429867a2966… |
| lists.xsl |
21,326 |
25 Oct 2022 at 09:20 |
ndw |
ef850e6c |
Deploying to master from @ docbook/xslTNG@1da0ab5506429867a2966… |
| msgset.xsl |
1,590 |
25 Oct 2022 at 09:20 |
ndw |
ef850e6c |
Deploying to master from @ docbook/xslTNG@1da0ab5506429867a2966… |
| objects.xsl |
34,566 |
25 Oct 2022 at 09:20 |
ndw |
ef850e6c |
Deploying to master from @ docbook/xslTNG@1da0ab5506429867a2966… |
| profile.xsl |
12,400 |
25 Oct 2022 at 09:20 |
ndw |
ef850e6c |
Deploying to master from @ docbook/xslTNG@1da0ab5506429867a2966… |
| programming.xsl |
31,580 |
25 Oct 2022 at 09:20 |
ndw |
ef850e6c |
Deploying to master from @ docbook/xslTNG@1da0ab5506429867a2966… |
| publishers.xsl |
1,135 |
25 Oct 2022 at 09:20 |
ndw |
ef850e6c |
Deploying to master from @ docbook/xslTNG@1da0ab5506429867a2966… |
| refentry.xsl |
5,650 |
25 Oct 2022 at 09:20 |
ndw |
ef850e6c |
Deploying to master from @ docbook/xslTNG@1da0ab5506429867a2966… |
| sections.xsl |
3,947 |
25 Oct 2022 at 09:20 |
ndw |
ef850e6c |
Deploying to master from @ docbook/xslTNG@1da0ab5506429867a2966… |
| shared.xsl |
3,156 |
25 Oct 2022 at 09:20 |
ndw |
ef850e6c |
Deploying to master from @ docbook/xslTNG@1da0ab5506429867a2966… |
| space.xsl |
3,018 |
25 Oct 2022 at 09:20 |
ndw |
ef850e6c |
Deploying to master from @ docbook/xslTNG@1da0ab5506429867a2966… |
| tablecals.xsl |
43,917 |
25 Oct 2022 at 09:20 |
ndw |
ef850e6c |
Deploying to master from @ docbook/xslTNG@1da0ab5506429867a2966… |
| tablehtml.xsl |
3,434 |
25 Oct 2022 at 09:20 |
ndw |
ef850e6c |
Deploying to master from @ docbook/xslTNG@1da0ab5506429867a2966… |
| templates.xml |
19,215 |
25 Oct 2022 at 09:20 |
ndw |
ef850e6c |
Deploying to master from @ docbook/xslTNG@1da0ab5506429867a2966… |
| templates.xsl |
14,937 |
25 Oct 2022 at 09:20 |
ndw |
ef850e6c |
Deploying to master from @ docbook/xslTNG@1da0ab5506429867a2966… |
| titlepage.xsl |
2,650 |
25 Oct 2022 at 09:20 |
ndw |
ef850e6c |
Deploying to master from @ docbook/xslTNG@1da0ab5506429867a2966… |
| titles.xsl |
23,920 |
25 Oct 2022 at 09:20 |
ndw |
ef850e6c |
Deploying to master from @ docbook/xslTNG@1da0ab5506429867a2966… |
| toc.xsl |
15,791 |
25 Oct 2022 at 09:20 |
ndw |
ef850e6c |
Deploying to master from @ docbook/xslTNG@1da0ab5506429867a2966… |
| unhandled.xsl |
2,495 |
25 Oct 2022 at 09:20 |
ndw |
ef850e6c |
Deploying to master from @ docbook/xslTNG@1da0ab5506429867a2966… |
| units.xsl |
7,718 |
25 Oct 2022 at 09:20 |
ndw |
ef850e6c |
Deploying to master from @ docbook/xslTNG@1da0ab5506429867a2966… |
| variable.xsl |
10,514 |
25 Oct 2022 at 09:20 |
ndw |
ef850e6c |
Deploying to master from @ docbook/xslTNG@1da0ab5506429867a2966… |
| verbatim.xsl |
55,385 |
25 Oct 2022 at 09:20 |
ndw |
ef850e6c |
Deploying to master from @ docbook/xslTNG@1da0ab5506429867a2966… |
| xlink.xsl |
22,788 |
25 Oct 2022 at 09:20 |
ndw |
ef850e6c |
Deploying to master from @ docbook/xslTNG@1da0ab5506429867a2966… |
| xref.xsl |
17,571 |
25 Oct 2022 at 09:20 |
ndw |
ef850e6c |
Deploying to master from @ docbook/xslTNG@1da0ab5506429867a2966… |


{% include 'header.html' %} {% include 'nav.html' %}
Hi! I am a self-taught computer programmer and graduate student. I study at University of California, Berkeley as part of the MIMS (Masters of Information Management and Systems) program. I focus on UX Research and Cybersecurity and will graduate in May 2023.


Select this checkbox to have IntelliJ IDEA automatically reformat the expanded text according to the current style settings, defined on the Code Style page.


{% extends "base.html" %} {% block content %} Upload a PNG, JPG, JPEG, TIF, or TIFF (other version):
Image Name: Image Desc:


CATEGORIES
Gas cylinders
Gas cooker
Burner
Horse pipe
Gas cylinders
Gas cooker
Burner
Horse pipe
We wish to introduce our organization as a revalidator of L.P.G cylinders and specialized contractor for L.P.G tanks, installations, maintanance and timely delivery of LPG cylinders with the drastic decrease of fire hood and continuously rise in prices of the commodity and kerosine our organisation resorted to small business mostly in te informal settlement those who have have been stuck in the burden of using firehood and charcoal to start using our custom made gas cylinder for cooking, wich is affordable and healty at the same time therefore time saving and monetary saving for their businesse. Given our team experience in the industry coupled with the competence and expertise of our dedicated staff, we believe we have the capacity to handle any task or challenge that our customer may be faced with in the areas listed above. We also believe in sharing of ideas with our customers in areas of our speciality in order to enhance both businesses profile and quality of service while building our capacities. Our engagement of a certified Government Inspector in pressure vessels in the long term also ensures our customers and the general public is assured of safety and quality when dealing with us.
Our leasing services are best for you ,for there is no need to hustle for you to own a cylinder just sign a leasing contract with us, you will get a filled cylinder delivered free of charge to your door step.


Urban Grammar AI
research project
The project is thrilled to welcome Martin Fleischmann as the postdoctoral researcher who will work with me (Dani) for the next two years of the Fellowship. Here is a quick bio of Martin:
Martin Fleischmann is research associate in the Geographic Data Science Lab at the University of Liverpool and a member of the Urban Design Studies Unit at the University of Strathclyde. His research focuses on urban morphology and geographic data science focusing on quantitative analysis and classification of urban form, remote sensing and AI.
He is the author of momepy, the open source urban morphology measuring toolkit for Python and member of development teams of GeoPandas, the open source Python package for geographic data and PySAL, the Python library for spatial analysis.
momepy
Martin brings with him a theoretical background in urban morphology combined with a lot of experience in Python open source development around geospatial. There could not be a better combination for the project. As the postdoctoral researcher, Martin will be heavily involved in the implementation of much of the code required to develop the idea of Spatial Signatures, teach a computer to recognise them from satellite imagery, and use them to develop an Urban Grammar. At the same time, he is also joining the Geographic Data Science Lab and getting involved in its day to day life, participating in internal seminars, coordinating the Brown Bags series and, more generally, chipping in where possible to make the lab a great place to be part of.
Welcome Martin, this will be a fun ride!


Todo list
Will continue with the video
Will do the assignment
Will collect some ideas for ER diagram
CSS Selectors
Speedtest


Confusion matrix classes definition.
Number of predictions incorrectly predicted as negatives
Number of predictions incorrectly predicted as positives
Number of predictions correctly predicted as negatives
Number of predictions correctly predicted as positives
Generated using TypeDoc
Confusion matrix classes definition.


Seller :Yatra.com
Customizable 4 Nights
Agra(1) Bharatpur(1) Jaipur(2)
(Per Person on twin sharing)
EMI from Rs.614
Seller :Yatra.com
Customizable 4 Nights
Agra(1) Bharatpur(1) Jaipur(2)
(Per Person on twin sharing)
EMI from Rs.614
Seller :Yatra.com
Customizable 4 Nights
Agra(1) Bharatpur(1) Jaipur(2)
(Per Person on twin sharing)
EMI from Rs.614
Seller :Yatra.com
Customizable 4 Nights
Agra(1) Bharatpur(1) Jaipur(2)
(Per Person on twin sharing)
EMI from Rs.614


You must set up your Cluster Rendering network so that input to the Master Node is passed on to all Client nodes. To do this, you need to set up the Cluster Input Settings, and use a VRPN server to send that input to all Client nodes.
For all normal input, you must define input mapping in the Cluster Input Manager settings. This can be found in the Project setting > Cluster Input
menu.
| Property: | Function: |
|---|---|
| Size | Number of cluster input entries |
| Name | Unique name for this entry. Used in script to identify each entry. |
| Device Name | The name of the device which registered to VRPN server. |
| Server URL | The URL to connect to VRPN. Usually “localhost” if server started locally. |
| Index | The index/channel of the device this input entry suppose to connect to. |
| Type | The type of input. |
| - Button | Device that return a binary result of pressed or not pressed. |
| - Axis | Device is an analog axis that provides continuous value represented by a float. |
| - Tracker | Device that provide position and orientation values. |
| - CustomProvidedInput | A user customized input. |
All the entries entered into the Cluster Input Manager settings can be accessed from script via the ClusterInput class. The usage is much alike to Unity’s regular Input class; you can read the state of the input every frame with the API and act on it. For examples, see the ClusterInput Script Reference.
Whenever you have a project which reads input from the ClusterInput class, a VRPN server has to be present and running with the correct device connected. A VRPN device is identified by it’s name and url. Typically, the fully formed URL is something like TrackerA@localhost. TrackerA being the Device Name, localhost being the Server URL defined in the VRPN settting.
For more information about VRPN, visit this website: http://www.cs.unc.edu/Research/vrpn/
If your project does not use the ClusterInput class, and uses only Custom Input (see below), then you do not need a VRPN server.
You may want to integrate your input devices directly using the device manufacturer’s SDK, by writing a Unity C++ plugin. This plugin will then pass the values to the C# side of your project using interop services. In such a scenario, the inputs will not be syncrhonized to the rest of the cluster. To bridge this, ClusterInput provides a set of commands that can capture these custom input values and replicate them across the entire cluster.
To do this, you must create and configure an Input in the Cluster Input inspector and set the Type to "User Provided Input"
. On the master node of the cluster, poll for input values from the integrated device as usual and send them into these inputs using one of these APIs:
These values will then be available to rest of the cluster and also the master node.


{% extends 'rsa.html' %} {% block head %}
TinyRSA is a simplified implementation of the RSA cryptosystem for learning purposes.
It implements a simplified version of RSA with small keys so that it is easier to demistify the encryption scheme.
Click on the button below to generate keys and start encrypting !
This encryption scheme is weak with small keys, do not use for real applications.
Copyrights Guilhem Mizrahi 2019.


When the entries of a dictionary are put in order, does the order depend on the definition? No.
Should the compareTo()
method depend on the definiton?
No.
Fill in the blank to complete the compareTo()
method.
public int compareTo( Entry other ) { return getWord().compareTo( other.getWord() ); }
Another solution is:
public int compareTo( Entry other ) { return word.compareTo( other.word ); }
Here is a program that tests that the Entry
class works as expected.
import java.util.Arrays; class Entry implements Comparable<Entry> { . . . } class EntryTester { public static void main ( String[] args ) { Entry[] wordList = new Entry[10]; wordList[0] = new Entry( "WWW", "World Wide Web" ); wordList[1] = new Entry( "HTTP","Hypertext Transport Protocol" ); wordList[2] = new Entry( "DNS", "Domain Name System" ); wordList[3] = new Entry( "AWT", "Application Windowing Toolkit" ); wordList[4] = new Entry( "CPU", "Central Processing Unit" ); wordList[5] = new Entry( "RAM", "Random Access Memory" ); wordList[6] = new Entry( "URL", "Uniform Resource Locator" ); wordList[7] = new Entry( "GUI", "Graphical User Interface" ); wordList[8] = new Entry( "API", "Application Programming Interface" ); wordList[9] = new Entry( "ROM", "Read-only Memory" ); Arrays.sort( wordList ); for ( int j=0; j<wordList.length; j++ ) System.out.println( wordList[j].toString() ); } }
The program outputs:
API Application Programming Interface AWT Application Windowing Toolkit CPU Central Processing Unit DNS Domain Name System GUI Graphical User Interface HTTP Hypertext Transport Protocol RAM Random Access Memory ROM Read-only Memory URL Uniform Resource Locator WWW World Wide Web
The sort()
method used our compareTo()
to determine the order of the entries.
Must an array be in sorted order for it to be searched?


BEETLEJUICE A film review by Jeff Meyer Copyright 1988 Jeff Meyer
Well, I'd give BEETLEJUICE a rather high rating, but I have to point out something first. I've seen the director, Tim Burton's, other work, namely the Disney shorts "Vincent" and "Frankenweenie" (I exclude PEE WEE'S BIG ADVENTURE only because I think that film conformed to Paul Reuben's concept more than Burton's), and I have loved his sense of style and humor. It's silliness, but silliness that draws upon an almost cartoon- like attitude and a bright lampooning of certain cinematic fashions. "Vincent" had send-ups of the Corman/Price Edgar Allen Poe works, and "Frankenweenie" contained howlers from the James Whales FRANKENSTEIN films -- an impressive achievement, considering how well Mel Brooks mined this subject in YOUNG FRANKENSTEIN.
BEETLEJUICE is no exception; it's got more imagination and cleverness (in both visually and in the script) than anything else I've seen this year. I wouldn't highlight anything for you here, because it's too much fun to discover what Burton has done with ghost story conventions. For the most part, he tends to provide a pretty logical hierarchy for the land of the undead, though he leaves a few things (like the Sandworms and the fates of several characters) up in the air (ha-ha). Most of all, though, the film is a whirling dervish of visual gags; while the special effects are primitive at points, the imagination with which they are used makes up for any lack of technical shine. If you like Warner Bros. cartoons, I really think you'll like this; it contains a lot of features which are personally appealing but not universally appealing. Let us just say that if you liked his earlier short films, you'll like this one.
The last scene (Belafonte was never so good!) will last me for a long, long time -- what a bizarre, beautifully goofy fantasy! A big thumbs-up for me -- worth $6, or twice at $3.50.
----- Footnote: Saw BEETLEJUICE for the second time last night, and whatever reservations I had about the film in my previous film, scratch them. The sound was much better during this showing, and being able to comprehend more of the lines (especially Keaton's), I think the show was firing on all eight cylinders. A $5.00 film, easily, and my favorite movie so far this year.
Moriarty, aka Jeff Meyer INTERNET<EMAIL_ADDRESS>Manual UUCP: {uw-beaver, sun, microsoft}!fluke!moriarty
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


This map represents the integration of several much smarter peoples tools which include Bootstrap 3, MapBox, Leaflet, OSMBuildings, and the work of Brian McBride. I have taken some static maps off of the Denver Public Library’s website, gave them the good old GIS treatment and brought them to you!
Data
- The Sanborn Maps come from The DPL public map collection
- The Buildings are courtesy of OSM Buildings
- You can get imagery anywhere but this fine example is from ESRI.
- Modern roads from the fine folks at GeoIQ.
This is all here in good fun.
I have made every attempt to utilize best georeferencing practices but the original files were a bit of a mess to work with. Consequently some of the blocks are a little off but I think everyone gets the idea! It was a bit of a process to get the images and stitch them together which is why they are incomplete but still, History!
- Sanborn maps were created primarily to assess fire risk and they contain a wealth of knowledge.
- Since I am at my core incredibly cheap I am only allotted a certain amount of storage for the sanborn maps. I picked the CBD to show off all of the neat stuff you can do with these tools.
- The buildings here are from an open source Dataset so while they are quite good not everything has a name therefore the address is substituted. If that information wasn’t information it is null right now.
- I just grabbed a couple of tools to show off leaflet but there are countless more that could be in here.


Pipelines¶
Pipelines are the core of Megatron. Pipelines contain all your transformations and are what you ultimately use to generate outputs.
-
class
megatron.pipeline.
Pipeline
(inputs, outputs, name, version=None, storage=None)¶ Bases:
object
Holds the core computation graph that maps out Layers and manipulates data.
Parameters: - inputs (list of megatron.Node(s)) – input nodes of the Pipeline, where raw data is fed in.
- outputs (list of megatron.Node(s)) – output nodes of the Pipeline, the processed features.
- name (str) – unique identifying name of the Pipeline.
- version (str) – version tag for Pipeline’s cache table in the database.
- storage_db (Connection (defeault: 'sqlite')) – database connection to be used for input and output data storage.
-
inputs
¶ list of megatron.Node(s) – input nodes of the Pipeline, where raw data is fed in.
-
outputs
¶ list of megatron.Node(s) – output nodes of the Pipeline, the processed features.
-
path
¶ list of megatron.Nodes – full topological sort of Pipeline from inputs to outputs.
-
nodes
¶ dict of list of megatron.Node(s) – separation of Nodes by type.
-
eager
¶ bool – when True, TransformationNode outputs are to be calculated on creation. This is indicated by data being passed to an InputNode node as a function call.
-
name
¶ str – unique identifying name of the Pipeline.
-
version
¶ str – version tag for Pipeline’s cache table in the database.
-
storage
¶ Connection (defeault: None) – storage database for input and output data.
-
evaluate
(input_data)¶ Execute the metric Nodes in the Pipeline and get their results.
Parameters: input_data (dict of Numpy array) – the input data to be passed to InputNodes to begin execution.
-
evaluate_generator
(input_generator, steps)¶ Execute the metric Nodes in the Pipeline for each batch in a generator.
-
fit
(input_data, epochs=1)¶ Fit to input data and overwrite the metadata.
Parameters: - input_data (2-tuple of dict of Numpy array, Numpy array) – the input data to be passed to InputNodes to begin execution, and the index.
- epochs (int (default: 1)) – number of passes to perform over the data.
-
fit_generator
(input_generator, steps_per_epoch, epochs=1)¶ Fit to generator of input data batches. Execute partial_fit to each batch.
Parameters: - input_generator (generator of 2-tuple of dict of Numpy array and Numpy array) – generator that produces features and labels for each batch of data.
- steps_per_epoch (int) – number of batches that are considered one full epoch.
- epochs (int (default: 1)) – number of passes to perform over the data.
-
partial_fit
(input_data)¶ Fit to input data in an incremental way if possible.
Parameters: input_data (dict of Numpy array) – the input data to be passed to InputNodes to begin execution.
-
save
(save_dir)¶ Store the Pipeline and its learned metadata without the outputs on disk.
The filename will be {name of the pipeline}{version}.pkl.
Parameters: save_dir (str) – the desired location of the stored nodes, without the filename.
-
transform
(input_data, index_field=None, keep_data=False)¶ Execute the graph with some input data, get the output nodes’ data.
Parameters: - input_data (dict of Numpy array) – the input data to be passed to InputNodes to begin execution.
- index_field (str) – name of key from input_data to be used as index for storage and lookup.
- keep_data (bool) – whether to keep data in non-output nodes after execution. activating this flag can be useful for debugging.
-
transform_generator
(input_generator, steps, index=None)¶ Execute the graph with some input data from a generator, create generator.
Parameters: - input_generator (dict of Numpy array) – generator producing input data to be passed to Input nodes.
- steps (int) – number of batches to pull from input_generator before terminating.
-
megatron.pipeline.
load_pipeline
(filepath, storage_db=None)¶ Load a set of nodes from a given file, stored previously with Pipeline.save().
Parameters: - filepath (str) – the file from which to load a Pipeline.
- storage_db (Connection (default: sqlite3.connect('megatron_default.db'))) – database connection object to query for cached data from the Pipeline.