San Francisco has plenty activites that can fit into the slimiest of budgets. From walking through a stone maze to cruising under the Golden Gate Bridge.
Put on your hiking boots and hike Emerald State Park to get a glimspe of Lake Tahoes beauty. Stare deep into Marcus Ashley Fine Art Gallery.
Walk along the star studded path at the Hollywood Walk of Fame or gaze into our galaxy at the Getty Muesem.
Explore the culture.
Hike. Swim. Ski.
Hollywood. Disney. Stars.


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


Weierstrass form of a toric elliptic curve#
There are 16 reflexive polygons in the plane, see
ReflexivePolytopes()
. Each of
them defines a toric Fano variety. And each of them has a unique
crepant resolution to a smooth toric surface (Section 10.4 in [CLS2011]) by
subdividing the face fan. An anticanonical hypersurface defines an
elliptic curve in this ambient space, which we call a toric elliptic
curve. The purpose of this module is to write an anticanonical
hypersurface equation in the short Weierstrass form \(y^2 = x^3 + f x +
g\). This works over any base ring as long as its characteristic \(\not=
2,3\).
For an analogous treatment of elliptic curves defined as complete
intersection in higher dimensional toric varieties, see
the module weierstrass_higher
.
Technically, this module computes the Weierstrass form of the Jacobian of the elliptic curve. This is why you will never have to specify the origin (or zero section) in the following.
It turns out [Bra2011] that the anticanonical hypersurface equation of any one of the above 16 toric surfaces is a specialization (that is, set one or more of the coefficients to zero) of the following three cases. In inhomogeneous coordinates, they are
Cubic in \(\mathbb{P}^2\):
\[\begin{split}\begin{split} p(x,y) =&\; a_{30} x^{3} + a_{21} x^{2} y + a_{12} x y^{2} + a_{03} y^{3} + a_{20} x^{2} + \\ &\; a_{11} x y + a_{02} y^{2} + a_{10} x + a_{01} y + a_{00} \end{split}\end{split}\]Biquadric in \(\mathbb{P}^1\times \mathbb{P}^1\):
\[\begin{split}\begin{split} p(x,y) =&\; a_{22} x^2 y^2 + a_{21} x^2 y + a_{20} x^2 + a_{12} x y^2 + \\ &\; a_{11} x y + x a_{10} + y^2 a_{02} + y a_{01} + a_{00} \end{split}\end{split}\]Anticanonical hypersurface in weighted projective space \(\mathbb{P}^2[1,1,2]\):
\[\begin{split}\begin{split} p(x,y) =&\; a_{40} x^4 + a_{30} x^3 + a_{21} x^2 y + a_{20} x^2 + \\ &\; a_{11} x y + a_{02} y^2 + a_{10} x + a_{01} y + a_{00} \end{split}\end{split}\]
EXAMPLES:
The main functionality is provided by WeierstrassForm()
, which
brings each of the above hypersurface equations into Weierstrass
form:
sage: R.<x,y> = QQ[]
sage: cubic = x^3 + y^3 + 1
sage: WeierstrassForm(cubic)
(0, -27/4)
sage: WeierstrassForm(x^4 + y^2 + 1)
(-4, 0)
sage: WeierstrassForm(x^2*y^2 + x^2 + y^2 + 1)
(-16/3, 128/27)
Only the affine span of the Newton polytope of the polynomial matters. For example:
sage: R.<x,y,z> = QQ[]
sage: WeierstrassForm(x^3 + y^3 + z^3)
(0, -27/4)
sage: WeierstrassForm(x * cubic)
(0, -27/4)
This allows you to work with either homogeneous or inhomogeneous variables. For example, here is the del Pezzo surface of degree 8:
sage: dP8 = toric_varieties.dP8()
sage: dP8.inject_variables()
Defining t, x, y, z
sage: WeierstrassForm(x*y^2 + y^2*z + t^2*x^3 + t^2*z^3)
(-3, -2)
sage: WeierstrassForm(x*y^2 + y^2 + x^3 + 1)
(-3, -2)
By specifying only certain variables we can compute the Weierstrass form over the polynomial ring generated by the remaining variables. For example, here is a cubic over \(\QQ[a]\)
sage: R.<a, x, y, z> = QQ[]
sage: cubic = x^3 + a*y^3 + a^2*z^3
sage: WeierstrassForm(cubic, variables=[x,y,z])
(0, -27/4*a^6)
REFERENCES:
- sage.schemes.toric.weierstrass.Discriminant(polynomial, variables=None)#
The discriminant of the elliptic curve.
INPUT:
See
WeierstrassForm()
for how to specify the input polynomial(s) and variables.OUTPUT: The discriminant of the elliptic curve.
EXAMPLES:
sage: from sage.schemes.toric.weierstrass import Discriminant sage: R.<x, y, z> = QQ[] sage: Discriminant(x^3 + y^3 + z^3) 19683/16 sage: Discriminant(x*y*z) 0 sage: R.<w,x,y,z> = QQ[] sage: quadratic1 = w^2 + x^2 + y^2 sage: quadratic2 = z^2 + w*x sage: Discriminant([quadratic1, quadratic2]) -1/16
- sage.schemes.toric.weierstrass.Newton_polygon_embedded(polynomial, variables)#
Embed the Newton polytope of the polynomial in one of the three maximal reflexive polygons.
This function is a helper for
WeierstrassForm()
INPUT:
Same as
WeierstrassForm()
with only a single polynomial passed.OUTPUT:
A tuple \((\Delta, P, (x,y))\) where
\(\Delta\) is the Newton polytope of
polynomial
.\(P(x,y)\) equals the input
polynomial
but with redefined variables such that its Newton polytope is \(\Delta\).
EXAMPLES:
sage: from sage.schemes.toric.weierstrass import Newton_polygon_embedded sage: R.<x,y,z> = QQ[] sage: cubic = x^3 + y^3 + z^3 sage: Newton_polygon_embedded(cubic, [x,y,z]) (A 2-dimensional lattice polytope in ZZ^3 with 3 vertices, x^3 + y^3 + 1, (x, y)) sage: R.<a, x,y,z> = QQ[] sage: cubic = x^3 + a*y^3 + a^2*z^3 sage: Newton_polygon_embedded(cubic, variables=[x,y,z]) (A 2-dimensional lattice polytope in ZZ^3 with 3 vertices, a^2*x^3 + y^3 + a, (x, y)) sage: R.<s,t,x,y> = QQ[] sage: biquadric = (s+t)^2 * (x+y)^2 sage: Newton_polygon_embedded(biquadric, [s,t,x,y]) (A 2-dimensional lattice polytope in ZZ^4 with 4 vertices, s^2*t^2 + 2*s^2*t + 2*s*t^2 + s^2 + 4*s*t + t^2 + 2*s + 2*t + 1, (s, t))
- sage.schemes.toric.weierstrass.Newton_polytope_vars_coeffs(polynomial, variables)#
Return the Newton polytope in the given variables.
INPUT:
See
WeierstrassForm()
for how to specify the input polynomial and variables.OUTPUT:
A dictionary with keys the integral values of the Newton polytope and values the corresponding coefficient of
polynomial
.EXAMPLES:
sage: from sage.schemes.toric.weierstrass import Newton_polytope_vars_coeffs sage: R.<x,y,z,a30,a21,a12,a03,a20,a11,a02,a10,a01,a00> = QQ[] sage: p = (a30*x^3 + a21*x^2*y + a12*x*y^2 + a03*y^3 + a20*x^2*z + ....: a11*x*y*z + a02*y^2*z + a10*x*z^2 + a01*y*z^2 + a00*z^3) sage: p_data = Newton_polytope_vars_coeffs(p, [x,y,z]); p_data {(0, 0, 3): a00, (0, 1, 2): a01, (0, 2, 1): a02, (0, 3, 0): a03, (1, 0, 2): a10, (1, 1, 1): a11, (1, 2, 0): a12, (2, 0, 1): a20, (2, 1, 0): a21, (3, 0, 0): a30} sage: from sage.geometry.polyhedron.ppl_lattice_polytope import LatticePolytope_PPL sage: polytope = LatticePolytope_PPL(list(p_data)); polytope A 2-dimensional lattice polytope in ZZ^3 with 3 vertices sage: polytope.vertices() ((0, 0, 3), (3, 0, 0), (0, 3, 0)) sage: polytope.embed_in_reflexive_polytope() The map A*x+b with A= [-1 -1] [ 0 1] [ 1 0] b = (3, 0, 0)
- sage.schemes.toric.weierstrass.WeierstrassForm(polynomial, variables=None, transformation=False)#
Return the Weierstrass form of an elliptic curve inside either inside a toric surface or \(\mathbb{P}^3\).
INPUT:
polynomial
– either a polynomial or a list of polynomials defining the elliptic curve. A single polynomial can be either a cubic, a biquadric, or the hypersurface in \(\mathbb{P}^2[1,1,2]\). In this case the equation need not be in any standard form, only its Newton polyhedron is used. If two polynomials are passed, they must both be quadratics in \(\mathbb{P}^3\).variables
– a list of variables of the parent polynomial ring orNone
(default). In the latter case, all variables are taken to be polynomial ring variables. If a subset of polynomial ring variables are given, the Weierstrass form is determined over the function field generated by the remaining variables.transformation
– boolean (default:False
). Whether to return the new variables that bringpolynomial
into Weierstrass form.
OUTPUT:
The pair of coefficients \((f,g)\) of the Weierstrass form \(y^2 = x^3 + f x + g\) of the hypersurface equation.
If
transformation=True
, a triple \((X,Y,Z)\) of polynomials defining a rational map of the toric hypersurface or complete intersection in \(\mathbb{P}^3\) to its Weierstrass form in \(\mathbb{P}^2[2,3,1]\) is returned. That is, the triple satisfies\[Y^2 = X^3 + f X Z^4 + g Z^6\]when restricted to the toric hypersurface or complete intersection.
EXAMPLES:
sage: R.<x,y,z> = QQ[] sage: cubic = x^3 + y^3 + z^3 sage: f, g = WeierstrassForm(cubic); (f, g) (0, -27/4)
Same in inhomogeneous coordinates:
sage: R.<x,y> = QQ[] sage: cubic = x^3 + y^3 + 1 sage: f, g = WeierstrassForm(cubic); (f, g) (0, -27/4) sage: X,Y,Z = WeierstrassForm(cubic, transformation=True); (X,Y,Z) (-x^3*y^3 - x^3 - y^3, 1/2*x^6*y^3 - 1/2*x^3*y^6 - 1/2*x^6 + 1/2*y^6 + 1/2*x^3 - 1/2*y^3, x*y)
Note that plugging in \([X:Y:Z]\) to the Weierstrass equation is a complicated polynomial, but contains the hypersurface equation as a factor:
sage: -Y^2 + X^3 + f*X*Z^4 + g*Z^6 -1/4*x^12*y^6 - 1/2*x^9*y^9 - 1/4*x^6*y^12 + 1/2*x^12*y^3 - 7/2*x^9*y^6 - 7/2*x^6*y^9 + 1/2*x^3*y^12 - 1/4*x^12 - 7/2*x^9*y^3 - 45/4*x^6*y^6 - 7/2*x^3*y^9 - 1/4*y^12 - 1/2*x^9 - 7/2*x^6*y^3 - 7/2*x^3*y^6 - 1/2*y^9 - 1/4*x^6 + 1/2*x^3*y^3 - 1/4*y^6 sage: cubic.divides(-Y^2 + X^3 + f*X*Z^4 + g*Z^6) True
Only the affine span of the Newton polytope of the polynomial matters. For example:
sage: R.<x,y,z> = QQ[] sage: cubic = x^3 + y^3 + z^3 sage: WeierstrassForm(cubic.subs(z=1)) (0, -27/4) sage: WeierstrassForm(x * cubic) (0, -27/4)
This allows you to work with either homogeneous or inhomogeneous variables. For example, here is the del Pezzo surface of degree 8:
sage: dP8 = toric_varieties.dP8() sage: dP8.inject_variables() Defining t, x, y, z sage: WeierstrassForm(x*y^2 + y^2*z + t^2*x^3 + t^2*z^3) (-3, -2) sage: WeierstrassForm(x*y^2 + y^2 + x^3 + 1) (-3, -2)
By specifying only certain variables we can compute the Weierstrass form over the function field generated by the remaining variables. For example, here is a cubic over \(\QQ[a]\)
sage: R.<a, x,y,z> = QQ[] sage: cubic = x^3 + a*y^3 + a^2*z^3 sage: WeierstrassForm(cubic, variables=[x,y,z]) (0, -27/4*a^6)
- sage.schemes.toric.weierstrass.WeierstrassForm_P1xP1(biquadric, variables=None)#
Bring a biquadric into Weierstrass form
Input/output is the same as
WeierstrassForm()
, except that the input polynomial must be a standard biquadric in \(\mathbb{P}^2\),\[\begin{split}\begin{split} p(x,y) =&\; a_{40} x^4 + a_{30} x^3 + a_{21} x^2 y + a_{20} x^2 + \\ &\; a_{11} x y + a_{02} y^2 + a_{10} x + a_{01} y + a_{00} \end{split}\end{split}\]EXAMPLES:
sage: from sage.schemes.toric.weierstrass import WeierstrassForm_P1xP1 sage: R.<x0,x1,y0,y1> = QQ[] sage: biquadric = (x0^2*y0^2 + x0*x1*y0^2*2 + x1^2*y0^2*3 ....: + x0^2*y0*y1*4 + x0*x1*y0*y1*5 + x1^2*y0*y1*6 ....: + x0^2*y1^2*7 + x0*x1*y1^2*8) sage: WeierstrassForm_P1xP1(biquadric, [x0, x1, y0, y1]) (1581/16, -3529/32)
Since there is no \(x_1^2 y_1^2\) term in
biquadric
, we can dehomogenize it and get a cubic:sage: from sage.schemes.toric.weierstrass import WeierstrassForm_P2 sage: WeierstrassForm_P2(biquadric(x0=1,y0=1)) (1581/16, -3529/32)
- sage.schemes.toric.weierstrass.WeierstrassForm_P2(polynomial, variables=None)#
Bring a cubic into Weierstrass form.
Input/output is the same as
WeierstrassForm()
, except that the input polynomial must be a standard cubic in \(\mathbb{P}^2\),\[\begin{split}\begin{split} p(x,y) =&\; a_{30} x^{3} + a_{21} x^{2} y + a_{12} x y^{2} + a_{03} y^{3} + a_{20} x^{2} + \\ &\; a_{11} x y + a_{02} y^{2} + a_{10} x + a_{01} y + a_{00} \end{split}\end{split}\]EXAMPLES:
sage: from sage.schemes.toric.weierstrass import WeierstrassForm_P2 sage: R.<x,y,z> = QQ[] sage: WeierstrassForm_P2(x^3 + y^3 + z^3) (0, -27/4) sage: R.<x,y,z, a,b> = QQ[] sage: WeierstrassForm_P2(-y^2*z + x^3 + a*x*z^2 + b*z^3, [x,y,z]) (a, b)
- sage.schemes.toric.weierstrass.WeierstrassForm_P2_112(polynomial, variables=None)#
Bring an anticanonical hypersurface in \(\mathbb{P}^2[1,1,2]\) into Weierstrass form.
Input/output is the same as
WeierstrassForm()
, except that the input polynomial must be a standard anticanonical hypersurface in weighted projective space \(\mathbb{P}^2[1,1,2]\):\[\begin{split}\begin{split} p(x,y) =&\; a_{40} x^4 + a_{30} x^3 + a_{21} x^2 y + a_{20} x^2 + \\ &\; a_{11} x y + a_{02} y^2 + a_{10} x + a_{01} y + a_{00} \end{split}\end{split}\]EXAMPLES:
sage: from sage.schemes.toric.weierstrass import WeierstrassForm_P2_112 sage: fan = Fan(rays=[(1,0),(0,1),(-1,-2),(0,-1)], ....: cones=[[0,1],[1,2],[2,3],[3,0]]) sage: P112.<x,y,z,t> = ToricVariety(fan) sage: (-P112.K()).sections_monomials() (z^4*t^2, x*z^3*t^2, x^2*z^2*t^2, x^3*z*t^2, x^4*t^2, y*z^2*t, x*y*z*t, x^2*y*t, y^2) sage: WeierstrassForm_P2_112(sum(_), [x,y,z,t]) (-97/48, 17/864)
- sage.schemes.toric.weierstrass.j_invariant(polynomial, variables=None)#
Return the \(j\)-invariant of the elliptic curve.
INPUT:
See
WeierstrassForm()
for how to specify the input polynomial(s) and variables.OUTPUT:
The j-invariant of the (irreducible) cubic. Notable special values:
The Fermat cubic: \(j(x^3+y^3+z^3) = 0\)
A nodal cubic: \(j(-y^2 + x^2 + x^3) = \infty\)
A cuspidal cubic \(y^2=x^3\) has undefined \(j\)-invariant. In this case, a
ValueError
is raised.
EXAMPLES:
sage: from sage.schemes.toric.weierstrass import j_invariant sage: R.<x,y,z> = QQ[] sage: j_invariant(x^3 + y^3 + z^3) 0 sage: j_invariant(-y^2 + x^2 + x^3) +Infinity sage: R.<x,y,z, a,b> = QQ[] sage: j_invariant( -y^2*z + x^3 + a*x*z^2, [x,y,z]) 1728


