|
|||||||||||
| PREV NEXT | FRAMES NO FRAMES |
| Packages that use org.apache.commons.betwixt.expression | |
| org.apache.commons.betwixt | This package contains the main betwixt introspection code. |
| org.apache.commons.betwixt.expression | This package contains the system which extracts values from beans. |
| org.apache.commons.betwixt.io | Package contains classes dealing directly with the reading and writing of beans. |
| org.apache.commons.betwixt.io.read | Package contains strategy and configuration classes used by reading only. |
| org.apache.commons.betwixt.strategy | This package contains a variety of plugin Strategy patterns that can be used to customize the default behaviours. |
| Classes in org.apache.commons.betwixt.expression used by org.apache.commons.betwixt | |
Expression
Expression represents an arbitrary expression on a bean. |
|
Updater
Updater acts like an lvalue which updates the current
context bean from some text from an XML attribute or element. |
| Classes in org.apache.commons.betwixt.expression used by org.apache.commons.betwixt.expression | |
| CollectionUpdater
Updates a Collection by adding the new value to it. |
|
Context
Context describes the context used to evaluate
bean expressions. |
|
EmptyExpression
EmptyExpression returns the same value as is passed in. |
|
Expression
Expression represents an arbitrary expression on a bean. |
|
StringExpression
StringExpression returns the current context object as a string. |
|
| TypedUpdater
Abstracts common features for strongly typed Updater 's. |
|
Updater
Updater acts like an lvalue which updates the current
context bean from some text from an XML attribute or element. |
| Classes in org.apache.commons.betwixt.expression used by org.apache.commons.betwixt.io | |
Context
Context describes the context used to evaluate
bean expressions. |
| Classes in org.apache.commons.betwixt.expression used by org.apache.commons.betwixt.io.read | |
Context
Context describes the context used to evaluate
bean expressions. |
|
Updater
Updater acts like an lvalue which updates the current
context bean from some text from an XML attribute or element. |
| Classes in org.apache.commons.betwixt.expression used by org.apache.commons.betwixt.strategy | |
Context
Context describes the context used to evaluate
bean expressions. |
|
|||||||||||
| PREV NEXT | FRAMES NO FRAMES |


