|
JANA2
|
Public Types | |
| enum | Status { Unopened, Opened, Finished } |
Public Member Functions | |
| JEventProcessor (JApplication *app=nullptr) | |
| Status | GetStatus () const |
| std::string | GetPluginName () const |
| std::string | GetTypeName () const |
| std::string | GetResourceName () const |
| uint64_t | GetEventCount () const |
| JApplication * | GetApplication () const |
| bool | AreEventsOrdered () const |
| virtual void | DoInitialize () |
| virtual void | DoMap (const std::shared_ptr< const JEvent > &e) |
| virtual void | DoReduce (const std::shared_ptr< const JEvent > &e) |
| virtual void | DoFinalize () |
| virtual void | Init () |
| JEventProcessor::Init, Process, and Finish are meant to be written by the user. More... | |
| virtual void | Process (const std::shared_ptr< const JEvent > &aEvent) |
| Process i. | |
| virtual void | Finish () |
| virtual std::string | GetType () const |
Protected Member Functions | |
| void | SetTypeName (std::string type_name) |
| SetTypeName is intended as a replacement to GetType(), which should be less confusing for the user. More... | |
| void | SetResourceName (std::string resource_name) |
| Resource name lets the user tell the parallelization engine to synchronize different EventProcessors which write to the same shared resource; e.g. More... | |
| void | SetEventsOrdered (bool receive_events_in_order) |
| SetEventsOrdered allows the user to tell the parallelization engine that it needs to see the event stream ordered by increasing event IDs. More... | |
Protected Attributes | |
| JApplication * | mApplication = nullptr |
|
inlinevirtual |
JEventProcessor::Init, Process, and Finish are meant to be written by the user.
Each JEventProcessor is intended to generate one distinct output,
Reimplemented in JCsvWriter< T >.
|
inlineprotected |
SetEventsOrdered allows the user to tell the parallelization engine that it needs to see the event stream ordered by increasing event IDs.
(Note that this requires all EventSources emit event IDs which are consecutive.) Ordering by event ID makes for cleaner output, but comes with a performance penalty, so it is best if this is enabled during debugging, and disabled otherwise.
|
inlineprotected |
Resource name lets the user tell the parallelization engine to synchronize different EventProcessors which write to the same shared resource; e.g.
if you have two EventProcessors which both write to a ROOT tree, they should both set the resource name 'ROOT'. On the flip side, if you have two EventProcessors which write to different resources, e.g. ROOT and a CSV file, and you set different resource names, the parallelization engine will know that it is safe to pipeline these two processors. If you don't set a resource name at all, the parallelization engine will assume that you are manually synchronizing access via your own mutex, which will be safe if and only if you use your locks correctly, and also may result in a performance penalty.
|
inlineprotected |
SetTypeName is intended as a replacement to GetType(), which should be less confusing for the user.
It should be called from the constructor. For convenience, we provide a NAME_OF_THIS macro so that the user doesn't have to type the class name as a string, which may get out of sync if automatic refactoring tools are used.


--- layout: project categories: projects client: Client Name client_url: client_color: 7EBB22 video_title: "Video Title" video_id: 151205261 video_thumb: test.png ---
Director — Cole Mueller
Producer — Crowdfund Mafia
Cinematographer — Mike Testin
1st AC — Lauren Peele
2nd AC — Kevin Fisher
Production Sound — Katelyn Springman
Editor — Cole Mueller
VFX — Richard Cabrera
Music — HD Labs


This document is a quick-start for the Epimorphics Ltd implementation, Elda, of the Linked Data API. The Elda runnable-demo jar can be downloaded from its Googlecode downloads page; pick the latest unless you have good reason not to.
A separate document describes Elda's extensions and an introduction to using Elda's code directly rather than bundled as servlets/restlets.
If you want to explore the Elda codebase and have Mercurial installed, you can download the Elda repository:
hg clone https://elda.googlecode.com/hg/ elda
In the rest of this document, "the Elda jar" means the downloaded standalone demonstration jar.
What is the LDA?
The Linked Data API provides a configurable way to access RDF data using simple RESTful URLs that are translated into queries to a SPARQL endpoint. The API developer (probably you) writes an API spec (in RDF) which specifies how to translate URLs into queries. Elda comes with some pre-built examples which allow you to experiment with the style of query and get started with building your own specs.
Prerequisites
Elda is written in Java (using the Jena RDF toolkit), so you will need Java installed on your system.
The default demonstration setup for Elda has examples that use the
data.gov.uk
data accessible from the SPARQL endpoint
http://education.data.gov.uk/sparql/education/query
.
To run those examples, you will need to have open web access.
Feedback
Elda aims to provide a complete implementation of the Linked Data API. Problems with Elda should be reported to the linked data API discussion group (note: you will need a google account to use this group).
Current issues can be seen on the Elda issues list .
Getting started
The Elda demo code is shipped as a single self-unpacking jar,
elda-VERSION.jar
. You can start it from the command line:
java -jar elda-VERSION.jaror, if your system permits, by double-clicking on it in your preferred file browser.
In either case, Elda unzips itself from that jar into a new directory, Elda_VERSION, from which it starts itself as a Jetty server running on port 8080. You may immediately go to that URL's /elda in your browser (ie, http://localhost:8080/elda): it provides links to Elda's documentation and example Elda URIs:
| description | config file | sample URLs |
|---|---|---|
| one-template games example, local SPARQL endpoint. | hello-world.ttl | |
| two-template games example, local SPARQL endpoint. | hello-again-world.ttl | |
| one-template education example, external SPARQL endpoint. | tiny-education.ttl | |
| multi-template education example, external SPARQL endpoint. | mini-education.ttl | |
| full education example, external SPARQL endpoint. | full-education.ttl |
...
|
| old education example [for comparison], external SPARQ endpoint. | old-education.ttl |
and see presentations of selected data. The html rendering (which is provided by an XSLT transform of the xml rendering) has many interesting features.
Once Elda has unzipped itself, you can run it from the Elda directory it creates:
(in Elda_VERSION) java -jar start.jar(Or by double-clicking, etc).
If you can't use port 8080
You may already be using port 8080 for some local service. In that case, you can start Elda from the command line (no double-click) with
java -jar elda.jar -Djetty.port=NNNNor, if you're starting from the unzipped Elda directory,
java -Djetty.port=NNNN -jar start.jarwhere NNNN is the port of your choice. (Yes, the -D comes after elda.jar, but before start.jar.)
To change the port number without having to
supply a -Djetty.port
command line option
every time, in the Elda directory edit the
configuration file etc/jetty.xml
and change the line:
<Set name="port"><SystemProperty name="jetty.port" default="8080"/></Set>to:
<Set name="port"><SystemProperty name="jetty.port" default="NNNN"/></Set>where NNNN is the port number of your choice.
Using other LDA specifications
From the command line
To use different LDA specifications, use the system property
elda.spec
. Like the port number, it can be set
as part of launching the elda jar or when launching the jetty
start jar:
java -jar elda.jar -Delda.spec=SPECSor (in the Elda directory):
java -Delda.spec=SPECS -jar start.jarwhere SPECS is one or more LDA specification files separated by commas.
If you use elda.spec
, then Elda ignores the
default specification (the education LDA) wired into it.
By editing web.xml
To change the specification used without having to use
a -Delda.spec
command line option every time, edit the
Elda webapps/elda/WEB-INF/web.xml
. Find the
servlet configuration
<servlet> <servlet-name>loader-init</servlet-name> <servlet-class>com.epimorphics.lda.routing.Loader</servlet-class> <init-param> <param-name>com.epimorphics.api.initialSpecFile</param-name> <param-value>assorted specs here</param-value> </init-param> <load-on-startup>1</load-on-startup> </servlet>
Replace the assorted specs here with the name of the LDA
specification files you wish to load, separated by commas.
Spaces and newlines are ignored. (For more explanation of
the structure of the web.xml
file, see
the advanced documentation).
Fancy HTML formatting using XSLT stylesheets
The default formatter supplied by Elda is a very simple HTML formatter showing the properties and their values of the selected items. Elda also ships with a renderer that uses XSLT (and Javascript at the client end) to produce pages with additional controls and a richer appearance. To use this as your html renderer, add:
; api:formatter [a api:XsltFormatter ; api:name 'html' ; api:stylesheet 'xsltsheets/result-osm.xsl' ; api:mimeType 'text/html' ]to your API root in your configuration file and arrange that the webapps/elda directory contents are served as static files.
Querying a local file
If the remote SPARQL endpoint is slow, not yet fully configured, or plain unimplemented, you might want to set up a local endpoint using a tool like Fuseki. But it's also possible for Elda to query a local RDF file.
Edit your spec file, which will look something like the education spec suplied with Elda:
spec:api a api:API ; rdfs:label "Edubase API"@en; api:maxPageSize 50; api:defaultPageSize 10 ; api:sparqlEndpoint <http://education.data.gov.uk/sparql/education/query> ; api:endpoint spec:schools , spec:schoolsPrimary , spec:schoolsSecondary , spec:schoolsPrimaryDistrict , spec:schoolsSecondaryDistrict .Replace the endpoint URI with local:content-name, where content-name is the name of the RDF source you wish to query. When Elda issues queries to a local: endpoint, it loads (and remembers) the contents and queries those directly.
Usually the content-name is a file name. It is resolved against the webapps context path (ie the directory from which it serves files). If there is no such file, then the content-name is treated as a URL and its contents fetched. If that fails, then the content is searched for along the webapps classpath. In all of these cases, the fetched content is loaded into memory as an RDF model and all queries to the endpoint are answered by this model.
(The name-lookup functionality is supplied by the underlying Jena
FileManager
class; for more details, see the Jena
documentation currently at openjena.org.)
Using a local TDB datasource
As an alternative to setting up a local SPARQL endpoint,
or using a local: file, you can instead use a local
Jena TDB
database. To do so you will need to modify the web.xml
webapp configuration file and supply an additional init-param
for the loader-init
servlet. You can do this in
two ways:
<init-param> <param-name>com.epimorphics.api.TDB-base-directory</param-name> <param-value>tdb-directory</param-value> </init-param>
Replace tdb-directory with the path to your chosen TDB directory. Note that the path is relative to the webapps directory – your best choice is to use an absolute path.
Warning. If the directory does not contain any TDB files, TDB will create a new empty dataset in it. This is usually not what you want, since all queries will return no answers, so Elda will report an error during setup.
The alternative form:
<init-param> <param-name>com.epimorphics.api.dataStoreDirectory</param-name> <param-value>datastore-directory</param-value> </init-param>
specifies datastore-directory as a directory containing a TDB directory named tdb. The same warnings as above apply. (This form exists because Elda can do limited LARQ indexing and in that case the datastore directory will have a larq subdirectory for the LARQ indexes.)
Having specified a TDB directory, you can now edit your spec's sparqlEndpoint declaration, which in the education example looks like:
spec:api a api:API ; rdfs:label "Edubase API"@en; api:maxPageSize 50; api:defaultPageSize 10 ; api:sparqlEndpoint <http://services.data.gov.uk/education/sparql> ; api:endpoint spec:schools , spec:schoolsPrimary , spec:schoolsSecondary , spec:schoolsPrimaryDistrict , spec:schoolsSecondaryDistrict .Replace the services URI with tdb:model-name, where model-name is the name of your endpoint model inside the TDB store.