There is one file to download for the libGPF library - GPF.tgz . This includes
My own FAQ on Fortran is also available, with links to other Fortran resources.
Assuming a recent version of gfortran is on your system you can download the file and place it in an empty directory and entertar xvfz GPF.tgz # if you are not on a platform with X11, ncurses, readline, and # sqlite you might have to remove some of the files from the # Makefile, and change the compiler and loader options if not # using gfortran(1) and gcc(1). It is usually easiest to try # it and then handle any failures individually ... make # you might want to edit hershey.sh to select where hershey # font files will be installed (default is /usr/share/hershey), # and then enter ... bash hershey.sh # if you do not have bash or a Posix shell you will have to run # the h2v program for each font, as illustrated by the simple # hershey.sh script. # By default, the graphics routines require X11, the ncurses interface # assumes libncurses is installed, the SQLite3 interface needs the # libsqlite3 library, and the readline interface needs libreadline. # These libraries are commonly available on many platforms but you # may have to remove some of the files from the makefile and the # compile if you do not want to build those interfaces, or install # these libraries.
This will compile the GPF procedures and sample utility programs.
For other programming environments you will need to change the lines in the Makefile that define the compiler command. Many Fortran 2003 features are required. Recently, I have only tested with GNU Fortran (GCC) 7.3.0 .
Note to run the graphics programs you generally have to set some environmental variables. Some examples:
export M_DRAW_FONTLIB=/usr/share/hershey export M_DRAW_DEVICE=X11 export M_DRAW_OUTPUT=out.pdf or export M_DRAW_OUTPUT="|ppmtogif > out.gif"
# Totally optionally, to build all the sample programs including # the small sample programs from the man(1) pages #!/bin/bash make PROGFILES="$(find PROGRAMS -name '*.f90' ! -empty)" -j 10
The man(1) pages are particularly useful when working with the code files when used with editors such as vim(1) and emacs(1). Several editors can now look up and display the man(1) pages for a routine from inside the editors. Place your cursor over a function name in the example programs and enter "K" in vim(1) to access the man(1) page for a procedure, for example. Typically, you set the MANPATH environment variable to include the full pathname to the man/ directory first. Something like
export MANPATH=/home/$USER/GPF/man:$MANPATH::(assuming you installed the source in /home/$USER/GPF) will work, depending on what shell you are using.
HTML documents are the most complete reference, as they include some higher-level overviews of the larger module files that are not currently included in the man(1) pages. Otherwise, the HTML documents are for the most part generated from the man(1) pages.
Special HTML files use javascript to append groups of the HTML documents into a single manual.
Most of the code is maintained using a custom programming environment. The original source files are mostly ufpp(1) input files and/or HTML documents. To eliminate the need to install this custom environment all the source files have been expanded to standard Fortran and C source.
To simplify building the resulting collection of code a make(1) file has been automatically generated using makeout(1) to compile the sources.
Using a variety of utilities (primarily ufpp(1) and txt2man(1) ) the help text is generally part of the source file and automatically converted to comments, flat text, HTML and man(1) pages.
For those interested (particulary since ufpp(1) is one of the utilities included in this collection) most of the source is kept as ufpp(1) files. ufpp(1) can write text blocks to various files. This allows basic documentation to easily be maintained with the source. These blocks are then converted either into comments or help functions in the code by ufpp(1), but also optionally written to a common directory where they can be further processed, if required (they might already be HTML, which generally does not need further processing). For simple routines the documentation is often written to look like a flat text version of a man(1) page; which has proven to be a good standard for documenting procedures, which many people are familiar with, and integrates into Unix/Linux environments and tools. The txt2man(1) utility is used to convert the flat files to *roff files; other files are run thru markdown(1) or LaTex(1) or other utilities as appropriate, based on the suffix of the files.
The utility groff(1) was originally used to convert the man(1) pages to HTML and PDF but it has a bug as of this writing where it removes significant spaces when generating HTML; so the man(1) pages are now formatted using manserver.pl. Also see rman(1), html2man(1), and roff2html(1). It sounds complicated but is totally automated just using a few bash(1) scripts to glue it together, and provides for an easy way to maintain documentation and source in the same file.


Travel to the 27 vibrant states in the multilingual, multicultural and pluralistic Union of India. Each of the Indian states has something exclusive to offer to wide-eyed tourists who flock throughout the year. India is a major travel and tourist destination because of its rich and versatile travel experience in terms of recreational and adventure activities, historic and modern tourist sites, cultural and spiritual insight. Travel to India is like exploring its treasure trove. The priceless monuments like the Taj Mahal and the Imambara attract tourists to India besides revealing its rich architectural and cultural heritage.
There are several pilgrim tours to the Indian states that are of tourist interest. Devotees and tourists travel to the sacred shrines that dot the holy land of India. For the tourists who love nature, animal and adventure the various Indian states offer wildlife tours. Travelling to the incomparable Indian states offers variety of sights, sounds and smells. Tourists are spellbound by travelling to the hill resorts and beaches. Holiday tours, picnics, vacations are the best spent in India. Amongst the Indian states most travelled by tourists are Goa, Kerala, Rajasthan, Himachal Pradesh, Tamil Nadu, Sikkim, Uttarakhand, Bihar, Karnataka and Arunachal Pradesh.


