This SRFI is currently in ``draft'' status.
To see an explanation of
each status that a SRFI can hold, see here.
To provide input on this SRFI, please
mail to
<srfi minus 113 at srfi dot schemers dot org>
. See
instructions here to
subscribe to the list. You can access previous messages via
the archive of the mailing list.
Sets and bags (also known as multisets) are unordered mutable collections that can contain any Scheme object. Sets enforce the constraint that no two elements can be the same in the sense of the set's associated equality predicate; bags do not. Integer sets are a variant of sets that can only contain non-negative exact integers that are less than a maximum value specified when the integer set is created, and that always treat numerical equality as their equality predicate. Likewise, character sets are sets that can only contain characters; their equality predicate is char=?
. Finally, enumeration sets are another variant that can only contain symbols chosen from a set of symbols represented by an enumeration type; the equality predicate for them is eq?.
(resolved)
(resolved)
(resolved)
(resolved)
(resolved)
(resolved)
(resolved)
Should we switch to unique enum objects rather than symbols?
(resolved)
(resolved)
(resolved)
Should we stick to just comparators, or also allow equality predicates?
Should we switch to six libraries (sets, bags, integer sets, character sets, enum sets, and set-bag conversion), or stick with a single library? (This is not about dividing the SRFI itself.)
Should we add a cursor API similar to SRFI 14's?
Should we add comparators for the various types?
Sets are a standard part of the libraries of many high-level programming languages, including Smalltalk, Java, and C++. Racket provides general sets similar to those of this proposal, though with fewer procedures, and there is a Chicken egg called sets
(unfortunately undocumented), which provides a minimal set of procedures.
Bags are useful for counting anything from a fixed set of possibilities, e.g. the number of each type of error in a log file or the number of uses of each word in a lexicon drawn from a body of documents. Although other data structures can serve the same purpose, using bags clearly expresses the programmer's intent and can be optimized.
Although general sets subsume all other types of sets, providing a few types separately allows for increased implementation efficiency. In particular, sets whose elements are restricted to non-negative exact integers within a small range are provided. There are two Chicken eggs that provide integer sets: iset
, which is conceptually similar to the integer sets described here, but using bignums rather than bytevectors; and cis
, which uses lists of integer intervals.
Character sets are already specified by SRFI 14, The interface is not as complete as this SRFI, so an overlay of procedures is provided here.
The design of enumeration sets is founded on R6RS enumerations, but with the addition of reified enumeration types along the lines suggested by R6RS Formal Comment #262. The prefix enum
is used in all cases instead of using both enum
and enumeration
as R6RS does. Approximate mappings are shown below.
Insofar as possible, the names in this SRFI are harmonized with the names used for ordered collections (lists, strings, vectors, and bytevectors) in Scheme. However, size
is used instead of length
to express the number of elements in the collection, because length
implies order.
Sets do not have a lexical syntax representation. It's possible to use SRFI 108 quasi-literal constructors to create them in code, but this SRFI does not standardize how that is done.
The procedures in this SRFI are in the (srfi 113)
library (or (srfi :113)
on R6RS). However, the sample implementation currently places them in the (sets)
library instead.
Sets, bags, integer sets, enumeration sets, and enumeration types are mutually disjoint, and disjoint from other types of Scheme objects. Character sets belong to the type defined by SRFI 14, but are disjoint from all other types.
It is an error for any procedure defined in this SRFI to be invoked on sets or bags with different comparators.
Procedures whose names end with !
are linear update procedures in the sense of SRFI 1. This means that an implementation may legally implement these procedures as pure, side-effect-free functions, or it may implement them using side effects, depending upon the details of what is the most efficient or simple to implement in terms of the underlying representation. Furthermore, if the implementations of all linear update procedures on a given type of set are pure, then the procedures which are said to return new sets are not required to actually allocate them: they may return already existing objects. See SRFI 1 for the rationale.
(set
comparator element ...)
Returns a new set. The comparator argument is either a SRFI 114 comparator or else a procedure, in which case it is the equality predicate for the set. Any comparator with an equality predicate and a corresponding hash function may be used. Implementations must accept the equality predicates eq?
, eqv?
, equal
, string=?
, and string-ci=?
, and may accept others. The elements are used to initialize the set.
(set-add
set element ...)
Returns a new set containing the elements of set, and in addition the specified elements. The new set uses the same comparator or equality predicate as set. It is an error to pass an element to this procedure that does not return #t
when passed to the type test procedure of the comparator with which set was defined.
(set-delete
set element ...)
Returns a new set containing the the elements of set with the possible exception of the elements, if they are present in set. The new set uses the same comparator or equality predicate.
(set-copy
set)
Returns a new set containing the elements of set, and using the same comparator or equality predicate.
(set-empty-copy
set)
Returns a new set containing no elements, and using the same comparator or equality predicate as set.
(set?
obj)
Returns #t
if obj is a set, and #f
otherwise.
(set-contains?
set
element)
Returns #t
if element is a member of set and #f
otherwise.
(set-value
set
element)
Returns the element of set that is equal, in the sense of set's equality predicate, to element. If element is not a member of set, it is returned.
(set-add!
set
element ...)
Returns a set containing the elements of set, and in addition the specified elements. The set uses the same comparator or equality predicate as set. It is an error to pass an element to this procedure that does not return #t
when passed to the type test procedure of the comparator with which set was defined.
(set-delete!
set
element ...)
Returns a set containing the the elements of set with the possible exception of the elements, if they are present in set. The new set uses the same comparator or equality predicate..
(set-intern!
set
element)
Returns two values. If there is an element of set that is equal, in the sense of set's equality predicate, to element, then that element is returned as the first value and set is returned as the second value. If there is no such element, then the first value is element and the second value is the result of (set-add!
set element)
.
(set-map
comparator
proc
set)
Applies proc to each element of set in arbitrary order and returns a new set, created as if by set
, which contains the results of the applications. For example:
(set-map string-ci=? symbol->string (set eq? 'foo 'bar 'baz)) => (set string-ci=? "foo" "bar" "baz")
(set-for-each
proc
set)
Applies proc to set in arbitrary order, discarding the returned values. Returns an unspecified result.
(set-fold
proc
nil
set)
Invokes proc on each member of set in arbitrary order, passing the result of the previous invocation as a second argument. For the first invocation, nil is used as the second argument. Returns the result of the last invocation.
(set-unfold
comparator continue? mapper successor seed)
Create a new set as if by set
. If the result of applying the predicate continue? to seed is #f
, return the set. Otherwise, apply the procedure mapper to seed. The value that mapper returns is added to the set. Then get a new seed by applying the procedure successor to seed, and repeat this algorithm.
(set->list
set)
Returns a newly allocated list containing the members of set in unspecified order. However, repeated calls to this procedure will return a list in the same order until the set is mutated.
(list->set
comparator list)
Returns a new set, created as if by set
, that contains the elements of list.
(list->set!
set list)
Returns set with the elements of list added to it.
Note that these functions do not obey the trichotomy law, and thus do not specify a total order on sets.
(set=?
set ...)
Returns #t
if each set contains the same elements.
(set<?
set ...)
Returns #t
if each set other than the last is a proper subset of the following set, and #f
otherwise.
(set>?
set ...)
Returns #t
if each set other than the last is a proper superset of the following set, and #f
otherwise.
(set<=?
set ...)
Returns #t
if each set other than the last is a subset of the following set, and #f
otherwise.
(set>=?
set ...)
Returns #t
if each set other than the last is a superset of the following set, and #f
otherwise.
(set-size
set)
Returns the number of elements in set as an exact integer.
(set-filter
predicate
set)
Returns a new set, created as if by set-empty-copy
, containing just the elements of set that satisfy predicate.
(set-filter!
predicate
set)
Returns a set containing just the elements of set that satisfy predicate.
(set-remove
predicate
set)
Returns a new set, created as if by set-empty-copy
, containing just the elements of set that do not satisfy predicate.
(set-partition
predicate
set)
Returns two values: a new set, created as if by set-empty-copy
, containing just the elements of set that satisfy predicate, and another new set, created as if by set-empty-copy
, containing just the elements of set that do not satisfy predicate.
(set-count
predicate
set)
Returns the number of elements of set that satisfy predicate as an exact integer.
(set-find
predicate set failure)
Returns an arbitrarily chosen element of set that satisfies predicate, or the result of invoking failure with no arguments if there is none.
(set-any?
predicate
set)
Returns #t
if any element of set satisfies predicate, or #f
otherwise. Note that this differs from the SRFI 1 analogue because it does not return a useful value.
(set-every?
predicate
set)
Returns #t
if every element of set satisfies predicate, or #f
otherwise. Note that this differs from the SRFI 1 analogue because it does not return a useful value.
(set-union
set1
set2 ...)
(set-intersection
set1
set2 ...)
(set-difference
set1
set2 ...)
(set-xor
set1
set2)
Returns a new set that is the union, intersection, asymmetric difference, or symmetric difference of the sets. Asymmetric difference is extended to more than two sets by taking the difference between the first set and the union of the others. Symmetric difference is not extended beyond two sets. Elements in the result set are drawn from the first set in which they appear.
(set-union!
set1
set2 ...)
(set-intersection!
set1
set2 ...)
(set-difference!
set1
set2 ...)
(set-xor!
set1
set2)
The same as set-union
, set-intersection
, set-difference
, and set-xor
respectively, except that they may mutate the set1 argument.
Bags are like sets, but can contain the same object more than once. The procedures for creating and manipulating bags are the same as those for sets, except that set
is replaced by bag
in their names. If two elements in a bag are equal in the sense of the equality predicate, the implementation may in fact store just one of them.
There are no procedures bag-xor
or bag-xor!
.
(bag-element-count
bag
element)
Returns an exact integer representing the number of times that element appears in bag.
(bag-for-each-unique
proc
bag)
Applies proc to each unique element of bag in arbitrary order, passing the element and the number of times it occurs in bag, and discarding the returned values. Returns an unspecified result.
(bag-fold-unique
proc
nil
bag)
Invokes proc on each unique element of bag in arbitrary order, passing the number of occurrences as a second argument and the result of the previous invocation as a third argument. For the first invocation, nil is used as the third argument. Returns the result of the last invocation.
(bag-increment!
bag
element
n)
(bag-decrement!
bag
element
n)
Returns a bag containing the elements of bag, but with n more or fewer copies of element.
(bag->set
bag)
(set->bag
set)
The bag->set
procedure returns a new set containing the unique elements of bag. The set->bag
procedure returns a new bag containing the elements of set. The comparator or equality predicate of the result is the same as the comparator or equality predicate of the argument.
The elements of a character set are characters. Except as noted below, the procedures for creating and manipulating character sets are the same as those for sets, except that set
is replaced by char-set
in their names, and there are no comparator arguments, as the equality predicate is always char=?
.
There is no char-set-intern!
procedure.
The character sets of this SRFI belong to the same type as the character sets of SRFI 14, at least in implementations that support both SRFIs.
(char-set
element ...)
Returns a character set which contains the elements.
(make-universal-char-set)
Returns a character set containing all possible elements.
(char-set-complement
char-set)
Returns a new character set that is the complement of char-set.
(char-set-complement!
char-set)
Returns a character set that is the complement of char-set, possibly mutating char-set in the process.
(char-set-min
char-set)
(char-set-max
char-set)
Returns the smallest or largest character in char-set, or #f
if there is none.
The elements of an integer set are non-negative exact integers less than the set's limit, which is specified when it is created. Except as noted below, the procedures for creating and manipulating integer sets are the same as those for sets, except that set
is replaced by integer-set
in their names, and references to comparators are replaced by limits, as the equality predicate is always =
. Wherever an integer set is returned, it has the same limit as the source sets. It is an error for a single procedure to be invoked on integer sets with different limits.
There is no integer-set-intern!
procedure.
(integer-set
limit element ...)
Returns a new integer set. The possible elements of the set are the exact integers from 0 to limit - 1, where limit is an exact non-negative integer. The set contains the elements.
(make-universal-integer-set
limit)
Returns a new integer set. The possible elements of the set are the exact integers from 0 to limit - 1, where limit is an exact non-negative integer. The set contains all possible elements.
(integer-set-complement
integer-set)
Returns a new integer set that is the complement of integer-set.
(integer-set-complement!
integer-set)
Returns a character set that is the complement of char-set, possibly mutating char-set in the process.
(integer-set-min
integer-set)
(integer-set-max
integer-set)
Returns the smallest or largest integer in integer-set, or #f
if there is none.
(integer-set->integer
integer-set)
(integer->integer-set
integer limit)
The integer-set->integer
procedure returns a non-negative exact integer which encodes integer-set. When considered as a binary number, the ones bit (least significant bit) of the integer encodes the presence of 0 in the set, the twos bit of the integer encodes the presence of 1, and so on up to the most significant bit, which encodes the presence of limit - 1. The integer->integer-set
returns an integer set whose limit is limit after performing the reverse transformation on integer (which must not be negative).
Except as noted below, the procedures for creating and manipulating enumeration sets are the same as those for sets, except that set
is replaced by enum-set
in their names. Wherever a new enumeration set is returned, it has the same enumeration type as the source sets. It is an error for a single procedure to be invoked on enumeration sets with different enumeration types.
(define-enumeration-type
<type-name> (
<constructor> <symbol> ...)
<predicate>)
Creates an enumeration type whose members are <symbol>s. The identifier <type-name> is bound to the enumeration type. The identifier <constructor> is bound to a procedure similar to enum-set
, except that it does not accept an enum-type argument. Finally, the identifier <predicate> is bound to a predicate which is true if its argument is an enumeration set whose type is the declared type, and false otherwise. The syntax is reminiscent of define-record-type
.
There is no enum-set-intern!
procedure.
(make-enum-type
enum-list)
Returns an enumeration type suitable for constructing enumeration sets whose members are symbols. The elements of enum-list are either symbols or else pairs where the car is a symbol and the cdr is an exact integer called the value of the symbol. If the element is a symbol, the value is greater by 1 than the value of the previous element, or 0 if there is no previous element. Values are normally distinct, but make-enum-type
intentionally does not enforce this, for compatibility with C/C++ external routines. The symbols are said to be in the enumeration type. In R6RS the function of this procedure is provided as part of make-enumeration
, but the values (called indexes) are assigned from 0 on up.
(enum-type?
obj)
Returns #t
if obj is an enumeration type, and #f
otherwise.
(enum-type->alist
enum-type)
Return a newly allocated alist mapping the symbols in enum-type to their values.
(enum-type-symbol-value
enum-type symbol)
Return the value of symbol in enum-type, or #f
if it is not in enum-type. A loose R6RS analogue is the procedure returned by enum-type-indexer
when applied to an enum-set belonging to enum-type
.
(enum-type-symbol
enum-type value)
Returns the first symbol whose value in enum-type is value, or #f
if there is none.
(enum-value=?
enum-type symbol ...)
(enum-value<?
enum-type symbol ...)
(enum-value>?
enum-type symbol ...)
(enum-value<=?
enum-type symbol ...)
(enum-value>=?
enum-type symbol ...)
Returns #t
if the values of the symbols are equal (which implies that the symbols themselves are eq?
), monotonically increasing, monotonically decreasing, monotonically nondecreasing, and monotonically nonincreasing respectively, and #f
otherwise.
(enum-set
enum-type symbol ... )
Returns a new enumeration set. The possible elements of the set are the symbols in enum-type. The set is initialized to contain the symbols. The approximate R6RS equivalents are enum-set-constructor
and make-enumeration
.
(make-universal-enum-set
enum-type)
Returns a new enumeration set. The possible elements of the set are the symbols in enum-type. The set contains all possible elements. The approximate R6RS equivalent is enum-set-universe
.
(list->enum-set
enum-type
list)
Returns a new enumeration set. The possible elements of the set are the symbols in enum-type. The set is initialized to contain the elements of list. There is no R6RS equivalent.
(enum-set-complement
enum-set)
Returns a new enumeration set that is the complement of enum-set. This procedure is also in R6RS.
(enum-set-complement!
enum-set)
Returns an enumeration set that is the complement of enum-set, possibly mutating enum-set in the process. This procedure is also in R6RS, where it is required to mutate its argument.
(enum-set-min
integer-set)
(enum-set-max
integer-set)
Returns the smallest or largest symbol in symbol index order in enum-set, or #f
if there is none.
(enum-set-projection
enum-set
enum-type)
Returns a new enumeration set of type enum-type. Its elements are the symbols belonging to enum-set, ignoring any symbols which are not in enum-type. This procedure is also in R6RS, but uses a second enum-set in place of enum-type.
Sets and bags are implemented as a thin veneer over hashtables, and integer sets over bytevectors. Character sets just are SRFI 14 character sets. For clarity, the integer set implementation stores just one value into each bytevector element rather than the eight that would be possible. In turn, enumeration types are implemented over a hashtable from symbols to indexes, and enumeration sets over integer sets.
The sample implementation contains the following files:
sets-impl.scm
- implementation of setsbags-impl.scm
- implementation of bagsisets-impl.scm
- implementation of integer setscsets-impl.scm
- implementation of character setsenums-impl.scm
- implementation of enums and enum typescount.scm
- macros for conveniently looping over bytevectorssrfi-4-shim.scm
- a trivial implementation of bytevectors on top of SRFI 4 u8vectorssets.sld
- an R7RS librarysets.scm
- a Chicken library Each *-impl
file is divided into a section that makes use of the underlying collection and a section that doesn't.
The file sets-test.scm
is a test suite for this library. It uses Chicken's test
egg, which is also provided on Chibi as an R7RS library named (chibi test)
.
Copyright (C) John Cowan 2013. All Rights Reserved.
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
 IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.


Port Statistics
| Switch | Port | Receive counters | Transmit counters | ||||||
|---|---|---|---|---|---|---|---|---|---|
| Rx packets | Rx bytes | Rx error | Rx speed | Tx packets | Tx bytes | Tx error | Tx speed |
| Switch | Port | Receive counters | Transmit counters | ||||||
|---|---|---|---|---|---|---|---|---|---|
| Rx packets | Rx bytes | Rx error | Rx speed | Tx packets | Tx bytes | Tx error | Tx speed |


{% extends "base.html" %} {% block head %}
There has been an error on the server. We are sorry for the inconvenience. Go to Home Page.


@* * Copyright 2023 HM Revenue & Customs * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. *@ @import config.ApplicationConfig @import controllers.propertyLinking.ClaimPropertyRelationshipVM @import views.html.includes.assessmentHeading @this(govukErrorSummary : GovukErrorSummary, govukDetails : GovukDetails, govukRadios : GovukRadios, govukButton : GovukButton, mainLayout: views.html.mainLayout, formWithCSRF: FormWithCSRF) @(model: ClaimPropertyRelationshipVM, clientDetails: Option[ClientDetails] = None, backLink: String)(implicit request: Request[_], messages: Messages, config: ApplicationConfig) @form = @{model.form} @clientSuffix = @{ clientDetails.map(_.organisationId) match { case Some(id) => ".client" case _ => "" } } @getEnrichedErrorLinks = @{ form.errors.map{ error => ErrorLink(href = Some(s"#${error.key}"), content = HtmlContent(s"${messages(s"label.${error.key}$clientSuffix")} - ${messages(error.message)}") )} } @mainLayout( pageTitle = messages("declarePropertyRelationship.title"), backUri = Some(backLink), hasErrors = form.hasErrors) { @if(form.errors.nonEmpty) { @govukErrorSummary(ErrorSummary(errorList = getEnrichedErrorLinks, title = Text(messages("error.propertyRepresentation.title")))) } @assessmentHeading(model.localAuthorityReference, model.address)


Seer Racoy:
Young shaman, I see that you have not yet completed the Test of War Spirit. But there is no need to worry. I am quite sure that before long you shall become one of the greatest Warcryers, praising loudly the glory of Pa'agrio!


{{Title TBC}}
- Setting up digital TV
- Find out how to get free-to-air TV using an antenna or a satellite dish.
- Troubleshooting TV reception
- Follow these steps to fix TV reception and signal issues.
- Areas with temporary reception issues
- Check to see if your area has poor TV reception because of temporary issues such as planned maintenance or storm damage.
- Retransmitting TV channels
- In remote areas with poor TV reception, local organisations can apply to retransmit channels.
News
Announcements, media releases, interviews, speeches and more.


100uM of PCA, PYO and PCN were reduced in PBS 50 (50mL) in the survival assay chambers. Electrolysis was performed overnight and the expected color changes were observed. Reduced phenazines were transferred into stoppered serum bottles. Serum bottles were transferred to the anaerobic chamber housing the plate reader.
Pre electrolysis (left) & post electrolysis (right)
Clockwise from the bottom right the chambers are PYO, PCA and PCN.
Electrolysis curves (left) & serum bottles (right)
Electrolysis seemed to go to completion and the color changes remained in the serum bottles upon transfer to the other chamber.
Black walled, clear bottomed fluorescence 96 well plates were stored in the chamber in advance. 1mL tubes of oxidized phenazines (100uM in PBS 50), and buffer (PBS 50), were transferred into the chamber the morning of and were shaken / pipetted repeatedly to remove oxygen.
Wells were measured in two fluorescence channels 360/40ex,460/40 em and 360/40ex, 528/40 em and absorbance scans were taken from 300nm - 700nm in increments of 10nm. Wells were scanned with oxidized phenazines before mixing, and then repeatedly scanned in a timecourse following mixing.
Mixing 75uL of reduced phz (or buffer) with 75uL of oxidized phz (or buffer)
1. Buffer
2. \(PCA_{red}\)
3. \(PCN_{red}\)
4. \(PYO_{red}\)
In this way we acquired spectra in the measured channels for all of the oxidized and reduced phenazines in isolation and in combination. Well conditions were repeated in triplicate.
The actual setup and plate reader program was to do the PBS controls first with oxidized and reduced phenazines (wells B1-B6). The plate reader program was to take an absorbance spectra, then do a kinetic run for 2min monitoring all the abs and fluor wavelenghts, then taking another absorbance spectra.
After the controls, then I setup wells C1-C6 with PCN_ox (C1-C3) and PYO_ox (C4 - C6) and added PCA_red. Then I did PCN_red with PCA_ox and PYO_ox in wells D1-D6, followed by PYO_red with PCA_ox and PCN_ox (E1-E6). Finally I ran the same plate reader program on the entire plate. Therefore there are 4 spectra and two kinetic runs per well. Howerver, as you will see, we only need to look at the first spectra and the first kinetic read.
First let’s just look at the metadata telling us which experiment occurred in which well:
library(tidyverse)
library(cowplot)
library(viridis)
library(knitr)
library(kableExtra)
knitr::opts_chunk$set(tidy.opts=list(width.cutoff=60),tidy=TRUE, echo = TRUE, message=FALSE, warning=FALSE, fig.align="center")
source("../../IDA/tools/plotting_tools.R")
theme_set(theme_1())
metadata <- read_csv("data/2019_09_17_solution_ET_well_metadata.csv") %>%
mutate(exp = ifelse(red == "PBS" | ox == "PBS", "ref", "exp"))
metadata %>% kable() %>% kable_styling(bootstrap_options = "condensed") %>%
scroll_box(width = "100%", height = "400px")
| well | red | ox | red_ox | rep | exp |
|---|---|---|---|---|---|
| B1 | PBS | PCA | PBS_PCA | 1 | ref |
| B2 | PBS | PCN | PBS_PCN | 1 | ref |
| B3 | PBS | PYO | PBS_PYO | 1 | ref |
| B4 | PCA | PBS | PCA_PBS | 1 | ref |
| B5 | PCN | PBS | PCN_PBS | 1 | ref |
| B6 | PYO | PBS | PYO_PBS | 1 | ref |
| C1 | PCA | PCN | PCA_PCN | 1 | exp |
| C2 | PCA | PCN | PCA_PCN | 2 | exp |
| C3 | PCA | PCN | PCA_PCN | 3 | exp |
| C4 | PCA | PYO | PCA_PYO | 1 | exp |
| C5 | PCA | PYO | PCA_PYO | 2 | exp |
| C6 | PCA | PYO | PCA_PYO | 3 | exp |
| D1 | PCN | PCA | PCN_PCA | 1 | exp |
| D2 | PCN | PCA | PCN_PCA | 2 | exp |
| D3 | PCN | PCA | PCN_PCA | 3 | exp |
| D4 | PCN | PYO | PCN_PYO | 1 | exp |
| D5 | PCN | PYO | PCN_PYO | 2 | exp |
| D6 | PCN | PYO | PCN_PYO | 3 | exp |
| E1 | PYO | PCA | PYO_PCA | 1 | exp |
| E2 | PYO | PCA | PYO_PCA | 2 | exp |
| E3 | PYO | PCA | PYO_PCA | 3 | exp |
| E4 | PYO | PCN | PYO_PCN | 1 | exp |
| E5 | PYO | PCN | PYO_PCN | 2 | exp |
| E6 | PYO | PCN | PYO_PCN | 3 | exp |
| A4 | PBS | PBS | PBS_PBS | 1 | ref |
| A5 | PBS | PBS | PBS_PBS | 2 | ref |
| A6 | PBS | PBS | PBS_PBS | 3 | ref |
Let’s start by looking at the reference spectra for the oxidized and reduced phenazines.
df_spectra <- read_csv("data/2019_09_17_solution_ET_abs_spectra_1.csv",
skip = 1) %>% gather(key = "well", value = "intensity", -Wavelength)
df_spectra_meta <- left_join(df_spectra, metadata, by = c("well")) %>%
mutate(phz = case_when(red == "PYO" | ox == "PYO" ~ "PYO",
red == "PCA" | ox == "PCA" ~ "PCA", red == "PCN" | ox ==
"PCN" ~ "PCN", red_ox == "PBS_PBS" & rep == 1 ~ "PCA",
red_ox == "PBS_PBS" & rep == 2 ~ "PCN", red_ox == "PBS_PBS" &
rep == 3 ~ "PYO")) %>% mutate(phz_redox = ifelse(red ==
"PBS", "phz_ox", "phz_red"))
ggplot(df_spectra_meta %>% filter(rep == 1) %>% filter(exp ==
"ref" & red_ox != "PBS_PBS"), aes(x = Wavelength, color = phz_redox,
group = red_ox)) + geom_vline(xintercept = c(310, 360, 500,
690), color = "gray", linetype = 2, alpha = 0.4) + geom_path(data = df_spectra_meta %>%
filter(red_ox == "PBS_PBS"), aes(x = Wavelength, y = intensity),
color = "gray") + geom_path(aes(y = intensity), size = 1) +
facet_wrap(~phz, scales = "free") + labs(color = NULL, y = "Absorbance")
Gray is the PBS background and the dashed gray lines are the wavelengths I measured over time (not including the fluorescence channels).
Now let’s put the spectra together for each experimental well. Ideally we’d like to compare the experimentally observed spectrum to the oxidized and reduced phenazines added to the well to see how the reaction proceeded. We need to wrangle some of the data to put that all together, but now we can explore each condition:
df_ref_1 <- left_join(df_spectra_meta %>% filter(exp == "exp"),
df_spectra_meta %>% filter(exp == "ref") %>% select(Wavelength,
well, intensity, red, ox, red_ox), by = c("red", "Wavelength"),
suffix = c("", "_phz1_red"))
df_ref_2 <- left_join(df_ref_1, df_spectra_meta %>% filter(exp ==
"ref") %>% select(Wavelength, well, intensity, red, ox, red_ox),
by = c(red = "ox", "Wavelength"), suffix = c("", "_phz1_ox"))
df_ref_3 <- left_join(df_ref_2, df_spectra_meta %>% filter(exp ==
"ref") %>% select(Wavelength, well, intensity, red, ox, red_ox),
by = c("ox", "Wavelength"), suffix = c("", "_phz2_ox"))
df_ref_4 <- left_join(df_ref_3, df_spectra_meta %>% filter(exp ==
"ref") %>% select(Wavelength, well, intensity, red, ox, red_ox),
by = c(ox = "red", "Wavelength"), suffix = c("", "_phz2_red"))
legend_segments <- tibble(x = c(500, 500, 500, 500), xend = c(550,
550, 550, 550), xlabel = c(525, 525, 525, 525), y = c(0.4,
0.3, 0.2, 0.1), color = c("red", "red", "blue", "blue"),
linetype = c(1, 2, 1, 2), label = c("PHZ 1 reduced (init)",
"PHZ 1 oxidized (final)", "PHZ 2 oxidized (init)", "PHZ 2 reduced (final)"))
color = c("red", "red", "blue", "blue")
linetype = c(1, 2, 1, 2)
spectra_legend <- geom_segment(data = legend_segments, aes(x = x,
xend = xend, y = y, yend = y), color = color, linetype = linetype,
size = 1)
legend_labs <- geom_text(data = legend_segments, aes(x = xlabel,
y = y, label = label), nudge_y = 0.05)
ggplot(df_ref_4 %>% filter(rep == 1 & red_ox == "PCA_PYO"), aes(x = Wavelength)) +
geom_path(aes(y = intensity_phz1_red), color = "red", linetype = 1,
size = 1) + geom_path(aes(y = intensity_phz1_ox), color = "red",
linetype = 2, size = 1) + geom_path(aes(y = intensity_phz2_ox),
color = "blue", linetype = 1, size = 1) + geom_path(aes(y = intensity_phz2_red),
color = "blue", linetype = 2, size = 1) + geom_path(aes(y = intensity),
size = 1) + facet_wrap(~red_ox, scales = "free") + spectra_legend +
legend_labs
ggplot(df_ref_4 %>% filter(rep == 1 & red_ox == "PCN_PYO"), aes(x = Wavelength)) +
geom_path(aes(y = intensity_phz1_red), color = "red", linetype = 1,
size = 1) + geom_path(aes(y = intensity_phz1_ox), color = "red",
linetype = 2, size = 1) + geom_path(aes(y = intensity_phz2_ox),
color = "blue", linetype = 1, size = 1) + geom_path(aes(y = intensity_phz2_red),
color = "blue", linetype = 2, size = 1) + geom_path(aes(y = intensity),
size = 1) + facet_wrap(~red_ox, scales = "free") + spectra_legend +
legend_labs
ggplot(df_ref_4 %>% filter(rep == 1 & red_ox == "PYO_PCA"), aes(x = Wavelength)) +
geom_path(aes(y = intensity_phz1_red), color = "red", linetype = 1,
size = 1) + geom_path(aes(y = intensity_phz1_ox), color = "red",
linetype = 2, size = 1) + geom_path(aes(y = intensity_phz2_ox),
color = "blue", linetype = 1, size = 1) + geom_path(aes(y = intensity_phz2_red),
color = "blue", linetype = 2, size = 1) + geom_path(aes(y = intensity),
size = 1) + facet_wrap(~red_ox, scales = "free") + spectra_legend +
legend_labs
ggplot(df_ref_4 %>% filter(rep == 1 & red_ox == "PYO_PCN"), aes(x = Wavelength)) +
geom_path(aes(y = intensity_phz1_red), color = "red", linetype = 1,
size = 1) + geom_path(aes(y = intensity_phz1_ox), color = "red",
linetype = 2, size = 1) + geom_path(aes(y = intensity_phz2_ox),
color = "blue", linetype = 1, size = 1) + geom_path(aes(y = intensity_phz2_red),
color = "blue", linetype = 2, size = 1) + geom_path(aes(y = intensity),
size = 1) + facet_wrap(~red_ox, scales = "free") + spectra_legend +
legend_labs
ggplot(df_ref_4 %>% filter(rep == 1 & red_ox == "PCN_PCA"), aes(x = Wavelength)) +
geom_path(aes(y = intensity_phz1_red), color = "red", linetype = 1,
size = 1) + geom_path(aes(y = intensity_phz1_ox), color = "red",
linetype = 2, size = 1) + geom_path(aes(y = intensity_phz2_ox),
color = "blue", linetype = 1, size = 1) + geom_path(aes(y = intensity_phz2_red),
color = "blue", linetype = 2, size = 1) + geom_path(aes(y = intensity),
size = 1) + facet_wrap(~red_ox, scales = "free") + spectra_legend +
legend_labs
ggplot(df_ref_4 %>% filter(rep == 1 & red_ox == "PCA_PCN"), aes(x = Wavelength)) +
geom_path(aes(y = intensity_phz1_red), color = "red", linetype = 1,
size = 1) + geom_path(aes(y = intensity_phz1_ox), color = "red",
linetype = 2, size = 1) + geom_path(aes(y = intensity_phz2_ox),
color = "blue", linetype = 1, size = 1) + geom_path(aes(y = intensity_phz2_red),
color = "blue", linetype = 2, size = 1) + geom_path(aes(y = intensity),
size = 1) + facet_wrap(~red_ox, scales = "free") + spectra_legend +
legend_labs
df_kin <- read_csv("data/2019_09_17_solution_ET_init_kinetic_reads.csv",
skip = 1, ) %>% select(-`Kinetic read`) %>% gather(key = "well",
value = "intensity", -minutes, -wavelength)
df_kin <- left_join(df_kin, metadata, by = c("well"))
Looking at these kinetic reads over the initial 2 minutes (following mixing, starting protocol and abs spectra), it seems like we aren’t observing a lot of change over this timescale. I think this means that the reactions either happen fast, before the measurement, or they are not going / proceeding very slowly.
ggplot(df_kin %>% filter(wavelength == "em460"), aes(x = minutes,
y = intensity)) + geom_point() + geom_smooth(method = "lm",
se = F) + facet_grid(red ~ ox)
ggplot(df_kin %>% filter(wavelength == "em528"), aes(x = minutes,
y = intensity)) + geom_point() + geom_smooth(method = "lm",
se = F) + facet_grid(red ~ ox)
ggplot(df_kin %>% filter(wavelength == "abs310"), aes(x = minutes,
y = intensity)) + geom_point() + geom_smooth(method = "lm",
se = F) + facet_grid(red ~ ox)
ggplot(df_kin %>% filter(wavelength == "abs360"), aes(x = minutes,
y = intensity)) + geom_point() + geom_smooth(method = "lm",
se = F) + facet_grid(red ~ ox)
ggplot(df_kin %>% filter(wavelength == "abs690"), aes(x = minutes,
y = intensity)) + geom_point() + geom_smooth(method = "lm",
se = F) + facet_grid(red ~ ox)
ggplot(df_kin %>% filter(wavelength == "abs500"), aes(x = minutes,
y = intensity)) + geom_point() + geom_smooth(method = "lm",
se = F) + facet_grid(red ~ ox)
Now that it doesn’t matter which point values we take from the kinetic run, let’s just average the kinetic run values for each well and take a look:
df_per_rep <- df_kin %>% group_by(wavelength, red, ox, red_ox,
rep) %>% summarise(int_per_rep = mean(intensity, na.rm = T),
std_per_rep = sd(intensity, na.rm = T)) %>% mutate(std_per_rep = ifelse(is.na(std_per_rep),
0, std_per_rep))
ggplot(df_per_rep, aes(x = red_ox, y = int_per_rep)) + geom_pointrange(aes(ymin = int_per_rep -
2 * std_per_rep, ymax = int_per_rep + 2 * std_per_rep)) +
facet_wrap(~wavelength, scales = "free")
Ok, hard to read, but the point is there are different values and the error bars are small, because the kinetic reads were pretty much all the same. Note that error bars are 2 standard deviations aka approximately a 95% confidence interval. Now let’s average the triplicates from each condition:
df_per_cond <- df_per_rep %>% group_by(wavelength, red, ox, red_ox) %>%
summarise(int_per_cond = mean(int_per_rep), std_per_cond = sd(int_per_rep)) %>%
mutate(std_per_cond = ifelse(is.na(std_per_cond), 0, std_per_cond))
ggplot(df_per_cond, aes(x = red_ox, y = int_per_cond)) + geom_hline(data = df_per_cond %>%
filter(red_ox == "PBS_PBS"), aes(yintercept = int_per_cond),
color = "gray") + geom_pointrange(aes(ymin = int_per_cond -
2 * std_per_cond, ymax = int_per_cond + 2 * std_per_cond)) +
facet_wrap(~wavelength, scales = "free") + ylim(0, NA)
Ok, here you can see that error bars are a little bigger to accomodate the triplicate wells. I have also plotted in a gray line the value of the PBS only control. This gives us a good idea of what the background reading is without any phenazine. Let’s go ahead and subtract out that background - this is equivalent to blanking a spec etc.
df_bg_sub <- df_per_cond %>% group_by(wavelength) %>% mutate(bg = ifelse(red_ox ==
"PBS_PBS", int_per_cond, NA)) %>% mutate(bg_sub = int_per_cond -
mean(bg, na.rm = T))
ggplot(df_bg_sub, aes(x = red_ox, y = bg_sub)) + geom_hline(data = df_bg_sub %>%
filter(red_ox == "PBS_PBS"), aes(yintercept = bg_sub), color = "gray") +
geom_pointrange(aes(ymin = bg_sub - 2 * std_per_cond, ymax = bg_sub +
2 * std_per_cond)) + facet_wrap(~wavelength, scales = "free") # + ylim(0,NA)
Beautiful, now these should be the intensities of the actual phenazines we were trying to measure.
Now what I’m going to do is setup the data so that we can actually predict the initial and final intensities for each well. For example, the \(PCA_{red} + PYO_{ox}\) condition should start with the abs690 of \(690_{PCA_{red}} + 690_{PYO_{ox}}\) and if the redox reaction proceeds the final values should be \(690_{PCA_{ox}} + 690_{PYO_{red}}\). Now you can look at the predictions vs. the experimental values for each of the conditions and channels:
bg_sub_refs <- df_bg_sub %>% filter(str_detect(red_ox, "PBS")) %>%
filter(red_ox != "PBS_PBS")
bg_sub_phz1_red <- left_join(df_bg_sub %>% filter(!str_detect(red_ox,
"PBS")), bg_sub_refs, by = c("wavelength", "red"), suffix = c("",
"_from_phz1_red"))
bg_sub_phz1_ox <- left_join(bg_sub_phz1_red, bg_sub_refs, by = c("wavelength",
red = "ox"), suffix = c("", "_from_phz1_ox"))
bg_sub_phz2_ox <- left_join(bg_sub_phz1_ox, bg_sub_refs, by = c("wavelength",
"ox"), suffix = c("", "_from_phz2_ox"))
bg_sub_phz2_red <- left_join(bg_sub_phz2_ox, bg_sub_refs, by = c("wavelength",
ox = "red"), suffix = c("", "_from_phz2_red"))
bg_sub_redox <- bg_sub_phz2_red %>% mutate(pred_init = bg_sub_from_phz1_red +
bg_sub_from_phz2_ox, pred_final = bg_sub_from_phz1_ox + bg_sub_from_phz2_red)
# red_ox_labs =
# c('PCA[red]~'+\n'*PCN[ox]',''PCA[red]+\nPYO[ox]'',''PCN[red]+\nPCA[ox]'',''PCN[red]+\nPYO[ox]'',''PYO[red]+\nPCA[ox]'',
# ''PYO[red]+\nPCN[ox]'')
red_ox_labs = c("PCA_red+\nPCN_ox", "PCA_red+\nPYO_ox", "PCN_red+\nPCA_ox",
"PCN_red+\nPYO_ox", "PYO_red+\nPCA_ox", "PYO_red+\nPCN_ox")
# red_ox_labs = c(expression(PCA[red]~'+\n'PCN[ox]))
Note that the red dot is the initial prediction, blue dot is the final prediction, and the black pointrange (95% CI) is the experimental values.
ggplot(bg_sub_redox %>% filter(wavelength == "abs310"), aes(x = red_ox)) +
geom_point(aes(y = pred_init), color = "red") + geom_point(aes(y = pred_final),
color = "blue") + geom_pointrange(aes(y = bg_sub, ymin = bg_sub -
2 * std_per_cond, ymax = bg_sub + 2 * std_per_cond), shape = 21) +
facet_wrap(~wavelength, scales = "free") + scale_x_discrete(labels = red_ox_labs,
name = NULL) + theme(axis.text.x = element_text(size = 12)) +
labs(y = "Predicted intensity")
ggplot(bg_sub_redox %>% filter(wavelength == "abs360"), aes(x = red_ox)) +
geom_point(aes(y = pred_init), color = "red") + geom_point(aes(y = pred_final),
color = "blue") + geom_pointrange(aes(y = bg_sub, ymin = bg_sub -
2 * std_per_cond, ymax = bg_sub + 2 * std_per_cond), shape = 21) +
facet_wrap(~wavelength, scales = "free") + scale_x_discrete(labels = red_ox_labs,
name = NULL) + theme(axis.text.x = element_text(size = 12)) +
labs(y = "Predicted intensity")
ggplot(bg_sub_redox %>% filter(wavelength == "abs690"), aes(x = red_ox)) +
geom_point(aes(y = pred_init), color = "red") + geom_point(aes(y = pred_final),
color = "blue") + geom_pointrange(aes(y = bg_sub, ymin = bg_sub -
2 * std_per_cond, ymax = bg_sub + 2 * std_per_cond), shape = 21) +
facet_wrap(~wavelength, scales = "free") + scale_x_discrete(labels = red_ox_labs,
name = NULL) + theme(axis.text.x = element_text(size = 12)) +
labs(y = "Predicted intensity")
ggplot(bg_sub_redox %>% filter(wavelength == "abs500"), aes(x = red_ox)) +
geom_point(aes(y = pred_init), color = "red") + geom_point(aes(y = pred_final),
color = "blue") + geom_pointrange(aes(y = bg_sub, ymin = bg_sub -
2 * std_per_cond, ymax = bg_sub + 2 * std_per_cond), shape = 21) +
facet_wrap(~wavelength, scales = "free") + scale_x_discrete(labels = red_ox_labs,
name = NULL) + theme(axis.text.x = element_text(size = 12)) +
labs(y = "Predicted intensity")
ggplot(bg_sub_redox %>% filter(wavelength == "em460"), aes(x = red_ox)) +
geom_point(aes(y = pred_init), color = "red") + geom_point(aes(y = pred_final),
color = "blue") + geom_pointrange(aes(y = bg_sub, ymin = bg_sub -
2 * std_per_cond, ymax = bg_sub + 2 * std_per_cond), shape = 21) +
facet_wrap(~wavelength, scales = "free") + scale_x_discrete(labels = red_ox_labs,
name = NULL) + theme(axis.text.x = element_text(size = 12)) +
labs(y = "Predicted intensity")
ggplot(bg_sub_redox %>% filter(wavelength == "em528"), aes(x = red_ox)) +
geom_point(aes(y = pred_init), color = "red") + geom_point(aes(y = pred_final),
color = "blue") + geom_pointrange(aes(y = bg_sub, ymin = bg_sub -
2 * std_per_cond, ymax = bg_sub + 2 * std_per_cond), shape = 21) +
facet_wrap(~wavelength, scales = "free") + scale_x_discrete(labels = red_ox_labs,
name = NULL) + theme(axis.text.x = element_text(size = 12)) +
labs(y = "Predicted intensity")
Now let’s normalize!
df_rxn_pct <- bg_sub_redox %>% mutate(rxn_range = abs(pred_final -
pred_init), rxn_ext = abs(bg_sub - pred_init)) %>% mutate(rxn_ext_high = abs((bg_sub +
2 * std_per_cond) - pred_init), rxn_ext_low = abs((bg_sub -
2 * std_per_cond) - pred_init)) %>% mutate(rxn_pct = rxn_ext/rxn_range,
rxn_pct_high = rxn_ext_high/rxn_range, rxn_pct_low = rxn_ext_low/rxn_range)
Here’s what all the data look like together.
ggplot(df_rxn_pct, aes(x = red_ox, y = rxn_pct, color = wavelength)) +
geom_pointrange(aes(ymin = rxn_pct_low, ymax = rxn_pct_high),
position = position_jitter(height = 0, width = 0.1)) +
scale_x_discrete(labels = red_ox_labs, name = NULL) + scale_y_continuous(labels = scales::percent) +
labs(y = "Reaction progress")
It’s a little hard to parse, especially because certain wavelengths were better for measuring certain phenazines. Here’s the individual wavelengths:
ggplot(df_rxn_pct %>% filter(wavelength == "abs310"), aes(x = red_ox,
y = rxn_pct)) + geom_pointrange(aes(ymin = rxn_pct_low, ymax = rxn_pct_high),
position = position_jitter(height = 0, width = 0.1)) + scale_x_discrete(labels = red_ox_labs,
name = NULL) + scale_y_continuous(labels = scales::percent) +
facet_wrap(~wavelength, scales = "free") + labs(y = "Reaction progress")
ggplot(df_rxn_pct %>% filter(wavelength == "abs360"), aes(x = red_ox,
y = rxn_pct)) + geom_pointrange(aes(ymin = rxn_pct_low, ymax = rxn_pct_high),
position = position_jitter(height = 0, width = 0.1)) + scale_x_discrete(labels = red_ox_labs,
name = NULL) + scale_y_continuous(labels = scales::percent) +
facet_wrap(~wavelength, scales = "free") + labs(y = "Reaction progress")
ggplot(df_rxn_pct %>% filter(wavelength == "abs690"), aes(x = red_ox,
y = rxn_pct)) + geom_pointrange(aes(ymin = rxn_pct_low, ymax = rxn_pct_high),
position = position_jitter(height = 0, width = 0.1)) + scale_x_discrete(labels = red_ox_labs,
name = NULL) + scale_y_continuous(labels = scales::percent) +
facet_wrap(~wavelength, scales = "free") + labs(y = "Reaction progress")
ggplot(df_rxn_pct %>% filter(wavelength == "abs500"), aes(x = red_ox,
y = rxn_pct)) + geom_pointrange(aes(ymin = rxn_pct_low, ymax = rxn_pct_high),
position = position_jitter(height = 0, width = 0.1)) + scale_x_discrete(labels = red_ox_labs,
name = NULL) + scale_y_continuous(labels = scales::percent) +
facet_wrap(~wavelength, scales = "free") + labs(y = "Reaction progress")
ggplot(df_rxn_pct %>% filter(wavelength == "em460"), aes(x = red_ox,
y = rxn_pct)) + geom_pointrange(aes(ymin = rxn_pct_low, ymax = rxn_pct_high),
position = position_jitter(height = 0, width = 0.1)) + scale_x_discrete(labels = red_ox_labs,
name = NULL) + scale_y_continuous(labels = scales::percent) +
facet_wrap(~wavelength, scales = "free") + labs(y = "Reaction progress")
ggplot(df_rxn_pct %>% filter(wavelength == "em528"), aes(x = red_ox,
y = rxn_pct)) + geom_pointrange(aes(ymin = rxn_pct_low, ymax = rxn_pct_high),
position = position_jitter(height = 0, width = 0.1)) + scale_x_discrete(labels = red_ox_labs,
name = NULL) + scale_y_continuous(labels = scales::percent) +
facet_wrap(~wavelength, scales = "free") + labs(y = "Reaction progress")
ggplot(df_rxn_pct %>% filter(ox == "PYO") %>% filter(!(wavelength %in%
c("abs360", "abs500"))), aes(x = red_ox, y = rxn_pct, color = wavelength)) +
geom_pointrange(aes(ymin = rxn_pct_low, ymax = rxn_pct_high),
position = position_jitter(height = 0, width = 0.1)) +
ylim(0, NA)
ggplot(df_rxn_pct %>% filter(red == "PYO") %>% filter(!(wavelength %in%
c("abs360", "abs500"))), aes(x = red_ox, y = rxn_pct, color = wavelength)) +
geom_pointrange(aes(ymin = rxn_pct_low, ymax = rxn_pct_high),
position = position_jitter(height = 0, width = 0.1)) +
ylim(0, NA)
ggplot(df_rxn_pct %>% filter(red_ox == "PCN_PCA") %>% filter(!(wavelength %in%
c("abs360", "abs310", "abs690", "abs500"))), aes(x = red_ox,
y = rxn_pct, color = wavelength)) + geom_pointrange(aes(ymin = rxn_pct_low,
ymax = rxn_pct_high), position = position_jitter(height = 0,
width = 0.1)) + ylim(0, NA)
ggplot(df_rxn_pct %>% filter(red_ox == "PCA_PCN") %>% filter(!(wavelength %in%
c("abs310", "abs690", "abs360"))), aes(x = red_ox, y = rxn_pct,
color = wavelength)) + geom_pointrange(aes(ymin = rxn_pct_low,
ymax = rxn_pct_high), position = position_jitter(height = 0,
width = 0.1)) + ylim(0, 1)
ggplot(df_rxn_pct %>% filter(red_ox == "PYO_PCN") %>% filter(!(wavelength %in%
c("abs500"))), aes(x = red_ox, y = rxn_pct, color = wavelength)) +
geom_pointrange(aes(ymin = rxn_pct_low, ymax = rxn_pct_high),
position = position_jitter(height = 0, width = 0.1)) +
ylim(0, 1)
It’s hard to concisely represent all of the data, because no single wavelength quantifies all the reactions well. I think the best thing to do is show the 690nm channel tracking the wells that had PYO:
labels = c("PCA[red] + PYO[ox]", "PCN[red] + PYO[ox]", "PYO[red] + PCA[ox]",
"PYO[red] + PCN[ox]")
plot_rxn_pct <- ggplot(df_rxn_pct %>% filter(ox == "PYO" | red ==
"PYO") %>% filter(wavelength == "abs690"), aes(x = red_ox,
y = rxn_pct)) + geom_pointrange(aes(ymin = rxn_pct_low, ymax = rxn_pct_high),
position = position_jitter(height = 0, width = 0.1)) + scale_y_continuous(labels = scales::percent,
limits = c(0, 1)) + labs(y = "Reaction progress at 690nm",
x = NULL) + scale_x_discrete(labels = parse(text = labels)) +
theme(axis.text = element_text(size = 12))
plot_rxn_pct
We could potentially add predictions for how far each reaction should go from nernst equation…
As more of a supplemental figure we could show some of the spectra like the spectra comparisons above. (black solid line is PYO_ox and dashed is PYO_red).
plot_pyo_ox <- ggplot(df_ref_4 %>% filter(rep == 1) %>% filter(ox ==
"PYO"), aes(x = Wavelength, color = red_ox, group = red_ox)) +
geom_vline(xintercept = 690, color = "gray", linetype = 2) +
geom_path(aes(y = intensity_phz2_ox), color = "black", linetype = 1) +
geom_path(aes(y = intensity_phz2_red), color = "black", linetype = 2) +
geom_path(aes(y = intensity), size = 1) + geom_segment(aes(x = 680,
xend = 680, y = 0.2, yend = 0.075), arrow = arrow(length = unit(0.05,
"inches"), type = "closed"), color = "black") + scale_color_manual(labels = parse(text = c("PCA[red] + PYO[ox]",
"PCN[red] + PYO[ox]")), values = colorblind_palette, name = NULL) +
labs(y = "Absorbance") + theme(legend.position = "top")
plot_pyo_red <- ggplot(df_ref_4 %>% filter(rep == 1) %>% filter(red ==
"PYO"), aes(x = Wavelength, color = red_ox, group = red_ox)) +
geom_vline(xintercept = 690, color = "gray", linetype = 2) +
geom_path(aes(y = intensity_phz1_ox), color = "black", linetype = 1) +
geom_path(aes(y = intensity_phz1_red), color = "black", linetype = 2) +
geom_path(aes(y = intensity), size = 1) + geom_segment(aes(x = 680,
xend = 680, y = 0.2, yend = 0.075), arrow = arrow(length = unit(0.05,
"inches"), type = "closed", ends = "first"), color = "black") +
scale_color_manual(labels = parse(text = c("PYO[red] + PCA[ox]",
"PYO[red] + PCN[ox]")), values = colorblind_palette,
name = NULL) + labs(y = "Absorbance") + theme(legend.position = "top")
plot_grid(plot_pyo_ox, plot_pyo_red, align = "hv", axis = "tlbr")
And here’s spectra of all the oxidized and reduced phenazines
plot_phz_ox <- ggplot(df_spectra_meta %>% filter(rep == 1) %>%
filter(exp == "ref" & red_ox != "PBS_PBS" & phz_redox ==
"phz_ox"), aes(x = Wavelength, color = phz, group = red_ox)) +
geom_path(data = df_spectra_meta %>% filter(rep == 1 & red_ox ==
"PBS_PBS"), aes(x = Wavelength, y = intensity), color = "gray") +
geom_path(aes(y = intensity), size = 1) + labs(color = NULL) +
labs(y = "Absorbance", title = "Oxidized phenazines") + theme(legend.position = "top")
plot_phz_red <- ggplot(df_spectra_meta %>% filter(rep == 1) %>%
filter(exp == "ref" & red_ox != "PBS_PBS" & phz_redox ==
"phz_red"), aes(x = Wavelength, color = phz, group = red_ox)) +
geom_path(data = df_spectra_meta %>% filter(rep == 1 & red_ox ==
"PBS_PBS"), aes(x = Wavelength, y = intensity), color = "gray") +
geom_path(aes(y = intensity), size = 1) + labs(color = NULL) +
labs(y = "Absorbance", title = "Reduced phenazines") + theme(legend.position = "top")
plot_grid(plot_phz_ox, plot_phz_red, align = "hv", axis = "tlbr")
And here’s a nice plot of the predictions at 690nm:
ggplot(bg_sub_redox %>% filter(wavelength == "abs690"), aes(x = red_ox)) +
geom_point(aes(y = pred_init), color = "red") + geom_point(aes(y = pred_final),
color = "blue") + geom_pointrange(aes(y = bg_sub, ymin = bg_sub -
2 * std_per_cond, ymax = bg_sub + 2 * std_per_cond), shape = 21) +
facet_wrap(~wavelength, scales = "free") + scale_x_discrete(labels = red_ox_labs,
name = NULL) + theme(axis.text.x = element_text(size = 12)) +
labs(y = "Predicted intensity")
sessionInfo()
## R version 3.5.3 (2019-03-11)
## Platform: x86_64-apple-darwin15.6.0 (64-bit)
## Running under: macOS Mojave 10.14.6
##
## Matrix products: default
## BLAS: /Library/Frameworks/R.framework/Versions/3.5/Resources/lib/libRblas.0.dylib
## LAPACK: /Library/Frameworks/R.framework/Versions/3.5/Resources/lib/libRlapack.dylib
##
## locale:
## [1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8
##
## attached base packages:
## [1] stats graphics grDevices utils datasets methods base
##
## other attached packages:
## [1] kableExtra_1.1.0 knitr_1.23 viridis_0.5.1
## [4] viridisLite_0.3.0 cowplot_0.9.4 forcats_0.4.0
## [7] stringr_1.4.0 dplyr_0.8.1 purrr_0.3.2
## [10] readr_1.3.1 tidyr_0.8.3 tibble_2.1.3
## [13] ggplot2_3.2.0 tidyverse_1.2.1
##
## loaded via a namespace (and not attached):
## [1] tidyselect_0.2.5 xfun_0.7 reshape2_1.4.3 haven_2.1.0
## [5] lattice_0.20-38 colorspace_1.4-1 generics_0.0.2 htmltools_0.3.6
## [9] yaml_2.2.0 rlang_0.3.4 pillar_1.4.1 glue_1.3.1
## [13] withr_2.1.2 modelr_0.1.4 readxl_1.3.1 plyr_1.8.4
## [17] munsell_0.5.0 gtable_0.3.0 cellranger_1.1.0 rvest_0.3.4
## [21] evaluate_0.14 labeling_0.3 highr_0.8 broom_0.5.2
## [25] Rcpp_1.0.1 scales_1.0.0 backports_1.1.4 formatR_1.7
## [29] webshot_0.5.1 jsonlite_1.6 gridExtra_2.3 hms_0.4.2
## [33] digest_0.6.19 stringi_1.4.3 grid_3.5.3 cli_1.1.0
## [37] tools_3.5.3 magrittr_1.5 lazyeval_0.2.2 crayon_1.3.4
## [41] pkgconfig_2.0.2 xml2_1.2.0 lubridate_1.7.4 assertthat_0.2.1
## [45] rmarkdown_1.13 httr_1.4.0 rstudioapi_0.10 R6_2.4.0
## [49] nlme_3.1-137 compiler_3.5.3


--- layout: default title: Select2 4.0.0 Released slug: announcements-4.0 ---
The 4.0 release is ready for early adopters interested in testing it
out. You can use the development version, available on GitHub, by
getting the source code available in the
select2-ng
branch. The source code can be
downloaded as a zip
archive
as well.
The 4.0 release of Select2 is the result of three years of working on the code base and watching where it needs to go. At the core, it is a full rewrite that addresses many of the extensibility and usability problems that could not be addressed in previous versions.
This release contains many breaking changes, but easy-upgrade paths have been created as well as helper modules that will allow for backwards compatibility to be maintained with past versions of Select2. Upgrading will require you to read the release notes carefully, but the migration path should be relatively straightforward. You can view a list of the most common changes that you will need to make in the release notes.
Below is an in-depth review of what is new in Select2, as well as some of the major changes that have been made.
The notable features of this new release include:
<select>
elements for all data adapters, removing the need for hidden <input>
elements.
Select2 now provides interfaces that allow for it to be easily extended, allowing for anyone to create a plugin that changes the way Select2 works. This is the result of Select2 being broken into four distinct sections, each of which can be extended and used together to create your unique Select2.
The adapters implement a consistent interface that is documented in the options section for adapters, allowing you to customize Select2 to do exactly what you are looking for. Select2 is designed such that you can mix and match plugins, with most of the core options being built as decorators that wrap the standard adapters.
Select2 now uses an AMD-based build system, allowing for builds that only require the parts of Select2 that you need. While a custom build system has not yet been created, Select2 is open source and will gladly accept a pull request for one.
Select2 includes the minimal almond AMD loader, but
a custom
select2.amd.js
build is available if you already use an AMD loader. The code base
(available in the
src
directory) also uses AMD, allowing you to include Select2 in your own
build system and generate your own builds alongside your existing
infrastructure.
The AMD methods used by Select2 are available as
jQuery.fn.select2.amd.define()/require()
, allowing you to use the included almond loader. These methods are
primarily used by the translations, but they are the recommended way
to access custom modules that Select2 provides.
There are a few breaking changes that migrators should be aware of when they are coming from older versions of Select2.
If you use the full build of Select2 (
select2.full.js
), you will be automatically notified of the major breaking changes,
and compatibility modules will be used in some cases to ensure that
your code still behaves how you were expecting.
In past versions of Select2, an
<input type="hidden" />
tag was recommended if you wanted to do anything advanced with
Select2, such as work with remote data sources or allow users to add
their own tags. This had the unfortunate side-effect of servers not
receiving the data from Select2 as an array, like a standard
<select>
element does, but instead sending a string containing the
comma-separated strings. The code base ended up being littered with
special cases for the hidden input, and libraries using Select2 had
to work around the differences it caused.
In Select2 4.0, the
<select>
element supports all core options, and support for the old
<input type="hidden" />
has been removed. This means that if you previously declared an AJAX
field with some pre-selected options that looked like...
<input type="hidden" name="select-boxes" value="1,2,4,6" />
Will need to be recreated as a
<select>
element with some
<option>
tags that have
value
attributes that match the old value.
<select name="select-boxes" multiple="multiple"> <option value="1" selected="selected">Select2</option> <option value="2" selected="selected">Chosen</option> <option value="4" selected="selected">selectize.js</option> <option value="6" selected="selected">typeahead.js</option> </select>
The options that you create should have
selected="selected"
set so Select2 and the browser knows that they should be selected.
The
value
attribute of the option should also be set to the value that will be
returned from the server for the result, so Select2 can highlight it
as selected in the dropdown. The text within the option should also
reflect the value that should be displayed by default for the option.
In past versions of Select2, when matching search terms to individual
options, which limited the control that you had when displaying
results, especially in cases where there was nested data. The
matcher
function was only given the individual option, even if it was a
nested options, without any context.
With the new matcher function, only the root-level options are matched and matchers are expected to limit the results of any children options that they contain. This allows developers to customize how options within groups can be displayed, and modify how the results are returned.
A function has been created that allows old-style matcher functions
to be converted to the new style. You can retrieve the function from
the
select2/compat/matcher
module, which should just wrap the old matcher function.
In the most recent versions of Select2, placeholders could only be
applied to the first (typically the default) option in a
<select>
if it was blank. The
placeholderOption
option was added to Select2 to allow users using the
select
tag to select a different option, typically an automatically
generated option with a different value.
The
placeholder
option can now take an object as well as just a string. This replaces
the need for the old
placeholderOption
, as now the
id
of the object can be set to the
value
attribute of the
<option>
tag.
For a select that looks like the following, where the first option
(with a value of
-1
) is the placeholder option...
<select> <option value="-1" selected="selected">Select an option</option> <option value="1">Something else</option> </select>
You would have previously had to get the placeholder option through
the
placeholderOption
, but now you can do it through the
placeholder
option by setting an
id
.
$("select").select2({ placeholder: { id: "-1", placeholder: "Select an option" } })
And Select2 will automatically display the placeholder when the value
of the select is
-1
, which it is by default. This does not break the old functionality
of Select2 where the placeholder option was blank by default.
In past versions of Select2, choices were displayed in the order that
they were selected. In cases where Select2 was used on a
<select>
element, the order that the server received the selections did not
always match the order that the choices were displayed, resulting in
confusion in situations where the order is important.
Select2 will now order selected choices in the same order that will be sent to the server.
When designing the future option set for Select2 4.0, special care was taken to ensure that the most commonly used options were brought over. For the most part, the commonly used options of Select2 can still be referenced under their previous names, but there were some changes which have been noted.
initSelection
In the past, whenever you wanted to use a custom data adapter, such
as AJAX or tagging, you needed to help Select2 out in determining the
initial values that were selected. This was typically done through
the
initSelection
option, which took the underlying data of the input and converted it
into data objects that Select2 could use.
This is now handled by the
data adapter in the
current
method, which allows Select2 to convert the currently selected values
into data objects that can be displayed. The default implementation
converts the text and value of
option
elements into data objects, and is probably suitable for most cases.
An example of the old
initSelection
option is included below, which converts the value of the selected
options into a data object with both the
id
and
text
matching the selected value.
initSelection : function (element, callback) { var data = []; $(element.val()).each(function () { data.push({id: this, text: this}); }); callback(data); }
When using the new
current
method of the custom data adapter, this method is
called any time Select2 needs a list of the currently selected
options. This is different from the old
initSelection
in that it was only called once, so it could suffer from being
relatively slow to process the data (such as from a remote data
source).
$.fn.select2.amd.require( ['select2/data/array', 'select2/utils'], function (ArrayData, Utils) { function CustomData ($element, options) { CustomData.__super__.constructor.call(this, $element, options); } Utils.Extend(CustomData, ArrayData); CustomData.prototype.current = function (callback) { var data = []; var currentVal = this.$element.val(); if (!this.$element.prop('multiple')) { currentVal = [currentVal]; } for (var v = 0; v < currentVal.length; v++) { data.push({ id: currentVal[v], text: currentVal[v] }); } callback(data); }; $("#select").select2({ dataAdapter: CustomData }); }
The new
current
method of the data adapter works in a similar way to the old
initSelection
method, with three notable differences. The first, and most
important, is that it is called whenever the current
selections are needed to ensure that Select2 is always displaying
the most accurate and up to date data. No matter what type of element
Select2 is attached to, whether it supports a single or multiple
selections, the data passed to the callback must be
an array, even if it contains one selection. The last is that there
is only one parameter, the callback to be executed with the latest
data, and the current element that Select2 is attached to is
available on the class itself as
this.$element
.
If you only need to load in the initial options once, and otherwise
will be letting Select2 handle the state of the selections, you don't
need to use a custom data adapter. You can just create the
<option>
tags on your own, and Select2 will pick up the changes.
var $element = $('select').select2(); // the select element you are working with var $request = $.ajax({ url: '/my/remote/source' // wherever your data is actually coming from }); $request.then(function (data) { // This assumes that the data comes back as an array of data objects // The idea is that you are using the same callback as the old `initSelection` for (var d = 0; d < data.length; d++) { var item = data[d]; // Create the DOM option that is pre-selected by default var option = new Option(data.text, data.id, true, true); // Append it to the select $element.append(option); } // Update the selected options that are displayed $element.trigger('change'); });
query
In the past, any
time you wanted to hook Select2 up to a different data source you
would be required to implement custom
query
and
initSelection
methods. This allowed Select2 to determine the initial selection and
the list of results to display, and it would handle everything else
internally, which was fine more most people.
The custom
query
and
initSelection
methods have been replaced by custom
data adapters that handle how Select2 stores and retrieves the data
that will be displayed to the user. An example of the old
query
option is provided below, which is the same as the
old example, and it generates results that contain the search term
repeated a certain number of times.
query: function (query) { var data = {results: []}, i, j, s; for (i = 1; i < 5; i++) { s = ""; for (j = 0; j < i; j++) {s = s + query.term;} data.results.push({id: query.term + i, text: s}); } query.callback(data); }
This has been replaced by custom data adapters which define a
similarly named
query
method. The comparable data adapter is provided below as an example.
$.fn.select2.amd.require( ['select2/data/array', 'select2/utils'], function (ArrayData, Utils) { function CustomData ($element, options) { CustomData.__super__.constructor.call(this, $element, options); } Utils.Extend(CustomData, ArrayData); CustomData.prototype.query = function (params, callback) { var data = { results: [] }; for (var i = 1; i < 5; i++) { var s = ""; for (var j = 0; j < i; j++) { s = s + params.term; } data.results.push({ id: params.term + i, text: s }); } callback(data); }; $("#select").select2({ dataAdapter: CustomData }); }
The new
query
method of the data adapter is very similar to the old
query
option that was passed into Select2 when initializing it. The old
query
argument is mostly the same as the new
params
that are passed in to query on, and the callback that should be used
to return the results is now passed in as the second parameter.
Select2 previously provided multiple options for formatting the
results list and selected options, commonly referred to as
"formatters", using the
formatSelection
and
formatResult
options. As the "formatters" were also used for things such as
localization, which has also
changed, they have been renamed to
templateSelection
and
templateResult
and their signatures have changed as well.
You should refer to the updated documentation on templates when migrating from previous versions of Select2.
id
and
text
properties are strictly enforced
When working with array and AJAX data in the past, Select2 allowed a
custom
id
function or attribute to be set in various places, ranging from the
initialization of Select2 to when the remote data was being returned.
This allowed Select2 to better integrate with existing data sources
that did not necessarily use the
id
attribute to indicate the unique identifier for an object.
Select2 no longer supports a custom
id
or
text
to be used, but provides integration points for converting incorrect
data to the expected format.
Select2 previously supported defining array data as an object that
matched the signature of an AJAX response. A
text
property could be specified that would map the given property to the
text
property on the individual objects. You can now do this when
initializing Select2 by using the following jQuery code to map the
old
text
and
id
properties to the new ones.
var data = $.map([ { pk: 1, word: 'one' }, { pk: 2, word: 'two' } ], function (obj) { obj.id = obj.id || obj.pk; obj.text = obj.text || obj.word; return obj; });
This will result in an array of data objects that have the
id
properties that match the existing
pk
properties and
text
properties that match the existing
word
properties.
The same code that was given above can be used in the
processResults
method of an AJAX call to map properties there as well.
In previous versions of Select2, the default messages provided to
users could be localized to fit the language of the website that it
was being used on. Select2 only comes with the English language by
default, but provides community-contributed
translations for many common languages. Many of the formatters have
been moved to the
language
option and the signatures of the formatters have been changed to
handle future additions.
data-*
attributes
In the past, Select2 has only supported declaring a subset of options
using
data-*
attributes. Select2 now supports declaring all options using the
attributes, using the
format specified in the documentation.
You could previously declare the URL that was used for AJAX requests
using the
data-ajax-url
attribute. While Select2 still allows for this, the new attribute
that should be used is the
data-ajax--url
attribute. Support for the old attribute will be removed in Select2
4.1.
Although it was not documented, a list of possible tags could also be
provided using the
data-select2-tags
attribute and passing in a JSON-formatted array of objects for tags.
As the method for specifying tags has changed in 4.0, you should now
provide the array of objects using the
data-data
attribute, which maps to the array
data option. You should also enable tags by setting
data-tags="true"
on the object, to maintain the ability for users to create their own
options as well.
If you previously declared the list of tags as...
<select data-select2-tags="[{id: '1', text: 'One', id: '2', text: 'Two'}]"></select>
...then you should now delare it as...
<select data-data="[{id: '1', text: 'One', id: '2', text: 'Two'}]" data-tags="true"></select>
As Select2 now uses a
<select>
element for all data sources, a few methods that were available by
calling
.select2()
are no longer required.
The
"val"
method has been deprecated and will be removed in Select2 4.1. The
deprecated method no longer includes the
triggerChange
parameter.
You should directly call
.val
on the underlying
<select>
element instead. If you needed the second parameter (
triggerChange
), you should also call
.trigger("change")
on the element.
$("select").val("1").trigger("change"); // instead of $("select").select2("val", "1");
Select2 will respect the
disabled
property of the underlying select element. In order to enable or
disable Select2, you should call
.prop('disabled', true/false)
on the
<select>
element. Support for the old methods will be completely removed in
Select2 4.1.
$("select").prop("disabled", true); // instead of $("select").enable(false);


SPECIAL for Programmers
Do you comment your code?
I comment code when code is not enough
I comment when code somebody asks me too
What is a comment?
Do you following the DRY principle?
Yes, religiously
Yes, but sometimes I find WET better
What the heck do you mean DRY?
What is your favorite programming language?
Java
JavaScript
PHP
C/C++
Ruby
Python
Etc
What are your thoughts on Test Driven Development?
What are your favorite Unix tools?
grep
sed
find
cut


Even though it grossed about $400 million worldwide, has anyone really been waiting anxiously for four years for a sequel to "Mission: Impossible"? How many people do you know who really loved (much less understood) that slick, cold and mostly forgettable movie?
Apparently Tom Cruise did, and when it comes to getting films produced, you don't need much more of a supporter than him. Perhaps, after spending most of the late 1990s exercising his acting muscles in such weighty fare as "Eyes Wide Shut" and "Magnolia" he's been yearning for the day when he can show up on the set, throw on a black leather jacket, jump on a mototrcycle, ride like the wind and forget all about digging deep within his psyche to find the right emotion. "Besides," he might rationalize, "I didn't get the Oscar for 'Magnolia,' and my fans complained there weren't any explosions in 'Eyes Wide Shut,' so why not give the people what they want?"
If pyrotechnics and chases are all it takes to satisfy a summer movie audience, no one can accuse "Mission: Impossible II" -- or "M: I-2," as the press materials call it -- of shortchanging its viewers. There's even a smattering of James Bond-style high-tech spy wizardry thrown in, including a tracking device implanted in the body that can send your position anywhere on earth to a satellite that zaps the information back to a computer, and a variety of extraordinarily realistic masks that can help heroes masquerade as villains and vice versa.
Since "M: I-2" is directed by John Woo ("Face-Off," "The Killer"), it also includes several grandiose gun battles, almost all of which are slowed down to emphasize, Woo's followers will say, their balletic qualities. To the masses, however, the movie's continual use of slow-motion will probably be unintentionally funny at first, then just plain irritating. Unfortunately for Woo, American directors have ripped off his moves so many times now (most notably in "The Matrix," which managed both to steal them and improve upon them) it seems as if the old master is picking his own pocket.
Flawed as it is, "M: I-2" is still a major improvement over the original "Mission," which Brian DePalma seemed to direct on auto-pilot. For starters, it's got a clearly defined plot line; the original was so unnecessarily complicated it would have taken flow charts and a slide show to explain.
Robert Towne, who wrote both films, borrows heavily from Alfred Hitchcock's 1946 masterpiece "Notorious," as Cruise's super-agent Ethan Hunt must send the woman he loves -- in this case, an exotic-looking cat burglar named Nyah Nordoff-Hall (Thandie Newton) -- into the arms of evil in order to get the information he needs to save the world. In "Notorious," Cary Grant was trying to expose Nazis; here, Hunt has to locate the lethal Chimera virus, which devours its victims from the inside out in record time. So the dutiful Nyah beds down with her old boyfriend Sean Ambrose (Dougray Scott), a wealthy, wicked entrepreneur who'd like to infect all of Australia with Chimera, then put the cure on the market at an inflated price. Supervillains these days don't want ransom money -- they want stock options in bio-tech firms.
In contrast to most of today's crash-and-smash epics, which can't go more than five minutes without dropping a one-liner, "M: I-2" maintains a straight face, even when its characters are doing fairly ridiculous things. When the funniest guy in the movie is Anthony Hopkins (who shows up at the beginning and the end of the story as Hunt's boss), you know you're watching a serious-minded film.
Disappointingly, "M: I-2" brings back Ving Rhames as Hunt's former partner Luther Stickell, then keeps him on the bench, plopping him in front of a computer screen or at the controls of a helicopter instead of letting him in on the action. That territory is reserved for Cruise and Cruise alone, and the star does a more than capable job of handling his stunts, including a final knife fight that, while drawn-out in the same way as Woo's overblown finale in "Face-Off," generates at least one major shock that's sure to have everyone gasping simultaneously.
Cruise comes up startlingly short, however, in his scenes with Newton. Although the story is built around their romance, there's nothing exciting going on between them, and even when Towne follows his "Notorious" blueprint right down to the scene in which our heroine poisons herself in the name of duty, Hunt seems only moderately distressed. Poor Nyah would have gotten a much warmer reception from Cary Grant. James Sanford
The review above was posted to the
rec.arts.movies.reviews newsgroup (de.rec.film.kritiken for German reviews).
The Internet Movie Database accepts no responsibility for the contents of the
review and has no editorial control. Unless stated otherwise, the copyright
belongs to the author.
Please direct comments/criticisms of the review to relevant newsgroups.
Broken URLs inthe reviews are the responsibility of the author.
The formatting of the review is likely to differ from the original due
to ASCII to HTML conversion.
Related links: index of all rec.arts.movies.reviews reviews


HIDE MENU
×
Welcome,
John
Dashboards
5
Default
Analytics
Videos
Financial
Blog
Boxes
Widgets
Lists
Pricing
Timeline
Misc
Utilities
UI elements
Buttons
Tabs & Accordions
Modals
Alerts & Tooltips
Panels
Sortable
Misc
Forms
Layout
Controls
Components
Advanced
Sliders
Pickers
Editors
Validation
Tables
Bootstrap
DataTables
editableTableWidget
Charts
Flot.js
Morris.js
Chart.js
Chartist
C3.js
Sparkline
Easy Pie Chart
Pages
22
Authentication
Sign In v1
Sign In v2
Sign Up v1
Sign Up v2
Blog
Posts
Post
Error pages
404
500
Forum
Forums list
Topics
Thread
Messages
List
Item
New message
About Us
Account
Invoice
Pricing
Profile v1
Profile v2
Search results
Support center
Blank
Color Generator
Docs
Create Invoice
Pixel
Admin
Home
Dropdown
Action
Another action
Something else here
Separated link
One more separated link
Notifications
5
SYSTEM
Error 500
: Syntax error in index.php at line
461
.
12h ago
STORE
You have
9
new orders.
12h ago
CRON DAEMON
Job
"Clean DB"
has been completed.
12h ago
SYSTEM
Server
up
.
12h ago
SYSTEM
Warning
: Processor load
92%
.
12h ago
MORE NOTIFICATIONS
Income messages
8
Lorem ipsum dolor sit amet, consectetur adipisicing elit.
from
Robert Jang
2h ago
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
from
Michelle Bortz
2h ago
Lorem ipsum dolor sit amet.
from
Timothy Owens
2h ago
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
from
Denise Steiner
2h ago
Lorem ipsum dolor sit amet.
from
Robert Jang
2h ago
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
from
Michelle Bortz
2h ago
Lorem ipsum dolor sit amet.
from
Timothy Owens
2h ago
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
from
Denise Steiner
2h ago
MORE MESSAGES
John Doe
New
Profile
New
Account
Settings
Log Out
Forms /
Validation
Example
Email
Example block-level help text here.
Password
Example block-level help text here.
Confirm password
Required
URL
Phone
Select
Select gear...
Pitons
Cams
Nuts
Bolts
Stoppers
Sling
Skis
Skins
Poles
Multiselect
Pitons
Cams
Nuts
Bolts
Stoppers
Sling
Skis
Skins
Poles
Select2
AngularJS
React
Backbone
Ember
TodoMVC
Polymer
Knockout
Aurelia
Spine
Brick
Nuclear.js
Dojo
Matreshka
Select2 Multiple
Pitons
Cams
Nuts
Bolts
Stoppers
Sling
Skis
Skins
Poles
Text
Light error
Example block-level help text here.
Dark error
File
Custom file
Choose file...
Clear
Browse
Switcher
YES
NO
Check me
Radios
Option one is this and that—be sure to include why it's great
Option two can be something else and selecting it will deselect option one
Option three is disabled
Custom radios
Option one is this and that—be sure to include why it's great
Option two can be something else and selecting it will deselect option one
Option three is disabled
Checkbox
Check me out
Checkbox group
One
Two
Custom checkbox
Check me out
Custom checkbox group
One
Two
Submit
Within wizard
1
Account
Setup your account
2
Profile
Configure profile
3
Credit card
Credit card info
4
Finish
Username
Password
Repeat password
E-mail
Next step
Full name
Gender
Male
Female
Country
Afghanistan
Åland Islands
Albania
Algeria
American Samoa
Andorra
Angola
Anguilla
Antarctica
Antigua and Barbuda
Argentina
Armenia
Aruba
Australia
Austria
Azerbaijan
Bahamas
Bahrain
Bangladesh
Barbados
Belarus
Belgium
Belize
Benin
Bermuda
Bhutan
Bolivia, Plurinational State of
Bosnia and Herzegovina
Botswana
Bouvet Island
Brazil
British Indian Ocean Territory
Brunei Darussalam
Bulgaria
Burkina Faso
Burundi
Cambodia
Cameroon
Canada
Cape Verde
Cayman Islands
Central African Republic
Chad
Chile
China
Christmas Island
Cocos (Keeling) Islands
Colombia
Comoros
Congo
Congo, the Democratic Republic of the
Cook Islands
Costa Rica
Côte d'Ivoire
Croatia
Cuba
Cyprus
Czech Republic
Denmark
Djibouti
Dominica
Dominican Republic
Ecuador
Egypt
El Salvador
Equatorial Guinea
Eritrea
Estonia
Ethiopia
Falkland Islands (Malvinas)
Faroe Islands
Fiji
Finland
France
French Guiana
French Polynesia
French Southern Territories
Gabon
Gambia
Georgia
Germany
Ghana
Gibraltar
Greece
Greenland
Grenada
Guadeloupe
Guam
Guatemala
Guernsey
Guinea
Guinea-Bissau
Guyana
Haiti
Heard Island and McDonald Islands
Holy See (Vatican City State)
Honduras
Hong Kong
Hungary
Iceland
India
Indonesia
Iran, Islamic Republic of
Iraq
Ireland
Isle of Man
Israel
Italy
Jamaica
Japan
Jersey
Jordan
Kazakhstan
Kenya
Kiribati
Korea, Democratic People's Republic of
Korea, Republic of
Kuwait
Kyrgyzstan
Lao People's Democratic Republic
Latvia
Lebanon
Lesotho
Liberia
Libyan Arab Jamahiriya
Liechtenstein
Lithuania
Luxembourg
Macao
Macedonia, the former Yugoslav Republic of
Madagascar
Malawi
Malaysia
Maldives
Mali
Malta
Marshall Islands
Martinique
Mauritania
Mauritius
Mayotte
Mexico
Micronesia, Federated States of
Moldova, Republic of
Monaco
Mongolia
Montenegro
Montserrat
Morocco
Mozambique
Myanmar
Namibia
Nauru
Nepal
Netherlands
Netherlands Antilles
New Caledonia
New Zealand
Nicaragua
Niger
Nigeria
Niue
Norfolk Island
Northern Mariana Islands
Norway
Oman
Pakistan
Palau
Palestinian Territory, Occupied
Panama
Papua New Guinea
Paraguay
Peru
Philippines
Pitcairn
Poland
Portugal
Puerto Rico
Qatar
Réunion
Romania
Russian Federation
Rwanda
Saint Barthélemy
Saint Helena, Ascension and Tristan da Cunha
Saint Kitts and Nevis
Saint Lucia
Saint Martin (French part)
Saint Pierre and Miquelon
Saint Vincent and the Grenadines
Samoa
San Marino
Sao Tome and Principe
Saudi Arabia
Senegal
Serbia
Seychelles
Sierra Leone
Singapore
Slovakia
Slovenia
Solomon Islands
Somalia
South Africa
South Georgia and the South Sandwich Islands
Spain
Sri Lanka
Sudan
Suriname
Svalbard and Jan Mayen
Swaziland
Sweden
Switzerland
Syrian Arab Republic
Taiwan, Province of China
Tajikistan
Tanzania, United Republic of
Thailand
Timor-Leste
Togo
Tokelau
Tonga
Trinidad and Tobago
Tunisia
Turkey
Turkmenistan
Turks and Caicos Islands
Tuvalu
Uganda
Ukraine
United Arab Emirates
United Kingdom
United States
United States Minor Outlying Islands
Uruguay
Uzbekistan
Vanuatu
Venezuela, Bolivarian Republic of
Viet Nam
Virgin Islands, British
Virgin Islands, U.S.
Wallis and Futuna
Western Sahara
Yemen
Zambia
Zimbabwe
Subscribe to
Latest news and announcements
Product offers and discounts
Back
Next step
Postal code
Credit card number
CSV
Back
Next step
We're almost done
Finish


Match Play. Red leads 4-1 to 5 (Crawford). How should Red play 21?
pips Red=117 White=103
(CorrectAnswer= 0/0, ErrorScore= 0)
At this score gammon prevention outweighs board purity and also Red does not have the timing to play a 3pt anchor game. Therefore, making White’s 5-pt takes priority.
There is no significant difference between 22/10, 11/10 and 22/20, 6/5.
There is no significant difference between 22/10, 11/10 and 22/20, 6/5.
1. Cubeful 2-ply 22/20 5/4 Eq.: -0.529 0.260 0.015 0.000 - 0.740 0.047 0.001 2. Cubeful 2-ply 22/20 11/10 Eq.: -0.529 (-0.000) 0.260 0.015 0.000 - 0.740 0.047 0.001 3. Cubeful 2-ply 22/20 6/5 Eq.: -0.535 (-0.005) 0.258 0.015 0.000 - 0.742 0.049 0.001 4. Cubeful 2-ply 22/20 3/2 Eq.: -0.544 (-0.015) 0.254 0.014 0.000 - 0.746 0.051 0.001 5. Cubeful 2-ply 22/20 4/3 Eq.: -0.561 (-0.032) 0.245 0.013 0.000 - 0.755 0.050 0.001


Current Projects
-
HiParTI: Application-Algorithm-Architecture Co-Design for Large-Scale, Sparse Tensor/Matrix Methods
PI: Jiajia Li; Team: Ang Li, Ajay Panyala
DOE PNNL LDRD project -
Optimizing and Benchmarking Sparse Tensor and Matrix Methods on New Architectures
PI: Kevin Barker; Key staff: Jiajia Li, et al.
DOE PNNL CENATE project -
Optimizing Sparse Tensor Operations for Quantum Chemistry
PI: Thom Dunning Jr; Task Lead: Sriram Krishnamoorthy; Key staff: Jiajia Li, et al.
DOE ECP NWChemEx project -
Sparse Tensor Collection
Collect sparse tensors from real-world applications and analyze the sparse tensor behavior, collaborating with Shaden Smith el al. in FROSTT project.


When your gradle execution failed (e.g. you executed "unknown-task" ) the build failed dialog will apear:
If your build script has compile or evaluation failures and output validation is enabled, another dialog will appear and errors are shown.
If there are more than one existing launch configuration for the project, the configuration can be chosen.
When you have already a configuration created you can simple do a right click to the project and use "Run as ... EGradle" and the launch starts. If you have multiple launch configurations done for this project, a selection dialog will appear:
Your are able to configure
You could this do also with raw settings, but it's more comfortable and you are able to use eclipse variables:
The console output is shown as usual but special keywords are syntax highlighted:
When you just want to execute some simple tasks which need no special
configurations you can press
CTRL+SHIFT+ALT+END
and a small dialog appears where you can type your wanted tasks and
press
ENTER
to execute. The dialog contains a history about your last (max 20)
entered commands and you can select previous commands by cursor keys
or select by combobox list. The last entered command is always
automatically selected when dialog appears. The history is not
persisted and always cleared when you restart your eclipse.
You got no possibility to setup parameters, system
properties or environment entries, but your able to execute some
standard calls - e.g. "tasks" or "--version". (Remark: Before
EGradle 2.0
was used as shortcut, but was replaced in 2.0 because of handling
problems with US keyboard layout)
CTRL+SHIFT+#
Instead of using the keyboard shortcut you can also press the corresponding toolbar button to open the dialog:
The output is done in EGradle System Console, which will automatically
show up when
ENTER
key was pressed and execution starts


Competitive Programming, (known as CP in short) is a mind sport where everyone showcases their skills of solving a problem under various constraints. It enhances the approach for solving a problem. It helps us to think analytically and solve a problem by analysing its space and time complexity. Moreover, it is a deciding factor for landing up in many big companies like Google, Facebook. Microsoft, Amazon as they check the problem-solving skills of an individual. So, playing this sport is an essential part of a wannabe software developer.
Key Things Required in Competitive Programming:
1. Choosing a comfortable programming language and learning its syntax. It can be any C, C++, Java, Python or any other programming language. Beginners may use Python. But, C, C++ and Java are the fastest programming languages and are also allowed for coding challenges and interviews.
2. Learning the Fundamentals of Data Structures and algorithms and also the concept of Space and Time Complexity. There can be many solutions for a single problem, but the best solution is the one which takes minimum time and space to get the output.
DSA, being the heart of Competitive Programming, cannot be ignored. Various topics like Arrays, Linked Lists, Stacks, Queues, Trees, Graphs, Sorting, Searching, Recursion, Dynamic Programming, along with different types of algorithms, should be known. Knowing to use them at the correct position gives us the optimal solution.
3. Regular Participation in contests is Necessary. There are several platforms where regular contests are held like Codechef, Codeforces, Hackerrank, HackerEarth, Leetcode, Spoj, Encoder etc. Participation is Necessary as it will give the knowledge of different new topics and also the experience of a fight with different programmers of the world. One thing to remember is that rating is just a number, and it may decrease at first, but constant practise and motivation will make the person more reliable and better.
4. Being Patient for Gradual Improvement in Solving Problems is the key. There r many who were stuck on one problem for more than a day, and they left CP in a week. Impatience because of not getting the "Correct Answer" mark is the primary factor why people leave Competitive Programming.
Conclusion
Once you Start Programming, you develop the "Art of Thinking" by breaking your code into smaller chunks and then using your logic-based creativity to solve a problem from different angles. It needs a lot of patience, and so not giving up or not getting discouraged on getting wrong answers in the key to success. Try it for days, weeks, months but do not give up. One should read the solution only when he/she is sure that they have made enough attempts and now can't do anything for the problem.
And lastly, IMPROVEMENT WON'T COME IN A SINGLE DAY, BUT ONLY IF PRACTISED DAILY CONSISTENTLY.
Source/reference(if any):internet


ANNA AND THE KING (20th Century Fox) Starring: Jodie Foster, Chow Yun-Fat, Bai Ling, Tom Felton, Syed Alwi, Randall Duk Kim, Keith Chin. Screenplay: Steve Meerson & Peter Krikes, based on the diaries of Anna Leonowens. Producers: Lawrence Bender and Ed Elbert. Director: Andy Tennant. MPAA Rating: PG-13 (violence) Running Time: 145 minutes. Reviewed by Scott Renshaw.
For more than forty years -- certainly since the 1956 film version of THE KING AND I -- Yul Brynner has been the King of Siam, and the King of Siam has been Yul Brynner. Actors often define roles, and roles often define actors (the latter much to the actors' chagrin), but rarely as a role/actor identification been so strong, and so reciprocal. A Yul Brynner impression without the words "puzzlement" or "et cetera" just isn't a Yul Brynner impression; a King of Siam without a bald dome just isn't the King of Siam.
ANNA AND THE KING may not be Rodgers and Hammerstein, but Chow Yun-Fat still faced a vexing challenge: re-defining a part so distinctly connected to one man. It is the authoritative grace with which Chow pulls off that feat that makes ANNA AND THE KING such an unexpected pleasure. The familiar story is based on the diaries of Anna Leonowens (Jodie Foster), a Victorian era Englishwoman who accepts a unique employment opportunity. A widow with a 10-year-old son (Tom Felton), Anna travels to Siam to serve as tutor for the children of King Mongkut (Chow Yun-Fat), the country's revered monarch. Though Anna bristles at some of Mongkut's customs, she grows eventually to respect his commitment to progress and learning. But the meeting of East and West becomes political as well as personal, as Siam faces threats from the Eurpoean-colonized nations surrounding it.
Since the story is ultimately an epic romance, nothing is more important to ANNA AND THE KING's success than the connection between its principal characters. Foster, not surprisingly, is quite good as Anna, striking an effective balance between her edgy independence and prolonged mourning over her husband. Her tough-love teacher routine with Mongkut's eldest son Chulalongkorn (Keith Chin) is a bit overly familiar, but she comes thoroughly to life when she's on screen with the King. Chow then proceeds to do everything one could possibly ask of an actor. When necessary, he is convincingly aloof and regal, looking and behaving every bit the stern ruler. He also shows a wonderfully light touch, lending a devilish smile to his jabs at Anna's strong will. Even the more overtly emotional scenes -- clearly meant to pound home the heaviness of the head that wears the crown -- are nicely under-played. Those familiar with Chow primarily as an action star should take note: his versatility keeps the romantic angle in ANNA AND THE KING fresh and convincing.
He's not quite so lucky with the political angle. Much of the film's second half is dedicated to an attempted overthrow of Mongkut by unknown forces, leading to battle scenes and narrow escapes. The double-dealings are pretty conventional stuff, leading to an exploding bridge climax that feels like it belongs in an entirely different film (one directed by Jan De Bont, perhaps). In fact, ANNA AND THE KING stumbles whenever director Andy Tennant draws too much attention either to finger-wagging at cultural imperialism (a blowsy British merchant insulting Mongkut at a dinner party) or to his own direction (an operatically staged beheading). Even in a film that runs two and a half hours, there's just not enough time to spend away from its complicated central relationship.
Fortunately, ANNA AND THE KING is ultimately redeemed by its splendor. No, not the splendor of Luciana Arrighi's production design or Caleb Deschanel's cinematography, though both pieces of work are exceptional. It's the splendor of Chow Yun-Fat that carries ANNA AND THE KING through its occasional stretches of anachronistic anti-colonial posturing and trite palace intrigue. Creating the image of a king is a difficult enough task; re-creating a king who is already an icon would seem to be thankless. Chow is nothing less than a presence that takes over ANNA AND THE KING -- with his humor, his poise, his majesty ... et cetera, et cetera, et cetera.
On the Renshaw scale of 0 to 10 yes, Siams: 7.
Visit Scott Renshaw's Screening Room http://www.inconnect.com/~renshaw/ *** Subscribe to receive new reviews directly by email! See the Screening Room for details, or reply to this message with subject "Subscribe".
The review above was posted to the
rec.arts.movies.reviews newsgroup (de.rec.film.kritiken for German reviews).
The Internet Movie Database accepts no responsibility for the contents of the
review and has no editorial control. Unless stated otherwise, the copyright
belongs to the author.
Please direct comments/criticisms of the review to relevant newsgroups.
Broken URLs inthe reviews are the responsibility of the author.
The formatting of the review is likely to differ from the original due
to ASCII to HTML conversion.
Related links: index of all rec.arts.movies.reviews reviews


Union Island is located midway between Grenada and St. Vincent and is equidistant from Barbados, Trinidad and Martinique. It is the largest island in the southern Grenadines and the clear waters of the protected bay at Clifton Harbour is a popular anchorage.
Security
Three sailors returning to their boat late at night were attacked in May 2016 after leaving the Anchorage Yacht Club. Dinghy and outboard theft is increasing here. Be extra vigilant with securing your valuable items at all times.
Position 12° 35'30"N, 61° 24'25"W (entrance to Clifton Bay)
Customs and Immigration are based here and clearance can be carried out at Clifton Bay. Immigration is based at the airport and Customs has offices at both the ferry dock and the airport.
Berthing at the Anchorage YC or anchoring on the eastern side of the bay make the walk to the airport for clearing in a short one.
Last updated March 2016.
There are plenty of anchorages in the bay, as well as stern-to berths at the Anchorage yacht Club, the Bougainvilla dock and at several other small docks. Sail Grenadines may have a few moorings that should be reliable, but it is recommended not to use any others. There is now a great new dinghy dock just outside the elegant L'Aquarium restaurant in the Bougainvilla complex.
Note: The safety department at SVG Air strongly urges yachts to avoid the area within 2 miles of the airport's final approach area in Union Island. Parasailing activities south of the airport can cause difficulties to aircraft landing there.
Last updated May 2015.


| Package | Description |
|---|---|
| bayou.async |
Async programming model.
|
| bayou.form |
Html form handling.
|
| bayou.http |
Http server.
|
| bayou.tcp |
Non-blocking TCP server.
|
| bayou.util |
Miscellaneous types and utilities.
|
| bayou.websocket |
WebSocket server.
|
| Class and Description |
|---|
| End
A control exception for signaling that something has reached its end.
|
| Result
The result of an action,
which is either a success or a failure.
|
| Class and Description |
|---|
| OverLimitException
To indicate that a certain limit is exceeded.
|
| Class and Description |
|---|
| UserPass
Username and password.
|
| Class and Description |
|---|
| UserPass
Username and password.
|
| Class and Description |
|---|
| End
A control exception for signaling that something has reached its end.
|
| Result
The result of an action,
which is either a success or a failure.
|
| Var
A variable that can be read from and written to.
|
| Class and Description |
|---|
| End
A control exception for signaling that something has reached its end.
|


When: Every Thursday between 10am - 12pm (During the School Semester)
Where: The Welcome Centre, Indoor and Outdoor at Open House
Every Thursday between 10am and noon, Open House offers a free playgroup for babies, young children and their care givers. We have an indoor – outdoor facility with lots of toys and equipment that children love.
Most of all it’s a chance for mothers, fathers, grandparents, and other care gives to relax and have a friendly chat while their children play together.


Three Injured in Head-on Collision Near Orcutt
by Edhat StaffPhotos: SBCFD
By edhat staff
Three people suffered injuries following a head-on collision on Highway 101 near Orcutt early Wednesday morning.
At 5:44 a.m., Santa Barbara County firefighters responded to the scene in the southbound lanes near Clark Road with a CalStar helicopter and ground ambulance.
Upon arrival, fire crews discovered a head-on traffic collision between two vehicles with one landing on its side. There were no subjects trapped or needing extrication.
Three people were injured, one with minor injuries and two with moderate injuries that were transported to Marian Medical Center via ground ambulance.
California Highway Patrol is investigating the incident.


{{ partial "head.html" . }}
{{ partial "header.html" . }}
Uhm... WHAT?
Looks like you're lost. This page doesn't exist
{{ partial "footer.html" . }}