The Port of Astoria is situated 14 miles from the mouth of the majestic Columbia River which forms the boundary between Oregon and Washington State.
The Riverfront Trolley provides an interesting mode of transport to the downtown area with its many shops and restaurants. Alternatively, a paved River Walk extends along much of the river front between the marinas and downtown.
Position 46°11′20″N, 123°49′16″W.
It is advisable to make prior arrangements to clear in here.
When entering the Columbia River you must go to the West End Mooring Basin to clear with Customs and Border Protection (CBP). The West End Basin is located just before you go under the Astoria Megler Bridge and it is best if you go to the fuel dock just inside the basin.
Last updated November 2014.
Astoria has two marinas, both run by the Port Authority. The West Basin has more facilities and is busier than the East Basin, which is another mile and a half up the river.
Both marinas are less than a mile from historic downtown Astoria.
The currents in this powerful river can be very strong. If anchoring, take local advice on a suitable safe spot.
Last updated November 2014.


CSS Critters!!!
I wanted to document this idea before going back to the course.
What I imagine doing is creating a grid-template with 3 columns:
- The left and right would be (x)fr (variable fraction)
- The middle would be a minimum-width of 600px
What I would like to achieve with this is experimenting with responsive web design before getting into media queries. I probably will make mistakes. I mean, it's only natural! I don't think I have to wait to get into media queries to start experimenting however. This is just an attempt of collapsing white space.
Coca Cola: Plastics
Another thing I'd like to do here is practice a simple grid page displaying numerous Coca-Cola products. I read recently that they don't plan on ceasing their use of plastics. I think this would be a good way to let people know which products they're pushing, in case people would like to not support the mass-pollution of plastics and whatnot.


An airport is a location where aircraft such as fixed-wing aircraft, helicopters, and blimps take off and land. Aircraft may be stored or maintained at an airport. An airport consists of at least one surface such as a runway for a plane to take off and land, a helipad, or water for takeoffs and landings, and often includes buildings such as control towers, hangars and terminal buildings. Larger airports may have fixed base operator services, seaplane docks and ramps, air traffic control, passenger facilities such as restaurants and lounges, and emergency services. A military airport is known as an airbase or air station.


make easy your LG WebOS Project Using WebOS-Vue CLI
First of all, Thank you so much for VueJS framework and LG WebOS Command Line Interfaces.
You are awesome!
This CLI is a combinate of VueJS and LG WebOS project, with the aim of making it easier for developers to create LG WebOS applications with the Vue framework
This documentation is to help you, how to use wvue-cli
You must install somemany of bellow
npm i -g @aacassandra/wvue-cli
wvue create (app-name) wvue create (app-name) (app-domain)
wvue create mywebos wvue create mywebos com.mywebos.app
wvue run build
wvue run package
wvue run installer
wvue run launcher
Code released under the MIT License.
For more information about copyright and license check MIT.


Back to all Repositories
HTML
Markdown
Owner
TheOld-Crafters
Repository
PomaExpansion (master)
Issue Tracker
GitHub
Last successful Build
Status Badge
Builds
Download (.jar)
Downloads
Build Log
Source Code
GitHub
License
Release / Tag
Required Dependencies
commited on


Use the R console as an interactive learning environment. Users receive immediate feedback as they are guided through self-paced lessons in data science and R programming.
| Version: | 2.4.3 |
| Depends: | R (≥ 3.1.0) |
| Imports: | stringr, testthat (≥ 1.0.2), httr (≥ 1.1.0), yaml, RCurl, digest, tools, methods |
| Suggests: | stringi |
| Published: | 2017-03-02 |
| Author: | Sean Kross [aut, cre], Nick Carchedi [aut], Bill Bauer [aut], Gina Grdina [aut], Filip Schouwenaars [ctb], Wush Wu [ctb] |
| Maintainer: | Sean Kross <sean at seankross.com> |
| License: | MIT + file LICENSE |
| URL: | http://swirlstats.com |
| NeedsCompilation: | no |
| Materials: | README NEWS |
| CRAN checks: | swirl results |
| Reference manual: | swirl.pdf |
| Package source: | swirl_2.4.3.tar.gz |
| Windows binaries: | r-devel: swirl_2.4.3.zip, r-release: swirl_2.4.3.zip, r-oldrel: swirl_2.4.3.zip |
| OS X binaries: | r-release: swirl_2.4.3.tgz, r-oldrel: swirl_2.4.3.tgz |
| Old sources: | swirl archive |
| Reverse imports: | swirlify |
Please use the canonical form https://CRAN.R-project.org/package=swirl to link to this page.