Hamara Products’ mission is to provide all women high quality vegan friendly shampoos, conditioners, and body washes at affordable prices.
Min Ji-U, owner of Razzle Dazzle
Razzle Dazzle is renowned for their certified organic face washes and essential oil infused deoderants,specially tailored for women with sensitive skin.
Antónia Angela, owner of Artemis
Artemis is a handcrafted haircare product brand that uses high-quality natural ingredients to create soap designed for the amazing lives of woman around the world.
Thulile Temitope, owner of ReClean
ReClean is dedicated to provide women with affordable vegan makeup made with organic ingredients specially tailored to your beauty needs.
Lise Elsie, owner of Mariyam Beauty
Mariyam Beauty is committeed to providing women with affordable skincare products made from GMO-free ingredients that will leave you feeling revitalized and rejuevenated.


[1]
Blue Tooth,Announces Street Names; mini USB on back of unit
[2]
Plenty of volume. Bright display.; Warnings and turns given too late


{% extends "_layouts/govuk-paas-docs.html" %} {% set section = "documentation" %} {% block techdoc_content %}
The cf push
command is used both to create a new app and to push a new version of an existing one. The basic steps:
Check out whatever version of the code you want to deploy from version control.
git checkout master
Target the appropriate organisation and space.
cf target -o SOMEORG -s SOMESPACE
Deploy the application by running:
cf push APPNAME
from the directory where you checked out the code.
The app should now be live at https://APPNAME.cloudapps.digital
.
There are many options available when you push
an app. You can optionally set them in a manifest.yml
file in the directory from which you are running the push
command. See the Cloud Foundry documentation on Deploying with Application Manifests for details.
For a production app, you should run at least two instances to ensure availability.
After deployment, you can increase the running instances to two using:
cf scale APPNAME -i 2
Cloud Foundry isn’t version-control aware, so cf push
will deploy the working state of whatever files you have in that directory. In most cases, you will want to exclude files ignored by Git. From within your project directory, run:
ln -s .gitignore .cfignore
and commit the .cfignore
file to your repository.
If you have a more advanced CF setup, bear in mind these points about .cfignore
:
If you have a more advanced app setup and have apps with a path
other than the project root (where you run cf push
from), you will need an additional .cfignore
file located in each app path
;
Also note that more advanced .gitignore
syntax, such as the **
recursive subdirectory wildcard, are not supported by .cfignore
.
All the configuration information for your app must be stored as environment variables, not in the code.
This includes credentials for external services that your app uses, such as a Twitter account, as well as values that will vary with each deployment of the app, like the canonical URL.
To view an app’s current environment variables, run:
cf env APPNAME
To create or update a variable, use:
cf set-env APPNAME ENV_VAR_NAME ENV_VAR_VALUE
If you’re deploying a pre-existing app that was written with 12-factor in mind, check the app’s documentation for any environment variables you need to set.
If the app has instructions to deploy to Heroku, and tells you to do something like:
heroku config:set VARIABLE=value
then you should do the equivalent command with cf set-env
:
cf set-env APPNAME VARIABLE value
There are two system-provided environment variables which contain information in JSON format.
To see the values of the system-provided variables, use:
cf env APPNAME
If your app connects to a backing service, you may need to have it parse VCAP_SERVICES to get the credentials and other settings relating to that service and set the appropriate environment variables.
However, some buildpacks will do this for you automatically. See the deploy instructions for the language/framework you are using for details.
For more information, see Cloud Foundry’s Cloud Foundry Environment Variables documentation.
Your tenant account belongs to at least one organisation (“org” for short) within the PaaS. This typically represents the real-world organisation or department you work for. Your co-workers’ tenant accounts will belong to the same org.
To list available orgs, run:
cf orgs
To see details about an org, run:
cf org ORGNAME
where ORGNAME is the name of the org.
Each org is divided into one or more spaces, which are used to organise app development, deployment, and maintenance. For example, you could use separate spaces for development and production versions of your app.
To see the spaces in your current org, run:
cf spaces
To deploy an app, you need to specify a combination of an organisation and a space: this is called the target.
Set the target with:
cf target -o ORGNAME -s SPACENAME
Once you set the target, the Cloud Foundry client remembers it until you change it.
See the Cloud Foundry documentation on Orgs, Spaces, Roles, and Permissions for more details.
This section explains how to create and deploy a static HTML page. It’s worth testing that you can carry out this process before you try to deploy a more complex app.
When you deploy an app, you must select a combination of an organisation and a space: this is called the target (see Orgs, spaces and targets for more information).
We have provided a sandbox
space for you to use for learning about the PaaS. You may want to target the sandbox while you are testing by running:
cf target -s sandbox
It’s also important to realise that if you deploy an app using the same name and target as an existing app, the original will be replaced. If you are not sure about where to deploy your app, consult the rest of your team.
These steps assume you have already carried out the setup process explained in the Quick setup guide section.
In an empty directory, create an index.html
file.
Add some markup to the index.html
file:

<title>Static Site</title>

Welcome to the static site!

