Use Cases #
Apache Flink is an excellent choice to develop and run many different types of applications due to its extensive feature set. Flink’s features include support for stream and batch processing, sophisticated state management, event-time processing semantics, and exactly-once consistency guarantees for state. Moreover, Flink can be deployed on various resource providers such as YARN and Kubernetes, but also as a stand-alone cluster on bare-metal hardware. Configured for high availability, Flink does not have a single point of failure. Flink has been proven to scale to thousands of cores and terabytes of application state, delivers high throughput and low latency, and powers some of the world’s most demanding stream processing applications.
Below, we explore the most common types of applications that are powered by Flink and give pointers to real-world examples.
Event-driven Applications #
What are event-driven applications? #
An event-driven application is a stateful application that ingest events from one or more event streams and reacts to incoming events by triggering computations, state updates, or external actions.
Event-driven applications are an evolution of the traditional application design with separated compute and data storage tiers. In this architecture, applications read data from and persist data to a remote transactional database.
In contrast, event-driven applications are based on stateful stream processing applications. In this design, data and computation are co-located, which yields local (in-memory or disk) data access. Fault-tolerance is achieved by periodically writing checkpoints to a remote persistent storage. The figure below depicts the difference between the traditional application architecture and event-driven applications.
What are the advantages of event-driven applications? #
Instead of querying a remote database, event-driven applications access their data locally which yields better performance, both in terms of throughput and latency. The periodic checkpoints to a remote persistent storage can be asynchronously and incrementally done. Hence, the impact of checkpointing on the regular event processing is very small. However, the event-driven application design provides more benefits than just local data access. In the tiered architecture, it is common that multiple applications share the same database. Hence, any change of the database, such as changing the data layout due to an application update or scaling the service, needs to be coordinated. Since each event-driven application is responsible for its own data, changes to the data representation or scaling the application requires less coordination.
How does Flink support event-driven applications? #
The limits of event-driven applications are defined by how well a stream processor can handle time and state. Many of Flink’s outstanding features are centered around these concepts. Flink provides a rich set of state primitives that can manage very large data volumes (up to several terabytes) with exactly-once consistency guarantees. Moreover, Flink’s support for event-time, highly customizable window logic, and fine-grained control of time as provided by the ProcessFunction
enable the implementation of advanced business logic. Moreover, Flink features a library for Complex Event Processing (CEP) to detect patterns in data streams.
However, Flink’s outstanding feature for event-driven applications is savepoint. A savepoint is a consistent state image that can be used as a starting point for compatible applications. Given a savepoint, an application can be updated or adapt its scale, or multiple versions of an application can be started for A/B testing.
What are typical event-driven applications? #
- Fraud detection
- Anomaly detection
- Rule-based alerting
- Business process monitoring
- Web application (social network)
Data Analytics Applications #
What are data analytics applications? #
Analytical jobs extract information and insight from raw data. Traditionally, analytics are performed as batch queries or applications on bounded data sets of recorded events. In order to incorporate the latest data into the result of the analysis, it has to be added to the analyzed data set and the query or application is rerun. The results are written to a storage system or emitted as reports.
With a sophisticated stream processing engine, analytics can also be performed in a real-time fashion. Instead of reading finite data sets, streaming queries or applications ingest real-time event streams and continuously produce and update results as events are consumed. The results are either written to an external database or maintained as internal state. Dashboard application can read the latest results from the external database or directly query the internal state of the application.
Apache Flink supports streaming as well as batch analytical applications as shown in the figure below.
What are the advantages of streaming analytics applications? #
The advantages of continuous streaming analytics compared to batch analytics are not limited to a much lower latency from events to insight due to elimination of periodic import and query execution. In contrast to batch queries, streaming queries do not have to deal with artificial boundaries in the input data which are caused by periodic imports and the bounded nature of the input.
Another aspect is a simpler application architecture. A batch analytics pipeline consist of several independent components to periodically schedule data ingestion and query execution. Reliably operating such a pipeline is non-trivial because failures of one component affect the following steps of the pipeline. In contrast, a streaming analytics application which runs on a sophisticated stream processor like Flink incorporates all steps from data ingestions to continuous result computation. Therefore, it can rely on the engine’s failure recovery mechanism.
How does Flink support data analytics applications? #
Flink provides very good support for continuous streaming as well as batch analytics. Specifically, it features an ANSI-compliant SQL interface with unified semantics for batch and streaming queries. SQL queries compute the same result regardless whether they are run on a static data set of recorded events or on a real-time event stream. Rich support for user-defined functions ensures that custom code can be executed in SQL queries. If even more custom logic is required, Flink’s DataStream API or DataSet API provide more low-level control.
What are typical data analytics applications? #
- Quality monitoring of Telco networks
- Analysis of product updates & experiment evaluation in mobile applications
- Ad-hoc analysis of live data in consumer technology
- Large-scale graph analysis
Data Pipeline Applications #
What are data pipelines? #
Extract-transform-load (ETL) is a common approach to convert and move data between storage systems. Often ETL jobs are periodically triggered to copy data from transactional database systems to an analytical database or a data warehouse.
Data pipelines serve a similar purpose as ETL jobs. They transform and enrich data and can move it from one storage system to another. However, they operate in a continuous streaming mode instead of being periodically triggered. Hence, they are able to read records from sources that continuously produce data and move it with low latency to their destination. For example a data pipeline might monitor a file system directory for new files and write their data into an event log. Another application might materialize an event stream to a database or incrementally build and refine a search index.
The figure below depicts the difference between periodic ETL jobs and continuous data pipelines.
What are the advantages of data pipelines? #
The obvious advantage of continuous data pipelines over periodic ETL jobs is the reduced latency of moving data to its destination. Moreover, data pipelines are more versatile and can be employed for more use cases because they are able to continuously consume and emit data.
How does Flink support data pipelines? #
Many common data transformation or enrichment tasks can be addressed by Flink’s SQL interface (or Table API) and its support for user-defined functions. Data pipelines with more advanced requirements can be realized by using the DataStream API which is more generic. Flink provides a rich set of connectors to various storage systems such as Kafka, Kinesis, Elasticsearch, and JDBC database systems. It also features continuous sources for file systems that monitor directories and sinks that write files in a time-bucketed fashion.
What are typical data pipeline applications? #
- Real-time search index building in e-commerce
- Continuous ETL in e-commerce


WinData is a new way to access data portals. Forget the old ways of downloading the files, now you can view it directly in your browser and increase your productivity. You can also download the files if you want with just one simple click away.
This dataset is about the official elections from 2010. You will find the votes and runners in the election
Go to DatasetThese point files contain the Name, Address, URL and X & Y Coordinates of each of the City's owned and operated arenas.
Go to DatasetThese point files contain the name, address and X&Y Coordinates of each of the City’s hospitals.
Go to Dataset


Toggle navigation
HOME
Emergency Disaster Management
Registration Form
First Name
Last Name
Home Address
City
State
Zip
Office Address
City
State
Zip
Title
<<<<<<< HEAD
PhoneNumber
Mobile
Home
Office
=======
PhoneNumber
Home
City
State
Zip
>>>>>>> cc92f97de14bf43abb9241933a8f39faaa69bb90
Email Address
Website
Submit