Welcome
Hi, my name is Azamat Sarkytbayev. Welcome to my homepage.
I am a student at Northeastern University Silicon Valley, studying MS Computer Science Align. Currently, I am a TA for CS 5004, CS 5006 and CS 5007 classes. You can find my contact information here.
Resume
You can view my resume here.
Story of my life!
You can find out more about me.
Code samples
I also have some code that I'd like to share. Here are some code samples


dict(1sh) - Get definition of a word using DICT Protocol and libcurl(3c) (LICENSE:PD)
Synopsis
Description
Options
Example
See Also
fpm-dict(1) - [word(s) [--like [strategy]] [--server SERVER]]| -url FULL_URL| [--help|--version]
By default fpm-dict(1) looks up the definitions of the given words in the dictionaries at dict://dict.org/ on port 2628.You can also search for similar words, words by substring or regular expression, as substrings ...
With no options a table of the available dictionaries is produced.
Note there are many dictionaries hosted on servers around the WWW.
fpm-dict(1) uses the DICT Protocol as described in RFC2229 and the libcurl(3c) library via a clone of the fortran-curl(3f) interface.
word(s) word to find and display the definition of. Can be of form word:dictionary. The default dictionary is "all". --like strategy look for words like the word specified instead of showing definitions, using an optional search strategy. defaults to trying to guess the spelling of the word(s) assuming it is misspelled. If no words are present defaults to showing available strategies. --server DICT server name. Default is "www.dict.org". --url directly specify url: dict://HOST:PORT/m:MATCH_STRING:DATABASE_NAME:STRATEGY dict://HOST:PORT/d:WORD:DATABASE_NAME--help,-h display this help and exit --version,-v output version information and exit
Sample usage:
> fpm-dict # list dictionary names and descriptions > fpm-dict bash # search all the dictionaries for specified word > fpm-dict bash: # use just the default dictionary > # Find the meaning of "bash" in the "computer terms" dictionary: > fpm-dict bash:foldoc > fpm-dict gold:elements # just use the "elements" dictionary > fpm-dict slovakia:world02 > > fpm-dict bash --like # look for words like the one specified > fpm-dict q[aeiou] --like RE # use RE (Regular Expression) > fpm-dict urban --like substring > > # direct use of RFC 2229 syntax > fpm-dict --url dict://www.dict.org/help > fpm-dict --url dict://www.dict.org/show strat > fpm-dict --url dict://www.dict.org/m:urban:english:regexp
look(1), spell(1), aspell(1), ispell(1), wnb(1WordNet)
| Nemo Release 3.1 | fpm-dict (1) | July 22, 2023 |


This is a test page for the step by step minimalistic React web app tutorial at http://maratbn.com/blogs/2017/01/14/minimalistic-react-webapp/


--- title: Line intersections sidebar: documentation_sidebar permalink: BoundaryIntersections.html folder: documentation toc: false ---
In this section we discus how to analyze grain boundary by intersecting them with certain lines. Lets start by importing some EBSD data and computing grain boundaries.
{% highlight matlab %} % load some example data mtexdata twins silent % detect grains [grains,ebsd.grainId,ebsd.mis2mean] = calcGrains(ebsd('indexed')); % smooth them grains = grains.smooth; % visualize the grains plot(grains,grains.meanOrientation) % extract all grain boundaries gB = grains.boundary; hold on plot(gB,'LineWidth',2) hold off {% endhighlight %}Let start by defining some line by its endpoints and plot in on top of the boundary plot
{% highlight matlab %} xy1 = [10,10]; % staring point xy2 = [41,41]; % end point line([xy1(1);xy2(1)],[xy1(2);xy2(2)],'linestyle',':','linewidth',4,'color','white') {% endhighlight %}The command intersect computes the intersections of all boundary segments with the given line
{% highlight matlab %} [x,y] = grains.boundary.intersect(xy1,xy2); hold on scatter(x,y,'blue','linewidth',2) hold off % find the number of intersection points sum(~isnan(x)) {% endhighlight %} {% highlight plaintext %} ans = 28 {% endhighlight %}


@import security.Roles._ @import views.html.home.withdrawInformation @(cachedData: CachedData)(implicit request: Request[_], flash: Flash, user: Option[CachedData], feedbackUrl: String)
@{cachedData.user.firstName + " " + cachedData.user.lastName}
View your submitted application
Edit your personal details


Attendence app
Login
Email address
We'll never share your email with anyone else.
Password
Remember Me
Login with Email
(for professors)
Log in with
(for students)


21 Day: PUSH Challenge
Learn More
Bootstrap 3 still features a 12-column grid, but many of the CSS class names have completely changed.
Learn more
With "Physical" there is now only one percentage-based grid.
Browse gallery
Follow the 3 week plan
View details »
Learn the daily promises that are set for you.
Learn what it means to put on the full armor of God.
On desiring to enhance yourself
In the next 21 days you'll be PUSH'n in all areas: phyhsically, mentally, and spiritually
You will also be challenged to give priase (each day reflects the amount of time you will be giving thanks)


Express, anonymously.
Messages Table
status:
samples status:
Category Table
status:
samples status:
Article Table
status:
samples status:
Reply_Messages Table
status:
samples status:
Message_Attachments Table
status:
samples status:
Catcha_Images Table
status:
samples status:
Create Tables Table
Create Tables
Empty Tables
Delete Tables
Add Sample Data
Home
Catcha Manager
Express, anonymously.
Catcha Manager
All Catcha Images
Add Catcha Image
Home
Catcha Manager
Express, anonymously.
Catcha Manager
All Catcha Images
Add Catcha Image
All Catcha Images
Catcha Id
Name
Value
Image
Operations
Home
Catcha Manager
Express, anonymously.
Catcha Manager
All Catcha Images
Add Catcha Image
Add Catcha Image
You can drop catcha image(s) over here
Image:
Name:
Catcha Value:
Add
Home
Catcha Manager


Social Responsibility
In the belief that businesses can and should do good while they are doing well, Viewpoints Network will set aside 1% of its profits and 1% of its employees' time for charitable causes. While ultimately how we realize our philanthropic vision will be ours to own, we take our initial cues from the 1% solution that Salesforce.com has advocated and the example set by companies such as Target, and Patagonia that support their communities and the world in which we live.
Early on, while we are proving our business model and not making money, there will not be much profit to share. However, we plan to use our skills and experiences to help other non profits that we know and believe in to make better use of the Internet.


Password Check Prototype v2
Password :

Empty
Show Password
Password must contain the following:
✖ A
lowercase
letter
✖ A
capital (uppercase)
letter
✖ A
number
or symbol
✖ Minimum
8 characters


On behalf of the Bioinformatics and Human Electrophysiology Laboratory (BiHELab),
Department of Informatics, Ionian University, Greece, it is our pleasure to invite you
to the 4th World Congress on "Genetics, Geriatrics and Neurodegenerative Diseases
Research" (GeNeDis 2020).
The congress will be held in Herakleion, Crete, Greece, from 8 to 11 of
October 2020
providing unparalleled access for people from our continent to meet with their international peers,
co-organized by
the Foundation for Research and Technology-Hellas (FORTH),
Crete, the Research Center on Computational Biomarkers (RCCBm), Bern, Switzerland
and the Computer and Algebra Reasearch Group (CARGO lab) at Wilfrid Laurier
University, Ontario, Canada.
The overarching theme will be: “Health Aging and Mental Wellness in the new digital
era”,
a timely subject as we witness revolutionary development in scientific research of drug targets, of
novel biomarkers,
of the new imaging techniques, of the novel protocols for early diagnosis of neurodegenerative
diseases,
and of several other scientific advances within the frame of personalized medicine. Over the four
days of the Congress,
we will have an academic program that includes plenary lectures, parallel symposia and workshops
covering modern scientific topics of interest.
More than a conference, the GeNeDis 2020 will be an experience, a celebration of
the best of genetics,
geriatrics and neurodegenerative disease research. As you might expect when visiting Crete, Greece,
this spirit of celebration will
extend to a vibrant social program.
We look forward to meeting you in Herakleion, Crete in 2020
Professor Panayiotis Vlamos, Head of the Department of Informatics of Ionian
University
Keynote and Invited Speakers
View all the keynotes and the invited speakers of the conferrence in detail
Organizer
Co-Organizers
{% if paginator.previous_page %} {% if paginator.previous_page > 0 %} {% endif %} {% endif %}


About Me
Every great developer you know got
there by solving
problems they were unqualified to solve until they
actually did it.
- Patrick McKenzie
Projects
-
info_outlineConnect Four more_vertConnect Four more_vert
Technologies: HTML, CSS, Javascript, jQuery
Player One plays the black pieces and Player Two plays the red pieces. Player One begins by clicking on column of his/her choice. Pieces automatically move to the lowest available space in the selected column. The object of the game is to connect four of your checkers in a row horizontally, vertically, or diagonally. After a game has been won, the scoreboard is updated. The board is cleared by clicking the new game button.
info_outlineTrigger Happy more_vertTrigger Happy more_vertTechnologies: MEN Stack, Handlebars
This application allows users to share their favorite ASMR videos and provide specific information about the "Triggers" found in each one.
-
info_outlineImbible more_vertImbible more_vert
Technologies: MEAN Stack, Bootstrap, Passport
Imbible is an app that lets users submit whatever they have on hand to discover what classic cocktails they are able to craft with their limited resources. In addition, a user can add whatever concoction they came up with to our list of libations and have others review it.
We wanted to reintroduce our users to the storied world of mixology. In doing so, we hope that they gain a renewed appreciation of the art to making a good drink. Just as one eats not only to be nourished, but to enjoy the flavors created through the love of food, one should drink not to be intoxicated, but to experience a similar enjoyment. We made our app with hope that we could contribute to that enjoyment.
info_outlineCity Tips more_vertCity Tips more_vertTechnologies: Ruby on Rails, Bootstrap, Devise, PostgreSQL
This is a Ruby on Rails app where users can view and leave tips for their favorite cities.
-
info_outlineV.i.A more_vertV.i.A more_vert
Technologies: Ruby on Rails, Materialize, Devise, PostgreSQL
V.i.A is an app that provides user access to key information about a company or organization's approved vendors and purveyors. The app is especially applicable to the restaurant industry in which a wide array of vendors are dealt with on a daily basis. Additionally, the specific information for each vendor changes often and sometimes is not readily communicated from upper management to those who actually use the information.
With this app, users not only have access to vendor information. They can also call, email, link to the vendor's website, and get driving directions if it's necesssary to go to the vendor's location. In short, V.i.A keeps the user's resources organized and accessible.
info_outlineBelated Birthday Wish more_vertBelated Birthday Wish more_vertTechnologies: Materialize, Animate.css, jQuery
This is a simple landing page to wish my niece, Maribelle, a belated Happy Birthday.
Perfection is not attainable, but
if we chase
perfection we can catch excellence.
- Vince Lombardi
Awards
Winner: Best Voice User Experience Using Amazon Alexa


