1. Introduction
Time is an illusion. Lunchtime doubly so.
The Hitchhiker's Guide to the Galaxy
Tick is a comprehensive Clojure(Script) library designed to make it easier to write programs that involve time and date calculations:
-
Functions to manipulating time, easily and succinctly (stable)
-
Powerful functions for slicing and dicing time intervals (stable)
-
Implementation of Allen’s interval algebra (alpha)
-
Support for iCalendar serialization (work-in-progress)
In many business domains, dates are as fundamental as numbers and strings. It’s often desirable to have date-heavy business logic portable across platforms. Tick supports both Clojure and ClojureScript, with an identical API.
Tick is implemented using (a very thin wrapper over) the api of java.time
and an understanding of the concepts behind java.time
will be very useful when working with tick,
because tick entities are java.time entities (Instant, LocalTime etc). Where tick doesn’t provide the api you need,
you can look at the java.time api to see if there alternatives. If you cannot find the help you need in the tick documentation, it
is quite likely that someone will have had the same query and had it resolved on Stack Overflow.
1.1. Status
tick.core (the main API)is stable. The namespaces under tick.alpha.*, such as tick.alpha.interval are alpha status. By alpha, we mean that the library’s API may change in future. Do let us know if you come across any unexpected behaviour or bugs anywhere in tick.
1.2. License
Tick is copyrighted by JUXT LTD. and licensed as free software under the open-source MIT License.
The MIT License (MIT) Copyright © 2016-2018 JUXT LTD. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.  IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
1.3. Comparison to other time libraries
Java 8 time
Java 8’s java.time
API is both influenced by, and an improvement on,
Joda Time.
Unlike older JDK dates and calendars, instances in
java.time
are immutable so can be considered values in Clojure. For this reason, there is no reason to wrap these values. Consequently, there is full interoperability between tick and java.time
. Where tick does not provide a part of java.time’s functionality,
java.time
can be called directly in either Clojure or Clojurescript.
|
Caution
|
Because tick is built on java.time , Clojure programs must run on Java 8 or higher.
|
clj-time and cljs-time
Most Clojure applications use clj-time
which is based on Joda
Time. However, cljs-time
objects are mutable goog.date objects which in turn wrap
JavaScript Date objects.
This works OK as a proxy for Instant, but is not a great foundation for local dates etc.
The author of cljs-time, Andrew McVeigh, has said he would ideally
move cljs-time
off goog.date
but is unlikely to do so at this
point. For one thing, there could be more than a few current users
relying on the JS Date nature of the cljs-time objects.
Taking a fresh look at the date/time landscape, we now have java.time (JSR-310) and implementations in both Java and Javascript and so it is possible to create tick, which combines the excellent JSR-310 with an expressive, cross-platform Clojure(Script) API.
For some use cases it is possible to write cross-platform code with clj/s-time, conditionally requiring clj-time or cljs-time in a cljc file. In our experience though, the fact that cljs-time doesn’t have complete fidelity with clj-time often comes to be a problem.
2. Setup
Get the latest from Clojars and
add to your project.clj
, build.boot
or deps.edn
.
There are some extra considerations when using tick from Clojurescript.
Here is a one-liner to drop into a node repl with tick:
clj -Sdeps '{:deps {org.clojure/clojurescript {:mvn/version "1.10.764" } tick/tick {:mvn/version "RELEASE"} }}' -m cljs.main -re node --repl
2.1. Serialization
There are many use cases for de/serialization of dates, including simply being able to copy and paste within the REPL. Tick bundles time-literals Clojure(Script) library, so having require’d tick, in your code or at the repl you can type
#time/period "P1D"
which is read as a java.time.Period (or js-joda Period in ClojureScript).
To avoid tick modifying the printer for java.time objects (if you already employ a custom set of literals for example), set the following jvm property
:jvm-opts ["-Dtick.time-literals.printing=false"]
To read and write edn data containing these literals in Clojure(Script) and for more information generally, see the tagged literals Readme
2.2. Clojurescript
Tick versions 0.4.24-alpha and up require minimum Clojurescript version of 1.10.741
Tick currently uses the js-joda library, which aims to replicate the three-ten-backport project.
There is a plan to move to the new platform Javascript Date API, called Temporal
NPM Setup
If you are using Shadow-cljs then there is no npm setup you need to do.
If you are using webpack (cljs :bundle option) in your build, first add the transitive npm dependencies to your package.json. Assuming you have tick in your deps.edn, from your project directory, run
clj -m cljs.main --install-deps
Now your package.json has the required npm libs added.
Non-NPM Setup
Add js-joda and js-joda-locale-en-us and js-joda-timezone to your dependencies.
Optional Timezone & Locale data for reducing build size
The use of timezones and locales is optional to allow a smaller build size. The way they are implemented in JsJoda means that they are accessed via side-effecting require
. This is ugly, but there is no other option available.
Minified, gzipped js-joda (what gets pulled in if you use anything of tick) is around 43k (or 205k unzipped). For comparison, a basic Cljs app with React is about 330k unzipped.
So by using Tick you might come close to doubling your build size!
But is that a problem? That depends, but really 330k is my no means small to start with, so likely for the majority of potential users it would not be an issue at all. cljc.java-time is pitted against another 'lightweight' Cljs date/time library in this experiement which shows a web app using it does not load more slowly and over multiple visits will download less data overall.
Moving the implementation to Tempo will mean the build includes only the compiled Clojurescript of tick itself.
Timezone is an extra 26k, and Locale (just en-US) is an extra 45k
Timezones
If you want to work with timezones, something like this, for example:
(tick/zone "Europe/London")
add the following require:
[tick.timezone]
Note that this is pulling in all of the history of timezones as well. If you don’t need historic data and you want to reduce build size, js-joda provides pre-build packages for just the more recent data.
Also note that in the tick.core ns is clock
which is initially set to the current default zone - whatever that happens to be at the time the ns is loaded. clock
is used for ambient where+now information such as when getting the current time. If no zone data has been loaded at the time tick.core is evaluated then the current default zone will be SYSTEM (see JsJoda docs for info). If you would rather the zone be a proper IANA zone, then after require’ing tick.timezone
(set! tick.core/*clock* (cljc.java-time.clock/system-default-zone))
for example. This avoids the need to ensure that tick.timezone is loaded before tick.core
Formatting & Parsing
If you want to create custom formatters from patterns, such as "dd MMM yyyy", add this require:
[tick.locale-en-us]
Locale data is needed for custom date formatters which need particular symbols, such as M for month. Due to the size and complexity of using the js-joda-locale, the authors of js-joda-locale have created prebuilt locale packages, for specific locales. en-US is one which is currently packaged for cljs and can be used as suggested above.
3. API
Tick provides the tick.core
namespace, containing the functions that make up the library’s stable API.
When you are using tick in programs, it is a recommended idiom that you require tick's api under the t
alias as follows:
(require '[tick.core :as t])
|
Caution
|
Try to restrict your use of tick to the tick.core namespace and tick.alpha.* namespaces.
Functions in other namespaces, which may not be marked private, are not part of the official API and could change.
|
4. Times & dates
In this chapter we introduce times & dates and how we can manipulate them.
4.1. Introduction
If we asked a stranger for the time they’d likely respond with the just time of day, for example, "a quarter to eight". It would be uncommon for them to tell you the date and timezone also, unless you asked for it. This is the same time that we learn to read as children, on analog watches and wall-clocks.
So let’s start with asking tick for the time of day, with the time
function. We demonstrate this with our first example:
To get the current time, call (t/time)
with no arguments:
(t/time)
|
Note
|
If you have enabled JavaScript, you’ll see a button labelled Eval on the right of the code snippet. Press this button to instruct your browser to evaluate the tick code and display the result. You can clear the result by pressing the button labelled Clr . Many of the code examples in this documentation can be evaluated like this.
|
But so we can continue with our time-telling story, let’s get a specific time of "a quarter to eight":
To get a specific time of day, call (t/time)
with a string argument:
(t/time "19:45")
If we wanted to know the name of the day today, we might ask "what’s the day today". In tick, we’d use the day
function.
We can get the name of the day today like this:
(t/day-of-week (t/today))
Or, even just:
(t/day-of-week)
Or, the day tomorrow:
(t/day-of-week (t/tomorrow))
The time "a-quarter-to-eight tomorrow" is useful, but if we wanted to record events we’d soon want to ask the date too. In tick, dates are specific calendar dates in the Gregorian calendar and include a day, month and year. We can ask the date with the date
function:
To get today’s date, we use the date
function without arguments:
(t/date)
Alternatively we can call today
:
(t/today)
|
Note
|
On the Java platform a tick date corresponds to a java.time.LocalDate instance, while in a JavaScript environment it corresponds to js-joda’s LocalDate .
|
Like with time
, we can get particular dates by calling date
with a
string argument:
To get June 21st (or 21st June! [1]) in 2018:
(t/date "2018-06-21")
Now we can ask for both time and date, we can combine them into a date-time.
We can use the function date-time
with no arguments to get the current time at the current date:
To get the current date-time, call t/date-time
with no arguments:
(t/date-time)
As with time
and date
, we can use a string argument with date-time
, as shown in Example 7.
To get the time of the Armistice of Compiègne, use ISO 8601:
(t/date-time "1918-11-11T11:00")
A date-time is the time at a specific location on a specific calendar date. Since noon is established as the point at which the Sun crosses the meridian, and since the Earth is spherical and rotating, noon is the same time for everyone. Consequently, the world is split into time-zones, each at an offset to Coordinated Universal Time (UTC).
If we wish to compare times in different places, we need to capture the local offset, as shown in Example 8.
The Armistice of Compiègne was agreed at 11:00 am Paris time. On November 11th, 1918, Paris was one hour ahead of UTC. To capture this offset we can use offset-date-time
:
(t/offset-date-time "1918-11-11T11:00:00+01:00")
There is a problem with using time offsets—they can change for a given time zone, especially since many time zones practice Daylight Savings Time (DST). To capture the actual time zone, rather than the offset in effect on a given date, we can use zoned-date-time
, as shown in Example 9.
The Armistice of Compiègne was agreed at 11:00 am Paris time.
In the summer, Paris time moves one hour forward for Daylight Savings Time (DST). Although Paris did use Daylight Savings Time in 1918, the clocks had already moved back (at midnight on 8th October). To capture the time zone, along with its various rules for calculating offsets, we can use zoned-date-time
:
(t/zoned-date-time
"1918-11-11T11:00:00Z[Europe/Paris]")
Rather than using offset-date-times and zoned-date-times, you should use instants when you want UTC-based date-times and don’t care about time-zones and 'local' time.
Since a zoned-date-time (and offset-date-time) captures the offset from UTC, we can convert these into instants, as show in Example 10.
|
Note
|
On the Java platform, an instant is a java.time.Instant and replaces the flawed java.util.Date . In a JavaScript environment, js-joda provides an identical class.
|
To convert an offset-date-time to an instant, call instant
:
For example:
(t/instant (t/offset-date-time "1918-11-11T11:00:00+01:00"))
If you want to get an instant representing the current time in UTC, call instant
without arguments.
To get the current instant, do this:
(t/instant)
Alternatively, you can just call now
:
(t/now)
If you do need a java.util.Date
or JavaScript Date, for instance, for interoperating with an existing library, use the inst
function.
To convert the current instant to an inst:
(t/inst (t/now))
In this case, the same could be achieved with the zero-argument form of inst
:
(t/inst)
That’s it for our introduction. Now we’ll return to constructing times and dates.
4.2. Construction
Time values are constructed with new-time
.
To create the time 11 o’clock am:
(t/new-time 11 0)
new-time
also has other forms to increase precision, for example, with seconds…
(t/new-time 23 59 59)
…and with nanoseconds
(t/new-time 23 59 59 999999)
Similarly, dates are constructed with new-date
, a function which has 3 forms. The first, and most common form, requires 3 arguments: the year, month and day (of the month).
JUXT was incorporated on March 22nd, 2013. We can create this date with new-date
like this:
(t/new-date 2013 3 22)
Likewise, year-months are constsructed from the year and the month:
(t/new-year-month 2013 3)
4.3. Reification
While t/time
and t/new-time
return a time, you may want to provide a date for that time later on. We can reify with t/on
and t/at
.
You can think of a time (or a date) as being a partially defined date-time.
If we have a date of 1918-11-11
, we can construct a date-time by giving the time of 11am with at
:
(-> (t/date "1918-11-11") (t/at "11:00"))
Alternatively, if we have the time we can add the date:
(-> (t/time "11:00") (t/on "1918-11-11"))
We can also use reification to provide the location, with in
. This
allows us to take a local date-time and produce either a
zoned-date-time or an offset-date-time.
To construct the zoned-date-time of the Armistice of Compiègne with time
, on
and in
:
(-> (t/time "11:00") (t/on "1918-11-11") (t/in "Europe/Paris"))
Alternatively, we can use t/offset-by
in place of t/in
, to produce an offset-date-time.
(-> (t/time "11:00") (t/on "1918-11-11") (t/offset-by 2))
4.4. Conversion
With instant
s, inst
s (java.util.Date
, JavaScript’s Date
),
zoned-date-time
s and offset-date-time
s, it’s easy to get stuck
with the wrong type. Therefore, tick provides functions to convert
between them.
To convert between any of these types, simply call the eponymous function corresponding to the destination type with the source type as an argument.
|
Caution
|
When converting between Instants (which are always UTC) and other data types, please be aware that current default zone of the browser or jvm will affect the result. |
For example:
(t/date (t/instant "1999-12-31T00:00:00Z"))
The result maybe be 1999-12-31
or not, depending on your browser timezone
(or timezone of the jvm).
To get the date (or other fields) from an Instant in UTC, we must first go via a UTC ZonedDateTime"
(->
(t/instant "1999-12-31T00:59:59Z")
(t/in "UTC")
(t/date))
To convert between an instant
and a zoned-date-time
:
(t/zoned-date-time (t/now))
To convert between a zoned-date-time
and an instant
:
(t/instant (t/zoned-date-time))
To convert between an instant
and an inst
:
(t/inst (t/now))
It’s also possible to convert from strings to their destination types, which will involve parsing the string in to its most appropriate type prior to conversion.
In Java, types are converted according to the rules in Table 1.
| Convert between | to instant | to offset-date-time | to zoned-date-time | to inst |
|---|---|---|---|---|
from instant |
identity |
|
|
|
from offset-date-time |
|
identity |
|
|
from zoned-date-time |
|
|
identity |
|
from inst |
|
|
|
identity |
from String |
parse |
|
|
parse, then |
4.5. Extraction
Culturally, we understand time via calendars and it is often desirable to extract certain fields from time values.
The day-of-week
function extracts the day (of the week) from a time value, such as date, as shown in Example 19.
(t/day-of-week (t/date "2018-07-09"))
(t/month (t/date "2018-07-09"))
(t/year (t/date "2018-07-09"))
Days of the week, and months of the year, are available as constants listed in Table 2.
| Tick | Java | JavaScript |
|---|---|---|
tick.core/MONDAY |
java.time.DayOfWeek.MONDAY |
DayOfWeek.MONDAY |
tick.core/TUESDAY |
java.time.DayOfWeek.TUESDAY |
DayOfWeek.TUESDAY |
tick.core/WEDNESDAY |
java.time.DayOfWeek.WEDNESDAY |
DayOfWeek.WEDNESDAY |
tick.core/THURSDAY |
java.time.DayOfWeek.THURSDAY |
DayOfWeek.THURSDAY |
tick.core/FRIDAY |
java.time.DayOfWeek.FRIDAY |
DayOfWeek.FRIDAY |
tick.core/SATURDAY |
java.time.DayOfWeek.SATURDAY |
DayOfWeek.SATURDAY |
tick.core/SUNDAY |
java.time.DayOfWeek.SUNDAY |
DayOfWeek.SUNDAY |
tick.core/JANUARY |
java.time.Month.JANUARY |
Month.JANUARY |
tick.core/FEBRUARY |
java.time.Month.FEBRUARY |
Month.FEBRUARY |
tick.core/MARCH |
java.time.Month.MARCH |
Month.MARCH |
tick.core/APRIL |
java.time.Month.APRIL |
Month.APRIL |
tick.core/MAY |
java.time.Month.MAY |
Month.MAY |
tick.core/JUNE |
java.time.Month.JUNE |
Month.JUNE |
tick.core/JULY |
java.time.Month.JULY |
Month.JULY |
tick.core/AUGUST |
java.time.Month.AUGUST |
Month.AUGUST |
tick.core/SEPTEMBER |
java.time.Month.SEPTEMBER |
Month.SEPTEMBER |
tick.core/OCTOBER |
java.time.Month.OCTOBER |
Month.OCTOBER |
tick.core/NOVEMBER |
java.time.Month.NOVEMBER |
Month.NOVEMBER |
tick.core/DECEMBER |
java.time.Month.DECEMBER |
Month.DECEMBER |
We can use these constants to compare with =
as shown in Example 20.
Is the date 2018-07-09 is a Monday?
(= (t/day-of-week (t/date "2018-07-09")) t/MONDAY)
But is the month May?
(= (t/month (t/date "2018-07-09")) t/MAY)
The ITimeLength
protocol provides functions to extract data from Durations & Periods.
Some examples
| Code | Description | (t/seconds (t/new-duration 10 :seconds)) |
|---|---|---|
Seconds of a Duration |
(t/nanos (t/new-duration 10 :seconds)) |
Nanos of a Duration |
4.6. Comparison
TBD
4.7. Modification
TBD
4.8. Truncation
TBD
5. Durations & periods
A Duration instance stores time as an amount of seconds, for example 5.999999999 seconds.
A Period instance stores amounts of years, months and days, for example -1 years, 20 months and 100 days
The javadocs refer to these entities as time-based and date-based, respectively.
The reason for having both representations is that the Period units are variable length (leap years, DST etc) but the time-based ones are not.
So for example a Duration of 48 hours will not the same span as a Period of 2 days in all contexts.
Note that threeten-extra has an additional PeriodDuration entity
5.1. Construction
| Code | Description | Return type |
|---|---|---|
(t/new-duration 1 :seconds) |
Duration of a second |
java.time.Duration |
(t/new-duration 100 :days) |
Duration of 100 days |
java.time.Duration |
(t/new-period 100 :days) |
Period of 100 days |
java.time.Period |
(t/new-period 2 :months) |
Period of 2 months |
java.time.Period |
Days, Months, Years…
Instances of other java.time
types are readily constructed with tick.
| Example | Description | Return type |
|---|---|---|
(day "mon") |
Monday |
java.time.DayOfWeek |
(month "August") |
August |
java.time.Month |
(month 12) |
December |
java.time.Month |
(year-month "2012-12") |
December 2012 |
java.time.YearMonth |
(year 1999) |
The year 1999 |
java.time.Year |
5.2. Derivation
-
Add durations to durations
You can use "between" to get durations and periods from instants and dates.
(t/between (t/new-date 2023 05 10) (t/new-date 2023 05 15)) ;; => #time/period "P5D"
(t/between #inst "2023-05-10" #inst "2023-05-15") ;; => #time/duration "PT120H"
5.3. Comparison
Tick implements the basic comparison functions =,<,>,⇐ and >= for durations:
(t/< (t/of-hours 5) (t/of-hours 10)) ;; => true
5.4. Misc
|
Note
|
TODO Don’t forget you can create zone-offsets from durations! |
|
Note
|
TODO Don’t forget you can create instants from durations - this is often needed when you get Unix times (e.g. JWT OAuth2 tokens) |
The problem with numeric times is that there are cases where the units
are in seconds and cases where milliseconds are used. If tick were
to convert numbers to times, it would be a source of confusion and
bugs if the units were not clear. For this reason, you cannot convert
numbers to times. However, you can first create the duration from the
number, specifying the units explicitly, and then convert the duration
to an instant
(or inst
).
(t/instant (t/new-duration<PHONE_NUMBER>048 :millis))
(t/inst (t/new-duration<PHONE_NUMBER> :seconds))
6. Clocks
In tick, clocks are used for getting the current time, in a given
time-zone. You should prefer using clocks to making direct calls to
(System/currentTimeMillis)
, because this then allows you and others
to plugin alternative clocks, perhaps for testing purposes.
You create a clock that tracks the current time.
(t/clock)
With an argument, you can fix a clock to always report a fixed time.
(t/clock "1999-12-31T23:59:59")
6.1. Construction
| Code | Description | Return type |
|---|---|---|
(t/clock) |
Return a clock that will always return the current time |
java.time.Clock |
6.2. Derivation
Just like times and dates, you can time-shift clocks forward and
backward using the >>
and <<
functions respectively.
Shift a clock to run 2 hours slow.
(t/<< (t/clock) (t/new-duration 2 :hours))
| Code | Description | Return type |
|---|---|---|
(t/<< (t/clock) (t/new-duration 2 :minutes)) |
Return a clock running 2 minutes slow |
java.time.Clock |
(t/>> (t/clock) (t/new-duration 2 :minutes)) |
Return a clock running 2 minutes fast |
java.time.Clock |
6.3. Mutable Clocks
Sometimes when testing it’s handy to have a mutable clock.
Tick does not provide that because there is already Mock Clock.
That is written in Java. A JS implementation would be possible to do.
6.4. Comparison
|
Note
|
TBD |
6.5. Atomic clocks?
In Clojure, an atom is a holder of a value at a particular time. Similarly, a tick atom is a clock holding the clock’s time, which is constantly changing.
You create this atom with (atom)
. Naturally, you can get the instant of the atom’s clock by dereferencing, e.g. @(atom)
user> (def clk (t/atom)) user> (println @clk) #object[java.time.Instant 0x2e014670 2018-02-28T07:52:52.302Z] (some time later) user> (println @clk) #object[java.time.Instant 0x6e5b1dca 2018-02-28T08:01:50.622Z]
You can also create an atom with a clock.
(let [clk (t/atom (t/clock))]
@clk)
| Code | Description | Return type |
|---|---|---|
(t/atom) |
Return a clock that tracks the current time |
java.time.Clock |
6.6. Substitution
A clock can be used to callibrate tick to a particular time and time-zone, if system defaults are not desired.
As I’m currently writing this in London, on my system I get the following when I use '(zone)'.
(t/zone) => #object[java.time.ZoneRegion 0x744a6545 "Europe/London"]
However, if we wanted to test in New York, we can set the clock to exist in that time-zone:
(t/with-clock (-> (t/clock) (t/in "America/New_York")) (t/zone)) => #object[java.time.ZoneRegion 0x5a9d412 "America/New_York"]
7. Intervals
In tick, an interval is a span of time defined by two points in time, the first being before the second.
Intervals are maps containing both a tick/beginning
and a tick/end
entry. This flexible design allows any Clojure map to be treated as an interval.
The start and end of an interval should have the same type.
Interval functions are currently alpha status and so reside in the tick.alpha.interval
namespace, rather than the
main tick.core
namespace.
For example, bring in the interval functions like so:
(require '[tick.alpha.interval :as t.i])
7.1. Construction
Obviously, the Clojure’s literal syntax for maps can be used to create intervals.
Here we use a literal map syntax to construct an interval representing the last 5 minutes of 2018 (in UTC).
{:tick/beginning (t/instant "2018-12-31T23:55:00Z")
:tick/end (t/instant "2019-01-01T00:00:00Z"})
Alternatively, we can use the t.i/new-interval
function which takes the two boundaries of the interval as its arguments.
(t.i/new-interval
(t/instant "2018-12-31T23:55:00Z")
(t/instant "2019-01-01T00:00:00Z"))
7.2. Derivation
Dates, months and years can also be considered to be themselves ranges, and can be converted to intervals with the t.i/bounds
function. The start and end are both inclusive. This means for example that the end
of one day meets
the start of the next day.
To return today as an interval:
(t.i/bounds (t/today))
The arguments to t.i/new-interval
do not have to be instants, they can be any time supported by tick.
To return a 2-day interval spanning midnight this morning to midnight two days from today:
(t.i/new-interval (t/today) (t/tomorrow))
7.3. Comparison
Two intervals can be compared against each other with the t.i/relation
function. Allen’s interval algebra tells us there are 13 possible relations between two intervals.
Consider the time-span represented by the word 'yesterday' and compare it to the time-span represented by the word 'tomorrow'. Since yesterday is before tomorrow, with a gap between them, we say that yesterday precedes tomorrow:
(t.i/relation (t/yesterday) (t/tomorrow))
If the two intervals touch each other, in the case of 'today' and 'tomorrow', then we say the first interval (today) meets the second interval (tomorrow).
(t.i/relation (t/today) (t/tomorrow))
To see other possible relations, use the slider in the diagram below to move the top interval along:
abc
7.4. Collections
It is often useful to group intervals into collections and have functions operate on those collections.
For example, you may want to gather together:
-
all the time intervals when you were working last week
-
system outages over a given period
-
public holidays and weekends this year
|
Note
|
Discuss ordered sequences of disjoint intervals. |
7.5. Demonstration
8. Calendars
8.1. Construction
8.2. Derivation
8.3. Comparison
9. Formatting
If it is de/serialization of java.time objects that is needed, then the time-literals library is the right tool for that.
Tick includes a small formatting api over that provided by jsr-310
In ClojureScript, require ns [tick.locale-en-us] to create custom formatters
(require '[tick.core :as t]) (t/format :iso-zoned-date-time (t/zoned-date-time)) (require '[tick.locale-en-us]) ; only need this require for custom format patterns ; and it's only needed for cljs, although the ns is cljc (t/format (t/formatter "yyyy-MMM-dd") (t/date))
10. Cookbook
10.1. Introduction
This cookbook aims to give some examples of tick being used in different circumstances ranging from the very basic usage to more complex examples.
10.2. Times & dates
Tick is flexible with the way in which times and dates are created; ergo, increasing efficiency. Times and dates can be easily stripped down to smaller modules of time, likewise they can be built up into complete instants.
|
Caution
|
Extracting the date from an Instant (or other fields, such as time) you will get a local result. |
For example:
(t/date (t/instant "1999-12-31T00:59:59Z"))
The result maybe be #time/date"1999-12-31"
or not, depending on your browser timezone
(or timezone of the jvm).
To get the date (or other fields) from an Instant in UTC, we must first go via a UTC ZonedDateTime"
(->
(t/instant "1999-12-31T00:59:59Z")
(t/in "UTC")
(t/date))
Create time
A specific time can be produced in multiple ways with varying degrees of precision:
(t/time "12:34")
(t/time "12:34:56.789")
(t/new-time 12 34)
(t/new-time 12 34 56 789000000)
Get the time
To get the current time:
(t/time)
(t/new-time)
Or the time from an instant:
(t/time (t/instant "1999-12-31T00:59:59Z"))
Get the current time in another time-zone:
(t/time (t/in (t/now) "Australia/Darwin"))
Get a specific unit of time:
(t/hour (t/instant "1999-12-31T23:59:59Z"))
(t/minute (t/instant "1999-12-31T23:59:59Z"))
(t/second (t/instant "1999-12-31T23:59:59Z"))
Create a date
Creating dates is done in much the same way as creating time.
(t/date "2000-01-01")
(t/new-date 2000 01 01)
Get the date
To get the current date:
(t/date)
(t/new-date)
Or the date from an instant:
(t/date (t/instant "1999-12-31T23:59:59Z"))
Get the date in another time-zone:
(t/date (t/in (t/instant "1999-12-31T23:59:59Z") "Australia/Darwin"))
Get a specific part of the date:
(t/year (t/instant "1999-12-31T23:59:59Z"))
(t/month (t/instant "1999-12-31T23:59:59Z"))
(t/day-of-month (t/instant "1999-12-31T23:59:59Z"))
Build up times and dates
A unique feature of tick is that you can treat individual units of time as modular, making it easy to build up and break down time into components.
Break up an instant:
(defn instant-breakdown "Takes an instant of time and breaks it down into units." [t] {:day (t/day-of-week t) :month (t/month t) :dd (t/day-of-month t) :MM (t/int (t/month t)) :yyyy (t/int (t/year t)) :mm (t/minute t) :HH (t/hour t) :ss (t/second t)})
We can treat the individual units of time as building blocks:
| Time | Date | Zone | ||||||
|---|---|---|---|---|---|---|---|---|
(t/time) |
(t/date) |
(t/zone) |
||||||
(t/hour) |
(t/minute) |
(t/second) |
(t/year) |
(t/month) |
(t/day-of-month) |
- |
||
- |
- |
(t/millisecond) |
(t/microsecond) |
(t/nanosecond) |
- |
- |
- |
- |
Make up a time
If we want it to be half-past the current hour:
(t/new-time (t/hour (t/instant)) 30)
Or about lunch time:
(t/new-time 13 (t/minute (t/instant)))
Make up a date-time
(t/at (t/date "2018-01-01") (t/time "13:00"))
(t/on (t/time "13:00") (t/date "2018-01-01"))
(-> (t/tomorrow)
(t/at (t/midnight)))
(-> (t/noon)
(t/on (t/yesterday)))
Make up a Zoned-Date-Time
(-> (t/tomorrow)
(t/at (t/midnight))
(t/in "Europe/Paris"))
(-> (t/tomorrow)
(t/at (t/midnight))
(t/in (t/zone)))
Time and Date manipulation
Give a date a set time in the future:
(t/>> (t/date "2000-01-01") (t/new-period 1 :months))
(t/>> (t/date "2000-01-01") (t/new-period 4 :weeks))
(t/>> (t/date "2000-01-01") (t/new-period 30 :days))
(t/>> (t/date "2000-01-01") (t/+ (t/new-period 5 :days)
(t/new-period 1 :weeks)
(t/new-period 10 :months)))
Or past:
(t/<< (t/date "2000-01-01") (t/new-period 1 :years))
Move around in time:
(t/>> (t/time "12:00") (t/new-duration 5 :minutes))
(t/<< (t/time "12:00") (t/new-duration 5 :hours))
(t/>> (t/time "12:00") (t/+ (t/new-duration 5 :seconds)
(t/new-duration 5 :millis)
(t/new-duration 5 :micros)
(t/new-duration 5 :nanos)))
Increasing a time by a duration of day magnitude will leave the time
alone - 12:00
in 5 days is still 12:00
(ignoring daylight savings)
(t/>> (t/time "12:00") (t/new-duration 5 :days))
Truncate time to a desired precision:
(t/truncate (t/time "10:30:59.99") :minutes)
Give the am pm time:
(defn twelve-hour-time "Takes a time and gives the 12 hour display" [t] (let [minute (t/minute t) hour (t/hour t)] (cond (= (t/noon) t) "12:00 NOON" (>= hour 13) (format "%02d:%02d PM" (- hour 12) minute) (>= hour 12) (format "%02d:%02d PM" hour minute) (>= hour 1) (format "%02d:%02d AM" hour minute) (= hour 0) (format "12:%02d AM" minute))))
|
Note
|
"12 noon is by definition neither ante meridiem (before noon) nor post meridiem (after noon), then 12 a.m. refers to midnight at the start of the specified day (00:00) and 12 p.m. to midnight at the end of that day (24:00)" - NPL |
10.3. Instants and Inst
tick’s default convention is java.time.Instant
but caters for projects that use
java.util.Date
by the conversions above. It is recommended when using tick to
keep as an instant for as long as possible.
Creation
To get the current instant:
(t/instant)
(t/now)
Create a specific instant:
(t/instant "2000-01-01T00:00:00.001Z")
Conversions between Inst and Instant
Convert inst to and from instant:
(t/instant (t/inst))
(t/inst (t/instant))
10.4. Time Zones & Offset
Extract a zone from a java.time.ZonedDateTime
:
(t/zone (t/zoned-date-time "2000-01-01T00:00:00Z[Europe/Paris]"))
(t/zone)
Create a java.time.ZonedDateTime
in a particular time zone:
(t/in (t/instant "2000-01-01T00:00:00.00Z") "Australia/Darwin")
Give the OffsetDateTime
instead of ZonedDateTime
:
(t/offset-date-time (t/zoned-date-time "2000-01-01T00:00:00Z[Australia/Darwin]"))
Specify the offset for a LocalDateTime
:
(t/offset-by (t/date-time "2018-01-01T00:00") 9)
10.5. Intervals
An interval in time is a duration that has a specified beginning and end.
Create an interval
There are multiple ways an interval can be created in tick:
Specify the beginning and the end:
(t.i/new-interval (t/date-time "2000-01-01T00:00")
(t/date-time "2001-01-01T00:00"))
{:tick/beginning (t/date-time "2000-01-01T00:00")
:tick/end (t/date-time "2001-01-01T00:00")}
(t.i/bounds (t/year 2000))
All of the above result in the same interval:
(= (t.i/new-interval (t/date-time "2000-01-01T00:00")
(t/date-time "2001-01-01T00:00"))
(t.i/bounds (t/year 2000))
{:tick/beginning (t/date-time "2000-01-01T00:00")
:tick/end (t/date-time "2001-01-01T00:00")})
Interval Manipulation:
The duration of an interval can be modified using extend
.
Extend an instant to a interval
(t.i/extend (t/instant "2000-01-01T00:00:00.00Z")
(t/new-period 3 :weeks))
Extend an interval:
(t.i/extend (t.i/bounds (t/year 2000)) (t/new-period 1 :years))
Shorten an interval:
(t.i/extend (t.i/bounds (t/year 2000)) (t/new-period -1 :months))
The beginning of an interval can be modified whilst preserving the duration.
Shift the interval back in time:
(t/<< (t.i/bounds (t/year 2000)) (t/new-period 6 :months))
Or forward in time:
(t/>> (t.i/bounds (t/today)) (t/new-duration 1 :half-days))
10.6. Arithmetic & Shifting operations
The tick library lends itself to doing additions, subtractions and divisions of time chunks and durations. Below are some examples of how time can be treated as a quantity which can be operated on.
Note that the function to find the amount of time between two dates is t/between
. Using the legacy Date object it was common to get the epoch offset of two dates and subtract one from the other - so very much arithmetic. tick
however sticks to the java.time naming convention of between
. Also note that this epoch-offset arithmetic would only ever be applied to 2 dates, not 3, 4, 5 … For this reason, t/+
and t/-
only work for amounts of time, not dates, in that they can take more than 2 arguments, and so are analagous to their clojure.core equivalents.
Simple maths
Operating on an instant it will return another instant in time.
Shifting forward:
(t/>> (t/now)
(t/new-duration 15 :minutes))
Shifting backward:
(t/<< (t/now)
(t/new-duration 10 :days))
An interval has a beginning and an end, operating on it will return a modified interval.
Shifting interval end forward:
(t.i/extend {:tick/beginning (t/instant "2018-01-01T00:00:00.00Z")
:tick/end (t/instant "2018-01-10T00:00:00.00Z")}
(t/new-period 10 :weeks))
Shifting interval end backward:
(t.i/extend {:tick/beginning (t/instant "2018-01-01T00:00:00.00Z")
:tick/end (t/instant "2018-01-10T00:00:00.00Z")}
(t/new-duration -1 :days))
An interval can be divided into smaller intervals:
Divide the day by 24, to get hour long intervals:
(map #(apply t.i/new-interval %) (t.i/divide-by 24 {:tick/beginning (t/instant "2000-01-01T00:00:00.00Z") :tick/end (t/instant "2000-01-02T00:00:00.00Z")}))
Or just divide the day by a duration of 1 hour to get the same result:
(= (t.i/divide-by (t/new-duration 1 :hours)
{:tick/beginning (t/instant "2000-01-01T00:00:00.00Z")
:tick/end (t/instant "2000-01-02T00:00:00.00Z")})
(t.i/divide-by 24
{:tick/beginning (t/instant "2000-01-01T00:00:00.00Z")
:tick/end (t/instant "2000-01-02T00:00:00.00Z")}))
Durations can be treated like independent chunks of time. They can be extended, shrunk and divided.
Addition:
(t/+ (t/new-duration 1 :hours)
(t/new-duration 10 :minutes))
Subtraction:
(t/- (t/new-duration 1 :hours)
(t/new-duration 10 :minutes))
Division:
(t.i/divide (t/new-duration 1 :hours)
(t/new-duration 1 :minutes))
10.7. Countdown timers
Creating a countdown timer greatly depends on the length of time being counted and the accuracy required.

For longer durations, counting to high precision is unnecessary. If we are counting down the weeks, knowing how many seconds remain is for the most part meaningless.
(defn countdown-weeks [end-time] (let [duration (tick/duration {:tick/beginning (tick/instant) :tick/end end-time}) weeks (long (tick/divide duration (tick/new-duration 7 :days))) days (t/days (t/- duration (t/new-duration (* weeks 7) :days))) hours (tick/hours (tick/- duration (t/new-duration (+ days (* weeks 7)) :days)))] (if (tick/< (tick/instant) end-time) (format "%d weeks, %d days, %d hours" weeks days hours) "Time's up!")))
If you do not know the units of time that are going to be counted down, you may require a more general countdown function.
(defn countdown-generic "Gives a map of the countdown with units of time as keys." [end-time] (let [duration (tick/duration {:tick/beginning (tick/instant) :tick/end end-time}) weeks (long (tick/divide duration (tick/new-duration 7 :days))) days (t/days (t/- duration (t/new-duration (* weeks 7) :days))) hours (tick/hours (tick/- duration (t/new-duration (+ days (* weeks 7)) :days))) minutes (tick/minutes (tick/- duration (t/new-duration (+ days (* weeks 7)) :days) (t/new-duration hours :hours))) seconds (tick/seconds (tick/- duration (t/new-duration (+ days (* weeks 7)) :days) (t/new-duration hours :hours) (t/new-duration minutes :minutes))) millis (tick/millis (tick/- duration (t/new-duration (+ days (* weeks 7)) :days) (t/new-duration hours :hours) (t/new-duration minutes :minutes) (t/new-duration seconds :seconds)))] (if (tick/< (tick/instant) end-time) {:counting true :weeks weeks :days days :hours hours :minutes minutes :seconds seconds :milliseconds millis} {:counting false})))
It may be required that the time since an event is calculated. In this can be done in a very similar way to counting down:
(defn count-up "Gives the time since an event in the most appropriate units of time" [event] (let [duration (tick/duration {:tick/beginning event :tick/end (tick/instant)}) years (long (tick/divide duration (tick/new-duration 365 :days))) months (long (tick/divide duration (tick/new-duration (/ 365 12) :days))) weeks (long (tick/divide duration (tick/new-duration 7 :days)))] (cond (> (t/days duration) 365) (format "%d years" years) (and (<= (t/days duration) 365) (> (t/days duration) (/ 365 12))) (format "%d months" months) (and (<= (t/days duration) (/ 365 12)) (> (t/days duration) 7)) (format "%d weeks" weeks) (and (<= (t/days duration) 7) (> (t/days duration) 1)) (format "%d days" (t/days duration)) (and (<= (t/days duration) 1) (> (t/hours duration) 1)) (format "%d hours %d" (t/hours duration)) (and (<= (t/hours duration) 1) (> (t/minutes duration) 1)) (format "%d minutes %d" (t/minutes duration)) (and (<= (t/minutes duration) 1) (> (t/seconds duration) 1)) (format "%d seconds" (t/seconds duration)) (tick/< (tick/instant) event) "Event hasn't happened yet")))
|
Caution
|
These timers have lower accuracy at higher precisions - they do not account for leap seconds or years. |
10.8. Miscellaneous
These examples don’t have a home yet.
Check if an expiration has passed:
(let [expiry (t/instant "2018-01-01T00:00:00.00Z")]
(t/> (t/now)
expiry))
Return a sequence of dates between two given dates a with a specified jump between each.
For instance, to get a sequence of the first day of each month in a given year:
(let [intvl (t.i/bounds (t/year))]
(t/range
(t/beginning intvl)
(t/end intvl)
(t/new-period 1 :months)))
Get the time difference between two instances:
(t/between (t/now) (t/epoch))
10.9. Tick Reference
This section gives, in alphabetical order, examples of how to use each function in the tick api library.
+
- Sum amounts of time:
(t/+ (t/new-duration 10 :hours)
(t/new-duration 10 :minutes))
-
- Subtract amounts of time:
(t/- (t/new-duration 12 :hours)
(t/new-duration 10 :hours))
<<
- Go back in time a duration:
(t/<< (t/now) (t/new-period 10 :weeks))
>>
- Go forward in time a duration:
(t/>> (t/now) (t/new-duration 10 :hours))
<
- Before?
(t/< (t/instant "2000-01-01T00:00:00.00Z") (t/instant "2018-01-01T00:00:00.00Z"))
>
- After?
(t/> (t/instant "2000-01-01T00:00:00.00Z") (t/instant "2018-01-01T00:00:00.00Z"))
<=
- Before or same time?
(t/<= (t/instant "2000-01-01T00:00:00.00Z") (t/instant "2018-01-01T00:00:00.00Z"))
>=
- After or same time?
(t/>= (t/instant "2000-01-01T00:00:00.00Z") (t/instant "2018-01-01T00:00:00.00Z"))
ago
- Give the time a duration ago:
(t/ago (t/new-duration 1 :hours))
am
- Create an interval spanning the morning of a given date:
(t.i/am (t/date "2018-01-01"))
at
- Make date-time from a date (given date at
"time"):
(-> (t/date "2000-01-01") (t/at "00:00"))
atom
- Create an holder for the current time:
(let [clk (t/atom)]
(t/time @clk))
beginning
- Give the beginning of an interval:
(t/beginning (t/today))
between
- Give a value for the duration between two instances:
(t/between (t/instant "2000-01-01T00:00:00.00Z") (t/instant "2018-01-01T00:00:00.00Z"))
bounds
- Give the beginning and end of an interval:
(t.i/bounds (t/yesterday))
clock
- Create a system clock or fixed clock:
(t/clock)
(t/clock (t/instant "2018-01-01T00:00:00.00Z"))
coincident?
- Are two intervals the same?
(t/coincident? (t/today) (t/today))
complement
- Give the inverse of a list of intervals.
(t.i/complement [(t/instant "2010-01-01T00:00:00.00Z")
(t/instant "2010-02-01T00:00:00.00Z")
(t/instant "2010-03-01T00:00:00.00Z")])
concur
- Get the common interval (if any) of two intervals.
(t.i/concur (t/today) (t.i/new-interval (t/yesterday) (t/tomorrow)))
concurrencies
- A sequence of times when intervals overlap:
(t.i/concurrencies (t.i/pm (t/today)) (t.i/new-interval (t/today) (t/tomorrow)))
conj
- Return new collection with the original collection including a new date:
(t.i/conj [(t/yesterday) (t/today)] (t/tomorrow))
date
- Get the date:
(t/date)
(t/tomorrow)
(t/date (t/instant "2018-01-01T00:00:00.00Z"))
(t/date "2018-01-01")
date-time
- Get the date-time:
(t/date-time)
(t/date-time (t/instant "2018-01-01T00:00:00.00Z"))
(t/date-time "2018-01-01T00:00")
day-of-month
- Get the numerical day of the month:
(t/day-of-month)
(t/day-of-month "2018-01-01")
(t/day-of-month (t/tomorrow))
(t/day-of-month (t/instant "2018-01-01T00:00:00.00Z"))
day-of-week
- Get the day of the week
(t/day-of-week)
(t/day-of-week (t/yesterday))
(t/day-of-week (t/instant "2018-01-01T00:00:00.00Z"))
(t/day-of-week "2018-01-01")
days
- Convert a duration into days
(t/days (t/new-duration 24 :hours))
dec
- Give the previous year:
(t/dec (t/year))
difference
- Return the first collection without the second collection elements.
(t.i/difference [(t/yesterday) (t/today) (t/tomorrow)] [(t/today)])
divide
- Divide a duration by another duration:
(t.i/divide (t/new-duration 1 :days) (t/new-duration 1 :hours))
divide-by
- Split an interval into even sections of time:
(t.i/divide-by 10 {:tick/beginning (t/instant "2018-01-01T00:00:00.00Z")
:tick/end (t/instant "2018-01-10T00:00:00.00Z")})
duration
- Give the duration of an interval:
(t/duration {:tick/beginning (t/instant "2018-01-01T00:00:00.00Z")
:tick/end (t/instant "2018-01-10T00:00:00.00Z")})
end
- Give the end instance of an interval:
(t/end {:tick/beginning (t/instant "2018-01-01T00:00:00.00Z")
:tick/end (t/instant "2018-01-10T00:00:00.00Z")})
epoch
- Give the epoch:
(t/epoch)
extend
- Extend an interval by a duration:
(t.i/extend {:tick/beginning (t/instant "2018-01-01T00:00:00.00Z")
:tick/end (t/instant "2018-01-10T00:00:00.00Z")}
(t/new-period 10 :weeks))
fields
- Get the field for a given time value:
(t/fields (t/time))
group-by
- Group a collection of intervals by a given function.
(t.i/group-by t/year
(map #(apply t.i/new-interval %)
(t.i/divide-by (t/new-duration 1 :days)
(t.i/new-interval (t/new-date 2000 12 29)
(t/new-date 2001 1 2)))))
hence
- Return an instant 15 minutes from now:
(t/hence (t/new-duration 15 :minutes))
hour
- Give the hour of the day:
(t/hour (t/now))
hours
- Give a duration in hours:
(t/hours (t/new-duration 2 :days))
in
- Give an instance in a time zone:
(t/in (t/instant "2018-01-01T10:00:00.00Z") "Australia/Darwin")
inc
- Give the next year:
(t/inc (t/year))
inst
- Convert to java.util.Date
:
(t/inst)
(t/inst (t/instant "2018-01-01T00:00:00.00Z"))
instant
- Convert to java.time.Instant
:
(t/instant (t/inst))
(t/instant (t/zoned-date-time "2018-01-01T00:00:00.000+09:30[Australia/Darwin]"))
int
- Give the year as an integer:
(t/int (t/year))
intersection
- Give the intersection of two sequences:
(t.i/intersection [(t/year)]
[(t/date "2019-01-01")
(t/date "2020-01-01")
(t/date "2021-01-01")])
intersects?
- Does an interval intersect with another? Return nil
if not, or the intersection if so.
(t.i/intersects? [(t/year)]
(t/inc (t/year)))
(t.i/intersects? [(t/year)]
(t/today))
long
- return an instant as a long:
(t/long (t/instant))
max
- Give the last chronological date from multiple unordered dates:
(t/max (t/today) (t/tomorrow) (t/yesterday) (t/new-date 2018 11 11))
micros
- Give a duration in microseconds:
(t/micros (t/new-duration 5 :minutes))
microsecond
- Give the microsecond of an instant:
(t/microsecond (t/now))
midnight
- Time at midnight:
(t/midnight)
midnight?
- Is it midnight?
(t/midnight? (t/date-time))
millis
- Give a duration in milliseconds:
(t/millis (t/new-duration 5 :minutes))
millisecond
- Give the millisecond of an instant.
(t/millisecond (t/now))
min
- Give the first chronological date from an unordered list of dates:
(t/min (t/today) (t/tomorrow) (t/yesterday) (t/new-date 2018 11 11))
minutes
- Give a duration in minutes:
(t/minutes (t/new-duration 5 :hours))
minute
- Give the minute of an instant:
(t/minute (t/now))
month
- Get the month:
(t/month)
(t/month "2018-11-11")
months
- Get the number of months in a duration:
(t/months (t/new-period 10 :months))
nanos
- Get the number of nanoseconds in a duration:
(t/nanos (t/new-duration 5 :minutes))
nanosecond
- Get the nanosecond of the time:
(t/nanosecond (t/now))
new-date
- Created a new java.time.LocalDate
(t/new-date 2000 01 01)
(t/new-date)
t/new-duration
- Create a new duration.
(t/new-duration 10 :minutes)
|
Note
|
new-duration units are from nanos to days. For date-based units of time, see new-period .
|
new-interval
- Create a new interval: a map with a :tick/beginning
and a :tick/end
(t.i/new-interval (t/instant "2018-01-01T00:00:00.00Z") (t/instant "2019-01-01T00:00:00.00Z"))
new-period
- Create a new duration:
(t/new-period 10 :weeks)
|
Note
|
new period is in units greater than days. For time-based units,
see new-duration .
|
new-time
- Create a new java.time.LocalTime
(t/new-time)
(t/new-time 12 00)
noon
- Give the time at noon.
(t/noon)
normalize
- From a time ordered sequence of disjointed intervals, return a
sequence of interval groups:
(count (t.i/normalize [(t.i/new-interval (t/instant "2000-01-01T00:00:00.00Z")
(t/instant "2000-01-02T00:00:00.00Z"))
(t.i/new-interval (t/instant "2000-01-02T00:00:00.00Z")
(t/instant "2000-02-02T00:00:00.00Z"))
(t.i/new-interval (t/instant "2000-06-01T00:00:00.00Z")
(t/instant "2000-06-09T00:00:00.00Z"))]))
now
- Give now as an instant:
(t/now)
offset-by
- Give a java.time.OffsetDateTime
of a specified instant with a
specified offset:
(t/offset-by (t/now) 1)
offset-date-time
- Convert a java.time.Instant
to a java.time.OffsetDateTime
(t/offset-date-time (t/zoned-date-time "2000-01-01T00:00:00Z[Australia/Darwin]"))
(t/offset-date-time)
on
- Give a LocalDateTime for a given time on
a given date:
(t/on (t/new-time 11 00) (t/new-date 2000 01 01))
ordered-disjoint-intervals?
- Are the given intervals time-ordered and disjointed?
(t.i/ordered-disjoint-intervals? [(t.i/new-interval (t/instant "2000-01-01T00:00:00.00Z")
(t/instant "2000-01-02T00:00:00.00Z"))
(t.i/new-interval (t/instant "2000-01-02T00:00:00.00Z")
(t/instant "2000-02-02T00:00:00.00Z"))])
pm
- Give an interval covering the afternoon of a given date:
(t.i/pm (t/today))
range
- Give a lazy sequence of times from start to finish.
(t/range (t/date-time "2000-01-01T12:00")
(t/date-time "2000-01-01T12:05")
(t/new-duration 1 :minutes))
relation
- Show the relation of two intervals:
(t.i/relation {:tick/beginning (t/instant "2018-01-01T00:00:00.00Z")
:tick/end (t/instant "2019-01-01T00:00:00.00Z")}
{:tick/beginning (t/instant "2018-06-01T00:00:00.00Z")
:tick/end (t/instant "2019-06-01T00:00:00.00Z")})
(t.i/relation (t/today) (t/yesterday))
|
Note
|
see above for more. |
reset!
- Reset an atom clock with one 5 mins slow.
(let [clk (t/atom)
clk2 (t/atom (t/<< (t/clock) (t/new-duration 5 :minutes)))]
(t/reset! clk clk2))
reset-vals!
- Reset an atom clock with one 5 mins slow, and give the
value of before and after.
(let [clk (t/atom)
clk2 (t/atom (t/<< (t/clock) (t/new-duration 5 :minutes)))]
(t/reset-vals! clk clk2))
scale
- Increase an interval by a given duration:
(t.i/scale {:tick/beginning (t/instant "2018-01-01T00:00:00.00Z")
:tick/end (t/instant "2019-01-01T00:00:00.00Z")}
(t/new-duration 10 :minutes))
seconds
- Give a duration in seconds:
(t/seconds (t/new-duration 5 :minutes))
second
- Give the second of time:
(t/second (t/now))
time
- Give the time of an instant:
(t/time (t/now))
today
- Give todays date:
(t/today)
tomorrow
- Give tomorrows date:
(t/tomorrow)
truncate
- Lessen precision of an instant:
(t/truncate (t/instant) :days)
union
- Join two time-ordered sequences together into one ordered sequence
(t.i/union [(t/today)] [(t/yesterday) (t/tomorrow)])
unit-map
- A map of units of time that tick works with:
(keys t/unit-map)
(:minutes t/unit-map)
unite
- Unite concurrent intervals ordered by beginning:
(t.i/unite [(t.i/new-interval (t/instant "2000-01-01T00:00:00.00Z")
(t/instant "2000-01-02T00:00:00.00Z"))
(t.i/new-interval (t/instant "2000-01-01T00:00:00.00Z")
(t/instant "2000-02-02T00:00:00.00Z"))])
units
- Give the appropriate units for a duration:
(t/units (t/new-duration<PHONE_NUMBER> :nanos))
with
- Return a date with an altered field:
(t/with (t/today) :day-of-month 1)
with-clock
- macro to evaluate code in the context of a given clock:
(let [clk (t/>> (t/clock) (t/new-duration 5 :minutes))]
(t/with-clock clk (t/time)))
year
- Give the year:
(t/year)
(t/year (t/date "2000-01-01"))
year-month
- Give the year and month:
(t/year-month)
(t/year-month (t/date "2000-01-01"))
years
- Give a duration in years.
(t/years (t/new-period 10 :years))
yesterday
- Give yesterdays date:
(t/yesterday)
zone
- Give the time zone:
(t/zone)
(t/zone (t/zoned-date-time "2000-01-01T00:00:00Z[Australia/Darwin]"))
zone-offset
- Give the java.time.ZoneOffset
with a specified offset:
(t/zone-offset 1 30 59)
zoned-date-time
- Create a java.time.ZonedDateTime
:
(t/zoned-date-time)
(t/zoned-date-time "2000-01-01T00:00:00Z[Australia/Darwin]")


Table Name: tabVital Signs
| Sr | Fieldname | Type | Label | Options |
|---|---|---|---|---|
| 1 | patient |
Link | Patient | Patient |
| 2 | appointment |
Link | Appointment | Patient Appointment |
| 3 | consultation |
Link | Consultation | Consultation |
| 4 | column_break_2 |
Column Break | ||
| 5 | signs_date |
Date | Date | |
| 6 | column_break_4 |
Column Break | ||
| 7 | signs_time |
Time | Time | |
| 8 | sb_vs |
Section Break | Vital Signs | |
| 9 | temperature |
Data |
Body Temperature
Presence of a fever (temp > 38.5 °C/101.3 °F or sustained temp > 38 °C/100.4 °F) |
|
| 10 | pulse |
Data |
Heart Rate / Pulse
Adults' pulse rate is anywhere between 50 and 80 beats per minute. |
|
| 11 | respiratory_rate |
Data |
Respiratory rate
Normal reference range for an adult is 16–20 breaths/minute (RCP 2012) |
|
| 12 | column_break_8 |
Column Break | ||
| 13 | bp_systolic |
Data | Blood Pressure (systolic) | |
| 14 | bp_diastolic |
Data | Blood Pressure (diastolic) | |
| 15 | bp |
Data |
Blood Pressure
Normal resting blood pressure in an adult is approximately 120 mmHg systolic, and 80 mmHg diastolic, abbreviated "120/80 mmHg" |
|
| 16 | vital_signs_note |
Small Text | Notes | |
| 17 | sb_nutrition_values |
Section Break | Nutrition Values | |
| 18 | height |
Float | Height (In Meter) | |
| 19 | weight |
Float | Weight (In Kilogram) | |
| 20 | bmi |
Float | BMI | |
| 21 | column_break_14 |
Column Break | ||
| 22 | nutrition_note |
Small Text | Notes | |
| 23 | company |
Link | Company | Company |
| 24 | amended_from |
Link | Amended From | Vital Signs |
Inherits from frappe.model.document.Document
erpnext.healthcare.doctype.vital_signs.vital_signs.delete_vital_signs_from_medical_record (doc)
No docs
erpnext.healthcare.doctype.vital_signs.vital_signs.insert_vital_signs_to_medical_record (doc)
No docs
erpnext.healthcare.doctype.vital_signs.vital_signs.set_subject_field (doc)
No docs


MAINTAIN YOUR UBUNTU/ DEBIAN SYSTEM
introduce some "house keeping" tasks for a Debian system.
1. Update your system frequently
Just be familiar with two below commands and you will be good to go:
sudo apt-get update
It will update the information apt is having from all repositories in /etc/apt/source.list file.
This command does not install package, just update information.
The following command will actually install newest version of any package that has been already installed in your system (if any).
sudo apt-get upgrade
You should always remember to do it one in a while (I prefer once a week) to keep your system up to date.
Or just:
sudo apt-get update && sudo apt-get upgrade
The “&&” part is for telling the terminal only run the upgrade command if only the update command has been finished.
_TO SUM UP:_
- update: get information about what is the newest version of any package on the repository.
- upgrade: compare the version of each package installed on your computer and download the newest version of them if any.
2. Keep your system clean
Cleaning up the cache of apt:
apt is keeping all the downloaded binary files (.deb) after any of your installation/update. It does so to keep these .debs file available in case you want to reinstall or repair.
That means if you clear this cache and when the need arises later, you have to re-download.
To see how much apt has been cached .deb files:
First, go to the apt cache directory by:
cd /var/cache/apt/archives
then:
du -ch
du -ch mean:
- du: disk usage command - return the size of a directory
- c: for returning the total
- h: human - easier for us to read the output (the size will be in Megabyte measurement unit)
The command apt-get clean will clear all of the cache.
sudo apt-get clean
OR only downsizing the apt cache:
sudo apt-get autoclean
The autoclean is a more compromising way if you want to keep apt’s cache locally in a reasonable size. It only deletes the packages that are deemed useless (partial packages).
To clean up of any unused dependencies that was left behind after you remove a package:
sudo apt-get autoremove
3. Analyzed the usage of your disk to track where your disk space has gone.
We will use a very good program call Baobab (Disk Usage Analyzer).
apt-get install baobab
You should start it with root privilege to get the most information possible.
gksu baobab
Disk Usage Analyzer
4. Monitor your system
If you feel that something has gone wrong: suddenly your fan running fast, your computer slowing down… you should use htop to find out if there are programs hogging your system resources (using a lot of CPU power or RAM).
Problem like this often happens when there is a program which requires resources that beyond the capability of your system or simply because a program is not configured correctly. For the former case, you have to find another lightweight alternative. For the later, here is my own experience: I used to encounter a problem with my video configuration. The video playback did not use GPU power but used CPU power instead causing extremely high CPU usage for no obvious reason. After tracking the problem down, I then reconfigured my GPU and everything was fine.
These are typical cases that you should using system monitor to detect which is the culprit.
You may need to kill that process (to terminate it) for further step can be taken.
To kill a running program the hard way (force it to close) by using command in terminal when the normal way of clicking the close button on its windows do not have any effect (that program is hanging or something).
You can terminate a running program:
killall [program_name]


A simple app allows a user to input comments
Add Your Comment:
This is the first comment!
Here's the second one!
And this is one more.
Here is another one.
Add Your Comment:


This functionality is intended for you to be able to correct any core you may have accidentally selected.


“Welcome to daily Steem Engine Trading list, Data obtained from the Steem Engine.
Steem Engine Trading list will be posted daily.If you like it, please support upvoting and follow me @m18207319997.
STEEM ENGINE 24h volume Top 10
NO Symbol Token Name Market Cap Price Chg 24h Vol Supply
1 RMSFITNESS rmsfitness 4451435 0.44 0.00% 31859 10111100
2 SRCAPTAIN SRCAPTAIN 19117 0.01738 63.14% 2558 1100000
3 BDR Bonus Daily Rewards 17859 1.79 0.00% 2229 10000
4 DEC Dark Energy Crystals 114613 0.00061 2.71% 1662 189278261.1
5 BTCP BITCOIN Pegged 7773 5947 -31.56% 469.4 1.307
6 APX APPICS 3784666 0.02469 11.38% 468.49 153267632
7 ENG Steem Engine Token 135026 0.03551 -35.04% 428.94 3802899.35
8 MINI mini 34706 0.03905 0.00% 154.9 888659.63
9 STARDUST Stardust 1867 0.00004 0.45% 129.74 47590000
10 LEO LEO 50133 0.0129 12.89% 120.36 3885595.04
https://steem-engine.com/?p=tokens 2020/3/3
STEEM ENGINE Change Top 10
NO Symbol Token Name Market Cap Price Chg 24h Vol Supply
1 RHB Reality $803.93 $0.00001 260.69% $0.791 113216290.9
2 TRDO TRENDO TOKEN $7843 $0.00249 84.21% $2.48 3155715.349
3 SRCAPTAIN SRCAPTAIN $19117 $0.01738 63.14% $2558 1100000
4 UFMM UpFundMe Miner $24656 $2.47 54.32% $26.89 10000
5 NBC Newbies Coin $2574056 $0.257 38.10% $0.757 10000000
6 HBC Breadcrumbs $11112 $0 24.22% $20.84<PHONE_NUMBER>6
7 LASSECASH LASSECASH $8177 $0.00027 16.28% $0.586 30707271.53
8 POINT Point $4986 $0.00025 15.33% $0.221 20295166.72
9 LEO LEO $50133 $0.0129 12.89% $120.36 3885595.04
10 APX APPICS $3784666 $0.02469 11.38% $468.49 153267632
https://steem-engine.com/?p=tokens 2020/3/3
STEEM ENGINE Price Top 10
NO Symbol Token Name Market Cap Price Chg 24h Vol Supply
1 TEN Ten 142016884 14201688 0 54.15 10
2 CANDY Candy<PHONE_NUMBER>.00 3550422.00 0.00% – 2,000
3 MARS Ticket2Mars 2840338.00 28403.00 0.00% – 100.00
4 NOGANOO Noganoo Tokens<PHONE_NUMBER>58.00 17752.00 0.00% – 10,000,001
5 YHWH YHWH 35504.00 17752.00 0.00% – 2
6 BTCP BITCOIN Pegged 7773.00 5947.00 -31.56% $469.40 1
7 PREDICT Prediction Token<PHONE_NUMBER>.00 1775.00 0.00% – 1,000,300
8 LOVE JANASILVER 2662817.00 1775.00 0.00% – 1500
9 LA Living Abroad 400133.00 400.13 -0.04% $51.57 1,000.00
10 STEEMSENSE STEEMSENSE 355042.00 355.04 0.00% – 1,000
https://steem-engine.com/?p=tokens 2020/3/3
This page is synchronized from the post: ‘Steem Engine Trading list 9:03 AM03/03/2020’


To reset your password, enter the email address you use to sign in to iofrm
Please check your inbox [email protected]


?01529978
INSTITUTO
DE
BOTANICA
DARWINION
(SI)
N¡y“
EX
U.S.HERB.
SMITHSONIAN
INST.
Ex
Herbario
Musei
Britannici
PLANTS
OF
WEST
INDIES
Andropogon
pertusus
(L.)
Willd.s
panoraitanus.
Loc.
Estate
Anna
Hope,
st
Croix.
Date.
0ct.25È1929È
Notes.
"Sour
Grass",
not
relished
by
stock.
Coll.
M.S.Baker.
01529978
Legend -
Level of confidence that token is an accurately-transcribed word
extremely low
very low
low
undetermined
medium
high
very high


Façade
by Procedural Arts (PC, 2006)
http://www.interactivestory.net/
Façade is an art and research project which aims to extend the remit of gaming, making a bold raid deep into rarely-explored territory. It opens with a voicemail, inviting you to visit old friends, and then presents the player with a first-person view from outside your caller's apartment door. Stepping up briskly, I was just getting to grips with the mouse cursor's context-sensitive prompt to knock on the door, when I began to discern the muffled but unmistakable sounds of an argument going on inside. The familiar sinking feeling invoked as you screw up your courage, overcome your hesitation, and knock regardless, is possibly a gaming first.
Awkward social situations are nothing new in other media, but the complicity engendered by interactivity and first-person immersion enhances the effect. It's a rich vein, and the ensuing interactive drama mines it deeply - starting with the knock, upon which a voice fiercely whispers "He's here already? I thought you said 8 o'clock?"
Your hosts Trip and Grace do their best to welcome you gracefully, but there's clearly tension in the air. You can speak to them at any point just by typing on the keyboard, and navigate the apartment, or mess with its fixtures, using the mouse. The story that unfolds is highly dependant on your behaviour, as Trip and Grace respond to you and to each other, using a social AI system developed specifically for this project. Consequentially, the storyline and its outcome varies massively from one replay to the next - although similar themes are often brought out somewhere along the way: the Italian holiday that no-one wants to talk about; the 'experimental' decor - a symptom of Grace's frustration with her uncreative graphic design job.
There are no goals, no score. No explicit measures of success. Judging by my few replays, the evening can end in one of a small number of ways, some of them are sad or embarrassing, others, perhaps the more elusive ones, are happy or hopeful. If the player chooses to adopt the attainment of a particular story-ending as a self-assigned goal, then that's up to them - and surely that's the very essence of what interactivity is all about.
Façade isn't without its flaws. The graphics are perfunctory - which is arguably a positive, since it's Southpark visual style steers well clear of the Valley, but will doubtless repel the superficiality of the mainstream. Similarly, the AI has a limited repertoire - it only knows how to converse around particular topics, using the words and phrases that have been recorded by voice actors. Again though, this has an upside, as the confines of the two-room apartment, its three occupants, and the prominence of their relationship problems all serve to reinforce the intensity of the situation. More pertinently though, even within these constraints the AI isn't perfect - this is a research project after all. The inevitable failure to recognise your typed input is often handled relatively gracefully, by a confused look from Trip or Grace, or an abrupt subject change, passed off as a deliberate avoidance of the topic you were broaching - a tactic that sometimes actually becomes more effective and engaging the more insistent your attempts become.
It's often-cited in the game development world that the industry is still not mature enough to know how to write a game that can make the player cry. The current state-of-the art is comparable to the crude motion-pictures of the late 19th century. Who would have believed, watching the grainy, silent flickering of Fred Ott's Sneeze, the narrative and emotional finesse to which that medium would one day soar? For all its faults, it's in increments such as Façade that gaming moves in the same direction.
Rating: 9/10. Lets. Push. Things. Forward.


Our farm of offshore customer service representatives would be glad to read to you from their list of scripted responses.


Class: Octokit::Middleware::FollowRedirects
| Relationships & Source Files | |
| Super Chains via Extension / Inclusion / Inheritance | |
|
Class Chain:
self,
Faraday::Middleware
|
|
|
Instance Chain:
self,
Faraday::Middleware
|
|
| Inherits: |
Faraday::Middleware
|
| Defined in: | lib/octokit/middleware/follow_redirects.rb |
Overview
Public: Follow HTTP 301, 302, 303, and 307 redirects.
For HTTP 303, the original GET, POST, PUT, DELETE, or PATCH request gets converted into a GET. For HTTP 301, 302, and 307, the HTTP method remains unchanged.
This middleware currently only works with synchronous requests; i.e. it doesn't support parallelism.
Constant Summary
-
ALLOWED_METHODS =
# File 'lib/octokit/middleware/follow_redirects.rb', line 33
HTTP methods for which 30x redirects can be followed
Set.new %i[head options get post put patch delete]
-
ENV_TO_CLEAR =
# File 'lib/octokit/middleware/follow_redirects.rb', line 39
Keys in env hash which will get cleared between requests
Set.new %i[status response response_headers]
-
FOLLOW_LIMIT =
# File 'lib/octokit/middleware/follow_redirects.rb', line 42
::Octokit::Default
value for max redirects followed3
-
REDIRECT_CODES =
# File 'lib/octokit/middleware/follow_redirects.rb', line 36
HTTP redirect status codes that this middleware implements
Set.new [301, 302, 303, 307]
-
URI_UNSAFE =
# File 'lib/octokit/middleware/follow_redirects.rb', line 47
Regex that matches characters that need to be escaped in URLs, sans the "%" character which we assume already represents an escaped sequence.
%r{[^\-_.!~*'()a-zA-Z\d;/?:@&=+$,\[\]%]}.freeze
Class Method Summary
-
.new(app, options = {}) ⇒ FollowRedirects
constructor
Public: Initialize the middleware.
Instance Method Summary
- #call(env)
- #convert_to_get?(response) ⇒ Boolean private
- #follow_limit private
- #follow_redirect?(env, response) ⇒ Boolean private
- #perform_with_redirection(env, follows) private
-
#safe_escape(uri)
private
Internal: Escapes unsafe characters from a URL which might be a path component only or a fully-qualified URI so that it can be joined onto a URI:HTTP using the
+
operator. - #same_host?(original_url, redirect_url) ⇒ Boolean private
- #update_env(env, request_body, response) private
Constructor Details
.new(app, options = {}) ⇒ FollowRedirects
Public: Initialize the middleware.
options - An options Hash (default: {}): :limit - A Integer redirect limit (default: 3).
# File 'lib/octokit/middleware/follow_redirects.rb', line 53
def initialize(app, = {}) super(app) @options = @convert_to_get = Set.new [303] end
Instance Method Details
#call(env)
[ GitHub ]# File 'lib/octokit/middleware/follow_redirects.rb', line 60
def call(env) perform_with_redirection(env, follow_limit) end
#convert_to_get?(response) ⇒ Boolean
(private)
# File 'lib/octokit/middleware/follow_redirects.rb', line 66
def convert_to_get?(response) !%i[head options].include?(response.env[:method]) && @convert_to_get.include?(response.status) end
#follow_limit (private)
[ GitHub ]# File 'lib/octokit/middleware/follow_redirects.rb', line 113
def follow_limit @options.fetch(:limit, FOLLOW_LIMIT) end
#follow_redirect?(env, response) ⇒ Boolean
(private)
# File 'lib/octokit/middleware/follow_redirects.rb', line 108
def follow_redirect?(env, response) ALLOWED_METHODS.include?(env[:method]) && REDIRECT_CODES.include?(response.status) end
#perform_with_redirection(env, follows) (private)
[ GitHub ]# File 'lib/octokit/middleware/follow_redirects.rb', line 71
def perform_with_redirection(env, follows) request_body = env[:body] response = @app.call(env) response.on_complete do |response_env| if follow_redirect?(response_env, response) raise(RedirectLimitReached, response) if follows.zero? new_request_env = update_env(response_env, request_body, response) response = perform_with_redirection(new_request_env, follows - 1) end end response end
#safe_escape(uri) (private)
Internal: Escapes unsafe characters from a URL which might be a path
component only or a fully-qualified URI so that it can be joined onto a
URI:HTTP using the +
operator. Doesn't escape "%" characters so to not
risk double-escaping.
# File 'lib/octokit/middleware/follow_redirects.rb', line 128
def safe_escape(uri) uri.to_s.gsub(URI_UNSAFE) do |match| "%#{match.unpack('H2' * match.bytesize).join('%').upcase}" end end
#same_host?(original_url, redirect_url) ⇒ Boolean
(private)
# File 'lib/octokit/middleware/follow_redirects.rb', line 117
def same_host?(original_url, redirect_url) original_uri = Addressable::URI.parse(original_url) redirect_uri = Addressable::URI.parse(redirect_url) redirect_uri.host.nil? || original_uri.host == redirect_uri.host end
#update_env(env, request_body, response) (private)
[ GitHub ]# File 'lib/octokit/middleware/follow_redirects.rb', line 86
def update_env(env, request_body, response) original_url = env[:url] env[:url] += safe_escape(response['location']) unless same_host?(original_url, env[:url]) # HACK: Faraday’s Authorization middlewares don’t touch the request if the `Authorization` header is set. # This is a workaround to drop authentication info. # See https://github.com/octokit/octokit.rb/pull/1359#issuecomment-925609697 env[:request_headers]['Authorization'] = 'dummy' end if convert_to_get?(response) env[:method] = :get env[:body] = nil else env[:body] = request_body end ENV_TO_CLEAR.each { |key| env.delete(key) } env end


Instructions
Hold down right mouse button and drag the followin gesture and release
-
-
-
arrow_upward
- New tab
-
arrow_downward
- Close current tab
-
arrow_back
- page back
-
arrow_forward
- page forward
-
arrow_upward
arrow_downward - Restore last closed tab session


|
Standard Reference Data Program |
Data Gateway |
Chemistry WebBook |
|
Go To: Top, Constants of diatomic molecules, References, Notes / Error Report
Data compilation copyright by the U.S. Secretary of Commerce on behalf of the U.S.A. All rights reserved.
Data compiled by: J.E. Bartmess
| EA (eV) | Method | Reference | Comment |
|---|---|---|---|
| 1.050 ± 0.060 | PD | Rackwitz, Feldman, et al., 1977 | Caln: ΔHacid=363.8 Hinde, 2000 |
Go To: Top, Gas phase ion energetics data, References, Notes / Error Report
Data compilation copyright by the U.S. Secretary of Commerce on behalf of the U.S.A. All rights reserved.
Data compiled by: K.P. Huber and G. Herzberg
| State | Te | ωe | ωexe | ωeye | Be | αe | γe | De | βe | re | Trans. | ν00 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Unidentified line structure at 42570 cm-1 [em. and abs., Guntsch, 1934 Guntsch, 1935 Turner and Harris, 1937 Guntsch, 1939] and 43180 - 43520 cm-1 [abs., Khan, 1962]. | ||||||||||||
| I (2Π) | [5.96] | [2E-4] | [1.710] | I ← X V | 47997.6 Z | |||||||
| Khan, 1962 | ||||||||||||
| H (2Σ+) 1 | H ← X R | 47543 (Z) | ||||||||||
| Khan, 1962 | ||||||||||||
| G (2Σ+) 2 | G ← X V | 46082 (Z) | ||||||||||
| Khan, 1962 | ||||||||||||
| State | Te | ωe | ωexe | ωeye | Be | αe | γe | De | βe | re | Trans. | ν00 |
| D 2Σ- | (42065) | (1630) 3 | [6.296] 4 | [3.8E-4] | [1.664] | D → A V | 22861.5 5 | |||||
| Guntsch, 1937; Guntsch, 1939 | ||||||||||||
| C 2Π(r) | (41164) 6 | [1623.4] Z | 6.161 7 | 0.144 | 3.0E-4 | 1.682 | C → A | 21956.5 5 | ||||
| Pearse, 1929; Guntsch, 1934; Guntsch, 1937, 2; Guntsch, 1939 | ||||||||||||
| C ↔ X V | 41235.9 Z | |||||||||||
| missing citation; Guntsch, 1935; Grundstrom, 1936; Guntsch, 1937, 2; Turner and Harris, 1937; Guntsch, 1939; missing citation | ||||||||||||
| E 2Σ+ | (35568) | [1444.8] Z | 8 | 6.23 | 0.30 9 | [3.3E-4] 10 | 1.673 | E ← X VR | 35550.6 Z | |||
| Khan, 1961; missing citation; Balfour and Cartwright, 1975 | ||||||||||||
| State | Te | ωe | ωexe | ωeye | Be | αe | γe | De | βe | re | Trans. | ν00 |
| B' 2Σ+ | 22410.5 | 828.0 Z | 11.6 11 | [2.596] | 12 | 1.2E-4 | 0.13E-4 | 2.597 | B' → X R | 22081.9 Z | ||
| Balfour and Cartwright, 1975; Balfour and Cartwright, 1976 | ||||||||||||
| A 2Πr | 19226.8 13 | 1598.17 Z | 31.085 14 | -0.633 | 6.1913 | 0.1931 15 | 0.0005 | 3.60E-4 16 | 1.6778 | A ↔ X 17 18 V | 19278.4 5 | |
| Guntsch, 1937; Guntsch, 1939; Balfour, 1970; Balfour, 1970, 2; Balfour and Cartwright, 1976, 2 | ||||||||||||
| X 2Σ+ | 0 | 1495.20 Z | 31.889 19 | 0.384 | 5.8257 | 0.1859 20 | 3.44E-4 16 | 1.7297 21 | ||||
| Knight and Weltner, 1971 |
| 1 | R shaded band with head at 2100 Å. |
| 2 | V shaded band with head at 2172 Å. |
| 3 | Estimated from w2 = 4B3/D and from the observed isotope shift of the 0-0 band. |
| 4 | Spin doubling. |γ| = 0.01. |
| 5 | Average of the two subband origins Guntsch, 1939. |
| 6 | A0 = (+)3.7; Balfour, 1970, 2 gives -3.7, but his arguments are not conclusive. |
| 7 | The P and R branches of the C→X, 0-0 band break off above N' = 10; bands with v'>0 have Q branches only. The predissociation is caused by B' 2Σ+; see Balfour and Cartwright, 1975. |
| 8 | ΔG(3/2)= 1490. The v=2 level was formerly believed to be v=0 of a new 2Σ state (B 2Σ+), see Grundstrom, 1936, Grundstrom, 1936, 2, Guntsch, 1938, Guntsch, 1939. Similarly, Khan, 1961 assigned the 1-0 band as 0-0 of a new system F←X. |
| 9 | B2 = 5.448; see 8. Transitions to v=1 are discrete but those to v=2 are diffuse indicating that the state causing the predissociation [B' 2Σ+, see Balfour and Cartwright, 1975] crosses the E state potential curve between v=1 and 2. Emissions from v=2 has been observed at high pressure. |
| 10 | D1 = 4.0E-4; D2 = 2.71E-4; H2 = +8.6E-8; (see 8). |
| 11 | The equilibrium constants in Balfour and Cartwright, 1976 do not reproduce the observed intervals, probably owing to an error in ωeze. De ~ 10900 cm-1 Balfour and Cartwright, 1976 |
| 12 | Bv(v=1,2,3,4...9) = 2.605, 2.618, 2.608, 2.592, ... 2.419; Be = 2.585, but the higher order constants of Balfour and Cartwright, 1976 do no reproduce their data. Small perturbations by A 2Π. RKR potential curve Balfour and Cartwright, 1976. See also Sink, Bandrauk, et al., 1976. |
| 13 | A0= +35.3 Balfour, 1970, 2 |
| 14 | These constants (for v≤3) have been recalculated from the three ΔG values obtained by Balfour and Cartwright, 1976, 2; the equilibrium constants determined by Balfour and Cartwright, 1976, 2 do not reproduce their data. De ~ 14200 cm-1 Balfour and Cartwright, 1976, 2. |
| 15 | Small perturbations by B' 2Σ+. |
| 16 | Dv increases rapidly with v. |
| 17 | Oscillator strength f00= 0.257 [see Balfour and Cartwright, 1976, 2 and references given there], much larger than the earlier experimental value of Main, Carlson, et al., 1967. |
| 18 | Balfour, 1970 has measured the 0-0 and 0-1 bnads of 25MgH and 26MgH; see also Branch, 1970, Boyer, 1971. |
| 19 | ωeze= -0.113 Balfour and Cartwright, 1976, 2; De0 ~ 11700 cm-1 Balfour and Cartwright, 1976, 2. |
| 20 | +0.00393(v+1/2)2 - 0.00123(v+1/2)3. The last term was not reported by Balfour and Cartwright, 1976, 2 but must be included for a satisfactory fit to their data (v=0...6). |
| 21 | ESR sp. 23 |
| 22 | From extrapolations of the vibrational levels in X, A and B'. Close agreement with the theoretical value of Meyer and Rosmus, 1975, D0 = 1.25 eV. |
| 23 | In Ar matrices at 4K. |
Go To: Top, Gas phase ion energetics data, Constants of diatomic molecules, Notes / Error Report
Data compilation copyright by the U.S. Secretary of Commerce on behalf of the U.S.A. All rights reserved.
Rackwitz, Feldman, et al., 1977
Rackwitz, R.; Feldman, D.; Kaiser, H.J.; Heincke, E.,
Photodetachment bei einigen zweiatomigen negativen hydridionen: BeH-, MgH-, CaH-, ZnH-, PH-, AsH-,
Z. Naturforsch. A:, 1977, 32, 594. [all data]
Hinde, 2000
Hinde, R.J.,
Ab initio gas-phase acidities of NaH, MgH2, and AlH3,
J. Phys. Chem. A, 2000, 104, 7580-7585. [all data]
Guntsch, 1934
Guntsch, A.,
Uber das bandenspektrum des magnesiumhydrids,
Z. Phys., 1934, 87, 312. [all data]
Guntsch, 1935
Guntsch, A.,
Uber das ultraviolette bandenspektrum des magnesiumhydrids und magnesiumdeutrids,
Z. Phys., 1935, 93, 534. [all data]
Turner and Harris, 1937
Turner, L.A.; Harris, W.T.,
The ultraviolet bands of magnesium hydride,
Phys. Rev., 1937, 52, 626. [all data]
Guntsch, 1939
Guntsch,
Dissertation, Stockholm, 1939, 1. [all data]
Khan, 1962
Khan, M.A.,
MgH bands at 2172, 2100 and 2088 Å and MgD bands at 2172, 2358 and 2364 A,
Proc. Phys. Soc. London, 1962, 80, 209. [all data]
Guntsch, 1937
Guntsch, A.,
Neue untersuchungen uber das bandenspektrum des magnesiumhydrids,
Z. Phys., 1937, 104, 584. [all data]
Pearse, 1929
Pearse, R.W.B.,
The ultra-violet spectrum of magnesium hydride. 1. The band at λ2430,
Proc. R. Soc. London A, 1929, 122, 442. [all data]
Guntsch, 1937, 2
Guntsch, A.,
Uber einige neue banden des magnesiumhydrids,
Z. Phys., 1937, 107, 420. [all data]
Grundstrom, 1936
Grundstrom,
Dissertation, Stockholm, 1936, 0. [all data]
Khan, 1961
Khan, M.A.,
MgH and MgD bands at 2819 Å and 2702 Å,
Proc. Phys. Soc. London, 1961, 77, 1133. [all data]
Balfour and Cartwright, 1975
Balfour, W.J.; Cartwright, H.M.,
Low-lying electronic states of magnesium hydride,
Chem. Phys. Lett., 1975, 32, 82. [all data]
Balfour and Cartwright, 1976
Balfour, W.J.; Cartwright, H.M.,
The B'2Σ+ → X2Σ+ systems of MgH and MgD,
Can. J. Phys., 1976, 54, 1898. [all data]
Balfour, 1970
Balfour, W.J.,
The A2Π → X2Σ+ systems of 24MgH, 25MgH, and 26MgH,
Astrophys. J., 1970, 162, 1031. [all data]
Balfour, 1970, 2
Balfour, W.J.,
The electronic spectrum of magnesium hydride and magnesium deuteride,
J. Phys. B:, 1970, 3, 1749. [all data]
Balfour and Cartwright, 1976, 2
Balfour, W.J.; Cartwright, H.M.,
The A2Π-X2Σ+ system and dissociation energy of magnesiun hydride,
Astron. Astrophys. Suppl. Ser., 1976, 26, 389. [all data]
Knight and Weltner, 1971
Knight, L.B., Jr.; Weltner, W., Jr.,
Hyperfine interaction and chemical bonding in MgH, CaH, SrH, and BaH molecules,
J. Chem. Phys., 1971, 54, 3875. [all data]
Grundstrom, 1936, 2
Grundstrom, B.,
Absorption spectrum of magnesium hydride in the ultra-violet,
Nature (London), 1936, 131, 108. [all data]
Guntsch, 1938
Guntsch, A.,
Druckeffekt in der magnesiumhydridbande bei λ2590 Å,
Z. Phys., 1938, 110, 549. [all data]
Sink, Bandrauk, et al., 1976
Sink, M.L.; Bandrauk, A.D.; Henneker, W.H.; Lefebvre-Brion, H.; Raseev, G.,
Theoretical study of the low-lying electronic states of MgH,
Chem. Phys. Lett., 1976, 39, 505. [all data]
Main, Carlson, et al., 1967
Main, R.P.; Carlson, D.J.; DuPuis, R.A.,
Measurement of oscillator strengths of the MgO(B1Σ+ - X1Σ+) and MgH(A2Π - X2Σ+) band systems,
J. Quant. Spectrosc. Radiat. Transfer, 1967, 7, 805. [all data]
Branch, 1970
Branch, D.,
Isotopes of magnesium in the sun,
Astrophys. J., 1970, 159, 39. [all data]
Boyer, 1971
Boyer, R.,
Isotopic lines of the MgH molecule,
Astron. Astrophys., 1971, 12, 464. [all data]
Meyer and Rosmus, 1975
Meyer, W.; Rosmus, P.,
PNO-Cl and CEPA studies of electron correlation effects. III. Spectroscopic constants and dipole moment functions for the ground states of the first-row and second-row diatomic hydrides,
J. Chem. Phys., 1975, 63, 2356. [all data]
Go To: Top, Gas phase ion energetics data, Constants of diatomic molecules, References
| EA | Electron affinity |
Copyright for NIST Standard Reference Data is governed by the Standard Reference Data Act.
|
Standard Reference Data Program |
Data Gateway |
Chemistry WebBook |
If you have comments or questions about this site, please contact us.


March 25 THE ANNUNCIATION OF THE LORD
The
Annunciation was the moment when St Gabriel the
ENTRANCE ANTIPHON
The Lord said, as he entered the world: Behold, I come to do your will, O God.
The GLORIA is said. (English, Latin)
COLLECT
O God, who willed that your Word should take on the reality of human flesh in the womb of the Virgin Mary, grant, we pray, that we, who confess our Redeemer to be God and man, may merit to become partakers even in his divine nature. Who lives and reigns with you in the unity of the Holy Spirit, one God, for ever and ever.
The
PROFESSION OF FAITH (Creed) is
said. (English, Latin)
PRAYER OVER THE OFFERINGS
Be pleased, almighty God, to accept your Church’s offering, so that she, who is aware that her beginnings lie in the Incarnation of your Only Begotten Son, may rejoice to celebrate his mysteries on this Solemnity. Who lives and reigns for ever and ever.
COMMUNION ANTIPHON
Behold, a Virgin will conceive and bear a son; and his name will be called Emmanuel.
PRAYER AFTER COMMUNION
Confirm in
our minds the mysteries of the true faith, we pray, O Lord, so that, confessing
that he who was conceived of the Virgin Mary is true God and true man, we may,
through the saving power of his Resurrection, merit to attain eternal joy.
Through Christ our Lord.


IPv6: Special addresses
fe80::/10 Unique Link Local is NOT Loopback (similar to 169.254.x.x link local on IPv4 when you can't get an IP). Link local is routable from LOCAL subnet
fc00::/7 Unique Local-Unicast (similar to subnets 10.x.x.x 172.16.x.x, 192.168.x.x)
2000::/3 Global Unicast
Subnetting /# is that many bits are 1s, followed by 0s
fe80::/10 translates to this mask: 1111 1111 1100 0000 0000 0000 0000 0000
fe80:0000:0000:0000:0000:0000:0000:0000
1111:1111:1100:0000:0000:0000:0000:0000
febf:ffff:ffff:ffff:ffff:ffff:ffff:ffff
fc00::/7 translates to this mask:<PHONE_NUMBER>000000000000000000
fc00:0000:0000:0000:0000:0000:0000:0000
1111:1110:0000:0000:0000:0000:0000:0000
fdff:ffff:ffff:ffff:ffff:ffff:ffff:ffff
2000::/3
1110:
3fff:ffff:ffff:ffff:ffff:ffff:ffff:ffff
Other unique addresses to be aware of:
FF02::1 Multicast all nodes
FF0d::2 Multicast ROUTER nodes
so dead:beef:: is really an invalid address, but it is still routable in a private network!
if something is blocked or listening on IPv4, it may also be blocked or listening on IPv6. Network misconfigurations!
In Linux, IPv6 Link Local address is calculated with the help of the machine MAC address
Windows adds some special sauce and doesn't always conform
Example:
MAC: 00:50:56:AA:8A:25
IPv6: FE80::250:56FF:FEAA:8A25
Invert the 7th bit of the MAC and add FFFE halfway through MAC
0000 0050 56AA 8A25
0000 0010 56FF FE
FE80::0250:56FF:FEAA:8A25
Another example:
MAC: 00:50:56:AA:41:46 (grab MAC from IPv4 arp table or other recon)
IPv6: FF80::0250:56FF:FEAA:4146
Now see if you can ping6 the IPv6 address
# ping6 FF80::0250:56FF:FEAA:4146\ens34 (need to specify the interface)
and do other stuff with IPv6 specifically!
ssh -6 -i key <user>@<IPv6 Address>
ssh -i key <user>@FF80::0250:56FF:FEAA:4146\ens34
Now you can grab IPv6 public routable address and access from other subnets!
ip -6 neigh #will give the ipv6 equivalent of arp table
ping6 -I ens34 ff02::1 #ping multicast all nodes
Followed by
ip -6 neigh
Will show all other responses from IPv6 multicast (all other machines responding to Link Local multicast)
Another way is to ping6 the routeable IPv6 address
ping6 -I dead:beef::250:56ff:feaa:8a25 ff02::1
Now: Windows specific
Trick: send an invalid ping packet. This will cause Windows to respond "hey, you sent the wrong ping packet"
The Hackers Choice (THC) tool, alive6 (THC-IPv6 Attack Tool)
alive6 ens34 -e ff02::1 (-e is erroneous ping packet, -p is normal ping packet)
Windows boxes should respond with [ICMP parameter problem]
Turn this into a list of attackable IPv6 addresses:
ip -6 neigh | awk '{print $1}' > ipv6.list
nmap -6 -p 22,445,3389,443 -iL ipv6.list
Some tools require the -6 flag (or similar). Some will be able to automatically figure it out
Another Tip: if you have an .rpm package (like nmap for example) and you want to install it on a debian box, you can run alien to give you a .deb package
# alien nmap.rpm
# dpkg -i nmap.deb
snmpwalk -v2c -c public <ip_address>
<IP_ADDRESS>.<IP_ADDRESS>.1.3 #ip information
Reading SNMP is hard though, so lets get easy mode:
apt install snmp-mibs-downloader
now edit snmp.conf
nano /etc/snmp/snmp.conf
#comment out section
now SNMPWalk will convert numbers to mibs/human readable format
Enyx an ipv6 lookup tool if snmp is enabled
python enyx.py 2c public <ip_address>
This will pull out only IPv6 information from snmp it looks like
NOT COMPATIBLE WITH MIBS, it is only looking for the snmp decimal string
checksec <binary> to see protections
Chal has no NX and no ASLR, but it is 32bit
exploit = NOP + SHELL + EIP
gdb> r $(python -c 'print "A"*400')
gdb> x/100x $esp #examine 100 bytes in hex at $esp
without struct, have to convert to little endian
EIP = "\xc0\xf4\xff\xff\xbf"
looks like nop sled got chunked, so new address to try:
EIP = "\x50\xf7\xff\xff\xbf"
and root!


Styles are not always individual properties pertaining to an individual subject. Often there are times when what the user perceives as a style or feature, must be implemented as multiple styles applied to multiple subjects.
If one of the sub-styles is not applied, or applied incorrectly, then the total style fails.
ScalaCSS has a feature to address this.
It's called a composite style, StyleC
.
It is a composite of sub-styles, each given unique names.
In order to apply the total style, ScalaCSS uses the compiler to enforce that developers…
If a total style has 3 sub-styles, the developer must receive all 3 styles.
If a 3-style composite is modified to add a fourth, all code using the style will break until the fourth, new style is received everywhere the style is used.
In a type-safe world, it wouldn't feel very safe if you used a composite style
and were handed a (StyleA, StyleA, StyleA)
.
Which one is which? If the order changes in the style definition its going to be
a problem.
This problem is addressed by the style definition attaching names (like tags/labels) to each substyle, then the developer providing the same names in order to use it.
This adds a little tedium but it provides an unprecedented level of safety and error prevention.
Definition:
object Styles extends StyleSheet.Inline {
import dsl._
// This is a style for a container
// with a <label> and an <input type=checkbox> in it
val example = styleC {
val top = styleS(display.block)
val lbl = styleS(fontWeight.bold)
val chk = styleS(backgroundColor.red, marginLeft(1 ex))
top.named('outer) :*: lbl.named('label) :*: chk.named('checkbox)
}
}
Usage:
def featureActiveCheckbox(on: Boolean): ReactElement =
Styles.example('outer )(outerStyle =>
_('label )(labelStyle =>
_('checkbox)(inputStyle =>
<.div(outerStyle,
<.label(labelStyle, "Feature Active:"),
<.input(inputStyle, ^.typ := "checkbox", ^.value := on))
)))
Error prevention: arity
// Forgot outerStyle. Compile error!
def featureActiveCheckbox(on: Boolean): ReactElement =
Styles.example('label )(labelStyle =>
_('checkbox)(inputStyle =>
<.div(
<.label(labelStyle, "Feature Active:"),
<.input(inputStyle, ^.typ := "checkbox", ^.value := on))
))
Error prevention: order
// The second style is for the label, not the checkbox. Compile error!
def featureActiveCheckbox(on: Boolean): ReactElement =
Styles.example('outer )(outerStyle =>
_('checkbox)(inputStyle =>
_('label )(labelStyle =>
<.div(outerStyle,
<.label(labelStyle, "Feature Active:"),
<.input(inputStyle, ^.typ := "checkbox", ^.value := on))
)))
ScalaCSS's philosophy is to provide tools, not force decisions upon you.
If you want or need to style children without type-safety, you can do so
using unsafeChild
. It works just like how you'd expect it to if you were
using SASS or LESS.
object YOLO extends StyleSheet.Inline {
import dsl._
val example = style(
...,
unsafeChild("label")(
...
),
unsafeChild("input")(
...
)
)
}
This is named unsafeChild
to highlight that you're opting out of type-safety
and that care should be taken during refactoring and style management.
It is not unsafe in other ways — your other styles will be completely
unaffected, servers won't catch fire, your mother won't fall down stairs.


Web Quick Guide
This is good stuff I can refer back to.
Git
- Open GitBash
- Navigate to the directory you want as a local repo
- Type: git init
- Type this to make sure there has been a change (you should see red text): git status
- Type: git add .
- Type: git commit -m "Initialize repo”
- Go to GitHub
- Make a new repo there with the exact same name as your local directory.
- Copy the URL for the repo:
- Go back to GitBash and type: git remote add origin url
- Type: git push origin master
- To back to GitHub and check to make sure all your files are in the repo.


<<set $pan="dropped">>The guard is no longer an impediment to your escape, getting down safely might be however.\n\nReturn to the looking around the [[bedroom|The Bedroom]].
The shark has pearly teeth dear\nand he keeps them out of sight\nBut from this blade you needn't fear\nit's only a kitchen knife.\n\n<<if $knife eq false>>With a good tug it seems it would be [[removable|Remove Knife]].<<endif>>\n\nReturn to the looking around the [[bedroom|The Bedroom]].
Kulhwch
Here you have slept and dreamt of her\nupon this fine four poster bed\nBut now you wish upon her breast\nis where you could now rest your head.\n\nExamine the [[sheets|Examine Sheets]]<<if $pan neq "dropped">>, or look under the [[bed|Chamber Pot]].<<endif>>\n\nReturn to the looking around the [[bedroom|The Bedroom]].
<<set $curtains="cut">>The curtains are now removed from the rail.\n\nReturn to the looking around the [[bedroom|The Bedroom]].
Even a stately royal [[chamber|Examine Room]]\ncan seem a prison to a prince\nWith [[locks|Examine Door]] of a higher caliber\nbut still a captive in affluence\n\nExamine the [[window|Examine Window]], [[table|Examine Table]], or [[bed|Examine Bed]].\n\n<<if $knife eq true>>You are holding the small [[knife|Examine Knife]].<<endif>>\n
A guard below goes\nabout his duties \nto and fro\npacing back and forth \nfar below \nyour window.\n\n<<if $pan eq "found">>Wasn't there something under the bed that could [[render that guard useless|Knock Out Guard]]<<endif>>\n\nReturn to the looking around the [[bedroom|The Bedroom]].
Fine sheets of linen\nThe strongest man\ncould not tear them.\n\n<<if $curtains eq "cut">>A clever fellow might consider [[tying|Tie Sheets]] the sheets to the curtains.<<endif>>\n\nReturn to the looking around the [[bedroom|The Bedroom]].
This table is ornate, of the finest craftmanship\nYet this furniture serves a very simple purpose\nNow is not the time to practice your penmanship\nBut maybe there's something useful on its surface\n\nAn old moldy [[cheese|Examine Cheese]] seems to be becoming part of the wood. <<if $knife eq false>> A small [[knife|Examine Knife]] rests within its rind.<<endif>>\n\nReturn to the looking around the [[bedroom|The Bedroom]].
\n\n''Your Predicament''\n\nThe queen, your jealous stepmother\nhas put a stop to your romantic quest\nto separate you being with your lover\nand to make sure you fail your test\n\nSo she has locked you in your room\nand she will never let you go free\nand every hour closer your death looms\nunless you can find some way to flee\n<<set $knife=false>><<set $curtains="hanging">><<set $pan="hidden">>\n[[Try to escape|The Bedroom]]
These very heavy curtains\nare far from being frail\nthey're thick for certain\nsecured fast to the rail.\n\n<<if $knife eq true>>The knife you are holding could [[cut|Cut Curtains]] these curtains down, if you were so inclined.<<endif>>\n\nReturn to the looking around the [[bedroom|The Bedroom]].
The only way out keeps you in\nshut tight and without a gap\nThis is where your problems begin\nIt has made your room a trap.\n\nReturn to the looking around the [[bedroom|The Bedroom]].
A chamber pot\nwe should not\ndisparage\nThe humble lot\nto hold our rot\nits usage.\n<<set $pan="found">>\nReturn to the looking around the [[bedroom|The Bedroom]].
In castles love is often imprisoned\nand from the world such loves do hide\nYet love scales walls when hands couldn't\nand across deep moats such loves abide\n\n<<if $curtains eq "hanging">>Examine the [[curtains|Examine Curtains]]<<endif>><<if $curtains eq "cut">>There are curtains here on the floor.<<endif>>\n<<if $pan neq "dropped">>Look [[outside|Examine Outside]].<<endif>>\n\nReturn to the looking around the [[bedroom|The Bedroom]].
A room commodious with ceiling tall\nit has at moments brought peace sublime\nyet now trapped it seems unbearably small\nand you cannot wait to escape this time.\n\nReturn to the looking around the [[bedroom|The Bedroom]].
<<set $sheets="tied">>You tied the two together, and dropped them out the window. <<if $pan neq "dropped">>However, you didn't take care of the guard first, and he sounded an alarm. Now your chance of escape is gone!<<endif>><<if $pan eq "dropped">>Fortunately, having already disposed of the guard you were able to make your escape!<<endif>>
Manys the night I've dreamed of cheese\nbut such dreams would not now please\nBut could this be what you may yet need\nif in leaving this room you do succeed?\n\n<<if $knife eq false>> There is a knife stuck in the rind. With a good tug it seems it would be [[removable|Remove Knife]]<<endif>> \nReturn to the looking around the [[bedroom|The Bedroom]].
<<set $knife=true>>You are now carrying the knife.\n\nLook around the [[bedroom|The Bedroom]] again if you like.\n


Food
Culture
Events
Location
Your reservation for
under
has been confirmed!
A confirmation email has been sent to
and you should be receiving it momentarily.
We'll see you on
,
at
!


{{ .Page.Params.header }}
Corda Documentation
{{ .Page.Params.tagline }}
Corda
Access the documentation for Corda - our open source blockchain platform.
- Developing CorDapps
- Administering a Corda Node
- Issuing an asset
- Participating in a network
- Business Network Operator (BNO)
Corda Enterprise
Access documentation for the commercial edition of Corda - a platform optimised to meet the privacy, security, and efficiency demands of business in a connected world.
- Developing CorDapps
- Administering a Corda Node
- Issuing an asset
- Participating in a network
-
Business
Network Operator (BNO)
- Understanding Corda Networks
- Network map
- Corda Enterprise notary service overview
- Public Key Infrastructure (PKI) Tool
- Certificate Hierarchy Guide
- Network certificates
- Read more...
- Network operator
CENM
The Corda Enterprise Network Manager (CENM) is a commercial product that allows you to run your own Corda network. Access the documentation to install and operate all aspects of deployment, operation, and consensus rules.
- Concepts and Overview
- CENM Releases
- Operations
- CENM Deployment with Docker, Kubernetes, and Helm charts
- Angel Service
- Auth service
- Gateway Service
- CENM test environment quick start guide
- Identity Manager Service
- Network Map Service
- Signing and SMR Services
- Zone Service
- Updating the network parameters
- Obfuscated configuration file changes
- Upgrading Corda Enterprise Network Manager
- CENM Databases
- Troubleshooting common issues
- CENM support matrix
- Configuration
- Tools & Utilities
- Public Key Infrastructure
- Signing Plugin Samples
Tutorials
The Hello, World! tutorials should be followed in sequence and show how to extend the Java or Kotlin CorDapp Template into a full CorDapp.
The remaining tutorials cover individual platform features in isolation. They don't depend on the code from the Hello, World! tutorials, and can be read in any order.
- Hello, World!
- Other tutorials
- Writing a contract
- Writing a contract test
- Upgrading contracts
- Integration testing
- Using the client RPC API
- Building transactions
- Writing flows
- Writing flow tests
- Writing oracle services
- Writing a custom notary service (experimental)
- Transaction tear-offs
- Using attachments
- Event scheduling
- Observer nodes
Featured apps
Explore the documentation for some of Corda's most popular features, apps, and tools.
Training
Learn the fundamentals of Corda, start coding, and become a CorDapp developer with our training site at training.corda.net.


TMS
Timetable Management System
Home
About Us
Contact
LogIn
Sign Up
Account Signup
Male:
Female:
Sign Up
Forgot
User name / password?
Log In


Age: 25
Born: London
Currently: The Texas Tribune in Austin, Texas
Undergrad: Coventry University, Business Management
Graduate: University of Missouri, Data Journalism
Sports:
- Basketball - Raptors, Mizzou and Wichita State
- Baseball - Blue Jays
- Football - Watford
Fave TV Shows:
- Prison Break
- Breaking Bad
- An Idiot Abroad


All functions |
|
|---|---|
HTTPInteraction class |
|
HTTPInteractionList class |
|
Null list, an empty HTTPInteractionList object |
|
RequestHandler |
|
RequestHandlerCrul - methods for crul package |
|
RequestHandlerHttr - methods for httr package |
|
RequestMatcherRegistry class |
|
UnhandledHTTPRequestError |
|
Coerce names, etc. to cassettes |
|
List cassettes, get current cassette, etc. |
|
An HTTP request as prepared by the crul package |
|
Eject a cassette |
|
Get the http interactions of the current cassette |
|
Insert a cassette to record HTTP requests |
|
Turn vcr on and off, check on/off status, and turn off for a given http call |
|
Are real http connections allowed? |
|
vcr recording options |
|
vcr request matching |
|
Using vcr for unit testing |
|
Use a cassette |
|
Setup vcr for a package |
|
vcr: Record HTTP Calls to Disk |
|
|
|
Configuration |


Clone js4cytoscape repository from GitHub, the GitHub source for the js4cytoscape is available at https://github.com/cytoscape/js4cytoscape
You will find main.js file in the dist folder, and you can copy main.js into your web page folder.
Copy the following code, and paste it in your html file.
<type="text/javascript", src="/Users/yxin/git/cytoscape/js4cytoscape/dist/main.js"></script>
<script type="text/javascript">
window.onload = checkCytoscape();
</script>
<button class="cytobutton", id="cytobutton", title="Cytoscape is connected">Cytoscape is connected</button>
You can modify the style by using class="cytobutton", id="cytobutton" in css file.
You will see a button in your web page, if the Cytoscape is installed and opened on your machine, the button will show "Cytoscape is connected".
If the Cytoscape desktop application is not installed and opened, the button will show "Download Cytoscape".


You crave the freedom and power of a bicycle underneath you, and the exciting prospect of Portland's bike routes ahead.
You need to harness the resources of BikeTown™, stat!
But where is the nearest BikeTown™ station to you? The Find My BikeTown app is here to help.
Enter your address and our app will list and show you the closest BikeTown™ station to your location.
Don't wait. Get riding.


July 2016 to Present (2 months)
August 2015 to May 2016 (10 months)
November 2014 to June 2015 (8 months)
March 2015 to March 2015 (1 month)
August 2016 to May 2017 (10 months)
2014 - 2015
2012 - 2014
2009 - 2011
2005 - 2009