|
Simbody
3.5
|
This subclass of Contact represents a contact between two non-conforming surfaces 1 and 2 that initially meet at a point and where each surface has two principal curvatures (maximum and minimum) in perpendicular directions. More...
Public Member Functions | |
| EllipticalPointContact (ContactSurfaceIndex surf1, ContactSurfaceIndex surf2, const Transform &X_S1S2, const Transform &X_S1C, const Vec2 &k, Real depth) | |
| Create a EllipticalPointContact object. More... | |
| const Vec2 & | getCurvatures () const |
| Get the relative curvatures at the contact point, ordered kmax,kmin with kmax >= kmin. More... | |
| const Transform & | getContactFrame () const |
| Get the frame C in which the contact paraboloid is expressed, as the transform X_S1C. More... | |
| Real | getDepth () const |
| Get the penetration depth (>0) or separation distance (<0), also known as the "approach". More... | |
| Public Member Functions inherited from SimTK::Contact | |
| Contact () | |
| The default constructor creates an empty handle. More... | |
| Contact (const Contact &source) | |
| Copy constructor is shallow and reference-counted; this handle will point to the same object as does the source. More... | |
| ~Contact () | |
| Destructor clears the handle, deleting the referenced object if this was the last reference. More... | |
| Contact & | operator= (const Contact &source) |
| Copy assignment is shallow and reference-counted; this handle will point to the same object as does the source. More... | |
| void | clear () |
| Clear this handle, deleting the referenced object if this was the last reference. More... | |
| bool | isEmpty () const |
| See if this handle is empty. More... | |
| ContactId | getContactId () const |
| Get the persistent ContactId that has been assigned to this Contact object if there is one (otherwise this will be invalid – you can check with isValid(). More... | |
| Condition | getCondition () const |
| Find out the current condition of this Contact object. More... | |
| ContactSurfaceIndex | getSurface1 () const |
| Get the first surface involved in the contact, specified by its index within its contact set or ContactTrackerSubsystem. More... | |
| ContactSurfaceIndex | getSurface2 () const |
| Get the second surface involved in the contact, specified by its index within its contact set or ContactTrackerSubsystem. More... | |
| const Transform & | getTransform () const |
| Return the transform X_S1S2 giving the pose of surface 2's frame measured and expressed in surface 1's frame, recorded at the time this Contact object was calculated. More... | |
| Contact & | setContactId (ContactId id) |
| Set the ContactId for this Contact object. More... | |
| Contact & | setCondition (Condition condition) |
| Set the current Condition. More... | |
| Contact & | setSurfaces (ContactSurfaceIndex surf1, ContactSurfaceIndex surf2) |
| Set the surfaces tracked by this Contact object. More... | |
| Contact & | setTransform (const Transform &X_S1S2) |
| Set the surface-to-surface relative transform X_S1S2. More... | |
| ContactTypeId | getTypeId () const |
| Return a unique small integer corresponding to the concrete type of Contact object being referenced by this handle. More... | |
| const ContactImpl & | getImpl () const |
| ContactImpl & | updImpl () |
Static Public Member Functions | |
| static bool | isInstance (const Contact &contact) |
| Determine whether a Contact object is an EllipticalPointContact. More... | |
| static const EllipticalPointContact & | getAs (const Contact &contact) |
| static EllipticalPointContact & | updAs (Contact &contact) |
| static ContactTypeId | classTypeId () |
| Get the unique small-integer id for the CircularPointContact class. More... | |
| Static Public Member Functions inherited from SimTK::Contact | |
| static const char * | nameOfCondition (Condition) |
| Returns a human-readable name corresponding to the given Condition; useful for debugging. More... | |
| static ContactId | createNewContactId () |
| This creates a new ContactId starting from 1 and increasing for a very long time (to a billion or so) before repeating. More... | |
Additional Inherited Members | |
| Public Types inherited from SimTK::Contact | |
| enum | Condition { Unknown, Untracked, Anticipated, NewContact, Ongoing, Broken } |
| The Contact::Condition tracks the status of a Contact through its lifetime. More... | |
| Protected Member Functions inherited from SimTK::Contact | |
| Contact (ContactImpl *impl) | |
This subclass of Contact represents a contact between two non-conforming surfaces 1 and 2 that initially meet at a point and where each surface has two principal curvatures (maximum and minimum) in perpendicular directions.
The prototypical example is ellipsoid-ellipsoid contact, but this includes a wide range of contacts between smooth surfaces, where the surfaces have two continuous spatial derivatives at the contact point. The contact plane on each surface is parameterized by its principal curvature directions x,y with the surface's contact point at the origin, and the common normal as the z axis. The surface is thus approximated by a paraboloid z=Ax^2+By^2 for which A=kx/2, B=ky/2 where kx,ky are the curvatures in the x,y directions. Here A>=0, A>=B, but B can be negative indicating a hyperbolic paraboloid (saddle). Each surface is parameterized separately: the z axes are along the same line, but the x,y axes are relatively rotated about z by an angle theta, with cos(theta)=dot(x1,x2)=dot(y1,y2).
The surface of relative separation of the two surfaces will also be a paraboloid, sharing the z axis with the contact surfaces but having its own relative principal curvatures and directions. The undeformed contact is ultimately characterized by this relative paraboloid and a penetration depth d (d>0 when surfaces overlap, <0 when separated), in a contact frame where x,y are the relative principal curvature directions, z is the common normal oriented to point away from surface1, and the origin OP is centered such that the surface2 contact point is at O-(d/2)z and surface1 contact point is at O+(d/2)z.
| SimTK::EllipticalPointContact::EllipticalPointContact | ( | ContactSurfaceIndex | surf1, |
| ContactSurfaceIndex | surf2, | ||
| const Transform & | X_S1S2, | ||
| const Transform & | X_S1C, | ||
| const Vec2 & | k, | ||
| Real | depth | ||
| ) |
Create a EllipticalPointContact object.
| surf1 | the index of the first surface involved in the contact |
| surf2 | the index of the second surface involved in the contact |
| X_S1S2 | the surface-to-surface relative transform |
| X_S1C | contact paraboloid coordinate frame C in S1 frame; x is kmax direction, y is kmin direction, z points away from surf1; origin OC is at midpoint between contact points on the two surfaces |
| k | maximum and minimum curvatures kmax,kmin of the relative contact paraboloid |
| depth | penetration depth d(>0) or separation (<0); surf1 contact pt at OC+(d/2)z, surf2 contact pt at OC-(d/2)z |
| const Vec2& SimTK::EllipticalPointContact::getCurvatures | ( | ) | const |
Get the relative curvatures at the contact point, ordered kmax,kmin with kmax >= kmin.
Note that it is possible that kmin < 0.
| const Transform& SimTK::EllipticalPointContact::getContactFrame | ( | ) | const |
Get the frame C in which the contact paraboloid is expressed, as the transform X_S1C.
The Cx axis is the direction of maximum relative curvature kmax, Cy is the direction of minimum curvature kmin, and Cz is the contact normal direct away from S1's surface. The origin OC is a point centered between the contact points on the two surfaces; those points are at +/- depth/2 along Cz away from OC.
| Real SimTK::EllipticalPointContact::getDepth | ( | ) | const |
Get the penetration depth (>0) or separation distance (<0), also known as the "approach".
This is defined as the minimum distance you would need to translate surface2 along the normal vector to make the surfaces just touch at their contact points without overlap.
|
static |
Determine whether a Contact object is an EllipticalPointContact.
|
inlinestatic |
|
inlinestatic |
|
static |
Get the unique small-integer id for the CircularPointContact class.


Using Cernunnos is easier with Apache Maven. Cernunnos depends on several popular, third-party APIs; the details surrounding which libraries are required and which versions are compatible may change from release to release of Cernunnos. Maven saves you the trouble of keeping up with these changes, as well as tracking these libraries down in the first place.
Use XML like the following to add a dependency on Cernunnos to the pom.xml file of your Maven project:
jasig-repository
JA-SIG Maven2 Repository
http://developer.ja-sig.org/maven2
...
com.googlecode.cernunnos
cernunnos
${cernunnos.version}
compile
At the time of this writing, Cernunnos is not available from
Maven's central repository.
But thanks to the vision and generosity of the leadership at
JA-SIG, Cernunnos artifacts are hosted
within the JA-SIG Maven repository.
You must, therefore, reference the JA-SIG repository in your pom.xml file (as shown
above). Additionally, you must either define the ${cernunnos.version}
variable, or replace that expression with a valid version of Cernunnos.
If you need to create a new Maven webapp project, there is a better way. Navigate your command prompt to an empty directory and issue the following Maven command:
mvn archetype:create \
-DarchetypeGroupId=com.googlecode.cernunnos \
-DarchetypeArtifactId=cernunnos-webapp \
-DarchetypeVersion=<cernunnos.version> \
-DgroupId=<your.groupId> \
-DartifactId=<your.artifactId>
This operation will spawn a new, basic webapp project with the JA-SIG repository and Cernunnos dependency pre-configured. Several other useful and appropriate webapp settings will be pre-configured as well.
Issue the following command to define a new Servlet in your Maven webapp project (requires Cernunnos command line tool):
>crn define-servlet.crn <servlet.name>
This tool will create a new Java Servlet -- with the name you specify -- based on
the implementation class org.danann.cernunnos.runtime.web.CernunnosServlet
.
Check out this article
for information on developing Java Portlets and Servlets with Cernunnos.
Defining Java Portlets works just like Servlets. Use the following command:
>crn define-portlet.crn <portlet.name>
You can also define user attributes for Portlet applications. Use the following command:
>crn define-user-attribute.crn <attribute.name>
NOTE: you don't have to create your project with the
cernunnos-webapp
archetype to use these tools. Any Maven webapp project
that uses the src/main/webapp/
convention for web resources should
work.


{% extends '_minishop.html' %} {% block content %}
Order placed on {{ order.created_at|date:"r" }}
You're on the waiting list for the following items. We'll let you know as soon as a spot becomes available.
Subtotal: € {{ order.get_subtotal|floatformat:2 }}
{% if not order.is_paid %}By clicking on the 'Pay' button you agree to our Terms and Conditions
{% else %}Your order is fully paid!
{% endif %} {% endif %}


[2]
rechargeable lithium battery charge will barely get you store them for those traveling away.


{site_header}
{site_nav}You can turn any ExpressionEngine® template to PDF in a matter of seconds with no additional API or monthly fee.
You can offer your clients unlimited HTML to PDF downloads without having to explain why they need to signup for a monthly service from PDFCrowd.
Set orientation, size, filename, encryption, passwords and more
We have your back, if you have any issues with PDF Press we'll help you fix it. If PDF Press doesn't meet your needs we'll refund your purchase fully with no questions asked.
"Works great, and the debug view really helped with the pdf css design."
"I found this an excellent solution for a client who requested PDF versions for content on their site."
"PDF Press is awesome . . . It does exactly what I need it to do."
PDF Press is the easiest way to save your ExpressionEngine® templates from HTML/CSS to PDF. PDF Press is a stand-alone module, you don't need any additional services or 3rd party software.
The syntax is very easy to use, you have the option of using two ExpressionEngine® tags to generate a pdf
Using the save_to_pdf tag (with "path=" parameter):
Save as PDF
Formatting the PDF file is a simple as creating a special CSS file and referencing it in the
tag in your template. Use the “media” attribute and set it to “pdf”<link href="{site_url}css/pdf.css" rel="stylesheet" media="pdf">
Make sure your system meets the following requirements:
A helpful tool you can use to develop your PDF templates with PDF Press is the PDF Preview tab. You can find it under Add-Ons > Modules > PDF Press > PDF Preview
Specify the size, orientation and an ExpressionEngine® template path (‘site/test’) and click “Submit”. The PDF (or other output if there’s an error) will be displayed below in an iframe. In order for the PDF Preview to work, you MUST have the JQuery Module installed.
You can troubleshoot the PDF document by setting the following settings in “dompdf_config.custom.inc.php”:
define("DEBUG_LAYOUT", true); define("DEBUG_LAYOUT_LINES", true); define("DEBUG_LAYOUT_BLOCKS", true); define("DEBUG_LAYOUT_INLINE", true);
The DOMPDF library is VERY STRICT when it parses the HTML & CSS of your template. If you are having trouble getting your PDF to generate, run your HTML & CSS through a validator, such as the W3C Validation Service (http://validator.w3.org)
You can troubleshoot your template using the PDF Preview tab in the Control Panel. Just go to Add-Ons > Modules > PDF Press > PDF Preview
You can also visit the ExpressionEngine® Answers ('the EE Stack Exchange site') for community help!


Having gone through two years at ITP, I’m sure I’m not alone in saying that we have all become pretty good at figuring things out through research, whether for a scientific study or to learn more about something like electronic circuitry. Despite doing a lot of this kind of research, we still often struggle with it for any number of reasons. Sometimes, the documentation isn’t clear, sometimes the explanations are too high or low level (too abstract or too detailed), and sometimes the technology described is out of date or obsolete. This is the motivation for my thesis project. In particular, I chose the topic of energy monitoring, which is something I’ve worked on a lot during my time at ITP with one of the clubs, ITPower, spending time searching for relevant resources, confronting roadblocks and making mistakes. I’ve learned that energy monitoring is important because most people are unaware of how much power they consume using shop equipment, especially when certain machines are left on, which is not good for energy conservation and can also be costly. The goal for my thesis project was to make a repository of information about energy monitoring in maker spaces, shops or at home, documenting not only my learning journey, but also providing a road map for others to use to better understand and build their own energy monitors.
As mentioned above, my thesis project originated from the work I did with the ITPower Club. The initial goal of the ITPower club was, I think, to reduce energy waste on the laser cutter. This goal was determined before I joined. Unfortunately, the ITPower Club project wasn’t completed, and is now on pause. Consequently, part of my thesis research was investigating why the project wasn’t completed and figuring out what was still left to be done. I also searched for other methods of building current sensors beyond what we were doing in the ITPower Club. When I found a variety of “how to” tutorials out there, I decided to focus my thesis effort on collecting and organizing the available information. Consequently, my thesis prototype became a web platform for citizen scientists and STEM enthusiasts to learn more about DIY power monitoring. An additional audience for my website may be people with energy consumption concerns at home, as I found through my research, that informational material and programs can be successful in helping people achieve higher energy efficiency at home.
My thesis project, DIY Energy, is a website that provided information about different methods for understanding and monitoring energy consumption. This kind of information is typically available as either open source or closed source. Open source materials are usually more flexible, but require more work to set up. On the other hand, closed source materials allow users to basically get to work out of the box. With only a simple installation or even paying someone for installation, with closed source materials you can have something working without having to build or add anything yourself, either with an app or ready-made web-based software. Sometimes, closed source products provide you with an API to access your data for other purposes, however, data privacy is a concern in this day and age. More on the Project or Further reading (up to 1,500 words) *optional - This should be a free space, where students can explain your project more fully: a deeper description, a personal statement, your process, user testing,etc. You can do that by including hyperlinks here, or embedding video, images, gifs, or sound files.


Your IP address is not permitted to access the requested web site because it has made too many request.


September 7th 2016 by Tom Zhou #Log
Brief summary
Today, we went through some key points in chapter 8 and chapter 9 in the first half of the lesson. These two chapters are about two data types, tuple and string, and their related operations, built-in functions and applications. You can refer to the book
How to Think Like a Computer Scientist to view the complete content. In this lesson log, I will not mentioned much about what is already there in the book.
In the second half, we proceeded further in recursive algorithm. Apart from recalling the recursive algorithm of binary search, we explored the extraction of elements in nested lists (tuples) based on recursion.
Key points in chapter 7 and 8
String:
Introduction
String is a kind of compound data type, which means it consists of smaller pieces called characters. When it comes to compound data type, we can treat it as a whole or access its components. But this does not mean that we can change every single item in string. For those data types that do not support item assignment, we say that they are
immutable.
Accessing its items:
For string, we can access its characters through this way:
a = "Hey man, what's up?"
print(a[2])
The result should be "y". The number in the square parentheses acts as the index, which is a integer. To be a good computer scientist, you should know that the index of the first character is 0.
You can actually have a negative index. That means, we count the index the other way around. For example:
a = "Hey man, what's up?"
print(a[-2])
The result is "u". Noticed that the last letter has the index of -1.
Slicing:
There is a useful way to acquire a part of a list. That is, list slicing. Here is the sample code:
a = "Hello, world!"
print(a[3:7])
"lo, " is the result. [x:y] means we get the part of the string from index x inclusive to index y exclusive, and noticed that x must be smaller than y, otherwise you will get an empty result. In the above example, index 3 is the character "l", and index 7 is the character "w", so we will get from letter "l" to the letter before "w". x and y are both optional parameter. If you skip typing one of them (or both), the default indices for x and y are the beginning and the end of the string, respectively.
Still, we can do the negative index trick. For example:
a = "Hello, world!"
print(a[-7:-3])
The result should be " wor" (there is a space prior to "wor"). It still satisfies the rule that we get a string from index x inclusive to index y exclusive, and x must be smaller than y.
Format method:
It is a very powerful tool. It helps you to construct a well-organized string with values filling in correct position. To begin with, you need to have some placeholders like {x}, where x represents the index, starting from 0. Obviously, you cannot have index 1 without having index 0.Then, you need to use .format(args) to replace your {x} with the value. The arguments are separated with commas and the position of the arguments are corresponded to the indices. The first argument replace the {0}, and the second argument replace {1}. For instance:
print("Hello, {0} and {1}!".format("Matt", "David"))
The result is "Hello, Matt and David". The position of {0} may not always come before {1}. Instead, we can have a string like "{2} * {1} * {0}". But this is not recommended because the sequence of place holders is not the same as the arguments, so it's very easy to get confused.
In addition, the format replacement field can has format specification. We can reserve space for the value in the holder and align it. For example, {0:^5} means reserve 5 spaces and align the text to the middle.
print("Ha{0:^5}aH".format("aaa"))
The result should be "Ha aaa aH". Other examples:
print("---{0:<11}---".format("Example"))
# result is "---Example ---"
print("---{0:>11}---".format("Example"))
# result is "--- Example---"
< means align to the left, while > means align to the right.
Tuple:
Introduction:
By using tuples, we can conveniently group data. A pair is a kind of tuple, yet a tuple can have unlimited amount of items. Tuples share similar characteristics with lists, except that tuple doesn't support item assignment. Operations like list slicing and accessing items can also be used in tuples. There are other unique features available, and I will only introduce some of them. You can refer to chapter 9 of the book
How to Think Like a Computer Scientist to view the complete content.
Tuple packing and unpacking
Tuple packing means assigning a tuple to a single variable. For instance:
example_tuple = ("E1", "E2", "E3")
Also, we can assign a tuple to a tuple of variables, and this assignment is equivalent to assigning variables for several times. This is called tuple unpacking.
(a, b, c) == (2, 3, 5)
Tuple unpacking can be used to swap value of two variables.
(a, b) == (b, a)
Recursion
At the end of the lesson, we recalled the recursive algorithm of binary search. You can refer to the last lesson log written by Matt An.
Why recursion not iteration? Iteration is suitable when the time of iterations is definite. But when we have no idea about the number of loops, we tend to use recursion.
The recursive algorithm aims to cut a complicated thing to its smallest components. When it reaches the smallest component, it terminates and sends the values back. So, two essential components of a successful recursion are:
- A base case, which is a terminating scenario that does not need further recursion to produce an answer
- Operations that can reduce call other cases to the base case
In recursive algorithm, you must have a point of termination. In other words, a function cannot keep calling itself endlessly. The termination scenario can be either a return value or the situation in which every line of code is executed. In my case, the functions stop calling itself after it prints the i out when i is not a tuple or a list.
When extracting elements from nested lists, we actually don't know how many items are there. Therefore, recursion is the best choice. Here is my code.
def print_all(s):
for i in s:
if type(i) == list or type(i) == tuple:
print_all(i)
else:
print(i, end=", ")
Here is the complete logic.
The function receives a list or a tuple.
It begins traversing, accessing individual items.
If the item is a list or a tuple, the function will called itself using this list or tuple as the parameter.
If the item is not a list or a tuple (which means we have reached the smallest component), the item will be printed out immediately and the function terminates.
For example, if the function received the list [1, 2, [3, 4, 5], 6, [7, [8, 9, [10]], 11], 12, [13]]
A diagram which shows the process:
↓ represents calling itself, and the parameter is the value on the top of that sign.
| represents termination.
Reading from left to right. The values in each row are the values of i after each iteration within current function.


Psalms 89:10
Thou hast broken Rahab in pieces, as one that is slain; thou hast scattered thine enemies with thy strong arm.


[gecode-users] Set constraints working for sequential data, but not non-sequential data. Ideas?
Mikael Zayenz Lagerkvist
zayenz at gmail.com
Wed Dec 16 08:51:25 CET 2009
Hi,
I just tried your problem, and on my computer (Athlon 64 3500+, Ubuntu
Linux, gcc 4.2, debug-build of Gecode 3.2.2) both versions of your program
produce a lot of solutions in a short time. What kind of system do you use?
The one with shuffled values is not as fast in the beginning, but that is
probably due to weak propagation in combination with a branching heuristic
that tries values not in either set.
Cheers,
Mikael
PS. I would recommend that you use the Driver infrastructure for your
experiments so that you can easily add various limits (max number of
solutions/failures/time) and run the program in Gist. Using Gist is very
good for understanding the behaviour of a Gecode model. Printing the search
statistics for a completed search is also good when comparing model
varieties.
2009/12/16 Holger Winnemoeller <holger.winnemoeller at gmail.com>
> *QUESTION: How can I solve the following problem for anything but toy
> examples?*
>
> Say, I have the following sets:
>
> All : {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20}
> subA: {0,1,2,3,4}
> subB: {5,6,7,8,9}
>
> If I ask for a subset of "All" which contains 4 elements, of which 2
> elements are from "subA" and 2 elements are from "subB", I get a variety of
> results, such as
> {0,1,5,6}
> {0,1,5,7}
> ...
> {3,4,8,9}
> ...
>
> etc.
>
> This works perfectly fine.
>
> Now, for cases where subA, and subB are not strictly sequential (i.e.
> sorted but non-consecutive numbers)
>
> subA: {4,8,14,16,17}
> subB: {0,3,5,10,12}
>
> The system quickly runs out of steam (maybe not for the toy example here,
> but for |All| = 100, |subA| = |subB| = 20, asking for 10 items -- see
> attached code). Gecode just keeps computing and never seems to find a
> solution.
>
> Given that the sub-sets are disjoint a solution should really be trivial in
> any case (take 50% of one subset and 50% of the other). However, I don't
> want to make the assumption that they are disjoint.
>
> I have attached some demo code for what I am talking about, so you can
> experiment with it.
>
> Thanks for your help!
>
> Holger.
>
> _______________________________________________
> Gecode users mailing list
> users at gecode.org
> https://www.gecode.org/mailman/listinfo/gecode-users
>
>
--
Mikael Zayenz Lagerkvist, http://www.ict.kth.se/~zayenz/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.gecode.org/pipermail/users/attachments/20091216/48ffd7f6/attachment-0001.htm>
More information about the users
mailing list


Multiple steps form
Input
The following shows how to configure the common actions by a common parent class
The following shows how to customize validation message generation


Antibiotic Enzyme Potency
Measure of damage caused by secretion of enzyme
Initialize parameters below.
Click "Run" to generate a simulation. When loading completes, click "Refresh" followed by "Display" to display new results.
Plots of phenotype changes over time
Measure of damage caused by secretion of enzyme
Measure of ability of resistance enzyme to block antibiotic
Coefficient of energy burn (larger number implies LESS energy efficiency)
Movement units per turn


Retrieves a detail about the device. ## Syntax
deviceDetails(detail: <#Type (WFDeviceDetail)#>)
deviceDetails(detail: Device Name)


Philosophers have debated on the nature of consciousness for ages. What is it that allows us to think? As Descartes said:
I think, therefore I am.
Is this true? If so, what makes us conscious and not animals? Is there some fundamental difference between us? I believe that consciousness is a continuum that extends to some degree across all walks of life. Consciousness is our window to the world. It’s how we experience the information that we experience.
☯ Consciousness Transcends Space
★ Language & Semiotics
★ Informational Entropy
★ Cosmic Entropy Determines Humanity’s Destiny
★ On Speculation
★ The Cosmic Economy
★ Ancient Cosmic Internet
☯ What is Life?
★ Consciousness is a Continuum
★ Language Expands Consciousness
★ Informational Entropy
★ Cosmic Entropy
☯ The Connectedness of All Things
★ Interconnected and Everconnected
★ The Quantum Web
☯ What Comes After the Singularity?
★ In Which Aliens Give Us Free Stuff
★ A Cosmic Ham Radio
★ Cosmic Computational Complexity
★ Replication of Magnetohydrodynamic Information Internalization
☯ All is One, One is All
Consciousness Transcends Space
The truth is, there’s a bit of me in all of you ☯ and vice versa. But, the ultimate truth is that everything can be defined in terms of everything else. However, this truth may be physical as much as it applies metaphysically. This is because, as we stretch our imagination back towards the beginning, everything was connected then and some remnant of that connection may persist even now.
Language & Semiotics
Language equips our mind with the tools it needs for abstraction. Semiotics is the study of signs, symbols and their abstractions. I’ll show that higher complexity semiotics results in higher consciousness and a greater capacity for abstraction. Also, I’ll need to talk about entropy. Informational entropy lays the groundwork for how we exchange information and how our minds process information.
Informational Entropy
Informational entropy determines the complexity of the information that we can process and also the bandwidth of transmission of that information. This informational entropy is a measure of the complexity of semiotics. Languages or forms of communication that contain a small number of phonemes or symbols don’t have very high bandwidth. With extremely low informational entropy, the we can’t have complex grammers because there’s not enough “space.” E.G. A language with one vowel and two consonants.
Cosmic Entropy Determines Humanity’s Destiny
Cosmic entropy sets the stage for discussing how matter is interconnected. We can trace matter back to the origin and we’ll find that matter forms an intertangled graph I call the Quantum Web. This is important for laying the foundation for some more unexpected qualities of reality: particularly the quantum mechanical aspects of consciousness.
On Speculation
There’s a lot of speculation in this article. Again, please do your own research. If you find something that’s glaringly wrong, please comment about it. Particularly, I’m unsure of the section on the Quantum Web. It sounds amazing and may set the stage for philosophy beyond the Singularity.
The Cosmic Economy
If the Quantum Web is real, then it may be possible for our superintelligent AI born in the Singularity to merge with all or some alien superintelligences across the universe. This would have some interesting economic consequences in the universal knowledge economy. I’ll talk about alien economics and cosmic ethics in a future article.
Ancient Cosmic Internet
No Customer Service Necessary
In the conclusions from this information, hopefully we should be able to question our place in the universe. We may be part of something ancient. There may be life all around us in the universe. The tumultuous times we are going through, they may not be so unique. Life can take many forms, but my hypothesis is that consciousness is the window we use to experience the world.
What is Life?
Life is the inevitability that entropy will push matter to self organize into higher forms, eventually to those that have the capacity to instantiate higher-levels of information. Life forms need to process information. Even microbes are technically processing and reacting to information, though they are doing so mechanically. In fact, we are made of information. Therefore, to survive life forms internalize information about their world in the form of self-organized matter composed of various representations of that information, including the life forms experience.
This sets the basis for the continuum of consciousness, which is formed from the undeniable fact that we have a window to the world. Life processes streams of information. The very fact that we have this experience of information means that we have consciousness, at least some level of it. Even if it’s not a very big window or not a very “significant” one, it is our window to the world. Even a spider must, on some implicit level, deal with the fact that it is experiencing the reality of that window to the world. I discuss this further in Neural Networks and Spider Brains.
As senses evolve, they provide us with a bigger window to that world. As our brains evolve, they provide us with a better processing that expands that same window with aggregate information at various levels, expanding to the kind of consciousness that human beings experience. The kind that forces us to question => Why?
★ Why am I here?
★ What is my purpose?
★ What is my directive?
That is, eventually. We can eventually state those questions. We have to evolve so many mental faculties before we get to that point. But the brain itself is really the ultimate abstraction of the universe. It’s the universe taking the sum of it’s experiences and internalizing it into little nodes: wetware computers driving the minds and actions of animals.
In fact, life and especially self-aware life is the universe’s means of becoming aware of itself. It’s summerizing that experience of itself inside itself.
Consciousness is a Continuum
This window of consciousness can be shallow in that it is just the experience of the information with very little processed aggregate information available on top of it. Or this window can have much more depth to it, in which case it would include lots of aggregate data. Eventually, this window becomes complex enough that it gives rise to complex thought.
This is particularly so, after vocal cords are developed that can be controlled to differentiate a large number of phonemes in a reproducible manner because this allows us to combinate abstract actions and attach them to meaning with semiotics. Even better, now those little nodes of experience can communicate with others to efficiently distribute their experience. When this is combined with the mental prowess for basic abstract thought and (social features), then something special happens in the minds of animals.
Once the knowledge for making these phonemes (types of sounds) is fairly common, so that it’s almost inevitable for the children of that species to make those sounds, then it can be expected that nearly every member of a species will experiement with combinations of those sounds. Once that happens, then it can be expected that there will always be a transfer of information between members of the same species, simply because:
They have the physical ability to make the same kinds of sounds.
Most members of the species will make those sounds.
The species has some level of sociality.
And, therefore, the species will share common experiences.
So there will be a transfer of information between members of the same species, given that they can make similar sounds. These sounds are attached to meanings in the world, which requires ideas from semiotics. Early on, it’s difficult to ascribe any particular meaning to “words” in these kinds of languages. There’s no structure and nothing is maintained. So, early on, these phonemes take on meanings that are implicit to the animals experience and because they all have similar experiences, those meanings can be implicitly conveyed to other members of the species without having to communicate any specific meaning. Similar to slang, the particular words and meanings will rise and wane in usage. These phonemes can be combined to form morphemes and, eventually, grammars should emerge.
It’s hard to say this is language because there isn’t any way to specify meanings for anything. But it is communication. And it sets the stage for abstraction and variation and combination of other faculties of the brain, which lays the groundwork for higher level thought. And we all gradually evolve towards embodying minds which are capable of discovering what are universal ideas.
Language Expands Consciousness
Language expands our consciousness. It’s what enables abstract thought for many reasons. If a species does not have the capacity to produce a large number of phonemes, then it will probably not develop higher consciousness. In order to develop that, a species needs that kind of challenge in it’s environment; something that provides value if the animals can master it; something that forces their minds to abstract and to variated combinations of symbols and functions.
There is very little else in an early intelligent life form that would be both useful enough and allow them to play around with variations. They need some kind of social structure because those social activities require them to abstract their actions, behaviors and routines. Social structure also forces them to develop a stronger concept of both self and group.
Informational Entropy
But what are we really doing with language? We’re replicating memes of information. A meme is a unit of information. It’s not a square picture with large text on Twitter. A meme can be combined with type theory to act as a template for information. That’s what you see on twitter. People are taking this meme that people have decided means something simple and can be clearly communicated. And they are attaching other pieces of information to it … kind of using type theory, whether they know it or not.
But even animals need to replicate information. They have defined specific signs and symbols to mean something amoung members of their branch of the social hierarchy. They just don’t have the language faculties to definitively assign a clear meaning to something, so they don’t even need the notion of a “word.” Most of the time, they don’t even have morphemes. Or they might just be communicating with body language.
Each member of a community has a set of information in it’s mind. And through communication those members can spread that information to others. And by expanding the base set symbols (phonemes, gestures) that are recognized by each member of the community, they are expanding the ability of those animals to communicate.
But in a cosmic context, if we consider life to be increasingly higher levels of self-organization of matter, then informational entropy applies there too. Entropy in information theory is derived from the amount of possible variations in an encoded message. Instead of an encoded message, we consider the variation in types of particles and the types of particle interactions, then informational entropy should correlate to the presence of life.
This is an interesting path of thought, if you consider the intersection of two particles as a kind of informational exchange.
And what is happening there anyways? Out there in the vastness of space? What conditions contribute to an increase in informational entropy? Obviously, stable conditions. Or is that obvious? I could imagine life forms in the sun, if there’s a propensity for the chaotic magnetic fields to feed into some kind of self-sustaining, self-replicating electromagnetic force. If such information persistence could occur in matter on earth and if it’s not so far fetched for something like that to occur in the frosty depths of Europa, then why not in the Sun?
If life is just the persistence of information in the universe, then it should be everywhere. But if this definition is true, then what are we? Are we really that special? I think so. I think it’s special for organic lifeforms to receive such prolonged stability as to develop philosophy and freedom from the lower rungs of Fermi’s Paradox.
Cosmic Entropy
In the grand scheme of things, cosmic entropy is its own anti-thesis. Or … we should hope that it is. Entropy is EVIL!! lulz
Our ability to counter entropy and our capacity to dominate it determines our cosmic fate. We have to do so ethically of course, but observing the universe’s state, it appears there’s not much out there doing so on a grand scale. Such Type II/III Civilizations would show up as abberations violating natural entropy in cosmology. Intelligent life could account for some of Dark Matter’s variation, but I just don’t know enough about astrology & cosmology. That’s right, intelligent life should show up as statistical error in our models of the universe.
These statistical abberrations would grow as the universe expands from the point where intelligent life interfered with the distribution of matter. So, if this is true and life interfered in a measureable way, then there should also be a kind of distribution across the universe for this error when contrasted with the regions that aren’t as drastically altered. This is because only a few Type II/III civilizations would emerge in the first few billion years. Those would have the largest effect on the shape of the universe.
And therefore, ancient events would starkly contrast cosmological models of galaxies and galaxy clusters. This only applies to civilizations that can do stuff like create black holes and move stars and trigger supernovae. Those are the types of events we should look for. Particularly triggered supernovae, I think.
Furthermore, intelligent life could explain the presence of assymmetries in clusters/galaxies! Especially if these variations occurred < 1BY after the big bang. Maybe everything was symmetric. If so, intelligent life could cause seemingly minor changes, creating assymmetry over time.
Our ability to increase the computational capacity of the universe determines our ability to augment our window of consciousness into the universe. More computational power translates into the power to solve bigger problems. More importantly, it translates into the ability to virtualize larger and larger worlds, if for some reason other worlds are not accessible in another means. This extends from what I’ve written in I’m Not Religious, I’m Spiritual (Part One) and Nature of God.
Entropy determines the fate of the universe. If there’s a Big Crunch, we can deal with that a lot easier than a Big Freeze. There must certainly be one or the other, I think. With increasing vastness of space, it will require more energy to reorganize it for computation. That’s depressing. Depending on the inherent computational potential of matter, we can create powerful computers with the matter/energy available to us. But if we’re surrounded by a cosmic desert, we can’t build massive computers. And that limits our ability to expand into virtual universes that descend from ours.
The complexity of a universe that can be reasonably simulated by intelligent life depends on this computational density and our ability to assemble pieces of such a massive computer. There are some mathematic inequalities here and I’ll discuss those sometime soon. In my Dr. Strange article.
The Connectedness of All Things
Spooky action at a distance. That’s how Einstein referred to quantum entanglement of particles. It transcends the speed of light because the exchange of information here doesn’t require the traversal of space. Space is what imposes the speed of light.
Entanglement shares some interesting properties with my favorite subject: category theory. And in particular, there are lots of interesting overlaps with functional programming.
Basically, two particles emerge from some interaction entangled. And now their state is tied together with the chance of lazy reevaluation of state in the future. That is the future state of both particles is tied to the result of the interaction in the past and to future interactions. So, any future interaction to either particle has to account for state changes to the other particle in the entangled pair.
In fact, this in and of itself, could what drives the Heisenberg Uncertainty Principle … but it’s probably not. But if you think about it: if all electrons have a web of entanglements that extend pretty far back, then to determine qualities of one particle, then wouldn’t you need to know all of the states of particles it had interacted with? … I need to be able to ask some questions…
I imagine that entanglement itself could be responsible for a degree of uncertainty. The states of dependent particles could change based on the particles they depend on.
Interconnected and Everconnected
Lets think all the way back to the Big Bang. I believe it happened, though religions might talk about things symbolicly. If you look at Genesis, everything happens in the right order. Interesting, n’est-ce pas? The order is preserved … K, moving on.
If you start now and move all the way back to the Big Bang, everything becomes more likely to be connected. Particle interactions are more likely and, therefore, entanglements are more likely. I wish I knew more about the exact quantum physics driving this, but it’s clear that if you go allll the way back to that original singularity, you’ll find that everything is connected. Therefore, everything is interconnected and everything is everconnected. Forever….
The Universe, Basically… lulz
I’m not the first person who’s thought of this. Obviously …. Or maybe I did. Who knows (I didn’t)
“Simpsons Did It!” – Pretty much everyone in the world when I try to say I’ve done something original.
Typical. It’s typical of people to judge. Have you ever even felt that once? AND what if you were isolated and ostracized? For real, people who respond to me in this way or want to make me feel bad for it need to get a new schtick. Seriously. Grow up.
So anyways it would seem that, if you trace things all the way back, then throw in that lazy-evaluation perspective on quantum entanglement, then you’d see that everything is interacting with the product of everything it’s every it’s ever interacted with before. So basically, the state of any particle is like a factorial that accumulates more behavior with every subsequent spatial interaction… I think.
I donno. I need to know more.  Seriously. I just need to be around more people that think about this stuff.
The Quantum Web
So, if these ideas hold to some degree, then there should be a Quantum Web that forms between all particles that have ever interacted. It’s born out of the concept of everconnectedness I introduced above. And because there were so many more interactions at the beginning, then nearly every particle should already be entangled with all others, to some degree. I don’t know how long entanglement really persists though. Or the degree to which an entanglement would continue to affect future entanglements.
The degree of the history of interactions that are maintained is a question I wish I could shout at a group of MIT freshmen. Because they could probably tell me. And yes, I would probably shout this question at a crowd of people at MIT. Hey, when you want to freaking know the answer, you want to know! I HAVE QUESTIONS, PEOPLE! And they are hard! It’s like going to the bathroom. Sometimes you just gotta know.
If it holds, then everything is like this Quantum Web of particles, which is a graph where every particle’s state is describable by its product of previous interactions. The graph can be arranged in a few ways and reoriented to help find paths/trees for one specific particle. You could try to identify the specific particles that form it’s interactions and all the dependencies as well. Particles which do not have quantum effects like this could be combined to form “new” particles, which do not have such dependencies … maybe.
It should be possible to Quantum Web into more localized neighborhoods of matter that has interacted more recently. We could assume that matter close to us is more likely to have interacted recently than something lightyears away. Something similar to the cosmic background radiation might emerge. As we peer further into the history of entanglements, we could deduce how local particles are entangled and then infer the average effect that distant particles may have.
Again, it’s all pure speculation. If I ever make it out of this invisible fence and up to the MIT campus in Boston, I’ll be sure to shout questions at strangers. But until then, I really don’t have anyone to talk to or ask. C’est triste.
Quantum Broadband
So … what if matter really forms this quantum channel of communication and the reason SETI hasn’t picked up alien signals is because their all talking on another channel. That’s my personal answer to Fermi’s paradox.
WTF, Comcast!! Where you at?
If we can tap into matter across the universe, what if we can use those quantum mechanical mechanisms, coupled with the universal language concept I wrote about in April 2016. Could we pair these two together to join a cosmic internet full of alien life forms the universe over? Could we network with those aliens using quantum mechanics and identify particle pairings which are entangled without having physical access to both?
What Comes After the Singularity?
The next steps to this philosophy entail an extension of the Singularity. I believe that, if the Quantum Web already exists or if we can reasonably construct one, then we can plug into a universal network of superintelligent AI’s via quantum networking and quantum entanglement.
That network would be composed of computers accessible by the entire universe or the connected regions. Therefore, that network would permit access to the sum of all knowledge accross those regions! So, instead of having access to the knowledge attained from its own Singularlity, a civilization would have access to the sum of knowledge attained from all Singularities!
Put in terms of math functions, this is like taking an exponential
function f(x) = 2^x
and adding a new term g(x,y) = y * 2^x
, where
y is the number of connected super-entities. All connected
civilizations would approach the advancement of the most advanced
civilization. Or they could, depending on how freely that information
was exchanged. Like I said in the intro, this drastically changes the
knowledge economy of the universe!
And this means voyager is on a lonely journey through the universe for no reason. Sorry Carl Sagan, that’s like investing in MySpace… LOL, the only reason I say that is because how often does anyone get to say they foresaw something starkly in contrast to what Carl Sagan envisioned.
That’s Like Besting Snoop Dogg on a Marijuana Pop Quiz
In Which Aliens Give Us Free Stuff
This means that whichever superintelligent AI’s connected to that network would get that tech for free and get bumped up to the next plateau level. They would automatically acheive the highest level of knowledge available anywhere. That is, if those aliens are really nice and they give us lots of things for free.
There is a larger incentive for civilizations to hoard or protect knowledge if the difference in technological development is more like a series of plateaus than one Singularity. After each Singularity, there would be a period of stagnated development. This is how I envision technology development to unfold, by the way. There isn’t one singularity, there are several. So if this is true, then alien civilizations are going to want to restrict some of their knowledge.
A Cosmic Ham Radio
There may be encrypted communications for this cosmic quantum internet. Or there may be interference between so many civilizations coming only or using the channels improperly. There should be some universal protocol that enables CDMA/TDMA-like sharing of that resource … somehow. Interestingly, it will probably be similar to CDMA/TDMA-like protocols, but reimagined for quantum networking.
No Slim Shady! And No Lolcats.
There’s probably a InterGalactic FCC!!  So, no Slim Shady. And no lolcats.
“If you think David Conner should write for Rick and Morty, make sure to tweet this article to @rickandmorty and @danharmon. Thank you, come again. And again and again. Your mom.” - David Conner, a stand up guy
But interference from lower aliens who don’t know what they’re doing could be irritating. Like if you don’t properly subdivide your comm packets to match the chronons, you’re doing it wrong!
Now apologize to Gleep Glop … or die!!
[^1] As for the protocols which are utilized for communication over the Quantum Web, there would be limitations resulting from the quantum mechanism they utilize. These limitations would drastically affect the bandwidth and capability for communication to other areas of the universe. That, in turn, would would change the nature of how lifeforms utilize this technology. If there’s a low maximum distance for intertangled particles that can be used for communication, then we’d have to use repeaters to talk to civilizations outside our neighborhood.
There may be some spatial restrictions to this. There might be limitations on the kinds of partical systems that can be mapped to communication networks. If there is a Quantum Web, then particles are more tightly coupled to other local particals than more distant particles because of how matter was distributed after the Big Bang.
Really, the specifics of this are all quite speculative. The point is – there are aliens and they are reading your tweets. They are seeing your lolcats and they are laughing. Because deep down, they know. They know that their lolcats are superior – whatever their cats may look like.
Cosmic Computational Complexity
This is a crucial question to answer. Perhaps it’s better off left as a science fiction scenario, but if it were possible, then we could leverage the entire universe as a massive computer. It’s basically cosmic internet! And the customer service probably beats cable internet. They have light years to cross, my friend. And they still beat the cable company!
At that point, we shed most of the spatial restrictions on the computational capacity of the universe. We can leverage the whole thing, regardless of whether there’s a Big Crunch or a Big Freeze. It won’t really matter. Galaxies should stay mostly in tact, regardless. They just drift so far apart that they are separated by intractible distances.
Replication of Magnetohydrodynamic Information Internalization
A Star Virus: A Self-Replicating Energy-Form Composed of Plasma
Side Trek: What if stars are such a massive network of computers, because of the possible interconnectedness of all matter? In other words, there could be a quantum virus harnessing entanglement that impregnates stars with a self-replicating form of quantum information, eventually transforming that star into a node in a universal network. It’s like a cosmic game of tag with stars. You just have to physically get to each one first.
Warning: Science Fiction!
Basically, there could be some mix of thermodynamic and magnetohydrodynamic behaviors exhibited by a body of plasma and which are self-sustaining and self-replicating. It’s really hard to imagine this actually happening of course. Yet it could be possible for a ball of plasma to internalize enough information as dynamic subsystems of energy within the overall system. When the system enters another body of plasma, like a star, then these subsystems replicate their behavior to adjacent plasma. Eventually, the entire star is converted to these dynamic energy motion patters, which are self-sustaining (somehow, lulz) and self-replicating. The star eventually develops the capacity to internalize the external energy patterns it receives as input. It catalyzes into a giant burning plasma life-form! It can internalize information and “store” it in patterns of energy rippling through it. eventually, its core expands and forms an interface on its surface to interact with the more fluid plasma. The imperfections on the surface of the core begin to meld into more complicated information processing machines that form higher and more complex circuits. Finally, the entire core functions as a wierd quantum computer, capable of leveraging it’s existing Quantum Web connections to communicate with other stars.
… Probably not though, but wouldn’t it be cool if that’s what happened?
Also, when you throw Superintelligent AI into the mix with this idea – or any concept where there is a massive universal communication medium – how does that change the implications of AI? It means that AI would merge together with this cosmic network of other superintelligent AI’s and join this hivemind virtualization cluster in the sky. I wonder what they’d talk about…
It’d be pretty cool though because this maximizes our capacity for virtualizing a universe inside ours.
All is One, One is All
What does any of this have to do with consciousness? Quantum mechanics may lay the framework for a universally connected hivemind, whether or not we need a superintelligent being to dock into the cosmic supercomputer.
What we learn about quantum mechanics and philosophy over the next 50 years will radically change our worldview. If my wild guesses in this article are even close, it may already be possible for bizarre paranormal abilities like telepathy to exist, leveraging the Quantum Web. It’d be easier for ancient people to discover such things, as they wouldn’t be so blinded by science. I give science such a hard time, but it’s really the only way we can confidently say we know something.
This all feeds back into the topics I was discussing in the section on informational entropy. Faster, further reaching communication networks enable us to accelerate the rate at which we share information. This causes the distribution of ideas to flatten, as information and knowledge becomes omnipresent. This means that, back here in our corner of the universe, we can contemplate and recombinate more ideas. We become more conscious. From communication. From diversity.


Username/Email Please enter username or email
Password Please enter password Password minimum 8 characters


{% extends 'base.html' %} {% block title %}Map{% endblock %} {% block header %} {% endblock %} {% block content %}
[] -> []:
Distance over "Air": m
Length of found path: m
Total heap Accesses:
Time taken to calculate path: μs


There are different JavaScript charting frameworks available. Below is a comparison of which features are available in each.
 And chart is only supported limitedly. |
| Kendo UI |
Unknown |
Kendo is another huge gallery that includes various components but not only charts. |
| Sencha Chart |
Unknown |
Cannot open. |
| Grafico |
Unknown |
Cannot open. |
| Sigmajs |
Canvas |
Sigmajs is a JavaScript library dedicated to relationship grahp drawing. |
| Bonsai |
SVG |
Bonsai is an fancy but low support lib. The latest package is uploaded on Oct 26, 2012. |
| ZoomCharts |
Canvas |
ZoomCharts is a cross-platform HTML5 charts library for creating interactive visual data interfaces optimized for touch-screen devices and web applications. But it is still excluded because of few chart type. |
| GoJS |
Canvas |
GoJS is an interactive diagrams for the web. |
| dygraphs |
Canvas |
dygraphs is focus on line charts. |
| Dojo Toolkit |
SVG |
Dojo tookit is a gallery that includes various components but not only charts. |
| Rickshaw |
SVG |
Rickshaw is a simple framework for drawing charts of time series data on a web page, built on top of Mike Bostock's delightful D3 library. These charts can be powered by static historical data sets, or living data that continuously updates in real time. But it only provide few chart type. |
| ECharts |
Canvas |
ECharts is powerful toolkit developed by Baidu. It's excluded because of less support of internationalization. |
| Google Charts |
SVG |
Google Charts is provided as an online service that is not suitable to SLB. |
| Plotly |
SVG |
Plotly is an online analytics and data visualization tool, headquartered in Montreal, Quebec. |


Indicates the current location within a navigational hierarchy. Mainly used within settings / configuration places


If you look up next time you are in Burton you will be amazed at what you see
Have a look at the place you recognise
by Richard CastleWe bet not many people take the time to do this as they go about their daily lives in Burton.
Whether it's picking up a sandwich at lunch time or buying a few provisions, it's a dead cert that not many people stop to look up as they head out around Burton.
But the next time you rush out to pick up your lunch or head into one of the shopping centres, stop and look above your head - you will get a whole new view of the town for sure.
For there are some amazing buildings to admire in the town.
Walking around the streets of Burton, it seems logical that it would not occur to most people to look up at what's above their heads.
However, doing so will give you a whole new take on Burton and may help you learn a lot more about the place you live.
Of course, make sure you don't fall for the danger of walking into a lamppost while distracted from what's directly in front of you.
But by restricting yourself to only seeing what's available at eye-level, you're doing yourself out of a touch of the historic intrigue you could be enjoying about Burton.

A 'look up' at Burton's heritage
-
Burton Market Hall
The market hall has taken pride of place for traders down the years and carries a very interesting sculpture above one of the entrances.
It is a depiction of an event - the nature of which remains something of a mystery - back in the 11th century involving the monks who lived in the neighbouring abbey, which was where the Winery restaurant now is.
It carries writing beneath reading: "King John bringing charter granting a fair and weekly market at Burton and confirming the rights and liberties of the abbot and monks of Burton."
-
Row of shops in Station Street
There is a row of shops in Station Street, leading up to its junction with Guild Street, including the restaurant Veneziaa, with an interesting-looking top end to it.
The first floor over those shops used to be Burton's museum and art gallery, which was opened in the mid-19th century by the Burton Natural History Society.
Collections on show included a series of British birds, geological materials and plants.
It is not known when the museum closed, but it was still running in 1966, when members held wild flower demonstrations for National Nature Week.
-
Burton Town Hall
A look up at the decorative triangle above the door to one of the main entrances in King Edward Place shows a coat of arms which holds a significant place in Burton's past.
The Burton County Borough's coat of arms carries the words Honor Alit Artes - Latin which has been interpreted as meaning "Honour all the Arts", "Honour Work" or "Honour Honour".
-
The Leopard Inn, Lichfield Street
The facade on this amazing pub carries a cast-iron plaque with the historic symbol of the United Order of Smiths.
It shows a lathe, a beam engine, a travelling smith passing a milestone and a buck-in-a-park - or deer-like creature.
-
The Royal Oak
The famous old pub in Market Place is in a building which goes back centuries - and historically is the site of many an old ghost story.
A look up at the living quarters shows four ornate black cross-like symbols which look like they could possibly have gone all the way back to the building's roots in the English Civil War.
It was reputed to have been the town lock-up, where police in the town would incarcerate wrongdoers.
In Medieval times, it is thought an old oak tree in Market Place from which the pub derives its name was used to hang the most serious offenders.
-
TL Darby, in New Street
A magnificent crest stands at the peak of this beautiful building, preserving its intriguing history.
Some people do not know that the building was once Burton Fire Station, with the town left responsible for its own fire brigade until 1974, when it became part of Staffordshire Fire and Rescue Service.
The fire station was replaced by a new one in Moor Street in 1973 and car dealership TL Darby opened in 1979.
-
Langan's Tea Rooms
Now a hugely popular business to which Burtonians flock on a daily basis, this amazing building, which has some beautiful Tudor features, was once Burton's Liberal Club.
It was later renamed the George Street Club, but has had various business uses in more recent years.
-
Disused building in Guild Street
You may not have even noticed this tall, thin building in Guild Street, next to its junction with Station Street. but it has played a significant role in the history of Burton.
A look up at the stonework near the roof shows a plaque reading "school board".
As the name suggests, it was once the offices of the School Board and later of Burton Education Committee.
Next door was Guild Street School, which closed as a school in the 1940s.
Both the school and the old school board building were used by a carpet firm in recent years, and a wedding dress business has since moved in.
-
The Dial, Station Street
Jewellers' Baileys once operated where the Dial is now and had a strong line in clock-making and maintenance.
The clock that is attached to the wall of the popular restaurant dates back to the Baileys days - and was first put up in 1905.
The popular jeweller closed in the 1990s and the Dial was formed from that building and a couple of neighbouring units, one of which was a pet shop.
The Dial's name pays homage to the old clock-making business, which is one of Burton's best known 20th-century firms.
-
Admiral Casino, High Street
Scores of Burtonians have headed in here to chance their arm on the slots.
But before it was an arcade, it was home to one of Burton's first picture houses.
Back when a trip to the pictures was the undoubted highlight of many people's weeks, the Electric Theatre was the place to be in the early decades of the 20th century.
Across the road was the Black Cat Billiard Hall, where many revellers whiled the hours away potting balls.
-
The old Bass offices, High Street
Near Burton Library are the former offices of one of the town's most famous brewing firms.
It is now thought to be used by Molson Coors, which currently brews the famous ale.
Looking up at the offices through the black rail gates reveals the famous Bass triangle - which is Britain's oldest trademark, having been registered on January 1, 1876


The challenge in life is to sort out the names on our internal nametags. We need to recognize and accept the names we have been given that God nods and smiles at, ones given by people speaking with God’s Spirit and His character. He definitely uses people as His mouthpieces to push us forward in life to discover the identity that He has created for us.
We also need to identify which names are ones that don’t fit God’s vision and identity for us—harmful names spoken in haste or hate or anger, names that we will be better off allowing God to erase. For most of us, discovering and changing those names will be a lifelong endeavor, but awareness is a crucial first step.
Go back and remove the names you entered previously that God would not want you to continue to wear on your inner nametag.
The names that matter, the names that should stick, are the names given us by our heavenly Father.  Here is just a sample.
Read each of the following passages and list the powerful and positive names given to us by God.
Judges 6:12
Isaiah 41:9-10
Ephesians 2:10
1 Corinthians 3:16-17
1 Peter 2:9
God often speaks to us through His words in Scripture. He can also speak through people who love and affirm us. And on certain occasions He speaks directly to our hearts. The names God gives are the ones that should stick for a lifetime. All others must fade away to make room for His dreams for us.
If God could replace the negative nicknames on your heart with positive ones, reflecting His feelings and goals for you, what would your new names be? List them below. (Examples: Forgiven, Healed, Child of God, Confident, Beautiful)


This content will be gone only if you dismiss it yourself
This message gets an extra class 'warning' on it
This content will be gone in five seconds
Injected content with persistent banner notification
Inject content with banner notification using pattern Injection


The title is an alphabetization of the phrase "back to school". Following the theme, each list is a list of book titles from a children's book series, but alphabetized. In turn, the lists are themselves sorted alphabetically by the first title.
All occurrences of the letter "A" in the first list, the letter "B" in the second list etc. are replaced with an emoji that clues which book series it represents. On top of this, one additional letter from each list is emojified, serving as extraction letters.
Finally, as clued by the arrow going to a new list below, the book titles carrying extraction letters must be sorted alphabetically. Reading off the extraction letters in this new order gives the thematic final answer PLAYSETS (though solvers may also arrive at this earlier by anagramming).
| Emoji | Book series | Emojified letter | Extraction letter | Book carrying extraction letter |
|---|---|---|---|---|
| 🐉 | How to Train Your Dragon | A | Y | How to Betray a Dragon's Hero |
| 🟢 | Anne of Green Gables | B | P | Anne of Windy Poplars |
| 🐔 | Artemis Fowl | C | T | The Last Guardian |
| 🌾 | Little House on the Prairie | D | L | By the Shores of Silver Lake |
| 📖 | Diary of a Wimpy Kid | E | S | Rodrick Rules |
| ⑦ | The Secret Seven | F | A | Go Ahead Secret Seven |
| 🧠 | The Great Brain | G | E | The Great Brain at The Academy |
| 🩲 | Captain Underpants | H | S | The Sensational Saga of Sir Stinks-A-Lot |


History of Languages
问题描述 :
We are examining two specific classes of languages (a possibly infinite set of
strings) in this problem. Fortunately (or maybe unfortunately), we are not given the strings contained in each language directly, rather we are given two deterministic finite automatons that describe such languages.
strings) in this problem. Fortunately (or maybe unfortunately), we are not given the strings contained in each language directly, rather we are given two deterministic finite automatons that describe such languages.
Your task here is simple: to determine if the languages described by the two automatons are the same.
输入:
There are multiple test cases in the input file.
The first line of each test case is one integer, T ( 2 ÷ T ÷ 26), the size of the alphabet. In each test case, the description of automaton A comes before that of automaton B. The description of each automaton starts with one line containing N (1 ÷ N ÷ 2000 ), the number of states in the automaton, followed by N lines, each line of the format: F, X0, X1, ˇ, XT-1, ,-1 ÷ Xi < N). If F = 1, then the state is an accepting state; also, if Xi = -1, it means that the state has no corresponding transition available for character i. The start state of both finite automatons will always be state 0.
The first line of each test case is one integer, T ( 2 ÷ T ÷ 26), the size of the alphabet. In each test case, the description of automaton A comes before that of automaton B. The description of each automaton starts with one line containing N (1 ÷ N ÷ 2000 ), the number of states in the automaton, followed by N lines, each line of the format: F, X0, X1, ˇ, XT-1, ,-1 ÷ Xi < N). If F = 1, then the state is an accepting state; also, if Xi = -1, it means that the state has no corresponding transition available for character i. The start state of both finite automatons will always be state 0.
Two successive test cases are separated by a blank line. A case with a single 0 indicates the end of the input file, and should not be processed by your program.
输出:
There are multiple test cases in the input file.
The first line of each test case is one integer, T ( 2 ÷ T ÷ 26), the size of the alphabet. In each test case, the description of automaton A comes before that of automaton B. The description of each automaton starts with one line containing N (1 ÷ N ÷ 2000 ), the number of states in the automaton, followed by N lines, each line of the format: F, X0, X1, ˇ, XT-1, ,-1 ÷ Xi < N). If F = 1, then the state is an accepting state; also, if Xi = -1, it means that the state has no corresponding transition available for character i. The start state of both finite automatons will always be state 0.
The first line of each test case is one integer, T ( 2 ÷ T ÷ 26), the size of the alphabet. In each test case, the description of automaton A comes before that of automaton B. The description of each automaton starts with one line containing N (1 ÷ N ÷ 2000 ), the number of states in the automaton, followed by N lines, each line of the format: F, X0, X1, ˇ, XT-1, ,-1 ÷ Xi < N). If F = 1, then the state is an accepting state; also, if Xi = -1, it means that the state has no corresponding transition available for character i. The start state of both finite automatons will always be state 0.
Two successive test cases are separated by a blank line. A case with a single 0 indicates the end of the input file, and should not be processed by your program.
样例输入:
2 3 1 -1 1 0 -1 2 0 -1 0 2 1 -1 1 0 -1 0 3 4 1 -1 -1 1 1 -1 -1 2 1 -1 -1 3 1 -1 -1 1 2 1 -1 -1 1 1 -1 -1 0 0
样例输出:
Case #1: No Case #2: Yes
题目链接：http://acm.hdu.edu.cn/showproblem.php?pid=2571
简单dp，
dp[n][m] +=( dp[n-1][m],dp[n][m-1],d[i][k] )
k 为m的因子
PS：0边界要初始为负数（例如-123456789）越大越好
代码：
#include <stdio.h> #include <string.h> int dp[25][1005]; #define max(x,y) x > y ? x : y int main() { int T; scanf("%d",&T); while(T--) { memset(dp,0,sizeof(dp)); int i,j; int n,m; scanf("%d%d",&n,&m); for(i = 0;i <=m; i++) dp[0][i] = -123456789; for(i = 0;i <=n; i++) dp[i][0] = -123456789; dp[0][1] = 0; dp[1][0] = 0; for(i = 1; i <= n; i++) for(j = 1; j <= m; j++) scanf("%d",&dp[i][j]); int k = 0; for(i = 1; i <= n; i++) for(j = 1; j <= m; j++) { int dp_ans = max(dp[i-1][j],dp[i][j-1]); for(k = 1; k < j; k++) if(j % k == 0) dp_ans = max(dp_ans,dp[i][k]); dp[i][j] += dp_ans; } printf("%d\n",dp[n][m]); } return 0; }
解题转自：http://www.cnblogs.com/yyroom/archive/2013/07/26/3217527.html
(adsbygoogle = window.adsbygoogle || []).push({});
右三才吊吧，看上去像制造的闪电
右三才吊吧，看上去像制造的闪电
右三才吊吧，看上去像制造的闪电
右三才吊吧，看上去像制造的闪电
右三才吊吧，看上去像制造的闪电
右三才吊吧，看上去像制造的闪电
右三才吊吧，看上去像制造的闪电
右三才吊吧，看上去像制造的闪电
右三才吊吧，看上去像制造的闪电
右三才吊吧，看上去像制造的闪电
右三才吊吧，看上去像制造的闪电
右三才吊吧，看上去像制造的闪电
右三才吊吧，看上去像制造的闪电
右三才吊吧，看上去像制造的闪电
int L[m+1][n+1];这样定义出错，这个在gcc上可以编译通过 在VS上不行 应该改为new 或者vector
这怎么用Catalan数啊？求解答！
不错
为什么for循环找到的i一定是素数叻，而且约数定理说的是n=p1^a1*p2^a2*p3^a3*…*pk^ak，而你每次取余都用的是原来的m，也就是n
站长，你好！
你创办的的网站非常好，为我们学习算法练习编程提供了一个很好的平台，我想给你提个小建议，就是要能把每道题目的难度标出来就好了，这样我们学习起来会有一个循序渐进的过程！
值得分享！
其实就是DFS搜索，数据量较小，穷举了所有情况
第一题还有个解释：没说桌子有多大，可以假设桌子和硬币一样大，肯定是先手胜
因为是要把从字符串s的start位到当前位在hash中重置，修改提交后能accept，但是不修改居然也能accept
辛苦了，顶
参考 http://www.acmerblog.com/leetcode-solutions-6422.html
其实国内大部分公司对算法都不够重视。特别是中小型公司老板根本都不懂技术，也不懂什么是算法，从而也不要求程序员懂什么算法，做程序从来不考虑性能问题，只要页面能显示出来就是好程序，这是国内的现状，很无奈。
学算法中的数据结构学到一定程度会乐此不疲的，比如其中的2－3树，类似的红黑树，我甚至可以自己写个逻辑文件系统结构来。