Jukebox():Jukebox
|
Returns a new Jukebox instance. Each jukebox has its own audio context. Create a new jukebox instance to begin. |
jukebox.getSynth(
schema:synthesizerSchema):Synthesizer
|
Returns a new synthesizer object suitable for keyboard or drums. |
jukebox.getModulator(
schema:modulatorSchema):Modulator
|
Returns a new modulator object suitable for generating tones based on frequencies. |


Retrofit turns your HTTP API into a Java interface.
public interface GitHubService { @GET("users/{user}/repos") Call<List<Repo>> listRepos(@Path("user") String user); }
The Retrofit
class generates an implementation of the GitHubService
interface.
Retrofit retrofit = new Retrofit.Builder() .baseUrl("https://api.github.com/") .build(); GitHubService service = retrofit.create(GitHubService.class);
Each Call
from the created GitHubService
can make a synchronous or asynchronous HTTP request to the remote webserver.
Call<List<Repo>> repos = service.listRepos("octocat");
Use annotations to describe the HTTP request:
Annotations on the interface methods and its parameters indicate how a request will be handled.
Every method must have an HTTP annotation that provides the request method and relative URL. There are eight built-in annotations: HTTP
, GET
, POST
, PUT
, PATCH
, DELETE
, OPTIONS
and HEAD
. The relative URL of the resource is specified in the annotation.
@GET("users/list")
You can also specify query parameters in the URL.
@GET("users/list?sort=desc")
A request URL can be updated dynamically using replacement blocks and parameters on the method. A replacement block is an alphanumeric string surrounded by {
and }
. A corresponding parameter must be annotated with @Path
using the same string.
@GET("group/{id}/users") Call<List<User>> groupList(@Path("id") int groupId);
Query parameters can also be added.
@GET("group/{id}/users") Call<List<User>> groupList(@Path("id") int groupId, @Query("sort") String sort);
For complex query parameter combinations a Map
can be used.
@GET("group/{id}/users") Call<List<User>> groupList(@Path("id") int groupId, @QueryMap Map<String, String> options);
An object can be specified for use as an HTTP request body with the @Body
annotation.
@POST("users/new") Call<User> createUser(@Body User user);
The object will also be converted using a converter specified on the Retrofit
instance. If no converter is added, only RequestBody
can be used.
Methods can also be declared to send form-encoded and multipart data.
Form-encoded data is sent when @FormUrlEncoded
is present on the method. Each key-value pair is annotated with @Field
containing the name and the object providing the value.
@FormUrlEncoded @POST("user/edit") Call<User> updateUser(@Field("first_name") String first, @Field("last_name") String last);
Multipart requests are used when @Multipart
is present on the method. Parts are declared using the @Part
annotation.
@Multipart @PUT("user/photo") Call<User> updateUser(@Part("photo") RequestBody photo, @Part("description") RequestBody description);
Multipart parts use one of Retrofit
's converters or they can implement RequestBody
to handle their own serialization.
You can set static headers for a method using the @Headers
annotation.
@Headers("Cache-Control: max-age=640000") @GET("widget/list") Call<List<Widget>> widgetList();
@Headers({ "Accept: application/vnd.github.v3.full+json", "User-Agent: Retrofit-Sample-App" }) @GET("users/{username}") Call<User> getUser(@Path("username") String username);
Note that headers do not overwrite each other. All headers with the same name will be included in the request.
A request Header can be updated dynamically using the @Header
annotation. A corresponding parameter must be provided to the @Header
. If the value is null, the header will be omitted. Otherwise, toString
will be called on the value, and the result used.
@GET("user") Call<User> getUser(@Header("Authorization") String authorization)
Similar to query parameters, for complex header combinations, a Map
can be used.
@GET("user") Call<User> getUser(@HeaderMap Map<String, String> headers)
Headers that need to be added to every request can be specified using an OkHttp interceptor.
Call
instances can be executed either synchronously or asynchronously. Each instance can only be used once, but calling clone()
will create a new instance that can be used.
On Android, callbacks will be executed on the main thread. On the JVM, callbacks will happen on the same thread that executed the HTTP request.
Interface methods support kotlin suspend functions which directly return a Response
object, creating and asynchronously executing the call while suspending the current function.
@GET("users") suspend fun getUser(): Response<User>
A suspend method may also directly return the body. If a non-2XX status is returned an HttpException
will be thrown containing the response.
@GET("users") suspend fun getUser(): User
Retrofit
is the class through which your API interfaces are turned into callable objects. By default, Retrofit will give you sane defaults for your platform but it allows for customization.
By default, Retrofit can only deserialize HTTP bodies into OkHttp's ResponseBody
type and it can only accept its RequestBody
type for @Body
.
Converters can be added to support other types. Sibling modules adapt popular serialization libraries for your convenience.
com.squareup.retrofit2:converter-gson
com.squareup.retrofit2:converter-jackson
com.squareup.retrofit2:converter-moshi
com.squareup.retrofit2:converter-protobuf
com.squareup.retrofit2:converter-wire
com.squareup.retrofit2:converter-simplexml
com.squareup.retrofit2:converter-jaxb
com.squareup.retrofit2:converter-scalars
Here's an example of using the GsonConverterFactory
class to generate an implementation of the GitHubService
interface which uses Gson for its deserialization.
Retrofit retrofit = new Retrofit.Builder() .baseUrl("https://api.github.com/") .addConverterFactory(GsonConverterFactory.create()) .build(); GitHubService service = retrofit.create(GitHubService.class);
If you need to communicate with an API that uses a content-format that Retrofit does not support out of the box (e.g. YAML, txt, custom format) or you wish to use a different library to implement an existing format, you can easily create your own converter. Create a class that extends the Converter.Factory
class and pass in an instance when building your adapter.
The source code to the Retrofit, its samples, and this website is available on GitHub.
<dependency>
<groupId>com.squareup.retrofit2</groupId>
<artifactId>retrofit</artifactId>
<version>(insert latest version)</version>
</dependency>
implementation 'com.squareup.retrofit2:retrofit:(insert latest version)'
Retrofit requires at minimum Java 8+ or Android API 21+.
If you are using R8 the shrinking and obfuscation rules are included automatically.
ProGuard users must manually add the options from retrofit2.pro.
You might also need rules for OkHttp and Okio which are dependencies of this library.
If you would like to contribute code you can do so through GitHub by forking the repository and sending a pull request.
When submitting code, please make every effort to follow existing conventions and style in order to keep the code as readable as possible. Please also make sure your code compiles by running ./gradlew build
(or gradlew.bat build
for Windows).
Before your code can be accepted into the project you must also sign the Individual Contributor License Agreement (CLA).
Copyright 2013 Square, Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.


This is the first project on django by Zaka Farzali. This page generates random password which can be used in every registration.


{% extends "_layout.html" %} {% block meta_title %}Sent {{ proposal_config.cfp_title|safe }} – {{ block.super }}{% endblock %} {% block main %}
You’ve submited your application successfully.
Now please wait for an e-mail from<EMAIL_ADDRESS>We’ll inform you about the result before the end of April whether your application will be successfull or not.
Please keep in mind, that our budget is limited and if there will be too many applications we won’t be able to help everyone.
If you have any questions, don’t hesitate to contact us.
{% else %}Thank you! We’ve received your proposal. If you have any questions, don’t hesitate to write us at<EMAIL_ADDRESS>{% endif %}


Currency Exchanger
Amount:
Base Currency:
Target Currency:
© 2021. Website created by Ahmed Ghouzlane. All Rights Reserved.


Let's get started
If you are on Windows, navigate to "C:\Users\YOURNAME\AppData\Local\Google\Chrome\User Data\Default" where YOURNAME is your username on Windows. Drag and drop the file named "History" into the area below.
Otherwise, check ~/.config/chrome/Default
If that doesn't work, then try chromium instead of chrome
×
Warning!
You best check yourself, you're not looking so good.
Type SQLite code here to discover amazing stuff.
Results