script[type=module]
allows usage of the
import
imperative to link in the jsf.js
module
located at 'URL'. (The module's code is executed.) After which, Actor is in
scope, and IAmANewActor is instantiated. However, in another
script
below, Actor is no longer in scope, and IAmAnotherActor
cannot be instantiated.


People doing their bit for fish and moths
by LettersDave Morris on the collective power of research and Alastair Leake on the decline in moth populations
The efforts of campaigners to highlight important issues can often be overlooked by a historical approach that focuses on individuals, often academics or politicians. An example is in the obituary of the biologist Victoria Braithwaite (Obituary, 9 November), which asserts that “until the early 2000s everyone knew that fish do not feel pain”. But almost 20 years earlier, we had produced and started to widely distribute a leaflet called Fish Feel Pain. And of course hundreds of thousands of people were already refusing to eat fish on those very grounds.
In that same era, our group and others were campaigning on a range of other matters – such as traffic pollution, junk food, the arms trade, non-renewable energy, single-use plastics, environmental destruction – which may have seemed marginal at the time but are now acknowledged as mainstream concerns.
While individuals make valuable contributions to human progress, it is generally the collective power and influence of grassroots cultural, ethical and political movements that first raise the issues and go on to make the real difference.
Dave Morris
London Greenpeace
• While moths may be showing a population drop nationally, Dr Callum Macgregor is correct to observe that the situation is not “almost hopeless” (Moth survey shows steady decline in Britain since 1980s, 12 November). The Allerton Project Research Farm in Leicestershire joined the same survey 25 years ago, while making changes to our farming and wildlife management. Since then, both the numbers and species diversity of moths have increased. Outside the common agricultural policy and with the right incentives, other farmers could turn this single result into a national trend.
Alastair Leake
Director of policy, Game & Wildlife Conservation Trust
• Join the debate – email<EMAIL_ADDRESS>• Read more Guardian letters – click here to visit gu.com/letters
• Do you have a photo you’d like to share with Guardian readers? Click here to upload it and we’ll publish the best submissions in the letters spread of our print edition


{% extends "base.html" %} {% load webdesign %} {% block left_content %}{% endblock %} {% block main_content %}
This information is provided to educate the public on modern cyber technologies. it is not intended to assist with exploiting services on those sites, or for imformation gathering purposes beyond those allowed by law. I hereby disclaim any responsibility for actions taken based upon the information in this article, and urge all who seek information towards a destructive end to reconsider their life, and do something constructive instead.
{% endblock %}


--- layout: post title: "Keep IDs internal with REST" description: "Instead of relying on entity IDs, use hypermedia to identify resources." date: 2021-09-20 6:21 UTC tags: [REST, Services] --- {% include JB/setup %}
{{ page.description }}
Whenever I've helped teams design HTTP APIs, sooner or later one request comes up - typically from client developers: Please add the entity ID to the representation.
In this article I'll show an alternative, but first: the normal state of affairs.
It's such a common requirement that, despite admonitions not to expose IDs, I did it myself in the code base that accompanies my book Code That Fits in Your Head. This code base is a level 3 REST API, and still, I'd included the ID in the JSON representation of a reservation:
{ "id": "bf4e84130dac451b9c94049da8ea8c17", "at": "2021-12-08T20:30:00.0000000", "email"<EMAIL_ADDRESS>"name": "Snow Moe Beal", "quantity": 1 }
At least the ID is a GUID, so I'm not exposing internal database IDs.
After having written the book, the id
property kept nagging me, and I wondered if it'd be possible to get rid of it. After all, in a true REST API, clients aren't supposed to construct URLs from templates. They're supposed to follow links. So why do you need the ID?
Early on in the system's lifetime, I began signing all URLs to prevent clients from retro-engineering URLs. This also meant that most of my self-hosted integration tests were already following links:
[Theory] [InlineData(867, 19, 10<EMAIL_ADDRESS>"Adrienne Ursa", 2)] [InlineData(901, 18, 55<EMAIL_ADDRESS>"Emma Olsen", 5)] public async Task ReadSuccessfulReservation( int days, int hours, int minutes, string email, string name, int quantity) { using var api = new LegacyApi(); var at = DateTime.Today.AddDays(days).At(hours, minutes) .ToIso8601DateTimeString(); var expected = Create.ReservationDto(at, email, name, quantity); var postResp = await api.PostReservation(expected); Uri address = FindReservationAddress(postResp); var getResp = await api.CreateClient().GetAsync(address); getResp.EnsureSuccessStatusCode(); var actual = await getResp.ParseJsonContent<ReservationDto>(); Assert.Equal(expected, actual, new ReservationDtoComparer()); AssertUrlFormatIsIdiomatic(address); }
This parametrised test uses xUnit.net 2.4.1 to first post a new reservation to the system, and then following the link provided in the response's Location
header to verify that this resource contains a representation compatible with the reservation that was posted.
A corresponding plaintext HTTP session would start like this:
POST /restaurants/90125/reservations?sig=aco7VV%2Bh5sA3RBtrN8zI8Y9kLKGC60Gm3SioZGosXVE%3D HTTP/1.1 Content-Type: application/json { "at": "2021-12-08 20:30", "email"<EMAIL_ADDRESS>"name": "Snow Moe Beal", "quantity": 1 } HTTP/1.1 201 Created Content-Type: application/json; charset=utf-8 Location: example.com/restaurants/90125/reservations/bf4e84130dac451b9c94049da8ea8c17?sig=ZVM%2[...] { "id": "bf4e84130dac451b9c94049da8ea8c17", "at": "2021-12-08T20:30:00.0000000", "email"<EMAIL_ADDRESS>"name": "Snow Moe Beal", "quantity": 1 }
That's the first request and response. Clients can now examine the response's headers to find the Location
header. That URL is the actual, external ID of the resource, not the id
property in the JSON representation.
The client can save that URL and request it whenever it needs the reservation:
GET /restaurants/90125/reservations/bf4e84130dac451b9c94049da8ea8c17?sig=ZVM%2[...] HTTP/1.1 HTTP/1.1 200 OK Content-Type: application/json; charset=utf-8 { "id": "bf4e84130dac451b9c94049da8ea8c17", "at": "2021-12-08T20:30:00.0000000", "email"<EMAIL_ADDRESS>"name": "Snow Moe Beal", "quantity": 1 }
The actual, intended use of the API doesn't rely on the id
property, neither do the tests.
Based on this consistent design principle, I had reason to hope that I'd be able to remove the id
property.
My motivation for making this change was to educate myself. I wanted to see if it would be possible to design a REST API that doesn't expose IDs in their JSON (or XML) representations. Usually I'm having trouble doing this in practice because when I'm consulting, I'm typically present to help the organisation with test-driven development and how to organise their code. It's always hard to learn new ways of doing things, and I don't wish to overwhelm my clients with too many changes all at once.
So I usually let them do level 2 APIs because that's what they're comfortable with. With that style of HTTP API design, it's hard to avoid id
fields.
This wasn't a constraint for the book's code, so I'd gone full REST on that API, and I'm happy that I did. By habit, though, I'd exposed the id
property in JSON, and I now wanted to perform an experiment: Could I remove the field?
A word of warning: You can't just remove a JSON property from a production API. That would constitute a breaking change, and even though clients aren't supposed to use the id
, Hyrum's law says that someone somewhere probably already is.
This is just an experiment that I carried out on a separate Git branch, for my own edification.
As outlined, I had relatively strong faith in my test suite, so I decided to modify the Data Transfer Object (DTO) in question. Before the change, it looked like this:
public sealed class ReservationDto { public LinkDto[]? Links { get; set; } public string? Id { get; set; } public string? At { get; set; } public string? Email { get; set; } public string? Name { get; set; } public int Quantity { get; set; } }
At first, I simply tried to delete the Id
property, but while it turned out to be not too bad in general, it did break one feature: The ability of the LinksFilter to generate links to reservations. Instead, I changed the Id
property to be internal:
public sealed class ReservationDto { public LinkDto[]? Links { get; set; } internal string? Id { get; set; } public string? At { get; set; } public string? Email { get; set; } public string? Name { get; set; } public int Quantity { get; set; } }
This enables the LinksFilter
and other internal code to still access the Id
property, while the unit tests no longer could. As expected, this change caused some compiler errors. That was expected, and my plan was to lean on the compiler, as Michael Feathers describes in Working Effectively with Legacy Code.
As I had hoped, relatively few things broke, and they were fixed in 5-10 minutes. Once everything compiled, I ran the tests. Only a single test failed, and this was a unit test that used some Back Door Manipulation, as xUnit Test Patterns terms it. I'll return to that test in a future article.
None of my self-hosted integration tests failed.
Since clients are supposed to follow links, they can still do so. For example, a maître d'hôtel might request the day's schedule:
GET /restaurants/90125/schedule/2021/12/8?sig=82fosBYsE9zSKkA4Biy5t%2BFMxl71XiLlFKaI2E[...] HTTP/1.1 Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJyZXN0YXVyYW50IjpbIjEiLCIyMTEyIiwi[...] HTTP/1.1 200 OK Content-Type: application/json; charset=utf-8 { "name": "The Vatican Cellar", "year": 2021, "month": 12, "day": 8, "days": [ { "date": "2021-12-08", "entries": [ { "time": "20:30:00", "reservations": [ { "links": [ { "rel": "urn:reservation", "href": "http://example.com/restaurants/90125/reservations/bf4e84130dac4[...]" } ], "at": "2021-12-08T20:30:00.0000000", "email"<EMAIL_ADDRESS>"name": "Snow Moe Beal", "quantity": 1 } ] } ] } ] }
I've edited the response quite heavily by removing other links, and so on.
Clients that wish to navigate to Snow Moe Beal's reservation must locate its urn:reservation
link and use the corresponding href
value. This is an opaque URL that clients can use to make requests:
GET /restaurants/90125/reservations/bf4e84130dac451b9c94049da8ea8c17?sig=vxkBT1g1GHRmx[...] HTTP/1.1 HTTP/1.1 200 OK Content-Type: application/json; charset=utf-8 { "at": "2021-12-08T20:30:00.0000000", "email"<EMAIL_ADDRESS>"name": "Snow Moe Beal", "quantity": 1 }
In none of these interactions do clients rely on the id
property - which is also gone now. It's gone because the Id
property on the C# DTO is internal
, which means that it's not being rendered.
Mission accomplished.
It always grates on me when I have to add an id
property to a representation in an HTTP API. It's often necessary when working with a level 2 API, but with a proper hypermedia-driven REST API, it may not be necessary.
At least, the experiment I performed with the code base from my book Code That Fits in Your Head indicates that this may be so.
Comments
It seems to me that this approach will cause problems if 3rd parties need to integrate with your API in a way where they themselves need to store references to entities in your system. For example, they may expose your entities to their users with additional data in their systems/integrations. Sure, it is possible for them to use the URI as a primary key (if you guarantee a sensible max URI length; another can of worms), but if you internally use INT or UNIQUEIDENTIFIER as your primary key, I would not want to force them to use VARCHAR(whatever) as primary key.
Therefore, in all our APIs, we document in the API specification that the IDs, though required by JSON:API (which we follow) to be passed as string values for consistency, can be safely assumed to be integers (or GUIDs, if relevant). We even document that they are 32-bit ints, so any clients know they can safely use INT fields instead of BIGINT.
JSON:API requires all entities to have a single ID. For obvious reasons, IDs should be stable. Therefore, for entities that represent an association between two other entities and do not have a separate, persisted ID, we have a need to have API IDs that contain information about the associated entities. To combat Hyrum's law, we typically concatenate the associated IDs using a known delimiter and encode the resulting string using a non-standard, URL-friendly encoding (i.e., not Base64, which may contain non-URL-friendly characters and is often obvious). This way, the IDs appear opaque to API clients. Of course, the format of these IDs are not documented in our API specifications, as they are not intended to be stored. Instead, the actual association is documented and the related entities retrievable (of course, since this information inherent to the entity's very nature), and the associated IDs may be used by clients in a multi-column primary key, just like we do.
All of the above assumes that the integrating clients use a SQL database or similar. Let's face it; many do. If you have (or may hve in the future) a single client that do this, you have to take the above into account.
Christer, thank you for writing. I think that one of the problems with discussions about REST APIs, or just HTTP APIs in general, is that people use them for all sorts of things. At one extreme, you have Backends For Frontends, where, if you aren't writing the API with the single client in mind, you're doing something wrong. At the other extreme, you have APIs that may have uncountable and unknown clients. When I write about REST, I mostly have the latter kind in mind.
When designing APIs for many unknown clients, it makes little sense to take 'special needs' into account. Different clients may present mutually exclusive requirements.
Clients that need to 'bookmark' REST resources in a database can do that by defining two columns: one an ordinary primary key column on which the table defines its clustered index, and another column for the link value itself, with a
UNIQUE
constraint. Something like this (in T-SQL dialect):Client code can look up an API resource on internal key, or on address, as required.
Your URLs include a signature, which changes if you need to switch signing keys. Furthermore, the base URL for your API may change. The entities are still the same; the restaurant previously at old.domain/restaurants/1?sig=abc is the same as the restaurant now at new.domain/restaurants/1?sig=123. With your proposed bookmark-based solution, the API clients would effectively lose the associations in their system.
Also, indexing a very long varchar column probably works fine for tables that are fairly small and not overly busy. But for large and/or busy tables containing entities that are created every second of every day (say, passages through gates at hundreds of large construction sites, which is one of the domains I work with), I think that the performance would suffer unreasonably. (Admittedly, I have of course not measured this; this is just speculation, and anyway not my main point.)
You say you write APIs with arbitrary clients in mind. I do, too. That is one of the reasons I design my APIs at REST level 2 instead of 3. (JSON:API does offer some possibility of just "following links" if the client wishes to do that, though it is does not allow for APIs that are fully level 3/HATEOAS.) Having stable IDs with well-known formats and being able to construct URLs seems pragmatically like a good solution that keeps client developers happy. I do not have decades of experience, but I have never encountered clients who have been unhappy with my decision to go for level 2 instead of level 3. (I imagine I would have encountered some resistance in the opposite case, though that is pure speculation on my part.) Furthermore, I have never encountered the need for breaking changes that would be non-breaking by level 3 standards.
You say it makes little sense to take "special needs" into account. Idealistically, I agree. Pragmatically, 1) SQL databases are so ubiquitous and have been for such a long time that making life better for those developers by including an ID with a guaranteed format seems like a fair decision, and 2) our APIs (and many others, I assume) are created not just for 3rd party integration but also for one or more 1st party front-ends, which naturally tends to receive some preferential treatment (e.g. features and designs that probably aren't useful to other clients).
Christer, thank you for writing. It's possible that I'm going about this the wrong way. I only report on what's been working for me, but that said, while I do have decades of general programming experience, I don't have decades of REST experience. I designed my first REST API in 2012.
Additionally, just because one style of API design works well, that doesn't rule out that other types of design also work.
Finally, this particular article is an experiment. I've never done something like this in the wild, so it's possible that it does have unforeseen issues.
A couple of answers to your various points, though:
I don't foresee having to change signing keys, but if that happens, it'd be a breaking change to remove support for old keys. One might have to, instead, retire old signing keys in the same way one can retire old service versions. Even if a key gets 'compromised', it's not an immediate issue. It only means that any client that possesses the leaked key can construct URLs directly by retro-engineering implied URL templates. This would still be undocumented and unsupported use of the API, which means that ultimately, it'd be against the client developers' own self-interest in doing that.
Signing the URLs isn't a security measure; it's more like a nudge.
I've written APIs like that as well, and if there's one thing I've learned from doing that is that if I'm ever again put in charge of such an API, I'll strongly resist giving preferential treatment to any clients. If a particular client needs a particular feature, the client team can develop and maintain a Backend for Frontend, which bases its own implementation on the general-purpose API.
My experience with supporting particular clients is that client needs evolve much faster than APIs. This makes sense. Someone wants to do A/B testing on the client's user interface. Depending on the outcome of such a test, at least one of the supporting features will now be obsolete. I'm not much inclined having to support such features in an API where backwards compatibility is critical.
But again, these things are never clear-cut. Much depends on the overall goals of the organisation - and these may also change over time. I'm not claiming that my way is best - only that it's possible.


Owner-developers have been 'agile' since long before the word was coined. Bruce is no different. The catch is being agile and optimising productivity. It is the same issue facing agile teams of any size.
As an owner developer, Bruce does not report to anyone but himself. The inefficiencies created by limited planning are made up for with time and energy - a part of the passion.
Bruce will not make use of the structure uSDLC provides. He wants to cut code and create product. He holds the higher purpose in his head, along with benefits and value. Whether this is good or bad is immaterial. It is the way he has chosen to work.
This means he will go straight from vision statements to features and scenarios. Even this is a challenge for most owner-developers who would prefer to cut code first and ask questions later. Bruce, however, has decided to dip his toes in the BDD water by starting with defining features and creating scenarios before writing code.
By using some of the principles behind Behaviour Driven Development (BDD) and Test Driven Development (TDD), Bruce is starting on the path prescribed by most agile proponents. These techniques in themselves are not agile, but they do make agile practices more palatable to product owners. Since Bruce is his own product owner he does not need these practices for those purposes. Instead he is giving up some freedom to
This is not being agile, but with a little help Bruce is more likely than most to create a complete, marketable and reliable product in the amount of time that his patience and passion will allow.


{{ post.title }}
{{ post.excerpt }}
Read More
--- layout: default --- I am music scholar working on the fields of empirical musicology, music psychology and music and science. My institutional homepage can be found at Durham University and I am co-director of Music and Science Lab. My topics of interest are music and emotions, perception of the central elements of music such as melody, timbre, rhythm, metre and dissonance.


Open a Microsoft Word or other word processor. Write a heading as you would for a required assignment. Then write a paragraph or two. Windows provides many commands that you can use for moving around the document. The commands will work with or without a screen reader. Keeping your hands on the home row instead of reaching for the mouse can help you save time when editing a document.
in-context


Inline equations, as for instance the classic $\Delta = b^2-4ac$ and $x\_{1,2} = \frac{-b\pm\sqrt{\Delta}}{2a}$, or display equations as this one : $$ J\_\alpha(x) = \sum\limits\_{m=0}^\infty \frac{(-1)^m}{m! \, \Gamma(m + \alpha + 1)}{\left({\frac{x}{2}}\right)}^{2 m + \alpha} $$
## From a classic math book But a less classic exercise about [Hölder functions](https://en.wikipedia.org/wiki/H%C3%B6lder_condition) (more precisely, *Exercice 7*, Chapter 4.5, page 267, of the [Gourdon, "*Les maths en tête : Analyse*", $2^\text{nd}$ edition](http://www.amazon.fr/gp/product/2729837590) book).$$ 4 \sum\_{n=1}^{+\infty} \rho\_n^2 \sin^2 nh = \frac{1}{2\pi} \int\_{-\pi}^{\pi}\lvert f(x+h) - f(x-h)\rvert^2 dx. $$
## How-to ? The previous equation is simply included in the Markdown code part as basic some $\LaTeX2e{}$ code : > ```latex $$ 4 \sum\_{n=1}^{+\infty} \rho\_n^2 \sin^2 nh = \frac{1}{2\pi} \int\_{-\pi}^{\pi}|f(x+h) - f(x-h)|^2 dx. $$ ``` *** ## Yes, it is as simple as adding *one line at the bottom* You just have to load [MathJax](http://www.mathjax.org/) (as described [here](http://docs.mathjax.org/en/latest/configuration.html)) from the bottom of a *StrapDown*-flavored page, for instance from the default *CDN* : > ```html ``` You can consult [a second example](example4.html) to see some more advanced examples of LaTeX equations rendered with MathJax. ### A better solution? From version 0.5, you can import MathJax in an even *quicker* way: you just have to add ``&mathjax=yes`` to the URL used to import [``strapdown.min.js``](index.html). See [the first paragraph of this third example](example5.html) to see this. *** # Warning Be aware of the following limitations : ## Escape the underscore ('``_``') The [StrapDown.js](//lbesson.bitbucket.io/md/index.html) text processor interprets underscores (the '``_``' symbol) as underline markup (like _this_), so be sure to escape the '``_``' in the $\LaTeX2e{}$ code. A *bad looking* example could be ``$\mathcal{M}_{n,m}(\mathbb{F_9})$`` (which is **badly displayed** as $\mathcal{M}_{n,m}(\mathbb{F_9})$). _Ugly_ right ? Escape the '``_``' in the previous code to get ``$\mathcal{M}\_{n,m}(\mathbb{F\_9})$`` : now it is **nicely displayed** as $\mathcal{M}\_{n,m}(\mathbb{F\_9})$. ## Escape some others Markdown markup code ('``*``', '``**``' or '``#``') The previous limitation is also true for other symbols, used for *Markdown as markup* and for *LaTeX as symbols*. An example could be ``$[ u^*; v^*](x)$`` (which is badly displayed as $[ u^*; v^*](x)$), which becomes ``$\[ u^\*; v^\*\]\(x\)$`` (now it is nicely displayed as $\[ u^\*; v^\*\]\(x\)$). A pretty good rule of thumb can be to **escape every Markdown markup symbols** in LaTeX code. Feel free to refresh your mind about which symbols are used as elements of the Markdown syntax with [this page](http://daringfireball.net/projects/markdown/syntax#list), or [this one on Wikipedia](https://en.wikipedia.org/wiki/Markdown). ## Escape the backslash ('``\``') The backslash symbol, already escaped by an backslash ('``\``') is used in LaTeX to force a new line. It is usually used in aligned equations, as shown in the Lorenz Equations [here](example4.html). You should also escape the backslash, by typing ``\\`` where you would have used a simple ``\`` in LaTeX. *** ## See also + [This page](http://perso.crans.org/besson/math.html) shows how to use MathJax on a [Sphinx](http://sphinx-doc.org/) project. + [This script (strapdown2pdf)](strapdown2pdf.html) to print to PDF a *StrapDown*-powered web page. It comes with a limited support of LaTeX (still not perfect). ---


Flone Initiative, is a women led organization registered as a trust based in Kiambu, Kenya, working towards ending violence against women and girls in public spaces by influencing behavioral change and promoting tolerance and acceptance by strengthening capacities at grassroots level.
Our Vision is to create a sustainable and safe society where women and girls live peaceful and fulfilled lives.
Naomi Mwaura Flone Founding Director grew up watching her uncles work as public vehicle drivers, conductors and cleaners. Naomi did not see the matatu industry as a lost cause but as a misunderstood and neglected industry. At one time, she was physically assaulted by public vehicle conductors. These contrasting experiences demonstrated the need for an initiative that would improve the lives of public transport operators, create safer spaces for women, and change the matatu industry for the better.
Today, Flone Initiative has grown in strength and impact, gaining visibility, authority and legitimacy as an agent of positive change within the transportation industry.


Need help? Visit the help page.
How-to
Sounds
Drag & drop sounds or click to browse
Preset details
help_outline
Song details
Drag & drop album art image or click to browse
Song store details (optional)
Artist biography
Drag & drop artist image or click to browse
Drag & drop artist icon or click to browse
Artist details (optional)
create


val resumePositionMs: Int
The user’s most recent position in the episode in milliseconds.
resumePositionMs - The user’s most recent position in the episode in milliseconds.
resumePositionMs


Optics Editor Help
The Optics Editor allows you to view and edit the enable and disable status of nodes. You can also control the inclusion of nodes, but this is probably best left to experts. For example, if you exclude a node, it is completely removed from the accelerator hierarchy rather than simply being disabled.
When you open the application, it will automatically attempt to open the default accelerator optics file. To open another XAL optics file, select the "Open" menu item under the "File" menu and navigate to and select the desired optics file. All nodes are displayed alphabetically along with their status, inclusion and modification flags. You can filter the nodes quickly by any of these flags.
Node Flags
- Status
- Indicates whether the node is enabled or disabled for use. Typically, an application will use the status to filter only for enabled nodes.
- Inclusion
- Indicates whether a node is marked for inclusion or exclusion. A node may be excluded to completely remove it from the accelerator hierarchy preventing applications from attempting to access it.
- Modification
- Indicates whether the current status or inclusion flags differ from the original design optics. The hardware status file stores modifications to the original design optics file which remains unchanged.
Filtering
You may filter which nodes are displayed by typing text into the "Node Name" text field. The filter is case insensitive, and the text may appear anywhere within the node name to form a match. You can select the radio buttons for Status, Inclusion or Modification to match against these flags in any combination you desire.
Editing
You may enable and disable nodes as well as change the inclusion flag.
To modify any flag:
- Filter the nodes if desired
- Select the nodes you wish to modify
- Perform one of the following operations:
- Press the "Enable" button to enable the selected nodes
- Press the "Disable" button to disable the selected nodes
- Select the Nodes:Include menu item to Include the selected nodes within the accelerator hierarchy
- Select the Nodes:Exclude menu item to exclude the selected nodes from the accelerator hierarchy
- Save the document to commit the changes you have made to the hardware status file.
Warning
Please note that the hardware status file is computer generated and only contains support for the flags mentioned here (status and inclusion). Any other attributes or entries will be lost when saving a document including but not limited to comments. These other modifications should be placed manually in other optics extra files. Please do not edit the hardware status file manually!


Initializes a new simulation an starts the visualization without starting the control loop.
Options to run the simulation with.
Returns current rover heading.
Returns current rover location.
Starts the simulation control loop at an interval less than 50ms.
Stops the simulation control loop.
Generated using TypeDoc
A simple, open world top down simulation for a program controlled vehicle.
Example for initialization


| Opcode/Instruction | Op /En | 64/32 bit Mode Support | CPUID Feature Flag | Description |
|---|---|---|---|---|
| F2 0F 2A /r CVTSI2SD xmm1, r32/m32 | RM | V/V | SSE2 | Convert one signed doubleword integer from r32/m32 to one double-precision floating-point value in xmm1. |
| F2 REX.W 0F 2A /r CVTSI2SD xmm1, r/m64 | RM | V/N.E. | SSE2 | Convert one signed quadword integer from r/m64 to one double-precision floating-point value in xmm1. |
| VEX.NDS.128.F2.0F.W0 2A /r VCVTSI2SD xmm1, xmm2, r/m32 | RVM | V/V | AVX | Convert one signed doubleword integer from r/m32 to one double-precision floating-point value in xmm1. |
| VEX.NDS.128.F2.0F.W1 2A /r VCVTSI2SD xmm1, xmm2, r/m64 | RVM | V/N.E.1 | AVX | Convert one signed quadword integer from r/m64 to one double-precision floating-point value in xmm1. |
| EVEX.NDS.LIG.F2.0F.W0 2A /r VCVTSI2SD xmm1, xmm2, r/m32 | T1S | V/V | AVX512F | Convert one signed doubleword integer from r/m32 to one double-precision floating-point value in xmm1. |
| EVEX.NDS.LIG.F2.0F.W1 2A /r VCVTSI2SD xmm1, xmm2, r/m64{er} | T1S | V/N.E.1 | AVX512F | Convert one signed quadword integer from r/m64 to one double-precision floating-point value in xmm1. |
NOTES: 1. VEX.W1/EVEX.W1 in non-64 bit is ignored; the instructions behaves as if the W0 version is used.
| Op/En | Operand 1 | Operand 2 | Operand 3 | Operand 4 |
| RM | ModRM:reg (w) | ModRM:r/m (r) | NA | NA |
| RVM | ModRM:reg (w) | VEX.vvvv | ModRM:r/m (r) | NA |
| T1S | ModRM:reg (w) | EVEX.vvvv | ModRM:r/m (r) | NA |
Converts a signed doubleword integer (or signed quadword integer if operand size is 64 bits) in the “convert-from” source operand to a double-precision floating-point value in the destination operand. The result is stored in the low quadword of the destination operand, and the high quadword left unchanged. When conversion is inexact, the value returned is rounded according to the rounding control bits in the MXCSR register.
The second source operand can be a general-purpose register or a 32/64-bit memory location. The first source and destination operands are XMM registers.
128-bit Legacy SSE version: Use of the REX.W prefix promotes the instruction to 64-bit operands. The “convert-from” source operand (the second operand) is a general-purpose register or memory location. The destination is an XMM register Bits (MAX_VL-1:64) of the corresponding destination register remain unchanged.
VEX.128 and EVEX encoded versions: The “convert-from” source operand (the third operand) can be a general-purpose register or a memory location. The first source and destination operands are XMM registers. Bits (127:64) of the XMM register destination are copied from the corresponding bits in the first source operand. Bits (MAX_VL-1:128) of the destination register are zeroed.
EVEX.W0 version: attempt to encode this instruction with EVEX embedded rounding is ignored.
VEX.W1 and EVEX.W1 versions: promotes the instruction to use 64-bit input value in 64-bit mode.
Software should ensure VCVTSI2SD is encoded with VEX.L=0. Encoding VCVTSI2SD with VEX.L=1 may encounter unpredictable behavior across different processor generations.
VCVTSI2SD (EVEX encoded version)
IF (SRC2 *is register*) AND (EVEX.b = 1) THEN SET_RM(EVEX.RC); ELSE SET_RM(MXCSR.RM); FI; IF 64-Bit Mode And OperandSize = 64 THEN DEST[63:0] (cid:197) Convert_Integer_To_Double_Precision_Floating_Point(SRC2[63:0]); ELSE DEST[63:0] (cid:197) Convert_Integer_To_Double_Precision_Floating_Point(SRC2[31:0]); FI; DEST[127:64] (cid:197) SRC1[127:64] DEST[MAX_VL-1:128] (cid:197) 0
VCVTSI2SD (VEX.128 encoded version)
IF 64-Bit Mode And OperandSize = 64 THEN DEST[63:0] (cid:197)Convert_Integer_To_Double_Precision_Floating_Point(SRC2[63:0]); ELSE DEST[63:0] (cid:197)Convert_Integer_To_Double_Precision_Floating_Point(SRC2[31:0]); FI; DEST[127:64] (cid:197)SRC1[127:64] DEST[MAX_VL-1:128] (cid:197)0
CVTSI2SD
IF 64-Bit Mode And OperandSize = 64 THEN DEST[63:0] (cid:197)Convert_Integer_To_Double_Precision_Floating_Point(SRC[63:0]); ELSE DEST[63:0] (cid:197)Convert_Integer_To_Double_Precision_Floating_Point(SRC[31:0]); FI; DEST[MAX_VL-1:64] (Unmodified)
VCVTSI2SD __m128d _mm_cvti32_sd(__m128d s, int a);
VCVTSI2SD __m128d _mm_cvt_roundi32_sd(__m128d s, int a, int r);
VCVTSI2SD __m128d _mm_cvti64_sd(__m128d s, __int64 a);
VCVTSI2SD __m128d _mm_cvt_roundi64_sd(__m128d s, __int64 a, int r);
CVTSI2SD __m128d _mm_cvtsi64_sd(__m128d s, __int64 a);
CVTSI2SD __m128d_mm_cvtsi32_sd(__m128d a, int b)
Precision
| VEX-encoded instructions, see Exceptions Type 3 if W1, else Type 5. |
| EVEX-encoded instructions, see Exceptions Type E3NF if W1, else Type E10NF. |


Shane was excited to open his birthday presents. He got lots of new furniture for his room, including his very own "tuffet." He likes to sit on his tuffet with his "thinking cap" on and read. Grandma Connie and Papa Morris came to visit Shane for his birthday.  Shane also got a new bike with "six gears."
Shane wearing thinking cap with battery-powered jet engine in kitchen Shane wearing thinking cap with thomas train in kitchen Shane, Nina, and Maya playing with trains Shane wearing thinking cap, sitting on tuffet in his room Shane at his desk in his room Morris and Shane opening birthday presents Connie, Morris, Shane Shane and Chuck with birthday cake Shane with birthday cake Shane riding new bike Shane riding new bike Shane, Maya, Nina with K'Nex roller coaster Shane with K'Nex roller coaster
We went to the zoo so Shane could see a real live orangutan since he was writing a report on orangutans. Shane kept turning his head so his stitches wouldn't show up in mom's photos. (Shane got seven stitches on the eyebrow after colliding with a stone wall on his bike).
Shane, Nina, Maya at Pittsburgh zoo Shane at Pittsburgh zoo aquarium Shane on giant slide at Pittsburgh zoo Maya, Nina, Shane on turtle at Pittsburgh zoo Shane and Nina running in backyard Shane with K'Nex roller coaster
Shane's class did a series of short plays in their classroom. Shane played a fox.
School play - Julia, Carma, Maya, Shane Shane at school School play - Ethan, Julia, Shane
We got a new bench for our front porch. Shane liked the box it came in. Mom brought back EFF t-shirts for everyone from the EFF board meeting.
Shane in bench box Shane drawing in kitchen Shane and Nina on stairs Nina, Maya, and Shane wearing EFF t-shirts Lorrie, Nina, Maya, and Shane wearing EFF t-shirts
We went to visit Grandma Judy and Papa Mike. Shane really liked Papa Mike's trains.
Shane, Maya, Nina, and Grandma Judy in train room Shane in train room Papa Mike, Nina, Judy, Shane, and Maya in train room Shane in train room Shane and Maya in train room Shane, Maya, Grandma Judy, and Papa Mike playing with trains
Shane likes to splash his sisters.
Shane and Nina playing in pool in grandma's backyard Shane, Maya, and Nina playing in pool in grandma's backyard Shane, Maya, and Nina playing in pool in grandma's backyard
Shane challenged Great Grandpa Bob to two games of chess. Great Grandma Gladys celebrated her 85th birthday.
Grandpa Bob and Shane playing chess Grandpa Bob and Shane playing chess Grandpa Bob and Shane playing chess Papa Mike, Grandpa Bob, Grandma Gladys, and Shane with 85th birthday cake
Shane brough Flat Stanley down to the train room for a picture.
Shane, Papa Mike, Maya, Grandma Judy, Nina, and Chuck with Flat Stanley and trains Shane with trains Shane with trains Papa Mike and Shane with Flat Stanley and trains
Shane enjoyed talking to Mom's friends at the SOUPS conference party.
SOUPS 2008 - Shane, Bekah, Nina, and Janice watch a movie before the SOUPS party
Shane discovered that building towers out of cards is harder than it looks. He enjoyed collecting corks and eating cake at Rob's graduation party.
Shane building card towers in his room Shane and Nina eating cake at Rob's graduation party
We went to visit Grandma Connie and Papa Morris in Keystone, Colorado.
Shane on airplane Shane climbing pirate ship on playground in Colorado Chuck, Connie, Nina, Morris, Shane, and Maya hiking in Colorado Shane in Colorado Shane with pinecone in Colorado Maya, Nina, and Shane digging on hike in Colorado Nina, Shane, and Maya digging in Colorado Maya, Shane, and Nina in Colorado Shane and Morris in paddle boat in Keystone Lake Morris, Connie, Shane, Nina, Maya, Chuck and Lorrie at Loveland pass Morris, Shane, Connie, Nina,Chuck, and Maya hiking at Loveland Pass Shane and Morris hiking at Loveland Pass Chuck, Maya, Nina, Shane, Morris, and Connie hiking at Loveland Pass Shane hiking at Loveland Pass NIna, Maya, Chuck, Morris, and Shane hiking at Loveland Pass Maya, Nina, and Shane hiking at Loveland Pass Shane hiking at Loveland Pass Shane and Morris hiking at Loveland Pass Shane hiking at Loveland Pass NIna, Lorrie, Chuck, Maya, Shane hiking at Loveland Pass Morris and Shane hiking at Loveland Pass Maya, Chuck, Nina, Lorrie, Shane hiking at Loveland Pass Morris, Shane, Maya, Chuck, Nina hiking at Loveland Pass Shane hiking at Loveland Pass Shane on River Run playground at Keystone Shane on River Run playground at Keystone Maya and Shane on River Run playground at Keystone Shane and Maya on River Run playground at Keystone Shane on snowboard at Keystone Shane and Chuck at lunch at Keystone Morris, Maya, Connie, Nina, Shane, and Chuck at lunch at Keystone Shane bungee jumping at Keystone Shane bungee jumping at Keystone Shane bungee jumping at Keystone Shane bungee jumping at Keystone Shane bungee jumping at Keystone Chuck and Shane biking at Keystone
Shane started second grade. He was a little disappointed that his school year starts earlier than anybody elses. His sisters, on the other hand, are jealous that Shane gets to go to school already.
Shane getting on the bus for the first day of second grade
Shane loves to read! His favorite books are Harry Potter books, but he will read anything he can get his hands on. Sometimes he reads to his sisters. Shane had a good time at the EPP picnic.
Shane reading to Nina and Maya Shane and Nina at EPP picnic
Everyone likes to play with fabric in Mom's sewing room.
Maya, Shane, and Nina in the sewing room Shane making quilts in sewing room Maya, Nina, and Shane in the sewing room
The block party was lots of fun!
Shane at the block party Shane at the block party
A wind storm knocked over a large tree on the next block. Our neighors lost power for several days. We lost our power only briefly.
Shane looks at tree that fell across the road Shane climbs on tree that fell across the road Maya, Nina, and Shane climb on tree that fell across the road
Grandma Judy and Papa Mike came to visit for Maya's birthday. Shane had a good time at Maya's party.
Shane baking honey cake with Grandma Judy Shane, Grandma Judy, Nina and Maya baking honey cake Shane, Grandma Judy, Nina and Maya baking honey cake Shane at Maya's birthday party Shane at Maya's birthday party Maya and Shane at Maya's birthday party Shane at Maya's birthday party
Grandma Connie and Papa Morris came to visit. We all watched the Great Race.
Nina, Connie, Chuck, Maya, Shane, and Morris watching the Great Race Nina, Connie, Chuck, Maya, Shane, and Morris watching the Great Race
The Cathedral of Learning was all lit up for a few weeks in celebration of Pittsburgh's 250th anniversary. We walked down there to check it out.
Shane, Maya and Nina in Schenley Plaza at night, on the way to see lights on Cathedral of Learning Shane with lights on Cathedral of Learning Chuck, Nina, Shane, and Maya with lights on Cathedral of Learning Chuck, Nina, Shane, and Maya with lights on Cathedral of Learning
We carved our pumpkins on Halloween and put on our costumes and went trick-or-treating. Shane was an apple tree. He was very pleased with his costume. He sorted all his candy and made a graph of how many he had of each variety.
Nina, Maya, and Shane with pumpkin in side yard Shane, Nina, Bekah, and Maya with pumpkin in side yard Maya, Shane, and Nina in Halloween constumes on front porch Shane in Halloween costume Shane in Halloween costume Shane in Halloween costume Shane in Halloween costume Shane in Halloween costume? Maya, Nina, Shane and Chuck with pumpkins on front porch Maya, Nina, and Shane on front porch in Halloween costumes Shane, Nina, and Maya trick-or-treating Shane, Nina, and Maya trick-or-treating Shane and Maya with candy after trick-or-treating Shane with candy after trick-or-treating Shane, Maya, and Nina with candy after trick-or-treating Shane with candy after trick-or-treating
Shane visited the Children's School on alumni visit day. He really liked the Snap Circuits.
Maya and Shane playing with snap circuits at school Shane playing with snap circuits at Childrens school
Shane likes to read while Maya is at Kinderkinetics. Everyone likes to play in Mom's sewing room, but sometimes she won't let anyone in.
Shane and Maya at Kinderkinetics Shane reading at kinderkinetics Maya, Nina and Shane looking into sewing room
Grandma Connie and Papa Morris came for Thanksgiving. We baked pumpkin muffins. Janice and Rich stopped by to play with us.
Shane, Lorrie, and Nina cooking in the kitchen Maya, Lorrie, Shane, and Nina cooking in the kitchen Rich picking up Shane and Maya Shane and Morris playing chess Shane, Connie, Maya and Nina in the kitchen
After Grandma left we had to figure out how to entertain ourselves for the rest of the long Thanksgiving weekend. We decided to go see our neighborhood dinosaurs and do an art project at the Carnegie Museum.
Shane at dinosaur museum Nina, Maya and Shane doing art project at Carnegie Museum Shane doing art project at Carnegie Museum Shane showing off his art project at Carnegie Museum Chuck, Maya, Nina, and Shane at Life on Mars exhibit at Carnegie Museum Shane at Life on Mars exhibit at Carnegie Museum
We had a fun time at the CyLab holiday party. Shane made his own gingerbread house. He won the prize for the best house made by a kid.
CyLab Holiday Party at Schenley Park Ice Rink banquet hall - Shane CyLab Holiday Party at Schenley Park Ice Rink banquet hall - Shane CyLab Holiday Party at Schenley Park Ice Rink banquet hall - Kiki, Brandon, Chuck, Shane, Rich, Maya CyLab Holiday Party at Schenley Park Ice Rink banquet hall - Janice, Shane
Mom took 500 photos to try to get a few good ones for our holiday card. Everyone got a little silly towards the end.
Maya, Nina and Shane - silly - posing for holiday card photos Maya, Nina and Shane - posing for holiday card photos Maya, Nina and Shane - silly - posing for holiday card photos Maya, Nina and Shane - posing for holiday card photos Shane and Maya - posing for holiday card photos Maya, Nina and Shane - posing for holiday card photos Maya, Nina and Shane - silly - posing for holiday card photos Maya, Nina and Shane - silly - posing for holiday card photos Maya, Nina and Shane - posing for holiday card photos Maya, Nina and Shane - silly - posing for holiday card photos Maya, Nina and Shane - silly - posing for holiday card photos Shane portrait - posing for holiday card photos Shane portrait - silly - posing for holiday card photos Shane portrait - posing for holiday card photos Shane portrait - with paper airplane - posing for holiday card photos Shane and Nina - silly - posing for holiday card photos Shane and Nina - silly - posing for holiday card photos Shane and Nina - silly - posing for holiday card photos Maya and Shane - posing for holiday card photos
We made another gingerbread house at Julie's gingerbread house party.
Maya and Shane with our gingerbread house at Julie's gingerbread house party Shane with our gingerbread house at Julie's gingerbread house party
Shane went to the Children's School 40th Anniversary Gala and saw all his old teachers.
CMU Children's School 40th Anniversary Gala - Nina and Shane CMU Children's School 40th Anniversary Gala - Shane, Maya, and Nina with Mr. and Mrs. Bird
We went to Maryland for winter break. First stop was Grandma Connie's house for Christmas. We had a good time playing with our cousins. Shane got to feed a baby cow.
NIna, Maya, and Shane in PJs with Chirstmas stockings Shane, Justin, Maya, Eric, and Nina in front of Christmas tree Shane, Justin, Maya, Eric, and Nina in front of Christmas tree Shane, Justin, Eric and Nina opening presents Justin and Shane opening presents Morris, Jeff, Nina, Eric, Shane opening presents Eric, Justin, Shane, Nina, Maya, and Connie opening presents Justin, Jeff, Morris, Chuck, and Shane eating Christmas dinner Eric, Maya, Nina, Justin, and Shane
Lorrie, Chuck, Ginny, Jeff, Connie, Morris, Shane, Eric, Justin, Nina and Maya the day after Christmas at Connie and Morris' house Shane feeding baby cow
The next stop was Grandma Judy's house. We went to the Smithsonian and took a ride on the merry-go-round on the mall. We had a Hanukkah party and played with more cousins. We made a nice chocolate dessert for New Year's Eve, but Shane couldn't last until midnight. Shane enjoyed playing with Grandma's Wii.
Shane at "The American Presidency" exhibit at Smithsonian Museum of American History Shane and Nina on Washington, DC mall Judy, Nina, Shane, and Mike on Washington, DC mall Judy, Nina, Shane, and Mike on Washington, DC mall
Judy, Mike, Shane, Bob, Gladys, Amy, Nina, Chuck, Amber, and Emma at Hannukah party Benny and Shane playiing chess at Hannukah party
Benny, Shane, and Jeremy playing with Legos in basement Shane, Maya, Nina and Judy playing with trains Shane and Jeremy playing with legos in basement
Shane asleep at midnight on New Year's Eve Shane asleep at midnight on New Year's Eve - no, really, don't bother me Jeremy and Shane playing chess Emma, Nina, Maya, Benny and Shane Maya, Benny and Shane Shane, Nina, Maya, Amber, Emma, and Benny in PJs on couch Mike, Nina, Jere, and Benny playing with the Wii while Shane and Gertie watch Maya and Shane Wii bowling
Privacy policy
This page maintained by Shane's Mom


# with
Compile time with for strict mode JavaScript
[![build status](https://secure.travis-ci.org/ForbesLindesay/with.png)](http://travis-ci.org/ForbesLindesay/with) [![Dependency Status](https://gemnasium.com/ForbesLindesay/with.png)](https://gemnasium.com/ForbesLindesay/with) [![NPM version](https://badge.fury.io/js/with.png)](http://badge.fury.io/js/with)
## Installation
$ npm install with
## Usage
```js var addWith = require(‘with’)
addWith(‘obj’, ‘console.log(a)’) // => “var a = obj.a;console.log(a)”
addWith(“obj || {}”, “console.log(helper(a))”, [“helper”]) // => var locals = (obj || {}),a = locals.a;console.log(helper(a)) ```
## API
### addWith(obj, src, [exclude], [environments])
The idea is that this is roughly equivallent to:
src
}¶
There are a few differences though. For starters, it will be assumed that all variables used in src come from obj so any that don’t (e.g. template helpers) need to have their names parsed to exclude as an array. If you want to have browser globals available you can pass a collection of environments, e.g.
`js
addWith('obj', 'document.createElement(foo)', [], ['reservedVars', 'ecmaIdentifiers', 'nonstandard', 'browser'])
`
The default environment is: [‘reservedVars’, ‘ecmaIdentifiers’, ‘nonstandard’, ‘node’]
It also makes everything be declared, so you can always do:
`js
if (foo === undefined)
`
instead of
`js
if (typeof foo === 'undefined')
`
It is also safe to use in strict mode (unlike with) and it minifies properly (with disables virtually all minification).
## License
MIT


---
sort_order: 180
tei_id: rdx_b5j2m.p.idm189590864
annotation_count: 0
images:
small-thumbnail: http://readux.library.emory.edu/books/emory:b5j2m/pages/emory:p79h5/mini-thumbnail/
json: http://readux.library.emory.edu/books/emory:b5j2m/pages/emory:p79h5/info/
full: http://readux.library.emory.edu/books/emory:b5j2m/pages/emory:p79h5/fs/
page: http://readux.library.emory.edu/books/emory:b5j2m/pages/emory:p79h5/single-page/
thumbnail: http://readux.library.emory.edu/books/emory:b5j2m/pages/emory:p79h5/thumbnail/
title: Page 180
number: 180
---
{% raw %}CHAPTER XXVIII.{% endraw %}
{% raw %}FUGITIVE SLAVES ENLISTING IN THE STATES.{% endraw %}
{% raw %}TAKING UP ARMS FOR MY COUNTRY.—CIVIL WAR IN AMERICA.--{% endraw %}
{% raw %}RISK OF IMPRISONMENT FOR SEVEN YEARS.—SPECIAL PROVI¬{% endraw %}
{% raw %}DENCE SAVES ME.{% endraw %}
{% raw %}During the Canadian rebellion I was appointed{% endraw %}
{% raw %}a captain to the 2nd Essex Company of{% endraw %}
{% raw %}Coloured Volunteers. Though I could not shoulder{% endraw %}
{% raw %}a musket, I could carry a sword. My company held{% endraw %}
{% raw %}Fort Malvern from Christmas till the following{% endraw %}
{% raw %}May, and also took the schooner Ann and cap¬{% endraw %}
{% raw %}tured all it carried, which were three hundred{% endraw %}
{% raw %}arms, two cannons, musketry, and provisions for the{% endraw %}
{% raw %}rebel troops. This was a fierce and gallant action,{% endraw %}
{% raw %}and it did much towards breaking up the rebel party,{% endraw %}
{% raw %}for they could not obtain provisions while we held{% endraw %}
{% raw %}the fort, which we continued to do till we were re¬{% endraw %}
{% raw %}lieved by the colonel of the 44th Regiment from{% endraw %}
{% raw %}England. The coloured men were willing to hel]>{% endraw %}
{% raw %}defend the government that had given them a home{% endraw %}
{% raw %}when they had fled from slavery.{% endraw %}
{% raw %}My sword had been turned into a ploughshare.{% endraw %}
{% raw %}When the civil war in America broke out, somehow{% endraw %}
{% raw %}the coloured people in Canada had an idea that the{% endraw %}
{% raw %}result of it wculd be the abolition of slavery. If I{% endraw %}


@(params: Map[String, Any]) @uk.gov.hmrc.hmrcemailrenderer.templates.helpers.html.template_main(params, "Sign up complete") {
Dear Agent
You have signed up your client to use software to submit their VAT Returns.
You must tell your client that you have signed them up for this trial.
What happens next
Your client can view their VAT Return deadlines in their accounting software or business tax account.
From HMRC Digital
}


We're sorry but Ommpa Loompa's doesn't work properly without JavaScript enabled. Please enable it to continue.


#include "_doctype.html"
We previously provided downloads from a number of mirrors spread out over the globe. These days the curl site itself is distributed world wide. #include "_footer.html"


In 1985 the first domain suffix “.com” was claimed. A domain suffix is the last part of a domain ”.com”. It can help identify the organisation the site is linked to e.g companies have .com, education institutions have .edu and education institutions based in australia will have edu.au. This helps people identify both https://www.sydney.edu.au/ and https://www.uts.edu.au/ as australian education institutions and the remainder of the domain tell you that they are different australian education institutions As webpages did not exist until 1991 domain suffix were mostly useful for emailing before that.
In 1990 Alan Emtage created the first search engine and called it Archie. Search engines try to understand and categorise the content on a web page so that a user can provide keywords that the search engine can then provide ranked matches for. Before search engines a user would need to know the site they wanted to go to. (‘Search Engine History’, 2006 - 2017)
In 1991 the World Wide Web became available to the public. It was created by Tim Berners-Lee. Berners-Lee posted a summary of the project on the alt.hypertext newsgroup. This started the internet as we know it. It would fundamentally change the world. The World Wide Web’s technology was founded on what Berners-Lee did at CERN in the 80s with the European Organization for Nuclear Research. Berners-Lee was looking for a way to share information around the world without everyone that had access needing to be on the same hardware and software. (‘20 years ago today’, 2011 )
In 1997 wifi first released. The committee 802.11 was created. And from that IEEE802.11. This referred to a set of standards defining the communication for wireless. The basic specification for WiFi was created that allowed 2mb per second data transfers wirelessly between devices with the same WiFi specification. Then in 1999, WiFi was first introduced for personal home use. (‘The History of WiFi’, 2014)
On the 1st of June 1999 Napster was launched. It allowed people to share and access files without restriction. At its peak 57 million people were using Napster. On July 11, 2001, Napster shut down its entire network and has never been the same since. Napster played a pivotal role bringing the openness and anonymous nature of the internet into the mainstream conversation. (Napster, 2013)
Reference: Search Engine History is published by Aaron Wall. 2006 - 2017 http://www.searchenginehistory.com/ 20 years ago today, the World Wide Web was born - TNW Insider by Martin Bryant. 2011 https://thenextweb.com/insider/2011/08/06/20-years-ago-today-the-world-wide-web-opened-to-the-public/ The History of WiFi By Jessica Thomas. 2014 https://purple.ai/blogs/history-wifi/ Napster: the day the music was set free by Tom Lamont. 2013 https://www.theguardian.com/music/2013/feb/24/napster-music-free-file-sharing
Packets A packet is the information that is being passed around on the internet or any computer network. Each packet contains a physical MAC address (media access control address (every network connectable device needs a mac address)), IP (Internet Protocol) addresses, port numbers, packet number and the data. Packets are the information being passed around a network. Nothing happens on any network including the internet without them.
IP (Internet Protocol) addresses An unequal IP address is assigned to every device connected to the internet. If you didn’t have a unequal address no packets could get sent to you. IPV4 is a 128-bit address system with only 2 to the 32 available addresses. 2 to the 32 = 4,294,967,296 IPV6 is a 128-bit address system with only 2 to the 128 available addresses. 2to the 128 = 340,282,366,920,938,463,463,374,607,431,768,211,456 When it comes to IPV4 Most networks, like a home network only really have one device (a router) directly connected to the internet. This is not the case with IPV6. for better or for worse everything can be “directly” connected to the internet with IPV6
Routers and routing A router redirects the network traffic as it has been set up. On a typical home network the router can be seen as the mediator between the internal and the routers internal network. The LAN (Local area network) is all the devices connected to each other that you have control over. The WAN (wider area network) is all the devices on the other side of your router. The WAN is normally the internet and you have very little control over it. Routers and routing are an integral but of the internet. They are the web that connects all the devices and enables them to communicate with each other.
Routers do routing and have firewalls blocking unwanted traffic. An example of routing is a web serving computer on a home network. As the web serving computer is not directly connected to the WAN, the home networks router would have port forwarding enabled, it would send ports 80 (HTTP) and 443 (HTTPS) or whatever was needed from the WAN to the web serving computer’s LAN IP and visa versa.
This brings us nicely to DNS DNS simply is a way of connecting a registered domain name (google.com) that people understand to an IP that a computer understands(<IP_ADDRESS>). For people to be able to access the previously mentioned “web serving computer on a home network” There would need to be a registered domain linked with the WAN IP of the home network. Someone enters the domain into a browser and thanks to DNS they are directed to the unequal IP.
TCP (Transmission Control Protocol) TCP lets a device reliably send a packet to another device on the same network or on a different network. It is a direct connection between 2 devices. The information is not broadcast for all the devices on the network to deal with. Unlike UDP that broadcasts it to everything on the network. (The tcpip networking protocol suite)
HTTP (Hypertext Transfer Protocol) is basically most of the content you see on a website. %99 of the time any text you see on a website it is written in HTTP. HTTP is the base language that websites will be built in. HTTPS (Hypertext Transfer Protocol Secure) is HTTP with security. When you see a padlock icon on the left of the web address in your browser window you are using HTTPS. HTTPS creates an encrypted connection between your browser and the server you are connected to. Communication is securely being transferred between the browser and Server. You still need to trust the server but you know that information is getting to it without anything eavesdropping.
A web browser is an application installed on a device that a client uses to request information from a server. When the browser receives the information it can then render a webpage. Most of these webpages are on the world wide web but not necessarily. Modern browsers can also run their own applications called extensions. Modern browsers can also open many common files like pdf. Modern browsers can also have developer tools that let you inspect a webpage and edit the locally stored copy of it.
The TCP/IP Networking Protocol Suite - dummies by dummies.com https://www.dummies.com/programming/networking/the-tcpip-networking-protocol-suite/
An array is a data structure that lists data and indexes each item starting from 0. For example, trump_array = [“person”, “woman”, “man”, “camera”, “tv”] “Person” is in array index 0 and “tv” is in array index 4. The command “puts = trump_array[3]” would result in printing the string “camera”.
A binary tree is data structured where data is in a node. Each node also holds data as to whether it has a left and or right child node. Each node cannot have more than 2 child nodes. The first node is called the root. A node with no children is called a leaf. If searching for a letter in an array of all the letters in the alphabet. The search would not be efficient as there are up to 26 searches made as it only returns ( = ) or ( not=). If instead the alphabet letters were in a binary tree, the search can now get back ( < ), ( = ) or ( > ). It would get to the correct result much faster as the remaining items halve with each search.
A hash table is basically an Array but the index identifiers are replaced by a key. This means in a hash you find something by its key and not its index. If we had 2 arrays of personal details of 2 people. person1 = [“Tom”, “Smith”, “20021985”, “M”] person2 = [“Jane”, “Jones”, “14081987”, “F”] To get one of the values you need to know the index. If we used 2 hash tables the values now have keys pointing to them. The order doesn't matter. person1 = { "firstname" => "Tom", "lastname" => "Smith", "dob" => "20021985", "sex" => "M"} person2 = { "firstname" => "Jane", "dob" => "14081987", "sex" => "F", "lastname" => "Jones"} Now to get the values we can just use the keys.
A code interpreter directly executes instructions written in a programming language. It does not require the code to be compiled to machine language. VS code seems to be the industry standard code interpreter at the moment.
A code compiler takes code written in a programming language and converts it into another programing language or into an executable file
Developing code using an interpreter is ideal as you don't need to compile each time to see what happens. However most clients will not use interpreting programs to run the code you have written. They will most likely need a stand alone executable file or finished webpages.
C++ was released in 1985 and was considered at the time to be a high-level programming language. Now it is mostly considered low-level as newer languages with all their readability and creature comforts have come out.
C++ is still a long way away from the machine code that it will be boiled down to for processing. But it is not as easy to understand at first glance and newer more high-level language like ruby, python, C# and many others.
Pros:
C++ is similar to other languages in that if you were starting from scratch C++ would take you a long time to lear but if you already had experience in another common programming language your skill would be easily transferable.
C++ is used and loved by a lot of people. Online help files are accessible and easy to understand. C++ is active on forums like Stack Overflow and it will not take long to get a question you have answered.
C++ has a relatively small standard library. Basically it gives a programmer less restrictions in what they can do.
C++ is recognised as a very fast programing language most game were every millisecond counts ar programed in C++
Cons:
C++ Programming is complicated and with a small standard library someone new to programming will struggle to learn it.
A programmer will need for the most part do the memory management themselves as C++ does very little. Also adding to complex.
Many programming languages have custom operators. In C++ it is possible to redefine existing operators but creating a new operator is not possible.
C++ only has simple data types. A programmer will need to make their own or find a library if they want more.
No flexibility in syntax. so difficult for a programmer to write code in a readable way. (Pros and Cons of C++, 2018)
Python was created in 1991 and is a high-level programming language. Python seems to be the programming language of choice for data analytics in the research space. This is because it is easy to get started with and easy to put raw data in and get raw data out. Many Enterprise Application are also created in Python.
Pros:
Python Integrates with Enterprise Application for easy development of Web services. Python also has powerful control capabilities for C, C++ or Java via Jython. Python runs on all modern operating systems.
Python has large standard libraries which include things like string operations, Internet, web service tools, operating system interfaces and protocols. Lots of the widely used programming tasks are already in Python. This helps limit the length of code in Python.
Python has a great option for building scalable multi-protocol network applications. This is possible because of Python's process integration features, unit testing framework and enhanced control capabilities. All together they help Python's productivity and speed for most applications.
Cons:
Python programs tend to become used to its features and libraries that they can struggle with working or learning other languages.
Python runs with an interpreter and not a compiler, the step by step process of compilation and execution slow it down. Not everything needs to run very fast and Python will be fast enough for many applications.
Python is good for many desktop and server platforms, but does not work well in programming for mobile use.
Some Python developers say that it has many design restrictions. The final applications have errors popping up so even if it works fine more work needs to be done to get rid of the errors. (Pros and Cons of Python, 2018)
Reference: Pros and Cons of C++ Programming Language by Pros-Cons, 2018 https://www.pros-cons.net/pros-and-cons-of-c-programming-language/ Pros and Cons of Python Programming Language by Pros-Cons, 2018 https://www.pros-cons.net/pros-and-cons-of-python-programming-language/
An IT professional has an ethical and legal obligation to the use of any user’s personal information that they have access to only in the way that the user was informed their personal information would be used when it was collected.
A user agrees to what their data can be used for normally by checking an “I agree” checkbox on a large legal document they will never read. The ethical responsibility of any IT professional working with that personal information should be to minimise the divergence from the originally perceived use of their personal information by the user.
(section 17) (Summarised) A public sector agency holding personal information needs to make sure they are not using the information for something other than the purpose indicated to the individual when the information was collected. Exceptions. The individual has consented to other purpose. The other purpose directly related to the purpose indicated to the individual. The other purpose is necessary in the prevention or minimization of serious and imminent threat to the life or health of the individual that the information is about.
An IT professional may have access to information before the general public. They have an ethical and legal obligation to not engage in Insider Trading. They also have an ethical responsibility to whistle blow when they see people not acting in the way the law allows.
Volume 5 Chapter 7 Financial services and markets Part 7.10 Market misconduct and other prohibited conduct relating to financial products and financial services Division 3 The insider trading prohibitions Definition of Inside information Subdivision A—Preliminary 1042A Definitions (Summarised) Inside information is information that is not generally available to a reasonable person.
Definition of Inside trader Subdivision B The prohibited conduct Section 1043A (Summarised) A person (the insider) knows, or ought reasonably to know Inside information must not in any way apply for, acquire, or dispose of financial products. Also the insider must not, directly or indirectly, communicate the information, or cause the information to be communicated, to another person if the insider knows, or ought reasonably to know, that the other person would or would be likely to: Apply for, acquire, or dispose of financial products.
Reference: Privacy and Personal Information Protection Act 1998 No 133 Current version 1 March 2020 https://www.legislation.nsw.gov.au/view/html/inforce/current/act-1998-133#frnt-lt Federal legislation - Corporations Act 2001 Current version 28 September 2017 https://www.legislation.gov.au/Details/C2018C00424/Html/Volume_5#_Toc528572464
NewYork time Sept. 7, 2017 “Equifax, one of the three major consumer credit reporting agencies, said on Thursday that hackers had gained access to company data that potentially compromised sensitive information for 143 million American consumers, including Social Security numbers and driver’s license numbers.” ““On a scale of 1 to 10 in terms of risk to consumers, this is a 10,” said Avivah Litan, a fraud analyst at Gartner.” (Equifax Says Cyberattack May... 2017)
In this case much more was stolen then the Social Security numbers of almost half of the population of the USA.
What are Social Security numbers In 1936 the Social Security number was created by the Social Security Administration. It was created to track earnings of workers for Social Security benefits. Nowadays the Social Security number is used for many non Social Security things. Among other things it is used as an identity verification method for law enforcement, collecting child support payment and issuing credit. (Social Security Cards, 2005)
What could someone do if they have your Social Security number In the USA someone can use a Social Security number to get other personal information about the owner of that Social Security number. This is identity theft and they can then get loans and credit cards that the owner of that Social Security number would not know about until the debt collectors start calling. (Identity Theft and Your, 2017)
Identity theft. Almost 50% of the $1.8 billion dollars lost by individuals in the USA in 2018 was because of Identity theft in the form of “Credit card fraud—new accounts”. (Facts + Statistics: Identity theft, 2019-2020)
What could have been done to stop this from happening. In this case it was a failure to update a webserver with a security patch that fixed a known flaw. Keeping security patches up to date on systems that have access to so data. A web server needs to be able to display unencrypted information from a server for a user to be able to see it. So I guess the lesson is do your security updates. Although it seems strange for one web server patch to be the only thing between hackers and 143 million Social Security numbers. (U.S. Charges 4 Chinese… 2020)
IT security is important. It is tempting to cut corners or rely on other 3rd parties when it comes to your IT security due to tight deadlines and that fact that IT security is mostly invisible until it breaks. At every level of an organisation IT security needs to be taught about. During the development an application IT security should be thought about at every step. I think if this Equifax hack is going to be very useful for convincing them that post development support for IT security is a must.
Reference: Equifax Says Cyberattack May Have Affected 143 Million in the U.S. By Tara Siegel Bernard, Tiffany Hsu, Nicole Perlroth and Ron Lieber, 2017 https://www.nytimes.com/2017/09/07/business/equifax-cyberattack.html Social Security Cards: De Facto National Identification. By Jim Kouri, 2005 https://web.archive.org/web/20120629234649/http://www.americanchronicle.com/articles/view/3911 Identity Theft and Your Social Security Number. By The United States Social Security Administration, 2017 https://www.ssa.gov/pubs/EN-05-10064.pdf Facts + Statistics: Identity theft and cybercrime. By Insurance Information Institute, 2019-2020 https://www.iii.org/fact-statistic/facts-statistics-identity-theft-and-cybercrime U.S. Charges 4 Chinese Military Officers in 2017 Equifax Hack. By krebsonsecurity, 2020 https://krebsonsecurity.com/tag/equifax-breach/
Flow control lets us control the flow of a program. Using a loop makes the program go around and around for as long as we want. Using IF statements directs the program down one path or another. Using cases lets us specify what path we want the program to take if a specified case is fulfilled.
An example in ruby is the simple if statement.
This program gets a number from 1 to 5 from the user. We will use a “case” to point the flow of the program in 6 different directions and get 6 different results. print "please enter a number from 1 to 5 : " user_input = gets.tr('^1-5', '').to_i case user_input when 1 puts "Yellow" when 2 puts "Lime" when 3 puts "Pink" when 4 puts "Amber" when 5 puts "The quick brown fox jumps over the lazy dog" else puts "invalid input" end
Reference: Ruby flow control by Jan Bodnar, 2020 http://zetcode.com/lang/rubytutorial/flowcontrol/
Type coercion is the changing of data into another type of data (see next question). It is common to need to change a user's input from the default string to a number. We would need type coercion in order to do comparisons with known data. Let's say we ask a user for their date of birth in order to verify them. They enter “14101980” which is a string. If the DOB we have in the database is an integer then we need to type coercion the users input string into an integer before any comparisons can be made.
Data types are the allowable operations of values. Booleans - true or false Symbols - a lighter form of strings. They are preceded by a colon ( : ) Numbers - The main two types of numbers used are Integer and floats. An Integers is a whole number and a float needs to have a decimal point in it. Take the integer 24 and turn it into a float and you get 24.0 Strings - a string is made up of multiple characters. They are differentiated by being placed inside quotes. Arrays - an array can store multiple data items of all types. Items in an array are separated by a comma. Hashes - a is an array but stores key-value pairs instead. A key-value pair has a key and then a value e.g {“banana” => $1.5}
Data types in Ruby by educative, Undated https://www.educative.io/edpresso/data-types-in-ruby
In this situation the MVP would be likely to be. I have been given the word “food” but will use “dish” instead.
Add a dish to the menu. Edit availability The dish would need a name, Cost, availability, description, vegetarian status, gluten free status, vegan status and halal status. View order history
List of all available dishes with its cost and description ect.. Shopping cart. Payment facilities. Customer gets a booking number after ordering.
Print out of orders.
I think that the objects would be.
Menu
Dishes
Shopping carts
Orders
I feel like only Dishes and the Shopping cart should be classes because of their complexity. The Menu is a simple coalition of available dish attributes. The Orders are a simple list generated from a complicated Shopping cart. The Dishes are complex as they have lots of attributes that need to be set at the creation of the dish. Also we would want class functions like “Update availability” and “update price” The Shopping carts are complex because they need to be created with no dishes. They also need to update their cost and check dish availability with the server regularly. We would probably want additional class functions like “generate order” and all the functions needed to pay for shopping carts.
celsius = gets.tr('^0-9.', '').to_f fahrenheit = (celsius * 9 / 5) + 32 print "The result is: "
puts fahrenheit
#look for the first two elements that are out of order and swaps them arr = [5, 22, 29, 39, 19, 51, 78, 96, 84] i = 0 while (i < arr.size - 1 and arr[i] < arr[i + 1]) i = i + 1 end
m = arr[i] arr[i] = arr[i + 1]
arr[i + 1] = m puts arr
#Loop though numbers 1 to 100 (number)
#create set tester var set to 0
#for each number get all the numbers less then it -1 from 2 up. (divider) eg. we don't can want 1 or the number
#if number is divisible by divider with 0 remainder then get a tester score
#after the devider loop is all finished if a numbers tester score is 1 it is only devisable by itself and 1 becaus we start at 2. Print it
for i in (1..100) t = 0 for divider in (2..i) if i % divider == 0 t = t + 1 end end if t == 1 puts i end end
if raining = true and temperature < 15 puts "It’s wet and cold" elsif raining = false and temperature < 15 puts "It’s not raining but cold" elsif raining = false and temperature >= 15 puts "It’s warm but not raining" else puts "It’s warm and raining" end
remove largest possible allergie value from score until score == 0 each time a value is removed record allergie type
Create allergic_to array Create a Var=128 Create allergie list array Ask User for their score convert users_score to int
Create loop that runs 8 times find highest allergie types score that is > or = users_score using another loop Add removed allergie type to allergic_to take away allergie types score from users_score
If after 8 loops users_score is not = to 0 then tell user invalid score
Ask user if they want A: Select an allergie from the list and see if you are allergic to it or B: List all allergies or C: Quit
allergic_to = []
num = 128
allergies = ["cats", "pollen", "chocolate", "tomatoes", "strawberries", "shellfish", "peanuts", "eggs"]
puts clear
print "Enter your allergie score: "
users_score = gets.tr('^0-9', '').to_i
for i in (0..7)
if users_score >= num
allergic_to << i
users_score = users_score - num
end
num = num / 2
end
if users_score != 0
puts "invalid score"
exit
end
while true
puts clear
puts "How would you like the results?"
puts "A: Select an allergie from the list and see if you are allergic to it"
puts "or"
puts "B: List all allergies"
puts "or"
puts "C: Quit"
print "Please enter A, B or C: "
user_view = gets.chomp.upcase
if user_view == "A"
puts clear
go = 1
while go == 1
puts ""
puts "1.cats 2.pollen 3.chocolate 4.tomatoes 5.strawberries 6.shellfish 7.peanuts 8.eggs"
print "Enter the number next to the corresponding allergie or '9' to go back: "
user_select_num = (gets.tr('^0-9', '').to_i-1)
if user_select_num == 8
go = 0
else
len = (allergic_to.length()-1)
hit = 0
for i in (0..len)
if user_select_num == allergic_to[i]
hit = 1
puts clear
print "Yes you are allergic to "
puts allergies[user_select_num]
end
end
if hit == 0
puts clear
print "No you are not allergic to "
puts allergies[user_select_num]
end
end
end
elsif user_view == "B"
puts `clear`
print "You are allergic to: "
len = (allergic_to.length()-1)
for i in (0..len)
print allergies[allergic_to[i]]
if i != len
print ", "
end
end
puts "."
exit
elsif user_view == "C"
exit
else
puts "Invalid selection"
end
end