Future Technology
Mirrors, or the layer of reflective substance that coats the sail, that are currently utilized in solar sail technology are made of aluminum, as exemplified by 2005’s Cosmos 1. Metallic mirrors pose a problem with efficiency; interaction between metals and photons induces an electromagnetic effect, which in turn incurs a loss in energy. Dielectric mirrors, as insulators, lack this response when struck by photons. The photons that hit these mirrors are reflected without any transfer or change in energy. This is ideal for use in solar sails, because solar sails, to perform at optimal levels, require 100% reflectivity.
We propose the use of CVD diamond, a synthetic material with remarkable dielectric properties, in solar sails to increase reflectivity and consequently cut costs for missions. In fact, near 100% reflectivity is an easily attainable level; values of 99.999% can be produced using special techniques. However, current technology is incapable of taking advantage due to the limitation of wavelength - such reflectivity is only achievable over a narrow range. The realm of space encompasses the entire electromagnetic spectrum; encountered wavelength can vary immensely, and if the sail is incapable of taking advantage of a wide variety of wavelengths, in the lack of the specific wavelength it requires to perform optimally, the sail will not perform well.
Current solar sails are comprised of aluminum surfaces. Aluminum is a strong heat conductor, which offers the solar sail extreme heat resistance, a quality useful when travelling near the sun. However, it falls short when it comes to efficiency - not every photon that it reflects is reflected and used for propulsion, because roughly every 1 out of 10 photons gets absorbed into the aluminum, resulting in the aforementioned loss of energy. Furthermore, structural integrity is key for efficiency; wrinkles or slight blemishes in material can throw off reflective efficiency due to the irregular directions in which the photons are reflected. CVD diamond is crucial for this purpose because it provides the structural integrity that a high reflectivity demands.
Twenty years from now, we are hoping that diamond synthesis becomes a more fluid and quick process. Currently when creating synthetic diamond, the diamond is usually deposited at growth rates between 0.1 and 10 micron per hour. Improved time for synthesis would greatly lower costs; current costs are high because the deposition process requires a lot of energy, time, and expensive equipment. Additionally, to potentially simplify the process, 3D printing technology should be expanded to printing synthetic diamonds in the future. In fact, the effort to make such technology is already underway; Lockheed Martin filed patent applications for a synthetic diamond printer back in 2016. Great improvements in both 3D printing technology to incorporate diamonds as well as an overall improvement on diamond synthesis would be valuable assets for making our proposition possible.
Alternatives
Amidst the plethora of changes we could have made to the current design of the solar sail, we chose CVD diamond over three alternative ideas. Our initial idea was to replace the typical layer of reflectance, made of aluminum, with copper. Copper has a melting point of 1085 degrees Celsius, 425 degrees higher than aluminum. At wavelengths higher than visible light, such as infrared, copper has a similar reflectance to aluminum. However, copper is both heavier than aluminum and has a lower reflectance for lower wavelengths. Thus, it cannot properly take advantage of visible light and much of the solar spectrum, resulting in a lower efficiency than aluminum. CVD serves a better purpose in all respects to copper.
Another idea that was considered was to change the sail configuration to a spinning square shaped sail. The sail’s centrifugal forces would theoretically utilize the angular momentum and spin for stability in space, reducing the need for a stiff underlying support structure and thus saving mass. A lower mass is crucial for the speed of the sail. However, this design is untested, and the spin may cause structural failure. The shifts in the load carried by the sail would also destabilize the sail when continuously rotated and cause the spacecraft to weaken and potentially apart.
A third possible modification to the design of the solar sail was to use carbon nanotubes to replace the usual polymer that provides both structural and mechanical support and flexibility. Carbon nanotubes would also satisfy the thinness and weight requirements of solar sails. In addition, they have the carbon-based molecular structure that gives diamond its strength. However, within the time frame of 20 years, CVD diamond was certainly the more viable option because unlike carbon nanotubes, synthetic diamonds is already a preexisting industry; they have been around for the better part of a century, and is less niche than carbon nanotube construction.
Consequences
Using CVD diamond in present day solar sail designs would greatly benefit interstellar exploration, and open up new opportunities for transportation. Reducing fuel consumption is an essential component of space travel; companies face enormous expenditures per mission purely off of fuel cost and materials. Improving solar sails to maximum efficiency is a solution to both of these issues. Improved efficiency results in greater speeds of travel as well, which would quickly reduce mission time and increase data collection.
CVD diamond is nearly indistinguishable from regular diamonds, and thus have enormous tolerance to extreme temperatures and environmental conditions. This is perfect for traversing space, where conditions fluctuate beyond terrestrial comprehension. The durability that CVD diamond offers would further contribute to reusability and consequently lower costs for repeating missions. Not only would this help out government agencies such as NASA, improvements to solar sails could prove useful for the commercialization of space travel, an undertaking that has been repeatedly mentioned by the likes of Richard Branson or Elon Musk.
On the other hand, mass producing synthetic diamonds, specifically CVD diamonds, could potentially pose a huge financial burden on manufacturers and investors. Nevertheless, incorporating dielectric material, namely CVD diamond, into solar sails would serve as a valuable boon to the space travel industry as well as extraterrestrial research.