Algorithms for Walking, Running, Swimming, Flying, and Manipulation
© Russ Tedrake, 2023
Last modified .
How to cite these notes, use annotations, and give feedback.
Note: These are working notes used for a course being taught at MIT. They will be updated throughout the Spring 2023 semester. Lecture videos are available on YouTube.
| Previous Chapter | Table of contents | Next Chapter |
My goal of presenting a relatively consumable survey of a few of the main ideas is perhaps more important in this chapter than any other. It's been said that "robust control is encrypted" (as in you need to know the secret code to get in). The culture in the robust control community has been to leverage high-powered mathematics, sometimes at the cost of offering more simple explanations. This is unfortunate, I think, because robotics and machine learning would benefit from a richer connection to these tools, and are perhaps destined to reinvent many of them.
The classic reference for robust control is
So far in the notes, we have concerned ourselves primarily with known, deterministic systems. In the stochastic systems chapter, we started our study of nonlinear dynamics of stochastic systems, which can be beautiful! In this chapter we will begin to consider computational tools for analysis and control of those systems. Stochasticity can come in many forms... we may not know the governing equations (e.g. the coefficient of friction in the joints), our robot may be walking on unknown terrain, subject to unknown disturbances, or even be picking up unknown objects. There are a number of mathematical frameworks for considering this uncertainty; for our purposes this chapter will generalizing our thinking to equations of the form: $$\dot\bx = {\bf f}(\bx, \bu, \bw, t) \qquad \text{or} \qquad \bx[n+1] = {\bf f}(\bx[n], \bu[n], \bw[n], n),$$ where $\bw$ is a new random input signal to the equations capturing all of this potential variability. Although it is certainly possible to work in continuous time, and treat $\bw(t)$ as a continuous-time random signal (c.f. Wiener process), the notation and intuition is a bit simpler when we work with $\bw[n]$ as a discrete-time random signal. For this reason, we'll devote our attention in this chapter to the discrete-time systems.
In order to simulate equations of this form, or to design controllers
against them, we need to define the random process that generates $\bw[n]$.
It is typical to assume the values $\bw[n]$ are independent and identically
distributed (i.i.d.), meaning that $\bw[i]$ and $\bw[j]$ are uncorrelated
when $i \neq j$. As a result, we typically define our distribution via a
probability density $\bw[n] \sim p_\bw(\bw)$
This modeling framework is rich enough for us to convey the key ideas;
but it is not quite sufficient for all of the systems I am interested in.
In
Given a stochastic model, what sort of cost function should we write in order to capture the desired aspect of performance? There are a number of natural choices, which provide nice trade-offs between capturing the desired phenomena and computational tractability.
Remember that $\bx[n]$ is now a random variable, so we want to write our cost and constraints using the distribution described e.g. $p_n(\bx)$. Broadly speaking, one might specify a cost in a handful of ways:
The term "robust control" is typically associated with the class of techniques that try to guarantee some worst-case performance or a worst-case bound (e.g. the gain bounds). The term "stochastic optimal control" or "stochastic control" is typically used as a catch-all for other methods that reason about stochasticity, without necessarily providing the strict robustness guarantees.
It's important to realize that proponents of robust control are not necessarily pessimistic by nature; there is a philosophical stance about how difficult it can be to model the true distribution of randomness that a control system will face in the world. Worst-case analysis typically requires only a definition of the set of possible values that the random variable can take, and not a detailed distribution over those possible values. It may be more practical to operationalize a concept like "this UAV will not crash so long as the peak wind gusts are below 35 mph" than requiring a detailed distribution over wind gust probabilities. But this simpler specification does come at some cost -- worst-case certificates are often pessimistic about the true performance of a system, and optimizing worst-case performance can lead to conservatism in the control design.
The Bellman equation.
Discounted cost. Infinite-horizon average cost.
We already had quick preview into stochastic optimal control in one of the cases where it is particularly easy: finite Markov Decision Processes (MDPs).
Let's consider a stochastic extension of the (discrete-time) LQR problem, where the system is now subjected to additive Gaussian white noise: \begin{gather*} \bx[n+1] = \bA\bx[n] + \bB\bu[n] + \bw[n],\\ E\left[\bw[i]\right] = 0, \quad E\left[ \bw[i]\bw^T[j] \right] = \delta_{ij}{\bf \Sigma_w},\end{gather*} where $\delta_{ij}$ is one if $i=j$ and zero otherwise, and ${\bf \Sigma_w}$ is the covariance matrix of the disturbance, and we take the average cost: $$\min E\left[ \sum_{n=0}^\infty \bx^T[n]\bQ\bx[n] + \bu^T[n] \bR\bu[n] \right], \qquad \bQ=\bQ^T \succeq 0, \bR = \bR^T \succ 0.$$ Note that we saw one version of this already when we discussed policy search for LQR.
In the standard LQR derivation, we started by assuming a quadratic form for the cost-to-go function. Is that a suitable starting place for this stochastic version? We've already studied the dynamics of a linear system subjected to Gaussian noise, and learned that (at best) we should expect it to have a Gaussian stationary distribution. But that sounds problematic, no? If the system can not drive the system to zero and stay at zero in order to stop accruing cost, then won't the infinite-horizon cost be infinite (regardless of the controller)?
Yes. The cost-to-go for this problem is infinite! But it turns out that it still has enough structure for us to work with. In particular, let's "guess" a cost-to-go function of the form: $$J_n(\bx) = \bx^T {\bf S}_n \bx + c_n,$$ where $c_n$ is a (scalar) constant. Now we can write the Bellman equation and do some algebra: \begin{align*} J_n(\bx) &= \min_\bu E_\bw\left[\bx^T \bQ \bx + \bu^T\bR\bu + [\bA\bx + \bB\bu + \bw]^T{\bf S}_{n+1}[\bA\bx + \bB\bu + \bw] + c_{n+1}\right] \\ & \begin{split}= \min_\bu &[\bx^T \bQ \bx + \bu^T\bR\bu + [\bA\bx + \bB\bu]^T{\bf S}_{n+1}[\bA\bx + \bB\bu] + c_{n+1} \\ &+ E_\bw\left[ [\bA\bx + \bB\bu]^T{\bf S}_{n+1} \bw + \bw^T{\bf S}_{n+1}[\bA\bx + \bB\bu]\right] + E_\bw[\bw^T \bw]]\end{split} \\ &= \min_\bu [\bx^T \bQ \bx + \bu^T\bR\bu + [\bA\bx + \bB\bu]^T{\bf S}_{n+1}[\bA\bx + \bB\bu] + c_{n+1} + \tr({\bf \Sigma_w})]. \end{align*} The second line follows by simply pulling all of the deterministic terms outside of the expected value. The third line follows by observing that $\bx$ and $\bu$ are uncorrelated with $\bw,$ and $E[\bw] = 0$, so those cross terms are zero in expectation. Notice that, apart from the $c_{n+1}$ and ${\bf \Sigma_w}$, the remaining terms are exactly the same as the deterministic (discrete-time) LQR version.
Remarkably, we can therefore achieve our dynamic programming recursion by using ${\bf S}_n$ as the solution of the discrete Riccati equation, and $c_n = c_{n+1} + \tr({\bf \Sigma_w}).$ As we take $n\rightarrow \infty$, ${\bf S}_n$ converges to the steady-state solution to the algebraic Riccati equation, and only $c_n$ grows to infinity. As a result, even though the cost-to-go is infinite, the optimal control is still well defined: it is the same $\bu^* = -{\bf K}\bx$ that we obtain from the deterministic LQR problem!
Take note of the fact that the true cost-to-go blows up to infinity. In reinforcement learning, for instance, it is common practice to avoid this blow-up by considering discounted-cost formulations, $$\sum_{n=0}^\infty \gamma^n \ell(\bx[n], \bu[n]),\quad 0 < \gamma \le 1,$$ or average-cost formulations, $$\lim_{N\rightarrow \infty} \frac{1}{N} \sum_{n=0}^N \ell(\bx[n], \bu[n]).$$ These are satisfactory solutions to the problem, but please make sure to understand why they must be used.
The LQR derivation above assumed that the disturbances $\bw[n]$ were independent and identically distributed (i.i.d.). But many of the disturbances we would like to model are not i.i.d.. For instance, consider a UAV flying in the wind. The wind is correlated over time, sometimes building up to gusts but even those gusts are relatively long compared to any the sampling rate of a control system.
In fact, the standard models of wind are typically the output of a
Gaussian i.i.d. random signal passed through a linear low-pass filter
Which cost function should we use to do worst-case design and analysis for linear systems? Certainly we can put an absolute bound on the magnitude of $\bw$, and perform reachability analysis (we will do it below). But knowing that the dependency on $\bw$ is linear allows us to do something more natural, which can lead to tighter bounds. In particular, we expect the magnitude of the deviation in $\bx$ compared to the undisturbed case to be proportional to the magnitude of the disturbance, $\bw$. So the natural bound for a linear system is a relative bound on the magnitude of the response (from zero initial conditions) relative to the magnitude of the disturbance.
Typically, this is done with the a scalar "$L_2$ gain", $\gamma$, defined as: \begin{align*}\argmin_\gamma \quad \subjto& \quad \sup_{\bw(\cdot) \in \int \|\bw(t)\|^2 dt\le \infty} \frac{\int_0^T \| \bx(t) \|^2 dt}{\int_0^T \| \bw(t) \|^2dt} \le \gamma^2, \qquad \text{or} \\ \argmin_\gamma \quad \subjto& \sup_{\bw[\cdot] \in \sum_n \|\bw[n]\|^2 \le \infty} \frac{\sum_0^N \|\bx[n]\|^2}{\sum_0^N \| \bw[n] \|^2} \le \gamma^2.\end{align*} The name "$L_2$ gain" comes from the use of the $\ell_2$ norm on the signals $\bw(t)$ and $\bx(t)$, which is assumed only to be finite.
More often, these gains are written not in terms of $\bx[n]$ directly, but in terms of some "performance output", $\bz[n]$. For instance, if would would like to bound the cost of a quadratic regulator objective as a function of the magnitude of the disturbance, we can minimize $$ \min_\gamma \quad \subjto \quad \sup_{\bw[n]} \frac{\sum_0^N \|\bz[n]\|^2}{\sum_0^N \| \bw[n] \|^2} \le \gamma^2, \qquad \bz[n] = \begin{bmatrix}\sqrt{\bQ} \bx[n] \\ \sqrt{\bR} \bu[n]\end{bmatrix}.$$ This is a simple but important idea, and understanding it is the key to understanding the language around robust control. In particular the $\mathcal{H}_2$ norm of a system (from input $\bw$ to output $\bz$) is the energy of the impulse response; when $\bz$ is chosen to represent the quadratic regulator cost as above, it corresponds to the expected LQR cost. The $\mathcal{H}_\infty$ norm of a system (from $\bw$ to $\bz$) is the largest singular value of the transfer function; it corresponds to the $L_2$ gain.
One of the mechanisms for certifying an $L_2$ gain for a system
comes from a generalization of Lyapunov analysis to consider the contributions of system inputs via the so-called "dissipation
inequalities". Dissipation inequalities are a general tool, and
$L_2$-gain analysis is only one application of them; for a broader
treatment see
Informally, the idea is to generalize the Lyapunov conditions, $V(\bx) \succ 0, \dot{V}(\bx) \preceq 0,$ into the more general form $$V(\bx) \succ 0, \quad \dot{V}(\bx) \preceq s(\bx, \bw),$$ where $\bw$ is the input of interest in this setting, and $s()$ is a scalar quantity representing a "supply rate". Once a system has input, the value of $V$ may go up or it may go down, but if we can bound the way that it goes up by a simple function of the input, then we may still be able to provide input-to-state or input-output bounds for the system. Integrating both sides of the derivative condition with respect to time yields: $$\forall \bx(0),\quad V(\bx(T)) \le V(\bx(0)) + \int_0^T s(\bx(t), \bw(t))dt.$$
To obtain a bound on the $L_2$ gain between input $\bw(t)$ and output $\bz(t)$, the supply rate of interest is $$s(\bx,\bw) = \gamma^2 \|\bw\|^2 - \|\bz\|^2,$$ which yields $$\forall \bx(0),\quad V(\bx(T)) \le V(\bx(0)) + \int_0^T \gamma^2 \|\bw(t)\|^2dt - \int_0^T \|\bz(t)\|^2dt .$$ Now, since this must hold for all $\bx(0)$, it holds for $\bx(0) = 0$. Furthermore, we know $V(\bx(T))$ is non-negative, so we also have $$0 \le V(\bx(T)) \le \int_0^T \gamma^2 \|\bw(t)\|^2dt - \int_0^T \|\bz(t)\|^2dt .$$ Therefore, if we can find a $V$ that satisfied the dissipation inequality for this storage function, we have certified the $\gamma$ is an $L_2$ gain for the system: $$ \frac{\int_0^T \| \bz(t) \|^2 dt}{\int_0^T \| \bw(t) \|^2dt} \le \gamma^2.$$
Coming soon...
Let's consider a robust variant of the LQR problem: \begin{gather*} \min_{\bu[\cdot]} \max_{\bw[\cdot]} \sum_{n=0}^\infty \bx^T[n]\bQ\bx[n] + \bu^T[n] \bR\bu[n] - \gamma^2 \bw^T[n]\bw[n],\\ \bx[n+1] = \bA\bx[n] + \bB\bu[n] + \bB_\bw \bw[n],\\ \bQ=\bQ^T \succeq 0, \bR = \bR^T \succ 0. \end{gather*} The reason for this choice of cost function will become clear in the derivation, but the intuition is that we want to reward the controller for having a small response to large $\bw[\cdot]$. Note that unlike the stochastic LQR formulation, here we do not specify the distribution over $\bw[n]$, and in fact we don't even restrict it to a bounded set. All we know is that at each time step, an omniscient adversary is allowed to choose the $\bw[n]$ that tries to maximize this objective.
In fact, since we don't need to specify a continuous-time random process and the continuous-time derivation is both cleaner and by now, I think, more familiar, let's do this one in continuous time. \begin{gather*} \min_{\bu[\cdot]} \max_{\bw[\cdot]} \int_{n=0}^\infty dt \left[\bx^T(t)\bQ\bx(t) + \bu^T(t) \bR\bu(t) - \gamma^2 \bw^T(t)\bw(t)\right],\\ \dot\bx(t) = \bA\bx(t) + \bB\bu(t) + \bB_\bw \bw(t),\\ \bQ=\bQ^T \succeq 0, \bR = \bR^T \succ 0. \end{gather*} We will once again guess a quadratic cost-to-go function: $$J(\bx) = \bx^T {\bf S} \bx, \quad {\bf S} = {\bf S}^T \succ 0.$$ The dynamic programming recursion still holds for this problem , resulting in the Bellman equation: $$\forall \bx,\quad 0 = \min_\bu \max_\bw \left[\bx^T\bQ\bx + \bu^T\bR\bu - \gamma^2 \bw^T\bw + \pd{J^*}{\bx}[\bA\bx + \bB\bu + \bB_\bw \bw]\right].$$ Since the inside is a concave quadratic form over $\bw$, we can solve for the adversary by finding the maximum: \begin{gather*} \pd{}{\bw} = -2 \gamma^2 \bw^T + 2\bx^T {\bf S} \bB_\bw,\\ \bw^* = \frac{1}{\gamma^2} \bB_\bw^T {\bf S} \bx.\end{gather*} This is the disturbance input that can cause the largest cost; the optimal play for the adversary. Now we can solve the remainder as we did with the original LQR problem: \begin{gather*} \pd{}{\bu} = 2 \bu^T \bR + 2\bx^T {\bf S} \bB,\\ \bu^* = -\bR^{-1} \bB^T {\bf S} \bx = -\bK \bx.\end{gather*} Substituting this back into the Bellman equation gives: $$0 = \bQ + {\bf S}\left[ \gamma^{-2} \bB_\bw \bB_\bw^T - \bB \bR^{-1} \bB^T \right]{\bf S} + {\bf S}^T \bA + \bA^T {\bf S},$$ which is the original LQR Riccati equation with one additional term involving $\gamma.$ And like the original LQR Riccati equation, we must ask whether it has a positive-definite solution for ${\bf S}$. It turns out that if the system is stabilizable and $\gamma$ large enough, then it does have a PD solution. However, as we reduce $\gamma$ towards zero, there will be some threshold $\gamma$ beneath which this Riccati equation does not have a PD solution. Intuitively, if $\gamma$ is too small, then the adversary is rewarded for injecting disturbances that are so large as to break the convergence.
Here is the fascinating thing: the $\gamma$ in this robust LQR cost function can be interpreted as an $L_2$ gain for the system. Recall that when we were making connections between the Bellman equation and Lyapunov equations, we observed that the Bellman equation can be written as $\forall \bx, \quad \dot{J}^*(\bx) \le -\ell(\bx,\bu)$? Here this yields: $$\forall \bx, \quad \dot{J}^*(\bx) \le \gamma^2 \bw^T(t)\bw(t) - \bx^T(t)\bQ\bx(t) - \bu^T(t) \bR\bu(t).$$ This means that the cost-to-go is a valid dissipation inequality for the supply rate that provides an $L_2$ gain for the performance output $\bz = \begin{bmatrix}\sqrt{\bQ} \bx \\ \sqrt{\bR} \bu\end{bmatrix}.$ Moreover, we can find the minimal $L_2$ gain by finding the minimal $\gamma > 0$ for which the Riccati equation has a positive-definite solution. And given the properties of the Riccati equation, this can be done with a line search in $\gamma$.
Because the $L_2$ gain is the $\mathcal{H}_\infty$-norm of the system, this recipe of searching for the smallest $\gamma$ and taking the Riccati solution is an instance of $\mathcal{H}_\infty$ control design.
The standard criticism of $\mathcal{H}_2$ optimal control is that minimizing the expected value does not allow any guarantees on performance. The standard criticism of $\mathcal{H}_\infty$ optimal control is that it concerns itself with the worst case, and may therefore be conservative, especially because distributions over possible disturbances chosen a priori may be unnecessarily conservative. One might hope that we could get some of this performance back if we are able to update our models of uncertainty online, adapting to the statistics of the disturbances we actually receive. This is one of the goals of adaptive control.
One of the fundamental problems in online adaptive control is the trade-off between exploration and exploitation. Some inputs might drive the system to build more accurate models of the dynamics / uncertainty quickly, which could lead to better performance. But how can we formalize this trade-off?
There has been some nice progress on this challenge in machine
learning in the setting of (contextual) multi-armed
bandit problems. For our purposes, you can think of bandits as a
limiting case of an optimal control problem where there are no dynamics
(the effects of one control action do not effect the results of the next
control action). In this simpler setting, the online optimization
community has developed exploration-exploitation strategies based on the
notion of minimizing regret -- typically the accumulated
difference in the performance achieved by my online algorithm vs the
performance that would have been achieved if I had been privy to the data
from my experiments before I started. This has led to methods that make
use of concepts like upper-confidence bound (UCB) and more recently
bounds using a least-squares squares confidence bound
In the last few years, we've see these results translated into the setting of linear optimal control...
Coming soon...
L2-gain with dissipation inequalities. Finite-time verification with sums of squares.
Occupation Measures
SOS-based design| Previous Chapter | Table of contents | Next Chapter |


