Arizona prisons, inmate lawyers to renegotiate settlement
PHOENIX (AP) - The Arizona Department of Corrections was sent back to the negotiating table after it failed to comply with a previous settlement requiring better health care, a judge said.
U.S. District Judge Roslyn Silver told the department and lawyers representing inmates last week they have 60 days to reach a new agreement, The Arizona Republic reported Monday.
“Each side must approach these renewed negotiations with the goal of reaching an agreement which will finally end this litigation,” Silver said.
Magistrate Judge Deborah Fine is expected to oversee the renegotiations, he said.
The state owes $1.4 million for noncompliance in 2018 and could face another $1.7 million this year, officials said.
Lawyers detailed multiple stories in letters submitted to the court in May in which the department failed to provide adequate treatment to inmates, court officials said.
One woman gave birth alone in her cell three days after she reported her water broke, according to a letter.
The corrections department replaced its health care provider, Corizon, with a new contractor, Centurion, last July, the newspaper reported Centurion has faced similar accusations of inadequate health care nationwide, the paper said.
If a new settlement cannot be reached, the parties must submit to the court legal reasoning for reopening the case and proceeding to trial, officials said.
In October, lawyers said they would negotiate while preparing for trial when Silver gave them three options to proceed with the case, court officials said. The three options included complying with the existing settlement, agree on a new settlement or go to trial, Silver said.
At the time, the department asked to craft a new settlement.
Information from: The Arizona Republic, http://www.azcentral.com
Sign up for Daily Newsletters
Copyright © 2019 The Washington Times, LLC.
Please read our comment policy before commenting.


This widget was designed for the SD/TJ Design, Plant, Harvest sidebar. It is based on the Google AJAX slideshow. It allows a Google Reader shared page that contains images to be used in the slideshow--you're not limited to using photo media feeds!


Turn over two cards. If you find a match, the cards will be removed from the board. If they're not a match, try again!
You've stopped the alien invasion and have prevented humankind from being abducted!
Want to save planet earth again?