Java SE 5.0 or later is now required to build
ServingXML
, and a Java 5.0 or later runtime environment
is now required to run ServingXML
. A number of libraries previously included to fill holes in Java 1.4, including concurrent.jar
,
xercesImpl.jar
, and xml-apis.jar
, are no longer required and have been dropped from the distribution.
Building ServingXML
requires Apache ANT,
which must now be installed separately, it is no longer included in the distribution.
The default XSLT transformer accompanying the download is
now the XSLT 2.0 transformer Saxon-B 9
, replacing the XSLT 1.0
transformer
Saxon 6.5.5
. This means that all XSLT stylesheets and
all XPATH expressions used in ServingXML will by default be processed with an XSLT 2 transformer. It is possible to configure ServingXML to use
a different transformer, in particular it is possible to revert to Saxon 6.5.5
.
The servingxml-fop extension now wraps Apache FOP version 0.94.
Previous documentation described running the ServingXML
console app with Java's -jar option. While still
supported, it is now more convenient to use the new batch file servingxml.bat
(Windows) or shell script
servingxml
(Unix/Linux).
These command files are based on ant
/fop
models, and build the classpath dynamically from the lib directory.
In previous versions of servingxml, the binary distribution was built in a directory named deploy
,
this has been changed to target
.
In recent versions of servingxml, the samples were placed directly under deploy
,
this has been changed to target/servingxml
.
In previous versions, the sx:fieldElementMap
element performed two functions:
it mapped single-valued fields to a single element, and multi-valued fields to a sequence of elements.
The problem is that the desired behaviour for mapping empty values differs in the two cases.
When mapping a single-valued field to an element, the desired behaviour is to preserve the
empty element. When mapping an empty multi-valued field to a sequence of elements, the
desired behaviour is not to emit any elements. For this reason, the
sx:fieldElementMap
element has been restricted to mapping to a single
element value, and a new sx:fieldElementSequenceMap
element has
been introduced to map to a sequence of elements.
| father_name | mother_name | children |
|---|---|---|
| Matthew | Sarah | |
| Scott | Damian;Janet;Paul |
| Version 0.7.* | Version 0.8.0 |
|---|---|
<sx:recordMapping id="families-to-xml-mapping"> <families> <sx:onRecord> <family> <sx:fieldElementMap field="father_name" element="father-name"/> <sx:fieldElementMap field="mother_name" element="mother-name"/> <children> <sx:fieldElementMap field="children" element="child"/> </children> </family> </sx:onRecord> </families> </sx:recordMapping> |
<sx:recordMapping id="families-to-xml-mapping"> <families> <sx:onRecord> <family> <sx:fieldElementMap field="father_name" element="father-name"/> <sx:fieldElementMap field="mother_name" element="mother-name"/> <children> <sx:fieldElementSequenceMap field="children" element="child"/> </children> </family> </sx:onRecord> </families> </sx:recordMapping> |
<families> <family> <father>Matthew</father> <mother>Sarah</mother> <children></children> </family> <family> <father>Scott</father> <children> <child>Damian</child> <child>Janet</child> <child>Paul</child> </children> </family> </families> |
<families> <family> <father>Matthew</father> <mother>Sarah</mother> <children></children> </family> <family> <father>Scott</father> <mother/> <children> <child>Damian</child> <child>Janet</child> <child>Paul</child> </children> </family> </families> |
Note that in the older version, the element corresponding to the empty mother
field value is suppressed.
In the 0.8.0 version, it is retained.
In previous versions, in sx:transform
sections, if no content was explicitly specified, the
content defaulted to parsing the default input stream, such as a file specified with the -i option on the console app.
As of version 0.8.0, an empty sx:document
element must be specified to achieve this
result, otherwise content defaults to an empty document. In fact, almost all of the examples in previous ServingXML
distributions already used an empty sx:document
element, the only exceptions being the
invoice examples in the XML-to-XML exceptions, these needed to be modified as shown below.
| Version 0.7.* | Version 0.8.0 |
|---|---|
<sx:service id="invoices"> <sx:transform> <!-- Here we extract a document subtree from the SAX stream --> <sx:processSubtree path="/inv:invoices/inv:invoice"> <sx:transform> ... </sx:transform> </sx:processSubtree> </sx:transform> </sx:service> |
<sx:service id="invoices"> <sx:transform> <sx:document/> <!-- Here we extract a document subtree from the SAX stream --> <sx:processSubtree path="/inv:invoices/inv:invoice"> <sx:transform> ... </sx:transform> </sx:processSubtree> </sx:transform> </sx:service> |
Like previous versions, 0.8.0 allows you to use an
sx:processSubtree
element to process subtrees of an XML
document, and to serialize the subtrees as individual XML files. Previous
versions, however, allowed you to simultanously output the entire XML file
by enclosing the whole thing inside an sx:serialize
element, because the original SAX events flowed through the
sx:processSubtree
element. In 0.8.0, this is no longer
the case, and to achieve the same effect you need to wrap the
sx:processSubtree
element inside an
sx:tagTee
element, as shown below.
| Version 0.7.* | Version 0.8.0 |
|---|---|
<sx:service id="books"> <sx:serialize> <sx:transform> <sx:content ref="books"/> <sx:processSubtree path="/myns:books/myns:book"> <sx:parameter name="isbn" select="myns:isbn"/> <sx:serialize> <sx:xsltSerializer> <sx:fileSink directory="output" file="book-{$isbn}.xml"/> </sx:xsltSerializer> </sx:serialize> </sx:processSubtree> </sx:transform> </sx:serialize> </sx:service> |
<sx:service id="books"> <sx:serialize> <sx:transform> <sx:content ref="books"/> <sx:tagTee> <sx:processSubtree path="/myns:books/myns:book"> <sx:parameter name="isbn" select="myns:isbn"/> <sx:serialize> <sx:xsltSerializer> <sx:fileSink directory="output" file="book-{$isbn}.xml"/> </sx:xsltSerializer> </sx:serialize> </sx:processSubtree> </sx:tagTee> </sx:transform> </sx:serialize> </sx:service> |
The 0.8.0 behaviour is that the output of sx:processSubtree
is whatever tags are written in its content to the default SAX sink. In the
example above, that is none, because all the tags are written to explicitly
specified files. But if no explicit output is specified, the subtrees
themselves will be written to the default SAX sink. Then, if there is an
enclosing sx:wrap
element, the subtrees will be aggregated
and output as a single XML document, with new wrapping tags. See the XML-to-XML
example "Extracting subtrees and wrapping them in containing tags" for more
about the new sx:wrap
element.
Up to version 0.6.5, the sx:innerGroup
and sx:outerGroup
elements took sx:startGroup
and sx:endGroup
child elements to
control breaking behaviour, these elements were deprecated in the 0.6.5 release and replaced by
startTest
and endTest
attributes.
As of version 0.8.0, sx:startGroup
and sx:endGroup
have been
removed altogether.
| Pre 0.6.5 versions | Version 0.8.0 |
|---|---|
<sx:outerGroup> <sx:startGroup test="sx:previous//record-type='BFH01'"/> <sx:endGroup test="sx:next//record-type='BFT99'"/> <!-- group content --> </sx:outerGroup> |
<sx:outerGroup startTest="sx:previous//record-type='BFH01'" endTest="sx:current//record-type='BFT99'"> <!-- group content --> </sx:outerGroup> |
sx:regexFieldCriteria
has been renamed to sx:fieldRestriction
,
and its attribute match
has been renamed to pattern
.
For backwards compatability, the old names are still allowed, but deprecated..
sx:recordTest
has been renamed to sx:recordRestriction
.
For backwards compatability, the old name is still allowed, but deprecated..
| Version 0.7.* | Version 0.8.0 |
|---|---|
<sx:restrictRecordFilter> <sx:regexFieldCriteria field="name" match="books.*[.]txt"/> </sx:restrictRecordFilter> |
<sx:restrictRecordFilter> <sx:fieldRestriction field="name" pattern="books.*[.]txt"/> </sx:restrictRecordFilter> |
<sx:restrictRecordFilter> <sx:recordTest recordType="persons"/> </sx:restrictRecordFilter> |
<sx:restrictRecordFilter> <sx:recordRestriction recordType="persons"/> </sx:restrictRecordFilter> |
sx:removeEmptyElementFilter
has been renamed to sx:removeEmptyElements
.
For backwards compatability, the old name is still allowed, but deprecated..
| Version 0.7.* | Version 0.8.0 |
|---|---|
<sx:transform> <sx:content ref="families"/> <sx:removeEmptyElementFilter elements="children"/> </sx:transform> |
<sx:transform> <sx:content ref="families"/> <sx:removeEmptyElements elements="children"/> </sx:transform> |
sx:directoryReader
and
edt::ftpDirectoryReader
, the field
parentDir
has been renamed to
parentDirectory
.
For backwards compatability, the old name is still retained, but deprecated..
| Version 0.7.* | Version 0.8.0 |
|---|---|
<sx:recordStream> <sx:directoryReader directory="data"/> <sx:processRecord> <sx:recordStream> <sx:flatFileReader> <sx:fileSource directory="{parentDirectory}" file="{name}"/> |
<sx:recordStream> <sx:directoryReader directory="data"/> <sx:processRecord> <sx:recordStream> <sx:flatFileReader> <sx:fileSource directory="{parentDirectory}" file="{name}"/> |
sx:wrap
has been renamed to
sx:nestedContent
(since 0.8.1.) For backwards
compatability, the old name is still allowed, but deprecated.
| Version 0.7.* | Version 0.8.0 |
|---|---|
<sx:recordMapping id="personsAddressesMapping"> <Persons-Addresses> <sx:wrap> <sx:recordContent> <sx:flatFileReader ref="personsReader"/> <sx:recordMapping ref="personsMapping"/> </sx:recordContent> </sx:wrap> <sx:wrap> <sx:recordContent> <sx:flatFileReader ref="personsReader"/> <sx:recordMapping ref="addressesMapping"/> </sx:recordContent> </sx:wrap> </Persons-Addresses> </sx:recordMapping> |
<sx:recordMapping id="personsAddressesMapping"> <Persons-Addresses> <sx:nestedContent> <sx:recordContent> <sx:flatFileReader ref="personsReader"/> <sx:recordMapping ref="personsMapping"/> </sx:recordContent> <sx:recordContent> <sx:flatFileReader ref="personsReader"/> <sx:recordMapping ref="addressesMapping"/> </sx:recordContent> </sx:nestedContent> </Persons-Addresses> </sx:recordMapping> |
yes
|no
,
that has been changed to true
|false
. For backwards compatability, yes
|no
are still allowed, but deprecated.
| Version 0.7.* | Version 0.8.0 |
|---|---|
<sx:delimitedField name="name" trimLeading="yes"/> |
<sx:delimitedField name="name" trimLeading="true"/> |
<edt:ftpDirectoryReader remoteDirectory="." recurse="yes" maxItems="10"> |
<edt:ftpDirectoryReader remoteDirectory="." recurse="true" maxItems="10"> |
<sx:sqlQuery recordType="foo" trim="yes"> |
<sx:sqlQuery recordType="foo" trim="true"> |
<sx:flatRecordType name="invoice" omitFinalRepeatDelimiter="no"> |
<sx:flatRecordType name="invoice" omitFinalRepeatDelimiter="false"> |
Note that in the sx:outputProperty elements that supply output property values to the XSLT serializer, the XSLT names are used so it's still, for example,
<sx:xsltSerializer> <sx:outputProperty name="indent" value="yes"/> </sx:xsltSerializer>
The two most noticable changes to the source code are as follows:
Methods that previously took the three arguments
ServiceContext context, Record parameters, Flow flow
now take only two
ServiceContext context, Flow flow
The ServingXmlException
now extends RuntimeException
, and method signatures no longer
have explicit throw statements for ServingXmlException
.
Parameters are inherently associated with the flow
value, they must travel together, and passing them separately
means that code that buffers flow
values must really buffer the pair parameters, flow
. This code
becomes simpler and less error prone by moving parameters
inside flow
,
and making them accessible with a getParameters
method.
Regarding the change of ServingXmlException
from a checked exception to a RuntimeException
, the author of
this software has become convinced by the arguments of
Java's checked exceptions were a mistake ,
Exceptional Java,
Exception Safe Java and elsewhere
that making ServingXMLException
a checked exception was a mistake. The biggest problem was when ServingXMLException
had to be thrown from within a Java
library callback method such as compare
.
| Version 0.7.* | Version 0.8.0 |
|---|---|
import com.servingxml.io.flow.Flow; import com.servingxml.io.flow.FlowImpl; |
import com.servingxml.app.Flow; import com.servingxml.app.FlowImpl; |
Flow flow = new FlowImpl(defaultStreamSource, defaultStreamSink); |
Flow flow = new FlowImpl(parameters, defaultStreamSource, defaultStreamSink); |
service.execute(context, parameters, flow); |
service.execute(context, flow); |
| Version 0.7.* | Version 0.8.0 |
|---|---|
public void startRecordStream(ServiceContext context, Record parameters, Flow flow) throws ServingXmlException |
public void startRecordStream(ServiceContext context, Flow flow) |
public void writeRecord(ServiceContext context, Record parameters, Flow flow) throws ServingXmlException |
public void writeRecord(ServiceContext context, Flow flow) |
public void writeRecord(ServiceContext context, Record parameters, Flow flow, Record record) throws ServingXmlException | |
public void endRecordStream(ServiceContext context, Record parameters, Flow flow) throws ServingXmlException |
public void endRecordStream(ServiceContext context, Flow flow) |
| Version 0.7.* | Version 0.8.0 |
|---|---|
public class HotRecordFilter extends AbstractRecordFilter { public void writeRecord(ServiceContext context, Record parameters, Flow flow, Record record) throws ServingXmlException { ... super.writeRecord(context, parameters, flow, newRecord); } |
public class HotRecordFilter extends AbstractRecordFilter { public void writeRecord(ServiceContext context, Flow flow) { Record record = flow.getRecord(); Record parameters = flow.getParameters(); ... Flow newFlow = flow.replaceRecord(context, record); super.writeRecord(context, newFlow); } |


Improved train services for Shropshire routes
by Lucy TodmanRail passengers will have more choice of trains on a Sunday following a shake-up of timetables.
Transport for Wales is launching a new timetable on December 15.
Most Marches services have had stops removed between Shrewsbury and Crewe, and these have been replaced by a Shrewsbury to Crewe local shuttle service which will see trains increase from nine to 16.
In addition, extra stopping services between Crewe and Shrewsbury will operate which will give people in Shropshire and Cheshire a significant number of new services when travelling on a Sunday.
The Shrewsbury to Aberystwyth service increases from 16 trains a day to 21.
On the North Wales Coast, additional trains which run over the summer, will now be in service all year around, giving customers greater consistency of service.
Fantastic
Customer experience director for Transport for Wales, Colin Lea, said: “We’ve committed to giving customers the service they deserve on a Sunday and are delighted to be able to make these improvements.
"Some lines which never had a Sunday service before, will now be connected, giving greater leisure and economic benefits to so many areas.
“A huge amount of hard work has gone into developing this timetable for our customers.
"We’ve seen some fantastic collaboration with our partners in Network Rail in securing access for earlier and later services, by moving planned maintenance times and I’d like to thank all involved for their hard work.”
James Price, chief executive for Transport for Wales said: “This significant increase in Sunday services is an important commitment that we made when we launched our new rail service over a year ago, and follows the successful launch of our May 2019 timetable, where we introduced direct services between Liverpool and Wrexham for the first time in decades.
“We hope that our customers and potential customers will welcome these services as an important step in building a transport network that the people of Wales can be truly proud of.”
The confirmation of the extra Sunday services, follows Transport for Wales’s announcement about increased capacity for weekday services from this December.


Did Oyo inherit N1.3b IGR? - The Nation Newspaper
Justina Asishana
News reports on November 5, claimed that Oyo State’s Internally Generated Revenue (IGR) rose from an average of N1.2 billion and N1.3 billion to N2.7 billion in the month of October.
The Chairman of the Oyo State Internal Revenue Service (OYIRS), Aremo John Adeleke who spoke during a visit from a group of individuals under the aegis of “Friends of Seyi Makinde” in Oyo state said that the Oyo State Internally Generated Revenue (IGR) for October rose to about N2.7billion as he added that it was a clear departure from between N1.2 to N1.3 billion monthly IGR inherited from the previous administration.
“…We are bringing about a revolution in revenue generation activities of Oyo State. Oyo today has moved beyond the miasma of revenue of between N1.2billion and N1.3billion per month in IGR.
“I am happy to inform you that last month, our IGR was N2.7billion and we intend to keep on in this trajectory…”
What is Internally Generated Revenue (IGR)
Internally Generated Revenue (IGR) is the revenue that state governments generate within their states. It involves taxes and levies collected from all sectors. The IGR is usually the calculation of PAYE, road taxes, revenue from Ministries, Departments and Agencies and other taxes collected from businesses, markets, companies and organizations.
Verification
The Internally Generated Revenue (IGR) of Oyo state gotten from the National Bureau of Statistics (NBS) revealed that the average IGR generated in Oyo state from 2017 to the first quarter of 2019 showed that Oyo state was N1.3 billion.
Although the National Bureau of Statistics did not provide monthly IGR information, the average of the quarterly IGR showed that the least average generated by Oyo state from 2017 to the first quarter of 2018 is N1.3 billion.
The IGR for 2017 was N18,879,084,134 which places the average IGR made monthly at N1.5 billion. In the first quarter of 2018, N5,405,584,026 was generated putting the average monthly at N1.3 billion.
The IGR generated in the second quarter of 2018 was N6,974,296,229 placing the average IGR monthly at N1.7 billion while the IGR generated in the third quarter was N5,882,490,179 placing the monthly average IGR at N1.4 billion monthly.
Meanwhile, Governor Seyi Makinde took over the government of Oyo state on May 29, 2019, which is after the first quarter of 2019.
Data on the IGR generated in Oyo state from the first and second quarters of 2019 showed N14,060,685,978 of which an average monthly showed that N1.7 billion was generated.
Conclusion
Before May 29,2019, which was the day the new administration of Oyo state Governor, Seyi Makinde, data received from the National Bureau of Statistics showed that the least average of Oyo state Internally Generated Revenue before Governor Seyi Makinde’s administration was N1.3 billion.
- This fact-check was done by a Dubawa Fact-checking Fellow in collaboration with The Nation.


FechaDeCreacion: 2018-01-10T16:24:49.586Z
EpisodiosDondeAparece: ['https://rickandmortyapi.com/api/episode/2', 'https://rickandmortyapi.com/api/episode/7', 'https://rickandmortyapi.com/api/episode/10', 'https://rickandmortyapi.com/api/episode/15', 'https://rickandmortyapi.com/api/episode/16', 'https://rickandmortyapi.com/api/episode/24', 'https://rickandmortyapi.com/api/episode/29', 'https://rickandmortyapi.com/api/episode/30']
NumeroEpisodiosDondeAparece: ['2', '7', '10', '15', '16', '24', '29', '30']
Genero: Male
Id_Personaje: 329
Imagen: https://rickandmortyapi.com/api/character/avatar/329.jpeg
Location_Name: unknown
Location_URL:
Nombre: Snuffles (Snowball)
Origen_Name: Earth (C-137)
Origen_URL: https://rickandmortyapi.com/api/location/1
Especie: Animal
Status: Alive
Tipo: Intelligent dog
URL: https://rickandmortyapi.com/api/character/329


Created by Patrick Booth / @motleymentor
| Computer Science & Engineering, Math, Music | |
| Computer and Automation Systems, Robotics | |
| Data Acquisition, Engine Control Simulations |
"Giving Every Student an Opportunity"
CS is a “new basic” skill necessary for
economic opportunity and social mobility.
"Workers of all kinds need to be able to figure out how to break a big problem into smaller pieces and identify the right steps to solve it."
> $4 billion available from federal, institutional, and philothropic sources.
"An impatience with irresolution."
Students have lack of initiative, perseverance, and retention, aversion to word problems, and eargerness for formulas.
Conditioning students to unrealistic
problems without purpose.
"What's the point of Hello World?"
For Inspiration and Recognition of Science and Technology
“...to show students of every age that science, technology, and problem-solving are not only fun and rewarding, but are proven paths to successful careers and a bright future for us all.” |
| Pre-season | Workshops |
| Build season | Development |
| Competitions | Operation |
| Off-season | Demos, Experiments, ... |
|
Languages
C++ / Java
LabView |
Resources |
Task: Pick up a ball and fire it autonomously.
Dell: Tap F12
HP: Tap F9
Lenovo: Tap F12
Apple Mac: Hold Option
Others: Try tapping Esc, F1-12,
or Enter when the machine first starts
|
Starting Up 1. Open FRCSim Ctrl+Alt+T frcsim cte-stem.world 2. Open sim_ds Shift+Ctrl+T sim_ds 3. Open eclipse Shift+Ctrl+T eclipse |
Running 1. Run Code Eclipse: Run --> Run As --> Simulation - or - Alt+R, S, 2 2. Enable Robot sim_ds: Autonomous Enable 3. frcsim: Watch! |
Issues Re-pose Model frcsim: Ctrl+Shift+R New Code Eclipse: Click Terminate Re-run No Response sim_ds: Restart |
Improve understanding and retention by building purpose.
Build purpose using a challenge as a framework.
Use the framework to lead students through formulating core concepts when they are eager to learn them.
Created by Patrick Booth / @motleymentor


Details
-
Type: Bug
-
Status: Open
-
Priority: Major
-
Resolution: Unresolved
-
Affects Version/s: None
-
Fix Version/s: None
-
Component/s: None
-
Labels:None
-
Number of attachments :
Description
fate I can gve you another example!
fate (on client): Exception in thread "main" java.lang.reflect.UndeclaredThrowableException
fate at $Proxy0.initialize(Unknown Source)
dan but if they don't have control of the server, how would the stack trace help the client?
fate at Test.main(Test.java:22)
fate then: Caused by: java.lang.InstantiationException: com.opensymphony.workflow.InvalidRoleException
fate Caused by: org.codehaus.xfire.fault.XFireFault: Couldn't instantiate service.
fate at org.codehaus.xfire.aegis.type.basic.BeanType.readObject(BeanType.java:99)
fate at org.codehaus.xfire.aegis.AegisBindingProvider.readParameter(AegisBindingProvider.java:131)
fate at java.lang.Class.newInstance0(Class.java:293)
fate on the server, on the other hand, we have:
fate WARNING: Error invoking service.
fate com.opensymphony.workflow.InvalidRoleException: You are restricted from initializing this workflow
fate at com.opensymphony.workflow.AbstractWorkflow.initialize(AbstractWorkflow.java:605)
fate at com.opensymphony.workflow.soap.BasicSOAPWorkflow.initialize(BasicSOAPWorkflow.java:105)
fate oh losing trace is fine, I'm bitching about losing the message
dan ok, that trace is a bad one
dan InvalidRoleException needs a default constructor
fate also, the undeclared exception is wrong, since InvalidRoleException is a subclass of WorkflowException
fate which is declared
dan or BeanType needs to be fixed
dan good point
Issue Links
- depends upon
-
XFIRE-35 Aegis needs to handle Polymorphic relationships
To allow overridden types we need to add some methods to BindingProvider to read/write objects without the MessagePart information. Then the CustomFaultSerializer and the Client both need to be aware of this.


A simple calendar app for scheduling your work day
Time: 00:00
Time: 01:00
Time: 02:00
Time: 03:00
Time: 04:00
Time: 05:00
Time: 06:00
Time: 07:00
Time: 08:00
Time: 09:00
Time: 10:00
Time: 11:00
Time: 12:00
Time: 13:00
Time: 14:00
Time: 15:00
Time: 16:00
Time: 17:00
Time: 18:00
Time: 19:00
Time: 20:00
Time: 21:00
Time: 22:00
Time: 23:00


Edit User:
First Name
First name is required.
Last Name
Last name is required.
Roles
At least one role is required.


---
layout: post
title: Title Design for short student film 2012
date: '2016-03-15T18:30:29+01:00'
categories:
- Title Design
- Graphic Design
picture_url: https://film-Storyboards.tumblr.com/post/141114613557/title-design-for-short-student-film-2012
---
Title design for short student film (2012).


WHO WE ARE
Big Green Door is an independent creative brand strategy consultancy, operating worldwide for some of the world’s leading consumer brands.
Founded in 1993, we are a warm, perceptive team with a wide variety of specialist experience, all sharing the curiosity, intellect and tenacity to unlock pivotal solutions for our clients.
WE PROVIDE CREATIVE,
ROBUST SOLUTIONS
YOU CAN RUN WITH.
WHAT WE DO
STRATEGIC INNOVATION
CONSUMER INSIGHT
BRAND STRATEGY
We work with the culture of our clients to determine a clear path forward for their brands. We provide inspiration by offering fresh perspectives on existing information and consumer landscapes.
Our approach accelerates the transition from strategy to execution, building clarity, direction and ownership.
STRATEGIC INNOVATION
CONSUMER INSIGHT
BRAND STRATEGY
HOW WE DO IT
CASTING THE
RIGHT MIX OF
SKILLS, EXPERIENCE
AND
BRAIN POWER
- Aligning our working processes with your culture
- Challenging preconceptions with investigative questioning
- Generating foresight with bespoke research methodologies
- Embracing both free and formal thinking processes
- Combining a vision of the big picture with attention to detail
- Balancing speed with uncompromising dedication to quality
- Bringing things together via digestible, imaginative outputs
- Reading between the lines, making new connections


An example list with selectable items using React and item-selection. Click, ctrl+click or shift+click items to select / deselect. view source


GridRow
ui.grid.edit
GridRow options for edit feature, these are available to be set internally only, by other features
enable editing on row, grouping for example might disable editing on group header rows


YOU CAN FOLLOW US THROUGH:


October 21
But you shall remember the Lord thy God: for it is he that gives you power to get wealth, that he may establish his covenant. Deuteronomy 8:18
What is God's reason for prospering His people? Is it so we can watch bigger TVs? So we can buy finer houses and more luxurious cars? Establishing God's covenant on the earth and giving to those in need: Those are God's purposes for prosperity!
I've had some people tell me, "Well, Brother Copeland, Jesus' ministry was poor and He got along just fine."  All the way through the Old Testament God promised material blessings to anyone who would walk perfectly and uprightly before Him. If God had failed to bless Jesus financially, He would have been breaking His own Word.
Jesus never built a worldly empire for Himself. But that doesn't mean He was poor. It means He was the greatest giver Who ever walked the face of this earth--and it's about time we started following in His footsteps. If we'll start giving, if we'll start taking care of the needs in people's pocketbooks, we'll be far more likely to win their hearts.
What do you think will happen to the heart of a starving nation when you bring in a 747 full of food, clothes and medical supplies to them in the Name of Jesus and His love? The hearts of those people are going to soften! They're going to be willing to listen to what we have to say about Jesus.
Don't you ever let anyone tell you it's wrong to want to prosper. It's wrong for you not to want to prosper when that prosperity can mean the difference between heaven and hell for millions of people. Forget about your own little needs. Raise your vision and set your mind on giving to meet someone else's, on establishing God's covenant in the earth. Then stand fast in faith and get ready to enjoy the greatest prosperity you've ever known.
Scripture Reading: Deuteronomy 8:11-18


For example:
public class Critical {
protected static final Logger LOG = Logger.getLogger(Critical.class);
protected static final Logger myLogger = Logger.getLogger(getClass());
}
Use the table below to specify Logger class names. Classes which declare multiple fields which have the type of one of the classes specified, will be reported by this inspection.


# -*- coding: utf-8 -*-
"""
This file contains some classical ciphers and routines
implementing a linear-feedback shift register (LFSR)
and the Diffie-Hellman key exchange.
"""
from __future__ import print_function
from string import whitespace, ascii_uppercase as uppercase, printable
from sympy import nextprime
from sympy.core import Rational, Symbol
from sympy.core.numbers import igcdex, mod_inverse
from sympy.core.compatibility import range
from sympy.matrices import Matrix
from sympy.ntheory import isprime, totient, primitive_root
from sympy.polys.domains import FF
from sympy.polys.polytools import gcd, Poly
from sympy.utilities.misc import filldedent, translate
from sympy.utilities.iterables import uniq
from sympy.utilities.randtest import _randrange
[docs]def AZ(s=None):
"""Return the letters of ``s`` in uppercase. In case more than
one string is passed, each of them will be processed and a list
of upper case strings will be returned.
Examples
========
>>> from sympy.crypto.crypto import AZ
>>> AZ('Hello, world!')
'HELLOWORLD'
>>> AZ('Hello, world!'.split())
['HELLO', 'WORLD']
See Also
========
check_and_join
"""
if not s:
return uppercase
t = type(s) is str
if t:
s = [s]
rv = [check_and_join(i.upper().split(), uppercase, filter=True)
for i in s]
if t:
return rv[0]
return rv
bifid5 = AZ().replace('J', '')
bifid6 = AZ() + '0123456789'
bifid10 = printable
[docs]def padded_key(key, symbols, filter=True):
"""Return a string of the distinct characters of ``symbols`` with
those of ``key`` appearing first, omitting characters in ``key``
that are not in ``symbols``. A ValueError is raised if a) there are
duplicate characters in ``symbols`` or b) there are characters
in ``key`` that are not in ``symbols``.
Examples
========
>>> from sympy.crypto.crypto import padded_key
>>> padded_key('PUPPY', 'OPQRSTUVWXY')
'PUYOQRSTVWX'
>>> padded_key('RSA', 'ARTIST')
Traceback (most recent call last):
...
ValueError: duplicate characters in symbols: T
"""
syms = list(uniq(symbols))
if len(syms) != len(symbols):
extra = ''.join(sorted(set(
[i for i in symbols if symbols.count(i) > 1])))
raise ValueError('duplicate characters in symbols: %s' % extra)
extra = set(key) - set(syms)
if extra:
raise ValueError(
'characters in key but not symbols: %s' % ''.join(
sorted(extra)))
key0 = ''.join(list(uniq(key)))
return key0 + ''.join([i for i in syms if i not in key0])
[docs]def check_and_join(phrase, symbols=None, filter=None):
"""
Joins characters of `phrase` and if ``symbols`` is given, raises
an error if any character in ``phrase`` is not in ``symbols``.
Parameters
==========
phrase: string or list of strings to be returned as a string
symbols: iterable of characters allowed in ``phrase``;
if ``symbols`` is None, no checking is performed
Examples
========
>>> from sympy.crypto.crypto import check_and_join
>>> check_and_join('a phrase')
'a phrase'
>>> check_and_join('a phrase'.upper().split())
'APHRASE'
>>> check_and_join('a phrase!'.upper().split(), 'ARE', filter=True)
'ARAE'
>>> check_and_join('a phrase!'.upper().split(), 'ARE')
Traceback (most recent call last):
...
ValueError: characters in phrase but not symbols: "!HPS"
"""
rv = ''.join(''.join(phrase))
if symbols is not None:
symbols = check_and_join(symbols)
missing = ''.join(list(sorted(set(rv) - set(symbols))))
if missing:
if not filter:
raise ValueError(
'characters in phrase but not symbols: "%s"' % missing)
rv = translate(rv, None, missing)
return rv
def _prep(msg, key, alp, default=None):
if not alp:
if not default:
alp = AZ()
msg = AZ(msg)
key = AZ(key)
else:
alp = default
else:
alp = ''.join(alp)
key = check_and_join(key, alp, filter=True)
msg = check_and_join(msg, alp, filter=True)
return msg, key, alp
[docs]def cycle_list(k, n):
"""
Returns the elements of the list ``range(n)`` shifted to the
left by ``k`` (so the list starts with ``k`` (mod ``n``)).
Examples
========
>>> from sympy.crypto.crypto import cycle_list
>>> cycle_list(3, 10)
[3, 4, 5, 6, 7, 8, 9, 0, 1, 2]
"""
k = k % n
return list(range(k, n)) + list(range(k))
######## shift cipher examples ############
[docs]def encipher_shift(msg, key, symbols=None):
"""
Performs shift cipher encryption on plaintext msg, and returns the
ciphertext.
Notes
=====
The shift cipher is also called the Caesar cipher, after
Julius Caesar, who, according to Suetonius, used it with a
shift of three to protect messages of military significance.
Caesar's nephew Augustus reportedly used a similar cipher, but
with a right shift of 1.
ALGORITHM:
INPUT:
``key``: an integer (the secret key)
``msg``: plaintext of upper-case letters
OUTPUT:
``ct``: ciphertext of upper-case letters
STEPS:
0. Number the letters of the alphabet from 0, ..., N
1. Compute from the string ``msg`` a list ``L1`` of
corresponding integers.
2. Compute from the list ``L1`` a new list ``L2``, given by
adding ``(k mod 26)`` to each element in ``L1``.
3. Compute from the list ``L2`` a string ``ct`` of
corresponding letters.
Examples
========
>>> from sympy.crypto.crypto import encipher_shift, decipher_shift
>>> msg = "GONAVYBEATARMY"
>>> ct = encipher_shift(msg, 1); ct
'HPOBWZCFBUBSNZ'
To decipher the shifted text, change the sign of the key:
>>> encipher_shift(ct, -1)
'GONAVYBEATARMY'
There is also a convenience function that does this with the
original key:
>>> decipher_shift(ct, 1)
'GONAVYBEATARMY'
"""
msg, _, A = _prep(msg, '', symbols)
shift = len(A) - key % len(A)
key = A[shift:] + A[:shift]
return translate(msg, key, A)
[docs]def decipher_shift(msg, key, symbols=None):
"""
Return the text by shifting the characters of ``msg`` to the
left by the amount given by ``key``.
Examples
========
>>> from sympy.crypto.crypto import encipher_shift, decipher_shift
>>> msg = "GONAVYBEATARMY"
>>> ct = encipher_shift(msg, 1); ct
'HPOBWZCFBUBSNZ'
To decipher the shifted text, change the sign of the key:
>>> encipher_shift(ct, -1)
'GONAVYBEATARMY'
Or use this function with the original key:
>>> decipher_shift(ct, 1)
'GONAVYBEATARMY'
"""
return encipher_shift(msg, -key, symbols)
######## affine cipher examples ############
[docs]def encipher_affine(msg, key, symbols=None, _inverse=False):
r"""
Performs the affine cipher encryption on plaintext ``msg``, and
returns the ciphertext.
Encryption is based on the map `x \rightarrow ax+b` (mod `N`)
where ``N`` is the number of characters in the alphabet.
Decryption is based on the map `x \rightarrow cx+d` (mod `N`),
where `c = a^{-1}` (mod `N`) and `d = -a^{-1}b` (mod `N`).
In particular, for the map to be invertible, we need
`\mathrm{gcd}(a, N) = 1` and an error will be raised if this is
not true.
Notes
=====
This is a straightforward generalization of the shift cipher with
the added complexity of requiring 2 characters to be deciphered in
order to recover the key.
ALGORITHM:
INPUT:
``msg``: string of characters that appear in ``symbols``
``a, b``: a pair integers, with ``gcd(a, N) = 1``
(the secret key)
``symbols``: string of characters (default = uppercase
letters). When no symbols are given, ``msg`` is converted
to upper case letters and all other charactes are ignored.
OUTPUT:
``ct``: string of characters (the ciphertext message)
STEPS:
0. Number the letters of the alphabet from 0, ..., N
1. Compute from the string ``msg`` a list ``L1`` of
corresponding integers.
2. Compute from the list ``L1`` a new list ``L2``, given by
replacing ``x`` by ``a*x + b (mod N)``, for each element
``x`` in ``L1``.
3. Compute from the list ``L2`` a string ``ct`` of
corresponding letters.
See Also
========
decipher_affine
"""
msg, _, A = _prep(msg, '', symbols)
N = len(A)
a, b = key
assert gcd(a, N) == 1
if _inverse:
c = mod_inverse(a, N)
d = -b*c
a, b = c, d
B = ''.join([A[(a*i + b) % N] for i in range(N)])
return translate(msg, A, B)
[docs]def decipher_affine(msg, key, symbols=None):
r"""
Return the deciphered text that was made from the mapping,
`x \rightarrow ax+b` (mod `N`), where ``N`` is the
number of characters in the alphabet. Deciphering is done by
reciphering with a new key: `x \rightarrow cx+d` (mod `N`),
where `c = a^{-1}` (mod `N`) and `d = -a^{-1}b` (mod `N`).
Examples
========
>>> from sympy.crypto.crypto import encipher_affine, decipher_affine
>>> msg = "GO NAVY BEAT ARMY"
>>> key = (3, 1)
>>> encipher_affine(msg, key)
'TROBMVENBGBALV'
>>> decipher_affine(_, key)
'GONAVYBEATARMY'
"""
return encipher_affine(msg, key, symbols, _inverse=True)
#################### substitution cipher ###########################
[docs]def encipher_substitution(msg, old, new=None):
"""
Returns the ciphertext obtained by replacing each character that
appears in ``old`` with the corresponding character in ``new``.
If ``old`` is a mapping, then new is ignored and the replacements
defined by ``old`` are used.
Notes
=====
This is a more general than the affine cipher in that the key can
only be recovered by determining the mapping for each symbol.
Though in practice, once a few symbols are recognized the mappings
for other characters can be quickly guessed.
Examples
========
>>> from sympy.crypto.crypto import encipher_substitution, AZ
>>> old = 'OEYAG'
>>> new = '034^6'
>>> msg = AZ("go navy! beat army!")
>>> ct = encipher_substitution(msg, old, new); ct
'60N^V4B3^T^RM4'
To decrypt a substitution, reverse the last two arguments:
>>> encipher_substitution(ct, new, old)
'GONAVYBEATARMY'
In the special case where ``old`` and ``new`` are a permuation of
order 2 (representing a transposition of characters) their order
is immaterial:
>>> old = 'NAVY'
>>> new = 'ANYV'
>>> encipher = lambda x: encipher_substitution(x, old, new)
>>> encipher('NAVY')
'ANYV'
>>> encipher(_)
'NAVY'
The substitution cipher, in general, is a method
whereby "units" (not necessarily single characters) of plaintext
are replaced with ciphertext according to a regular system.
>>> ords = dict(zip('abc', ['\\%i' % ord(i) for i in 'abc']))
>>> print(encipher_substitution('abc', ords))
\97\98\99
"""
return translate(msg, old, new)
######################################################################
#################### Vigenère cipher examples ########################
######################################################################
[docs]def encipher_vigenere(msg, key, symbols=None):
"""
Performs the Vigenère cipher encryption on plaintext ``msg``, and
returns the ciphertext.
Examples
========
>>> from sympy.crypto.crypto import encipher_vigenere, AZ
>>> key = "encrypt"
>>> msg = "meet me on monday"
>>> encipher_vigenere(msg, key)
'QRGKKTHRZQEBPR'
Section 1 of the Kryptos sculpture at the CIA headquarters
uses this cipher and also changes the order of the the
alphabet [2]_. Here is the first line of that section of
the sculpture:
>>> from sympy.crypto.crypto import decipher_vigenere, padded_key
>>> alp = padded_key('KRYPTOS', AZ())
>>> key = 'PALIMPSEST'
>>> msg = 'EMUFPHZLRFAXYUSDJKZLDKRNSHGNFIVJ'
>>> decipher_vigenere(msg, key, alp)
'BETWEENSUBTLESHADINGANDTHEABSENC'
Notes
=====
The Vigenère cipher is named after Blaise de Vigenère, a sixteenth
century diplomat and cryptographer, by a historical accident.
Vigenère actually invented a different and more complicated cipher.
The so-called *Vigenère cipher* was actually invented
by Giovan Batista Belaso in 1553.
This cipher was used in the 1800's, for example, during the American
Civil War. The Confederacy used a brass cipher disk to implement the
Vigenère cipher (now on display in the NSA Museum in Fort
Meade) [1]_.
The Vigenère cipher is a generalization of the shift cipher.
Whereas the shift cipher shifts each letter by the same amount
(that amount being the key of the shift cipher) the Vigenère
cipher shifts a letter by an amount determined by the key (which is
a word or phrase known only to the sender and receiver).
For example, if the key was a single letter, such as "C", then the
so-called Vigenere cipher is actually a shift cipher with a
shift of `2` (since "C" is the 2nd letter of the alphabet, if
you start counting at `0`). If the key was a word with two
letters, such as "CA", then the so-called Vigenère cipher will
shift letters in even positions by `2` and letters in odd positions
are left alone (shifted by `0`, since "A" is the 0th letter, if
you start counting at `0`).
ALGORITHM:
INPUT:
``msg``: string of characters that appear in ``symbols``
(the plaintext)
``key``: a string of characters that appear in ``symbols``
(the secret key)
``symbols``: a string of letters defining the alphabet
OUTPUT:
``ct``: string of characters (the ciphertext message)
STEPS:
0. Number the letters of the alphabet from 0, ..., N
1. Compute from the string ``key`` a list ``L1`` of
corresponding integers. Let ``n1 = len(L1)``.
2. Compute from the string ``msg`` a list ``L2`` of
corresponding integers. Let ``n2 = len(L2)``.
3. Break ``L2`` up sequencially into sublists of size
``n1``; the last sublist may be smaller than ``n1``
4. For each of these sublists ``L`` of ``L2``, compute a
new list ``C`` given by ``C[i] = L[i] + L1[i] (mod N)``
to the ``i``-th element in the sublist, for each ``i``.
5. Assemble these lists ``C`` by concatenation into a new
list of length ``n2``.
6. Compute from the new list a string ``ct`` of
corresponding letters.
Once it is known that the key is, say, `n` characters long,
frequency analysis can be applied to every `n`-th letter of
the ciphertext to determine the plaintext. This method is
called *Kasiski examination* (although it was first discovered
by Babbage). If they key is as long as the message and is
comprised of randomly selected characters -- a one-time pad -- the
message is theoretically unbreakable.
The cipher Vigenère actually discovered is an "auto-key" cipher
described as follows.
ALGORITHM:
INPUT:
``key``: a string of letters (the secret key)
``msg``: string of letters (the plaintext message)
OUTPUT:
``ct``: string of upper-case letters (the ciphertext message)
STEPS:
0. Number the letters of the alphabet from 0, ..., N
1. Compute from the string ``msg`` a list ``L2`` of
corresponding integers. Let ``n2 = len(L2)``.
2. Let ``n1`` be the length of the key. Append to the
string ``key`` the first ``n2 - n1`` characters of
the plaintext message. Compute from this string (also of
length ``n2``) a list ``L1`` of integers corresponding
to the letter numbers in the first step.
3. Compute a new list ``C`` given by
``C[i] = L1[i] + L2[i] (mod N)``.
4. Compute from the new list a string ``ct`` of letters
corresponding to the new integers.
To decipher the auto-key ciphertext, the key is used to decipher
the first ``n1`` characters and then those characters become the
key to decipher the next ``n1`` characters, etc...:
>>> m = AZ('go navy, beat army! yes you can'); m
'GONAVYBEATARMYYESYOUCAN'
>>> key = AZ('gold bug'); n1 = len(key); n2 = len(m)
>>> auto_key = key + m[:n2 - n1]; auto_key
'GOLDBUGGONAVYBEATARMYYE'
>>> ct = encipher_vigenere(m, auto_key); ct
'MCYDWSHKOGAMKZCELYFGAYR'
>>> n1 = len(key)
>>> pt = []
>>> while ct:
... part, ct = ct[:n1], ct[n1:]
... pt.append(decipher_vigenere(part, key))
... key = pt[-1]
...
>>> ''.join(pt) == m
True
References
==========
.. [1] http://en.wikipedia.org/wiki/Vigenere_cipher
.. [2] http://web.archive.org/web/20071116100808/
http://filebox.vt.edu/users/batman/kryptos.html
"""
msg, key, A = _prep(msg, key, symbols)
map = {c: i for i, c in enumerate(A)}
key = [map[c] for c in key]
N = len(map)
k = len(key)
rv = []
for i, m in enumerate(msg):
rv.append(A[(map[m] + key[i % k]) % N])
rv = ''.join(rv)
return rv
[docs]def decipher_vigenere(msg, key, symbols=None):
"""
Decode using the Vigenère cipher.
Examples
========
>>> from sympy.crypto.crypto import decipher_vigenere
>>> key = "encrypt"
>>> ct = "QRGK kt HRZQE BPR"
>>> decipher_vigenere(ct, key)
'MEETMEONMONDAY'
"""
msg, key, A = _prep(msg, key, symbols)
map = {c: i for i, c in enumerate(A)}
N = len(A) # normally, 26
K = [map[c] for c in key]
n = len(K)
C = [map[c] for c in msg]
rv = ''.join([A[(-K[i % n] + c) % N] for i, c in enumerate(C)])
return rv
#################### Hill cipher ########################
[docs]def encipher_hill(msg, key, symbols=None, pad="Q"):
r"""
Return the Hill cipher encryption of ``msg``.
Notes
=====
The Hill cipher [1]_, invented by Lester S. Hill in the 1920's [2]_,
was the first polygraphic cipher in which it was practical
(though barely) to operate on more than three symbols at once.
The following discussion assumes an elementary knowledge of
matrices.
First, each letter is first encoded as a number starting with 0.
Suppose your message `msg` consists of `n` capital letters, with no
spaces. This may be regarded an `n`-tuple M of elements of
`Z_{26}` (if the letters are those of the English alphabet). A key
in the Hill cipher is a `k x k` matrix `K`, all of whose entries
are in `Z_{26}`, such that the matrix `K` is invertible (i.e., the
linear transformation `K: Z_{N}^k \rightarrow Z_{N}^k`
is one-to-one).
ALGORITHM:
INPUT:
``msg``: plaintext message of `n` upper-case letters
``key``: a `k x k` invertible matrix `K`, all of whose
entries are in `Z_{26}` (or whatever number of symbols
are being used).
``pad``: character (default "Q") to use to make length
of text be a multiple of ``k``
OUTPUT:
``ct``: ciphertext of upper-case letters
STEPS:
0. Number the letters of the alphabet from 0, ..., N
1. Compute from the string ``msg`` a list ``L`` of
corresponding integers. Let ``n = len(L)``.
2. Break the list ``L`` up into ``t = ceiling(n/k)``
sublists ``L_1``, ..., ``L_t`` of size ``k`` (with
the last list "padded" to ensure its size is
``k``).
3. Compute new list ``C_1``, ..., ``C_t`` given by
``C[i] = K*L_i`` (arithmetic is done mod N), for each
``i``.
4. Concatenate these into a list ``C = C_1 + ... + C_t``.
5. Compute from ``C`` a string ``ct`` of corresponding
letters. This has length ``k*t``.
References
==========
.. [1] en.wikipedia.org/wiki/Hill_cipher
.. [2] Lester S. Hill, Cryptography in an Algebraic Alphabet,
The American Mathematical Monthly Vol.36, June-July 1929,
pp.306-312.
See Also
========
decipher_hill
"""
assert key.is_square
assert len(pad) == 1
msg, pad, A = _prep(msg, pad, symbols)
map = {c: i for i, c in enumerate(A)}
P = [map[c] for c in msg]
N = len(A)
k = key.cols
n = len(P)
m, r = divmod(n, k)
if r:
P = P + [map[pad]]*(k - r)
m += 1
rv = ''.join([A[c % N] for j in range(m) for c in
list(key*Matrix(k, 1, [P[i]
for i in range(k*j, k*(j + 1))]))])
return rv
[docs]def decipher_hill(msg, key, symbols=None):
"""
Deciphering is the same as enciphering but using the inverse of the
key matrix.
Examples
========
>>> from sympy.crypto.crypto import encipher_hill, decipher_hill
>>> from sympy import Matrix
>>> key = Matrix([[1, 2], [3, 5]])
>>> encipher_hill("meet me on monday", key)
'UEQDUEODOCTCWQ'
>>> decipher_hill(_, key)
'MEETMEONMONDAY'
When the length of the plaintext (stripped of invalid characters)
is not a multiple of the key dimension, extra characters will
appear at the end of the enciphered and deciphered text. In order to
decipher the text, those characters must be included in the text to
be deciphered. In the following, the key has a dimension of 4 but
the text is 2 short of being a multiple of 4 so two characters will
be added.
>>> key = Matrix([[1, 1, 1, 2], [0, 1, 1, 0],
... [2, 2, 3, 4], [1, 1, 0, 1]])
>>> msg = "ST"
>>> encipher_hill(msg, key)
'HJEB'
>>> decipher_hill(_, key)
'STQQ'
>>> encipher_hill(msg, key, pad="Z")
'ISPK'
>>> decipher_hill(_, key)
'STZZ'
If the last two characters of the ciphertext were ignored in
either case, the wrong plaintext would be recovered:
>>> decipher_hill("HD", key)
'ORMV'
>>> decipher_hill("IS", key)
'UIKY'
"""
assert key.is_square
msg, _, A = _prep(msg, '', symbols)
map = {c: i for i, c in enumerate(A)}
C = [map[c] for c in msg]
N = len(A)
k = key.cols
n = len(C)
m, r = divmod(n, k)
if r:
C = C + [0]*(k - r)
m += 1
key_inv = key.inv_mod(N)
rv = ''.join([A[p % N] for j in range(m) for p in
list(key_inv*Matrix(
k, 1, [C[i] for i in range(k*j, k*(j + 1))]))])
return rv
#################### Bifid cipher ########################
[docs]def encipher_bifid(msg, key, symbols=None):
r"""
Performs the Bifid cipher encryption on plaintext ``msg``, and
returns the ciphertext.
This is the version of the Bifid cipher that uses an `n \times n`
Polybius square.
INPUT:
``msg``: plaintext string
``key``: short string for key; duplicate characters are
ignored and then it is padded with the characters in
``symbols`` that were not in the short key
``symbols``: `n \times n` characters defining the alphabet
(default is string.printable)
OUTPUT:
ciphertext (using Bifid5 cipher without spaces)
See Also
========
decipher_bifid, encipher_bifid5, encipher_bifid6
"""
msg, key, A = _prep(msg, key, symbols, bifid10)
long_key = ''.join(uniq(key)) or A
n = len(A)**.5
if n != int(n):
raise ValueError(
'Length of alphabet (%s) is not a square number.' % len(A))
N = int(n)
if len(long_key) < N**2:
long_key = list(long_key) + [x for x in A if x not in long_key]
# the fractionalization
row_col = dict([(ch, divmod(i, N))
for i, ch in enumerate(long_key)])
r, c = zip(*[row_col[x] for x in msg])
rc = r + c
ch = {i: ch for ch, i in row_col.items()}
rv = ''.join((ch[i] for i in zip(rc[::2], rc[1::2])))
return rv
[docs]def decipher_bifid(msg, key, symbols=None):
r"""
Performs the Bifid cipher decryption on ciphertext ``msg``, and
returns the plaintext.
This is the version of the Bifid cipher that uses the `n \times n`
Polybius square.
INPUT:
``msg``: ciphertext string
``key``: short string for key; duplicate characters are
ignored and then it is padded with the characters in
``symbols`` that were not in the short key
``symbols``: `n \times n` characters defining the alphabet
(default=string.printable, a `10 \times 10` matrix)
OUTPUT:
deciphered text
Examples
========
>>> from sympy.crypto.crypto import (
... encipher_bifid, decipher_bifid, AZ)
Do an encryption using the bifid5 alphabet:
>>> alp = AZ().replace('J', '')
>>> ct = AZ("meet me on monday!")
>>> key = AZ("gold bug")
>>> encipher_bifid(ct, key, alp)
'IEILHHFSTSFQYE'
When entering the text or ciphertext, spaces are ignored so it
can be formatted as desired. Re-entering the ciphertext from the
preceding, putting 4 characters per line and padding with an extra
J, does not cause problems for the deciphering:
>>> decipher_bifid('''
... IEILH
... HFSTS
... FQYEJ''', key, alp)
'MEETMEONMONDAY'
When no alphabet is given, all 100 printable characters will be
used:
>>> key = ''
>>> encipher_bifid('hello world!', key)
'bmtwmg-bIo*w'
>>> decipher_bifid(_, key)
'hello world!'
If the key is changed, a different encryption is obtained:
>>> key = 'gold bug'
>>> encipher_bifid('hello world!', 'gold_bug')
'hg2sfuei7t}w'
And if the key used to decrypt the message is not exact, the
original text will not be perfectly obtained:
>>> decipher_bifid(_, 'gold pug')
'heldo~wor6d!'
"""
msg, _, A = _prep(msg, '', symbols, bifid10)
long_key = ''.join(uniq(key)) or A
n = len(A)**.5
if n != int(n):
raise ValueError(
'Length of alphabet (%s) is not a square number.' % len(A))
N = int(n)
if len(long_key) < N**2:
long_key = list(long_key) + [x for x in A if x not in long_key]
# the reverse fractionalization
row_col = dict(
[(ch, divmod(i, N)) for i, ch in enumerate(long_key)])
rc = [i for c in msg for i in row_col[c]]
n = len(msg)
rc = zip(*(rc[:n], rc[n:]))
ch = {i: ch for ch, i in row_col.items()}
rv = ''.join((ch[i] for i in rc))
return rv
def bifid_square(key):
"""Return characters of ``key`` arranged in a square.
Examples
========
>>> from sympy.crypto.crypto import (
... bifid_square, AZ, padded_key, bifid5)
>>> bifid_square(AZ().replace('J', ''))
Matrix([
[A, B, C, D, E],
[F, G, H, I, K],
[L, M, N, O, P],
[Q, R, S, T, U],
[V, W, X, Y, Z]])
>>> bifid_square(padded_key(AZ('gold bug!'), bifid5))
Matrix([
[G, O, L, D, B],
[U, A, C, E, F],
[H, I, K, M, N],
[P, Q, R, S, T],
[V, W, X, Y, Z]])
See Also
========
padded_key
"""
A = ''.join(uniq(''.join(key)))
n = len(A)**.5
if n != int(n):
raise ValueError(
'Length of alphabet (%s) is not a square number.' % len(A))
n = int(n)
f = lambda i, j: Symbol(A[n*i + j])
rv = Matrix(n, n, f)
return rv
[docs]def encipher_bifid5(msg, key):
r"""
Performs the Bifid cipher encryption on plaintext ``msg``, and
returns the ciphertext.
This is the version of the Bifid cipher that uses the `5 \times 5`
Polybius square. The letter "J" is ignored so it must be replaced
with something else (traditionally an "I") before encryption.
Notes
=====
The Bifid cipher was invented around 1901 by Felix Delastelle.
It is a *fractional substitution* cipher, where letters are
replaced by pairs of symbols from a smaller alphabet. The
cipher uses a `5 \times 5` square filled with some ordering of the
alphabet, except that "J" is replaced with "I" (this is a so-called
Polybius square; there is a `6 \times 6` analog if you add back in
"J" and also append onto the usual 26 letter alphabet, the digits
0, 1, ..., 9).
According to Helen Gaines' book *Cryptanalysis*, this type of cipher
was used in the field by the German Army during World War I.
ALGORITHM: (5x5 case)
INPUT:
``msg``: plaintext string; converted to upper case and
filtered of anything but all letters except J.
``key``: short string for key; non-alphabetic letters, J
and duplicated characters are ignored and then, if the
length is less than 25 characters, it is padded with other
letters of the alphabet (in alphabetical order).
OUTPUT:
ciphertext (all caps, no spaces)
STEPS:
0. Create the `5 \times 5` Polybius square ``S`` associated
to ``key`` as follows:
a) moving from left-to-right, top-to-bottom,
place the letters of the key into a `5 \times 5`
matrix,
b) if the key has less than 25 letters, add the
letters of the alphabet not in the key until the
`5 \times 5` square is filled.
1. Create a list ``P`` of pairs of numbers which are the
coordinates in the Polybius square of the letters in
``msg``.
2. Let ``L1`` be the list of all first coordinates of ``P``
(length of ``L1 = n``), let ``L2`` be the list of all
second coordinates of ``P`` (so the length of ``L2``
is also ``n``).
3. Let ``L`` be the concatenation of ``L1`` and ``L2``
(length ``L = 2*n``), except that consecutive numbers
are paired ``(L[2*i], L[2*i + 1])``. You can regard
``L`` as a list of pairs of length ``n``.
4. Let ``C`` be the list of all letters which are of the
form ``S[i, j]``, for all ``(i, j)`` in ``L``. As a
string, this is the ciphertext of ``msg``.
Examples
========
>>> from sympy.crypto.crypto import (
... encipher_bifid5, decipher_bifid5)
"J" will be omitted unless it is replaced with somthing else:
>>> round_trip = lambda m, k: \
... decipher_bifid5(encipher_bifid5(m, k), k)
>>> key = 'a'
>>> msg = "JOSIE"
>>> round_trip(msg, key)
'OSIE'
>>> round_trip(msg.replace("J", "I"), key)
'IOSIE'
>>> j = "QIQ"
>>> round_trip(msg.replace("J", j), key).replace(j, "J")
'JOSIE'
See Also
========
decipher_bifid5, encipher_bifid
"""
msg, key, _ = _prep(msg.upper(), key.upper(), None, bifid5)
key = padded_key(key, bifid5)
return encipher_bifid(msg, '', key)
[docs]def decipher_bifid5(msg, key):
r"""
Return the Bifid cipher decryption of ``msg``.
This is the version of the Bifid cipher that uses the `5 \times 5`
Polybius square; the letter "J" is ignored unless a ``key`` of
length 25 is used.
INPUT:
``msg``: ciphertext string
``key``: short string for key; duplicated characters are
ignored and if the length is less then 25 characters, it
will be padded with other letters from the alphabet omitting
"J". Non-alphabetic characters are ignored.
OUTPUT:
plaintext from Bifid5 cipher (all caps, no spaces)
Examples
========
>>> from sympy.crypto.crypto import encipher_bifid5, decipher_bifid5
>>> key = "gold bug"
>>> encipher_bifid5('meet me on friday', key)
'IEILEHFSTSFXEE'
>>> encipher_bifid5('meet me on monday', key)
'IEILHHFSTSFQYE'
>>> decipher_bifid5(_, key)
'MEETMEONMONDAY'
"""
msg, key, _ = _prep(msg.upper(), key.upper(), None, bifid5)
key = padded_key(key, bifid5)
return decipher_bifid(msg, '', key)
[docs]def bifid5_square(key=None):
r"""
5x5 Polybius square.
Produce the Polybius square for the `5 \times 5` Bifid cipher.
Examples
========
>>> from sympy.crypto.crypto import bifid5_square
>>> bifid5_square("gold bug")
Matrix([
[G, O, L, D, B],
[U, A, C, E, F],
[H, I, K, M, N],
[P, Q, R, S, T],
[V, W, X, Y, Z]])
"""
if not key:
key = bifid5
else:
_, key, _ = _prep('', key.upper(), None, bifid5)
key = padded_key(key, bifid5)
return bifid_square(key)
[docs]def encipher_bifid6(msg, key):
r"""
Performs the Bifid cipher encryption on plaintext ``msg``, and
returns the ciphertext.
This is the version of the Bifid cipher that uses the `6 \times 6`
Polybius square.
INPUT:
``msg``: plaintext string (digits okay)
``key``: short string for key (digits okay). If ``key`` is
less than 36 characters long, the square will be filled with
letters A through Z and digits 0 through 9.
OUTPUT:
ciphertext from Bifid cipher (all caps, no spaces)
See Also
========
decipher_bifid6, encipher_bifid
"""
msg, key, _ = _prep(msg.upper(), key.upper(), None, bifid6)
key = padded_key(key, bifid6)
return encipher_bifid(msg, '', key)
[docs]def decipher_bifid6(msg, key):
r"""
Performs the Bifid cipher decryption on ciphertext ``msg``, and
returns the plaintext.
This is the version of the Bifid cipher that uses the `6 \times 6`
Polybius square.
INPUT:
``msg``: ciphertext string (digits okay); converted to upper case
``key``: short string for key (digits okay). If ``key`` is
less than 36 characters long, the square will be filled with
letters A through Z and digits 0 through 9. All letters are
converted to uppercase.
OUTPUT:
plaintext from Bifid cipher (all caps, no spaces)
Examples
========
>>> from sympy.crypto.crypto import encipher_bifid6, decipher_bifid6
>>> key = "gold bug"
>>> encipher_bifid6('meet me on monday at 8am', key)
'KFKLJJHF5MMMKTFRGPL'
>>> decipher_bifid6(_, key)
'MEETMEONMONDAYAT8AM'
"""
msg, key, _ = _prep(msg.upper(), key.upper(), None, bifid6)
key = padded_key(key, bifid6)
return decipher_bifid(msg, '', key)
[docs]def bifid6_square(key=None):
r"""
6x6 Polybius square.
Produces the Polybius square for the `6 \times 6` Bifid cipher.
Assumes alphabet of symbols is "A", ..., "Z", "0", ..., "9".
Examples
========
>>> from sympy.crypto.crypto import bifid6_square
>>> key = "gold bug"
>>> bifid6_square(key)
Matrix([
[G, O, L, D, B, U],
[A, C, E, F, H, I],
[J, K, M, N, P, Q],
[R, S, T, V, W, X],
[Y, Z, 0, 1, 2, 3],
[4, 5, 6, 7, 8, 9]])
"""
if not key:
key = bifid6
else:
_, key, _ = _prep('', key.upper(), None, bifid6)
key = padded_key(key, bifid6)
return bifid_square(key)
#################### RSA #############################
[docs]def rsa_public_key(p, q, e):
r"""
Return the RSA *public key* pair, `(n, e)`, where `n`
is a product of two primes and `e` is relatively
prime (coprime) to the Euler totient `\phi(n)`. False
is returned if any assumption is violated.
Examples
========
>>> from sympy.crypto.crypto import rsa_public_key
>>> p, q, e = 3, 5, 7
>>> rsa_public_key(p, q, e)
(15, 7)
>>> rsa_public_key(p, q, 30)
False
"""
n = p*q
if isprime(p) and isprime(q):
phi = totient(n)
if gcd(e, phi) == 1:
return n, e
return False
[docs]def rsa_private_key(p, q, e):
r"""
Return the RSA *private key*, `(n,d)`, where `n`
is a product of two primes and `d` is the inverse of
`e` (mod `\phi(n)`). False is returned if any assumption
is violated.
Examples
========
>>> from sympy.crypto.crypto import rsa_private_key
>>> p, q, e = 3, 5, 7
>>> rsa_private_key(p, q, e)
(15, 7)
>>> rsa_private_key(p, q, 30)
False
"""
n = p*q
if isprime(p) and isprime(q):
phi = totient(n)
if gcd(e, phi) == 1:
d = mod_inverse(e, phi)
return n, d
return False
[docs]def encipher_rsa(i, key):
"""
Return encryption of ``i`` by computing `i^e` (mod `n`),
where ``key`` is the public key `(n, e)`.
Examples
========
>>> from sympy.crypto.crypto import encipher_rsa, rsa_public_key
>>> p, q, e = 3, 5, 7
>>> puk = rsa_public_key(p, q, e)
>>> msg = 12
>>> encipher_rsa(msg, puk)
3
"""
n, e = key
return pow(i, e, n)
[docs]def decipher_rsa(i, key):
"""
Return decyption of ``i`` by computing `i^d` (mod `n`),
where ``key`` is the private key `(n, d)`.
Examples
========
>>> from sympy.crypto.crypto import decipher_rsa, rsa_private_key
>>> p, q, e = 3, 5, 7
>>> prk = rsa_private_key(p, q, e)
>>> msg = 3
>>> decipher_rsa(msg, prk)
12
"""
n, d = key
return pow(i, d, n)
#################### kid krypto (kid RSA) #############################
[docs]def kid_rsa_public_key(a, b, A, B):
r"""
Kid RSA is a version of RSA useful to teach grade school children
since it does not involve exponentiation.
Alice wants to talk to Bob. Bob generates keys as follows.
Key generation:
* Select positive integers `a, b, A, B` at random.
* Compute `M = a b - 1`, `e = A M + a`, `d = B M + b`,
`n = (e d - 1)//M`.
* The *public key* is `(n, e)`. Bob sends these to Alice.
* The *private key* is `(n, d)`, which Bob keeps secret.
Encryption: If `p` is the plaintext message then the
ciphertext is `c = p e \pmod n`.
Decryption: If `c` is the ciphertext message then the
plaintext is `p = c d \pmod n`.
Examples
========
>>> from sympy.crypto.crypto import kid_rsa_public_key
>>> a, b, A, B = 3, 4, 5, 6
>>> kid_rsa_public_key(a, b, A, B)
(369, 58)
"""
M = a*b - 1
e = A*M + a
d = B*M + b
n = (e*d - 1)//M
return n, e
[docs]def kid_rsa_private_key(a, b, A, B):
"""
Compute `M = a b - 1`, `e = A M + a`, `d = B M + b`,
`n = (e d - 1) / M`. The *private key* is `d`, which Bob
keeps secret.
Examples
========
>>> from sympy.crypto.crypto import kid_rsa_private_key
>>> a, b, A, B = 3, 4, 5, 6
>>> kid_rsa_private_key(a, b, A, B)
(369, 70)
"""
M = a*b - 1
e = A*M + a
d = B*M + b
n = (e*d - 1)//M
return n, d
[docs]def encipher_kid_rsa(msg, key):
"""
Here ``msg`` is the plaintext and ``key`` is the public key.
Examples
========
>>> from sympy.crypto.crypto import (
... encipher_kid_rsa, kid_rsa_public_key)
>>> msg = 200
>>> a, b, A, B = 3, 4, 5, 6
>>> key = kid_rsa_public_key(a, b, A, B)
>>> encipher_kid_rsa(msg, key)
161
"""
n, e = key
return (msg*e) % n
[docs]def decipher_kid_rsa(msg, key):
"""
Here ``msg`` is the plaintext and ``key`` is the private key.
Examples
========
>>> from sympy.crypto.crypto import (
... kid_rsa_public_key, kid_rsa_private_key,
... decipher_kid_rsa, encipher_kid_rsa)
>>> a, b, A, B = 3, 4, 5, 6
>>> d = kid_rsa_private_key(a, b, A, B)
>>> msg = 200
>>> pub = kid_rsa_public_key(a, b, A, B)
>>> pri = kid_rsa_private_key(a, b, A, B)
>>> ct = encipher_kid_rsa(msg, pub)
>>> decipher_kid_rsa(ct, pri)
200
"""
n, d = key
return (msg*d) % n
#################### Morse Code ######################################
morse_char = {
".-": "A", "-...": "B",
"-.-.": "C", "-..": "D",
".": "E", "..-.": "F",
"--.": "G", "....": "H",
"..": "I", ".---": "J",
"-.-": "K", ".-..": "L",
"--": "M", "-.": "N",
"---": "O", ".--.": "P",
"--.-": "Q", ".-.": "R",
"...": "S", "-": "T",
"..-": "U", "...-": "V",
".--": "W", "-..-": "X",
"-.--": "Y", "--..": "Z",
"-----": "0", "----": "1",
"..---": "2", "...--": "3",
"....-": "4", ".....": "5",
"-....": "6", "--...": "7",
"---..": "8", "----.": "9",
".-.-.-": ".", "--..--": ",",
"---...": ":", "-.-.-.": ";",
"..--..": "?", "-...-": "-",
"..--.-": "_", "-.--.": "(",
"-.--.-": ")", ".----.": "'",
"-...-": "=", ".-.-.": "+",
"-..-.": "/", ".--.-.": "@",
"...-..-": "$", "-.-.--": "!"}
char_morse = {v: k for k, v in morse_char.items()}
[docs]def encode_morse(msg, sep='|', mapping=None):
"""
Encodes a plaintext into popular Morse Code with letters
separated by `sep` and words by a double `sep`.
References
==========
.. [1] http://en.wikipedia.org/wiki/Morse_code
Examples
========
>>> from sympy.crypto.crypto import encode_morse
>>> msg = 'ATTACK RIGHT FLANK'
>>> encode_morse(msg)
'.-|-|-|.-|-.-.|-.-||.-.|..|--.|....|-||..-.|.-..|.-|-.|-.-'
"""
mapping = mapping or char_morse
assert sep not in mapping
word_sep = 2*sep
mapping[" "] = word_sep
suffix = msg and msg[-1] in whitespace
# normalize whitespace
msg = (' ' if word_sep else '').join(msg.split())
# omit unmapped chars
chars = set(''.join(msg.split()))
ok = set(mapping.keys())
msg = translate(msg, None, ''.join(chars - ok))
morsestring = []
words = msg.split()
for word in words:
morseword = []
for letter in word:
morseletter = mapping[letter]
morseword.append(morseletter)
word = sep.join(morseword)
morsestring.append(word)
return word_sep.join(morsestring) + (word_sep if suffix else '')
[docs]def decode_morse(msg, sep='|', mapping=None):
"""
Decodes a Morse Code with letters separated by `sep`
(default is '|') and words by `word_sep` (default is '||)
into plaintext.
References
==========
.. [1] http://en.wikipedia.org/wiki/Morse_code
Examples
========
>>> from sympy.crypto.crypto import decode_morse
>>> mc = '--|---|...-|.||.|.-|...|-'
>>> decode_morse(mc)
'MOVE EAST'
"""
mapping = mapping or morse_char
word_sep = 2*sep
characterstring = []
words = msg.strip(word_sep).split(word_sep)
for word in words:
letters = word.split(sep)
chars = [mapping[c] for c in letters]
word = ''.join(chars)
characterstring.append(word)
rv = " ".join(characterstring)
return rv
#################### LFSRs ##########################################
[docs]def lfsr_sequence(key, fill, n):
r"""
This function creates an lfsr sequence.
INPUT:
``key``: a list of finite field elements,
`[c_0, c_1, \ldots, c_k].`
``fill``: the list of the initial terms of the lfsr
sequence, `[x_0, x_1, \ldots, x_k].`
``n``: number of terms of the sequence that the
function returns.
OUTPUT:
The lfsr sequence defined by
`x_{n+1} = c_k x_n + \ldots + c_0 x_{n-k}`, for
`n \leq k`.
Notes
=====
S. Golomb [G]_ gives a list of three statistical properties a
sequence of numbers `a = \{a_n\}_{n=1}^\infty`,
`a_n \in \{0,1\}`, should display to be considered
"random". Define the autocorrelation of `a` to be
.. math::
C(k) = C(k,a) = \lim_{N\rightarrow \infty} {1\over N}\sum_{n=1}^N (-1)^{a_n + a_{n+k}}.
In the case where `a` is periodic with period
`P` then this reduces to
.. math::
C(k) = {1\over P}\sum_{n=1}^P (-1)^{a_n + a_{n+k}}.
Assume `a` is periodic with period `P`.
- balance:
.. math::
\left|\sum_{n=1}^P(-1)^{a_n}\right| \leq 1.
- low autocorrelation:
.. math::
C(k) = \left\{ \begin{array}{cc} 1,& k = 0,\\ \epsilon, & k \ne 0. \end{array} \right.
(For sequences satisfying these first two properties, it is known
that `\epsilon = -1/P` must hold.)
- proportional runs property: In each period, half the runs have
length `1`, one-fourth have length `2`, etc.
Moreover, there are as many runs of `1`'s as there are of
`0`'s.
References
==========
.. [G] Solomon Golomb, Shift register sequences, Aegean Park Press,
Laguna Hills, Ca, 1967
Examples
========
>>> from sympy.crypto.crypto import lfsr_sequence
>>> from sympy.polys.domains import FF
>>> F = FF(2)
>>> fill = [F(1), F(1), F(0), F(1)]
>>> key = [F(1), F(0), F(0), F(1)]
>>> lfsr_sequence(key, fill, 10)
[1 mod 2, 1 mod 2, 0 mod 2, 1 mod 2, 0 mod 2,
1 mod 2, 1 mod 2, 0 mod 2, 0 mod 2, 1 mod 2]
"""
if not isinstance(key, list):
raise TypeError("key must be a list")
if not isinstance(fill, list):
raise TypeError("fill must be a list")
p = key[0].mod
F = FF(p)
s = fill
k = len(fill)
L = []
for i in range(n):
s0 = s[:]
L.append(s[0])
s = s[1:k]
x = sum([int(key[i]*s0[i]) for i in range(k)])
s.append(F(x))
return L # use [x.to_int() for x in L] for int version
[docs]def lfsr_autocorrelation(L, P, k):
"""
This function computes the LFSR autocorrelation function.
INPUT:
``L``: is a periodic sequence of elements of `GF(2)`.
``L`` must have length larger than ``P``.
``P``: the period of ``L``
``k``: an integer (`0 < k < p`)
OUTPUT:
the ``k``-th value of the autocorrelation of the LFSR ``L``
Examples
========
>>> from sympy.crypto.crypto import (
... lfsr_sequence, lfsr_autocorrelation)
>>> from sympy.polys.domains import FF
>>> F = FF(2)
>>> fill = [F(1), F(1), F(0), F(1)]
>>> key = [F(1), F(0), F(0), F(1)]
>>> s = lfsr_sequence(key, fill, 20)
>>> lfsr_autocorrelation(s, 15, 7)
-1/15
>>> lfsr_autocorrelation(s, 15, 0)
1
"""
if not isinstance(L, list):
raise TypeError("L (=%s) must be a list" % L)
P = int(P)
k = int(k)
L0 = L[:P] # slices makes a copy
L1 = L0 + L0[:k]
L2 = [(-1)**(L1[i].to_int() + L1[i + k].to_int()) for i in range(P)]
tot = sum(L2)
return Rational(tot, P)
[docs]def lfsr_connection_polynomial(s):
"""
This function computes the LFSR connection polynomial.
INPUT:
``s``: a sequence of elements of even length, with entries in
a finite field
OUTPUT:
``C(x)``: the connection polynomial of a minimal LFSR yielding
``s``.
This implements the algorithm in section 3 of J. L. Massey's
article [M]_.
References
==========
.. [M] James L. Massey, "Shift-Register Synthesis and BCH Decoding."
IEEE Trans. on Information Theory, vol. 15(1), pp. 122-127,
Jan 1969.
Examples
========
>>> from sympy.crypto.crypto import (
... lfsr_sequence, lfsr_connection_polynomial)
>>> from sympy.polys.domains import FF
>>> F = FF(2)
>>> fill = [F(1), F(1), F(0), F(1)]
>>> key = [F(1), F(0), F(0), F(1)]
>>> s = lfsr_sequence(key, fill, 20)
>>> lfsr_connection_polynomial(s)
x**4 + x + 1
>>> fill = [F(1), F(0), F(0), F(1)]
>>> key = [F(1), F(1), F(0), F(1)]
>>> s = lfsr_sequence(key, fill, 20)
>>> lfsr_connection_polynomial(s)
x**3 + 1
>>> fill = [F(1), F(0), F(1)]
>>> key = [F(1), F(1), F(0)]
>>> s = lfsr_sequence(key, fill, 20)
>>> lfsr_connection_polynomial(s)
x**3 + x**2 + 1
>>> fill = [F(1), F(0), F(1)]
>>> key = [F(1), F(0), F(1)]
>>> s = lfsr_sequence(key, fill, 20)
>>> lfsr_connection_polynomial(s)
x**3 + x + 1
"""
# Initialization:
p = s[0].mod
F = FF(p)
x = Symbol("x")
C = 1*x**0
B = 1*x**0
m = 1
b = 1*x**0
L = 0
N = 0
while N < len(s):
if L > 0:
dC = Poly(C).degree()
r = min(L + 1, dC + 1)
coeffsC = [C.subs(x, 0)] + [C.coeff(x**i)
for i in range(1, dC + 1)]
d = (s[N].to_int() + sum([coeffsC[i]*s[N - i].to_int()
for i in range(1, r)])) % p
if L == 0:
d = s[N].to_int()*x**0
if d == 0:
m += 1
N += 1
if d > 0:
if 2*L > N:
C = (C - d*((b**(p - 2)) % p)*x**m*B).expand()
m += 1
N += 1
else:
T = C
C = (C - d*((b**(p - 2)) % p)*x**m*B).expand()
L = N + 1 - L
m = 1
b = d
B = T
N += 1
dC = Poly(C).degree()
coeffsC = [C.subs(x, 0)] + [C.coeff(x**i) for i in range(1, dC + 1)]
return sum([coeffsC[i] % p*x**i for i in range(dC + 1)
if coeffsC[i] is not None])
#################### ElGamal #############################
[docs]def elgamal_private_key(digit=10, seed=None):
"""
Return three number tuple as private key.
Elgamal encryption is based on the mathmatical problem
called the Discrete Logarithm Problem (DLP). For example,
`a^{b} \equiv c \pmod p`
In general, if ``a`` and ``b`` are known, ``ct`` is easily
calculated. If ``b`` is unknown, it is hard to use
``a`` and ``ct`` to get ``b``.
Parameters
==========
digit : minimum number of binary digits for key
Returns
=======
(p, r, d) : p = prime number, r = primitive root, d = random number
Notes
=====
For testing purposes, the ``seed`` parameter may be set to control
the output of this routine. See sympy.utilities.randtest._randrange.
Examples
========
>>> from sympy.crypto.crypto import elgamal_private_key
>>> from sympy.ntheory import is_primitive_root, isprime
>>> a, b, _ = elgamal_private_key()
>>> isprime(a)
True
>>> is_primitive_root(b, a)
True
"""
randrange = _randrange(seed)
p = nextprime(2**digit)
return p, primitive_root(p), randrange(2, p)
[docs]def elgamal_public_key(key):
"""
Return three number tuple as public key.
Parameters
==========
key : Tuple (p, r, e) generated by ``elgamal_private_key``
Returns
=======
(p, r, e = r**d mod p) : d is a random number in private key.
Examples
========
>>> from sympy.crypto.crypto import elgamal_public_key
>>> elgamal_public_key((1031, 14, 636))
(1031, 14, 212)
"""
p, r, e = key
return p, r, pow(r, e, p)
[docs]def encipher_elgamal(i, key, seed=None):
"""
Encrypt message with public key
``i`` is a plaintext message expressed as an integer.
``key`` is public key (p, r, e). In order to encrypt
a message, a random number ``a`` in ``range(2, p)``
is generated and the encryped message is returned as
`c_{1}` and `c_{2}` where:
`c_{1} \equiv r^{a} \pmod p`
`c_{2} \equiv m e^{a} \pmod p`
Parameters
==========
msg : int of encoded message
key : public key
Returns
=======
(c1, c2) : Encipher into two number
Notes
=====
For testing purposes, the ``seed`` parameter may be set to control
the output of this routine. See sympy.utilities.randtest._randrange.
Examples
========
>>> from sympy.crypto.crypto import encipher_elgamal, elgamal_private_key, elgamal_public_key
>>> pri = elgamal_private_key(5, seed=[3]); pri
(37, 2, 3)
>>> pub = elgamal_public_key(pri); pub
(37, 2, 8)
>>> msg = 36
>>> encipher_elgamal(msg, pub, seed=[3])
(8, 6)
"""
p, r, e = key
if i < 0 or i >= p:
raise ValueError(
'Message (%s) should be in range(%s)' % (i, p))
randrange = _randrange(seed)
a = randrange(2, p)
return pow(r, a, p), i*pow(e, a, p) % p
[docs]def decipher_elgamal(msg, key):
r"""
Decrypt message with private key
`msg = (c_{1}, c_{2})`
`key = (p, r, d)`
According to extended Eucliden theorem,
`u c_{1}^{d} + p n = 1`
`u \equiv 1/{{c_{1}}^d} \pmod p`
`u c_{2} \equiv \frac{1}{c_{1}^d} c_{2} \equiv \frac{1}{r^{ad}} c_{2} \pmod p`
`\frac{1}{r^{ad}} m e^a \equiv \frac{1}{r^{ad}} m {r^{d a}} \equiv m \pmod p`
Examples
========
>>> from sympy.crypto.crypto import decipher_elgamal
>>> from sympy.crypto.crypto import encipher_elgamal
>>> from sympy.crypto.crypto import elgamal_private_key
>>> from sympy.crypto.crypto import elgamal_public_key
>>> pri = elgamal_private_key(5, seed=[3])
>>> pub = elgamal_public_key(pri); pub
(37, 2, 8)
>>> msg = 17
>>> decipher_elgamal(encipher_elgamal(msg, pub), pri) == msg
True
"""
p, r, d = key
c1, c2 = msg
u = igcdex(c1**d, p)[0]
return u * c2 % p
################ Diffie-Hellman Key Exchange #########################
[docs]def dh_private_key(digit=10, seed=None):
"""
Return three integer tuple as private key.
Diffie-Hellman key exchange is based on the mathematical problem
called the Discrete Logarithm Problem (see ElGamal).
Diffie-Hellman key exchange is divided into the following steps:
* Alice and Bob agree on a base that consist of a prime ``p``
and a primitive root of ``p`` called ``g``
* Alice choses a number ``a`` and Bob choses a number ``b`` where
``a`` and ``b`` are random numbers in range `[2, p)`. These are
their private keys.
* Alice then publicly sends Bob `g^{a} \pmod p` while Bob sends
Alice `g^{b} \pmod p`
* They both raise the received value to their secretly chosen
number (``a`` or ``b``) and now have both as their shared key
`g^{ab} \pmod p`
Parameters
==========
digit: minimum number of binary digits required in key
Returns
=======
(p, g, a) : p = prime number, g = primitive root of p,
a = random number from 2 thru p - 1
Notes
=====
For testing purposes, the ``seed`` parameter may be set to control
the output of this routine. See sympy.utilities.randtest._randrange.
Examples
========
>>> from sympy.crypto.crypto import dh_private_key
>>> from sympy.ntheory import isprime, is_primitive_root
>>> p, g, _ = dh_private_key()
>>> isprime(p)
True
>>> is_primitive_root(g, p)
True
>>> p, g, _ = dh_private_key(5)
>>> isprime(p)
True
>>> is_primitive_root(g, p)
True
"""
p = nextprime(2**digit)
g = primitive_root(p)
randrange = _randrange(seed)
a = randrange(2, p)
return p, g, a
[docs]def dh_public_key(key):
"""
Return three number tuple as public key.
This is the tuple that Alice sends to Bob.
Parameters
==========
key: Tuple (p, g, a) generated by ``dh_private_key``
Returns
=======
(p, g, g^a mod p) : p, g and a as in Parameters
Examples
========
>>> from sympy.crypto.crypto import dh_private_key, dh_public_key
>>> p, g, a = dh_private_key();
>>> _p, _g, x = dh_public_key((p, g, a))
>>> p == _p and g == _g
True
>>> x == pow(g, a, p)
True
"""
p, g, a = key
return p, g, pow(g, a, p)
[docs]def dh_shared_key(key, b):
"""
Return an integer that is the shared key.
This is what Bob and Alice can both calculate using the public
keys they received from each other and their private keys.
Parameters
==========
key: Tuple (p, g, x) generated by ``dh_public_key``
b: Random number in the range of 2 to p - 1
(Chosen by second key exchange member (Bob))
Returns
=======
shared key (int)
Examples
========
>>> from sympy.crypto.crypto import (
... dh_private_key, dh_public_key, dh_shared_key)
>>> prk = dh_private_key();
>>> p, g, x = dh_public_key(prk);
>>> sk = dh_shared_key((p, g, x), 1000)
>>> sk == pow(x, 1000, p)
True
"""
p, _, x = key
if 1 >= b or b >= p:
raise ValueError(filldedent('''
Value of b should be greater 1 and less
than prime %s.''' % p))
return pow(x, b, p)


Boeing 737 Max expected to go back in service March 5
by FOX23.comAmerican Airlines announced the Boeing 737 Max is expected to be back in service March 5, 2020.
American Airlines says it stayed in contact with the Federal Aviation Administration, Department of Transportation and Boeing.
When the planes are certified, American expects to run exhibition flights, or flights for American team members and invited guests only, before March 5.
Passengers who had flights booked on a Max through Jan. 15 will have a schedule change Nov. 17, and customers who were booked on a Max through March 5 can see reservation updates on aa.com.
American reservations team will contact anyone impacted by email or telephone starting Nov. 17. Customers who booked through a travel agency will be contacted by the travel agency.
Southwest Airlines has pushed back the return of its Boeing 737 Max jets as Boeing tries to fix the aircraft following two deadly crashes.
Southwest said Friday that it will keep its Max jets out of its schedule until March 6, about a month longer than previously planned, citing continued uncertainty.
The airline says it’s monitoring information from Boeing and the Federal Aviation Administration about software improvements and pilot-training requirements that will be part of returning the plane to flight.
The Associated Press contributed to this report.


| Apache Struts 2 Documentation > Home > Guides > Plugin Guide |
| Struts 1 provided a plugin class that provided listener-like capabilities. The Struts 2 plugins are like Eclipse or FireFox plugins, and not at all like Struts 1 "plugins". |
A Struts 2 plugin is a single JAR that class and/or configuration that extend, replace, or add to existing Struts framework functionality. A plugin can be installed by adding a JAR file to the application's class path. To configure the plugin, the JAR may contain a
struts-plugin.xml, which follows the same format as an ordinary struts.xml file.
Since a plugin can contain the struts-plugin.xml file, it has the ability to:
Many popular but optional features of the framework are distributed as plugins. An application can retain all the plugins provided with the distribution, or just include the ones it uses. Plugins can be used to organize application code or to distribute code to third-parties.
|
Plugins are not loaded in any particular order. Plugins should not have dependencies on each other. A plugins may depend on classes provided by Struts Core, but it should not depend on classes loaded by another plugin. |
The framework loads its default configuration first, then any plugin configuration files found in others JARs on the classpath, and finally the "bootstrap" struts.xml.
Since the struts.xml file is always loaded last, it can make use of any resources provided by the plugins bundled with the distribution, or any other plugins available to an application.
Extension points allow a plugin to override a key class in the Struts framework with an alternate implemention. For example, a plugin could provide a new class to create Action classes or map requests to Actions.
The following extension points are available in Struts 2:
| Type | Property | Scope | Description |
|---|---|---|---|
| com.opensymphony.xwork2.ObjectFactory | struts.objectFactory | singleton | Creates actions, results, and interceptors |
| com.opensymphony.xwork2.ActionProxyFactory | struts.actionProxyFactory | singleton | Creates the ActionProxy |
| com.opensymphony.xwork2.util.ObjectTypeDeterminer | struts.objectTypeDeterminer | singleton | Determines what the key and and element class of a Map or Collection should be |
| org.apache.struts2.dispatcher.mapper.ActionMapper | struts.mapper.class | singleton | Determines the ActionMapping from a request and a URI from an ActionMapping |
| org.apache.struts2.dispatcher.multipart.MultiPartRequest | struts.multipart.parser | per request | Parses a multipart request (file upload) |
| org.apache.struts2.views.freemarker.FreemarkerManager | struts.freemarker.manager.classname | singleton | Loads and processes Freemarker templates |
| org.apache.struts2.views.velocity.VelocityManager | struts.velocity.manager.classname | singleton | Loads and processes Velocity templates |
Let's look at two similar but different plugins bundled with the core distribution.
SiteMesh is a popular alternative to Tiles. SiteMesh provides a common look-and-feel to an application's pages by automatically wrapping a plain page with common elements like headers and menubars.
The sitemesh-plugin.jar contains several classes, a standard JAR manifest, and a plugin configuration file.
+ META-INF/ + manifest.mf + org + apache + struts2 + sitemesh + FreeMarkerPageFilter.class + TemplatePageFilter.class + VelocityPageFilter.class + struts-plugin.xml
While the SiteMesh Plugin doesn't provide any new results, interceptors, or actions, or even extend any Struts integration points, it does need to know what settings have been enabled in the Struts framework. Therefore, its struts-plugin.xml looks like this:
<?xml version="1.0" encoding="UTF-8" ?> <!DOCTYPE struts PUBLIC "-//Apache Software Foundation//DTD Struts Configuration 2.0//EN" "http://struts.apache.org/dtds/struts-2.0.dtd"> <struts> <bean class="org.apache.struts2.sitemesh.FreeMarkerPageFilter" static="true" optional="true"/> <bean class="org.apache.struts2.sitemesh.VelocityPageFilter" static="true" optional="true"/> </struts>
The two bean elements, with the "static" flag enabled, tell Struts to inject the current settings and framework objects into static property setters on startup. This allows, for example, the FreeMarkerPageFilter class to get an instance of the Struts FreemarkerManager and the current encoding setting.
Tiles is a popular alternative to SiteMesh. Tiles provides a common look-and-feel to an application's pages by breaking the page down into common fragments or "tiles".
The tiles-plugin.jar contains several classes, a standard JAR manifest, and a configuration file.
+ META-INF/ + manifest.mf + org + apache + struts2 + tiles + StrutsTilesListener.class + StrutsTileUtilImpl.class + views + tiles + TilesResult.class + struts-plugin.xml
Since the Tiles Plugin does need to register configuration elements, a result class, it provides a struts-plugin.xml file.
Several plugins are available that extend the framework's capabilities.


Answer
<IP_ADDRESS>
.
China, with
\(1.05*10^{10}\)
tons of CO2 in 2019, had higher emissions than any other region, because the exponent is larger than any other.
in-context


C++ RAII interface for manipulating events. More...
#include <event.h>
Public Member Functions | |
| event (af_event e) | |
| Create a new event using the C af_event handle. | |
| event () | |
| Create a new event object. | |
| ~event () | |
| event Destructor | |
| af_event | get () const |
| Return the underlying C af_event handle. | |
| void | mark () |
| Adds the event on the default ArrayFire queue. | |
| void | enqueue () |
| Block the ArrayFire queue until this even has occurred. | |
| void | block () const |
| block the calling thread until this event has occurred | |
| event | ( | ) |
Create a new event object.
| ~event | ( | ) |
event Destructor
| void block | ( | ) | const |
block the calling thread until this event has occurred
| void enqueue | ( | ) |
Block the ArrayFire queue until this even has occurred.
| af_event get | ( | ) | const |
Return the underlying C af_event handle.
| void mark | ( | ) |
Adds the event on the default ArrayFire queue.
Once this point on the program is executed, the event is considered complete.


---
layout: default
title: Everybody Votes Channel - Austria German Results
---
February 10, 2007:
Was tust du lieber?
Essen: 55.2%
Schlafen: 44.8%
Detailed Results:
Results by Gender:
Male: 46.5% 53.5%
Female: 37.3% 62.7%
National Prediction Accuracy: 53.8%
February 13, 2007:
Was tust du in deiner Freizeit?
Party!!!: 73.2%
Zuhause entspannen: 26.8%
Detailed Results:
Results by Gender:
Male: 28.4% 71.6%
Female: 19.9% 80.1%
National Prediction Accuracy: 32.5%
February 15, 2007:
Gibt es Außerirdische?
Ja: 30.9%
Nein: 69.1%
Detailed Results:
Results by Gender:
Male: 72.0% 28.0%
Female: 56.9% 43.1%
National Prediction Accuracy: 65.4%
February 17, 2007:
Welche Superkraft hättest du gern?
Röntgenblick: 75.7%
Flug: 24.3%
Detailed Results:
Results by Gender:
Male: 25.0% 75.0%
Female: 21.5% 78.5%
National Prediction Accuracy: 69.9%
February 20, 2007:
Was ist wichtiger?
Liebe: 20.9%
Geld: 79.1%
Detailed Results:
Results by Gender:
Male: 76.1% 23.9%
Female: 91.0% 9.0%
National Prediction Accuracy: 79.2%
February 22, 2007:
Was trinkst du lieber?
Tee: 46.4%
Kaffee: 53.6%
Detailed Results:
Results by Gender:
Male: 52.5% 47.5%
Female: 57.9% 42.1%
National Prediction Accuracy: 21.5%
February 24, 2007:
Welches Tier ist Furcht einflößender?
Schlange: 56.6%
Spinne: 43.4%
Detailed Results:
Results by Gender:
Male: 44.1% 55.9%
Female: 40.6% 59.4%
National Prediction Accuracy: 64.6%
February 27, 2007:
Was isst du lieber?
Pizza: 33.3%
Pasta: 66.7%
Detailed Results:
Results by Gender:
Male: 71.9% 28.1%
Female: 46.3% 53.7%
National Prediction Accuracy: 87.9%
March 10, 2007:
Was bist du?
Frühaufsteher: 70.0%
Nachtschwärmer: 30.0%
Detailed Results:
Results by Gender:
Male: 26.9% 73.1%
Female: 42.4% 57.6%
National Prediction Accuracy: 82.5%
March 13, 2007:
Was wärst du lieber?
Löwe: 67.8%
Tiger: 32.2%
Detailed Results:
Results by Gender:
Male: 32.2% 67.8%
Female: 32.4% 67.6%
National Prediction Accuracy: 44.0%
March 15, 2007:
Wenn du Musiker wärst...
Pianist: 64.1%
Gitarrist: 35.9%
Detailed Results:
Results by Gender:
Male: 33.3% 66.7%
Female: 46.1% 53.9%
National Prediction Accuracy: 88.2%
March 17, 2007:
Wo gibt's das beste Essen?
Daheim: 42.0%
Im Restaurant: 58.0%
Detailed Results:
Results by Gender:
Male: 57.2% 42.8%
Female: 61.2% 38.8%
National Prediction Accuracy: 58.1%
March 20, 2007:
Spinat...
Hui!: 34.6%
Pfui!: 65.4%
Detailed Results:
Results by Gender:
Male: 63.2% 36.8%
Female: 74.6% 25.4%
National Prediction Accuracy: 25.7%
March 22, 2007:
Hast du jemals ein Geschenk\nweiter verschenkt?
Ja: 50.7%
Nein: 49.3%
Detailed Results:
Results by Gender:
Male: 46.4% 53.6%
Female: 61.2% 38.8%
National Prediction Accuracy: 42.4%
March 24, 2007:
Welche Tiere magst du lieber?
Katzen: 41.6%
Hunde: 58.4%
Detailed Results:
Results by Gender:
Male: 58.6% 41.4%
Female: 57.6% 42.4%
National Prediction Accuracy: 35.8%
March 27, 2007:
Welchen Sport findest du interessanter?
Tennis: 29.6%
Golf: 70.4%
Detailed Results:
Results by Gender:
Male: 68.9% 31.1%
Female: 77.1% 22.9%
National Prediction Accuracy: 86.0%
March 29, 2007:
Welchen Geschmack magst du lieber?
Pikant: 53.7%
Süß: 46.3%
Detailed Results:
Results by Gender:
Male: 49.4% 50.6%
Female: 34.4% 65.6%
National Prediction Accuracy: 81.4%
March 31, 2007:
Glaubst du an Horoskope?
Ja: 82.3%
Nein: 17.7%
Detailed Results:
Results by Gender:
Male: 15.2% 84.8%
Female: 27.7% 72.3%
National Prediction Accuracy: 62.2%


MEN
Koto O'Hanlon Cardigan
$150.00
Multicolor Shirt
$95.00
Sprinter Jogger
$125.00
Duck Boots
$85.00
WOMEN
Otanical Kimono Jacket
$225.00
Button-Down Shirt
$85.00
Camouflage Joggers
$100.00
Puma Sneakers
$90.00
BLOG
Music Monday:
Five fresh tracks for a
fresh week—including new
ones from...
Thursday Tip-Off
Our Thursday Tip-Off
series is a weekly set of
tips, suggestions...
Journal: On Display
Journal, a new print
publication hat represents
the culture at and ...


Example script to demonstrate adding buttons, sliders and a touchable gradient to control material values at runtime.
More...
|
| void | ClickGradientTexture (MixedRealityPointerEventData eventData) |
| | Touching the gradient texture will calculate the color and constrain the dragger based on the point in eventData More...
|
| |
| void | StartDragGradient () |
| | Tells the update loop that the gradient is being dragged More...
|
| |
| void | StopDragGradient () |
| | Tells the update loop that the gradient is not being dragged, and applies the updated color value to the sliders More...
|
| |
| void | SummonColorPicker (GameObject container) |
| | This will set the visibility, scale, and position of the color picker while extracting the color of the touched object's MeshRenderer or SpriteRender More...
|
| |
| void | UpdateColorHSV () |
| | Applies Hue, Saturation, Brightness slider values to the Red, Green, Blue sliders More...
|
| |
| void | UpdateColorRGB () |
| | Applies Red, Green, Blue slider values to the Hue, Saturation, Brightness sliders More...
|
| |
| void | ExtractColorFromMaterial (MeshRenderer meshRenderer) |
| | Extracts a color from a MeshRenderer and applies it to the color picker More...
|
| |
| void | StartDrag (GameObject dragger) |
| | Tells the update loop that a slider knob is being dragged More...
|
| |
| void | StopDrag (GameObject dragger) |
| | Tells the update loop that a slider knob is not being dragged and applies the value to all sliders More...
|
| |
Example script to demonstrate adding buttons, sliders and a touchable gradient to control material values at runtime.
◆ ClickGradientTexture()
Touching the gradient texture will calculate the color and constrain the dragger based on the point in eventData
◆ ExtractColorFromMaterial()
| void Microsoft.MixedReality.Toolkit.Experimental.ColorPicker.ColorPicker.ExtractColorFromMaterial |
( |
MeshRenderer |
meshRenderer | ) |
|
Extracts a color from a MeshRenderer and applies it to the color picker
◆ StartDrag()
| void Microsoft.MixedReality.Toolkit.Experimental.ColorPicker.ColorPicker.StartDrag |
( |
GameObject |
dragger | ) |
|
Tells the update loop that a slider knob is being dragged
◆ StartDragGradient()
| void Microsoft.MixedReality.Toolkit.Experimental.ColorPicker.ColorPicker.StartDragGradient |
( |
| ) |
|
Tells the update loop that the gradient is being dragged
◆ StopDrag()
| void Microsoft.MixedReality.Toolkit.Experimental.ColorPicker.ColorPicker.StopDrag |
( |
GameObject |
dragger | ) |
|
Tells the update loop that a slider knob is not being dragged and applies the value to all sliders
◆ StopDragGradient()
| void Microsoft.MixedReality.Toolkit.Experimental.ColorPicker.ColorPicker.StopDragGradient |
( |
| ) |
|
Tells the update loop that the gradient is not being dragged, and applies the updated color value to the sliders
◆ SummonColorPicker()
| void Microsoft.MixedReality.Toolkit.Experimental.ColorPicker.ColorPicker.SummonColorPicker |
( |
GameObject |
container | ) |
|
This will set the visibility, scale, and position of the color picker while extracting the color of the touched object's MeshRenderer or SpriteRender
◆ UpdateColorHSV()
| void Microsoft.MixedReality.Toolkit.Experimental.ColorPicker.ColorPicker.UpdateColorHSV |
( |
| ) |
|
Applies Hue, Saturation, Brightness slider values to the Red, Green, Blue sliders
◆ UpdateColorRGB()
| void Microsoft.MixedReality.Toolkit.Experimental.ColorPicker.ColorPicker.UpdateColorRGB |
( |
| ) |
|
Applies Red, Green, Blue slider values to the Hue, Saturation, Brightness sliders
◆ TargetObjectMesh
| MeshRenderer Microsoft.MixedReality.Toolkit.Experimental.ColorPicker.ColorPicker.TargetObjectMesh |
|
getset |
◆ TargetObjectSprite
| SpriteRenderer Microsoft.MixedReality.Toolkit.Experimental.ColorPicker.ColorPicker.TargetObjectSprite |
|
getset |
The documentation for this class was generated from the following file:
- C:/Users/Thomas Peters/UnityProjects/MoveToCode/Assets/MRTK/SDK/Experimental/ColorPicker/ColorPicker.cs


We put nets on basketball rims.
Our goal is to ensure everyone knows the sweet sound of 'nothing but net'. Instead of waiting for someone else to come and improve our parks, we want to empower communities to take small steps towards bettering and maintaining our surroundings.
If you know of a court that needs nets or you want to get involved, contact us today. Please note, as of right now we only have volunteers in New York City.
<EMAIL_ADDRESS>instagram.com/projectbasketballnet


Welcome to Cat Battle: RPG!

- Defeat all of you enemies to win
- But if your Health decreases to zero before you do, you lose!