Create a manifest.yml
file in the same directory. The manifest file tells
Cloud Foundry what to do with your app.
---
applications:
- name: my-static-site
memory: 64M
buildpack: staticfile_buildpack
Replace my-static-site
with a unique name for your app. (You can use cf apps
to see apps which already exist).
The memory
line tells the PaaS how much memory to allocate to the app.
A buildpack provides any framework and runtime support required by an app. If your app was written in Ruby, you would use ruby_buildpack
. In this case, we just want to serve a static file, so we use staticfile_buildpack
.
From the directory where the manifest.yml
file is, run:
cf push
If you do not specify an app name with the push
command, the name specified in the manifest file is used.
The site should now be live at https://APPNAME.cloudapps.digital
.
Note: The http://
version of the URL will not work. You must enter https://
.
For a production site, you should run at least two instances of the app to ensure availability.
You can add another instance of this static app by running:
cf scale APPNAME -i 2
This section explains minimal steps for deploying a basic Rails app. For full details of how to deploy Ruby on Rails apps, see the official Cloud Foundry guide Getting Started Deploying Ruby on Rails Apps.
These steps assume you have already carried out the setup process explained in the Quick setup guide section.
Note that the only database service currently supported by PaaS is PostgreSQL. If your Rails app requires a database, it must be able to work with PostgreSQL.
Check out your Rails app to a local folder.
If you’re using Rails 4, add the rails_12factor
gem for better logging. Rails 5 has this functionality built in by default.
Create a manifest.yml file in the folder where you checked out your app.
---
applications:
- name: my-rails-app
memory: 256M
buildpack: ruby_buildpack
Replace my-rails-app
with a unique name for your app. (You can use cf apps
to see apps which already exist).
The memory
line tells the PaaS how much memory to allocate to the app.
A buildpack provides any framework and runtime support required by an app. In this case, because the app is written in Ruby, you use the ruby_buildpack
.
If your app does not need a backing service like PostgreSQL, upload and start the application:
cf push APPNAME
from the folder where you checked out your app.
If you do not specify a name for the app after the cf push
command, the name from the manifest file is used.
If your app needs a backing service, upload it but do not start it:
cf push --no-start APPNAME
Set any additional environment variables required by your app. For example:
cf set-env APPNAME VARIABLE `value`
where VARIABLE is a unique name for the variable, and value
is the value to set.
If required, create a PostgreSQL backing service and bind it to your app.
The Cloud Foundry buildpack for Ruby automatically gets the details of the first available PostgreSQL service from the VCAP_SERVICES
environment variable and sets the Ruby DATABASE_URL accordingly.
To enable Rails support for database migrations, you may wish to create a Procfile
in the same directory as your manifest.yml
and Gemfile
.
This is a minimal example of the Procfile
content for Rails 5.0:
web: rake db:migrate && bin/rails server
Once you have created and bound the PostgreSQL service, run:
cf start APPNAME
Your app should now be live at https://APPNAME.cloudapps.digital
!
For a production site, you should run at least two instances of the app to ensure availability.
You can add another instance of your app by running:
cf scale APPNAME -i 2
By default, the Cloud Foundry Ruby buildpack runs bin/rails server
to spin up the application. In Rails 4 and below, this will use WEBrick as the web
server. In Rails 5 and above, the default is
puma.
You may want to use a different web server in production. See the Cloud Foundry docs for more information on configuring a production server [external link].
By default, the Rails buildpack performs asset precompilation during the staging phase. This is fine for most Rails apps, but it won’t work for those which need to connect to services (such as the database) during asset compilation. (For an example, see MyUSA issue #636)
There are multiple potential solutions for this. For more advice, see the Cloud Foundry document on the subject [external link].
This section covers how to deploy a basic Node.js application to Government PaaS. See the Cloud Foundry Tips for Node.js Applications for more details.
Note that the only database service currently supported by PaaS is PostgreSQL. If your Node.js app requires a database, it must be able to work with PostgreSQL.
These instructions assume you have already carried out the setup process explained in the Quick setup guide section.
This is the code for the example app we are going to use. It is a basic web server that responds with a ‘Hello World’ message.
const http = require('http');
const port = process.env.PORT || 3000;
const server = http.createServer((req, res) => {
res.statusCode = 200;
res.setHeader('Content-Type', 'text/plain');
res.end('Hello World\n');
});
server.listen(port, () => {
console.log(`Server running on ${port}/`);
});
Save the code to a new local directory as example.js
.
Add this manifest.yml
file to the same directory:
---
applications:
- name: my-node-app
command: node example.js
memory: 256M
buildpack: nodejs_buildpack
Replace my-node-app
with a unique name for your app. (You can use cf apps
to see apps which already exist).
The memory
line tells the PaaS how much memory to allocate to the app.
A buildpack provides any framework and runtime support required by an app. In this case, because the app is written in Node.js, you use the nodejs_buildpack
.
Include an npm package.json
file to specify dependencies. The file should also specify a start
command used to launch the app.
This is a package.json
file for our example app:
{
"name": "example",
"version": "0.0.1",
"author": "Demo",
"engines": {
"node": "6.1.0",
"npm": "2.7.4"
}
}
The "engines"
values specify the versions of Node.js and npm that the PaaS should use to run your app. Note that older versions may not be available: if your version is not supported, you will see an error message when you try to upload and start the app.
You can optionally run npm install
to preinstall dependencies rather than having them added during the PaaS staging process.
Run cf push APPNAME
to upload and start the app. If you want to upload
the app without starting it (for example, if you need to create a
PostgreSQL service), run cf push --no-start APPNAME
, then when you are
ready to start the app, run cf start APPNAME
.
See Tips for Node.js Applications in the Cloud Foundry documentation for more information.
If your app depends on backing services such as PostgreSQL, it will need to parse the VCAP_SERVICES
environment variable to get required details, such as service URLs and credentials.
You must create the service and bind it to your Node.js app as described in the Deploying Services section.
You can use the cfenv module to assist with parsing the environment variables.
In your package.json
file, you would specify cfenv
as a dependency:
{
//...
"dependencies":
{
"cfenv": "*"
}
}
Then in your app, you can easily get configuration information for backing services. This is an example of how to connect to a PostgreSQL service.
var cfenv = require("cfenv");
var pg = require('pg');
var appEnv = cfenv.getAppEnv();
var connectionString = appEnv.getServiceURL(/.*/);
var client = new pg.Client(connectionString);
client.ssl = true;
client.connect();
Note that in the above you should replace “my-postgres” with the exact name of the PostgreSQL service you created. The getServiceURL
function returns a connection string which includes the username and password required to connect to the database.
You should also remember to include dependencies for any service bindings in package.json
.
{
//...
"dependencies":
{
"pg": "*"
}
}
This section explains how to deploy an app using the Django framework. You may also need to refer to the Cloud Foundry documentation about the Python buildpack [external link].
Note that the only database service currently supported by PaaS is PostgreSQL. If your Django app requires a database, it must be able to work with PostgreSQL.
These steps assume you have already carried out the setup process explained in the Quick setup guide section.
If you are just getting started learning CloudFoundry, you can use the sandbox space by running: cf target -s sandbox
Check out your Django app to a local folder.
Add *.pyc
and local_settings.py
to your .gitignore
, file, then
exclude files ignored by Git so Cloud Foundry will ignore them too.
Tell Cloud Foundry which Python runtime to use by creating a runtime.txt
file in the root of the local folder. The contents of the file should
be:
python-3.5.1
replacing “3.5.1” with the version of Python you want to use (it must be supported by the buildpack: currently versions 2.7.11 to 3.5.2 are supported.)
Make sure you have all the required modules for your project installed into your virtual environment (including Django).
Generate a requirements.txt
file if your project doesn’t already have one by running pip freeze > requirements.txt
in the root of the local folder.
Add the following lines to the requirements.txt
file.
whitenoise==1.0.6 #manages static assets
waitress==0.8.9 #a pure python WSGI server that is a replacement for gunicorn
Edit your wsgi.py
file.
When you create a Django project, a default wsgi.py
file should be created for you in the project folder. Excluding the opening comments, the default wsgi.py
looks like this:
import os
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "PROJECTNAME.settings")
from django.core.wsgi import get_wsgi_application
application = get_wsgi_application()
You’ll need to add a few lines to import the whitenoise
package and wrap the middleware around the WSGI application so that all static files are served using whitenoise. Edit your wsgi.py
to:
import os
from django.core.wsgi import get_wsgi_application
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "PROJECTNAME.settings")
# important that the whitenoise import is after the line above
from whitenoise.django import DjangoWhiteNoise
application = get_wsgi_application()
application = DjangoWhiteNoise(application)
The order here is important. The DJANGO_SETTINGS_MODULE
environment variable must be set before importing DjangoWhiteNoise
.
You should now tell Django where to look for static files. In settings.py
within the project folder, add these lines below the import os
statement.
PROJECT_ROOT = os.path.dirname(os.path.abspath(__file__))
STATIC_ROOT = os.path.join(PROJECT_ROOT, 'static')
STATIC_URL = '/static/'
In this case, the STATIC_ROOT variable tells Django to look for static files in a directory called static
inside the project folder, and the STATIC_URL variable sets the path where those files will be served.
You may need to alter these values depending on how static files are handled in your app.
If your static files are located across multiple folders, you may need to use the STATICFILES_DIRS variable. See the Django documentation for full details on managing static files.
Create a file called Procfile
in the root of your local folder,
and put in it:
web: python manage.py migrate && waitress-serve --port=$PORT PROJECTNAME.wsgi:application
PROJECTNAME
should be replaced with whatever the name of your WSGI module is. By default, this is the same as the name of your project module, but it may be changed using the DJANGO_SETTINGS_MODULE environment variable. Using this configuration will automatically apply any database migrations.
Create a manifest.yml
file in the root of your local folder.
---
applications:
- name: my-app
memory: 512M
buildpack: python_buildpack
where my-django-app
is the name that will be used for the app within Government PaaS.
Replace my-django-app
with a unique name for your app. (You can use cf apps
to see apps which already exist).
The memory
line tells the PaaS how much memory to allocate to the app.
If your app requires a database, create a PostgreSQL backing service and bind it to your app. Then see the section on PostgreSQL setup below.
To push your app, do:
cf push APPNAME
from the local folder.
If you want to upload the app without starting it (for example, if you need to create a PostgreSQL service), run cf push --no-start APPNAME
, then when you are ready to start the app, run cf start APPNAME
.
You can now view your app at https://APPNAME.cloudapps.digital
.
Add these lines to your requirements.txt
:
psycopg2==2.6.2 #installs the postgres driver
dj-database-url==0.3.0 #grabs environment variables and dumps them into a Django settings file
In your settings.py
file, make sure you import the dj_database_url
package we added to the requirements.txt
file above:
import dj_database_url
This package will automatically parse the VCAP_SERVICES
environment variable and set DATABASE_URL to the first database found.
Then, you’ll need to add a DATABASES
setting. It’s best to add this to the settings.py
file.
DATABASES = {}
DATABASES['default'] = dj_database_url.config()
Your local_settings.py
file will override this when you’re working locally.
To have database migrations automatically applied, amend your Procfile
to contain the following:
web: python manage.py migrate && waitress-serve --port=$PORT PROJECTNAME.wsgi:application
Again, remember to replace PROJECTNAME
with the name of your WSGI module.
Before deploying an app for production use, check the following:
M-HA-dedicated-9.5
) for the bound postgres
service instance.cf scale APPNAME -i 2
to add an extra running instance.Your application probably relies on backing services such as a database, an email delivery service or a monitoring system.
In Cloud Foundry, backing services are referred to as ‘services’ and are available through the Cloud Foundry cf marketplace
command.
Currently, the only service available is the PostgreSQL database service.
Some services (including postgres
) are considered paid services. Your organization may not have the ability to use paid services enabled. Access to paid services can either be enabled or disabled based on your organisation quota.
If you try to create a service and receive an error stating “service instance cannot be created because paid service plans are not allowed”, please contact us at<EMAIL_ADDRESS>Your app can find out what backing services are available, and obtain credentials for the services, by parsing the VCAP_SERVICES environment variable.
We are going to add more services in future based on demand, including Elasticsearch and Redis. If you need a particular backing service that we don’t yet support, please let us know at<EMAIL_ADDRESS>Government PaaS enables you to create a PostgreSQL database service (powered by Amazon Web Services) and bind it to your app.
In Cloud Foundry, each service may have multiple plans available with different characteristics.
Currently, Government PaaS offers a postgres
service which is available with two separate plans:
M-dedicated-9.5
M-HA-dedicated-9.5
(high availability, recommended for production)The number in the plan name (in this case, 9.5
) is the PostgreSQL version.
postgres
is considered a paid service. Paid services may not be enabled on your account. If you try to create a service and receive an error stating “service instance cannot be created because paid service plans are not allowed”, please contact us at<EMAIL_ADDRESS>To create a service and bind it to your app:
From the command line, run:
cf marketplace
to see the available services.
You will see output like this:
service plans description
postgres M-dedicated-9.5*, M-HA-dedicated-9.5* AWS RDS PostgreSQL service
Run:
cf marketplace -s postgres
to see details of the available plans.
Run:
cf create-service SERVICE PLAN SERVICE_INSTANCE
where SERVICE is the service you want, PLAN is the plan you want, and SERVICE_INSTANCE is a unique, descriptive name for this instance of the service; for example:
cf create-service postgres M-dedicated-9.5 my-pg-service
Note that for a production service, we strongly recommend you select the high-availability plan (M-HA-dedicated-9.5
).
Paid services may need to be enabled on your account; if you receive an error stating “service instance cannot be created because paid service plans are not allowed”, please contact us at<EMAIL_ADDRESS>It may take some time (up to 25 minutes) for the service instance to be set up. To find out its status, run:
cf service SERVICE_INSTANCE
for example:
cf service my-pg-service
Wait until the service status reported by the above command is ‘create succeeded’. Here is an example of the type of output you will see once the service is created:
Service instance: my-pg-service
Service: postgres
Bound apps:
Tags:
Plan: M-dedicated-9.5
Description: AWS RDS PostgreSQL service
Documentation url: https://aws.amazon.com/documentation/rds/
Dashboard:
Last Operation
Status: create succeeded
Message: DB Instance 'rdsbroker-9f053413-97a5-461f-aa41-fe6e29db323e' status is 'available'
Started: 2016-08-23T15:34:41Z
Updated: 2016-08-23T15:42:02Z
You can now bind the PostgreSQL service to your app. Run:
cf bind-service APPLICATION SERVICE_INSTANCE
where APPLICATION is the name of a deployed instance of your application (exactly as specified in your manifest or push command), for example:
cf bind-service my-app my-pg-service
Your app is now able to access the PostgreSQL service. If the app was already running, you may need to restart the app to connect.
Your app must make a TLS connection to the PostgreSQL service. Most libraries use TLS by default.
Your app will need to parse the VCAP_SERVICES
environment variable to get details of the PostgreSQL service (or use a library that does so).
(Note that if your app is written in Ruby, the Cloud Foundry Ruby buildpack will automatically parse VCAP_SERVICES
and set DATABASE_URL to the first database found.)
Use cf env APPNAME
to see the environment variables.
You can check for database connection errors by viewing the recent logs with:
cf logs APPNAME --recent
The PaaS PostgreSQL service is currently provided by Amazon Web Services RDS. Each PostgreSQL service you create will have a randomly-assigned weekly 30 minute maintenance window, during which there may be brief downtime. (To minimise downtime, select the M-HA-dedicated-9.5
high availability plan). Minor version upgrades (for example from 9.4.1 to 9.4.2) will be applied during this window.
For more details, see the Amazon RDS Maintenance documentation [external page].
If you need to know the time of your maintenance window, please contact us at<EMAIL_ADDRESS>Times will be from 22:00 to 06:00 UTC. We will add the ability to set the time of the maintenance window in a future version of Government PaaS.
The data stored within any PostgreSQL service you create is backed up using the standard Amazon RDS backup system.
Backups are taken nightly and data is retained for 7 days.
If you need to restore data to an earlier state, we can restore to any point from 5 minutes to 7 days ago, with a resolution of one second. Data can be restored to a new PostgreSQL service instance running in parallel, or it can replace the existing service instance.
Please contact us at<EMAIL_ADDRESS>to arrange the restore process or if you need further information about the backup process. We will need approval from your organization manager if restoring will involve overwriting data.
Note that data restore will not be available in the event of an RDS outage affecting the entire Amazon availability zone.
For more details about how the RDS backup system works, see Amazon’s DB Instance Backups documentation [external page].
We recommend you use the high availability plan (M-HA-dedicated-9.5
) for any production apps.
When you use the high availability plan, Amazon RDS provides a hot standby service to use for failover in the event that the original service fails.
The failover process means that Amazon RDS will automatically change the DNS record of the database instance to point to the standby instance. You should make sure that your app doesn’t cache the database IP, and any DNS caching should be configured with a low time to live (TTL). Consult the documentation for the language/framework you are using to find out how to do this.
During failover, there will be an outage period (from tens of seconds to a few minutes).
See the Amazon RDS documentation on the failover process for more details.
If you wish to test how your app deals with a failover, we can trigger one for you. Please contact us at<EMAIL_ADDRESS>to arrange this.
Amazon RDS has the capability to provide a read replica: a read-only copy of your PostgreSQL database. This can be useful for performance, availability or security reasons.
See the Amazon RD documentation on read replicas to learn more.
The Government PaaS doesn’t currently support read replicas, but if you think you would find them useful, please contact us at<EMAIL_ADDRESS>providing details of your use case.
The Cloud Foundry technology makes it easy to scale your application to meet increasing demand. Scaling does not happen automatically; you have to use the commands described below.
Note that the maximum resources you can use will be limited by your organization quotas. You can view them by running:
cf quotas
from the command line.
If you are anticipating a spike in demand for a service hosted on the Government PaaS, please contact us well in advance at<EMAIL_ADDRESS>You can change the number of instances of your app running in parallel. Incoming requests are automatically load-balanced across all instances.
For example, this command sets the number of running instances to five:
cf scale APPNAME -i 5
For a production app, you should always have at least two running instances.
You can scale an application vertically by increasing the memory or disk space available to each instance of the app.
For example, this command increases the available memory for an app to 1 gigabyte:
cf scale APPNAME -m 1G
This command increases the disc space limit for an app to 512 megabytes:
cf scale myApp -k 512M
For more details, see Scaling an Application Using cf scale in the Cloud Foundry docs.
Cloud Foundry capacity is managed by quotas. Quotas provide a reservation of application routes, memory, compute power, and service instances which your organization cannot exceed. You can set individual application quotas to control how much of your quota each of your applications can use.
Your organisation will be assigned a quota based on your stated needs. This will cover the app instances you run. Backing services do not count towards this quota.
RAM: The amount of RAM available to your applications. The application also has a compute share derived from its memory limit.
Service instances: The number of service instances available to your organization.
Paid services: Whether or not paid services are available. postgres
is a paid service.
Routes: Hostname and domain pairs where an application that exposes a listening port can be reached.
To see your organisation quota, run the command:
cf org YOURORG
where YOURORG is your organisation’s name. (If you don’t know the name, you can use cf orgs
to find out).
If a new application push
would exceed your organization’s quota, the request will fail with status code 400
and a message describing the limit that would be exceeded.
This is an example of the error you would receive:
Creating app APPLICATION in org ORG / space SPACE as USER...
FAILED
Server error, status code: 400, error code: 100007, message:
You have exceeded the memory limit for your organization's quota.
In this situation you have three options:
cf delete
, cf delete-service
, cf delete-route
or similar commands.As a PaaS tenant, you can divide your organization’s quota capacity amongst your applications as you see fit, by way of application quotas. Application limits are specified in your application manifest or as cf push
command line options.
Use the following commands to set application quota options (in each pair below, the first is the version to use in the manifest, and the second is the command line version.)
memory:
/ -m
Your application’s memory limit. An application’s compute limit is derived from its memory limit. (see below).
disk_quota:
/ -k
The maximum amount of disk space available to your app.
instances:
/ -i
Sets the number of application instances to launch. Each additional instance receives the same memory and disk reservation. An application with a manifest specifying memory: 256M
and instances: 4
would reserve 1GB (256M x 4) total.
For a production application, you should always launch at least two instances.
Your application’s compute limit is derived from its memory limit. Each application receives a guaranteed compute share equal to its relative share of memory.
Your application will be guaranteed to receive a portion of the vCPU compute power equal to its portion of memory allocation. In other words, it will receive at least this much vCPU time even if there are other applications competing for time.
Your application will be offered 100% of the vCPU compute power. If no other applications are running, the app can use all the computer power available. If there are other applications competing for time, each application’s guaranteed share determines how much time it will receive.
The application cannot access more than the specified amount of memory.
memory
is sufficient for most applications. Static sites and utility applications such as schedulers or loaders may require less. Use cf app APPNAME
to check your application’s current memory and compute utilization.requested state: started
instances: 1/1
usage: 128M x 1 instances
urls:
last uploaded: Wed Jul 22 20:09:56 UTC 2015
state since cpu memory disk
#0 running 2015-07-30 05:58:11 PM 0.0% 94.6M of 128M 80.4M of 128M
cf events APPNAME
to look for ‘out of memory’ crashes.... description
... index: 0, reason: CRASHED, exit_description: out of memory, exit_status: 255
For logs to be captured by Cloud Foundry, your application should be writing them to STDOUT
/STDERR
, rather than a log file – see the framework-specific guidance in the menu.
The most direct way to view events related to your application through the deploy process is:
cf logs APPNAME
Used alone, cf logs
will tail the combined stream of logs from each Cloud Foundry service involved in your application deploy. Running with the --recent
flag will stream the entire Loggregator buffer for your app.
cf logs APPNAME --recent
cf events
commandIf you are trying to troubleshoot a problem and it’s hard to understand what’s happening from the logs, you can use the command:
cf events APPNAME
Running cf events
shows you when an app starts, stops, restarts, or crashes (including error codes). The output is often easier to interpret than the output of cf logs
.
For more information about logging and troubleshooting, see the Cloud Foundry documentation:
If a site moves to a different domain name, you can use a simple static site with a custom nginx.conf
file to redirect all traffic from the old domain to the new domain. Example nginx.conf
site for NEW_DOMAIN_NAME
:
worker_processes 1;
daemon off;
error_log <%= ENV["APP_ROOT"] %>/nginx/logs/error.log;
events { worker_connections 1024; }
http {
server {
listen <%= ENV["PORT"] %>;
server_name localhost;
return 301 $scheme://NEW_DOMAIN_NAME$request_uri;
}
}
Deploy your application to NEW_DOMAIN_NAME
and then cf push
a simple static site with that nginx.conf
configuration to the old domain name. You can see a full working example here.
You can read more about nginx customization.
{% endblock %}