The Exploring Electric Field ApplicationYou are the yellow avatar and you are exploring the electric potential in the plane shown. Where ever you are, you can ask to show the potential at your current position and in all neighboring squares. When the game starts, you are at the center of the playing field and you can see the potential where you are and in the squares around you. The electric field and potential are produced by two point charges somewhere in the plane shown, both with the same magnitude of charge, but either both are positive, both are negative, or one is negative and one is positive, with equal probability. Your job is to move to new positions in the plane, as explained below, exploring the potential, look at the potentials in neigboring squares, and guess what the invisible charges are, in as few moves as possible. Before you can move to a new position, you must correctly deduce the direction of the electric field at your current position from the potentials you see around you, using the upper keypad, taking note that the navigation balls in the 3D scene correspond to the colors on the keypad. That is, if you think the electric field at your current position points closest to the direction of the red ball in the scene, press the red keypad button. After you have correctly guessed the electric field at your current position you can then move to a new position in the plane, using the lower keypad. You can move anywhere you want in the plane with no penalty. When you want to see the potential at the new point, press the "Show Potential Around Current Position". Once you think you know what the charges are that produce this potential see if your guess is correct by clicking in the appropriate radio button next to your guess. If you wrong you will be penalized 4 points. The object of the game is to find out the charges with the smallest number of potential regions explored. If you left click and drag in the scene you can change the view angle.
|


Home
Slides
Info
Workbench
Signup
Feedback
caMicroscope
Digital pathology image viewer with support for human/machine generated annotations and markups.
Slides
Info
Slide Information Details
×
Synopsis
Annotations
Heatmaps
Information Dashboard


ls -d */
# use -C to sort the files
echo "some text" >> output-file.txt
find -name "random-name*"
# This lists the matching files and their paths
find -name "random-nae*" | wc -l
#lists number of results through wc
alias
or which [keyword]


| authors: | Ronald Oussoren, Bill Bumgarner |
|---|---|
| contact: |<EMAIL_ADDRESS>|
| URL: | http://pyobjc.sourceforge.net/ |
| copyright: | 2002 The PyObjC Project |
This document describes the coding style for PyObjC. Please use this style for new code and try apply this style to existing code while working on it.
The management summary: 4-space indents in Python code, 1-TAB indents in C code.
The coding style for core Python is used (see PEP 8). For consistency with Cocoa we use mixed-case identifiers (like lookUpClass).
PyObjC extensions to Apple frameworks should be clearly marked as such, preferably by prefixing names with PyObjC or pyobjc. This should make it clear to users where they should look for documentation of an item: The Apple documentation or ours.
The coding style for core Python is used (see PEP 7). We use PyObjC instead of Py as the prefix for globally visible symbols.
All (Objective-)C files in Modules/objc/ should include "pyobjc.h" as their first include. The (Objective-)C files in the wrappers for frameworks should include "pyobjc-api.h" and should not use other headers files from pyobjc-core.
The setup.py for a framework wrapper should defer most work to pyobjc_setup.py, like so:
from pyobjc_setup import setup
setup(
name='pyobjc-framework-AddressBook',
version="2.3"
description = "Wrappers for the framework AddressBook on Mac OS X",
packages = [ "AddressBook" ],
install_requires = [
'pyobjc-core>=2.3b1',
'pyobjc-framework-Cocoa>=2.3b1',
],
)
The framework wrappers do not include a copy of pyobjc-api.h, but dynamicly fetch that at build time.
All items exported by the objc module and all PyObjC extensions to Apple frameworks (the AppKit and Foundation modules) should be documented using docstrings.
All documentation– both standalone documents and docstrings– should be marked up using reStructuredText [ReST].
reStructuredText can be used in doc strings. ReST in DocStrings works exactly like a standalone ReST document, but the ReST is broken up slightly differently.
To format the DocStrings to be ReST compatible, make the following changes/additions to the source. These examples were taken from source found in the DocUtils source tree.
Add appropriate ReST style fields to the top of the document as comments:
# Author: David Goodger
# Contact<EMAIL_ADDRESS># Copyright: This module has been placed in the public domain.
Add a module level variable that indicates that ReST is used to format the text contained in the docstrings:
__docformat__ = 'reStructuredText'
Format all other DocStrings as one normally would in Python. Use ReST style markup where appropriate. For example, bulleted lists and sections might commonly appear in the module or class docstrings. The docstrings for individual methods may use example blocks, hyperlinks, or any other ReST markup.


Toto Wolff storms around COTA: Watch Mercedes boss drive around the track
by Matt GrettonToto Wolff is usually on the over side of the pit wall, but on this occasion, the Mercedes team boss finds himself in the car. He has a go at COTA ahead of the United States Grand Prix weekend.


✖
Adult
Anthologies
Art
Audiobooks
Biographies
Body
Business
Children
Comics
Contemporary
Cooking
Crime
Engineering
Entertainment
Fantasy
Fiction
Food
General
Health
History
Horror
Investing
Literary
Literature
Manga
Media-help
Memoirs
Mind
Mystery
Nonfiction
Religion
Religion
Romance
Science
Self
Spirituality
Sports
Superheroes
Technology
Thrillers
Travel
Women
Young


{% extends "juakstore/base.html" %} {% block content %} {% if currentUser.is_staff %}
{{ booking.notes }}
{% if booking.has_conflict %}The booking has conflicts with the following bookings in this room:
Booker: {{ booking.booker }}
Room: {{ booking.room }}
Date: {{ booking.date }}
Start: {{ booking.start }}
End: {{ booking.end }}
{% if booking.approved == False %} {% endif %} {% else %}{{ booking.notes }}
{% if booking.has_conflict %}The booking has conflicts with the following:
Booker: {{ booking.booker }}
Room: {{ booking.room }}
Date: {{ booking.date }}
Start: {{ booking.start }}
End: {{ booking.end }}


Reddit Viewer
No posts found.
Loading...
There was an error fetching your data.
{{post.title}}
{{post.ups}} up votes - by: {{post.author}} - {{post.created | date: 'medium'}}
prev
next


{% load static %}
RNA Prediction
Created with love by:
Debapriya Tula(summer intern),
Piyali Sen(PhD research scholar)
RNA Secondary Structure Prediction
DO THIS OR THIS
{% csrf_token %}
Step 1:
Enter the sequence:
Clear
Step 1:
Upload a text(.txt) file
(keep file in HOME folder):
Step 2:
Enter the constraints:
Clear
. represents inclusion
x represents exclusion
from participation in base pairing
Step 2:
Upload a text file for .x sequence
(keep file in HOME folder):
Select the base pairs to keep:
G-U
A-U
G-C
Choose the algorithm:
Our method
Olke
Neural
Please enter your email id so that we can mail you the results once calculated:
Dot bracket forms:
{% for seq in res %} {{seq}} {% endfor %}
Graphs:
{% for index,plot in dot_bracket %}
Click here to visualize the structure
{% endfor %}


D474MEDIA™
"...the greatest entertainment in the world..."
• 👌 •
• 👌 •
Full-Screen Mode
• 👌 •
D474com
D474media
D474designs
D474forex
D474developments
That-Hill
Copyright 2021
All Rights Reserved


Claim number: {% if data['claimant'] == 1.2 %} Draft {% else %} 391MC645 {% endif %}
Claim status
This claim has not been submitted
Your claim is saved as a draft. Continue with claim. {% elseif data['claimant'] == 1 %}Your claim has been sent
Mary Richards has until before 4pm on to respond. They can request an extra 14 days if they need it.
{% elseif data['claimant'] == 2 %}You can request a County Court Judgment
Mary Richards has not responded to your claim by the deadline. You can request a County Court Judgment (CCJ) against them.
The court will make an order requiring them to pay the money. It does not guarantee that they pay it.
Mary Richards can still sign the settlement agreement until you request a CCJ.
You've requested a County Court Judgment (CCJ)
We'll contact you within 5 days to tell you whether the judgment has been entered.
Mary Richards can no longer respond to the claim using this service - they may have responded by post.
The defendant has requested more time to respond
Mary Richards has requested an extra 14 days to respond. They need to respond before 4pm on .
{% elseif data['claimant'] == 4 %}The defendant has offered to pay in instalments
You can accept or reject their offer.
{% elseif data['claimant'] == 4.01 %}The defendant has offered to pay in instalments
They'll send you their financial details. You can use these to decide whether to accept or reject what they say they owe.
{% elseif data['claimant'] == 4.1 %}The defendant has offered to pay by {{ now | date( 'add', 3, 'months') | date }}
You can accept or reject their offer.
{% elseif data['claimant'] == 4.11 %}The defendant has offered to pay by {{ now | date( 'add', 3, 'months') | date }}
They'll send you their financial details. You can use these to decide whether to accept or reject their offer.
{% elseif data['claimant'] == 5 %}The defendant has admitted they owe £{{ data['owe-amount'] or '1,200' }}
They said they don't owe the full amount you claimed.
They've offered to pay the £{{ data['owe-amount'] or '1,200' }} immediately.
They must make sure you have the money by {{ now | date( 'add', 5, 'days') | date }}. Any cheques or transfers should be clear in your account.
You can accept or reject their admission.
The defendant has admitted they owe £{{ data['owe-amount'] or '1,200' }}
They've offered to pay in instalments.
You can accept or reject their admission.
{% elseif data['claimant'] == 5.11 %}The defendant has admitted they owe £{{ data['owe-amount'] or '1,200' }}
They've offered to pay in instalments.
They'll send you their financial details. You can use these to decide whether to accept or reject what they say they owe.
{% elseif data['claimant'] == 5.2 %}The defendant has admitted they owe £{{ data['owe-amount'] or '1,200' }}
They've offered to pay by {{ now | date( 'add', 3, 'months') | date }}.
You can accept or reject their admission.
{% elseif data['claimant'] == 5.21 %}The defendant has admitted they owe £{{ data['owe-amount'] or '1,200' }}
They've offered to pay by {{ now | date( 'add', 3, 'months') | date }}. They'll send you their financial details. You can use these to decide whether to accept or reject what they say they owe.
{% elseif data['claimant'] == 6 %}The defendant believes that they've paid the claim in full
Mary Richards said they paid you £1,500 on {{ now | date('add' , 3 , 'days') | date( 'subtract', 1, 'months') | date }}.
You can accept or reject this response.
The defendant said they've paid what they owe
Mary Richards said they paid you £{{ data['owe-amount'] or '1,430' }} on {{ now | date('add' , 3 , 'days') | date( 'subtract', 1, 'months') | date }}.
You can accept or reject this response.
{% elseif data['claimant'] == 8 %}The defendant has rejected your claim
They said they dispute your claim.
You need to accept or reject their defence before 4pm on {{ now | date('add' , 33, 'days') | date }}.
Download their response (PDF, 123KB)
{% elseif data['claimant'] == 9 %}The defendant's response
Mary Richards has rejected the claim. They’ve suggested mediation to help resolve this dispute.
If you reject their response, we'll contact you with an appointment unless you choose not to try mediation.
The defendant's response
Mary Richards has rejected the claim. The claim has been automatically registered for free telephone mediation.
If you reject their response, we'll contact you with an appointment unless you choose to opt out of mediation.
You've signed a settlement agreement
We've emailed Mary Richards the repayment plan and the settlement agreement for them to sign.
They must respond by {{ now | date('add', 7, 'days') | date }}. We'll email you when they respond.
If they don't think they can afford the plan, they can ask for a judge to make a different plan.
{% elseif data['claimant'] == 10.001 %}You've signed a settlement agreement
We've emailed Mary Richards the repayment plan and the settlement agreement for them to sign.
They must respond by {{ now | date('add', 7, 'days') | date }}. We'll email you when they respond.
If they don't respond you can request a County Court Judgment.
{% elseif data['claimant'] == 10.01 %}You've both signed a settlement agreement
The agreement says Mary Richards will pay you in instalments of £250 per month, starting 1 {{ now | date("add", 1, "month") | date( "MMMM YYYY" ) }}.
The agreement explains what you can do if the defendant breaks the terms.
Download the settlement agreement (PDF, 123KB)
When you've been paid in full, you need to let us know.
{% elseif data['claimant'] == 10.02 %}Mary Richards has rejected your settlement agreement
You can request a County Court Judgment (CCJ) against them based on the repayment plan shown in the agreement.
The court will make an order requiring them to pay the money. It does not guarantee that they pay it.
Mary Richards can still sign the settlement agreement until you request a CCJ.
Request a County Court Judgment (CCJ)
{% elseif data['claimant'] == 10.03 %}The defendant has not signed your settlement agreement
You can request a County Court Judgment (CCJ) against them based on the repayment plan shown in the agreement.
The court will make an order requiring them to pay the money. It does not guarantee that they pay it.
Mary Richards can still sign the settlement agreement until you request a CCJ.
Request a County Court Judgment (CCJ)
{% elseif data['claimant'] == 10.11 %}You requested a County Court Judgment against Mary Richards
When we've processed your request, we'll post a copy of the judgment to you and to Mary Richards.
When you've been paid in full, you need to let us know.
{% elseif data['claimant'] == 10.12 %}If Mary Richards doesn't pay
You can ask the court to recover the debt for you.
You'll need to pay a fee each time you ask the court to recover the debt. The court adds this fee to the total debt owed to you.
There is no guarantee that the court will get your money back.
If you've been paid
If you want to settle the claim because the defendant has paid you, you need to tell us.
If Mary Richards doesn't pay
You can ask the court to recover the debt for you.
You'll need to pay a fee each time you ask the court to recover the debt. The court adds this fee to the total debt owed to you.
There is no guarantee that the court will get your money back.
If you've been paid
Tell us if you want to end the claim beacuse the defendant has paid you.
You have paid for a warrant of control
A bailiff will try to recover the debt.
We'll post a letter with details of the warrant to you and to Mary Richards.
See other debt recovery options (opens in a new window)
Repayment plan proposed
You have proposed a repayment plan of £250 per month, starting 1 {{ now | date("add", 1, "month") | date( "MMMM YYYY" ) }}.
We'll contact you when they've responded to your proposal.
{% elseif data['claimant'] == 10.3 %}Payment determined
The court has determined a repayment plan.
{% elseif data['claimant'] == 10.4 %}You've both signed a settlement agreement
The agreement says the defendant will pay you in full by {{ now | date("add", 3, "months") | date( "D MMMM YYYY" ) }}.
The agreement explains what you can do if the defendant breaks the terms.
Download the settlement agreement (PDF, 123KB)
When you've been paid in full, you need to let us know.
{% elseif data['claimant'] == 10.5 %}You've both signed a settlement agreement
The agreement says the defendant will pay you immediately.
They must make sure you have the money by 4 June 2018. Any cheques or transfers should be clear in your account.
The agreement explains what you can do if the defendant breaks the terms.
Download the settlement agreement (PDF, 123KB)
When you've been paid in full, you need to let us know.
{% elseif data['claimant'] == 4.2 %}The defendant said they'll pay you immediately
They must make sure you have the money by {{ now | date('add', 5, 'days') | date }}. Any cheques or transfers should be clear in your account.
You need to tell us if you've settled the claim, for example because the defendant has paid you.
You can settle for less than the full claim amount.
If you haven't been paid
If the defendant has not paid you by {{ now | date('add', 5, 'days') | date }}, you can request a County Court Judgment.
{% elseif data['claimant'] == 4.3 %}The defendant said they'll pay you immediately
They must make sure you have the money by {{ now | date('subtract', 1, 'days') | date }}. Any cheques or transfers should be clear in your account.
You need to tell us if you've settled the claim, for example because the defendant has paid you.
You can settle for less than the full claim amount.
If you haven't been paid
If the defendant has not paid you, you can request a County Court Judgment.
{% elseif data['claimant'] == 10.6 %}Awaiting judge's review
You've rejected the defendant's repayment plan and an alternative plan suggested by the court.
A County Court Judgment has been issued against the defendant.
We'll post a copy of the judgment to you and to Mary Richards.
A judge will decide what Mary Richards can afford to pay, based on their financial details.
We'll contact you to tell you what to do next.
{% elseif data['claimant'] == 10.601 %}You need to send the defendant's financial details to the court
Make sure you include your claim number: 352MC733.
The court will review the details to see if the defendant can afford your repayment plan.
Use this address
The defendant should have sent you the details - send them to:
Civil Money Claims
St. Katharine's House
21-27 St. Katharine's Street
Northampton
NN1 2LH
Or email them to<EMAIL_ADDRESS>If the court believes the defendant can afford your plan
A County Court Judgment (CCJ) will be issued. This requires the defendant to pay according to the terms of the plan.
If the court believes the defendant can not afford your plan
The court will set its own repayment terms and issue a CCJ.
{% elseif data['claimant'] == 10.61 %}You've signed a settlement agreement
The agreement proposes the defendant pays you in instalments of £250 per month, starting 1 May 2018.
The agreement is not binding unless the defendant signs it. We've emailed it to them and we'll contact you when they respond.
Download the settlement agreement (PDF, 123KB)
{% elseif data['claimant'] == 10.8 %} {% elseif data['claimant'] == 10.801 %}The defendant rejected the repayment plan
They said they can't afford to pay based on the terms of the County Court Judgment.
A judge will review the case. We'll contact you to tell you what to do next.
{% elseif data['claimant'] == 10.81 %}The defendant has admitted they owe £{{ data['owe-amount'] or '1,200' }}
They said they'll pay you immediately.
They must make sure you have the money by {{ now | date( 'add', 5, 'days') | date }}. Any cheques or transfers should be clear in your account.
You need to tell us if you've settled the claim, for example because the defendant has paid you.
What to do if they don't pay
If the defendant has not paid you by {{ now | date('add', 5, 'days') | date }}, you can request a County Court Judgment.
{% elseif data['claimant'] == 10.82 %}The defendant has admitted they owe £{{ data['owe-amount'] or '1,200' }}
They said they'll pay you immediately.
The defendant said they would pay you by {{ now | date('subtract', 2, 'days') | date }}. Any cheques or transfers should be clear in your account.
You need to tell us if you've settled the claim, for example because the defendant has paid you.
If you haven't been paid
If the defendant has not paid you, you can request a County Court Judgment.
{% elseif data['claimant'] == 10.83 %}The claim is settled
You've accepted the defendant's part admission
You agreed they owed £{{ data['owe-amount'] or '1,200' }} and that they've paid it already.
{% elseif data['claimant'] == 10.831 %}You've rejected the defendant's admission
They said they owe £{{ data['owe-amount'] or '1,200' }}.
You've both agreed to try mediation. The Small Claims Mediation Service will contact you and try to arrange an appointment.
Download their response (PDF, 123KB)
{% elseif data['claimant'] == 10.832 %}You've rejected the defendant's admission
They said they owe £{{ data['owe-amount'] or '1,200' }}.
You need to complete a directions questionnaire form to tell us more about the claim.
Your claim won't proceed if you don't complete and return the form before 4pm on .
Download their response (PDF, 123KB)
{% elseif data['claimant'] == 10.84 %}You've rejected the defendant's admission
They said they owe £{{ data['owe-amount'] or '1,200' }}.
You need to complete a directions questionnaire form to tell us more about the claim.
Your claim won't proceed if you don't complete and return the form before 4pm on .
Download their response (PDF, 123KB)
{% elseif data['claimant'] == 10.85 %}You've rejected the defendant's admission
They said they owe £1,200.
You've both agreed to try mediation. The Small Claims Mediation Service will contact you to arrange an appointment.
Download their response (PDF, 123KB)
{% elseif data['claimant'] == 10.9 %}You've rejected the defendant's response
You've both agreed to try mediation. The Small Claims Mediation Service will contact you to arrange an appointment.
Download their response (PDF, 123KB)
{% elseif data['claimant'] == 10.91 %}You've rejected the defendant's response
The court will review the case. You might have to go to a hearing.
We'll contact you if we set a hearing date to tell you how to prepare.
{% elseif data['claimant'] == 11.1 %}You need to give us more information before the hearing
Such as uploading copies of any evidence or witness statements required for the hearing.
If you do not do this, your claim may be cancelled.
Download the order (PDF, 123KB)
Settle out of court
Mary Richards has made an offer to settle out of court.
Mary Richards has rejected your claim.
You need to complete a directions questionnaire form to tell us more about the claim.
Your claim won't proceed if you don't complete and return the form before 4pm on .
Download their response (PDF, 123KB)
Settle out of court
You've rejected the defendant's offer to settle out of court. You won't receive any more offers from the defendant.
Mary Richards has rejected your claim
You need to complete a directions questionnaire form to tell us more about the claim.
Your claim won't proceed if you don't complete and return the form before 4pm on .
Download their response (PDF, 123KB)
Settle out of court
You've agreed to the offer made by Mary Richards and signed an agreement to settle your claim.
We’ve asked Mary Richards to sign the agreement.
Mary Richards has rejected your claim
You need to complete a directions questionnaire form to tell us more about the claim.
Your claim won't proceed if you don't complete and return the form before 4pm on .
Download their response (PDF, 123KB)
You've both signed a settlement agreement
The claim is now settled.
The agreement explains what can happen if either party breaks the terms.
You've requested free mediation
We'll ask the defendant Mary Richards if they want to take part in mediation. We'll tell you how they respond.
You've rejected the defendant's response
You've both agreed to mediation. The Small Claims Mediation Service will contact you to arrange an appointment.
Download their response (PDF, 123KB)
You need to tell us more about the claim
You need to complete a directions questionnaire to tell us more about your claim.
The claim won't proceed if you don't complete and return the form before 4pm on .
Download their response (PDF, 123KB)
The defendant wants to try mediation
A mediator will contact both you and the defendant within 14 days to arrange an appointment.
A judge will review the claim
You've rejected the defendant's response and asked for a judge to review the claim. We'll contact you if we set a hearing date to tell you how to prepare.
You settled out of court
You've both signed an agreement to settle out of court. The claim is now settled.
Download the settlement agreement (PDF, 123KB)
You need to respond to this counterclaim
You need to respond by (14 days remaining).
View and respond to the counterclaim
If you don't respond Mary Richards can ask for a default County Court Judgment (CCJ) against you. A CCJ means the court orders you to pay the money.
The defendant's response
The defendant Mary Richards has rejected your the claim.
This claim is settled
Mary Richards paid you £1500 on {{ now | date( 'subtract', 5, 'days' ) | date }}.
This claim is settled
Mary Richards paid you £1500 on {{ now | date( 'subtract', 5, 'days' ) | date }}.
The defendant's County Court Judgment will be cancelled.
This claim is settled
Mary Richards paid you £1500 on {{ now | date( 'subtract', 5, 'days' ) | date }}.
The defendant's County Court Judgment will be marked as paid.
This claim has been discontinued
You ended the claim on {{ now | date( 'subtract', 5, 'days' ) | date }}.
Download notice of discontinuance (PDF, 123KB)
The defendant wants to settle out of court
Mary Richards has made an offer to settle out of court You can accept, reject or make a counter offer.
View and respond to offer. {% elseif data['claimant'] == 12 %}We've sent your offer to Mary Richards
Mary Richards can accept, reject or make a counter offer. We'll email you when they respond.
If you settle out of court you’ll sign an agreement that replaces the claim. Until then the claim continues and might go to a court hearing.
{% elseif data['claimant'] == 16 %}Sign a legal agreement to settle out of court
The defendant has accepted your offer. You need to sign a legal agreement to settle out of court Mary Richards has signed the agreement.
Sign a legal agreement to settle out of court
The defendant has accepted your offer. You need to sign a legal agreement to settle out of court Mary Richards has signed the agreement.
Request County Court Judgment
If the defendant doesn't pay or breaks the terms of the settlement agreement, you can request a County Court Judgment.
{% endif %} {% if data['claimant'] < 20 and data['claimant'] != 1.2 and data['claimant'] != 10.11 and data['claimant'] != 10.111 and data['claimant'] != 10.12 and data['claimant'] != 10.121 and data['claimant'] != 10.01 and data['claimant'] != 10.4 and data['claimant'] != 10.5 and data['claimant'] != 10.81 and data['claimant'] != 10.82 and data['claimant'] != 10.83 and data['claimant'] != 16 and data['claimant'] != 17 and data['claimant'] != 4.2 and data['claimant'] != 4.3 %}If you've been paid
Tell us if you want to end the claim because the defendant has paid you.
{% endif %}


Status: Passed, Jan 89 X3J13Issue: HASH-TABLE-TESTS
References: CLtL, p382 (third paragraph), and p383
Issue EQUAL-STRUCTURE
Requires Issue: CONTAGION-ON-NUMERICAL-COMPARISONS
Category: Addition
Edit history: 26-Sep-88 Version 1 by JonL
8-Dec-88 Version 2 by Masinter
Problem Description:
A great many users try to coalesce two equivalent DEFSTRUCT instances,
or two equivalent pointer arrays, using hash tables; but they are rudely
awakened when they find out that EQUAL is not an appropriate test for
this case, and that there is no :test argument to MAKE-HASH-TABLE which
will "hash on non-tree structures".
Proposal: HASH-TABLE-TESTS:ADD-EQUALP
With the advent of the issue CONTAGION-ON-NUMERICAL-COMPARISONS, we
can expect EQUALP to be a true equivalence function, and thus a suitable
candidate for the :test function to MAKE-HASH-TABLE. Hash-tables will
come in four kinds, the difference being whether the keys are compared
with EQ, EQL, EQUAL, or EQUALP.
Examples:
> (defstruct foo a b c)
FOO
> (setq x (make-foo :a 1 :b 'b :c '(1 . 2))
x-copy (make-foo :a 1 :b 'b :c '(1 . 2)))
#S(FOO A 1 B B C (1 . 2))
> (setq y #(1 B (1 . 2))
y-copy (copy-seq y))
#(1 B (1 . 2))
> (setq ht-equal (make-hash-table :test 'equal)
ht-equalp (make-hash-table :test 'equalp))
#<Hash-Table BB1F7B>
> (progn (setf (gethash x ht-equal) t) (setf (gethash x ht-equalp) t)
(setf (gethash y ht-equal) t) (setf (gethash y ht-equalp) t))
T
> (gethash x-copy ht-equal)
> (gethash x-copy ht-equalp)
T
T
> (gethash y-copy ht-equal)
> (gethash (copy-seq y) ht-equalp)
T
T
>
Rationale:
Implementing hash-tables efficiently is not an easy task; it makes more
sense for this to be standardly available than for individual programmers
to keep trying to re-invent this obscure part of technology.
Current Practice:
Lucid's release 3.0 implements this proposal [some 2.1-level release
supported it "provisionally"]. Symbolics implementation is reputed
to be robust enough to implement this proposal trivially.
Cost to Implementors:
Moderate. Implementors have already dealt with EQUAL; the only tricky
part will be ensuring the implication:
"If 'a' is EQUALP to 'b', then 'a' and 'b' must lie in the
same collision chain in any given EQUALP hash table"
It has been suggested that merely linear searching a table is an acceptable
implementation technique for CL's hash-tables [although no serious
implementation limits itself thus] and that such tables have no "collision
chains"; but in fact, this is the degenerate case wherein all entries are
in the same collision chain, so the implication is trivially satisfied.
Some persons prefer to say that the "reprobe sequence will be the same for
the two items", rather than using the term "collision chain"; the meaning
is the same.
Cost to Users:
None. This is an entirely upwards-compatible addition.
Cost of non-adoption:
Continuing bug reports from users about why "hashing
doesn't work" when said user tries entering pointer-containing objects
other than cons cells into hash tables. Continuing delay in same
user's work until they figure out a new strategy for identifying
equivalent structures. More difficulty in debugging their alternatives.
Benefits:
Addresses one aspect of the difficult equivalence problem. Makes
hash tables more useful. Permits case-insensitive hashing
on strings [tables of type EQUAL are case-sensitive on strings];
another use is to allow = comparison for numbers
[tables of type EQUAL use EQL on numbers].
Aesthetics:
Reduces the discontinuity between basic equivalence functions and those
usable as equivalence relations in hash-tables.
Discussion:
With the rejection of all the issues related to EQUAL-STRUCTURE, there is
little or no hope that EQUAL will be "beefed up" to meet the expectations
of so many of the user community on compound structures. If one wants
a hash-table with a :test function that has fewer equivalence classes
(i.e., does more "coalescing"), then there is no alternative now except
to use the function EQUALP.
It would also be possible to extend hash tables to allow = or
STRING=, but those are not being proposed at this time.


Guillermo R. Soto, Sunset view from Luna Castle Hostel, Panama City, Panama
Legal
MIT License
Copyright (c) 2017 Guillermo R. Soto
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THESOFTWARE.


{{post.title}}
{{post.content}}
Delete Post
Name: {{comment.name}}
Email: {{comment.email}}
{{comment.content}}


PTPusher Class Reference
| Inherits from | NSObject |
| Conforms to | PTPusherConnectionDelegate PTPusherEventBindings |
| Declared in | PTPusher.h PTPusher.m |
Overview
A PTPusher object provides a high level API for communicating with the Pusher service.
The provided API allows you to connect and disconnect from the service, subscribe and unsubscribe from channels and bind to events. There is also beta support for sending events directly over the connection (instead of using the Pusher REST API).
To create an instance of PTPusher, you will need your Pusher API key. This can be obtained from your account dashboard.
PTPusher’s delegate methods allow an object to receive important events in the client and connection’s lifecycle, such as connection, disconnection, reconnection and channel subscribe/unsubscribe events.
Whilst PTPusher exposes it’s connection object as a readonly property, there is no need to manage or create this connection manually. The connection can be queried for it’s current connection state and socket ID if needed.
PTPusher aims to mirror the Pusher Javascript client API as much as possible although whilst the Javascript API uses event binding for any interesting events – not just server or other client events – libPusher uses standard Cocoa and Objective-C patterns such as delegation and notification where it makes sense to do so.
Note: due to various problems people have had connecting to Pusher without SSL over a 3G connection, it is highly recommend that you use SSL. For this reason, SSL is enabled by default.
Tasks
Properties
-
delegate
The object that acts as the delegate for the receiving instance.
property -
reconnectAutomatically
Indicates whether the client should attempt to reconnect automatically when disconnected or if the connection failed.
property -
reconnectDelay
Specifies the delay between reconnection attempts. Defaults to 5 seconds.
property -
connection
The connection object for this client.
property -
authorizationURL
The authorization URL for private subscriptions.
property
Creating new instances
-
+ pusherWithKey:delegate:
Returns a new PTPusher instance with a connection configured with the given key.
-
+ pusherWithKey:delegate:encrypted:
Returns a new PTPusher instance with a connection configured with the given key.
-
+ pusherWithKey:connectAutomatically:
Initialises a new PTPusher instance with a connection configured with the given key.
-
+ pusherWithKey:connectAutomatically:encrypted:
Initialises a new PTPusher instance with a connection configured with the given key.
Managing the connection
-
– connect
Establishes a connection to the Pusher server.
-
– disconnect
Disconnects from the Pusher server.
Subscribing to channels
-
– subscribeToChannelNamed:
Subscribes to the named channel.
-
– subscribeToPrivateChannelNamed:
Subscribes to the named private channel.
-
– subscribeToPresenceChannelNamed:
Subscribes to the named presence channel.
-
– subscribeToPresenceChannelNamed:delegate:
Subscribes to the named presence channel.
-
– unsubscribeFromChannel:
Unsubscribes from the specified channel.
-
– channelNamed:
Returns a previously subscribed channel with the given name.
Publishing events
-
– sendEventNamed:data:channel:
Sends an event directly over the connection’s socket.
Properties
authorizationURL
The authorization URL for private subscriptions.
@property (nonatomic, retain) NSURL *authorizationURL
Discussion
The authorization URL for private subscriptions.
All private channels (including presence channels) require authorization in order to subscribe.
Authorization happens on your own server. When subscribing to a private or presence channel, an authorization POST request will be sent to the URL specified by this property.
Attempting to subscribe to a private or presence channel without setting this property will result in an assertion error.
For more information on channel authorization, see the Pusher documentation website.
Declared In
PTPusher.h
connection
The connection object for this client.
@property (nonatomic, retain, readonly) PTPusherConnection *connection
Discussion
The connection object for this client.
Each instance uses a single connection only. Most clients will likely only ever need a single PTPusher object and therefore a single connection.
The connection is exposed to provide access to it’s socketID and connection state. Clients should not attempt to manage this connection directly.
Declared In
PTPusher.h
delegate
The object that acts as the delegate for the receiving instance.
@property (nonatomic, assign) id<PTPusherDelegate> delegate
Discussion
The object that acts as the delegate for the receiving instance.
The delegate must implement the PTPusherDelegate protocol. The delegate is not retained.
Declared In
PTPusher.h
reconnectAutomatically
Indicates whether the client should attempt to reconnect automatically when disconnected or if the connection failed.
@property (nonatomic, assign, getter=shouldReconnectAutomatically) BOOL reconnectAutomatically
Discussion
Indicates whether the client should attempt to reconnect automatically when disconnected or if the connection failed.
When YES, the client will automatically attempt to re-establish a connection after a set delay.
If the reconnection attempt fails, the client will continue to attempt to reconnect until this property is set to NO. The delegate will be notified of each reconnection attempt; you could use this method to disable reconnection after a number of attempts.
Declared In
PTPusher.h
reconnectDelay
Specifies the delay between reconnection attempts. Defaults to 5 seconds.
@property (nonatomic, assign) NSTimeInterval reconnectDelay
Discussion
Specifies the delay between reconnection attempts. Defaults to 5 seconds.
Declared In
PTPusher.h
Class Methods
pusherWithKey:connectAutomatically:
Initialises a new PTPusher instance with a connection configured with the given key.
+ (id)pusherWithKey:(NSString *)key connectAutomatically:(BOOL)connectAutomatically
Parameters
- key
Your application’s API key. It can be found in the API Access section of your application within the Pusher user dashboard.
- connect
Automatically If YES, the connection will be connected on initialisation.
Discussion
Initialises a new PTPusher instance with a connection configured with the given key.
If you intend to set a delegate for this instance, you are recommended to set connectAutomatically to NO, set the delegate then manually call connect.
@deprecated
Declared In
PTPusher.h
pusherWithKey:connectAutomatically:encrypted:
Initialises a new PTPusher instance with a connection configured with the given key.
+ (id)pusherWithKey:(NSString *)key connectAutomatically:(BOOL)connectAutomatically encrypted:(BOOL)isEncrypted
Parameters
- key
Your application’s API key. It can be found in the API Access section of your application within the Pusher user dashboard.
- connectAutomatically
If YES, the connection will be connected on initialisation.
- isEncrypted
If yes, a secure connection over SSL will be established.
Discussion
Initialises a new PTPusher instance with a connection configured with the given key.
If you intend to set a delegate for this instance, you are recommended to set connectAutomatically to NO, set the delegate then manually call connect.
Declared In
PTPusher.h
pusherWithKey:delegate:
Returns a new PTPusher instance with a connection configured with the given key.
+ (id)pusherWithKey:(NSString *)key delegate:(id<PTPusherDelegate>)delegate
Parameters
- key
Your application’s API key. It can be found in the API Access section of your application within the Pusher user dashboard.
- delegate
The delegate for this instance
Discussion
Returns a new PTPusher instance with a connection configured with the given key.
Instances created using this method will connect automatically. Specify the delegate here to ensure that it is notified about the connection status during connection. If you assign a delegate using the delegate property after this method returns, it may not be notified of connection events.
@deprecated
Declared In
PTPusher.h
pusherWithKey:delegate:encrypted:
Returns a new PTPusher instance with a connection configured with the given key.
+ (id)pusherWithKey:(NSString *)key delegate:(id<PTPusherDelegate>)delegate encrypted:(BOOL)isEncrypted
Parameters
- key
Your application’s API key. It can be found in the API Access section of your application within the Pusher user dashboard.
- delegate
The delegate for this instance
- isEncrypted
If yes, a secure connection over SSL will be established.
Discussion
Returns a new PTPusher instance with a connection configured with the given key.
Instances created using this method will connect automatically. Specify the delegate here to ensure that it is notified about the connection status during connection. If you assign a delegate using the delegate property after this method returns, it may not be notified of connection events.
Declared In
PTPusher.h
Instance Methods
channelNamed:
Returns a previously subscribed channel with the given name.
- (PTPusherChannel *)channelNamed:(NSString *)name
Parameters
- name
The name of the channel required.
Discussion
Returns a previously subscribed channel with the given name.
If the channel specified has not been subscribed to, this method will return nil.
Declared In
PTPusher.h
connect
Establishes a connection to the Pusher server.
- (void)connect
Discussion
Establishes a connection to the Pusher server.
If already connected, this method does nothing.
Declared In
PTPusher.h
disconnect
Disconnects from the Pusher server.
- (void)disconnect
Discussion
Disconnects from the Pusher server.
If already disconnected, this method does nothing.
Declared In
PTPusher.h
sendEventNamed:data:channel:
Sends an event directly over the connection’s socket.
- (void)sendEventNamed:(NSString *)name data:(id)data channel:(NSString *)channelName
Discussion
Sends an event directly over the connection’s socket.
Whilst Pusher provides a REST API for publishing events, it also supports the sending of events directly from clients over the client’s existing connection.
Client events have the following restrictions:
The user must be subscribed to the channel that the event is being triggered on.
Client events can only be triggered on private and presence channels because they require authentication.
Client events must be prefixed by client-. Events with any other prefix will be rejected by the Pusher server, as will events sent to channels to which the client is not subscribed.
This method does nothing to enforce the above restrictions. It is instead recommended that
you use the PTPusherChannel
event triggering API rather than calling this method directly.
Note: This Pusher feature is currently in beta and requires enabling on your account.
Declared In
PTPusher.h
subscribeToChannelNamed:
Subscribes to the named channel.
- (PTPusherChannel *)subscribeToChannelNamed:(NSString *)name
Parameters
- name
The name of the channel to subscribe to.
Discussion
Subscribes to the named channel.
This method can be used to subscribe to any type of channel, including private and presence channels by including the appropriate channel name prefix.
Declared In
PTPusher.h
subscribeToPresenceChannelNamed:
Subscribes to the named presence channel.
- (PTPusherPresenceChannel *)subscribeToPresenceChannelNamed:(NSString *)name
Parameters
- name
The name of the channel (without the presence prefix) to subscribe to.
Discussion
Subscribes to the named presence channel.
The “presence-” prefix should be excluded from the name; it will be added automatically.
Declared In
PTPusher.h
subscribeToPresenceChannelNamed:delegate:
Subscribes to the named presence channel.
- (PTPusherPresenceChannel *)subscribeToPresenceChannelNamed:(NSString *)name delegate:(id<PTPusherPresenceChannelDelegate>)presenceDelegate
Parameters
- name
The name of the channel (without the presence prefix) to subscribe to.
- presenceDelegate
The presence delegate for this channel.
Discussion
Subscribes to the named presence channel.
The “presence-” prefix should be excluded from the name; it will be added automatically.
Whilst the presence delegate can be set on the channel after it is returned, to ensure events are not missed, it is advised that you call this method and specify a delegate. The delegate will be assigned before subscription happens.
Declared In
PTPusher.h
subscribeToPrivateChannelNamed:
Subscribes to the named private channel.
- (PTPusherPrivateChannel *)subscribeToPrivateChannelNamed:(NSString *)name
Parameters
- name
The name of the channel (without the private prefix) to subscribe to.
Discussion
Subscribes to the named private channel.
The “private-” prefix should be excluded from the name; it will be added automatically.
Declared In
PTPusher.h


This project demonstrate a flexible ESBuild/Babel and Webpack based web application architecture. The styling was realized with Tailwindcss.
More about the PoC you can find in this GitHub Repository.