The material needed for this project is covered by chapter 6 of the lecture notes, in particular section 6.4 and subsequent sections.
Many important differential equations in Science can be written as linear second-order differential equations $$ \begin{equation*} \frac{d^2y}{dx^2}+k^2(x)y = f(x), \end{equation*} $$ where \( f \) is normally called the inhomogeneous term and \( k^2 \) is a real function.
A classical equation from electromagnetism is Poisson's equation. The electrostatic potential \( \Phi \) is generated by a localized charge distribution \( \rho (\mathbf{r}) \). In three dimensions it reads $$ \begin{equation*} \nabla^2 \Phi = -4\pi \rho (\mathbf{r}). \end{equation*} $$ With a spherically symmetric \( \Phi \) and \( \rho (\mathbf{r}) \) the equations simplifies to a one-dimensional equation in \( r \), namely $$ \begin{equation*} \frac{1}{r^2}\frac{d}{dr}\left(r^2\frac{d\Phi}{dr}\right) = -4\pi \rho(r), \end{equation*} $$ which can be rewritten via a substitution \( \Phi(r)= \phi(r)/r \) as $$ \begin{equation*} \frac{d^2\phi}{dr^2}= -4\pi r\rho(r). \end{equation*} $$ The inhomogeneous term \( f \) or source term is given by the charge distribution \( \rho \) multiplied by \( r \) and the constant \( -4\pi \).
We will rewrite this equation by letting \( \phi\rightarrow u \) and \( r\rightarrow x \). The general one-dimensional Poisson equation reads then $$ \begin{equation*} -u''(x) = f(x). \end{equation*} $$
To be more explicit we will solve the equation $$ \begin{equation*} -u''(x) = f(x), \hspace{0.5cm} x\in(0,1), \hspace{0.5cm} u(0) = u(1) = 0. \end{equation*} $$ and we define the discretized approximation to \( u \) as \( v_i \) with grid points \( x_i=ih \) in the interval from \( x_0=0 \) to \( x_{n+1}=1 \). The step length or spacing is defined as \( h=1/(n+1) \). We have then the boundary conditions \( v_0 = v_{n+1} = 0 \). We approximate the second derivative of \( u \) with $$ \begin{equation*} -\frac{v_{i+1}+v_{i-1}-2v_i}{h^2} = f_i \hspace{0.5cm} \mathrm{for} \hspace{0.1cm} i=1,\dots, n, \end{equation*} $$ where \( f_i=f(x_i) \). Show that you can rewrite this equation as a linear set of equations of the form $$ \begin{equation*} \mathbf{A}\mathbf{v} = \tilde{\mathbf{b}}, \end{equation*} $$ where \( \mathbf{A} \) is an \( n\times n \) tridiagonal matrix which we rewrite as $$ \mathbf{A} = \begin{bmatrix} 2& -1& 0 &\dots & \dots &0 \\ -1 & 2 & -1 &0 &\dots &\dots \\ 0&-1 &2 & -1 & 0 & \dots \\ & \dots & \dots &\dots &\dots & \dots \\ 0&\dots & &-1 &2& -1 \\ 0&\dots & & 0 &-1 & 2 \\ \end{bmatrix}, $$ and \( \tilde{b}_i=h^2f_i \).
In our case we will assume that the source term is \( f(x) = 100e^{-10x} \), and keep the same interval and boundary conditions. Then the above differential equation has a closed-form solution given by \( u(x) = 1-(1-e^{-10})x-e^{-10x} \) (convince yourself that this is correct by inserting the solution in the Poisson equation). We will compare our numerical solution with this result in the next exercise.
We can rewrite our matrix \( \mathbf{A} \) in terms of one-dimensional vectors \( a,b,c \) of length \( 1:n \). Our linear equation reads $$ \mathbf{A} = \begin{bmatrix} b_1& c_1 & 0 &\dots & \dots &\dots \\ a_1 & b_2 & c_2 &\dots &\dots &\dots \\ & a_2 & b_3 & c_3 & \dots & \dots \\ & \dots & \dots &\dots &\dots & \dots \\ & & &a_{n-2} &b_{n-1}& c_{n-1} \\ & & & &a_{n-1} & b_n \\ \end{bmatrix}\begin{bmatrix} v_1\\ v_2\\ \dots \\ \dots \\ \dots \\ v_n\\ \end{bmatrix} =\begin{bmatrix} \tilde{b}_1\\ \tilde{b}_2\\ \dots \\ \dots \\ \dots \\ \tilde{b}_n\\ \end{bmatrix}. $$
Note well that we do not include the endpoints since the boundary conditions are used resulting in a fixed value for \( v_i \). A tridiagonal matrix is a special form of banded matrix where all the elements are zero except for those on and immediately above and below the leading diagonal. Develop a general algorithm first which does not assume that we have a matrix with the same elements along the diagonal and the non-diagonal elements. The algorithm for solving this set of equations is rather simple and requires two steps only, a decomposition and forward substitution and finally a backward substitution.
Before we proceed with the solution of the differential equation, you should now plan the organization of your data flow. Here you will find it convenient to define vectors that will contain the matrix elements, the solution to the problem and the function \( f(x) \) when discretized. You should also plan on to read input data, whether you do this from the command line or from a selected file. We recommend strongly that you use dynamical memory allocation. An example of a C++ program which reads from the command line various input parameters can be found here
Your first task is to set up the general algorithm (assuming different values for the matrix elements) for solving this set of linear equations. Find also the precise number of floating point operations needed to solve the above equations. For the general algorithm you need to specify the values of the array elements \( a \), \( b \) and \( c \) by inserting their explicit values.
Then you should code the above algorithm and solve the problem for matrices of the size \( 10\times 10 \), \( 100\times 100 \) and \( 1000\times 1000 \). That means that you select \( n=10 \), \( n=100 \) and \( n=1000 \) grid points.
Compare your results (make plots) with the closed-form solution for the different number of grid points in the interval \( x\in(0,1) \). The different number of grid points corresponds to different step lengths \( h \).
Use thereafter the fact that the matrix has identical matrix elements along the diagonal and identical (but different) values for the non-diagonal elements. Specialize your algorithm to the special case and find the number of floating point operations for this specific tri-diagonal matrix. Compare the CPU time with the general algorithm from the previous point for matrices up to \( n=10^6 \) grid points.
Compute the relative error in the data set \( i=1,\dots, n \),by setting up $$ \epsilon_i=log_{10}\left(\left|\frac{v_i-u_i} {u_i}\right|\right), $$ as function of \( log_{10}(h) \) for the function values \( u_i \) and \( v_i \). For each step length extract the max value of the relative error. Try to increase \( n \) to \( n=10^7 \). Make a table of the results and comment your results. You can use either the algorithm from b) or c).
Make a table of the results and comment the differences in execution time How many floating point operations does the LU decomposition use to solve the set of linear equations? Can you run the standard LU decomposition for a matrix of the size \( 10^5\times 10^5 \)? Comment your results.
To compute the elapsed time in c++ you can use the following statements
...
#include "time.h" // you have to include the time.h header
int main()
{
// declarations of variables
...
clock_t start, finish; // declare start and final time
start = clock();
// your code is here, do something and then get final time
finish = clock();
( (finish - start)/CLOCKS_PER_SEC );
...
Similarly, in Fortran, this simple example shows how to compute the elapsed time.
PROGRAM time
REAL :: etime ! Declare the type of etime()
REAL :: elapsed(2) ! For receiving user and system time
REAL :: total ! For receiving total time
INTEGER :: i, j
WRITE(*,*) 'Start'
DO i = 1, 5000000
j = j + 1
ENDDO
total = ETIME(elapsed)
WRITE(*,*) 'End: total=', total, ' user=', elapsed(1), &
' system=', elapsed(2)
END PROGRAM time
Here follows a brief recipe and recommendation on how to write a report for each project.
The preferred format for the report is a PDF file. You can also use DOC or postscript formats or as an ipython notebook file. As programming language we prefer that you choose between C/C++, Fortran2008 or Python. The following prescription should be followed when preparing the report:


COMP7305 Group 01 - Home
SparkPi
Unravel the Mysteries by Spark
Unravel the Mysteries by Spark (Streaming Version)


Signs Spanning Numbers
Some characters in Arabic script are signs that span (or enclose) numbers. Over time these have been variously called:
- prepended concatenation marks
- subtending marks
- prefixed format control characters
For the purposes of this document, we will use the term spanning signs (or more simply, signs) to refer to these characters and sign glyphs for the glyphs within the font that will represent them.
Since digit choice is dependent on regional use, these marks may be used with European digits (U+0030..U+0039), ARABIC-INDIC digits (U+0660..U+0669) or with EXTENDED ARABIC-INDIC digits (U+06F0..U+06F9).
From a practical standpoint there isn't a need to support an arbitrary-length sequence of digits. For SIL fonts, we have found the maximum number of digits as documented in the following table to be sufficient for most uses.
Examples of how these are formatted are shown below using varying number of digits with hamza used as a separator.
| Characters | Glyph | max # digits |
|---|---|---|
| 0600 ARABIC NUMBER SIGN | ء١ء١٢ء١٢٣ء | 3 |
| 0601 ARABIC SIGN SANAH (year sign) | ء١ء١٢ء١٢٣ء١٢٣٤ء | 4 |
| 0602 ARABIC FOOTNOTE MARKER | ء١ء١٢ء | 2 |
| 0603 ARABIC SIGN SAFHA | ء١ء١٢ء١٢٣ء١٢٣٤ء | 4 |
| 0604 ARABIC SIGN SAMVAT | ء١ء١٢ء١٢٣ء١٢٣٤ء | 4 |
| 0605 ARABIC NUMBER MARK ABOVE | ء١ء١٢ء١٢٣ء١٢٣٤ء | 4 |
| 0890 ARABIC POUND MARK ABOVE | ء١ء١٢ء١٢٣ء١٢٣٤ء | 4 |
| 0891 ARABIC PIASTRE MARK ABOVE | ء١ء١٢ء١٢٣ء١٢٣٤ء | 4 |
| 06DD ARABIC END OF AYAH | ء١ء١٢ء١٢٣ء | 3 |
| 08E2 ARABIC DISPUTED END OF AYAH | ء١ء١٢ء١٢٣ء | 3 |
For more Unicode information about these characters, see Signs Spanning Numbers in Section 9.2 and Prepended Concatenation Marks in Section 23.2 of The Unicode Standard.
Historical complications:
Due to Unicode history, the OpenType font logic for such spanning signs is slightly more complex than it otherwise would be. For details of the problem see this proposal, but in essence:
- Prior to Unicode 5.1 the spanning signs could end up in a different directional run from the digits that followed, in some cases making the order appear backwards (visually the digits were left of the sign) and font implementation difficult.
- Starting in Unicode 5.1 the spanning signs were changed from Bidirectional_Class=AL to AN. This has the effect of putting the sign and the digit sequence in the same directional run, making them easier to implement correctly.
The upshot of this is that even today various implementations work differently, and as a result the logic inside fonts has to be smart enough to work with either order, i.e. when the sign precedes digits or when it follows digits.
As a further result of these variations, OpenType font logic cannot use either mark attachment or cursive attachment lookups to reliably position digits upon spanning signs – the only reliable way we’ve found is through contextual single adjustment lookups.
SIL Implementation
NB: Some of the information and basic OpenType techniques described hearin were learned by studying the Amiri font feature code.
Digit design
The normal glyphs for digits are too large to be displayed with spanning signs, so we have smaller versions of all numeric digits that are to be so used. In fact for most of our fonts we have two smaller sizes of digits:
- Medium digits are used in all cases for most of the spanning signs.
- Small digits are used
- for the Disputed End of Ayah sign or
- if there are 3 digits to be enclosed in an End of Ayah, thus allowing the End of Ayah to retain the same shape no matter whether there are 1, 2 or 3 digits following it.
The exceptions to the need for two smaller sizes are Alkalami and Ruwudu fonts. These use different widths of End of Ayah for different numbers of digits, and thus these fonts require only one smaller size of digits.
Because of the need to visually center the digits within End of Ayah, we utilize mono-width designs for all medium and small digits.
In summary: for all three sets of digits (European digits, ARABIC-INDIC digits and with EXTENDED ARABIC-INDIC digits) and any language specific variants of those digits, we need one (or possibly two) sets of smaller digit glyphs. Within each of those sets, all digits must have the same width.
Spanning sign design
For reference, here are the spanning signs, the default glyph name used in SIL fonts, and a repeat of the number of digits we want to support:
| Spanning Sign | SIL default glyph name | Max # digits |
|---|---|---|
| U+0600 ARABIC NUMBER SIGN | number-ar | 3 |
| U+0601 ARABIC SIGN SANAH | year-ar | 4 |
| U+0602 ARABIC FOOTNOTE MARKER | footnotemarker-ar | 2 |
| U+0603 ARABIC SIGN SAFHA | pagenumber-ar | 4 |
| U+0604 ARABIC SIGN SAMVAT | samvat-ar | 4 |
| U+0605 ARABIC NUMBER MARK ABOVE | numbermark-ar | 4 |
| U+06DD ARABIC END OF AYAH | endofayah-ar | 3 |
| U+0890 ARABIC POUND MARK ABOVE | poundmarkabove-ar | 4 |
| U+0891 ARABIC PIASTRE MARK ABOVE | piastremarkabove-ar | 4 |
| U+08E2 ARABIC DISPUTED END OF AYAH | endofayahdisputed-ar | 3 |
Here is an example using the U+065 Number Mark Above:
We use .2
, .3
, and .4
suffixes on sign glyph names to indicate how many digits a given glyph is designed to take. For example:
numbermark-ar
is designed for one digitnumbermark-ar.2
is designed for two digitsnumbermark-ar.3
is designed for three digits
etc.
One thing this does for in our workflow is automatically create some potentially useful FEA classes:
c_2
class of all glyphs with.2
extensioncno_2
corresponding class of glyphs without the.2
extensionc_3
class of all glyphs with.3
extensioncno_3
corresponding class of glyphs without the.3
extension
etc.
Anchors
Anchors are defined to help position the digits to the spanning signs:
- Digit glyphs have
digitL
(left side) anddigitR
(right side) anchors at the baseline to attach each digit to the previous one - Sign glyphs contain just the
digitR
anchor to define where the left-most of the digit sequence should be positioned
As mentioned above, in most of our fonts the End of Ayah glyph doesn’t change width like the other spanning signs, but multiple glyph variants are still needed. This is because the position of the first digit depends on how many digits there are. This is further complicated in some of our fonts by the fact that the 1- and 2-digit versions of the glyph use the medium size digits, while the 3-digit version uses the small size digits in order to fit all of them in:
Font logic
For simplicity, code snippets below implement just 4 spanning signs:
numbermark-ar
at most 4 digitsnumber-ar
at most 3 digitsendofayah-ar
at most 3 digitsfootnotemarker-ar
at most 2 digits
Both substitution and positioning rules are needed:
- Substitute the correct spanning sign glyph based on how many digits follow
- Substitute the medium or small digit glyphs for the normal-sized digit glyphs
- Adjust position of digits by attaching or aligning
digitL
todigitR
anchors
Graphite logic
The graphite rules are relatively straightforward attachments using the digitL
and digitR
anchors, but of course have to be done in both orders. Details are left to the reader.
OpenType logic
It would be nice if we could use anchor or cursive attachment rules (GPOS lookup types 4 or 3) for positioning digits on spanning signs but this doesn't work — at least it can only work in one of the needed orders. Rather than any attachment rules, we use FEAX to construct the adjustment rules to kern the digits to the correct position on the spanning signs.
OpenType substitutions
Substituting the correct sign glyph (based on how many digits follow) and substituting the correct size digits (medium or small) can be done in a single contextual rule.
We start by making utility lookups that replace the spanning sign glyphs:
lookup _signWith_4digits { # Replace spanning signs with 4-digit variant
lookupflag IgnoreMarks ;
sub @cno_4 by @c_4 ;
} _signWith_4digits ;
lookup _signWith_3digits { # Replace spanning signs with 3-digit variant
lookupflag IgnoreMarks ;
sub @cno_3 by @c_3 ;
} _signWith_3digits ;
lookup _signWith_2digits { # Replace spanning signs with 2-digit variant
lookupflag IgnoreMarks ;
sub @cno_2 by @c_2 ;
} _signWith_2digits ;
noting that we don't need a lookup for the 1-digit case because the default glyph for each spanning sign is constructed to handle the 1-digit case.
Then we add utility lookups to substitute the digits:
lookup _signDigits_ToMedium { # replace digits with medium
lookupflag IgnoreMarks ;
sub @DigitsAny by @DigitsAnyMedium ;
} _signDigits_ToMedium ;
lookup _signDigits_ToSmall { # replace digits with small
lookupflag IgnoreMarks ;
sub @DigitsAny by @DigitsAnysmall ;
} _signDigits_ToSmall ;
And now, remembering that we have to handle different numbers of digits in both orders, we write contextual substitution rules that reference the utility lookups.
lookup SignWithDigits {
lookupflag IgnoreMarks ;
# Uniscribe or HarfBuzz 'latn' order: sign is before the digits
# Handle spanning sign followed by 4 medium digits
sub @c_4' lookup _signWith_4digits
@DigitsAny' lookup _signDigits_ToMedium
@DigitsAny' lookup _signDigits_ToMedium
@DigitsAny' lookup _signDigits_ToMedium
@DigitsAny' lookup _signDigits_ToMedium ;
# Handle spanning sign (other than End of Ayah) followed by 3 medium digits
# class of sign glyphs has to be written out explicity because
# End of Ayah with 3 digits takes small digits.
# Note that footnotemarker-ar takes a max of 2 digits so also isn't included
sub [ numbermark-ar number-ar ]' lookup _signWith_3digits
@DigitsAny' lookup _signDigits_ToMedium
@DigitsAny' lookup _signDigits_ToMedium
@DigitsAny' lookup _signDigits_ToMedium ;
# Handle End of Ayah followed by 3 small digits
sub endofayah-ar' lookup _signWith_3digits
@DigitsAny' lookup _signDigits_ToSmall
@DigitsAny' lookup _signDigits_ToSmall
@DigitsAny' lookup _signDigits_ToSmall ;
# Handle spanning sign followed by 2 medium digits
sub @c_2' lookup _signWith_2digits
@DigitsAny' lookup _signDigits_ToMedium
@DigitsAny' lookup _signDigits_ToMedium ;
# Handle spanning sign followed by 1 medium digit
sub @cno_2
@DigitsAny' lookup _signDigits_ToMedium ;
# HarfBuzz 'arab' order: sign is after the digits
# Handle 4 medium digits followed by spanning sign
sub @DigitsAny' lookup _signDigits_ToMedium
@DigitsAny' lookup _signDigits_ToMedium
@DigitsAny' lookup _signDigits_ToMedium
@DigitsAny' lookup _signDigits_ToMedium
@c_4' lookup _signWith_4digits ;
# Handle 3 medium digits followed by spanning sign other than End of Ayah
sub @DigitsAny' lookup _signDigits_ToMedium
@DigitsAny' lookup _signDigits_ToMedium
@DigitsAny' lookup _signDigits_ToMedium
[ numbermark-ar number-ar ]' lookup _signWith_3digits ;
# Handle 3 small digits followed by End of Ayah
sub @DigitsAny' lookup _signDigits_ToSmall
@DigitsAny' lookup _signDigits_ToSmall
@DigitsAny' lookup _signDigits_ToSmall
endofayah-ar' lookup _signWith_3digits ;
# Handle 2 medium digits followed by spanning sign
sub @DigitsAny' lookup _signDigits_ToMedium
@DigitsAny' lookup _signDigits_ToMedium
@c_2' lookup _signWith_2digits ;
# Handle 1 medium digit followed by spanning sign
sub @DigitsAny' lookup _signDigits_ToMedium
@cno_2 ;
} SignWithDigits ;
OpenType positioning
Some assumptions:
- for all the digits, the
digitL
anddigitR
APs are positioned at the same height and exactly on the sidebearings (this simplifies the math somewhat). - all the medium digits have the same width and anchors, and similarly for the small digits if used. This means it doesn't matter which particular medium digit or small digit we use for calculations — we've chosen
zero.medium
andzero.small
- in our FEAX code, we let:
m
represent the spanning sign glyphw
represent the the negative of the width of the digits, which can be calculated in FEAX using, for example:
let w = -ADVx("zero.medium") ;
(For more information about the extensions of the FEA syntax used in this code, see fea extensions do statement.)
We do not assume that the spanning signs have their digitR
anchors at the same height as the anchors of the digits, so we'll calculate a vertical kerning as well.
For the first example, we'll use a 3-digit sequence:
Step one is to align first digit's digitL
anchor with the sign glyph's digitR
. To do this, calculate the offsets (x and y) from the digit's starting position to where we want it positioned. The first digit's starting position will be on the baseline immediately to the right of the spanning sign glyph, in other words the digit's left sidebearing will align with the spanning sign's right sidebearing.
The amount the digit needs to be moved vertically to align its anchor to that of the spanning sign is the difference in the y coordinates of the anchors. In FEAX we can calculate that using:
let y = APy(m, "digitR") - APy("zero.medium", "digitL");
Horizontally we need to left-kern that first digit a distance equal to the width of the spanning sign minus the x-coordinate of the spanning sign's digitR
anchor. Since a left-kern is negative, in FEAX we calculate the value and save it in a variable x1
by:
let x1 = APx(m, "digitR") - ADVx(m);
At the same time we kern the first digit, we want to remove its advancewidth. Thus we start out our contextual kerning rule using:
pos $m @DigitsAnyMedium' <$x1 $y $w 0> @DigitsAnyMedium' @DigitsAnyMedium' DigitsAnyMedium';
(For refresher on the <...>
value record, see Value record format B in the Adobe FEA specification.)
Considering the second digit, we want to move it from its starting position to a position immediately right of the first digit. Again we need to know the starting position of the second digit and this may surprise the reader. Because we removed the advance width of the first digit when we kerned it, the starting position of the second digit is the same as that of the first digit (before we moved it): immediately right of the spanning sign glyph. The kern distance for the second digit is, therefore, the same as that of the first but to the right by the width of the first digit. Because w
is negative, we calculate the second digit's kern in FEAX as:
let x2 = x1 - w;
We can now add kerning for the second digit to our existing rule:
pos $m @DigitsAnyMedium' <$x1 $y $w 0> @DigitsAnyMedium' <$x2 $y $w 0> DigitsAnyMedium' ;
Adding similar logic for the 3rd digit and putting it all together gives us this snippet for a 3-digit sequence for a sign m
:
let y = APy(m, "digitR") - APy("zero.medium", "digitL");
let w = -ADVx(d);
let x1 = APx(m, "digitR") - ADVx(m);
let x2 = x1 - w;
let x3 = x2 - w;
with positioning rules
pos $m @DigitsAnyMedium' <$x1 $y $w 0> @DigitsAnyMedium' <$x2 $y $w 0> DigitsAnyMedium' <$x3 $y $w 0> ;
pos @DigitsAnyMedium' <$x3 $y $w 0> @DigitsAnyMedium' <$x2 $y $w 0> @DigitsAnyMedium' <$x1 $y $w 0> $m ;
Note that we've added a second positioning rule to handle the case where the spanning sign follows the digits — confirming it is correct is an exercise for the reader.
One last step is to put all this together with some FEAX that iterates through the spanning signs. For the limited example of the four spanning signs, the complete set of positioning rules would look something like:
lookup PositionSpanningSigns {
lookupflag IgnoreMarks ;
# In each "do" template, the first rule is ordered for Uniscribe or HarfBuzz 'latn', the second for HarfBuzz 'arab'
# Those that take 4 medium digits
do for m = @c_4 ;
let y = APy(m, "digitR") - APy("zero.medium", "digitL");
let w = -ADVx("zero.medium");
let x1 = APx(m, "digitR") - ADVx(m);
let x2 = x1 - w; let x3 = x2 - w; let x4 = x3 - w;
{
pos $m @DigitsAnyMedium' <$x1 $y $w 0> @DigitsAnyMedium' <$x2 $y $w 0> @DigitsAnyMedium' <$x3 $y $w 0> @DigitsAnyMedium' <$x4 $y $w 0> ;
pos @DigitsAnyMedium' <$x4 $y $w 0> @DigitsAnyMedium' <$x3 $y $w 0> @DigitsAnyMedium' <$x2 $y $w 0> @DigitsAnyMedium' <$x1 $y $w 0> $m ;
}
# Those that take 3 medium digits
do for m = [ number-ar.3 numbermark-ar.3 ] ;
let y = APy(m, "digitR") - APy("zero.medium", "digitL");
let w = -ADVx("zero.medium");
let x1 = APx(m, "digitR") - ADVx(m);
let x2 = x1 - w; let x3 = x2 - w;
{
pos $m @DigitsAnyMedium' <$x1 $y $w 0> @DigitsAnyMedium' <$x2 $y $w 0> @DigitsAnyMedium' <$x3 $y $w 0> ;
pos @DigitsAnyMedium' <$x3 $y $w 0> @DigitsAnyMedium' <$x2 $y $w 0> @DigitsAnyMedium' <$x1 $y $w 0> $m ;
}
# Those that take 3 small digits (default for @c_3)
do for m = [ endofayah-ar.3 ] ;
let y = APy(m, "digitR") - APy("zero.small", "digitL");
let w = -ADVx("zero.small");
let x1 = APx(m, "digitR") - ADVx(m);
let x2 = x1 - w; let x3 = x2 - w;
{
pos $m @DigitsAnySmall' <$x1 $y $w 0> @DigitsAnySmall' <$x2 $y $w 0> @DigitsAnySmall' <$x3 $y $w 0> ;
pos @DigitsAnySmall' <$x3 $y $w 0> @DigitsAnySmall' <$x2 $y $w 0> @DigitsAnySmall' <$x1 $y $w 0> $m ;
}
# Those that take 2 medium digits
do for m = @c_2 ;
let y = APy(m, "digitR") - APy("zero.medium", "digitL");
let w = -ADVx("zero.medium");
let x1 = APx(m, "digitR") - ADVx(m);
let x2 = x1 - w;
{
pos $m @DigitsAnyMedium' <$x1 $y $w 0> @DigitsAnyMedium' <$x2 $y $w 0> ;
pos @DigitsAnyMedium' <$x2 $y $w 0> @DigitsAnyMedium' <$x1 $y $w 0> $m ;
}
# Those that take 1 medium digit
do for m = @cno_2 ;
let y = APy(m, "digitR") - APy("zero.medium", "digitL");
let w = -ADVx("zero.medium");
let x1 = APx(m, "digitR") - ADVx(m);
{
pos $m @DigitsAnyMedium' <$x1 $y $w 0> ;
pos @DigitsAnyMedium' <$x1 $y $w 0> $m ;
}
} PositionSpanningSigns ;
Because of variation in the repertoire of signs supported and their specific designs, actual implementation in our fonts will vary in the details but the principals are the same.
Postscript
The observant reader will have noted that the DigitR
anchor on digit glyphs is not actually used in the code. However it is used in Graphite code which was not covered in this document.


Feminist Majority Foundation - Equality around the world [ feminist.org ]
Dear Dry,
Having trouble finding the perfect gift for your feminist mom? We’ve got you covered!
*Order now through April 30 at the Feminist Store and save on feminist gifts and “Ms.” magazine subscriptions - with guaranteed delivery by Mother’s Day [ http://store.feminist.org/ ]!*
*Shop at the FMF Feminist Store and receive 10% off on all merchandise until midnight on April 30 by entering the code FEMINISTMOM2014 at checkout* [ http://store.feminist.org ].* *We’ve also lowered the prices of digital and print subscriptions to “Ms. "magazine - so you can save big on a gift that lasts all year long!
Mother’s Day is the perfect chance to thank your mom for raising a revolutionary. Don’t wait another minute to find the perfect feminist gift for your feminist mom.
*Get shopping today!* [ http://store.feminist.org/ ]
1600 Wilson Boulevard, Suite 801, Arlington, VA, 22209 |<PHONE_NUMBER> |<EMAIL_ADDRESS>You have received this e-mail because of your interest in women’s issues. To unsubscribe, please click here. [ http://org.salsalabs.com/o/1400/p/salsa/supporter/unsubscribe/public/index.sjs?unsubscribe_page_KEY=494 ]


Talks
Here's a small (and not entirely disjoint) selection of talks I've given over the years.
Lattice models of theta-shaped polymers and other branching structures
Monte Carlo Algorithms in Statistical Mechanics
MATRIX, Creswick VIC
26 June - 7 July 2023
Slides
Life on the lattice: self-avoiding walks, polygons, animals, and more
"Highlights in Mathematical Physics" Seminar Series
School of Mathematics and Statistics, University of Melbourne, VIC, Australia
2 September 2021
Slides
Walks obeying two-step rules on the square lattice: full, half and quarter planes
"Transcendance et Combinatoire" Seminar Series (online)
Université de Versailles-St Quentin, Versailles, France
8 January 2021
PDF File
Semi-flexible directed polymers in a strip with attractive walls
AustMS Conference 2019
Monash University, Melbourne, Australia
3 - 6 December 2019
PDF File
Alignment percolation
Mathematical Physics Seminar Series
School of Mathematics and Statistics, University of Melbourne, VIC, Australia
29 October 2019
PDF File
Knotting statistics for polygons in lattice tubes
The Topology of Nucleic Acids: Research at the Interface of Low-Dimensional Topology, Polymer Physics and Molecular Biology
Banff International Research Station, Banff, AB, Canada
24 - 29 March 2019
PDF File
Powered Catalan numbers
Effective Visualisation in the Mathematical Sciences (EVIMS3)
University of Newcastle, Newcastle, Australia
13 November 2018
PDF File
Pattern-avoiding permutations: enumeration, asymptotics and generating functions
Colorado State University, Fort Collins, Colorado, USA
27 June 2018
PDF File
Catalan, Schröder, Baxter, and other sequences
Discrete Structures and Algorithms Seminar
School of Mathematics and Statistics, University of Melbourne, VIC, Australia
29 March 2018
PDF File
Partition function zeros of adsorbing walk models
ANZAMP Conference 2018
Auckland, New Zealand
30 January - 1 February 2018
PDF File
Statistical mechanics of forced and adsorbing directed polymers
Monash Workshop on Self-interacting Processes
Monash University, Melbourne, Australia
29 - 31 August 2017
PDF File
Knot probabilities and pattern theorems for polygons in tubes
Knots and Polymers: Aspects of topological entanglement in DNA, proteins and graph-shaped polymers
Ochanomizu University, Tokyo, Japan
8 - 10 August 2017
PDF File
Compressed random and self-avoiding walks
11th Prairie Discrete Mathematics Workshop
Banff International Research Station, Banff, AB, Canada
7 - 9 August 2015
PDF File
Solvable self-avoiding walk and polygon models with large growth rates
5th Biennial Canadiam Discrete and Algorithmic Mathematics Conference (CanaDAM)
University of Saskatchewan, Saskatoon, SK, Canada
1 - 4 June 2015
PDF File
Models of pulled and compressed polymers
Workshop on Combinatorial Applications to Biology, Chemistry and Physics
University of Saskatchewan, Saskatoon, SK, Canada
21 - 22 June 2014
PDF File
Solvable models of self-avoiding walks
Université de Genève, Geneva, Switzerland
30 September 2013
PDF File
Polymer adsorption on the honeycomb lattice
36th Conference on Stochastic Processes and their Applications
University of Colorado, Boulder, CO, United States
29 July - 2 August 2013
PDF File
© 2021 Nicholas Beaton
Template design by Andreas Viklund


Follow us on Facebook to get notifications for upcoming meetups, events, and projects.
Follow Us »
Want to contribute to a project? Check out all our open-source projects on GitHub.
Follow us on Instagram and get a glimpse of our weekly meetups and events.


In accordance with Law Decree n° 196/2003, which replaced the Law n° 675/1996 concerning the protection of personal data, we inform you that by filling out this form and then sending this email message, you consent to the processing of your personal data (sensitive data will not be processed in any way) acquired by GeoSolutions SAS via electronic and/or automated tools. In any case, you can exercise your rights granted to you pursuant to Legislative Decree n° 196/2003 (data access, updates, integration, cancellation). Clicking the “Accept” button, you acknowledge that you have read this text and that you consent to the processing of your personal data. At any time you can ask the staff of GeoSolutions SAS web site to unsubscribe you from the service by following the instructions at the end of each message.
Our website uses cookies, as almost all websites do, to help provide you with the best experience we can. Cookies are small text files that are placed on your computer or mobile phone when you browse websites
Our cookies help us:
We do not use cookies to:
You can learn more about all the cookies we use below.
If the settings on your software that you are using to view this website (your browser) are adjusted to accept cookies we take this, and your continued use of our website, to mean that you are fine with this. Should you wish to remove or not use cookies from our site you can learn how to do this below, however doing so will likely mean that our site will not work as you would expect.
We use cookies to make our website work including:
There is no way to prevent these cookies being set other than to not use our site.
Our site, like most websites, includes functionality provided by third parties. A common example is an embedded YouTube video. Our site includes the following which use cookies:
So you can easily like or share our content on the likes of Facebook and Twitter we have included sharing buttons on our site. Cookies are set by:
The privacy implications on this will vary from social network to social network and will be dependent on the privacy settings you have chosen on these networks.
You can usually switch cookies off by adjusting your browser settings to stop it from accepting cookies (learn how here.). Doing so however will likely limit the functionality of our’s and a large proportion of the world’s websites as cookies are a standard part of most modern websites.
It may be that you concerns around cookies relate to so called “spyware”. Rather than switching off cookies in your browser you may find that anti-spyware software achieves the same objective by automatically deleting cookies considered to be invasive. Learn more about managing cookies with antispyware software.


The beautiful places below are organized into tropical/warm, arctic/cold, and architectural.
No matter where you live in the world, there are incredible places to visit and architectural sights to see.
To be honest, there are thousands of places that could have made this list but hopefully this list provides some justice to those that were left off.
Kauai, Hawaii owns the medal of the rainiest place on earth, allowing for a tropical paradise. Hike, swim, bike, and dive.
Bora Bora is an island that once was a volcano, which has subsequently subsided and formed a barrier reef. The reef ecosystem allows for pristine clear blue water and reefs limit waves, providing a protected sanctuary.
Longsheng is named after Longji, which translates to dragon's backbone. The terrace resembles dragon scales as rice fields snake through the mountains.
Victoria Falls that border Zambia and Zimbabwe is the largest waterfall in the world by total area. The falls transport an astonishing 1,088 cubic meters per second of water down an ~350 foot cliff.
The Amazon River is the artery for the largest rainforest in the world. It is the largest river in the world by discharge and one of the largest by length. The surrounding rainforest represents over half of the world's remaining rainforest.
The Rainbow Mountains of Zhangye Danxia, China show off weathering and erosion at it's most beautiful. The dramatic colors throughout the mountain are a result of trace minerals associated within the sandstone, coloring the sand in reds, greens, and yellows.
Railay, Thailand is a magical place only accessible by boat on a small Thai peninsula. Spend your day's rock climbing the limestone cliffs, exploring vast cave systems, or swimming to nearby islands.
Neuschwanstein, a nineteenth-century castle in southern Germany is the inspiration for Disneyland's Sleeping Beauty Castle. This German retreat is visited regularly during summer months as a symbol of refuge and peace.
The natural display of varying color within the arctic sky is one of Iceland's biggest tourist sights. Unfortunately, it's rather unpredictable so make sure you leave enough time to try a few times.
Antarctica is on average the coldest, windiest, driest, and highest continent. This desert continent is, however, home to millions of penguins of different species.
Yellowstone National Park is the oldest national park in the US and likely the world. Drive through the park and encounter an array of wildlife 10's of feet away from you.
Fjords are created by the slow erosion of mountain valleys as glaciers move down toward the sea. Tracy Arm Fjord in Alaska is home to Orcas and a rapidly disappearing environment.
Torres Del Paine in southern Patagonia is a national park that boasts beautiful mountains, glaciers, lakes, and rivers. Take the trip to southern Patagonia and you can hike the partial or full circuit around the stunning granite peaks in the backdrop of the photo above.
The island of Svalbard is located within the Arctic Ocean, north of mainland Europe. Svalbard is the northernmost settlement with a permanent population in the world. Trekking through Svalbard it's not uncommon to see polar bears, reindeer, and perhaps an Arctic fox.
The Temples of Bagan sit within central Burma (Myanmar) and was built as the capital of ancient Myanmar. The temples are the largest concentration of Buddhist temples, most of which dating back to the 12th and 11th centuries.
The ancient city of Petra, Jordan is an architectural masterpiece. Built into the side of a rock cliff, Petra was carved as early as 312 BC. Petra was names a UNESCO World Heritage Site and was unknown to the western world until 1812.
Hike up the mountain ridge where Machu Picchu sits and you will see the peak of Inca civilization. This beautiful place was built in 1450 and was only occupied for ~100 years until the Spanish Conquest.
Venice, the city on water, is built on 118 small islands that are separated by a vast network of canals. The city was built on the Venetian Lagoon and is unlike any other city in the world.
The Pyramid of Giza is one of the seven wonders of the ancient world, located in El Giza, Egypt. The pyramid was built as a tomb in 2560 BC for the Egyptian Pharaoh Khufu.
The ancient temple of Ta Prohm was built as a Buddhist monastery and university. The temple was largely left as is, with spung (Tetrameles nudiflora) trees and moss growing throughout the architecture.
The Taj Mahal in northern India is a beautiful white marble mausoleum. The Taj Mahal is regarded as the jewel of Muslim art in India and is an often sought after location for worship and tourism.
Andrej Tibenský is a geologist, forbes contributor, and adventurer. Feel free to email me. ☺


{% include 'blocks/event_header.html' %}
{% include 'blocks/translation.html' %}
{% include 'blocks/sidebar.html' %}
{% include 'blocks/event_talks.html' %}
{% include 'blocks/sponsors.html' %}
{% include 'blocks/gallery.html' %}
{% include 'blocks/share.html' %}
{% endblock %}


The TaDLab is a laboratory in the Psychology Department at the University of Michigan, directed by Dr. Christopher Monk.
The TaDLab is a collaborative research environment dedicated to examining affective-cognitive processes during adolescent development. Behavioral and neuroimaging methods are employed to better understand how these processes contribute to normal development or risk for psychopathology. Recent projects aim to identify environmental factors associated with affective-cognitive development and increased risk for internalizing disorders.
The TaDLab is currently working on the Adolescent Wellbeing & Brain Development Study, also known as the Study of Adolescent Development (SAND).
Click below to learn more about the members of the TaDLab!
If you are undergraduate interested in volunteering or receiving course credit in the TaDLab, please click below to learn more about applying.


⚡ Youtube Speed Changer Extension
Basic Controls
- v: Toggles start/stop (from start point)
- s: Slow down 5%
- d: Speed up 5%
- t: Set start point to current video position
- q: Move start point backward 1 second
- r: Move start point forward 1 second
Precision Controls
- x: Slow down 1%
- c: Speed up 1%
- w: Move start point backward 0.1 seconds
- e: Move start point forward 0.1 seconds


Easy - Used In Creating Robust Code
Being a good programmer doesn't just mean following good programming conventions, it also means considering user input and considering cases where invalid inputs are not accepted by our programming.
Take this line of code as an example, we want our user to enter an integer for some reason:
number = int(input("Please enter an integer: "))
If the user enters in the string "five" for example, or even "5.1", these inputs are both numbers but not valid inputs for our program. Python will throw an error into the shell as follows:
This is not a good error for our user to see. This is where we can use try
and except
. try
and except
does allow for specific errors to be targeted but for the purposes of NCEA Level 1, any case where using the code in the try
codeblock throws an error, we use the code in the except
block to stop the program from throwing an exception, giving meaningful feedback to the user.
try: number = int(input("Please enter an integer: ")) except: print("You didn't enter a valid integer")
Now in the case where the user will enter in a value that is not an integer, the next line will print out.
>>> "Please enter an integer:" five >>> "You didn't enter a valid integer"
The only problem is that our program will end after the except. How can we write our program to force our user to enter a valid input?
If you guess by using a while
loop you'd be right!
again = True while again: try: number = int(input("Please enter an integer: ")) again = False except: print("You didn't enter a valid integer")
Now you know the basics of try
& except
statements. Have a go at creating one of your own try
& except
statements using repl.it. It's a super convenient online Python interpreter.


Music Match
Home
About
Explore
My Library
My Profile
Login
no name found
no email found
Email has not been verified
no uid found


Recipe 18.10. Computing Prime NumbersCredit: David Eppstein, Tim Peters, Alex Martelli, Wim Stolker, Kazuo Moriwaka, Hallvard Furuseth, Pierre Denis, Tobias Klausmann, David Lees, Raymond Hettinger ProblemYou need to compute an unbounded sequence of all primes, or the list of all primes that are less than a certain threshold. SolutionTo compute an unbounded sequence, a generator is the natural Pythonic approach, and the Sieve of Eratosthenes, using a dictionary as the supporting data structure, is the natural algorithm to use: import itertools def eratosthenes( ): '''Yields the sequence of prime numbers via the Sieve of Eratosthenes.''' D = { } # map each composite integer to its first-found prime factor for q in itertools.count(2): # q gets 2, 3, 4, 5, ... ad infinitum p = D.pop(q, None) if p is None: # q not a key in D, so q is prime, therefore, yield it yield q # mark q squared as not-prime (with q as first-found prime factor) D[q*q] = q else: # let x <- smallest (N*p)+q which wasn't yet known to be composite # we just learned x is composite, with p first-found prime factor, # since p is the first-found prime factor of q -- find and mark it x = p + q while x in D: x += p D[x] = p DiscussionTo compute all primes up to a predefined threshold, rather than an unbounded sequence, it's reasonable to wonder if it's possible to use a faster way than good old Eratosthenes, even in the smart variant shown as the "Solution". Here is a function that uses a few speed-favoring tricks, such as a hard-coded tuple of the first few primes: def primes_less_than(N): # make `primes' a list of known primes < N primes = [x for x in (2, 3, 5, 7, 11, 13) if x < N] if N <= 17: return primes # candidate primes are all odd numbers less than N and over 15, # not divisible by the first few known primes, in descending order candidates = [x for x in xrange((N-2)|1, 15, -2) if x % 3 and x % 5 and x % 7 and x % 11 and x % 13] # make `top' the biggest number that we must check for compositeness top = int(N ** 0.5) while (top+1)*(top+1) <= N: top += 1 # main loop, weeding out non-primes among the remaining candidates while True: # get the smallest candidate: it must be a prime p = candidates.pop( ) primes.append(p) if p > top: break # remove all candidates which are divisible by the newfound prime candidates = filter(p._ _rmod_ _, candidates) # all remaining candidates are prime, add them (in ascending order) candidates.reverse( ) primes.extend(candidates) return primes On a typical small task such as looping over all primes up to 8,192, eratosthenes (on an oldish 1.2 GHz Athlon PC, with Python 2.4) takes 22 milliseconds, while primes_less_than takes 9.7; so, the slight trickery and limitations of primes_less_than can pay for themselves quite handsomely if generating such primes is a bottleneck in your program. Be aware, however, that eratosthenes scales better. If you need all primes up to 199,999, eratosthenes will deliver them in 0.88 seconds, while primes_less_than takes 0.65. Since primes_less_than's little speed-up tricks can help, it's natural to wonder whether a perhaps simpler trick can be retrofitted into eratosthenes as well. For example, we might simply avoid wasting work on a lot of even numbers, concentrating on odd numbers only, beyond the initial 2. In other words: def erat2( ): D = { } yield 2 for q in itertools.islice(itertools.count(3), 0, None, 2): p = D.pop(q, None) if p is None: D[q*q] = q yield q else: x = p + q while x in D or not (x&1): x += p D[x] = p And indeed, erat2 takes 16 milliseconds, versus eratosthenes' 22, to get primes up to 8,192; 0.49 seconds, versus eratosthenes' 0.88, to get primes up to 199,999. In other words, erat2 scales just as well as eratosthenes and is always approximately 25% faster. Incidentally, if you're wondering whether it might be even faster to program at a slightly lower level, with q = 3 to start, a while True as the loop header, and a q += 2 at the end of the loop, don't worrythe slightly higher-level approach using itertools' count and islice functions is repeatedly approximately 4% faster. Other languages may impose a performance penalty for programming with higher abstraction, Python rewards you for doing that. You might keep pushing the same idea yet further, avoiding multiples of 3 as well as even numbers, and so on. However, it would be an exercise in diminishing returns: greater and greater complication for smaller and smaller gain. It's better to quit while we're ahead! If you're into one liners, you might want to study the following: def primes_oneliner(N): aux = { } return [aux.setdefault(p, p) for p in range(2, N) if 0 not in [p%d for d in aux if p>=d+d]] Be aware that one liners, even clever ones, are generally anything but speed demons! primes_oneliner takes 2.9 seconds to complete the same small task (computing primes up to 8,192) which, eratosthenes does in 22 milliseconds, and primes_less_than in 9.7so, you're slowing things down by 130 to 300 times just for the fun of using a clever, opaque one liner, which is clearly not a sensible tradeoff. Clever one liners can be instructive but should almost never be used in production code, not just because they're terse and make maintenance harder than straightforward coding (which is by far the main reason), but also because of the speed penalties they may entail. While prime numbers, and number theory more generally, used to be considered purely theoretical problems, nowadays they have plenty of practical applications, starting with cryptography. See AlsoTo explore both number theory and its applications, the best book is probably Kenneth Rosen, Elementary Number Theory and Its Applications (Addison-Wesley); http://www.utm.edu/research/primes/ for more information about prime numbers. |


Problem
The jobsite I’m doing this case for wants to be more unique so it has a better chance at competing with the bigger and more known jobsites. Along with the competition the following factors are the reasons for the difficulties.
- Returning visitors (they apply only to one great vacancy and leave again).
- Value (the websites doesn’t bring extra value compared to other jobsites).
- Complex system.
Goal
- To bring value to the users/visitors.
- To be able to show the best vacancies for the users.
- To help find our users/visitors a new job.
The proposal
Make the website personal, this means show the information the user is looking for. We know the users of a jobsite are open/looking for a potential new job. The key here is personalization.
This will enable the users to look for relevant vacancies quickly throughout a busy day. Users have less to think about, less actions to do on the jobsite and can explore opportunities they might not have searched for themselves.
The vacancies that can be shown can be sorted for the users the vacancies are catered to each user based on their preferences, skills and location.
If there is more information known about the user, there should also be the ability to show video’s or blogs that can help the users prepare for the next step in their career, interviews for example.
Showing personalized information will increase the trust in the jobsite, as a result users will come back more often and they will remember and share their experience about our brand with other people.
Design process
- Step 1: Problem, goal and concept solution
- Step 2: Research personalization
- Step 3: Scenario and personas
- Step 4: Pain points
- Step 5: Solution and design
- Step 6: Conclusion
My role and the team
Primarily I have worked on user experience research and creative thinking. Teaming up with my design colleague who was responsible for visual design and my development colleagues who were responsible for the interaction and implementation.
Research
What is personalization exactly, how did it develop in the last couple of years before 2018 and what is the future of personalization.
Definition of personalization
‘Personalize’: Verb (used with object), personalized, personalizing.
- to ascribe personal qualities to; personify.
- to design or tailor to meet an individual's specifications, needs, or preferences: a personalized search engine.
Why personalize the jobsite?
Personalization makes a website more relevant for the user. Why show information that is not relevant? We should be able to make for example our homepage more relevant and attractive for our users. Making our website personal gives us the chance to create targeted content. Examples of this are vacancies, locations, photos, video's, blogs etc.
History of personalization within websites
Personalization started with a page, before you would go to the actual site, where you could choose what kind of user you were. For example a employer or employee. Depending on the button you clicked you get the content that’s relevant for you.
When ecommerce got popular they started to show more and more personal products related to things you’ve looked at on the website or bought in the past. This is personalization. There are almost no big ecommerce platforms left that don’t personalize the content (products).
Nowadays personalization
Personalization is used by companies like Netflix, Spotify, Amazon and Instagram. While machine learning is getting more and more developed it can even personalize applications and websites more.
Non-ecommerce websites are behind on personalization, that’s a fact. So by integrating this in our website, the website can be way ahead of the most of the competitors.
Future of personalization
The prediction is that non-commerce websites will start with personalization as well, that’s just a matter of time. With the jobsite we can be leading in this.
Consumer expectations are constantly evolving. As people engage with companies across industries, their expectations for what constitutes a good customer experience continue to change. But one thing is clear: they expect the experience to be relevant and helpful. They want the companies they engage with to understand them as individuals and provide them with the right content, products, promotions, and messages so they can quickly and easily find what they are looking for.
Scenarios
In our case there are multiple scenarios why users are on the jobsite:
- Scenario 1: User has relevant work experience and actively looking for a new job.
- Scenario 2: User is a starter in the market, this is potentially the first full-time job after the user his or her study.
- Scenario 3: User has relevant work experience but is not actively looking for a new job, but open to a new challenge.
Scenario 1
- Work experience
- Looking for a job
Scenario 2
- Work experience
- Looking for a job
Scenario 3
- Work experience
- Looking for a job
I focused on the first scenario.
Personas
Type:
Family
Ages range 35 > 43
Country:
Netherlands
Focus:
24 hours per week job
Looking for jobs:
Close by home
Type:
Social
Ages range 29 > 37
Country:
Netherlands
Focus:
Fun/social colleagues
Looking for jobs:
Within big cities
Type:
Traveler
Ages range 27 > 34
Country:
Netherlands
Focus:
Inhouse dev team
Looking for jobs:
Within the area
These personas are created from the database of the jobsite. The personas up here are the short versions. To create these personas 60 people have been researched. The personas are focused on the dutch job market.
Pain points
Since this was something new for the website, there wasn't much time and we were this was going to work we didn't test it up front. The testing we will do when this feature is live on the site. For this we will use Google Analytics and Hotjar.
Although we didn't do the user validation, we know there are some pain points on our website from experience. Our business developers are in constant contact with the users. This is the list we came up with.
Users don't always get what they are searching for
Users don't know what extra information is available that can help them in the process of getting a new job.
Users don't always know what they are looking for.
Users don't know how to look for what they want.
Users are often stressed so, they want to apply as quick and easy as possible.
These are things we know from our 10+ year experience within the jobsites and recruitment business.
Solution
The solution? Creating a grid that can be used on different pages. In this grid the following things can be shown:
New vacancies
Relevant vacancies
Relevant companies
Nearby locations
Blogs and video's
Call-to-action
New vacancies
User logged in: Show vacancies that are new since the last time the user logged in.
User not logged in: Show recent added vacancies in general, so the user can see the activity on the website.
Relevant vacancies
User logged in: Show vacancies on basis of the profile of the user. For example: the profile of the user says 10+ year experience in php. Only show senior or higher up vacancies to that user.
User not logged in: If the user has been at the jobsite before and useful information is saved in the cookies, show vacancies on basis of that information. Otherwise show vacancies were many people applied to, that are probably the most impressive vacancies/companies. They might impress the user as well.
Relevant companies
User logged in: Depending on the preferences of the user, show companies that comply with that.
User not logged in: Show big or popular companies that the most users will know.
Nearby locations
There are multiple scenarios here.
User has a account: We know where the user is looking for a job (this isn't necessarily where they are currently living). In the grid we can show the city and the cities near there. In the future the user might be able to say, I want to work in any of these locations.
User doesn't have a account: Use the ip address of the user to show cities near it.
User is anonymous/from another country: Show user the cities with the most vacancies in the Netherlands. These are cities everybody knows like Amsterdam, Rotterdam, Utrecht etc.
Blogs, video's etc.
User logged in: User is shown content that helps them to apply, prepare for a interview or help them to negotiate with the potential employer. In case of the users other then the personas I created there could also be something like career advice.
User not logged in: User sees the newest content or the most populair content.
Call-to-action
User logged in: User will be shown can be a call-to-action where we ask for more information to optimize the grid for that specific user.
User not logged in: User sees a register/login or upload cv call-to-action for example.
Design
And now, ... I present to you ... our personalized GRID! This is the MVP (minimum viable product) that has been decided on by the team.
Next step
The solution, the personalized grid, is live on the jobsite as we speak (sept. 2018). So what is next?
Since I didn't dive in to the user research based on users, but on the knowledge within the company, I want to see how users use the personalized grid.
Also I want to speak to our users. That way I can find out if the solution is working and if there is anything the users are missing in the grid.
After collecting the new information I would like to start testing the grid and find out what works the best for the users.
Summary
So here is a little summary. The problem was, there jobsite wasn't unique and personal. The goal, bring value to the users, be able to show the best vacancies for the users and help find our users/visitors a new job.
The proposal was to personalize the website and show only content that is relevant to that user. This will create trust and bring value to our users.
The prediction is that non-commerce websites will start with personalization as well, that’s just a matter of time. With the jobsite we can be leading in this.
Pain points come from our experience with our users. The paint points are users don't always get what they are searching for, users don't know what extra information is available that can help them in the process of getting a new job, users don't always know what they are looking for, users don't know how to look for what they want, users are often stressed so, they want to apply as quick and easy as possible.
The solution is creating a grid that can be used on different pages. In this grid the new vacancies, relevant vacancies, relevant companies, nearby locations, blogs and video's and call-to-action will be shown. Depending on if the user is logged in or not.
Thank you
My name is Sander Volbeda, I'm a ux/product designer based in Groningen. I hope you've enjoyed this case study of mine, it's the first I wrote. Special thanks to Filippo Rovelli and Johny Vino for being the inspiration behind this case study.


--- title: "Week 31: R and R package downloads" date: 2018-10-30T10:42:13-07:00 draft: true geometry: margin=.1in ---
library(ggplot2)
library(dplyr)
library(tidyr)
library(forcats)
library(cranlogs)
setwd("~/Desktop/tidytuesday/data/2018-10-30")
rd=read.csv("r_downloads_year.csv")
rd$date=as.Date(as.character(rd$date))
rd %>% drop_na(os) %>% group_by(version,os) %>% summarise(first=min(date)) %>% ggplot(.,aes(fct_rev(version),as.Date(first),col=os))+ geom_point()+coord_flip()+xlab("date of first download")+ylab("R version")
Take-Aways
tidyverse=cran_downloads(package="tidyverse",from=min(rd$date),to=max(rd$date))
ggpl=cran_downloads(package="ggplot2",from=min(rd$date),to=max(rd$date))
dp=cran_downloads(package="dplyr",from=min(rd$date),to=max(rd$date))
tid=cran_downloads(package="tidyr",from=min(rd$date),to=max(rd$date))
re=cran_downloads(package="readr",from=min(rd$date),to=max(rd$date))
pr=cran_downloads(package="purrr",from=min(rd$date),to=max(rd$date))
tib=cran_downloads(package="tibble",from=min(rd$date),to=max(rd$date))
st=cran_downloads(package="stringr",from=min(rd$date),to=max(rd$date))
fc=cran_downloads(package="forcats",from=min(rd$date),to=max(rd$date))
allTy=rbind.data.frame(tidyverse,ggpl,dp,tid,re,pr,tib,st,fc)
## add a horizontal line representing mean, help us pick out different colors
orderV=allTy %>% group_by(package) %>% summarise(mV=mean(count)) %>% arrange(mV)
ggplot(allTy,aes(date,count,col=package))+geom_point(size=2,alpha=.75)+geom_hline(data=orderV,aes(yintercept=mV,col=package),lwd=2,lty=c(rep(1,7),2,1))+geom_vline(aes(xintercept=as.Date("2017-12-25")))
Note: stringr
and tibble
are on top of one another.
Take-Aways
The average number of downloads of tidyverse
is less than the average number of downloads for each of its components. This makes sense because we can either download all packages at once via tidyverse
or download the components separately.
ggplot2
has the highest average number of downloads.
stringr
and tibble
have similar average number of downloads.
There is some evidence of a bit of work life balance as there is a noticeable drop off in downloads on Christmas.


Planetary Climate
Zero-dimensional Model
Energy Source/Sink
\[ R_i \to \]
\[ R_o \to \]
Energy balance
\[ R_s \to \]
\[ \leftarrow \alpha R_s \]
\[ R_p \to \]
\[ R_s = ?,\ R_p = ?,\ \alpha = ? \]
Energy balance
\[ R_s \propto \sigma T_s^4\] \[ R_p = \sigma T_e^4 \]
\[ T_e = ?,\ \alpha \propto ? \]
\[ T_e = T_{surf},\ \alpha = \alpha_{surf} \]
$\frac{S(1 - \alpha_{surf})}{4} = \sigma T_{surf}^4$
Moon Local Temperature
Williams et al., Icarus 2017
Day/Night Changes
Williams et al., Icarus 2017
Shell Model
How much is radiated?
From where is it radiated?


Installs a virtual directory.
Install-IisVirtualDirectory [-SiteName] <String> [-VirtualPath] <String> [-PhysicalPath] <String> [-Force] [<CommonParameters>]
The Install-IisVirtualDirectory
function creates a virtual directory under website SiteName
at /VirtualPath
, serving files out of PhysicalPath
. If a virtual directory at VirtualPath
already exists, it is updated in palce. (Before Carbon 2.0, the virtual directory was deleted before installation.)
Beginning with Carbon 2.0.1, this function is available only if IIS is installed.
| Name | Type | Description | Required? | Pipeline Input | Default Value |
|---|---|---|---|---|---|
| SiteName | String | The site where the virtual directory should be created. |
true | false | |
| VirtualPath | String | The name of the virtual directory. This can contain multiple directory segments for virtual directories not at the root of the website, e.g. First/Second/VirtualDirectory. |
true | false | |
| PhysicalPath | String | The file system path to the virtual directory. |
true | false | |
| Force | SwitchParameter | Deletes the virttual directory before installation, if it exists. Preserves default beheaviro in Carbon before 2.0. Does not delete custom configuration for the virtual directory, just the virtual directory. If you've customized the location of the virtual directory, those customizations will remain in place. The |
false | false | False |
Install-IisVirtualDirectory -SiteName 'Peanuts' -VirtualPath 'DogHouse' -PhysicalPath C:\Peanuts\Doghouse
Creates a /DogHouse virtual directory, which serves files from the C:\Peanuts\Doghouse directory. If the Peanuts website responds to hostname peanuts.com
, the virtual directory is accessible at peanuts.com/DogHouse
.
Install-IisVirtualDirectory -SiteName 'Peanuts' -VirtualPath 'Brown/Snoopy/DogHouse' -PhysicalPath C:\Peanuts\DogHouse
Creates a DogHouse virtual directory under the Peanuts
website at /Brown/Snoopy/DogHouse
serving files out of the C:\Peanuts\DogHouse
directory. If the Peanuts website responds to hostname peanuts.com
, the virtual directory is accessible at peanuts.com/Brown/Snoopy/DogHouse
.


{{character.first_name}} {{character.last_name}}
About
Connections
{{character.bio}}
{% for connection in character.connections.all %}
{% endfor %}
Opinion
{{connection.opinion}}
Their Opinon
{% for person in people %}{% if connection.contact.id == person.owner.id %}{{person.opinion}}{% endif %}{% endfor %}
Actions
Log
-
{% for actions in logs %}
{% if actions.actor == connection.owner and actions.recipient == connection.contact or actions.recipient == connection.owner and actions.actor == connection.contact %}
- {{actions.actor.first_name}} {{actions.action}} {{actions.recipient.first_name}} {% if actions.result >= 0 %}+{% endif %}{{actions.result}} {% endif %} {% endfor %}


@(t: lila.team.Team, form: Form[_], captcha: lila.site.Captcha.Challenge)(implicit ctx: Context) @title = @{ trans.joinTeam.str() + " " + t.name } @team.layout(title = title) {
Your join request will be reviewed by the team leader.


HINT
GUESSES
Input -
Guessing Game
Guessing Game
Guessing Game
Guessing Game
Guessing Game
Guessing Game
Guessing Game


Lockdown
Get Version
0.5.11What
Lockdown is a authentication/authorization system for RubyOnRails (ver 2.x). While Merb functionality is in place, it is not complete. There will be a release solely focused on getting the Merb functionality up to par with Rails.
New Home
Maintaining this page, the wiki at GitHub, the Google Group and no issue tracker is not an ideal setup. So, everything is moving to stonean.com where I’m giving Redmine a shot a running everything for me. I’ll be posting release announcements to the news feed for each project and keeping the docs up-to-date. Hopefully this will be better for everyone.
Quick links
Thanks for your interest in Lockdown,
-andy
24th June 2008
Theme extended from Paul Battley


public class CLIController
extends java.lang.Object
| Constructor and Description |
|---|
CLIController() |
| Modifier and Type | Method and Description |
|---|---|
void |
handleCharactersLoading()
This loads all the players and myself.
|
void |
handleMapLoading()
This method prints the map and the killshot bar, the map is printed using a trick, the maps a saved as text files
and the sections where crates and players can spawn are marked to be replaced by the actual content.
|
void |
handlePlayerBoard(Player p)
This prints a player board, its a complex part and uses a lot of utf8 special chars
|
java.lang.String |
handlePowerUp(PowerUp c)
This just prints a single powerup
|
java.lang.String |
handlePowerUps(java.util.List<PowerUp> powerUps)
This uses a mechanism to print the powerups in a 2 columns pattern.
|
java.lang.String |
handleWeapon(Weapon c)
This just prints a single weapon
|
java.lang.String |
handleWeapons(java.util.List<Weapon> weapons)
This uses a mechanism to print the weapons in a 3 columns pattern.
|
void |
setView(CLIView view)
This is a view setter
|
public void handleMapLoading()
public void handleCharactersLoading()
public void handlePlayerBoard(Player p)
p
- the player to print the boardpublic java.lang.String handleWeapons(java.util.List<Weapon> weapons)
weapons
- the weapons listpublic java.lang.String handlePowerUps(java.util.List<PowerUp> powerUps)
powerUps
- the powerups listpublic java.lang.String handlePowerUp(PowerUp c)
c
- the poweruppublic java.lang.String handleWeapon(Weapon c)
c
- the weaponpublic void setView(CLIView view)
view
- the view


In Trident the components of an <audio>
element (play/pause, volume control, etc) can be tabbed through as well - these TABs are propagated to the document as regular KeyEvent
s.
Gecko and Trident allow controlling the <audio>
element by keyboard (left/right to seek, space to toggle playback, up/down to control volume) - these interactions are propagated to the document as regular KeyEvent
s.
Blink allows neither.


Organisations that offer debt advice
- Citizens Advice External link provides free, independent and confidential advice on debt and money problems
- Debt Advice Foundation External link offer free, confidential support and advice about debt
{% extends "design-system-page-layout-guide.html" %} {% set section_id = "components" %} {% set page_id = "panel" %} {% set page_title = "Panel" %} {% block sectionOneTop %}{% endblock %} {% block sectionLeftHandColumn %} {% include "includes/design-system/design-system-side-nav.html" %} {% endblock %} {% block sectionOneRightContent %}
Use a panel to highlight content.
This is the body copy within a panel. This is a link within the panel.

Panel header

This is the body copy within a panel. This is a link within the panel.

This is the body copy within a panel. This is a link within the panel.

Panel header

This is the body copy within a panel. This is a link within the panel.

Organisations that offer debt advice

Citizens Advice External link provides free, independent and confidential advice on debt and money problems

Debt Advice Foundation External link offer free, confidential support and advice about debt

Organisations that offer debt advice

Citizens Advice External link provides free, independent and confidential advice on debt and money problems

Debt Advice Foundation External link offer free, confidential support and advice about debt

Panel with an image

This is the body copy for a panel with an image.

Panel link

Image to the left

This is the body copy for a panel with an image.

Panel link

There is no such thing as a typical foster carer - everybody has something to bring in terms of experience and knowledge.

There is no such thing as a typical foster carer - everybody has something to bring in terms of experience and knowledge.
Larry David

There is no such thing as a typical foster carer - everybody has something to bring in terms of experience and knowledge.

There is no such thing as a typical foster carer - everybody has something to bring in terms of experience and knowledge.

Free on-site parking
Location Village Hotel North, 186 Otley Rd, Headingley, Leeds LS16 5PR Get directions. External link.
Time 6pm to 8:30pm
Date Wednesday 6th December 2017

WED
6
DEC 2017

Fostering children with complex needs / disabilities

Free on-site parking

Location Village Hotel North, 186 Otley Rd, Headingley, Leeds LS16 5PR Get directions. External link.

Time 6pm to 8:30pm

Date Wednesday 6th December 2017


The background slides towards the selected menu item - Calculations are done on click and the movement is done with translate and scale. Enjoy!


Lil’ Kim Cements Fashion Icon Status In Miniskirt & Metallic Boots
November 18, 2019
Lil’ Kim Cements Fashion Icon Status In Miniskirt & Metallic Boots
Lil’ Kim is known for being a fashion icon and has cemented that status with her latest Instagram posts. The “No Matter What They Say” hitmaker shared numerous photos of herself in an eye-catching ensemble and proved that she’s still got it.
 She rocked the look with zipped-up silver metallic boots and accessorized with a chain. The “How Many Licks” songstress held a small handbag and sported her dark curly locks down.
In a series of photos, Kim is standing next to her boyfriend, The Great, a rapper who goes by the username “@thegreat_leader” on Instagram. In the first shot, she is in front of him where she posed directly to the camera. In the second, the couple was snapped from a different angle. Kim looked over her shoulder at her partner while they both smiled at each other.
In her caption, she mentioned that she was on her way to New York while her boyfriend was going to Atlanta. She expressed that she was missing him at the time of posting and hinted that she might have to move to Atlanta to be around him more often.
She geotagged the location with Los Angeles, Calfornia, where the two were flying out from.
In the span of a couple of days, her post racked up more than 81,000 likes and over 1,300 comments, proving to be popular with Kim’s 2.8 million followers.
“ICON LEGEND THANK YOU FOR EVERYTHING!  I love you so much Kim you have no idea.    You are truly someone I admire to the pen expires,” one user wrote passionately.
“I love the happiness I see in you. It’s well deserved,” another follower shared.
Loading...
“I’m so happy love found its way back to you again,” a third fan remarked.
In a recent interview on The Real, Kim turned up to the show with The Great in the audience. She spoke about the passing of her father and how her boyfriend has been by her side ever since the news broke.
Kim wore a chain with her dad’s face on it, which her partner gifted her, per The Inquisitr.


_Installation
To install latest version:
$ npm install @arjunatlast/jsds
To install the latest development version locally:
$ npm install git+https://github.com/ArjunAtlast/js-datastructure.git
To install latest version:
$ npm install @arjunatlast/jsds
To install the latest development version locally:
$ npm install git+https://github.com/ArjunAtlast/js-datastructure.git
To use any datastructure in typescript project.
import { ArrayList } from "@arjunatlast/jsds";
var al = new ArrayList<number>();
To use any datastructure in es6 project.
var ArrayList = require("@arjunatlast/jsds").ArrayList;
var al = new ArrayList();


| Package | Description |
|---|---|
| org.deeplearning4j.nn.layers.ocnn | |
| org.deeplearning4j.nn.params |
| Class and Description |
|---|
| DefaultParamInitializer
Static weight initializer with just a weight matrix and a bias
|
| Class and Description |
|---|
| BatchNormalizationParamInitializer
Batch normalization variable init
|
| CenterLossParamInitializer
Initialize Center Loss params.
|
| Convolution3DParamInitializer
Initialize 3D convolution parameters.
|
| ConvolutionParamInitializer
Initialize convolution params.
|
| Deconvolution3DParamInitializer
Initialize deconv3d parameters.
|
| DeconvolutionParamInitializer |
| DefaultParamInitializer
Static weight initializer with just a weight matrix and a bias
|
| DepthwiseConvolutionParamInitializer
Initialize depth-wise convolution parameters.
|
| ElementWiseParamInitializer
created by jingshu
|
| EmbeddingLayerParamInitializer
Parameter initializer for EmbeddingLayer and EmbeddingSequenceLayer
|
| EmptyParamInitializer |
| FrozenLayerParamInitializer
Parameter initializer for
FrozenLayer instances. |
| FrozenLayerWithBackpropParamInitializer
Parameter initializer for
FrozenLayer instances. |
| GravesBidirectionalLSTMParamInitializer
LSTM Parameter initializer, for LSTM based on
Graves: Supervised Sequence Labelling with Recurrent Neural Networks
http://www.cs.toronto.edu/~graves/phd.pdf
|
| GravesLSTMParamInitializer
LSTM Parameter initializer, for LSTM based on
Graves: Supervised Sequence Labelling with Recurrent Neural Networks
http://www.cs.toronto.edu/~graves/phd.pdf
|
| LSTMParamInitializer
LSTM Parameter initializer, for LSTM based on
Graves: Supervised Sequence Labelling with Recurrent Neural Networks
http://www.cs.toronto.edu/~graves/phd.pdf
|
| PReLUParamInitializer
PReLU weight initializer.
|
| PretrainParamInitializer
Pretrain weight initializer.
|
| SameDiffParamInitializer |
| SeparableConvolutionParamInitializer
Initialize separable convolution params.
|
| SimpleRnnParamInitializer |
| VariationalAutoencoderParamInitializer
Parameter initializer for the Variational Autoencoder model.
|
| WrapperLayerParamInitializer |
Copyright © 2020. All rights reserved.


You can train the model at the beginning of your algorithm and you can periodically re-train it as the algorithm executes.
You need historical data to initially train the model at the start of your algorithm. To get the initial training data, in the Initialize
method, make a history request.
training_length = 252*2 self.training_data = RollingWindow[float](training_length) history = self.History[TradeBar](self.symbol, training_length, Resolution.Daily) for trade_bar in history: self.training_data.Add(trade_bar.Close)
To train the model, define a method that fits the model with the training data.
def get_features_and_labels(self, n_steps=5): close_prices = list(self.training_data)[::-1] features = [] labels = [] for i in range(len(close_prices)-n_steps): features.append(close_prices[i:i+n_steps]) labels.append(close_prices[i+n_steps]) features = np.array(features) labels = np.array(labels) return features, labels def my_training_method(self): features, labels = self.get_features_and_labels() # Set the loss and optimization functions # In this example, use the mean squared error as the loss function and stochastic gradient descent as the optimizer loss_fn = nn.MSELoss() learning_rate = 0.001 optimizer = torch.optim.SGD(self.model.parameters(), lr=learning_rate) # Create a for-loop to train for preset number of epoch epochs = 5 for t in range(epochs): # Create a for-loop to fit the model per batch for batch, (feature, label) in enumerate(zip(features, labels)): # Compute prediction and loss pred = self.model(feature) real = torch.from_numpy(np.array(label).flatten()).float() loss = loss_fn(pred, real) # Perform backpropagation optimizer.zero_grad() loss.backward() optimizer.step()
To train the model at the beginning of your algorithm, in the Initialize
method, call the Train
method.
self.Train(self.my_training_method)
To periodically re-train the model as your algorithm executes, in the Initialize
method, call the Train
method as a Scheduled Event.
# Train the model every Sunday at 8:00 AM self.Train(self.DateRules.Every(DayOfWeek.Sunday), self.TimeRules.At(8, 0), self.my_training_method)
To update the training data as the algorithm executes, in the OnData
method, add the current TradeBar
to the RollingWindow
that holds the training data.
def OnData(self, slice: Slice) -> None: if self.symbol in slice.Bars: self.training_data.Add(slice.Bars[self.symbol].Close)


Scottish Health Awards: Life saving amputee doc up for award
Consultant Cieran has lost both his legs but his dedication to his profession meant he was back on the job within weeks.
by Nicola SmithLike most consultants, Dr Cieran McKiernan is dedicated to his job.
Three quarters of the time, he is saving lives in emergency medicine at the Queen Elizabeth University Hospital in Glasgow. The rest of the time, he works for patient transfer and retrieval service ScotStar.
But Cieran’s case is slightly different – he’s a double amputee.
The 45-year-old has suffered from type 1 diabetes since the age of 13 and, due to complications with his lower legs, he had to have them amputated below the knee.
Cieran, who is a finalist in the Doctor Award category at the Scottish Health Awards, said: “I had problems with both of my legs for eight or nine years, dealing with multiple fractures. I lost my left leg in 2017 but was back at work within 12 weeks.”
Cieran’s right leg was amputated in June of last year – and again he took very little time off work.
He said: “I was back in the emergency department working full 10-hour shifts seven weeks and two days after the operation.”
It took a little longer for Cieran to return to his retrieval post – but after a couple of assessments, he was back in the helicopter.
He said: “I had a few risk assessments to do to make sure work was safe for me as well as my patients. I have been back now
for just over six months and so far there have been no issues.”
Cieran’s job is massively rewarding and he’s often able to find out how his patients are doing months after saving their lives.
He said: “It’s uplifting to find out how patients are getting on and getting back to normal life.”
Cieran said he was “surprised and humbled” to be nominated for a Health Award but added: “Being able to work as normal with a disability is a thing to celebrate.”
The Health Awards winners will be announced tomorrow at the Corn Exchange, Edinburgh.


{% extends "layout.html" %} {% block content %}
{{input_text}}
Word Count: {{wordcounts['original']}}
{% if (sentences|length) != 0 %}{% for item in highlight_data %} {% set start = item[0] %} {% set end = item[1] %} {% set highlight = item[2] %} {% set whitespace = item[3] %}
{{whitespace}}{% if highlight == true %}
{{input_text[start:end]}}{% else %}
{{input_text[start:end]}}{% endif %}
❖{% endfor %}
Word Count: {{wordcounts['parsed']}}
| # | Sentence | # words | {% if max > 1 %}More than {{max}} words? | {% else %}More than {{max}} word? | {% endif %}
|---|---|---|---|---|
| {{loop.index}} | {{s['content']}} | {{s['wordcount']}} | {% if s['wordcount'] > max %}Y | {% else %}N | {% endif %}
Warning:
The word counts of your original and parsed texts are different
({{wordcounts['original']}} vs. {{wordcounts['parsed']}} words,
respectively). It's likely that the last part of the original
text wasn't included in the parsing because no terminating
punctuation mark was used at the end of the text (i.e. the last bit
didn't form a 'valid' sentence). You can fix this by hitting your
browser's back button and adding a terminating punctuation mark at
the end of your text.
Alternatively, if you used the Split feature below in the middle of a word, the parsed text's wordcount will be one higher than the original text's wordcount.
{% endif %}The program sometimes detects the end of a sentence before it should, resulting in two fragments. Often this happens when the program encounters an abbreviation it's unfamiliar with or a dialogue attribution it doesn't know how to handle.
To join the two fragments to form a full sentence, pick the first one in the pair and click 'Merge'.
Occasionally, the program will combine sentences when it shouldn't. This can happen when there is no space at the end of a sentence such as in cited text. E.g. The moon is made of green cheese and always will be.[1]
Follow the steps below to separate such sentences. Note that you can only divide a sentence into at most two parts. If you need to do more splits, just repeat.
1. Choose the offending text.
{% else %}There are no sentences to process. Either you entered nothing, entered only whitespace characters, or wrote a phrase without a sentence-ending punctuation mark.
{% endif %}


I made a Wi-Fi for you.
Connect your smartphone or laptop with me.
Wi-Fi name: iHomeMirror setup
On most devices, the setup screen should start automatically.
Follow the instructions to complete the setup!


Menu bar controls not working.
-
sweek
Hey there,
Well, the subject says it pretty much. After just using the computer for a while the menu bar controls stop working, and I have to restart Synergy to get it to work again... for a little while. I can still right click on the play/paus button tough to get that menu. I don't really know what this could possibly be. I'm using 10.3.8 with Synergy 1.72 and iTunes 4.71. The floater and hot keys are working nicely, no problems there. I really wouldn't know what else to tell you about this problem, but as you can guess it's pretty annoying.
-
Greg Hurrell
You should look at the bug database:
https://wincent.com/a/support/bugs/show_bug.cgi?id=39
https://wincent.com/a/support/bugs/show_bug.cgi?id=52
It might be one of those issues. You should also read this on how to file a good bug report:
https://wincent.com/a/knowledge-base/archives/2004/11/how_to_file_a_g.php
Reply
This topic is now closed.


HTTP(S) client for PicoLisp
16 Mar 2015You can get it on GitHub.
This library can be used to make HTTP and HTTPS requests in PicoLisp, with support for authentication.
Explanation: HTTP(S) client for PicoLisp
This document provides a short walkthrough of the source code for the PicoLisp-HTTPS client.
I won’t cover concepts which were covered in previous source code explanations. You can read them here:
This document is split into a few sections:
- Loading and initialization: Loading files and performing initial work.
- Error handling: An idiom for handling errors.
- Internal functions: Destructuring, native C callbacks, and memory management.
Make sure you read the README to get an idea of what this library does.
Loading and initialization
We’ve made some changes to how we load files across all libraries.
Loading
PicoLisp loads files from the current working directory pwd, which is in relation to where you ran the command:
alex@dev-box:~/picolisp-https$ pil +
: (pwd)
-> "/home/aw/picolisp-https"
So far so good, but what happens when the file you load also loads a file in a different directory? Depending if the path is relative or absolute, you will not necessarily get what you want.
To fix this, we use file:
*Https (pack (car (file)) "lib/libneon.so")
What this does is load the file lib/libneon.so
relative to the file that’s loading it.
We use this technique further down as well:
# ffi-bindings
(load (pack (car (file)) "ffi.l"))
# internal
(load (pack (car (file)) "internal.l"))
Perhaps there should be a (cwd)
primitive for that? ;)
Initialization
There is a concept of constructors
in PicoLisp, but it’s only used with classes and objects. We’re trying to be functional here.
Our approach is simple: perform initialization tasks after loading all the necessary files.
(when (=0 (ne-has-support *NE_FEATURE_SSL))
(throw-error NIL "Missing support for SSL/TLS") )
What we’ve done here is try to ensure SSL
is compiled into the shared library. If it’s not, an error is thrown. Error handling is explained in the next section.
We also ensure to seed some random data from the system’s random pool:
(seed (in "/dev/urandom" (rd 20)))
This tries to obtain 20 bytes
from /dev/urandom
using rd, a function for reading raw bytes from an input stream, and initializes the seed with it.
Error handling
PicoLisp provides us with a few ways to handle errors, so why not use them to our advantage?
My idea was:
- Throw errors in the library, but don’t quit/exit disgracefully (a.k.a. be nice).
- Provide a type of error, and a brief message explaining what happened.
- Allow the user to catch the errors outside the library.
[de throw-error (Session Message)
(throw 'InternalError (cons 'HttpsError (if Session
(ne-get-error Session)
Message ]
The Neon C library has a function (ne-get-error)
which returns a string containing an error message (if any). Sometimes, we want to provide our own error message though.
In the (throw-error)
function, we satisfy the first two requirements by using throw to send an 'InternalError
, along with a cons pair containing the 'HttpsError
type in the car and the error message in the cdr.
The third requirement is satisfied in user applications with something like this:
(println (catch 'InternalError
.. ) )
-> (HttpsError . "Could not connect to server: Connection timed out")
Internal functions
As usual, the bulk of the library occurs in the internal functions.
making HTTPS requests
PicoLisp 64-bit got a new feature in 2015: destructuring 'let'
.
If you’re coming from other languages such as Ruby, you would destructure an array like this:
var1, var2 = ["one", "two"]
In PicoLisp, we use this to obtain a Session (pointer) and Path (string), which is a cons pair returned by the (create-session)
function.
[de create-session-request (Method Url Headers)
(let ((Session . Path) (create-session Url)
Request (ne-request-create Session Method Path) )
(set-headers Headers Request)
(list Session Path Request) ]
(create-session)
In (create-session)
, we parse the Url and obtain all the separate components, which are returned to us in a simple list. We’re already familiar with (car)
, (cdr)
, (cddr)
, etc, but there’s another primitive to get the exact item in a list: it’s the dreaded semicolon (;) (insert JavaScript joke here)
[de create-session (Fullurl)
(let (Uri (parse-uri Fullurl)
Scheme (car Uri)
Host (cadr Uri)
Auth (; Uri 3)
Port (get-port Scheme (; Uri 4))
Session (ne-session-create Scheme Host Port)
Path (pack (; Uri 5) (when (; Uri 6) (pack "?" (; Uri 6)))) )
..
Notice we use (; Uri 3)
. This is cool, it’ll get the item in the 3rd position in the list. In this case, it’s the auth credentials (usually user:password).
The semicolon has other uses as well, so make sure you read about it.
(set-auth-credentials)
This function does two things, one is dangerous, the other is cool.
[de set-auth-credentials (Session Auth)
[let Credentials (split (chop Auth) ":")
(setq *User (pack (car Credentials))
*Pass (pack (cdr Credentials)) ]
(ne-set-server-auth
Session
(lisp 'ne_auth_creds '((A B C D E) (do-auth A B C D E)))
0 ]
Let’s talk about danger first. In this function, we uses setq to create some temporary global variables. I say temporary because we get rid of them later. The danger here is this is NOT functional. It’s a side-effect which could be the source of bugs in the future. OOP lovers don’t care about this kind of stuff, but in FP land it’s a big no-no.
Note: The reason we do this is because of the
(do-auth)
function, which we’ll explain later.
The lisp function is quite special. When using (native)
for C calls, certain functions require a callback as an argument, or “function pointer” (Google it).
The (ne-set-server-auth)
function requires a callback as its second argument, so we create one using (lisp)
. If you’ve read the JSON explanations, you’ll quickly notice there’s an anonymous function in this (lisp)
call. It essentially sends 5 arguments (which are numbers) to the (do-auth)
function, under the name ne_auth_creds
.
Here’s the C code to give a better picture:
typedef int (*ne_auth_creds)(void *userdata, const char *realm, int attempt,
char *username, char *password);
void ne_set_server_auth(ne_session *sess, ne_auth_creds creds, void *userdata);
See that? All arguments for ne_auth_creds
are numbers (void, pointers, int)..
(do-auth)
This function is our actual callback function. It’s the one that will be called from the C library.
The main requirement is to set the username
, password
, and return an integer. We do that here:
(de do-auth (Userdata Realm Attempt Username Password)
(native "@" "strncpy" NIL Username *User *NE_ABUFSIZ)
(native "@" "strncpy" NIL Password *Pass *NE_ABUFSIZ)
Attempt )
Whoa wait, what’s that @
thing doing there? Remember we talked about the @ result? Well, this is NOT that.
This is actually a transient symbol which refers to the main program (PicoLisp).
Note: In english, this means you can call standard C functions like
malloc
andstrcpy
(j/k, at least use strncpy).
This function uses the *User and *Pass
global variables we defined earlier and the C strncpy()
functions to copy the global variables into the Username
and Password
pointers. The other approach would be to hardcode the username/password in the function, but really.. who does that?
At the end of (do-auth)
, we return the Attempt
variable, which based on the Neon documentation, would only perform one authentication attempt before failing.
(del-auth-credentials)
Of course, we need to remove the auth credentials once we’re done with them. The (ne-forget-auth)
function will remove them from memory, and off will set the global variables to NIL
.
[de del-auth-credentials (Session)
(ne-forget-auth Session)
(off *User)
(off *Pass) ]
Note: We could have also done:
(off *User *Pass)
.
(set-headers)
There’s nothing magical in this function, just the usual mapping over a list with an anonymous function.
[de set-headers (Headers Request)
(mapcar
'((L) (ne-add-request-header Request (car L) (cdr L)))
(append Headers *Headers) ]
I want to highlight append which can be used to append a list to another. Who would have known?
The tricky thing is there’s an order to it. We want the Headers
variable to be used before the *Headers
global variable. This way if you specify your own User-Agent
, then it’ll use that instead of the default.
There were other ways to do this, but I just wanted to use (append)
.
(set-request-body)
Now here’s some more dangerous code if you haven’t seen it yet. This function is used to set the request Body (ex: in a POST
or PUT
request) in a manually allocated buffer.
The reason for this is due to an interesting coding choice used in the Neon C library. It doesn’t copy the body in memory for you, so at the end of a (native)
call, the body (memory) is free’d and Neon can’t use it anymore (because PicoLisp automatically frees memory).
[de set-request-body (Request Body)
(when Body
(let (Size (size Body)
Buf (native "@" "malloc" 'N Size) )
(native "@" "memset" NIL Buf Body Size)
(let Buffer (native "@" "strncpy" 'N Buf Body Size)
(ne-set-request-body-buffer Request Buffer Size)
Buf ]
We’ll first obtain the size of the request body. We do this for safety, and because it makes us feel warm inside.
Since we’re forced to manually allocate a buffer for the request body, you can see lots of funky C stuff in there.
In the end though, we’re able to send a perfectly good request body (Buffer
) in our HTTP(S) request.
Some sharp eyes may notice we don’t free
the allocated memory here. evil laugh. Don’t worry, we’ve actually handled this elegantly, which you can read about in cleaning up errors.
Parsing HTTPS responses
Here we cover the function which dispatches a request, and then processes the response.
(request-dispatch)
The Neon C library provides a function to dispatch HTTP(S) requests, except for some odd reason it discards the response body before you can do anything with it. How horrible.
[de request-dispatch (Request Session)
(use Body
(loop
(begin-request)
(setq Body (if Filename
(download-file Request Filename)
(process-body Request) ) )
(T (end-request) 'done) )
Body ]
In this function, we’ve got an infinite loop which tries to make a request, save the response body to a file or whatever, and exits the loop when all is good.
The (end-request)
function implements a retry mechanism, and returns either T
or NIL
(or throws an error). If the result is T
, we execute 'done
, which is nothing really, and return the response body. Otherwise it loops.
There’s something very different in this function though. Do you see it?
The Filename
variable is not sent as an argument to the function. So, how does it work? If you look at the req function, you’ll see the filename is (optionally) set as an argument. Our (request-dispatch)
function uses the Filename
variable from there.
This is called dynamic scoping
, one of the great advantages of PicoLisp. You can do stuff like that.
Mr. Burger’s Note: As much as this is an advantage, it’s also a sword hanging over your head. Use wisely.
(download-file)
This is a cool function. It checks if the Filename
is set to T
. If yes, then it generates a (random-filename)
, otherwise it uses the filename provided.
[de download-file (Request Filename)
(let File (if (=T Filename)
(random-filename)
Filename )
(let Fd (open File)
(ne-read-response-to-fd Request Fd)
(close Fd)
(list (cons "Filename" . File)
(cons "Filesize" (car (info File))) ]
We use open and close when working with files. The (ne-read-response-to-fd)
function is designed to write the response body to a file descriptor. How convenient.
Finally, we return a list with two cons pairs, one containing the Filename (potentially randomly generated) and the other containing the Filesize, which is captured using the info function.
random stuff
Earlier, we looked at seeding random data, why? Well here’s why:
(de random-filename ()
(tmp "dl-" (random-id) "-" (inc (0)) ".tmp") )
[de random-id ()
(lowc (hex (abs (rand) ]
The (random-filename)
function generates a string that looks like this: dl-7d702f36-1.tmp
.
It uses tmp to obtain the PicoLisp processes’s temp directory, and the (random-id)
function to generate a random id.
Some cool functional stuff here: lowc is used to lowercase a string, hex to generate a hexadecimal string, abs to return the absolute value of rand which returns a random integer (which should truly be random thanks to our seed initialization from earlier).
(process-body)
This doesn’t do anything we haven’t seen before. It uses the familiar (make)
, (link)
, and (pack)
to generate a list.
In fact, the (ne-read-response-block)
function is set to only read a specific *Buffer_size
(8192 bytes) of data at a time. We have a simple loop in (process-body)
to obtain the full body and then pack it all together.
(parse-response)
Without going into too much detail for (parse-response)
, I want to discuss something we haven’t seen yet: struct.
..
(struct (ne-get-status Request) '(I I I I S)) # *ne_status Status structure
..
The (struct)
function can be used to extract a C structure. The first argument is the structure, in our case it’s the result of (ne-get-status)
, and the structure contains 4 integers and 1 string.
The C code for this:
typedef struct {
int major_version;
int minor_version;
int code; /* Status-Code value */
int klass; /* Class of Status-Code (1-5) */
char *reason_phrase;
} ne_status;
We return those in the response for each request. Actually we don’t return klass
because who cares.
Skipping ahead: (end-request-session)
When we’re done with our request/response, it’s time to clean up. We’ve got a nice function for that:
(de end-request-session (Request Session Buffer)
(when Buffer (native "@" "free" NIL Buffer))
(ne-request-destroy Request)
(del-auth-credentials Session)
(end-session Session) )
This free’s the Buffer
we allocated earlier using malloc
.
The real question is: when is this called? Let’s get to that right now.
Cleaning up errors
Earlier, we discussed the ability to (throw)
an error, and that’s nice when something is there to catch it. But, what happens when that thing doesn’t know about the internals? Does it know how to cleanly end the request, end the session, free up manually allocated buffers?
Nope.
Our solution happens at the highest level in the most important function: (req)
.
(req)
This is our public function which does it all.
[de req (Method Url Headers Filename Body)
(let ((Session Path Request) (create-session-request Method Url Headers))
(let Buffer (set-request-body Request Body)
(finally
(end-request-session Request Session Buffer)
(let Output (request-dispatch Request Session)
(parse-response Request Url Output) ]
The first thing we do is obtain the request Buffer
(which may possibly be empty). Next, we have this very useful finally call. That’s our safety net. The first argument is the “thing you do if an error is throw, or when you’re done processing”. The second argument is the “processing” part.
In other words, if a (throw)
is called in our code, it will execute (end-request-session)
which cleans memory and keeps things sane. Otherwise, it runs the (request-dispatch)
and (parse-response)
, then (finally) it runs (end-request-session)
before returning the response from (parse-response)
.
Isn’t that amazing? Sasuga PicoLisp.