Dubai's Albwardy to Buy Zimbabwe's Meikles Hotel for $20 Million
HARARE (Reuters) - Dubai-based Albwardy Investments said on Friday it would buy Zimbabwe’s Meikles Hotel for $20 million and would upgrade what is one of the southern African nation’s most well-known establishments.
The current owner, Meikles Limited, has over the past few years struggled with low occupancy levels and has lacked foreign exchange to refurbish the property in Harare.
Albwardy said the investment had been approved by Zimbabwe’s stock exchange and competition commission, while the shareholders would vote on the transaction next month.
“The Meikles Hotel provides a unique opportunity to invest in Zimbabwe’s leisure and business markets as a first mover,” Albwardy director of hospitality Laurie Ward said in a statement.
Albwardy is expected to spend up to $30 million in upgrading the hotel, an official from Meikles Hotel told Reuters.
The hotel, which was established in 1915, has 312 rooms. (Reporting by MacDonald Dzirutwe; Editing by Edmund Blair)


| |
Methods defined here:
- __init__(self, plant, orderList)
- plant is a Plant instance to run the Scheduler on.
orderList is the OrderList instance of incoming orders to the Plant.
problem is a python-constraint Problem instance where solver is used as
the constraint solver.
- addCapacityConstraint(self, machine, machineIndex)
- addMachineQuantityConstraint(self, machine)
- addOrderEnterTimeAtMachineVar(self, order, machineName, machineIndex)
- Adds a python-constraint Variable and Constraint to an order for the
entrance time at a Machine instance.
- addPrecedenceConstraint(self, enterVar, order, machineIndex)
- Adds a python-constraint Variable and Constraint to an order for the
precedence of Machine instances. Meaning that an order cannot get into
Machine 2 before getting into Machine 1. The sequence is determined by
the Plant instance.
- addTotalTimeVar(self, order)
- Adds a python-constraint Variable and Constraint to an order for the
total amount of time on all the Machine instances in the Plant.
- createEnterTimeVarName(self, order, machine)
- Creates and returns a python-constraint Variable name from an Order
instance and a Machine instance.
- createMachineQuantityVarName(self, machine)
- Creates and returns a python-constraint Variable name from a Machine
instance.
- createTimeAtMachineVarName(self, order, machine)
- Creates and returns a python-constraint Variable name from an Order
instance and a Machine instance.
- machineCapacityConstraintFunc(self, *args)
- machineQuantityConstraintFunc(self, *args)
- printSolutions(self)
- Properly prints the solutions coming from python-constraint.
- run(self)
- Runs the main Scheduler logic.
Data descriptors defined here:
- __dict__
- dictionary for instance variables (if defined)
- __weakref__
- list of weak references to the object (if defined)
|


In our community, we believe that every student is capable of contributing to everyone's learning experience with constructive discussion.
Could you take a moment to improve your input?
1">{{exercise?.pondering.length}} users are pondering
There are no discussions yet, why don't you start one below?
{{prompt}}


In this sprint #5, I was tasked to count the amounts of blue/green/invisible dots. The doc said that I have to get all the dots in one array and an example is provided but I just could not get my head around it! Spent quite a time rereading the "Events and classes resource", replayed the Youtube videos but still didn't get it so decided to take a break and continue the following day.
The next day, I replayed the video again and to try the debugging method using Chrome's Dev Tools's Javascript Console. By using the console, I can actually check what each line does, what it contains and that gives me more confidence on how to play around with the data and finally finished the task.
Pseudocode: pseudocoding a process and what we want the results are is really helpful.
Rubber ducky method: I didn't know what "Rubber ducky method" is but after Googling it I realised that I was using it to solve the "counting dots" task along with Console.logging to read the results and error messages if they appear.


---
layout: page
title: Hey, I'm Utkarsh
subtitle: B.Tech, Chemical Engineering. I like materials.
use-site-title: true
---
Short Bio
I recently graduated with a Bachelors degree in Chemical Engineering (4-year) from Indian Institute of Technology , Roorkee, India.
I am an aspiring researcher and my interests include Multifunctional & Energy Materials, First principle Calculations, Molecular Simulations and Mathematical Modelling.
Recently, I
-
Feb 2020 Released an open-source code to compute phase diagrams via. convex-hull approach and produce publishable contour plots.
More on it here..
-
Janurary 2020 Finished the final draft of my first paper as the First author. Yay!! Waiting on collaborators' go ahead. (To be communicated soon)
Topic: Ultralow thermal conductivity owing to favourable lattice dynamics.
-
November 2019 Got my first paper published. Read..
-
November 2019 Graduated First-class with a Bachelors of Technology (4-year) degree in Chemical Engineering.
-
July 2018 Finished my Pre-final year internship at Computational Spintronics Group under Professor Stefano Sanvito.


[§342I-35] Disposition of collected fines and penalties. Fines and penalties collected under this part shall be deposited into the environmental response revolving fund established by section 128D-2. [L 2000, c 173, pt of §1]


This is a basic interface.
This does not access the BACnet network.
You can return to home with the Settings tab.


More...
|
| ModulationType | modulationType = ModulationType.UNKNOWN |
| | The modulation type that is used by the profile. More...
|
| |
| UInt32 | tari = 0 |
| | The duration of the Tari in nanoseconds. More...
|
| |
| DataDifference | data01Difference = DataDifference.UNKNOWN |
| | The difference, in Tari, between an data zero and a data one. More...
|
| |
| UInt32 | pulseWidth = 0 |
| | The duration of the low-going portion of the interrogator-to- tag PIE symbol (i.e., pulse width) in nanoseconds. More...
|
| |
| UInt32 | rtCalibration = 0 |
| | The width of the interrogator (i.e., radio) to tag calibration (i.e., RTCal) in nanoseconds. More...
|
| |
| UInt32 | trCalibration = 0 |
| | The width of the tag to interrogator calibration (i.e., TRCal) in nanoseconds. More...
|
| |
| DivideRatio | divideRatio = DivideRatio.UNKNOWN |
| | The tag-to-interrogator divide ratio that is sent as part of the Query command. More...
|
| |
| MillerNumber | millerNumber = MillerNumber.UNKNOWN |
| | The miller number (i.e., cycles per symbol) that is sent as part of the Query command. More...
|
| |
| UInt32 | trLinkFrequency = 0 |
| | The tag-to-interrogator link frequency in Hz. Note that this is not the link data-rate. The link data rate can be computed by dividing this value by 2millerNumber. More...
|
| |
| UInt32 | varT2Delay = 0 |
| | The delay, in microseconds, that is inserted to ensure meeting the minimum ISO 18000-6C T2 timing. More...
|
| |
| UInt32 | rxDelay = 0 |
| | The amount of time, measured in 48MHz clock cycles, after transmitting that the radio module will wait before attempting to receive backscattered signals from tags. More...
|
| |
| UInt32 | minT2Delay = 0 |
| | The minimum ISO 18000-6C T2 time, in microseconds, after receiving tag responses before a radio may transmit again. More...
|
| |
| UInt32 | txPropagationDelay = 0 |
| | The number of microseconds it takes for a signal to propagate through the radio's transmit chain. More...
|
| |
◆ RadioLinkProfileConfig()
| CSLibrary.Structures.RadioLinkProfileConfig.RadioLinkProfileConfig |
( |
| ) |
|
◆ data01Difference
The difference, in Tari, between an data zero and a data one.
◆ divideRatio
The tag-to-interrogator divide ratio that is sent as part of the Query command.
◆ millerNumber
The miller number (i.e., cycles per symbol) that is sent as part of the Query command.
◆ minT2Delay
| UInt32 CSLibrary.Structures.RadioLinkProfileConfig.minT2Delay = 0 |
The minimum ISO 18000-6C T2 time, in microseconds, after receiving tag responses before a radio may transmit again.
◆ modulationType
The modulation type that is used by the profile.
◆ pulseWidth
| UInt32 CSLibrary.Structures.RadioLinkProfileConfig.pulseWidth = 0 |
The duration of the low-going portion of the interrogator-to- tag PIE symbol (i.e., pulse width) in nanoseconds.
◆ rtCalibration
| UInt32 CSLibrary.Structures.RadioLinkProfileConfig.rtCalibration = 0 |
The width of the interrogator (i.e., radio) to tag calibration (i.e., RTCal) in nanoseconds.
◆ rxDelay
| UInt32 CSLibrary.Structures.RadioLinkProfileConfig.rxDelay = 0 |
The amount of time, measured in 48MHz clock cycles, after transmitting that the radio module will wait before attempting to receive backscattered signals from tags.
◆ tari
| UInt32 CSLibrary.Structures.RadioLinkProfileConfig.tari = 0 |
The duration of the Tari in nanoseconds.
◆ trCalibration
| UInt32 CSLibrary.Structures.RadioLinkProfileConfig.trCalibration = 0 |
The width of the tag to interrogator calibration (i.e., TRCal) in nanoseconds.
◆ trLinkFrequency
| UInt32 CSLibrary.Structures.RadioLinkProfileConfig.trLinkFrequency = 0 |
The tag-to-interrogator link frequency in Hz. Note that this is not the link data-rate. The link data rate can be computed by dividing this value by 2millerNumber.
◆ txPropagationDelay
| UInt32 CSLibrary.Structures.RadioLinkProfileConfig.txPropagationDelay = 0 |
The number of microseconds it takes for a signal to propagate through the radio's transmit chain.
◆ varT2Delay
| UInt32 CSLibrary.Structures.RadioLinkProfileConfig.varT2Delay = 0 |
The delay, in microseconds, that is inserted to ensure meeting the minimum ISO 18000-6C T2 timing.
The documentation for this class was generated from the following file:


L.A. CONFIDENTIAL(Regency/Warner Brothers)
While it's always sad to see the warm weather fading away as the fall approaches, few will be teary-eyed at the thought of such brainless summer movies as "Excess Baggage" or "Money Talks" moving out of theatres to make room for slightly smarter fare. Take, for instance, "L.A. Confidential," which actually asks an audience to think about what they're watching: What is this world coming to when you go to a movie and have to pay attention? But though some viewers may be put-off by the serpentine plotting of "L.A.", those who've been starving for a challenging, complex story with something to say will come away thoroughly refreshed. Director Curtis Hanson, who adapted the James Ellroy best-seller with screenwriter Brian Helgeland, has produced a sterling example of what Hollywood can do when filmmakers refuse to "dumb-down" material and when actors are cast for their talent rather than their box-office appeal. There's not a single weak player in Hanson's ensemble cast, and little-known Australian actors Guy Pearce and Russell Crowe are almost certain to find Stateside fame after their breakout roles here. Although set in 1953 Los Angeles (at the time the city and its police force were being glamorized weekly via TV shows like "Dragnet"), the story is almost frightening contemporary, since police brutality, sleazy tabloid journalism and would-be celebrities who'll do anything to be noticed have scarcely gone out of style in the past 40-odd years. Indeed, parallels between the "Bloody Christmas" beatings of prisoners in an L.A. holding-tank and the recent scandal involving the alleged molestation of a Haitian being held in a New York City station are quite easy to draw. Ditto the young actor who's seized at the "Movie Premiere Pot Bust" and the recent arrest of Christian Slater, who's admitted he was high on cocaine and heroin at the time he was booked for a recent alleged assault. But even if you lose track of the multiple intertwining story strands, you won't be able to take your eyes off Kevin Spacey as a cop who yearns for notoriety, or Crowe and Pearce, playing morally challenged officers who represent two sides of the same coin. Even Kim Basinger, unfairly regarded in some circles as a joke, is strikingly good as a call-girl looking for a way out of the opulent hell she's made for herself. Her part is small but pivotal: She's the only one in the story self-aware enough to understand what's going on around her, namely the war between illusion and reality, public perception versus the ugly truth. "L.A. Confidential" may be a period-piece, but the issues it raises stare each of us in the face daily. James Sanford
The review above was posted to the
rec.arts.movies.reviews newsgroup (de.rec.film.kritiken for German reviews).
The Internet Movie Database accepts no responsibility for the contents of the
review and has no editorial control. Unless stated otherwise, the copyright
belongs to the author.
Please direct comments/criticisms of the review to relevant newsgroups.
Broken URLs inthe reviews are the responsibility of the author.
The formatting of the review is likely to differ from the original due
to ASCII to HTML conversion.
Related links: index of all rec.arts.movies.reviews reviews


{% extends "blank_template.html" %} {% block page_title %} Headers on GOV.UK {% endblock %} {% block header %}
This is the standard GOV.UK header:
Here it is with a search box:
Here's the version for specialist content:
Services on GOV.UK look like this:
If you need to you can add navigation, like this.
GDS also makes products for teams building government services.
They have headers that look like this:
Headers can be full width if the content on the page requires it:
If your users are employees of a specific department you can use these headers:


Timer that is triggered in equal time intervals.
It has summetric cross-language implementation and is often used by Pip.Services toolkit to perform periodic processing and cleanup in microservices.
see INotifiable
Example:
type MyComponent { timer FixedRateTimer } ... func (mc* MyComponent) open(correlationId string) { ... mc.timer = NewFixedRateTimerFromCallback(() => { this.cleanup }, 60000, 0); mc.timer.start(); ... } func (mc* MyComponent) open(correlationId: string){ ... mc.timer.stop(); ... }
type FixedRateTimer struct {
// contains filtered or unexported fields
}
func NewFixedRateTimer() *FixedRateTimer
Creates new instance of the timer and sets its values. Returns *FixedRateTimer
func NewFixedRateTimerFromCallback(callback func(), interval int, delay int) *FixedRateTimer
Creates new instance of the timer and sets its values. Parameters:
- callback func() callback function to call when timer is triggered. - interval int an interval to trigger timer in milliseconds. - delay int a delay before the first triggering in milliseconds.
Returns *FixedRateTimer
func NewFixedRateTimerFromTask(task INotifiable, interval int, delay int) *FixedRateTimer
Creates new instance of the timer and sets its values. Parameters:
- callback INotifiable Notifiable object to call when timer is triggered. - interval int an interval to trigger timer in milliseconds. - delay int a delay before the first triggering in milliseconds.
Returns *FixedRateTimer
func (c *FixedRateTimer) Callback() func()
Gets the callback function that is called when this timer is triggered. Returns function the callback function or null if it is not set. Returns func()
func (c *FixedRateTimer) Close(correlationId string) error
Closes the timer. This is required by ICloseable interface, but besides that it is identical to stop(). Parameters:
- correlationId: string transaction id to trace execution through call chain.
Returns error
func (c *FixedRateTimer) Delay() int
Gets initial delay before the timer is triggered for the first time. Returns number the delay in milliseconds.
func (c *FixedRateTimer) Interval() int
Gets periodic timer triggering interval. Returns number the interval in milliseconds
func (c *FixedRateTimer) IsStarted() bool
Checks if the timer is started. Returns bool true if the timer is started and false if it is stopped.
func (c *FixedRateTimer) SetCallback(value func())
Sets the callback function that is called when this timer is triggered. Parameters:
- value func() the callback function to be called.
func (c *FixedRateTimer) SetDelay(value int)
Sets initial delay before the timer is triggered for the first time. Parameters:
- value int a delay in milliseconds.
func (c *FixedRateTimer) SetInterval(value int)
Sets periodic timer triggering interval. Parameters:
- value int an interval in milliseconds.
func (c *FixedRateTimer) SetTask(value INotifiable)
Sets a new INotifiable object to receive notifications from this timer. Parameters:
- value INotifiable a INotifiable object to be triggered.
func (c *FixedRateTimer) Start()
Starts the timer. Initially the timer is triggered after delay. After that it is triggered after interval until it is stopped.
func (c *FixedRateTimer) Stop()
Stops the timer.
func (c *FixedRateTimer) Task() INotifiable
Gets the INotifiable object that receives notifications from this timer. Returns INotifiable the INotifiable object or null if it is not set.
Interface for components that should clean their state.
Cleaning state most often is used during testing. But there may be situations when it can be done in production.
see Cleaner
Example:
type MyObjectWithState { _state interface{} } ... func (mo * MyObjectWithState ) clear(correlationId string) { mo._state = interface{} }
type ICleanable interface { // Clears component state. // Parameters: // - correlationId string // transaction id to trace execution through call chain. Clear(correlationId string) error }
Interface for components that require explicit closure.
For components that require opening as well as closing use IOpenable interface instead.
see IOpenable
see Closer
Example:
type MyConnector { _client interface{} } ... // The _client can be lazy created func (mc *MyConnector) Close(correlationId: string):error { if (mc._client != nil) { mc._client.Close() mc._client = nil return nil } }
type IClosable interface { Close(correlationId string) error }
Interface for components that can be called to execute work.
Example:
type EchoComponent {} ... func (ec* EchoComponent) Execute(correlationId: string, args: Parameters) (result interface{}, err error) { return nil, result = args.getAsObject("message") } echo := EchoComponent{}; message = "Test"; res, err = echo.Execute("123", NewParametersFromTuples("message", message)); fmt.Println(res);
type IExecutable interface { // Executes component with arguments and receives execution result. // Parameters: // - correlationId string // transaction id to trace execution through call chain. // - args *Parameters // execution arguments. // Return interface{}, error // result or execution and error Execute(correlationId string, args *Parameters) (result interface{}, err error) }
Interface for components that can be asynchronously notified. The notification may include optional argument that describe the occured event.
see Notifier
see IExecutable
Example:
type MyComponent {} ... func (mc *MyComponent)Notify(correlationId: string, args: Parameters){ fmt.Println("Occured event " + args.GetAsString("event")); } myComponent := MyComponent{}; myComponent.Notify("123", NewParametersFromTuples("event", "Test Event"));
type INotifiable interface { // Notifies the component about occured event. // Parameters: // - correlationId string // transaction id to trace execution through call chain. // - args *Parameters // notification arguments. Notify(correlationId string, args *Parameters) }
Interface for components that require explicit opening and closing.
For components that perform opening on demand consider using ICloseable interface instead.
see IOpenable
see Opener
Example:
type MyPersistence { _client interface{} } func (mp* MyPersistence)IsOpen() bool { return mp._client != nil; } (mp* MyPersistence) Open(correlationId: string) error { if (mp.isOpen()) { return nil; } } (mp* MyPersistence) Close(correlationId: string) { if (mp._client != nil) { mp._client.close(); mp._client = nil; } }
type IOpenable interface { IClosable // Checks if the component is opened. // Returns bool // true if the component has been opened and false otherwise. IsOpen() bool // Opens the component. // Parameters: // - correlationId: string // transaction id to trace execution through call chain. // Return error Open(correlationId string) error }
Interface for components that require execution parameters.
type IParameterized interface { // Sets execution parameters. // Parameters: // parameters *Parameters // execution parameters. SetParameters(parameters *Parameters) }
Contains map with execution parameters.
In general, this map may contain non-serializable values. And in contrast with other maps, its getters and setters support dot notation and able to access properties in the entire object graph.
This class is often use to pass execution and notification arguments, and parameterize classes before execution.
type Parameters struct { data.AnyValueMap }
func NewEmptyParameters() *Parameters
Creates a new instance of the map and assigns its value. Returns *Parameters
func NewParameters(values map[string]interface{}) *Parameters
Creates a new instance of the map and assigns its value. Parameters:
- values map[string]interface{}
Returns *Parameters
func NewParametersFromConfig(config *config.ConfigParams) *Parameters
Returns Parameters a new Parameters object.
func NewParametersFromMaps(maps ...map[string]interface{}) *Parameters
Creates a new Parameters by merging two or more maps. Maps defined later in the list override values from previously defined maps. Parameters:
- maps ...map[string]interface{} an array of maps to be merged
Returns *Parameters a newly created Parameters.
func NewParametersFromTuples(tuples ...interface{}) *Parameters
Creates a new Parameters object filled with provided key-value pairs called tuples. Tuples parameters contain a sequence of key1, value1, key2, value2, ... pairs. see AnyValueMapFromTuplesArray Parameters:
- tuples ...interface{} the tuples to fill a new Parameters object.
Returns *Parameters a new Parameters object.
func NewParametersFromTuplesArray(tuples []interface{}) *Parameters
Creates a new AnyValueMap from a list of key-value pairs called tuples. The method is similar to fromTuples but tuples are passed as array instead of parameters. Parameters:
- tuples []interface{} a list of values where odd elements are keys and the following even elements are values
Returns *Parameters a newly created Parameters.
func NewParametersFromValue(value interface{}) *Parameters
Creates a new Parameters object filled with key-value pairs from specified object. Parameters:
- value interface{} an object with key-value pairs used to initialize a new Parameters.
Returns *Parameters a new Parameters object.
func (c *Parameters) AssignTo(value interface{})
Assigns (copies over) properties from the specified value to this map. Parameters:
- value interface{} value whose properties shall be copied over.
func (c *Parameters) Clone() interface{}
Creates a binary clone of this object. Returns interface{} a clone of this object.
func (c *Parameters) Contains(key string) bool
Checks if this map contains an element with specified key. The key can be defined using dot notation and allows to recursively access elements of elements. Parameters:
- key string a key to be checked
Returns bool true if this map contains the key or false otherwise.
func (c *Parameters) Get(key string) interface{}
Gets a map element specified by its key. The key can be defined using dot notation and allows to recursively access elements of elements. Parameters:
- key string a key of the element to get.
Returns interface{} the value of the map element.
func (c *Parameters) GetAsNullableParameters(key string) *Parameters
Converts map element into an Parameters or returns nil if conversion is not possible. Parameters:
- key: string a key of element to get.
Returns *Parameters Parameters value of the element or nil if conversion is not supported.
func (c *Parameters) GetAsParameters(key string) *Parameters
Converts map element into an Parameters or returns empty Parameters if conversion is not possible. Parameters:
- key string a key of element to get.
Returns *Parameters Parameters value of the element or empty Parameters if conversion is not supported.
func (c *Parameters) GetAsParametersWithDefault(key string, defaultValue *Parameters) *Parameters
Converts map element into an Parameters or returns default value if conversion is not possible. Parameters:
-key string a key of element to get. - defaultValue *Parameters the default value
Returns *Parameters Parameters value of the element or default value if conversion is not supported.
func (c *Parameters) Omit(paths ...string) *Parameters
Omits selected parameters from this Parameters and returns the rest as a new Parameters object. Parameters:
- paths ...string keys to be omitted from copying over to new Parameters.
Returns *Parameters a new Parameters object.
func (c *Parameters) Override(parameters *Parameters, recursive bool) *Parameters
Overrides parameters with new values from specified Parameters and returns a new Parameters object. see setDefaults Parameters:
- parameters: Parameters Parameters with parameters to override the current values. - recursive bool true to perform deep copy, and false for shallow copy. Default: false
Returns *Parameters a new Parameters object.
func (c *Parameters) Pick(paths ...string) *Parameters
Picks select parameters from this Parameters and returns them as a new Parameters object. Parameters:
- paths ...string keys to be picked and copied over to new Parameters.
Returns *Parameters a new Parameters object.
func (c *Parameters) Put(key string, value interface{})
Puts a new value into map element specified by its key. The key can be defined using dot notation and allows to recursively access elements of elements. Parameters:
- key string a key of the element to put. - value interface{} a new value for map element.
func (c *Parameters) Remove(key string)
Removes a map element specified by its key Parameters:
- key string a key of the element to remove.
func (c *Parameters) SetDefaults(defaultParameters *Parameters, recursive bool) *Parameters
Set default values from specified Parameters and returns a new Parameters object. see Override Parameters:
- defaultParameters *Parameters Parameters with default parameter values. - recursive bool true to perform deep copy, and false for shallow copy. Default: false
Returns *Parameters a new Parameters object.
Helper class that cleans stored object state.
type TCleaner struct{}
var Cleaner *TCleaner = &TCleaner{}
func (c *TCleaner) Clear(correlationId string, components []interface{}) error
Clears state of multiple components. To be cleaned state components must implement ICleanable interface. If they don't the call to this method has no effect. Parameters:
- correlationId string transaction id to trace execution through call chain. - components []interface{}
the list of components that are to be cleaned. Returns error
func (c *TCleaner) ClearOne(correlationId string, component interface{}) error
Clears state of specific component. To be cleaned state components must implement ICleanable interface. If they don't the call to this method has no effect. Parameters:
- correlationId: string transaction id to trace execution through call chain. - component interface{} the component that is to be cleaned.
Returns error
Helper class that closes previously opened components.
type TCloser struct{}
var Closer *TCloser = &TCloser{}
func (c *TCloser) Close(correlationId string, components []interface{}) error
Closes multiple components. To be closed components must implement ICloseable interface. If they don't the call to this method has no effect. Parameters:
- correlationId string transaction id to trace execution through call chain. - components []interface{} the list of components that are to be closed.
Returns error
func (c *TCloser) CloseOne(correlationId string, component interface{}) error
To be closed components must implement ICloseable interface. If they don't the call to this method has no effect. Parameters:
- correlationId string transaction id to trace execution through call chain. - component interface{} the component that is to be closed.
Returns error
Helper class that executes components.
type TExecutor struct{}
var Executor *TExecutor = &TExecutor{}
func (c *TExecutor) Execute(correlationId string, components []interface{}, args *Parameters) ([]interface{}, error)
To be executed components must implement IExecutable interface. If they don't the call to this method has no effect. Parameters:
- correlationId string transaction id to trace execution through call chain. - components []interface{} a list of components that are to be executed. - args *Parameters execution arguments.
Returns []interface{}, error execution result or error
func (c *TExecutor) ExecuteOne(correlationId string, component interface{}, args *Parameters) (interface{}, error)
Executes specific component. To be executed components must implement IExecutable interface. If they don't the call to this method has no effect. Parameters:
- correlationId string transaction id to trace execution through call chain. - component interface{} the component that is to be executed. - args: *Parameters execution arguments.
Returns []interface{}, error execution result or error
Helper class that notifies components.
type TNotifier struct{}
var Notifier *TNotifier = &TNotifier{}
func (c *TNotifier) Notify(correlationId string, components []interface{}, args *Parameters)
Notifies multiple components. To be notified components must implement INotifiable interface. If they don't the call to this method has no effect. see NotifyOne see INotifiable Parameters:
- correlationId string transaction id to trace execution through call chain. - components []interface{} a list of components that are to be notified. - args *Parameters notification arguments.
func (c *TNotifier) NotifyOne(correlationId string, component interface{}, args *Parameters)
Notifies specific component. To be notiied components must implement INotifiable interface. If they don't the call to this method has no effect. see INotifiable Parameters:
- correlationId string transaction id to trace execution through call chain. - component interface{} the component that is to be notified. - args *Parameters notifiation arguments.
Helper class that opens components.
type TOpener struct{}
var Opener *TOpener = &TOpener{}
func (c *TOpener) IsOpen(components []interface{}) bool
Checks if all components are opened. To be checked components must implement IOpenable interface. If they don't the call to this method returns true. see isOpenOne see IOpenable Parameters:
- components []interface{} a list of components that are to be checked.
Returns bool true if all components are opened and false if at least one component is closed.
func (c *TOpener) IsOpenOne(component interface{}) bool
Checks if specified component is opened. To be checked components must implement IOpenable interface. If they don't the call to this method returns true. see IOpenable
- component interface{} the component that is to be checked.
Returns bool true if component is opened and false otherwise.
func (c *TOpener) Open(correlationId string, components []interface{}) error
Opens multiple components. To be opened components must implement IOpenable interface. If they don't the call to this method has no effect. see OpenOne see IOpenable Parameters:
- correlationId string transaction id to trace execution through call chain. components []interface{} the list of components that are to be closed.
Returns error
func (c *TOpener) OpenOne(correlationId string, component interface{}) error
Opens specific component. To be opened components must implement IOpenable interface. If they don't the call to this method has no effect. see IOpenable Parameters:
- correlationId string (optional) transaction id to trace execution through call chain. - component interface{} the component that is to be opened.
Returns error


DELTA
Copyright (c) 1975 Otto Maier Verlag Ravensburg
The game is played on an empty 5x5 square board.
OFF-BOARD - Each player has 9 stones in reserve
1st TURN - Each player places a stone on an empty cell.
TURN - On each other turn, each player must make the following moves:
First, he must slide one stone in any direction (no jumping allowed) moving at least two cells (so, it cannot move to adjacent cells).
Second, drops a stone from the reserve into the last empty cell moved over the first stone.
If the reserve is empty, pick another stone on the board (but not the moved one) and drop it on that cell.
EQUALIZER - On the second turn (the first turn where stones are moved), the second player may skip the first part of the turn (i.e., he may just drop one stone from reserve).
GOAL
A player wins by making a (diagonal or orthogonal) 4 in a row, or
A player wins by blocking the adversary (i.e., leave him with no valid moves).
Some initial moves 1.b2 c3,
2.b2b5 (drop a stone at b4) b3 (skipped move),
3.b5e5 (drop at d5) b3d1 (drop at c2)
4.b4e4 c3a3+
5.d5a5+ a3c5A variant created by Michael Howe at 1994, called EPSILON, uses the same concept, but to align 5 in-a-row in a 7x7 square board, and with further rules to equalize game play. On the initial turn, the first play is forbidden to drop at the central square, and the second player must drop two stones on any two empty cells. Then, each player makes two moves (where each move has two parts, as in DELTA) with the restrictions (a) the dropped stone on the first move cannot slide on the second move; and (b) both stones on the first move cannot be used to pick and drop (after the reserve is empty) on the second move.
Check ETEROSCACCO for more information (in Italian...) on both games.


Search
Preparing search index...
The search index is not available
Winter Cardinal
Options
All
Public
Public/Protected
All
Inherited
Externals
Only exported
Menu
Globals
util/internal
UtilImpl
Class UtilImpl
Hierarchy
UtilImpl
Implements
Util
Index
Properties
atob
bind
btoa
clone
clone
Deep
each
each
Right
equals
escape
get
Global
has
Own
is
Array
is
Array
Like
is
Boolean
is
Empty
is
Equal
is
Function
is
NaN
is
Number
is
Plain
Object
is
String
is
Thenable
merge
now
register
size
sorted
Index
INSTANCE
Methods
get
Instance
Properties
atob
atob
:
base64ToString
= base64ToString
bind
bind
:
bind
= bind
btoa
btoa
:
stringToBase64
= stringToBase64
clone
clone
:
clone
= clone
clone
Deep
clone
Deep
:
cloneDeep
= cloneDeep
each
each
:
each
= each
each
Right
each
Right
:
eachRight
= eachRight
equals
equals
:
isEqual
= isEqual
escape
escape
:
escape
= escape
get
Global
get
Global
:
getGlobal
= getGlobal
has
Own
has
Own
:
hasOwn
= hasOwn
is
Array
is
Array
:
isArray
= isArray
is
Array
Like
is
Array
Like
:
isArrayLike
= isArrayLike
is
Boolean
is
Boolean
:
isBoolean
= isBoolean
is
Empty
is
Empty
:
isEmpty
= isEmpty
is
Equal
is
Equal
:
isEqual
= isEqual
is
Function
is
Function
:
isFunction
= isFunction
is
NaN
is
NaN
:
isNaN
= isNaN
is
Number
is
Number
:
isNumber
= isNumber
is
Plain
Object
is
Plain
Object
:
(Anonymous function)
= isPlainObject
is
String
is
String
:
isString
= isString
is
Thenable
is
Thenable
:
isThenable
= isThenable
merge
merge
:
function
= merge
Type declaration
<T>
(
a
:
T
,
...
bs
:
unknown
[]
)
:
T
Type parameters
T
Parameters
a:
T
Rest
...
bs:
unknown
[]
Returns
T
now
now
:
now
= now
register
register
:
register
= register
size
size
:
size
= size
sorted
Index
sorted
Index
:
sortedIndex
= sortedIndex
Static
Private
INSTANCE
INSTANCE
:
UtilImpl
|
null
= null
Methods
Static
get
Instance
get
Instance
(
)
:
Util
Returns
Util
Globals
Internals
controller
controller/data
event
exception
io
server
util
util/dom
util/lang
Externals
controller/data/internal
controller/internal
controller/internal/info
event/internal
exception/internal
server/internal
util/internal
util/lang/internal
Logger
Impl
Util
Impl
atob
bind
btoa
clone
clone
Deep
each
each
Right
equals
escape
get
Global
has
Own
is
Array
is
Array
Like
is
Boolean
is
Empty
is
Equal
is
Function
is
NaN
is
Number
is
Plain
Object
is
String
is
Thenable
merge
now
register
size
sorted
Index
INSTANCE
get
Instance
Generated using
TypeDoc


"By a campfire's gleam
let me lie there and dream Under a blanket of stars"
Independent Fe-dev
for DPG Media
@robbiebardijn
Heavy music, guitar
My road...
2016 - 2019
Consultant on payroll
Detect a bad environment
2019
independent
"A part of the Tribe"
Be flexible
Arm yourself
React.js
Development supermarket
The modern train
The next big thing, sure.
5 keys
1. Instruction
2. Practise
3. Surrender
4. Intentionality
5. The edge
Soft skills
Don't take anything (too) personal
Don't make assumptions
Always do your best
Thank you
Resources


How To Watch The AMAs Tonight Without Cable
by Emily PriceThe American Music Awards are tonight. The action officially kicks off at 8pm ET and will be broadcast on ABC.
Post Malone leads the pack in terms of nominations this year with seven. Ariana Grande and Billie Eilish are both a close second with six nominations.
Taylor Swift will also be honoured at this year’s event as “Artist of the Decade.” If she’s able to take home 2 awards tonight she’ll also become the singer with the most AMAs ever. Currently, that title belongs to Michael Jackson who won 23 awards.
If you have a television, then catching tonight’s ceremony is as easy as tuning in to your local ABC station using a digital antenna. If you don’t have a TV, or don’t have an antenna (why?!), you can also stream the ceremony on a number of popular platforms:
SlingTV
Sling TVs $US25 ($37)/month Orange package includes ABC. This is our cheapest option.
YouTube TV, Hulu with Live TV, DirecTV Now
YouTube TV, Hulu with Live TV, DirecTV Now all offer ABC and cost $US40 ($59)-$US45 ($66)/month.
All of the streaming services offer free trials, so if you haven’t used them before you can sign up today and watch the games for free and then cancel your account before you’re being charged.
And worth noting: Not every service offers ABC is every market.


Unicode: e001
Unicode: e002
Unicode: e003
Unicode: e004
Unicode: e005
Unicode: e006
Unicode: e007
Unicode: e008
Unicode: e009
Unicode: e010
Unicode: e011
Unicode: e012
Unicode: e013
Unicode: e014
Unicode: e015
Unicode: e018
Unicode: e019
Unicode: e020
Unicode: e021
Unicode: e022
Unicode: e023
Unicode: e024
Unicode: e025
Unicode: e026
Unicode: e027
Unicode: e028
Unicode: e029
Unicode: e030
Unicode: e031
Unicode: e032
Unicode: e033
Unicode: e034
Unicode: e035
Unicode: e035


Fernando Giovagnoli is a strong back-end engineer with vast experience in Moodle / Totara, WordPress, Drupal and PHP. He has worked for big clients such as NYSE, Autodesk, Warner Bros. and World Wrestling Entertainment improving back-end functionalities, developing new modules and migrating multi-language content. He has worked in a wide range of business domains including finance, education, manufacturing and media & entertainment.
Software engineering is the application of engineering to the development of software in a systematic method.
Autodesk Design Academy helps educators introduce students to the world of design with free, hands-on supplementary projects and course materials.
View ProjectThe official home of the latest WWE news, results and events. Get breaking news, photos, and video of your favorite WWE Superstars.
View ProjectEnglish: Upper-Intermediate
Spanish: Native


DWP: Disabled people will face fewer tests for benefits in Tory manifesto vow
Buried in the Tory election manifesto is a pledge to double the minimum Personal Independence Payment (PIP) award from 9 months to 18 months - after years of complaints about the system
by Dan Bloom, https://www.facebook.com/mirrordanbloomThe Tories today agreed to put disabled people through fewer tests to prove they deserve benefits if Boris Johnson wins the general election.
The party's manifesto announced the minimum award for Personal Independence Payment (PIP) will double from 9 to 18 months before people have to face a reassessment.
The pledge, after years of complaints about people being forced through dehumanising, humiliating assessments, is set to cost £75million a year in 2020/21 if the Tories get into government.
Its cost will rise to £80million a year by 2023/24.
The manifesto boasts the move is "part of our efforts to empower and support disabled people" - as the Tories also finally end the freeze on working-age benefits.
But it stops short of committing to any new action to help people on Universal Credit , saying only "we will do more to make sure" it works.
And the manifesto does not commit to cutting the five-week wait for the first payment in UC, despite the standard period driving people to foodbanks.
By comparison, Labour has vowed to scrap UC and stop the "dehumanising" PIP assessments altogether.
The Tory manifesto says: "As part of our efforts to empower and support disabled people, we will reduce the number of reassessments a disabled person must go through when a significant change in condition is unlikely.
"Because you should not have to provide repeated proof of your disability in order to receive support."
It comes after former Work and Pensions Secretary Amber Rudd - who later resigned the Tory whip and stood down as an MP - said disabled pensioners would no longer have their PIP awards regularly reviewed.
She also vowed to improve the system so fewer PIP assessments are overturned by a tribunal.
Around three-quarters of tribunals for people who were denied PIP currently rule against the DWP - tens of thousands.
DWP chiefs say internal appeals, known as mandatory reconsiderations, are being tightened up to gather more evidence and resolve problems before they come to tribunal.
But waiting times have also exploded as cases clog the system, with the average MR taking 69 days - up from 32.


Tables Interface Demo
Interface between ALS Prolog and Tktable
The Tktable package is a powerful package
for creating and manipulating on-screen tables.
The file tables.pro defines a Prolog interface to the Tktable
package, providing
a natural set of Prolog predicates for dealing with Tk tables. The
interface is described in detail in Tables
Interface.
The file tables_demo.pro is a simple demonstration of some of
the basic table capabilities:
:- consult('tables.pro'). % ensure that tables.pro is loaded
use tk_alslib. % import these modules
use tcltk.
td(1)
:-
load_table_package, % load the tables dll (shared library)
create_table(demotable, % make a table with these headings:
[title='My Test',
rowheadings=[row_1,'Row 2',r3,r4,r5,r6,r7,r8,r9],
colheadings=['First','Second',third,fourth]
]).
td(2) :- % the tag "title" is automatically defined
table_set_tag(demotable, title,
[background=yellow, foreground=black, relief=groove]).
td(3) :- % configure a new tag z1
table_set_tag(demotable, z1,
[background=green, foreground=black]).
td(4) :- % apply tag z1
table_tag_region(demotable, z1, cell(2,2)).
td(5) :- % enter some values in a column
set_demotable_col(1,2,[9,8,7,6,5,4,3,2,1,2,3,4,5]).
td(6) :- % enter some values in a row
set_demotable_row(4,0,[-88,33.2,bad]).
td(7) :- % read values from a cell
read_demotable_table(2,2,X),
printf('Value of cell %t,%t = %t\n', [2,2,X],[quoted(true)]).
?- td(7).
Value of cell 2,2 = bad
Next, click with the left mouse button in cell 2,2, and replace the contents
with something, for example:
Now reading from this cell we get:
?-td(7).
Value of cell 2,2 = 'Now Fine'
The extended demo
?-td(x1).
demonstrates the facilities for adding a menu bar to the window, together
with frames (containing widgets) above and below the table. If this is
run instead of td(1), all of the demo commands td(2),...will also
act on the extended example, as seen here: