Connected Notes is a tool for non-categorical notes and flashcards. It encourages usage of the Zettelkasten method and spaced repetition, and is open source and free to use.
Connected Notes is in beta, so expect some roughness. Please report any bugs at the project's GitHub page.
Notes are stored in your personal cloud service, meaning they're accessible from anywhere, including mobile. Currently the only backend option is Google Drive, but Connected Notes is designed with interchangeable backends in mind, and the next major feature will be local filesystem support (using File System Access API).
Connected Notes supports the Zettelkasten method. This means first class support for tagging and connecting notes - in fact, Connected Notes doesn't use folders to organize notes, but uses the tags you've added to structure them (see 'getting started' below).
Notes are written using markdown and stored as plain text markdown files. This means your notes aren't locked in to a proprietary format, and since they're stored on your personal cloud you'll always have access to them, even if this site was to shut down one day.
Connected Notes is free and open source. The project is designed to support notes that will live a long time (as any note taking system should), and open sourcing is an essential part of that promise.
Spaced repetition (ie. flashcards) has been shown to give superior results in learning tasks, not only when measuring the ability to recall, but also when making inferences from learned material (source). The current version of Connected Notes has flashcard support built-in. The support is currently quite simple but more features will appear in the future.
Creating a note is as easy as clicking on the 'create note' icon (or pressing ctrl + k) and entering the name of the note. You don't need to choose which folder the note is added to, since folders don't exist - instead, organizing notes is based on tags (see next section). This greatly reduces the friction of creating notes and avoids having to think in strict categories and hierarchies (more).
Using tags is an integral part of Connected Notes. Since tags essentially replace folders, learning to use them is worthwhile. To add a tag, simply add a Twitter style hashtag anywhere to the note, like #this. You will then see the hashtag appear in the left side menu, and if you click on it, you will see all the notes that contain the tag:
If a note doesn't have any hashtags, it appears under the special 'untagged' tag. Similarly, all notes appear under 'all'. Also, since notes can contain multiple tags, they can also appear under multiple tags:
Tags can be nested under each other, creating a 'tag/subtag' structure. This might be sensible if you have a tag which is clearly a part of some other tag. For example, if you have tags #texas-holdem (a popular card game) and #texas-holdem-strategies, you might not want to have #texas-holdem-strategies appear on the top level.
This can be achieved by dragging the child tag over the parent tag:
Finally, tags can appear under multiple tags. Let's say you have tags #car-brands and #electric-cars. In a traditional folder structure you'd have to make a choice where to place #tesla, but in Connected Notes #tesla could appear under both tags. To achieve this, click on the three dots menu next to #tesla and choose the parent tags.
In comparison, traditional folders are essentially equivalent to each note having a single tag and each tag having at most one other tag as their parent.
Notes can be connected by typing two square brackets '[[' and selecting the note you want to reference from the autocompletion list. You can also directly write the name of the note [[like so]] and the note will be linked. You can then use ctrl + click to jump to the note. If the note doesn't exist, a new note will be created when jumping into it.
Create a new flashcard by opening a note and pressing ctrl + j. This will open a dialog where you can edit the front and back of the card before saving it (TODO image).
By default, the flashcard is populated with the sentence your cursor is currently on. If you have selected a piece of text before pressing ctrl + j, that text will be prepopulated instead.
To study your flashcards, click on the 'study' icon in the left menu. By default, you'll be shown all due flashcards you have created.
Currently there's no interoperability with Anki but in the future I'd like to have a more Anki-like flashcard experience and allow exporting/importing.
More details on how to set up your own instance of Connected Notes will be at the GitHub page once the project exits beta.
If you're planning to start your own instance, note that Google Drive files are only accessible from whitelisted domains, so notes created in connectednotes.net won't be accessible from someotherdomain.com. The solution is to copy the files and re-upload them via the new correct domain, or whitelist the domain (although I'd discourage this).
Currently the code base is lacking a lot of tests and has some known issues, but as we finalize the design and structure the number of tests should ramp up and that of issues down.


I am a Porto based Front-End Developer, I love web design and creating webpages that are creative and unique!
I love to travel, learn languages and use the cultures as an inspiration for my designs and creations.
Download ResumeHere you can check out my projects, whether photography work that I've done or complete websites designed and coded from scratch. My projects usually protrait travel, fashion, photography and creative entrepreneurs!
Portuguese: Native
English: Fluent
Spanish: Fluent
Italian: Advanced
Greek: Intermediate
This is the place where you can get to know me on a more personal level as I leave thoughts in the form of brain food hoping it will inspire someone...
Sometimes you have no sense of direction, other times you just know the only way it's straight ahead!
See full postThis is a placeholder for future blog posts. Please come back later and I might have new thoughts for you to munch on!
Last updated X mins ago
This is a placeholder for future blog posts. Please come back later and I might have new thoughts for you to munch on!
Last updated X mins ago
This is a placeholder for future blog posts. Please come back later and I might have new thoughts for you to munch on!
Last updated X mins ago
This is a placeholder for future blog posts. Please come back later and I might have new thoughts for you to munch on!
Last updated X mins ago
This is a placeholder for future blog posts. Please come back later and I might have new thoughts for you to munch on!
Last updated X mins ago
This is a placeholder for future blog posts. Please come back later and I might have new thoughts for you to munch on!
Last updated X mins ago


@* * Copyright 2021 HM Revenue & Customs * * 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. *@ @(gaEventAction: Option[String] = None)(implicit m: Messages) @import uk.gov.hmrc.urls.Link @stagePromptAttributes = @{ gaEventAction match { case Some(actionString) => Some(Map("journey-click" -> s"link - click:${actionString}:${Messages("tai.back-link.upper")}")) case _=> None } }
@Link.toInternalPage( id=Some("backLink"), value=Some(Messages("tai.back-link.upper")), url = "#", cssClasses=Some("link-back js-visible"), dataAttributes = stagePromptAttributes ).toHtml


| Design and Implementation of a validating XML parser in Haskell: Master's thesis; University of Applied Sciences Wedel | ||
|---|---|---|
| Prev | Next |
The validating XML parser of the Haskell XML Toolbox was elaborately tested with the XML Test Suites (XML TS) from the W3C [WWW02].
These XML TS consist of over 2000 test files for the XML 1.0 specification [WWW01] and an associated test report. The test report contains background information on conformance testing for XML as well as test descriptions for each of the test files.
The test suite consists of two basic test types: Binary Tests and Output Tests. Binary conformance tests are documents that should be accepted or rejected by the parser. Output tests are tests for valid documents which are paired with a reference file as the canonical representation [WWW03] of the input file. By comparing the output of the XML parser with the reference file, it can be ensured that the parser provides the correct information.
There exist four different tests cases:
The XML parser is required to accept these documents. For most test cases a reference file exists.
A validating XML parser has to report a violation of some validity constraint. The reported error must meet the test case description.
An XML parser has to report a fatal error. The reported error must meet the test case description.
An XML parser is permitted to ignore these errors, or to report them. If an error is reported, the error message must meet the test case description.
By using these tests, it could be ensured that the validating XML parser of the Haskell XML Toolbox covers most aspects of the XML 1.0 specification [WWW01]. Because the XML TS is not complete, it is not possible to claim conformance with the specification itself, but only with the XML TS. At the moment the parser passes about 95% of these test cases, see Section A.2 for further details.


Introduction
In this lesson we will open a .sav file in Rstudio and manipulate the data.frame. We will select parts of the file and create some simple overviews. First time with R? No problem, see lesson 1
- toc {:toc}
Download a .sav (SPSS) file
I downloaded the following dataset from DUO (Dienst uitvoering onderwijs): [Aantal wo ingeschrevenen (binnen domein ho)][3]. This dataset has a cc0 declaration, which means it is in the public domain and we can do anything we want with this file. More information about the file can be found in the Toelichting.pdf.
UPDATE 2017-08-23: DUO HAS UPDATED THEIR SITE, BREAKING EVERYTHING. THIS IS CURRENLTY THE DOWNLOAD PAGE: https://www.duo.nl/open_onderwijsdata/databestanden/ho/ingeschreven/wo-ingeschr/ingeschrevenen-wo1.jsp
We can already work with this file, because it is in an open format, but for this exercise I will transform it to a .sav file. See the transformation here
Download the .sav file to start. Do remember where you put the file, you will need it later. Or let R download the file, even better for reasons of reproducability. Consider starting a new project for this example.
Opening the file in Rstudio
Fire up your trusty rstudio.
You will need the following packages: haven, dplyr. Click on install:
and fill in the names, or type `install.packages(“haven”, “dplyr”).
Follow the description below or look at the complete script at:github.com/RMHogervorst/cleancodeexamples. The script and this page are more or less the same (spelling might be better here ;p ).
Opening the SPSS file and getting it in R
{% highlight r linenos %}
necessary packages: ####
library(haven) library(dplyr)
location of the datafile online
link <- “https://cdn.rawgit.com/RMHogervorst/cleancode/gh-pages/datasets/duo2016.sav"
UPDATE 2017-08-23 THIS IS A NEW SPSS FILE FROM 2016 DATA.
load the .sav file into R using the link
wo2015 <- read_sav(link) {% endhighlight %}
So we activated the necessary packages, saved a link to the datafile, told the read_sav()
command where to find the file, and finally assigned the output of the command to a name wo2015
.
Exploration of the data frame in base-R
The following commands are very often the first things you will use when you get your hands on a new dataset.
str(wo2015) # str is short for structure
names(wo2015) # what are the columnsnames?
table(wo2015$PROVINCIE) # create a table
sapply(wo2015, class)
head(wo2015) #shows the top part of the data,
# there is also a tail() function you could try.
View(table(wo2015$SOORT.INSTELLING))
The Rstudio interface already gives you all sorts of information. Just click on all the things in the environment window.
the structure command str()
displays in your console, and is identical to what Rstudio tells you if you click the blue button in front of the data.frame.
The table command is very useful, but when there are many values, you can get a cleaner look by View(table())
. The sapply()
command is one you might use a lot in the future, but know now that it repeats a function over the columns of your data.frame and gives you a simple result back.
Most of the columns are of class character, some are numeric, and two are of the class “labelled”.
When we used the command View(table(wo2015$SOORT.INSTELLING))
there were actually three commands in sequence.
- take column SOORT.INSTELLING from dataframe wo2015:
wo2015$SOORT.INSTELLING
- create a table of that:
table()
- put the result into the Viewer:
View()
When looking at the endresult from the last command, you can see the frequencies of the types of SOORT INSTELLING (type of university).
Do the same thing (display a table of frequencies) with INSTELLINGSNAAM.ACTUEEL (name of university)
How many universities are there?
Some Haven and SPSS specific things
As you know SPSS cannot work with factor (nominal) values. You have to tell SPSS that the variable is a nominal variable and you have to create numbered values, with a label assigned to the values (3 = male, 4 = female). When you import a .sav file into R that information can get lost. But on the other hand you might want to use the numbered information. As an compromise the haven package imports the numbers and the labels. So can we find the labels?
class(wo2015$OPLEIDINGSVORM) # no, that just tells us that it's labelled.
attributes(wo2015$OPLEIDINGSVORM) # the command attributes gives you back all the metadata
You can see the labels and numbers. 1 = deeltijd (part time education),
2 = duaal (), 3 is voltijd (full time)
The attributes command works on everything try: attributes(wo2015[1,2])
.
So we can display the labels with number. but we would rather use that information in R. R has no problem with nominal variables. And furthermore you won’t make mistakes about which form of eduction your talking about.
the haven package has a function as_labeled. So let’s make the OPLEIDINGSVORM column a bit more informative:
as_factor(wo2015$OPLEIDINGSVORM)
Now look back at wo2015 Nothing has changed! That’s right, you need to assign the result of the operation back to a column
wo2015$OPLEIDINGSVORM2 <- as_factor(wo2015$OPLEIDINGSVORM)
Do the same thing to OPLEIDINGSFASE.ACTUEEL
data manipulation with dplyr
Data manipulation was sometimes hard with r. However the dplyr package changed everything.
dplyr Functions
There are 7 ‘verbs’ that do all the work.
filter() (and slice())
arrange()
select() (and rename())
distinct()
mutate() (and transmute())
summarise()
sample_n() and sample_frac()
Filter filters rows, select selects columns, distinct is a variant of unique and mutate creates new variables. These verbs are tools, the plyrs of a dataframe. Very generic tools that help you select and filter your data. All the verbs have the same arguments: first argument = dataframe, the next arguments are for the function.
But don’t believe me on my word, let’s get to work.
SELECT
SELECT (dataframe, variablename1, variablename2, etc)
Select is used to select variables (columns) in your data frame.
library(dplyr)
select(wo2015, PROVINCIE, OPLEIDINGSVORM2,j2012.MAN, j2013.MAN )
We have selected 4 variables. as you can see in the output. It also says: Source: local data frame [2,417 x 4] meaning 2417 cases and 4 variables.
FILTER
FILTER (dataframe, ways to filter)
Filter selects cases (rows of the dataframe).
filter(wo2015, PROVINCIE == "Limburg")
The endresult is a data.frame [91 x 24] with all columns but with only the cases in the Limburg province
combining FILTER and SELECT
select(filter(wo2015, PROVINCIE == "Limburg"),PROVINCIE, OPLEIDINGSVORM2,j2012.MAN, j2013.MAN )
I will show you a more readable form later on, but this works. The data frame has the 91 cases from the filter action and the 4 columns from the select action. This even works the other way around:
filter(select(wo2015, PROVINCIE, OPLEIDINGSVORM2,j2012.MAN, j2013.MAN ), PROVINCIE == "Limburg")
But not always:
filter(select(wo2015, OPLEIDINGSVORM2,j2012.MAN, j2013.MAN ), PROVINCIE == "Limburg")
will not work (try it).
Why not? The different functions accept data.frames as input and give a data.frame as output. The data.frame from the select action does not contain the column PROVINCIE. Therefore the filter function can’t select on that variable.
ARRANGE & DISTINCT
The functions arrange()
and distinct()
sort the data and select the unique values from a data frame:
arrange(wo2015, GEMEENTENUMMER) # data frame [2,417 x 24] all cases, all variables.
distinct(wo2015, GEMEENTENAAM) # data frame [16 x 24] (all the variables, only unique gemeentenamen)
MUTATE
MUTATE(dataframe, name_of new variable = action). Mutate creates new variables from other variables.
Let’s find the difference between 2015 and 2014 in males.
mutate(wo2015, from14to15M = j2015.MAN - j2014.MAN)
Ok, but what happened?
We can’t see the new variable from14to15M, it is there because the output says:
Variables not shown: CROHO.ONDERDEEL (chr), [......] from14to15M (dbl)
So let’s see.
test<-mutate(wo2015, from14to15M = j2015.MAN - j2014.MAN)
View(test)
Scroll to the end of the viewer or use test$from14to15M
.
An other way would be to select the variables first.
select(mutate(wo2015, from14to15M = j2015.MAN - j2014.MAN), from14to15M, PROVINCIE)
But these nested commands become complicated very fast. You lose the overview of your actions. But since 2014 we can use a new way to type commands in R.
Piping / chaining and dplyr
With the pipe operator (%>%) you can chain the commands together. The functions work the same but it is much easier to read.
#from:
select(mutate(wo2015, from14to15M = j2015.MAN - j2014.MAN), from14to15M, PROVINCIE)
# to:
wo2015 %>% mutate(from14to15M = j2015.MAN - j2014.MAN) %>% select(from14to15M, PROVINCIE)
# or even better
wo2015 %>%
mutate(from14to15M = j2015.MAN - j2014.MAN) %>%
select(from14to15M, PROVINCIE)
# much easier to read!
The pipe operator puts the data.frame from the left side as first argument in the right side.
Read the pipe operator as THEN:
wo2015 %>%
mutate(from14to15M = j2015.MAN - j2014.MAN) %>%
select(from14to15M, PROVINCIE)
# take the dataframe, THEN mutate THEN select these variables.
Take the data.frame, THEN mutate THEN select these variables. The commands follow in the way that you use them instead of nested in each other.
SUMMARIZE / SUMMARISE (both work)
Use summarize to apply functions over groups of cases. For instance the mean of an entire column.
summarize(wo2015, mean2015_males = mean(j2015.MAN)) # if one value is missing (NA)
# there is no mean value.
summarize(wo2015, mean2015_males = mean(j2015.MAN, na.rm = T)) # this way we remove the missings
But perhaps you would like to know the mean number of students per opleidingsfase?
Summarize works with group_by
, let’s use that pipe operator again:
wo2015 %>% group_by(OPLEIDINGSFASE.ACTUEEL) %>%
summarise(mean2015_males = mean(j2015.MAN, na.rm = T))
Chaining can make things very easy. Let’s take numbers in zuid-holland only
wo2015 %>%
filter(PROVINCIE == "Zuid-Holland") %>% # R will continue on the following line
group_by(OPLEIDINGSFASE.ACTUEEL) %>% # It also helps in readability
summarise(mean2015_males = mean(j2015.MAN, na.rm = T))
Grouping can be done on multiple levels and with multiple arguments:
wo2015 %>% group_by(PROVINCIE, OPLEIDINGSFASE.ACTUEEL) %>%
summarise(mean2015_males = mean(j2015.MAN, na.rm = T))
wo2015 %>% filter(PROVINCIE == "Zuid-Holland" | PROVINCIE == "Limburg") %>% # | means or
group_by(OPLEIDINGSFASE.ACTUEEL) %>%
summarise(mean2015_males = mean(j2015.MAN, na.rm = T))
# That was an OR operator, there is also an AND.
wo2015 %>% filter(PROVINCIE == "Zuid-Holland" & OPLEIDINGSFASE.ACTUEEL == "propedeuse bachelor") %>%
group_by(OPLEIDINGSVORM2) %>%
summarise(mean2015_males = mean(j2015.MAN, na.rm = T), number = n()) # n() gives a count
The summarize
command can make multiple columns (remember that every output is also a dataframe).
Finally a filter action with numbers. Just to show you that that works as well. We start with all the cases, THEN only take the cases (rows) where variable j2011.VROUW has less or equal to 10, THEN take only the propedeuse cases THEN filter the cases with more then 10 cases and THEN group the cases by provincie, and THEN count the number of cases per province.
wo2015 %>% filter(j2011.VROUW <= 10) %>% # so less or equal to 10 women in 2011
filter(OPLEIDINGSFASE.ACTUEEL == "propedeuse bachelor") %>% # multipe filters? no problem.
filter(j2015.VROUW > 10) %>% # more then 10 in 2015.
group_by(PROVINCIE) %>% summarize(number_of_programs = n())
In other words:
In every province, how many programs had less then 10 women in 2011 and more then 10 in 2015?
Review
In this lesson you have learned to open .sav files with haven, how to change labelled values from the Haven package, and worked with most of the dplyr commands.
Next time:
dplyr is also called the grammar of data manipulation. In the next lesson we will take on the grammar of graphics with ggplot2, see you then.
Notes
[3]:
Further Reading
The following introduction is better than I could have made:
and here is some background information
https://cran.rstudio.com/web/packages/dplyr/vignettes/introduction.html


Disaster recovery
Estimated reading time: 15 minutesDisaster recovery procedures should be performed in the following order:
Swarm disaster recovery
Recover from losing the quorum
Swarm is resilient to failures and the swarm can recover from any number of temporary node failures (machine reboots or crash with restart) or other transient errors. However, a swarm cannot automatically recover if it loses a quorum. Tasks on existing worker nodes continue to run, but administrative tasks are not possible, including scaling or updating services and joining or removing nodes from the swarm. The best way to recover is to bring the missing manager nodes back online. If that is not possible, continue reading for some options for recovering your swarm.
In a swarm of N
managers, a quorum (a majority) of manager nodes must always
be available. For example, in a swarm with 5 managers, a minimum of 3 must be
operational and in communication with each other. In other words, the swarm can
tolerate up to (N-1)/2
permanent failures beyond which requests involving
swarm management cannot be processed. These types of failures include data
corruption or hardware failures.
If you lose the quorum of managers, you cannot administer the swarm. If you have lost the quorum and you attempt to perform any management operation on the swarm, an error occurs:
Error response from daemon: rpc error: code = 4 desc = context deadline exceeded
The best way to recover from losing the quorum is to bring the failed nodes back
online. If you can’t do that, the only way to recover from this state is to use
the --force-new-cluster
action from a manager node. This removes all managers
except the manager the command was run from. The quorum is achieved because
there is now only one manager. Promote nodes to be managers until you have the
desired number of managers.
# From the node to recover
$ docker swarm init --force-new-cluster --advertise-addr node01:2377
When you run the docker swarm init
command with the --force-new-cluster
flag, the Docker Engine where you run the command becomes the manager node of a
single-node swarm which is capable of managing and running services. The manager
has all the previous information about services and tasks, worker nodes are
still part of the swarm, and services are still running. You need to add or
re-add manager nodes to achieve your previous task distribution and ensure that
you have enough managers to maintain high availability and prevent losing the
quorum.
Force the swarm to rebalance
Generally, you do not need to force the swarm to rebalance its tasks. When you add a new node to a swarm, or a node reconnects to the swarm after a period of unavailability, the swarm does not automatically give a workload to the idle node. This is a design decision. If the swarm periodically shifted tasks to different nodes for the sake of balance, the clients using those tasks would be disrupted. The goal is to avoid disrupting running services for the sake of balance across the swarm. When new tasks start, or when a node with running tasks becomes unavailable, those tasks are given to less busy nodes. The goal is eventual balance, with minimal disruption to the end user.
In Docker 1.13 and higher, you can use the --force
or -f
flag with the
docker service update
command to force the service to redistribute its tasks
across the available worker nodes. This causes the service tasks to restart.
Client applications may be disrupted. If you have configured it, your service
uses a rolling update.
If you use an earlier version and you want to achieve an even balance of load
across workers and don’t mind disrupting running tasks, you can force your swarm
to re-balance by temporarily scaling the service upward. Use
docker service inspect --pretty <servicename>
to see the configured scale
of a service. When you use docker service scale
, the nodes with the lowest
number of tasks are targeted to receive the new workloads. There may be multiple
under-loaded nodes in your swarm. You may need to scale the service up by modest
increments a few times to achieve the balance you want across all the nodes.
When the load is balanced to your satisfaction, you can scale the service back
down to the original scale. You can use docker service ps
to assess the current
balance of your service across nodes.
See also
docker service scale
and
docker service ps
.
UCP disaster recovery
In the event half or more manager nodes are lost and cannot be recovered to a healthy state, the system is considered to have lost quorum and can only be restored through the following disaster recovery procedure.
Recover a UCP cluster from an existing backup
- If UCP is still installed on the swarm, uninstall UCP using the
uninstall-ucp
command.Note: If the restore is happening on new machines, skip this step.
- Perform a restore from an existing backup on any node. If there is an existing swarm, the restore operation must be performed on a manager node. If no swarm exists, the restore operation will create one.
Recover a UCP cluster without an existing backup (not recommended)
If your cluster has lost quorum, you can still perform a backup of one of the remaining nodes.
Important: Performing a backup after losing quorum is not guaranteed to succeed with no loss of running services or configuration data. To properly protect against manager failures, the system should be configured for high availability, and backups should be performed regularly in order to have complete backup data.
- On one of the remaining manager nodes, perform
docker swarm init --force-new-cluster
. You might also need to specify an--advertise-addr
parameter, which is equivalent to the--host-address
parameter of thedocker/ucp install
operation. This instantiates a new single-manager swarm by recovering as much state as possible from the existing manager. This is a disruptive operation and existing tasks might be either terminated or suspended. - Create a backup of the remaining manager node.
- If UCP is still installed on the swarm, uninstall UCP using the
uninstall-ucp
command. - Perform a restore on the recovered swarm manager node.
- Log in to UCP and browse to the nodes page, or use the CLI
docker node ls
command. - If any nodes are listed as
down
, you’ll have to manually remove these nodes from the swarm and then re-join them using adocker swarm join
operation with the swarm’s new join-token. - Create a backup of the restored cluster.
Recreate objects within Orchestrators that Docker Enterprise supports
Kubernetes currently backs up the declarative state of Kube objects in etcd. However, for Swarm, there is no way to take the state and export it to a declarative format, since the objects that are embedded within the Swarm raft logs are not easily transferable to other nodes or clusters.
For disaster recovery, to recreate swarm related workloads requires having the original scripts used for deployment. Alternatively, you can recreate workloads by manually recreating output from docker inspect
commands.
DTR disaster recovery
Docker Trusted Registry is a clustered application. You can join multiple replicas for high availability. For a DTR cluster to be healthy, a majority of its replicas (n/2 + 1) need to be healthy and be able to communicate with the other replicas. This is also known as maintaining quorum.
This means that there are three failure scenarios possible.
Replica is unhealthy but cluster maintains quorum
One or more replicas are unhealthy, but the overall majority (n/2 + 1) is still healthy and able to communicate with one another.
In this example the DTR cluster has five replicas but one of the nodes stopped working, and the other has problems with the DTR overlay network.
Even though these two replicas are unhealthy the DTR cluster has a majority of replicas still working, which means that the cluster is healthy.
In this case you should repair the unhealthy replicas, or remove them from the cluster and join new ones.
Repair a single replica
When one or more DTR replicas are unhealthy but the overall majority (n/2 + 1) is healthy and able to communicate with one another, your DTR cluster is still functional and healthy.
Given that the DTR cluster is healthy, there’s no need to execute any disaster recovery procedures like restoring from a backup.
Instead, you should:
- Remove the unhealthy replicas from the DTR cluster.
- Join new replicas to make DTR highly available.
Since a DTR cluster requires a majority of replicas to be healthy at all times, the order of these operations is important. If you join more replicas before removing the ones that are unhealthy, your DTR cluster might become unhealthy.
Split-brain scenario
To understand why you should remove unhealthy replicas before joining new ones, imagine you have a five-replica DTR deployment, and something goes wrong with the overlay network connection the replicas, causing them to be separated in two groups.
Because the cluster originally had five replicas, it can work as long as three replicas are still healthy and able to communicate (5 / 2 + 1 = 3). Even though the network separated the replicas in two groups, DTR is still healthy.
If at this point you join a new replica instead of fixing the network problem or removing the two replicas that got isolated from the rest, it’s possible that the new replica ends up in the side of the network partition that has less replicas.
When this happens, both groups now have the minimum amount of replicas needed to establish a cluster. This is also known as a split-brain scenario, because both groups can now accept writes and their histories start diverging, making the two groups effectively two different clusters.
Remove replicas
To remove unhealthy replicas, you’ll first have to find the replica ID of one of the replicas you want to keep, and the replica IDs of the unhealthy replicas you want to remove.
You can find the list of replicas by navigating to Shared Resources > Stacks or Swarm > Volumes (when using swarm mode) on the UCP web interface, or by using the UCP client bundle to run:
$ docker ps --format "{{.Names}}" | grep dtr
# The list of DTR containers with <node>/<component>-<replicaID>, e.g.
# node-1/dtr-api-a1640e1c15b6
Another way to determine the replica ID is to SSH into a DTR node and run the following:
$ REPLICA_ID=$(docker inspect -f '{{.Name}}' $(docker ps -q -f name=dtr-rethink) | cut -f 3 -d '-')
&& echo $REPLICA_ID
Then use the UCP client bundle to remove the unhealthy replicas:
$ docker container run \
--rm \
--interactive \
docker/dtr:2.7.4 remove \
--existing-replica-id <healthy-replica-id> \
--replica-ids <unhealthy-replica-id> \
--ucp-insecure-tls \
--ucp-url <ucp-url> \
--ucp-username <user> \
--ucp-password <password>
You can remove more than one replica at the same time, by specifying multiple IDs with a comma.
Join replicas
Once you’ve removed the unhealthy nodes from the cluster, you should join new ones to make sure your cluster is highly available.
Use your UCP client bundle to run the following command which prompts you for the necessary parameters:
$ docker container run \
--rm \
--interactive \
docker/dtr:2.7.4 join \
--ucp-node <ucp-node-name> \
--ucp-insecure-tls
Learn more about high availability.
The majority of replicas are unhealthy
If a majority of replicas are unhealthy, making the cluster lose quorum, but at least one replica is still healthy, or at least the data volumes for DTR are accessible from that replica, you can repair the cluster without having to restore from a backup. This minimizes the amount of data loss. The following image provides an example of this scenario.
Repair a cluster
For a DTR cluster to be healthy, a majority of its replicas (n/2 + 1) need to be healthy and be able to communicate with the other replicas. This is known as maintaining quorum.
In a scenario where quorum is lost, but at least one replica is still accessible, you can use that replica to repair the cluster. That replica doesn’t need to be completely healthy. The cluster can still be repaired as the DTR data volumes are persisted and accessible.
Repairing the cluster from an existing replica minimizes the amount of data lost. If this procedure doesn’t work, you’ll have to restore from an existing backup.
Diagnose an unhealthy cluster
When a majority of replicas are unhealthy, causing the overall DTR cluster to
become unhealthy, operations like docker login
, docker pull
, and docker push
present internal server error
.
Accessing the /_ping
endpoint of any replica also returns the same error.
It’s also possible that the DTR web UI is partially or fully unresponsive.
Perform an emergency repair
Use the docker/dtr emergency-repair
command to try to repair an unhealthy
DTR cluster, from an existing replica.
This command checks the data volumes for the DTR
This command checks the data volumes for the DTR replica are uncorrupted, redeploys all internal DTR components and reconfigured them to use the existing volumes.
It also reconfigures DTR removing all other nodes from the cluster, leaving DTR as a single-replica cluster with the replica you chose.
Start by finding the ID of the DTR replica that you want to repair from. You can find the list of replicas by navigating to Shared Resources > Stacks or Swarm > Volumes (when using swarm mode) on the UCP web interface, or by using a UCP client bundle to run:
$ docker ps --format "{{.Names}}" | grep dtr
# The list of DTR containers with <node>/<component>-<replicaID>, e.g.
# node-1/dtr-api-a1640e1c15b6
Another way to determine the replica ID is to SSH into a DTR node and run the following:
$ REPLICA_ID=$(docker inspect -f '{{.Name}}' $(docker ps -q -f name=dtr-rethink) | cut -f 3 -d '-')
&& echo $REPLICA_ID
Then, use your UCP client bundle to run the emergency repair command:
$ docker container run \
--rm \
--interactive \
docker/dtr:2.7.4 emergency-repair \
--ucp-insecure-tls \
--existing-replica-id <replica-id>
If the emergency repair procedure is successful, your DTR cluster now has a single replica. You should now join more replicas for high availability.
If the emergency repair command fails, try running it again using a different replica ID. As a last resort, you can restore your cluster from an existing backup.
All replicas are unhealthy
This is a total disaster scenario where all DTR replicas are lost, causing the data volumes for all DTR replicas to get corrupted or be lost.
In a disaster scenario like this, you’ll have to restore DTR from an existing backup. Restoring from a backup should be only used as a last resort, since doing an emergency repair might prevent some data loss.


Explore Steem Content
Wikipedia for Steem
Explore Steem apps
Reward open source
Mobile app for Steem
Video on Steem!
#1 Steem search engine
Steem as DB service
Advanced Steem explorer
on Steem.Online
Get your quality content before our highly targeted and quality traffic.
Publish your press release and announcements on Steem.Online for free.
on Facebook
Join our community to enjoy the best of Steem.Online with friends.


Your browser is outdated. Upgrade to a modern browser, please, and visit this web site again.
This web page requires a web browser that supports the HTML standard. Usual picks:


| Top |
| SoupURI * | first-party | Read / Write |
| SoupMessageFlags | flags | Read / Write |
| SoupHTTPVersion | http-version | Read / Write |
| gchar * | method | Read / Write |
| SoupMessagePriority | priority | Read / Write |
| gchar * | reason-phrase | Read / Write |
| SoupMessageBody * | request-body | Read |
| GBytes * | request-body-data | Read |
| SoupMessageHeaders * | request-headers | Read |
| SoupMessageBody * | response-body | Read |
| GBytes * | response-body-data | Read |
| SoupMessageHeaders * | response-headers | Read |
| gboolean | server-side | Read / Write / Construct Only |
| guint | status-code | Read / Write |
| GTlsCertificate * | tls-certificate | Read / Write |
| GTlsCertificateFlags | tls-errors | Read / Write |
| SoupURI * | uri | Read / Write |
| void | content-sniffed | Run First |
| void | finished | Run First |
| void | got-body | Run First |
| void | got-chunk | Run First |
| void | got-headers | Run First |
| void | got-informational | Run First |
| void | network-event | Run First |
| void | restarted | Run First |
| void | wrote-body | Run First |
| void | wrote-body-data | Run First |
| void | wrote-chunk | Run First |
| void | wrote-headers | Run First |
| void | wrote-informational | Run First |
| SoupMessage | |
| enum | SoupHTTPVersion |
| enum | SoupMessageFlags |
| enum | SoupMessagePriority |
| #define | SOUP_MESSAGE_METHOD |
| #define | SOUP_MESSAGE_URI |
| #define | SOUP_MESSAGE_HTTP_VERSION |
| #define | SOUP_MESSAGE_FLAGS |
| #define | SOUP_MESSAGE_STATUS_CODE |
| #define | SOUP_MESSAGE_REASON_PHRASE |
| #define | SOUP_MESSAGE_SERVER_SIDE |
| #define | SOUP_MESSAGE_FIRST_PARTY |
| #define | SOUP_MESSAGE_PRIORITY |
| #define | SOUP_MESSAGE_REQUEST_BODY |
| #define | SOUP_MESSAGE_REQUEST_BODY_DATA |
| #define | SOUP_MESSAGE_REQUEST_HEADERS |
| #define | SOUP_MESSAGE_RESPONSE_BODY |
| #define | SOUP_MESSAGE_RESPONSE_BODY_DATA |
| #define | SOUP_MESSAGE_RESPONSE_HEADERS |
| #define | SOUP_MESSAGE_TLS_CERTIFICATE |
| #define | SOUP_MESSAGE_TLS_ERRORS |
A SoupMessage represents an HTTP message that is being sent or received.
For client-side usage, if you are using the traditional
SoupSession APIs (soup_session_queue_message()
and
soup_session_send_message()
), you would create a SoupMessage with
soup_message_new()
or soup_message_new_from_uri()
, set up its
fields appropriately, and send it. If you are using the newer
SoupRequest API, you would create a request with
soup_session_request_http()
or soup_session_request_http_uri()
, and
the returned SoupRequestHTTP will already have an associated
SoupMessage that you can retrieve via
soup_request_http_get_message()
.
For server-side usage, SoupServer will create SoupMessages automatically for incoming requests, which your application will receive via handlers.
Note that libsoup's terminology here does not quite match the HTTP specification: in RFC 2616, an "HTTP-message" is either a Request, or a Response. In libsoup, a SoupMessage combines both the request and the response.
SoupMessage * soup_message_new (const char *method
,const char *uri_string
);
Creates a new empty SoupMessage, which will connect to uri
SoupMessage * soup_message_new_from_uri (const char *method
,SoupURI *uri
);
Creates a new empty SoupMessage, which will connect to uri
method |
the HTTP method for the created request |
|
uri |
the destination endpoint (as a SoupURI) |
void soup_message_set_request (SoupMessage *msg
,const char *content_type
,SoupMemoryUse req_use
,const char *req_body
,gsize req_length
);
Convenience function to set the request body of a SoupMessage. If
content_type
is NULL
, the request body must be empty as well.
msg |
the message |
|
content_type |
MIME Content-Type of the body. |
[allow-none] |
req_use |
a SoupMemoryUse describing how to handle |
|
req_body |
a data buffer containing the body of the message request. |
[allow-none][array length=req_length][element-type guint8] |
req_length |
the byte length of |
void soup_message_set_response (SoupMessage *msg
,const char *content_type
,SoupMemoryUse resp_use
,const char *resp_body
,gsize resp_length
);
Convenience function to set the response body of a SoupMessage. If
content_type
is NULL
, the response body must be empty as well.
msg |
the message |
|
content_type |
MIME Content-Type of the body. |
[allow-none] |
resp_use |
a SoupMemoryUse describing how to handle |
|
resp_body |
a data buffer containing the body of the message response. |
[allow-none][array length=resp_length][element-type guint8] |
resp_length |
the byte length of |
void soup_message_set_http_version (SoupMessage *msg
,SoupHTTPVersion version
);
Sets the HTTP version on msg
. The default version is
SOUP_HTTP_1_1
. Setting it to SOUP_HTTP_1_0
will prevent certain
functionality from being used.
SoupHTTPVersion
soup_message_get_http_version (SoupMessage *msg
);
Gets the HTTP version of msg
. This is the minimum of the
version from the request and the version from the response.
void soup_message_set_uri (SoupMessage *msg
,SoupURI *uri
);
Sets msg
's URI to uri
. If msg
has already been sent and you want
to re-send it with the new URI, you need to call
soup_session_requeue_message()
.
SoupAddress *
soup_message_get_address (SoupMessage *msg
);
Gets the address msg
's URI points to. After first setting the
URI on a message, this will be unresolved, although the message's
session will resolve it before sending the message.
Since 2.26
void soup_message_set_status (SoupMessage *msg
,guint status_code
);
Sets msg
's status code to status_code
. If status_code
is a
known value, it will also set msg
's reason_phrase.
void soup_message_set_status_full (SoupMessage *msg
,guint status_code
,const char *reason_phrase
);
Sets msg
's status code and reason phrase.
void soup_message_set_redirect (SoupMessage *msg
,guint status_code
,const char *redirect_uri
);
Sets msg
's status_code to status_code
and adds a Location header
pointing to redirect_uri
. Use this from a SoupServer when you
want to redirect the client to another URI.
redirect_uri
can be a relative URI, in which case it is
interpreted relative to msg
's current URI. In particular, if
redirect_uri
is just a path, it will replace the path
and query of msg
's URI.
Since 2.38
gboolean
soup_message_is_keepalive (SoupMessage *msg
);
Determines whether or not msg
's connection can be kept alive for
further requests after processing msg
, based on the HTTP version,
Connection header, etc.
gboolean soup_message_get_https_status (SoupMessage *msg
,GTlsCertificate **certificate
,GTlsCertificateFlags *errors
);
If msg
is using https (or attempted to use https but got
SOUP_STATUS_SSL_FAILED
), this retrieves the GTlsCertificate
associated with its connection, and the GTlsCertificateFlags
showing what problems, if any, have been found with that
certificate.
msg |
||
certificate |
|
[out][transfer none] |
errors |
the verification status of |
[out] |
Since 2.34
void soup_message_set_first_party (SoupMessage *msg
,SoupURI *first_party
);
Sets first_party
as the main document SoupURI for msg
. For
details of when and how this is used refer to the documentation for
SoupCookieJarAcceptPolicy.
Since 2.30
SoupURI *
soup_message_get_first_party (SoupMessage *msg
);
Gets msg
's first-party SoupURI
Since 2.30
guint soup_message_add_header_handler (SoupMessage *msg
,const char *signal
,const char *header
,GCallback callback
,gpointer user_data
);
Adds a signal handler to msg
for signal
, as with
g_signal_connect()
, but the callback
will only be run if msg
's
incoming messages headers (that is, the
request_headers
for a client SoupMessage, or
the response_headers
for a server SoupMessage)
contain a header named header
.
guint soup_message_add_status_code_handler (SoupMessage *msg
,const char *signal
,guint status_code
,GCallback callback
,gpointer user_data
);
Adds a signal handler to msg
for signal
, as with
g_signal_connect()
, but the callback
will only be run if msg
has
the status status_code
.
signal
must be a signal that will be emitted after msg
's status
is set. For a client SoupMessage, this means it can't be a "wrote"
signal. For a server SoupMessage, this means it can't be a "got"
signal.
void soup_message_set_flags (SoupMessage *msg
,SoupMessageFlags flags
);
Sets the specified flags on msg
.
SoupMessageFlags
soup_message_get_flags (SoupMessage *msg
);
Gets the flags on msg
SoupBuffer * (*SoupChunkAllocator) (SoupMessage *msg
,gsize max_len
,gpointer user_data
);
SoupChunkAllocator
is deprecated and should not be used in newly-written code.
Use SoupRequest if you want to read into your own buffers.
The prototype for a chunk allocation callback. This should allocate a new SoupBuffer and return it for the I/O layer to read message body data off the network into.
If max_len
is non-0, it indicates the maximum number of bytes that
could be read, based on what is known about the message size. Note
that this might be a very large number, and you should not simply
try to allocate that many bytes blindly. If max_len
is 0, that
means that libsoup does not know how many bytes remain to be read,
and the allocator should return a buffer of a size that it finds
convenient.
If the allocator returns NULL
, the message will be paused. It is
up to the application to make sure that it gets unpaused when it
becomes possible to allocate a new buffer.
msg |
the SoupMessage the chunk is being allocated for |
|
max_len |
the maximum length that will be read, or 0. |
|
user_data |
the data passed to |
void soup_message_set_chunk_allocator (SoupMessage *msg
,SoupChunkAllocator allocator
,gpointer user_data
,GDestroyNotify destroy_notify
);
soup_message_set_chunk_allocator
is deprecated and should not be used in newly-written code.
SoupRequest provides a much simpler API that lets you read the response directly into your own buffers without needing to mess with callbacks, pausing/unpausing, etc.
Sets an alternate chunk-allocation function to use when reading
msg
's body when using the traditional (ie,
non-SoupRequest-based) API. Every time data is available
to read, libsoup will call allocator
, which should return a
SoupBuffer. (See SoupChunkAllocator for additional details.)
Libsoup will then read data from the network into that buffer, and
update the buffer's length
to indicate how much
data it read.
Generally, a custom chunk allocator would be used in conjunction
with soup_message_body_set_accumulate()
FALSE
and
“got_chunk”, as part of a strategy to avoid unnecessary
copying of data. However, you cannot assume that every call to the
allocator will be followed by a call to your
“got_chunk” handler; if an I/O error occurs, then the
buffer will be unreffed without ever having been used. If your
buffer-allocation strategy requires special cleanup, use
soup_buffer_new_with_owner()
rather than doing the cleanup from the
“got_chunk” handler.
The other thing to remember when using non-accumulating message
bodies is that the buffer passed to the “got_chunk”
handler will be unreffed after the handler returns, just as it
would be in the non-custom-allocated case. If you want to hand the
chunk data off to some other part of your program to use later,
you'll need to ref the SoupBuffer (or its owner, in the
soup_buffer_new_with_owner()
case) to ensure that the data remains
valid.
void soup_message_disable_feature (SoupMessage *msg
,GType feature_type
);
This disables the actions of SoupSessionFeatures with the
given feature_type
(or a subclass of that type) on msg
, so that
msg
is processed as though the feature(s) hadn't been added to the
session. Eg, passing SOUP_TYPE_CONTENT_SNIFFER for feature_type
will disable Content-Type sniffing on the message.
You must call this before queueing msg
on a session; calling it on
a message that has already been queued is undefined. In particular,
you cannot call this on a message that is being requeued after a
redirect or authentication.
Since 2.28
SoupRequest *
soup_message_get_soup_request (SoupMessage *msg
);
If msg
is associated with a SoupRequest, this returns that
request. Otherwise it returns NULL
.
Since 2.42
SoupMessagePriority
soup_message_get_priority (SoupMessage *msg
);
Retrieves the SoupMessagePriority. If not set this value defaults to SOUP_MESSAGE_PRIORITY_NORMAL.
Since 2.44
void soup_message_set_priority (SoupMessage *msg
,SoupMessagePriority priority
);
Sets the priority of a message. Note that this won't have any effect unless used before the message is added to the session's message processing queue.
The message will be placed just before any other previously added message with lower priority (messages with the same priority are processed on a FIFO basis).
Setting priorities does not currently work with SoupSessionSync (or with synchronous messages on a plain SoupSession) because in the synchronous/blocking case, priority ends up being determined semi-randomly by thread scheduling.
Since 2.44
typedef struct { const char *method; guint status_code; char *reason_phrase; SoupMessageBody *request_body; SoupMessageHeaders *request_headers; SoupMessageBody *response_body; SoupMessageHeaders *response_headers; } SoupMessage;
Represents an HTTP message being sent or received.
status_code
will normally be a SoupStatus value, eg,
SOUP_STATUS_OK
, though of course it might actually be an unknown
status code. reason_phrase
is the actual text returned from the
server, which may or may not correspond to the "standard"
description of status_code
. At any rate, it is almost certainly
not localized, and not very descriptive even if it is in the user's
language; you should not use reason_phrase
in user-visible
messages. Rather, you should look at status_code
, and determine an
end-user-appropriate message based on that and on what you were
trying to do.
As described in the SoupMessageBody documentation, the
request_body
and response_body
data
fields
will not necessarily be filled in at all times. When the body
fields are filled in, they will be terminated with a '\0' byte
(which is not included in the length
), so you
can use them as ordinary C strings (assuming that you know that the
body doesn't have any other '\0' bytes).
For a client-side SoupMessage, request_body
's
data
is usually filled in right before libsoup
writes the request to the network, but you should not count on
this; use soup_message_body_flatten()
if you want to ensure that
data
is filled in. If you are not using
SoupRequest to read the response, then response_body
's
data
will be filled in before
“finished” is emitted. (If you are using SoupRequest,
then the message body is not accumulated by default, so
response_body
's data
will always be NULL
.)
For a server-side SoupMessage, request_body
's data
will be
filled in before “got_body” is emitted.
To prevent the data
field from being filled in at all (eg, if you
are handling the data from a “got_chunk”, and so don't
need to see it all at the end), call
soup_message_body_set_accumulate()
on response_body
or
request_body
as appropriate, passing FALSE
.
the HTTP method |
||
the HTTP status code |
||
the status phrase associated with |
||
SoupMessageBody * |
the request body |
|
SoupMessageHeaders * |
the request headers |
|
SoupMessageBody * |
the response body |
|
SoupMessageHeaders * |
the response headers |
Various flags that can be set on a SoupMessage to alter its behavior.
|
The session should not follow redirect (3xx) responses received by this message. |
||
|
The caller will rebuild the request
body if the message is restarted; see
|
||
|
Deprecated: equivalent to calling
|
||
|
Set by SoupContentDecoder to indicate that it has removed the Content-Encoding on a message (and so headers such as Content-Length may no longer accurately describe the body). |
||
|
if set after an https response has been received, indicates that the server's SSL certificate is trusted according to the session's CA. |
||
|
Requests that the message should be sent on a newly-created connection, not reusing an existing persistent connection. Note that messages with non-idempotent “method”s behave this way by default, unless SOUP_MESSAGE_IDEMPOTENT is set. |
||
|
The message is considered idempotent, regardless its “method”, and allows reuse of existing idle connections, instead of always requiring a new one, unless SOUP_MESSAGE_NEW_CONNECTION is set. |
Priorities that can be set on a SoupMessage to instruct the message queue to process it before any other message with lower priority.
|
The lowest priority, the messages with this priority will be the last ones to be attended. |
||
|
Use this for low priority messages, a SoupMessage with the default priority will be processed first. |
||
|
The default priotity, this is the priority assigned to the SoupMessage by default. |
||
|
High priority, a SoupMessage with this priority will be processed before the ones with the default priority. |
||
|
The highest priority, use this for very urgent SoupMessage as they will be the first ones to be attended. |
#define SOUP_MESSAGE_METHOD "method"
Alias for the “method” property. (The message's HTTP method.)
#define SOUP_MESSAGE_HTTP_VERSION "http-version"
Alias for the “http-version” property. (The message's SoupHTTPVersion.)
#define SOUP_MESSAGE_FLAGS "flags"
Alias for the “flags” property. (The message's SoupMessageFlags.)
#define SOUP_MESSAGE_STATUS_CODE "status-code"
Alias for the “status-code” property. (The message's HTTP response status code.)
#define SOUP_MESSAGE_REASON_PHRASE "reason-phrase"
Alias for the “reason-phrase” property. (The message's HTTP response reason phrase.)
#define SOUP_MESSAGE_SERVER_SIDE "server-side"
Alias for the “server-side” property. (TRUE
if
the message was created by SoupServer.)
#define SOUP_MESSAGE_FIRST_PARTY "first-party"
Alias for the “first-party” property. (The SoupURI loaded in the application when the message was queued.)
Since 2.30
#define SOUP_MESSAGE_PRIORITY "priority"
Sets the priority of the SoupMessage. See
soup_message_set_priority()
for further details.
Since 2.44
#define SOUP_MESSAGE_REQUEST_BODY "request-body"
Alias for the “request-body” property. (The message's HTTP request body.)
#define SOUP_MESSAGE_REQUEST_BODY_DATA "request-body-data"
Alias for the “request-body-data” property. (The message's HTTP request body, as a GBytes.)
Since 2.46
#define SOUP_MESSAGE_REQUEST_HEADERS "request-headers"
Alias for the “request-headers” property. (The message's HTTP request headers.)
#define SOUP_MESSAGE_RESPONSE_BODY "response-body"
Alias for the “response-body” property. (The message's HTTP response body.)
#define SOUP_MESSAGE_RESPONSE_BODY_DATA "response-body-data"
Alias for the “response-body-data” property. (The message's HTTP response body, as a GBytes.)
Since 2.46
#define SOUP_MESSAGE_RESPONSE_HEADERS "response-headers"
Alias for the “response-headers” property. (The message's HTTP response headers.)
#define SOUP_MESSAGE_TLS_CERTIFICATE "tls-certificate"
Alias for the “tls-certificate” property. (The TLS certificate associated with the message, if any.)
Since 2.34
#define SOUP_MESSAGE_TLS_ERRORS "tls-errors"
Alias for the “tls-errors” property. (The verification errors on “tls-certificate”.)
Since 2.34
“first-party”
property“first-party” SoupURI *
The SoupURI loaded in the application when the message was queued.
Flags: Read / Write
Since 2.30
“http-version”
property“http-version” SoupHTTPVersion
The HTTP protocol version to use.
Flags: Read / Write
Default value: SOUP_HTTP_1_1
“method”
property “method” gchar *
The message's HTTP method.
Flags: Read / Write
Default value: "GET"
“priority”
property“priority” SoupMessagePriority
The priority of the message.
Flags: Read / Write
Default value: SOUP_MESSAGE_PRIORITY_NORMAL
“reason-phrase”
property “reason-phrase” gchar *
The HTTP response reason phrase.
Flags: Read / Write
Default value: NULL
“request-body-data”
property “request-body-data” GBytes *
The message's HTTP request body, as a GBytes.
Flags: Read
Since 2.46
“request-headers”
property“request-headers” SoupMessageHeaders *
The HTTP request headers.
Flags: Read
“response-body”
property“response-body” SoupMessageBody *
The HTTP response content.
Flags: Read
“response-body-data”
property “response-body-data” GBytes *
The message's HTTP response body, as a GBytes.
Flags: Read
Since 2.46
“response-headers”
property“response-headers” SoupMessageHeaders *
The HTTP response headers.
Flags: Read
“server-side”
property “server-side” gboolean
Whether or not the message is server-side rather than client-side.
Flags: Read / Write / Construct Only
Default value: FALSE
“status-code”
property “status-code” guint
The HTTP response status code.
Flags: Read / Write
Allowed values: <= 599
Default value: 0
“tls-certificate”
property“tls-certificate” GTlsCertificate *
The GTlsCertificate associated with the message
Flags: Read / Write
Since 2.34
“tls-errors”
property“tls-errors” GTlsCertificateFlags
The verification errors on “tls-certificate”
Flags: Read / Write
Since 2.34
“content-sniffed”
signalvoid user_function (SoupMessage *msg, gchar *type, GHashTable *params, gpointer user_data)
This signal is emitted after “got-headers”, and
before the first “got-chunk”. If content
sniffing is disabled, or no content sniffing will be
performed, due to the sniffer deciding to trust the
Content-Type sent by the server, this signal is emitted
immediately after “got-headers”, and type
is
NULL
.
If the SoupContentSniffer feature is enabled, and the sniffer decided to perform sniffing, the first “got-chunk” emission may be delayed, so that the sniffer has enough data to correctly sniff the content. It notified the library user that the content has been sniffed, and allows it to change the header contents in the message, if desired.
After this signal is emitted, the data that was spooled so that sniffing could be done is delivered on the first emission of “got-chunk”.
msg |
the message |
|
type |
the content type that we got from sniffing |
|
params |
a GHashTable with the parameters. |
[element-type utf8 utf8] |
user_data |
user data set when the signal handler was connected. |
Flags: Run First
Since 2.28
“finished”
signalvoid user_function (SoupMessage *msg, gpointer user_data)
Emitted when all HTTP processing is finished for a message. (After “got_body” for client-side messages, or after “wrote_body” for server-side messages.)
Flags: Run First
“got-body”
signalvoid user_function (SoupMessage *msg, gpointer user_data)
Emitted after receiving the complete message body. (For a server-side message, this means it has received the request body. For a client-side message, this means it has received the response body and is nearly done with the message.)
See also soup_message_add_header_handler()
and
soup_message_add_status_code_handler()
, which can be used
to connect to a subset of emissions of this signal.
Flags: Run First
“got-chunk”
signalvoid user_function (SoupMessage *msg, SoupBuffer *chunk, gpointer user_data)
Emitted after receiving a chunk of a message body. Note that "chunk" in this context means any subpiece of the body, not necessarily the specific HTTP 1.1 chunks sent by the other side.
If you cancel or requeue msg
while processing this signal,
then the current HTTP I/O will be stopped after this signal
emission finished, and msg
's connection will be closed.
msg |
the message |
|
chunk |
the just-read chunk |
|
user_data |
user data set when the signal handler was connected. |
Flags: Run First
“got-headers”
signalvoid user_function (SoupMessage *msg, gpointer user_data)
Emitted after receiving all message headers for a message. (For a client-side message, this is after receiving the Status-Line and response headers; for a server-side message, it is after receiving the Request-Line and request headers.)
See also soup_message_add_header_handler()
and
soup_message_add_status_code_handler()
, which can be used
to connect to a subset of emissions of this signal.
If you cancel or requeue msg
while processing this signal,
then the current HTTP I/O will be stopped after this signal
emission finished, and msg
's connection will be closed.
(If you need to requeue a message--eg, after handling
authentication or redirection--it is usually better to
requeue it from a “got_body” handler rather
than a “got_headers” handler, so that the
existing HTTP connection can be reused.)
Flags: Run First
“got-informational”
signalvoid user_function (SoupMessage *msg, gpointer user_data)
Emitted after receiving a 1xx (Informational) response for a (client-side) message. The response_headers will be filled in with the headers associated with the informational response; however, those header values will be erased after this signal is done.
If you cancel or requeue msg
while processing this signal,
then the current HTTP I/O will be stopped after this signal
emission finished, and msg
's connection will be closed.
Flags: Run First
“network-event”
signalvoid user_function (SoupMessage *msg, GSocketClientEvent event, GIOStream *connection, gpointer user_data)
Emitted to indicate that some network-related event
related to msg
has occurred. This essentially proxies the
“event” signal, but only for events that
occur while msg
"owns" the connection; if msg
is sent on
an existing persistent connection, then this signal will
not be emitted. (If you want to force the message to be
sent on a new connection, set the
SOUP_MESSAGE_NEW_CONNECTION
flag on it.)
See “event” for more information on what
the different values of event
correspond to, and what
connection
will be in each case.
msg |
the message |
|
event |
the network event |
|
connection |
the current state of the network connection |
|
user_data |
user data set when the signal handler was connected. |
Flags: Run First
Since 2.38
“restarted”
signalvoid user_function (SoupMessage *msg, gpointer user_data)
Emitted when a request that was already sent once is now being sent again (eg, because the first attempt received a redirection response, or because we needed to use authentication).
Flags: Run First
“wrote-body”
signalvoid user_function (SoupMessage *msg, gpointer user_data)
Emitted immediately after writing the complete body for a message. (For a client-side message, this means that libsoup is done writing and is now waiting for the response from the server. For a server-side message, this means that libsoup has finished writing the response and is nearly done with the message.)
Flags: Run First
“wrote-body-data”
signalvoid user_function (SoupMessage *msg, SoupBuffer *chunk, gpointer user_data)
Emitted immediately after writing a portion of the message body to the network.
Unlike “wrote_chunk”, this is emitted after
every successful write()
call, not only after finishing a
complete "chunk".
msg |
the message |
|
chunk |
the data written |
|
user_data |
user data set when the signal handler was connected. |
Flags: Run First
Since 2.24
“wrote-chunk”
signalvoid user_function (SoupMessage *msg, gpointer user_data)
Emitted immediately after writing a body chunk for a message.
Note that this signal is not parallel to
“got_chunk”; it is emitted only when a complete
chunk (added with soup_message_body_append()
or
soup_message_body_append_buffer()
) has been written. To get
more useful continuous progress information, use
“wrote_body_data”.
Flags: Run First
“wrote-headers”
signalvoid user_function (SoupMessage *msg, gpointer user_data)
Emitted immediately after writing the headers for a message. (For a client-side message, this is after writing the request headers; for a server-side message, it is after writing the response headers.)
Flags: Run First
“wrote-informational”
signalvoid user_function (SoupMessage *msg, gpointer user_data)
Emitted immediately after writing a 1xx (Informational) response for a (server-side) message.
Flags: Run First


Brandon Ryu
About
Portfolio
Contact
Contact
First Name
Last Name
Email
Message
Submit
Find Me More About Me


| 1205 | (A) | wo to this worthiliche wone and wo to my-seluen |
| 1207 | (C) | woo to þis wordy place . & woo to my-selfe |
| 1189 | (D) | wo to þis worthy wone & wo to my-self |
| 1166 | (E) | ¶ wo to þis wurthy town . & wo to my-selue |
| (Ex) | ---- no text ---- | |
| 1228 | (L) | wo to þis worldly wone & wo to my-selue |
| (P) | ---- no text ---- | |
| 1174 | (U) | wo to this worthi wonne / and wo to my self |
| 269 | (V) | woo to þe worthy woone . and woo to hym-selven |


|
|
Hi, I'm Rizwan 👋 |
I'm a Software Engineer based out of Greater New York City Area.
I graduated from Rutgers University with a
degree in Computer Science.
I love learning and working with new open source technologies, and I am particularly interested in full-stack, backend and AI.
Please check out my Projects page for some of the cool stuff I've built over the years and technologies I've used building them.
Outside of work I enjoy playing soccer, hiking
and gaming.


Call a Waiter Request a Refill Finish Dining
Who doesn't like eggs & bacon? Who doesn't like pizza ? Egg & Bacon Pizza represents the best of two worlds. Try it today and you will not be dissapointed.


-->
UO Suit Calculator™ V1.0
© 2018 Martin Østergaard /<EMAIL_ADDRESS>All rights reserved.
About
Links
Donate
Privacy
JavaScript code, disabled, because it's not ready yet. Interesting point here is the design.


Brain dump #1: How I'd implement Tesla's Autopilot feature
I recently saw this tweet by Elon Musk, who is looking for developers for their Autopilot feature:
We are looking for hardcore software engineers. No prior experience with cars required. Please include code sample or link to your work.
— Elon Musk (@elonmusk) 20 november 2015
As a long time Tesla fan, I couldn’t help but wonder what kind of solution they will come up with, so I decided to do a little brain dump myself:
Requirements
Trustable
Above all, software should be trustable. False positives are preferred over false negatives, as I wouldn’t want to accidentally hit into another driver in case of doubt.
Reliable
But, somewhat opposed to “trustable”, the software also needs to be reliable. If a car starts exposing unexpected behavior - by having to many false positives and braking all the time, for example -, people will stop using it.
Fast
When you are driving at higher speeds, every millisecond counts, so software would need to be extremely fast, and probably highly parallelized.
Continuously (self-)improving
People learn from their mistakes. Humans can learn from other humans at the rate of speaking or writing. Cars can learn from other cars at networking speeds. It would be silly not to use this as an advantage.
Context-aware
We listen to the radio, and look around while driving, listen to other cars etcetera. So cars would probably need to have the same kind of awareness.
Flexible
Cars will be in a lot of different environments, which might require different kind of Autopilots in different circumstances.
Fully-automated, semi-automated and manual modes
Whenever an Autopilot is in doubt, he should anticipate and allow the driver to decide.
Implementation
Based on the requirements, I would opt for the following architecture:
Context determination
A layer to figure out the current context the car is in: where am I, where am I going, how’s traffic, who’s around me etcetera…

- A computer vision and identification layer that interprets the objects in the environment. This could be based on a combo of neural networks and sensible heuristics. You’d want an outcome that says: on the right you have 2 trucks driving 30km/h slower than you, and one wants to pass the other one.
- A centralized layer that processes global traffic info, webcams, whatever is available to determine more context for the car, and sends info relevant to the car on regular intervals.
Command determination
Once you know where you’re at and what your goal is, you can figure out what to do next. There would be several systems working in parallel, and than one “master system” that decides which outputs to use, and whether to defer them to the driver or perform the commands automatically.
- A hard-coded rule engine where every rule is based on the input of a few sensors, and only has simple output as well, f.e. accel (m²/s) and/or turn (degrees). The main motivation behind this engine would be comparable to “Conway’s game of life”, where simple rules can enable complex behavior.
- One or more deep learning networks that takes into account the environment, location, weather, … These would be based on the stats that are collected from cars all over the world.
- A decision layer built on top of all the previous layers, that evaluates the situation and figures out what to do next:
- no change.
- change required.
- no driver approval necessary.
- driver approval preferred.
- driver approval required.
Providing feedback
While the Autopilot might only have a few potential outcomes, I do think it is important to visualize the whole process.
- visualize what the car is thinking, so drivers can anticipate and understand the car’s reactions.
- Allows the car to do some things for himself, based on some heuristics that determine the safety of the current situation.
- Alerts the driver in case of emergency.
- Might also show some hints on more than just the current driving situation:
- A better route to take.
- How to be more energy efficient.
- Suggesting to visit an old friend living in the neighbourhood when an appointment in your calendar got cancelled.
- Reminder to call your wife to wish her a happy wedding anniversary.
- …
Conclusion
Well, that’s it. That’s how I’d probably get started on my first version of the Autopilot. Of course, once you start implementing a system with this amount of inherent complexity, you will discover a lot of unknown unknowns, so I could easily imagine that extra layers and system might be added and removed as the system evolves.
Please not that this is a 60-minute brain dump, so don’t take this to seriously. Anyway, Mr. Musk, if you’d like to know more: have your people call my people, maybe we can talk ;).


Known Bugs
O, don't the days seem lank and long
When all goes right and nothing goes wrong,
And isn't your life extremely flat
With nothing whatever to grumble at!Princess Ida, Act III, W.S. Gilbert (& Sullivan)
This list includes the gross bugs that I'm aware of but don't know how to fix. Minor bugs get reported to me and are generally fixed within a week and rarely appear on this list.
- Some truetype fonts (kaiu and mingliu) do not store the correct outline. Instead they rely on using the instructions to move points around to generate the outline. The outline does not appear to be grid-fit at all, just positioned. FontForge does not apply the instructions when loading. In most fonts this would be the wrong thing to do, and I don't know how I could tell when it needs to be done...
- After adding the Johab encoding 23/Nov/01, any old fonts (in sfd files) which had a unicode encoding will suddenly claim to have a Johab encoding. I don't see a way around this at the moment. Just reencode them as unicode and all should be well.
- I'm told AutoKern doesn't work too well. (I may have fixed this, but I'm not sure)
- FontForge is confused by small splines, on the order of one em unit. If you need something that small, scale the font up by a factor of 2 or more (including the ascent and descent).
- There is a fundamental problem when importing a type3 font (or an eps file). In an most postscript programs each contour is stroked or filled individually, but in a type1 character, all contours are filled together. This can lead to unexpected side-effects if contours overlap. (configuring fontforge for mutlilayered editing can help with this)
- On linux boxes the dashed lines representing hints or the outlines of references get screwed up. I think this is a bug in the XServer on linux (it doesn't happen on other systems) but I have not examined it closely.
- FontForge will not copy and paste large (>XServer transfer (4Meg on my machine)) clipboards of text.
- Under gnome mnemonics in menus don't work. Personally I consider this a bug in gnome.
- Under gnome, docked palettes don't work the first time. Personally I consider this a bug in gnome.
- FontForge only produces an approximation to the OS/2 Codepages fields.
- Some commands don't work well in extreme conditions.
Reporting bugs...
I'm sure you'll find some. If you can isolate it and come up with a reproducible minimal case, that would be great. If your executable has symbols in it, you could run it in gdb and get a stack trace... Give me a test case if possible. Do what you can.
Please post bugs to:
(this is a public mailing list)
Post large testcases to:
(this is a public mailing list)


Icarus
Dashboard
Employee
(current)
Reports
Order Report
Sell Report
Products
Profile
Settings
Billing
Customize
Hi Fleur,
Logout
Employees
{% for employee in employees %}
{{employee.first_name}} {{employee.last_name}}
{{employee.role}}
{% endfor %}


{% extends 'base.html' %} {% block bodydata %} data-project-id="{{ project.id }}" data-project-locked="{{ project.islocked }}" {% endblock %} {% block title %} | Project: {{ project.name }} - Categories{% endblock %} {% block main %}
The project is locked, therefore categories cannot be edited. If you wish to edit them, you have to unlock the project in the project settings first.
{% else %}Create categories to define which data you want to collect for your project. For instance, if you want to create a map for public transport, you can create a category for each bus stop and train station.
{% endif %}{{ category.description }}
{% endif %}We couldn't find any categories for this project.
{% if project.islocked %}Unfortunately, you cannot create new categories when the project is locked.
{% else %} Create new category {% endif %}


Book-A-Meal
home
Create Meal
My Meals
Set Menu
Orders
Sign Out
Modify Meal
Category
Swallow
Soup
Drink
Update
My Meals
Swallow
Amala
N100
modify
delete
Soup
Oha
N300
modify
delete
Swallow
Pounded yam
N200
modify
delete


example - on left click and drag
https://stackoverflow.com/questions/24275560/scrolling-through-a-stack-of-images-using-mousemove-and-left-button-click
https://stackoverflow.com/questions/4770025/how-to-disable-scrolling-temporarily


|
cie-PN532
|
Public Member Functions | |
| cie_PN532 () | |
| Create with the typical breakout wiring, as described by Adafruit: https://learn.adafruit.com/adafruit-pn532-rfid-nfc/breakout-wiring. | |
| cie_PN532 (byte clk, byte miso, byte mosi, byte ss) | |
| Create with a customized wiring. | |
| cie_PN532 (Adafruit_PN532 *nfc) | |
| Create with a custom instance of the Adafruit_PN532 class. | |
| ~cie_PN532 () | |
| Frees resources. | |
| void | begin (void) |
| Initialize the PN532 board. | |
| bool | detectCard () |
| Dumps all values present in the CIE. Call this in your loop. | |
| bool | read_EF_DH (byte *contentBuffer, word *contentLength) |
| Reads the binary content the EF_DH elementary file. More... | |
| bool | read_EF_ATR (byte *contentBuffer, word *contentLength) |
| Reads the binary content of the EF_ATR elementary file. More... | |
| bool | read_EF_SN_ICC (byte *contentBuffer, word *contentLength) |
| Reads the binary content of the SN_ICC elementary file. More... | |
| bool | read_EF_ID_Servizi (byte *contentBuffer, word *contentLength) |
| Reads the binary content of the EF_ID_Servizi elementary file. More... | |
| bool | read_EF_Int_Kpub (byte *contentBuffer, word *contentLength) |
| Reads the binary content of the EF_Int_Kpub elementary file. More... | |
| bool | read_EF_Servizi_Int_Kpub (byte *contentBuffer, word *contentLength) |
| Reads the binary content of the EF_Servizi_Int_Kpub elementary file. More... | |
| bool | readElementaryFile (const cie_EFPath filePath, byte *contentBuffer, word *contentLength, const byte lengthStrategy) |
| Reads the binary content of an Elementary File given its Dedicated File and EFID or SFI identifier. More... | |
| bool | readBinaryContent (const cie_EFPath filePath, byte *contentBuffer, word offset, const word contentLength) |
| Reads the binary content of the currently selected Elementary File. More... | |
| void | printHex (byte *buffer, word length) |
| Dumps all values present in the CIE. | |
| bool | print_EF_SOD (word *contentLength) |
| Print the binary content of the EF_SOD elementary file. More... | |
| bool | parse_EF_SOD (cieBerTripleCallbackFunc callback) |
| Parses the BER content of the EF_SOD file. More... | |
| bool cie_PN532::parse_EF_SOD | ( | cieBerTripleCallbackFunc | callback | ) |
Parses the BER content of the EF_SOD file.
| callback | A function which will be invoked when a new triple has been read |
| bool cie_PN532::print_EF_SOD | ( | word * | contentLength | ) |
Print the binary content of the EF_SOD elementary file.
| contentBuffer | The pointer to data containing the contents of the file |
| contentLength | The lenght of the file |
| bool cie_PN532::read_EF_ATR | ( | byte * | contentBuffer, |
| word * | contentLength | ||
| ) |
Reads the binary content of the EF_ATR elementary file.
| contentBuffer | The pointer to data containing the contents of the file |
| contentLength | The lenght of the file |
| bool cie_PN532::read_EF_DH | ( | byte * | contentBuffer, |
| word * | contentLength | ||
| ) |
Reads the binary content the EF_DH elementary file.
| contentBuffer | The pointer to data containing the contents of the file |
| contentLength | The lenght of the file |
| bool cie_PN532::read_EF_ID_Servizi | ( | byte * | contentBuffer, |
| word * | contentLength | ||
| ) |
Reads the binary content of the EF_ID_Servizi elementary file.
| contentBuffer | The pointer to data containing the contents of the file |
| contentLength | The lenght of the file |
| bool cie_PN532::read_EF_Int_Kpub | ( | byte * | contentBuffer, |
| word * | contentLength | ||
| ) |
Reads the binary content of the EF_Int_Kpub elementary file.
| contentBuffer | The pointer to data containing the contents of the file |
| contentLength | The lenght of the file |
| bool cie_PN532::read_EF_Servizi_Int_Kpub | ( | byte * | contentBuffer, |
| word * | contentLength | ||
| ) |
Reads the binary content of the EF_Servizi_Int_Kpub elementary file.
| contentBuffer | The pointer to data containing the contents of the file |
| contentLength | The lenght of the file |
| bool cie_PN532::read_EF_SN_ICC | ( | byte * | contentBuffer, |
| word * | contentLength | ||
| ) |
Reads the binary content of the SN_ICC elementary file.
| contentBuffer | The pointer to data containing the contents of the file |
| contentLength | The lenght of the file |
| bool cie_PN532::readBinaryContent | ( | const cie_EFPath | filePath, |
| byte * | contentBuffer, | ||
| word | startingOffset, | ||
| const word | contentLength | ||
| ) |
Reads the binary content of the currently selected Elementary File.
| filePath | a structure indicating the parent Dedicated File (either ROOT_MF or CIE_DF), the selection mode (either SELECT_BY_EFID or SELECT_BY_SFI) and the file identifier (either a sfi or an efid) |
| contentBuffer | The pointer to the data buffer |
| contentLength | The number of bytes to read |
| bool cie_PN532::readElementaryFile | ( | const cie_EFPath | filePath, |
| byte * | contentBuffer, | ||
| word * | contentLength, | ||
| const byte | lengthStrategy | ||
| ) |
Reads the binary content of an Elementary File given its Dedicated File and EFID or SFI identifier.
| df | The containing Dedicated File (either ROOT_MF or CIE_DF) |
| filePath | a structure indicating the parent Dedicated File (either ROOT_MF or CIE_DF), the selection mode (either SELECT_BY_EFID or SELECT_BY_SFI) and the file identifier (either a sfi or an efid) |
| contentBuffer | Pointer to the response data |
| response | The maximum desired length of the response |
| lengthStrategy | How to determine the length of the file (either FIXED_LENGTH or AUTODETECT_BER_LENGTH or AUTODETECT_ATR_LENGTH) |


SWINGERS A film review by Christopher Null Copyright 1996 Christopher Null
One of the most sincere and earnest looks into single life in the 90's, SWINGERS is nothing but -- in the terms of its resident lounge lizards -- *money*.
You've probably seen print ads, movie reviews, and the like, portraying SWINGERS as a film about a bunch of suave and sexy guys, making the moves on the pretty babies (aka women) in the nightlife of La-La land. The title's double entendre doesn't help matters, either, so let me set the record straight.
SWINGERS is about a bunch of guys in L.A., yes, but they aren't overly suave, with the exception of Trent (the hysterically funny Vince Vaughn), who lives in an apparent fantasy world of CLOCKWORK ORANGEy faux-English doublespeak. His best friend is Mike (Jon Favreau, who also wrote the script), a down-and-out actor/comedian suffering over the breakup with his girlfriend of six years. Rob (Ron Livingston) and Sue (is in "a boy named Sue," Patrick Van Horn) are both actors/losers also.
Weaving through Los Angeles and Las Vegas, Trent, Mike, and their friends turn out to pretty much be high-talkers and low-rollers, about like everyone else. We see that these are regular guys, each with his own demons, each as insecure as you and me. But they talk a big game.
Sound familiar? In the end, SWINGERS perfectly humanizes its players, makes a touching statement about getting back on your feet after love knocks you down, and, most importantly, comes off as really, really, really funny. Favreau and director Doug Liman are sure to hit the big time after this, and Vaughn (who's already been picked to star in JURASSIC PARK 2) ought to get a Best Supporting Actor nomination, at least.
SWINGERS is one of those very rare movies where you really come out a changed, happier person -- at least for awhile. Hey, maybe I'm money, and I don't even know it!
And am I the only one that thinks Favreau looks *exactly* like George Clooney? And yes, Doug, that Aaton-III camera is *way* too loud.
RATING: ****1/2
|------------------------------| \ ***** Perfection \ \ **** Good, memorable film \ \ *** Average, hits and misses \ \ ** Sub-par on many levels \ \ * Unquestionably awful \ |------------------------------|
-Christopher Null /<EMAIL_ADDRESS>/ Writer-Producer -Visit The Movie Emporium at http://www.filmcritic.com/ -and Null Set Productions at http://www.filmcritic.com/nullset.htm
The review above was posted to the
rec.arts.movies.reviews newsgroup (de.rec.film.kritiken for German reviews).
The Internet Movie Database accepts no responsibility for the contents of the
review and has no editorial control. Unless stated otherwise, the copyright
belongs to the author.
Please direct comments/criticisms of the review to relevant newsgroups.
Broken URLs inthe reviews are the responsibility of the author.
The formatting of the review is likely to differ from the original due
to ASCII to HTML conversion.
Related links: index of all rec.arts.movies.reviews reviews


Login
Invalid username and password.
You've been logged out.
Username:
Password:
Remember Me
Login
Sign Up !
Tips
Login as a showcase Admin account.
Username:
admin
Password:
password
Create your own, or login as a showcase Customer account.
Username:
customer1
Password:
123


Primary Goals
Give details about exactly what you are looking for, including a clear description about you want to achieve during this conceptualization process.
Competition Task Overview
Your task is to document...
Documentation Provided
Describe here... Standard documents include the Client Questionnaire and any supporting documentation, workflow diagrams, existing specs, etc.


Total results returned by Tesserae:
type
tesserae returned
benchmark has
recall rate
mean score
Target Loc
Target Phrase
Source Loc
Source Phrase
Parallel Type
Tess Score
Commentators


public class Line extends Shape
| Constructor and Description |
|---|
Line(double x,
double y,
double x2,
double y2)
Creates and instance of Line with one point at x1,y1
and the other point at x2,y2
|
Line(double x,
double y,
double x2,
double y2,
double strokeWeight,
java.awt.Color strokeColor)
Creates a new instance of a Line object with one point at x,y
and the other point at x2,y2
|
Line(double x,
double y,
int length,
double angle)
Creates an instance of the Line with starting point x,y
and length length extending from angle degrees from the horizontal
|
Line(double x,
double y,
int length,
double angle,
double strokeWeight,
java.awt.Color strokeColor)
Creates an instance of the Line with starting point x,y
and length length extending from angle degrees from the horizontal
|
| Modifier and Type | Method and Description |
|---|---|
void |
draw(processing.core.PApplet surface)
Draws the Line from points getX1(),getY1() to
getX2(),getY2() to the drawer.
|
double |
getAngle()
Gets the angle formed by the Line and the horizontal
|
double |
getArea()
Calculates and returns the area of the Shape
|
java.awt.Point |
getIntersection(Line other)
Returns a java.awt.Point representing the intersection between the Line
and another Line.
|
double |
getPerimeter()
Calculates and returns the perimeter of the Shape
|
double |
getX()
Returns the x-coordinate of the first point
|
double |
getX2()
Returns the x-coordinate of the second point
|
double |
getY()
Returns the y-coordinate of the first point
|
double |
getY2()
Returns the y-coordinate of the second point
|
boolean |
intersects(Line other)
Compares two Lines to see if they intersect
|
boolean |
isPointInside(double x,
double y)
Returns true if the input point is contained by the Shape
|
void |
setPoint1(double x1,
double y1)
Sets the first point of the line to the arguments
|
void |
setPoint2(double x2,
double y2)
Sets the second point of the line to the arguments
|
void |
translate(double xChange,
double x2Change,
double yChange,
double y2Change)
Translates the line by the input values
|
drawNoFill, getFill, getStroke, getStrokeWeight, move, setFill, setStroke, setStrokeWeight, setX, setY, translate
public Line(double x, double y, double x2, double y2)
x
- The first point's x-coordinatey
- The first point's y-coordinatex2
- The seconds point's x-coordinatey2
- The second point's y-coordinatepublic Line(double x, double y, int length, double angle)
x
- The starting point x-coordinatey
- The starting point y-coordinatelength
- The length of the Lineangle
- The angle of the Linepublic Line(double x, double y, int length, double angle, double strokeWeight, java.awt.Color strokeColor)
x
- The starting point x-coordinatey
- The starting point y-coordinatelength
- The length of the Lineangle
- The angle of the LinestrokeWeight
- The thickness of the LinestrokeColor
- The Color of the Linepublic Line(double x, double y, double x2, double y2, double strokeWeight, java.awt.Color strokeColor)
x
- The first point's x-coordinatey
- The first point's y-coordinatex2
- The second point's x-coordinatey2
- The second point's y-coordinatestrokeWeight
- The Processing strokeWeight when drawing this ShapestrokeColor
- The Processing strokeColor when drawing this Shapepublic void draw(processing.core.PApplet surface)
public void setPoint2(double x2, double y2)
x2
- The new x-coordinate for the second pointy2
- The new y-coordinate for the second pointpublic void translate(double xChange, double x2Change, double yChange, double y2Change)
xChange
- Change to x-coordinatex2Change
- Change to second x-coordinateyChange
- Change to y-coordinatey2Change
- Change to second y-coordinatepublic void setPoint1(double x1, double y1)
x1
- The new x-coordinate for the first pointy1
- The new y-coordinate for the first pointpublic double getX()
public double getX2()
public double getY()
public double getY2()
public java.awt.Point getIntersection(Line other)
other
- The Line to compare topublic boolean intersects(Line other)
other
- The Line to compare topublic double getAngle()
public boolean isPointInside(double x, double y)
Shape
isPointInside
in class Shape
x
- The x-value of the pointy
- The y-value of the pointpublic double getArea()
Shape
public double getPerimeter()
Shape
getPerimeter
in class Shape


Home
Synopsis
Production
Watch
A film by Ayazhan Gabitkyzy
INTO THE SUN
Watch
Interesting facts
Click the circle tabs to find out interesting facts!


Hello I am Juan Dela Cruz Web and Graphics Designer. If yopu have something to be done just call my name and I will be there. :-)


DANCER IN THE DARK A film review by Christopher Null Copyright 2000 filmcritic.com filmcritic.com
Early on in Dancer in the Dark, Peter Stormare confesses to Björk that he doesn't understand movie musicals, because all the characters suddenly start singing and dancing for no reason. He doesn't start singing and dancing for no reason, he says.
Selma, as played to perfection by the almost childlike Björk, does her share of singing and dancing, but she's got a reason: It's all in her head. And with that said, get ready for the creepiest, most depressing, and certainly the most unique movie musical ever put on film.
At its heart, Dancer in the Dark is the simple story of Selma, a Czech immigrant to a small town somewhere in America, somewhere in the recent past. By day she works in a factory stamping out metal cafeteria-style tubs. By night she attaches bobby pins by hand to cardboard displays, readying them for sale, all to raise a little extra cash. Frugal with her money, Selma saves every penny because she is quickly going blind due to an unnamed genetic disorder. But her son can avoid the same fate if he undergoes an operation -- to which all Selma's savings are being put. Naturally, dad is long gone.
Her only thrills are evenings out watching (as best she can) old Hollywood musicals with her friend Kathy (a sparkling Catherine Deneuve), plus her chance to star as Maria in the local theatrical production of The Sound of Music. If only she could see the other actors....
For those not paying attention, Selma's life is obviously set up for some serious tragedy, and it doesn't take long before Selma has gone suddenly and totally blind, she's lost her job, and her savings have disappeared from the trailer home she lives in. On paper, this all sounds like either a soap opera or a country-western song, but believe me, on screen it goes well beyond the clichés of melodrama and into the realm of near-genius, the tale of a truly lost soul told by Danish auteur Lars von Trier as only he could tell it.
Dancer's charm lies in its conceit: To escape her melancholy, Selma imagines herself as part of the musicals she enjoys so much. She daydreams one musical after another, where people do suddenly begin to sing and dance, and where she is the star. One second, she's cranking out metal tubs, the next the factory is a hive of tap-dancing, jumping, spinning, and singing workers, each wielding a broom or a hammer as a prop or musical instrument. It's Stomp by way of Laverne and Shirley.
 But of course it does get worse, and watching Selma slip down to her fate is both gut-wrenching and, oddly, richly rewarding.
When every movie coming out of Hollywood is the same as the last, it's wonderful to see something with astonishing originality that defies comparison. Lars von Trier is no stranger to challenging fare, with work that includes Breaking the Waves and the Danish hospital soap The Kingdom, all rich psychodramas that semi-adhere to his Dogme 95 principles of shooting in available light, on location, and with hand-held cameras. Dancer is probably his best work to date, and with the film winning best picture and a well-deserved best female performance (for Björk) at Cannes, I'm not alone in this assessment. For its acting and ability o generate an emotional response, I don't think you'll see a more capable film this year.
Then again, of course, there's the slapdash editing -- a trademark of von Trier's -- that can be nauseating and ineffective. At 2 1/3 hours in length, the often poor pacing is also responsible for robbing Dancer of some of its passion. Perhaps my biggest complaint, however, regards the songs that lilt out during Selma's daydreams. Composed and performed by Björk herself, the music doesn't stand up on its own, unlike the memorable tunes in The Sound of Music, a constant reference point for the movie. In Dancer, the songs are unilaterally middling, most notably the final fantasy production number, which one would expect to be a real smash, but is actually the worst of the bunch.
Gripes aside, Dancer in the Dark is bound to be a film that frustrates as many viewers as it pleases. The movie is long, with difficult material and a deeply disturbing theme that tells us, indeed, we can't always get what we want. Hollywood would have us believe otherwise. That Selma shines through it all is a testament to Björk's ability as an actress (which she has reportedly now sworn off for good), von Trier's ability as a teller of tragedy, and the audience's ability to enjoy a movie that just doesn't "feel good." But trust me, you can take it.

The review above was posted to the
rec.arts.movies.reviews newsgroup (de.rec.film.kritiken for German reviews).
The Internet Movie Database accepts no responsibility for the contents of the
review and has no editorial control. Unless stated otherwise, the copyright
belongs to the author.
Please direct comments/criticisms of the review to relevant newsgroups.
Broken URLs inthe reviews are the responsibility of the author.
The formatting of the review is likely to differ from the original due
to ASCII to HTML conversion.
Related links: index of all rec.arts.movies.reviews reviews


ANNE FRANK REMEMBERED A film review by Michael John Legeros Copyright 1996 Michael John Legeros
(Sony) Directed by Jon Blair Written by Jon Blair MPAA Rating "PG" Running Time 122 minutes Reviewed at The Colony, Raleigh, NC (19MAY96)
==
This sometimes-tedious and often-moving documentary charts the life and times of Anne Frank, the young diarist and most-famous victim of Adolph Hitler. Writer/director/producer Jon Blair has collected a staggering amount of historical material on both Anne and the Frank family. We meet Miep Gies, one of the family's protectors who is still alive. She recounts how she found the diary in the days after the Germans captured the Franks. We watch Otto Frank, Anne's father and surviving family member, in interview footage filmed before his death. Blair successfully combines these clips, footage, and other historical records to recount exactly what happened during that terrible period of European history. As narrated by Kenneth Branagh and with diary excepts read by Glenn Close, ANNE FRANK REMEMBERED retells more than just Anne's story. We meet and learn about the *many* friends, family members, and acquaintances whose lives were touched by this young woman and her writings. Winner of the last year's Academy Award for Best Documentary.
Grade: B
--
Mike Legeros - Raleigh, NC
<EMAIL_ADDRESS>(h) -<EMAIL_ADDRESS>(w)
Visit me in MOVIE HELL
The review above was posted to the
rec.arts.movies.reviews newsgroup (de.rec.film.kritiken for German reviews).
The Internet Movie Database accepts no responsibility for the contents of the
review and has no editorial control. Unless stated otherwise, the copyright
belongs to the author.
Please direct comments/criticisms of the review to relevant newsgroups.
Broken URLs inthe reviews are the responsibility of the author.
The formatting of the review is likely to differ from the original due
to ASCII to HTML conversion.
Related links: index of all rec.arts.movies.reviews reviews


{% extends "_base.html" %} {% load markdown %} {% block content %}
Sorry, No courses are available.
Previous Episode
Edit
> {{ episode.next.title }}