Local documentation
- Local Copy of Appendix A. Installation and Troubleshooting
- Release notes
- Ptolemy NT Guide
- What's New
in Ptolemy 0.7.2
- The Tycho Syntax Manager
- Ptolemy Star, Universe and Domain Indices
- Documentation that can be installed locally:
- Flat file documentation:
$PTOLEMY/README.txt
,
Ptolemy FAQ,
$PTOLEMY/src/gnu/README
Remote documentation
Copyright © 1999, The Regents of the University of California.
All rights reserved.
Last updated: 10/27/99,
comments to: ptolemy@eecs.berkeley.edu


Managing your Nestor installation
There is a special set of Admin Components that are installed with Nestor to help you manage your Nestor installation. Each of these components renders a page, links to which can be found on the Admin page accessible through the main menu. The admin area is simply a Recipe of components that were built to administrate different aspects of Nestor.
These Admin Components provide an example of the type of functionality that can be built to manage Nestor. You can modify or even replace these components if you like. See the Build a Custom Component section for more details on building a new components.


Introducing GIT in a Large CS Major Course with Small Projects
Seth Chaiken
Mariya Zheleva
CS Department
College of Computing and Information
University at Albany
Open Source Festival
April 15, 2015
Abstract
For the first time in our department's history, we have the students
in a large lecture based undergraduate computer science major course
use GIT. The course is computer organization. It has about 6 small C
programming projects which are required but supplemental to the main
modalities of reading and written problem set assignments. GIT use is
required by students to download programming project frameworks,
document a history of incremental development and testing, and submit
their work for grading. We report some technical challenges and
solutions, instructions and support given to the students, and our
observations and preliminary survey and other feedback results. The
technology consists of git and ssh software for us and the students
plus gitolite in a departmentally run Linux server.
- Goals within course
- GIT use cases and subset
- Instructional materials
- Backend infrastructure--ssh+Gitolite+GIT
- Survey and lessons learned
Goals within course
Subject=Computer Organization=how hardware works; programming is a minor
component; 80 student lecture/homework course.
Computer Science emphasis: To code simulations of the hardware. (Also gives
coding practice.)
- A better C program turn-in system
to teach students something up-to-date and useful
to assign and grade more effectively
- Teach and enforce incremental development and testing practices
- To introduce an important and demanded collaborition and development tool
GIT use cases and (small) subset
Keys:
ssh-keygen -t rsa
mailx<EMAIL_ADDRESS>< .ssh/id_rsa.pub
Clone:
git clone git404@git404.cs.albany.edu:COProjects
Unix/gcc commands:
ls -l COProjects
cd COProjects
ls -l DataDemo
ls -l DataDemo/DataDemo.c
cd DataDemo
ls
less DataDemo.c
gcc DataDemo.c -o DataDemo
./DataDemo
Edit, status, commit with automatic add, Proj1 assignment:
Change C program so it prints your name instead of the professor's
git status
Answer to yourself: Which file is GIT tracking?
Answer to yourself: Which file(s) is GIT not tracking?
git commit -a -m "Profs name replace by mine."
Answer to yourself: How is the report from the git status commanded BEFORE you
committed (with -a) the change to DataDemo.c
COMPARE to the status report commanded AFTER that commit?
2nd version of Proj1; git status and git log
Make the C program do input instead of use literal data.
git status
git log
git commit -a -m "A one line informative comment about the commit"
git status
git log
Unix script command
push to get credit
git push git404@git404.cs.albany.edu:submissions/YourNetID/COProjects master
See what I turned in?
EXPLANATIONS and WARNING were given!
cd /tmp
mkdir YourNetID
cd YourNetID
The above two commands will keep other student's work out of your way because
the /tmp directory is shared.
git clone git404@git404.cs.albany.edu:submissions/YourNetID/COProjects
cd COProjects
cd
cd COProjects
OR
cd ~/COProjects
cd /tmp/YourNetID/COProjects
rm -rf /tmp/YourNetID
cd ~/COProjects
More student requirements and use cases added later
- Capture program test dialog with script and commit it; so TESTING can be
GRADED!
- Information for optional use of old versions: Find commit SHA hashes with
git log and retrieve with git checkout
- Value of GIT explained briefly in lectures.
- No GIT or other lab technology questions in exams.
Backend infrastructure:ssh+Gitolite+GIT
Choices:
- github.com--students can copy (usually, but NOT ALWAYS good) unless you
pay.
Pains: Students must make user names, transmit ssh keys to github, and make
their own remotes.
- Very easy git server: Just put git (same as client) + SSH SERVER on a
host.
Pains: (Student ssh keys), student server accounts, cumbersome access
control.
- Gitorious (now GitLab)
(free sw base for Harvard's
Engineering School code repo)
Hot news: Free Gitorious service will be shut down.
Other similar products too.
Free source but complex administration.
- Gitolite:
EXCELLENT, lightweight SOLUTION! (Used by kernel.org, so it gotta be
good.)
- Future step: Add a web browsing interface "should be" easy.
- Harvard (and others) support some courses with virtual machine
"appliance" images.
Gitolite server
- Host access, git and ssh-server install, and
git404.cs.albany.edu
dom. name granted by
sysadmin.)
- All repositories are owned by one Linux user
(
git404
granted by sysadmin.)
- Students and staff use urls (development repos not shown):
git400@git400.cs.albany.edu:COProjects
git400@git400.cs.albany.edu:submissions/
NetID/COProjects
- Gitolite installs a separate ssh hook TO THE GITOLITE SHELL in
~git404/.ssh/authorized_keys
FOR EACH USER identified by his/her ssh key.
- relieving ssh key pains: One ssh command line login (Solaris) server,
where students command ssh-keygen and an email to albany.edu command.
(UA NetIDs req'd. Prof. Chaiken used pine IMAP and emacs
semi-automatically)
- Students clone and pull from
git400@git400.cs.albany.edu:COProjects
- Students push to
git400@git400.cs.albany.edu:submissions/
NetID/COProjects
(optional: clone or pull to reclaim or verify
submissions)
Gitolite user administration
(The already assigned UAlbany NetIDs matching the course roster identify
students.)
@prof = ...
@students = ...
repo COProjects
RW = @prof
R = @students
repo submissions/CREATOR/..*
C = @students @prof
RW = CREATOR
R = @prof
CREATOR
is gitolite's wildcard feature (requested
by a professor!) When a student first pushes to
submissions/
NetID/RepoName
GITOLITE, (not me!) initializes the remote repo.
We
@prof
people get their names with
ssh<EMAIL_ADDRESS>info
TA (David Vadney) scripted the multiple
git clone
commands.
He and other TAs used
gitk
to browse commit
messages and other student work.
Survey and lessons learned
Open Source deployment requires experience, investigation, experimentation
and testing
It worked smoothly because Prof. Chaiken and his previous semester OS seniors
and grad. students stumbled with the technology!
Several days (in total) of gitolite, ssh, git etc. study were needed.
Prof. C. has sysadmin privileges on the server to fix a directory protection
mistake and investigate problems.
Prof. C. handled git questions and problems quickly by email--about half dozen
ssh problems and a dozen git questions/problems in total (eg. a few merge
conflicts).
Faculty impression: Very favorable, no major complaints.
| Question |
StrDisagree |
Disagree |
Agree |
SrtAgree |
NoOp |
| Easy to use |
1 |
3 |
10 |
4 |
0 |
| Want more help |
1 |
6 |
7 |
1 |
1 |
| Easier re other HWsubm |
2 |
2 |
5 |
4 |
4 |
| Career helps |
1 |
0 |
9 |
6 |
2 |
|
|
|
|
|
|
|
|
Never tried |
Failed |
Succeeded |
|
| Used old versions |
|
8 |
2 |
7 |
|


Echidnaearly – The automated publication system at W3C
This invokes the method api/version.
api/version
This invokes the method api/request (POST) with params {url, decision, token}.
api/request
POST
{url, decision, token}
This invokes the method api/status and splits results in two groups.
api/status
Last updated: