Configuring and Running an Experiment¶
Qiskit Chemistry supports two types of users:
- Chemistry practitioners, who are merely interested in executing Qiskit Chemistry as a tool to compute chemistry properties. These users may not be interested in extending Qiskit Chemistry with additional capabilities. In fact, they may not even be interested in learning the details of quantum computing, such as the notions of circuits, gates and qubits. What these users expect from quantum computing is the gains in performance and accuracy, and the reduction in computational complexity.
- Chemistry and quantum researchers, who are interested in extending Qiskit Chemistry with new computational chemistry software drivers, new operators for classical-to-quantum input translation, and/or new quantum algorithms for more efficient and accurate computations.
In this section, we cover the first class of users — the chemistry practitioners. Specifically, this section describes how Qiskit Chemistry can be accessed as a tool for quantum-based chemistry computations.
To see how you can extend Qiskit Chemistry with new components, please refer to Section “Contributing to Qiskit Chemistry”.
Execution Modes¶
Qiskit Chemistry has both Graphical User Interface (GUI) and command line tools, which may be used when solving chemistry problems. Both can load and run an input file specifying a molecule configuration and the quantum algorithm to be used for the computation, along with the algorithm configuration and various other options to customize the experiment. If you are new to Qiskit Chemistry, we highly recommend getting started with the GUI. Finally, Qiskit Chemistry can also be accessed programmatically by users interested in customizing the experiments beyond what the command line and GUI can offer.
GUI¶
The GUI provides an easy means to create an input file from scratch, or to load an existing input file, and then run that input file to experiment with a chemistry problem on a quantum machine. An input file is created, edited and saved with validation of parameter values.
During the
Qiskit Chemistry Code Installation via the pip install
command,
a script is created that allows you to start the GUI from the command line,
as follows:
qiskit_chemistry_ui
If you cloned Qiskit Chemistry directly from the
GitHub repository instead of using pip
install
, then the script above will not be present and the launching command should be instead:
python qiskit_chemistry_ui
This command must be launched from the root folder of the qiskit-chemistry
repository
clone.
When executing an Qiskit Chemistry problem using the GUI, the user can choose to specify a JavaScript Object Notation (JSON) output file name by selecting the Generate Algorithm Input checkbox. When this is done, Qiskit Chemistry will not attempt to bring the chemistry experiment to completion; rather, it will stop the execution of the experiment right after forming the input for the quantum algorithm, before invoking that algorithm, and will serialize the input to the quantum algorithm in a JSON Input File for Direct Algorithm Invocation.
Command Line¶
The Qiskit Chemistry pip Code Installation process will automatically install the following command-line tool:
qiskit_chemistry_cmd
If you cloned Qiskit Chemistry from its remote
GitHub repository
instead of using pip install
, then the command-line interface can be executed as follows:
python qiskit_chemistry_cmd
from the root folder of the qiskit-chemistry
repository clone.
Here is a summary of the command-line options:
usage: qiskit_chemistry_cmd [-h] [-o output | -jo json output] input
Quantum Chemistry Program.
positional arguments:
input Qiskit Chemistry input file
optional arguments:
-h, --help Show this help message and exit
-o output Output file name
-jo json output JSON output file name
As shown above, in addition to the mandatory input file name parameter, the user can specify an output file name where the output of the chemistry problem will be saved (otherwise it will just be printed on the command screen) or, alternatively, a JSON output file name. When the latter is specified, Qiskit Chemistry will not attempt to bring the chemistry experiment to completion; rather, it will stop its execution right after forming the input for the quantum algorithm specified in the input file, before invoking that algorithm, and will serialize the quantum-algorithm to a JSON Input File for Direct Algorithm Invocation.
Programmable Interface¶
Qiskit Chemistry also offers Application Programming Interfaces (APIs) to execute experiments programmatically. Numerous examples on how to do so can be found in the chemistry folder of the Qiskit Tutorials GitHub repository.
Programming an Experiment Step by Step¶
It is very well possible to program an experiment step by step by invoking all the necessary APIs one by one to construct the flow that executes a classical computation software with a given molecular configuration, extracts from that execution the molecular structural data necessary to form the input to one of the Aqua quantum algorithms, and finally invokes that algorithm to build, compile and execute a circuit modeling the experiment on top of a quantum machine. An example of this is available in the PySCF_end2end tutorial.
Declarative Programming Interface¶
It should be noted, however, that Qiskit Chemistry is
designed to be programmed in a declarative way as well. This was done in order
to simplify the programmatic access to Qiskit Chemistry,
minimizing the chances for configuration errors, and addressing the needs of users
who might be experts in chemistry but not interested in writing a lot of code or
learning new Application Programming Interfaces (APIs). Even though there is
nothing preventing a user from accessing the Qiskit Chemistry APIs and
programming an experiment step by step, Qiskit Chemistry lets you
build a Python dictionary from an Input File. This can be achieved via the
GUI
by loading (or creating from scratch) the input file representing the
configuration of the desired experiment, and by then selecting Export Dictionary
from the File menu. Assuming that the programmer assigns the
exported dictionary to variable qiskit_chemistry_dict
, then the
experiment can be executed with the following two lines of code:
solver = QiskitChemistry()
result = solver.run(qiskit_chemistry_dict)
Executing the Python dictionary extracted from the Input File
via a call to the run
method of an QiskitChemistry
solver
is essentially what the Command Line and GUI
do too in order to execute an experiment.
The advantage of this approach is that users can now programmatically customize the Python dictionary extracted from the GUI according to their needs. Since a Python dictionary can be updated programmatically, the programmable interface of Qiskit Chemistry makes it possible to carry out experiments that are more complicated than those that can be executed via the command line or the GUI.
The following example shows a simple programmatic use of two Python dictionaries extracted from the Qiskit Chemistry GUI in order to compute the ground-state molecular energy of a hydrogen molecule computed via the Quantum Phase Estimation (QPE) algorithm and compare that result against the reference value computed via the Exact Eigensolver classical algorithm. A comparison with the Hartree-Fock energy is also offered.
distance = 0.735
molecule = 'H .0 .0 0; H .0 .0 {}'.format(distance)
# Input dictionaries to configure Qiskit Chemistry using QPE and Exact Eigensolver
qiskit_chemistry_qpe_dict = {
'driver': {'name': 'PYSCF'},
'PYSCF': {
'atom': molecule,
'basis': 'sto3g'
},
'operator': {'name': 'hamiltonian', 'transformation': 'full', 'qubit_mapping': 'parity'},
'algorithm': {
'name': 'QPE',
'num_ancillae': 9,
'num_time_slices': 50,
'expansion_mode': 'suzuki',
'expansion_order': 2,
},
'initial_state': {'name': 'HartreeFock'},
'backend': {
'provider': 'qiskit.BasicAer',
'name': 'qasm_simulator',
'shots': 100,
}
}
qiskit_chemistry_ees_dict = {
'driver': {'name': 'PYSCF'},
'PYSCF': {'atom': molecule, 'basis': 'sto3g'},
'operator': {'name': 'hamiltonian', 'transformation': 'full', 'qubit_mapping': 'parity'},
'algorithm': {
'name': 'ExactEigensolver',
},
}
# Execute the experiments
result_qpe = QiskitChemistry().run(qiskit_chemistry_qpe_dict)
result_ees = QiskitChemistry().run(qiskit_chemistry_ees_dict)
# Extract the energy values
print('The ground-truth ground-state energy is {}.'.format(result_ees['energy']))
print('The ground-state energy as computed by QPE is {}.'.format(result_qpe['energy']))
print('The Hartree-Fock ground-state energy is {}.'.format(result_ees['hf_energy']))
More complex examples include plotting the dissociation curve or comparing results obtained via different algorithms.
Result Dictionary¶
As can be seen in the programmable-interface example above, the
QiskitChemistry
run
method returns a result dictionary.
The unit of measure for the energy values is
Hartree, while for the dipole-moment values it is atomic units (a.u.).
The dictionary contains the following fields of note:
energy
: the ground state energyenergies
: an array of energies comprising the ground-state molecular energy and any excited states if they were computednuclear_repulsion_energy
: the nuclear repulsion energyhf_energy
: the Hartree-Fock ground-state molecular energy as computed by the drivernuclear_dipole_moment
,electronic_dipole_moment
,dipole_moment
: nuclear, electronic, and combined dipole moments forx
,y
andz
total_dipole_moment
: total dipole momentalgorithm_retvals
: The result dictionary of the algorithm that produced the values in the experiment.
Input File¶
An input file is used to define a chemistry problem, and includes both chemistry and quantum configuration information. It contains at a minimum the definition of a molecule and its associated configuration, such as a basis set, in order to compute the electronic structure using one of the external ab-initio Drivers. Further configuration can also be supplied to explicitly control the processing and the quantum algorithm, used for the computation, instead of using defaulted values when none are supplied.
Several sample input files can be found in the chemistry folder of the Qiskit Tutorials GitHub repository.
An input file comprises the following main sections, although not all are mandatory:
name
¶
This is an optional free-format text section. Here you can name and describe the problem solved by the input file. For example:
&name
H2 molecule experiment
Ground state energy computed via Variational Quantum Eigensolver
&end
driver
¶
This is a mandatory section, which defines the molecule and associated configuration for the electronic-structure computation by the chosen driver via its external computational chemistry program. The exact form of the configuration depends on the specific driver being used since Qiskit Chemistry allows external drivers to be the system’s front-ends, without interposing any new programming language or API on top of existing drivers.
Here are a couple of examples.
Note that the driver
section names which specific chemistry driver will
be used, and a subsequent section in the input file, having the name of the driver, then
supplies the driver specific configuration. For example, if you
choose PSI4
as the driver, then a section called psi4
must
be defined, containing the molecular configuration written as a PSI4
input file. Users who have already collected input files for existing drivers
can simply paste those files’ contents into this section.
The following is an example showing how to use the PySCF driver
for the configuration of a Lithium Hydride (LiH) molecule. The
driver
section names PYSCF
as the driver and then a pyscf
section,
corresponding to the name of the chosen driver, must be provided in order to define,
at a minimum, the geometrical coordinates of the molecule’s atoms
and basis set (or sets) that will
be used by PySCF library to compute the
electronic structure.
&driver
name=PYSCF
&end
&pyscf
atom=Li 0.0 0.0 -0.8; H 0.0 0.0 0.8
unit=Angstrom
basis=sto3g
&end
Here is another example showing again how to configure the same LiH molecule as above,
this time using the PSI4 driver. Here, PSI4
is named as the driver to be used and the psi4
section contains the
molecule and basis set (or sets) directly in a form that PSI4 understands. The
language in which the molecular configuration is input is
the input-file language for PSI4, and thus should be familiar to
existing users of PSI4, who may have already collected such an input file
from previous experiments and whose only job at this point would be to copy and paste
its contents into the psi4
section of the input file.
&psi4
molecule LiH {
0 1
Li 0.0 0.0 -0.8
H 0.0 0.0 0.8
}
set {
basis sto-3g
scf_type pk
}
&end
The Qiskit Chemistry documentation on Drivers explains how to install and configure the drivers currently interfaced by Qiskit Chemistry.
As shown above, Qiskit Chemistry allows input files from the classical driver libraries to be used directly, without any modification and without interposing any new programming language or API. This has a clear advantage, not only in terms of usability, but also in terms of functionality, because any capability of any chemistry library chosen by the user is automatically integrated into Qiskit Chemistry, which would not have been possible if a new language or API had been interposed between the library and the user.
operator
¶
This is an optional section. This section can be configured to control the operator that converts the electronic structure information, obtained from the driver, to qubit-operator form, in order to be processed by the algorithm. The following parameters may be set:
The name of the operator:
name = hamiltonian
This parameter accepts a
str
value. However, currently,hamiltonian
is the only value allowed forname
since there is only one operator entity at present. The translation layer of Qiskit Chemistry is extensible and new translation operators can be plugged in. Therefore, in the future, more operators may be supported.The transformation type of the operator:
transformation = full | particle_hole
The
transformation
parameter takes astr
value. The only two allowed values, currently, arefull
andparticle_hole
, withfull
, the default one, corresponding to the standard second quantized hamiltonian. Setting thetransformation
parameter toparticle_hole
yields a transformation of the electronic structure Hamiltonian in the second quantization framework into the particle-hole picture, which offers a better starting point for the expansion of the trial wave function from the Hartree Fock reference state. For trial wave functions in Aqua, such as Unitary Coupled Cluster Singles and Doubles (UCCSD), the p/h Hamiltonian can improve the speed of convergence of the Variational Quantum Eigensolver (VQE) algorithm in the calculation of the electronic ground state properties. More information on the particle-hole formalism can be found in arXiv:1805.04340.Note
For the reasons mentioned above, when the transformation type is set to be particle hole, then the configuration of the initial qubit state offsetting the computation of the final result should be set to be the Hartree-Fock energy of the molecule. This can be done by setting the
name
parameter in theinitial_state
section toHartree-Fock
, as explained in the documentation on Initial States.The desired Translators from fermions to qubits:
qubit_mapping = jordan_wigner | parity | bravyi_kitaev
This parameter takes a value of type
str
. Currently, only the three values above are supported, but new qubit mappings can easily be plugged in. Specifically:jordan_wigner
corresponds to the Jordan-Wigner transformation.parity
, the default value for thequbit_mapping
parameter, corresponds to the Parity mapping transformation. When this mapping is selected, it is possible to reduce by 2 the number of qubits required by the computation without loss of precision by setting thetwo_qubit_reduction
parameter toTrue
, as explained next.bravyi_kitaev
corresponds to the Bravyi-Kitaev transformation, also known as binary-tree-based qubit mapping.
A Boolean flag specifying whether or not to apply the precision-preserving two-qubit reduction optimization:
two_qubit_reduction : bool
The default value for this parameter is
True
. When the parity mapping is selected, andtwo_qubit_reduction
is set toTrue
, then the operator can be reduced by two qubits without loss of precision.Warning
If the mapping from fermionic to qubit is set to something other than the parity mapping, the value assigned to
two_qubit_reduction
is ignored.The maximum number of workers used when forming the input to the Aqua quantum algorithm:
max_workers = 1 | 2 | ...
Processing of the hamiltonian from fermionic to qubit can take advantage of multiple CPU cores to run parallel processes to carry out the transformation. The number of such worker processes used will not exceed the actual number of CPU cores or this
max_workers
positive integer, whichever is the smaller. The default value formax_worker
is4
.A Boolean value indicating whether or not to freeze the core orbitals in the computation:
freeze_core : bool
To reduce the number of qubits required to compute the molecular energy values, and improve computation efficiency, frozen core orbitals corresponding to the nearest noble gas can be removed from the subsequent computation performed by the Aqua algorithm, and a corresponding offset from this removal is added back into the final computed result. This approximation may be combined with
orbital_reduction
setting below. The default value for this parameter isFalse
.A list of molecular orbitals to remove from the computation:
orbital_reduction : [int, int, ... , int]
The orbitals from the electronic structure can be simplified for the subsequent computation through the use of this parameter, which allows the user to specify a set of orbitals to be removed from the computation as a list of
int
values, the default being an empty list. Each value in the list corresponds to an orbital to be removed from the subsequent computation. The list should be indices of the orbitals from0
ton - 1
, where the electronic structure hasn
orbitals.For ease of referring to the higher orbitals, the list also supports negative values with
-1
being the highest unoccupied orbital,-2
the next one down, and so on. Also note that, while orbitals may be listed to reduce the overall size of the problem, the final computation can be less accurate as a result of using this approximation.The following should be taken into account when assigning a value to the
orbital_reduction
parameter:- Any orbitals in the list that are occupied orbitals are frozen and an offset
is computed from their removal. These orbitals are not taken into account while performing the
molecular energy computation, except for the fact that the offset is added back at the end
into the final computed result.
This is the same procedure as that one that takes place
when
freeze_core
is set toTrue
, except that withorbital_reduction
you can specify exactly the orbitals you want to freeze. - Any orbitals in the list that are unoccupied orbitals are simply eliminated entirely from the subsequent computation. No offset is computed or added back into the final computed result for these orbitals.
- Any orbitals in the list that are occupied orbitals are frozen and an offset
is computed from their removal. These orbitals are not taken into account while performing the
molecular energy computation, except for the fact that the offset is added back at the end
into the final computed result.
This is the same procedure as that one that takes place
when
Note
When a list is specified along with freeze_core
set to True
, the effective
orbitals being removed from the computation are those in the frozen core combined with
those specified in the orbital_reduction
list.
Below is an example where, in addition to freezing the core orbitals, a couple of other orbitals are listed for removal. We assume that there are a total of ten orbitals, so the highest two unoccupied virtual orbitals will be eliminated from the subsequent computation, in addition to the frozen-core orbitals:
&operator
name=hamiltonian
qubit_mapping=jordan_wigner
freeze_core=True
orbital_reduction=[8, 9]
&end
Alternatively, the above code could be specified via the following, equivalent way, which simplifies expressing the higher orbitals using the fact that the numbering is relative to the highest orbital:
&operator
name=hamiltonian
qubit_mapping=jordan_wigner
freeze_core=True
orbital_reduction=[-2, -1]
&end
algorithm
¶
This is an optional section that allows you to specify which
algorithm will be used by the computation.
Quantum Algorithms are provided by
Aqua: A Library of Quantum Algorithms.
To compute reference values, Aqua also allows the use of
Classical Reference Algorithms.
In the algorithm
section, algorithms are disambiguated using the
declarative names
by which Aqua recognizes them, based on the JSON schema
each algorithm must provide according to the Aqua QuantumAlgorithm
API,
as explained in the documentation on both
quantum and classical reference algorithms.
The declarative name is specified as the name
parameter in the algorithm
section.
The default value for the name
parameter is VQE
, corresponding
to the Variational Quantum Eigensolver (VQE)
algorithm.
An algorithm typically comes with a set of configuration parameters.
For each of them, a default value is provided according to the
QuantumAlgorithm
API of Aqua.
Furthermore, according to each algorithm, additional sections may become relevant to optionally configure that algorithm’s components. For example, variational algorithms, such as Variational Quantum Eigensolver (VQE), allow the user to choose and configure an optimizer and a variational form from the Optimizers and Variational Forms libraries, respectively, whereas Quantum Phase Estimation (QPE) allows the user to configure which Inverse Quantum Fourier Transform (IQFT) from the Quantum Fourier Transforms library to use.
The documentation of Aqua: A Library of Quantum Algorithms explains how to configure Quantum Algorithms and any of the pluggable entities they may use, such as Optimizers, Variational Forms, Oracles, Quantum Fourier Transforms, and Initial States.
Here is an example in which the Variational Quantum Eigensolver (VQE) algorithm is selected along with the Limited-memory Broyden-Fletcher-Goldfarb-Shanno Bound (L-BFGS-B) optimizer and the RyRz variational form:
&algorithm
name=VQE
shots=1
operator_mode=matrix
&end
&optimizer
name=L_BFGS_B
factr=10
&end
&variational_form
name=RYRZ
entangler_map={0: [1]}
&end
backend
¶
Aqua allows for configuring the backend, which is the quantum machine
on which a quantum experiment will be run.
This configuration requires specifying
the Qiskit Terra quantum computational
provider and backend to be used for computation, which is done by assigning a str
value to
the "provider"
and "name"
parameters of the "backend"
section:
"provider" : string
"name" : string
The value of the "provider"
parameter indicates the full name of a class derived from
"BaseProvider"
or global variable pointing to a instance of this class.
The value of the "name"
parameter indicates either a real-hardware
quantum computer or a quantum simulator accessed from the provider.
Terra comes with two predefined providers: "qiskit.BasicAer"
and "qiskit.IBMQ"
.
By installing "qiskit-aer"
, the "qiskit.Aer"
provider gets included too.
Each provider has its own set of simulators and "qiskit.IBMQ"
gives access to real-hardware
quantum computer or simulators in the cloud.
For the "qiskit.IBMQ"
provider, you need to configure it with a token and possibly url proxies.
The Chemistry GUI greatly simplifies it via a user friendly interface,
accessible through the Preferences… menu item.
Otherwise you need to configure programmatically using Qiskit Terra <https://www.qiskit.org/terra>`
apis.
Backend Configuration — Quantum vs. Classical Algorithms:
Although Aqua is mostly a library of Quantum Algorithms,
it also includes a number of Classical Reference Algorithms,
which can be selected to generate reference values
and compare and contrast results in quantum research experimentation.
Since a classical algorithm runs on a classical computer,
no backend should be configured when a classical algorithm
is selected in the algorithm
section.
Accordingly, the Qiskit Chemistry GUI will automatically
disable the backend
configuration section
whenever a non-quantum algorithm is selected.
Configuring the backend to use by an algorithm in the Quantum Algorithms library requires setting the following parameters too:
The number of repetitions of each circuit to be used for sampling:
shots : int
This parameter applies, in particular to the local QASM simulator and any real quantum device. The default value is
1024
.A
bool
value indicating whether or not the circuit should undergo optimization:skip_transpiler : bool
The default value is
False
. Ifskip_transpiler
is set toTrue
, then Qiskit will not perform circuit translation. If Qiskit Chemistry has been configured to run an experiment with a quantum algorithm that uses only basis gates, then no translation of the circuit into basis gates is required. Only in such cases is it safe to skip circuit translation. Skipping the translation phase when only basis gates are used may improve overall performance, especially when many circuits are used repeatedly, as it is the case with the Variational Quantum Eigensolver (VQE) algorithm.Note
Use caution when setting
skip_transpiler
toTrue
as if the quantum algorithm does not restrict itself to the set of basis gates supported by the backend, then the circuit will fail to run.An optional dictionary can be supplied to control the backend’s noise model (see the Terra documentation on noise parameters for more details):
noise_params : dictionary
This is a Python dictionary consisting of key/value pairs. Configuring it is optional; the default value is
None
.The following is an example of such a dictionary that can be used:
noise_params: {"U": {"p_depol": 0.001, "p_pauli": [0, 0, 0.01], "gate_time": 1, "U_error": [ [[1, 0], [0, 0]] ] } }
problem
¶
In Aqua, a problem specifies the type of experiment being run. Configuring the problem is essential because it determines which algorithms are suitable for the specific experiment.
Problem Categories¶
Aqua comes with a set of predefined problems.
This set is extensible: new problems can be added,
just like new algorithms can be plugged in to solve existing problems in a different way,
or to solve new problems.
Currently, a problem can be configured by assigning a str
value to the name
parameter
of the problem
section of the input file:
name = energy | excited_states | ising | dynamics | search | svm_classification
As shown above, energy
, excited_states
, ising
, dynamics
,
search
, and svm_classification
are currently
the only values accepted for name
in Aqua, corresponding to the computation of
energy, excited states, Ising models, dynamics of evolution, search and
Support Vector Machine (SVM) classification, respectively.
New problems, disambiguated by their
name
parameter, can be programmatically
added to Aqua via the
AlgorithmInput
Application Programming Interface (API), and
both Quantum Algorithms and classical reference algorithms library
should programmatically list the problems it is suitable for in its JSON schema, embedded into
the class implementing the QuantumAlgorithm
API. Typical choices of problems
in chemistry include energy and excited states.
Generating Repeatable Experiments¶
Aspects of the computation may include use of random numbers. For instance, Variational Quantum Eigensolver (VQE) is coded to use a random initial point if the variational form chosen from the Variational Forms library does not supply any preference based on the initial state and if the user does not explicitly supply an initial point. In this case, each run of VQE, for what would otherwise be a constant problem, can produce a different result, causing non-determinism and the inability to replicate the same result across different runs with identical configurations. Even though the final value might be numerically indistinguishable, the number of evaluations that led to the computation of that value may differ across runs. To enable repeatable experiments, with the exact same outcome, a random seed can be set, thereby forcing the same pseudo-random numbers to be generated every time the experiment is run:
random_seed : int
The default value for this parameter is None
.
Reconciling Chemistry and Quantum Configuration¶
The configuration of a chemistry problem directly affects the configuration
of the underlying quantum system. For example, the number of particles and
orbitals in a molecular system depends on the molecule being modeled and the
basis set chosen by the user, and that, in turn, directly affects the number of qubits
necessary to model the molecular system on a quantum machine. The number of
qubits directly derived from the molecular configuration can then be reduced
as indicated in the operator
section of the input file
via optimizations, such as the precision-preserving
two-qubit reduction based on the parity qubit mapping, or via approximations, obtained
by freezing the core or by virtually removing unoccupied orbitals. This is just an example
of how the chemistry
configuration can affect the quantum configuration. Letting the user set
the number of qubits would force the user to have to know the numbers of particles
and orbitals of the molecular system, and then precompute the number of
qubits based on the numbers of particles and
orbitals, as well as the qubit-reduction optimization
and approximation techniques. Any mistake in this manual computation
may lead to misconfiguring the whole experiment. For this reason,
Qiskit Chemistry automatically computes the numbers of particles and orbitals,
infers the total number of qubits necessary to model the molecular system under analysis,
and subtracts from that total number of qubits the number of qubits that are
redundant based on the optimization and approximation techniques that the user
may have chosen to apply. In essence, Qiskit Chemistry automatically
configures the quantum system.
Things become more subtle when configuring the
Initial States and Variational Forms
used by a quantum algorithm. These components are
configured in sections initial_state
and variational_form
, respectively,
which only become enabled when the algorithm
selected by the user supports them.
For example, the variational_form
section is enabled only
if the user has chosen to execute the experiment using a variational algorithm, such as
vqe.
The Qiskit Chemistry :ref:`qiskit-chemistry-gui disables the variational_form
section for non-variational algorithms.
The problem with the configuration of an initial state and a variational form is that
the values of parameters qubit_mapping
and two_qubit_reduction
may require matching
their settings across these two sections, as well as the settings applied to the
identically named parameters in the operator
section. This is the case, for example, for the Unitary Coupled Cluster Singles and Doubles (UCCSD) variational form
and the Hartree-Fock
initial state. Furthermore, some variational forms and initial states may require setting
the numbers of particles (num_particles
) and orbitals (num_orbitals
), which,
as discussed above, can be complicated to compute, especially for large and complex molecules.
Qiskit Chemistry inherits the problem configuration from Aqua.
However, exclusive to Qiskit Chemistry
is a Boolean field inside the problem
section which assists users with these
complicated settings:
auto_substitutions : bool
When this parameter is set to True
, which is the default, the values of parameters
num_particles
and num_orbitals
are automatically computed by Qiskit Chemistry
for sections initial_state
and
variational_form
when UCCSD
and Hartree-Fock
are selected, respectively. As such,
the configuration of these two parameters is disabled; the user will not be required, or even
allowed, to assign values to
these two parameters. This is also reflected in the GUI, where
these two parameters will be grayed out and uneditable when auto_substitutions
is set to
True
. Furthermore, Qiskit Chemistry automatically sets
parameters qubit_mapping
and two_qubit_reduction
in sections initial_state
and
variational_form
when UCCSD
and Hartree-Fock
are selected, respectively.
Specifically, Qiskit Chemistry sets qubit_mapping
and two_qubit_reduction
to the values the user assigned to them in the operator
section
of the input file in order to enforce parameter-value matching across these three different
sections. As a result, the user will only have to configure qubit_mapping
and two_qubit_reduction
in the operator
section; the configuration of these two
parameters in sections initial_state
and variational_form
is disabled,
as reflected also in the GUI, where the values of these two parameters are
only editable in the operator
section, while the parameters themselves are grayed out in the
initial_state
and variational_form
sections.
On the other hand, if auto_substitutions
is set to False
,
then the end user has the full responsibility for the entire
configuration.
Warning
Setting auto_substitutions
to False
, while
made possible for experimental purposes, should only
be done with extreme care, since it could easily lead to misconfiguring
the entire experiment and producing imprecise results.
Input File for Direct Algorithm Invocation¶
Aqua allows for its Quantum Algorithms and Classical Reference Algorithms, to be invoked directly, without necessarily having to go through the execution of a domain-specific application. Aqua Chemistry supports accessing the Aqua algorithm-level entry point in the following way: after the translation process terminates with the creation of the input to a quantum algorithm, in the form of a qubit operator, Qiskit Chemistry allows for that input to be serialized as a JavaScript Object Notation (JSON) file.
Serializing the input to the quantum algorithm at this point is useful in many scenarios because the contents of one of such JSON files are domain- and problem-independent:
- Users can share JSON files among each other in order to compare and contrast their experimental results at the algorithm level, for example to compare results obtained with the same input and different algorithms, or different implementations of the same algorithm, regardless of the domain in which those inputs were generated (chemistry, artificial intelligence, optimization, etc.) or the problem that the user was trying to solve.
- People performing research on quantum algorithms may be interested in having access to a number of such JSON files in order to test and refine their algorithm implementations, irrespective of the domain in which those JSON files were generated or the problem that the user was trying to solve.
- Repeating an experiment in which the domain-specific parameters remain the same, and the only difference is in the configuration of the quantum algorithm and its supporting components becomes much more efficient because the user can choose to restart any new experiment directly at the algorithm level, thereby bypassing the input extraction from the driver, and the input translation into a qubit operator.


Specialising in senior and special needs poochies
Service includes a bath with gentle shampoo. After drying your poochie gets a thorough brushing and combing to remove excess fur and minor mat removal if needed. Nails are trimmed and ears are cleaned. Any long hair on the feet, eye area, sanitaries, or ear openings is trimmed. A light all over trim can be added to this service for breeds like Golden Retrievers, Shelties, Australian Shepherds, and Pomeranians. We finish up with a scented cologne and bandana or bow. Anal glands can be externally expressed by request only.
Service includes everything in a Bath, Brush, Nail service with the addition of a nose to tail hair cut customized for your poochies needs and your style preference. While we are skilled in mat removal we will take the dogs comfort into account. We prefer to put humanity over vanity. If you desire a long, fluffy look we recommend frequent visits, coat type can vary this as some dogs need every other week brushing visits while others can go 6 weeks. Mat removal is an additional charge based on time.
We have experience working with seniors who may have the onset of doggy dementia, loss of hearing or sight, or pets that have difficulty standing and require two people to make the groom more comfortable. These precious poochies will be worked straight through and made comfortable throughout their visit.
When we talk about these we are referring to dogs that may have sound sensitivity, say other dogs barking make them nervous, or they are timid rescue dogs. We have experience working with rescue dogs, dogs with disabilities like paralysis or seizures, For these dogs we set aside a more private time with less interruptions and noise. Tuesdays are THE BEST days for them, with Saturday being THE WORST.
What is a De-Shed or a Shed out treatment?
These are terms used by various dog groomers to describe the removal of excess undercoat in your double coated breeds like Golden Retrievers, Labrador Retrievers, German Shepherds, Huskies, and Corgis. This is a long and detailed process that here at Pristine Poochies is done in the tub with fingers, water, and conditioner.
There are many metal tools used to remove the undercoat but excessive use can irritate skin and damage the guard hair. We still use these tools in moderation once your poochie is dry. This is, unfortunately, not a one and done magical treatment. There will still be loose hair but the amount will be drastically reduced. Shedding dogs are recommended to come at least every 4 weeks to keep the shedding to a minimum. Your vacuum with thank you! This is not a requested service at Pristine Poochies, all double coated breeds receive this as we strive to only do the best work we can do.
Hand stripping is a technique used on wire haired terriers and can be done on terrier mixes. Prices depend on dog size and frequency of sessions. Hand stripping is a method that is supposed to be done frequently but for pets it is okay to go as long as two months between sessions.
Blueberry brightener*, Plum Perfect*, Oatmeal, Deodorizing, Hypoallergenic, Sugar Cookie*
*indicates matching cologne
The dye we use is vegan based and free of ammonia and peroxide. Color can last from 2-6 months and does not transfer under normal circumstances. Price is in addition to baths or grooming and starts at $25.


A simulator and calculator for oblique central impacts in a 2D plane. All aspects of the collision are adjustable via the table below, but velocities in particular may be changed by dragging the disks above.
Object 1Mass (kg):Entry Speed (m/s): Entry angle (degrees, above the horizontal): |
Object 2Mass (kg):Entry Speed (m/s): Entry angle (degrees, below the horizontal): |
ResultsObject 1Exit Speed (m/s): Exit angle (degrees, above the horizontal): Object 2 Exit Speed (m/s): Exit angle (degrees, below the horizontal): Total loss of Kinetic Energy (J): |
Coefficient of Restitution (e)Perfectly Inelastic |


July 30th, 2011
Dan Kaminsky embeds the first ASCII image on the Bitcoin blockchain in honor of the cryptographer Len Sassaman. (ASCII BERNANKE)
March 27th, 2012
Yoni Assia introduces the concept of using cryptocurrency to represent other assets with Colored Coins. It is the predecessor of non-fungible tokens
October 24th,2013
Kevin Mccoy (@mccoyspace) introduces the idea of embedding a contractual ownership token into a blockchain transaction in order to address the issue of a lack of an official method to authenticate ownership/transfer ownership for digital artworks.
February 20th,2014
Rob Myers minted his soul in 100 tokens on the Dogecoin blockchain, presenting one of the first examples of embedding art on a blockchain. However, MYSOUL tokens are not non-fungible due to there being more than one.
2014
Counterparty was founded in 2014 by Robert Dermody, Adam Krellenstein, and Evan Wagner. It is a peer-to-peer financial platform and a distributed, open-source Internet protocol built on the Bitcoin blockchain. It is also one of the first platforms on which NFTs could be minted.
2014
Kevin McCoy and Anil Dash created Monegraph, or Monetized Graphics with the intention of creating scarcity for digital artworks. Artists can sign in and submit a digital image that they've created. Monegraph then gives them a blockchain key and value that they can store on a Namecoin wallet, which serves as a unique claim of ownership to their art.
October 21nd, 2015
Etheria is the first NFT art project, involving a digital landscape and house. It is embedded into the Etherium blockchain.
April, 2015
Harm van den Dorpel claims to be the first artist to sell an NFT to an institution for Bitcoin. His artwork is called, "Pixel Sorters".
October, 2016
The first Rare Pepes were minted on Counterparty, marking the first time that a meme was minted as an NFT.
October 16th, 2016
Rare Skrilla (@SkrillaVentura) mints the first audio NFT under the name DJ Pepe as part of the Pepe meme movement.
June, 2017
CryptoPunks is one of the first NFTs on the Ethereum Blockchain. The original creators released 10,000 cryptopunks for free to anybody that claimed one. A secondary market for these NFTs has developed, some of which sell for millions of dollars.
December 28th, 2017
OpenSea is one of the first decentralized exchange and marketplace for digital collectibles. This includes art, trading cards, and domain names.
January 13th, 2018
The Rare Digital Art Festival is the first event exclusively for NFT art, sparking discussions on its implications for art. It signifies an important milestone for NFTs, as they gain influence in the traditional art world.
July 17th, 2018
Matt Condon (@mattgcondon) and Jonathan Mann(@songadaymann) start the first NFT podcast, Digitally Rare.
April 22th, 2018
Artist JOY (@JohnOrionYoung) mints the first 3D art NFT. He is also known for being the first crypto artist to create his own crypto contract as well as making music/video accompaniments to his NFT art.
September, 2018
Maecenas.io tokenizes an Andy Warhol painting, marking the first time an artwork from the traditional art market is made into an NFT and sold.
February 15th, 2020
Somnium Space is the first VR world NFT, allowing users to view their digital assets as if they were there physically.
December 18th, 2019
Skeenee.eth (@skeenee_art) is the first to buy real art, burn it, film the act, and mint the video as an NFT.
2020
Valuables by Cent is the first to sell tweets as NFTs, forming a marketplace exclusively for Twitter tweets. Notable tweets include Twitter CEO Jack Dorsey's first tweet ever, which sold for more than 2.9 million.
January 15-17th, 2021
Future Art is Australia's first crypto art event, a three day multisensory walk-through experience.
January 28th, 2021
HashMasks are the first dynamically nameable art NFTs. Several artists were involved in the project, and buyers were unaware of which Haskmask they were going to get.
March 5th, 2021
Kings of Leon released the first NFT album, "When You See Yourself", which was their eighth studio album.


|
DS3231 Real-Time-Clock, Temperature Sensor, and I2C (AT24C32) EEPROM Data Logger
A simple library to control a DS3231 and AT24C32 Module from an Arduino.
|
Simple DS3231 RTC and AT24C32 EEPROM Library. More...
#include <DS3231_Simple.h>
Classes | |
| struct | DateTime |
Public Member Functions | |
| void | begin () |
| Initialize. | |
| DateTime | read () |
| Read the current date and time, returning a structure containing that information. | |
| uint8_t | write (const DateTime &) |
| Set the date and time from the settings in the given structure. More... | |
| void | promptForTimeAndDate (Stream &Serial) |
| uint8_t | setAlarm (const DateTime &AlarmTime, uint8_t AlarmMode) |
| Sets an alarm, the alarm will pull the SQW pin low (you can monitor with an interrupt). More... | |
| uint8_t | setAlarm (uint8_t AlarmMode) |
| Set an alarm using the current date/time as it's basis. More... | |
| uint8_t | disableAlarms () |
| Disable any existing alarm settings. More... | |
| uint8_t | checkAlarms (uint8_t PauseClock=false) |
| Determine if an alarm has triggered, also clears the alarm if so. More... | |
| uint8_t | getTemperature () |
| Get the temperature accurate to within 1 degree (C) More... | |
| float | getTemperatureFloat () |
| Get the temprature accurate to within 0.25 degrees (C) More... | |
| void | printTo (Stream &Printer) |
| Print the current DateTime structure in ISO8601 Format. More... | |
| void | printTo (Stream &Printer, const DateTime &Timestamp) |
| Print the given DateTime structure in ISO8601 Format. More... | |
| void | printDateTo_DMY (Stream &Printer, const DateTime &Timestamp, const char separator= '/') |
| Print the date portion of the given DateTime structure in DD/MM/YYYY format. | |
| void | printDateTo_DMY (Stream &Printer) |
| Print the date portion of the current DateTime structure in DD/MM/YYYY format. | |
| void | printDateTo_MDY (Stream &Printer, const DateTime &Timestamp, const char separator= '/') |
| Print the date portion of the given DateTime structure in MM/DD/YYYY format. | |
| void | printDateTo_MDY (Stream &Printer) |
| Print the date portion of the current DateTime structure in MM/DD/YYYY format. | |
| void | printDateTo_YMD (Stream &Printer, const DateTime &Timestamp, const char separator= '-') |
| Print the date portion of the given DateTime structure in YYYY-MM-DD format. | |
| void | printDateTo_YMD (Stream &Printer) |
| Print the date portion of the current DateTime structure in YYYY-MM-DD format. | |
| void | printTimeTo_HMS (Stream &Printer, const DateTime &Timestamp, const char hoursToMinutesSeparator= ':', const char minutesToSecondsSeparator= ':') |
| Print the time portion of the given DateTime structure in HH:MM:SS format (24 Hour Clock) More... | |
| void | printTimeTo_HMS (Stream &Printer) |
| Print the time portion of the current DateTime structure in HH:MM:SS format (24 Hour Clock) More... | |
| void | printTimeTo_HM (Stream &Printer, const DateTime &Timestamp, const char hoursToMinutesSeparator= ':') |
| Print the time portion of the given DateTime structure in HH:MM format (24 Hour Clock) More... | |
| void | printTimeTo_HM (Stream &Printer) |
| Print the time portion of the current DateTime structure in HH:MM format (24 Hour Clock) More... | |
| void | print12HourTimeTo_HMS (Stream &Printer, const DateTime &Timestamp, const char hoursToMinutesSeparator= ':', const char minutesToSecondsSeparator= ':') |
| Print the time portion of the given DateTime structure in HH:MM:SS [AM/PM] format (12 Hour Clock) More... | |
| void | print12HourTimeTo_HMS (Stream &Printer) |
| Print the time portion of the current DateTime structure in HH:MM:SS [AM/PM] format (12 Hour Clock) More... | |
| void | print12HourTimeTo_HM (Stream &Printer, const DateTime &Timestamp, const char hoursToMinutesSeparator= ':') |
| Print the time portion of the given DateTime structure in HH:MM:SS [AM/PM] format (12 Hour Clock) More... | |
| void | print12HourTimeTo_HM (Stream &Printer) |
| Print the time portion of the current DateTime structure in HH:MM:SS [AM/PM] format (12 Hour Clock) More... | |
| uint8_t | formatEEPROM () |
| Erase the EEPROM ready for storing log entries. More... | |
| template<typename datatype > | |
| uint8_t | writeLog (const datatype &data) |
| Write a log entry to the EEPROM, having current timestamp, with an attached data of arbitrary datatype (7 bytes max). More... | |
| template<typename datatype > | |
| uint8_t | writeLog (const DateTime ×tamp, const datatype &data) |
| Write a log entry to the EEPROM, having supplied timestamp, with an attached data of arbitrary datatype (7 bytes max). More... | |
| uint8_t | writeLog (const DateTime ×tamp, const uint8_t *data, uint8_t size=1) |
| Write a log entry to the EEPROM, having supplied timestamp, with an attached data. More... | |
| template<typename datatype > | |
| uint8_t | readLog (DateTime ×tamp, datatype &data) |
| Read the oldest log entry and clear it from EEPROM. More... | |
| uint8_t | readLog (DateTime ×tamp, uint8_t *data, uint8_t size=1) |
| Read the oldest log entry and clear it from EEPROM. More... | |
| int8_t | compareTimestamps (const DateTime &A, const DateTime &B) |
| Compare two DateTime objects to determine which one is older. More... | |
Protected Member Functions | |
| uint16_t | findEEPROMWriteAddress () |
| Searches the EEPROM for the next place to store a block, sets eepromWriteAddress. More... | |
| uint8_t | makeEEPROMSpace (uint16_t Address, int8_t BytesRequired) |
| Delete enough complete blocks to have enough free space for the given required number of bytes. More... | |
| uint16_t | findEEPROMReadAddress () |
| Find the oldest block to read (based on timestamp date), set eepromReadAddress. More... | |
| uint16_t | readLogFrom (uint16_t Address, DateTime ×tamp, uint8_t *data, uint8_t size=0) |
| Read log timestamp and data from a given EEPROM address. More... | |
| uint8_t | writeBytePagewizeStart () |
| Start a "pagewize" write at the eepromWriteAddress. More... | |
| uint8_t | writeBytePagewize (const uint8_t data) |
| Write a byte during a pagewize operation. More... | |
| uint8_t | writeBytePagewizeEnd () |
| End a pagewize write operation. More... | |
| uint8_t | readEEPROMByte (const uint16_t Address) |
| Read a byte from the EEPROM. More... | |
Protected Attributes | |
| uint16_t | eepromWriteAddress = EEPROM_BYTES |
| uint16_t | eepromReadAddress = EEPROM_BYTES |
Simple DS3231 RTC and AT24C32 EEPROM Library.
Implements a simple interface to read/set the clock and alarms of an DS3231 Real Time Clock, and also to utilise an often-companion AT24C32 EEPROM as a data logging storage for generic timestamped data.
Copyright (C) 2016 James Sleeman
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.
| uint8_t DS3231_Simple::checkAlarms | ( | uint8_t | PauseClock = false | ) |
Determine if an alarm has triggered, also clears the alarm if so.
If you do not pause the clock then be aware that there is a small chance that you may miss an alarm between the very short time that the alarms are checked and then cleared (ie, if an alarm is checked and is 0, and before we clear it, the alarm is triggered, but then we go and clear it).
If you pause the clock, then this won't happen, but your time keeping will not be so accurate because every time you check the alarm you will "get behind" a small amount.
Compare two DateTime objects to determine which one is older.
If A is older than B return -1 If A is equal to B return 0 If A is newer than B return 1
| uint8_t DS3231_Simple::disableAlarms | ( | ) |
Disable any existing alarm settings.
|
protected |
Find the oldest block to read (based on timestamp date), set eepromReadAddress.
Note: Has to search entire EEPROM, slow.
|
protected |
Searches the EEPROM for the next place to store a block, sets eepromWriteAddress.
| uint8_t DS3231_Simple::formatEEPROM | ( | ) |
Erase the EEPROM ready for storing log entries.
| uint8_t DS3231_Simple::getTemperature | ( | ) |
Get the temperature accurate to within 1 degree (C)
| float DS3231_Simple::getTemperatureFloat | ( | ) |
Get the temprature accurate to within 0.25 degrees (C)
|
protected |
Delete enough complete blocks to have enough free space for the given required number of bytes.
| void DS3231_Simple::print12HourTimeTo_HM | ( | Stream & | Printer, |
| const DateTime & | Timestamp, | ||
| const char | hoursToMinutesSeparator = ':' |
||
| ) |
Print the time portion of the given DateTime structure in HH:MM:SS [AM/PM] format (12 Hour Clock)
|
inline |
Print the time portion of the current DateTime structure in HH:MM:SS [AM/PM] format (12 Hour Clock)
| void DS3231_Simple::print12HourTimeTo_HMS | ( | Stream & | Printer, |
| const DateTime & | Timestamp, | ||
| const char | hoursToMinutesSeparator = ':' , |
||
| const char | minutesToSecondsSeparator = ':' |
||
| ) |
Print the time portion of the given DateTime structure in HH:MM:SS [AM/PM] format (12 Hour Clock)
|
inline |
Print the time portion of the current DateTime structure in HH:MM:SS [AM/PM] format (12 Hour Clock)
| void DS3231_Simple::printTimeTo_HM | ( | Stream & | Printer, |
| const DateTime & | Timestamp, | ||
| const char | hoursToMinutesSeparator = ':' |
||
| ) |
Print the time portion of the given DateTime structure in HH:MM format (24 Hour Clock)
|
inline |
Print the time portion of the current DateTime structure in HH:MM format (24 Hour Clock)
| void DS3231_Simple::printTimeTo_HMS | ( | Stream & | Printer, |
| const DateTime & | Timestamp, | ||
| const char | hoursToMinutesSeparator = ':' , |
||
| const char | minutesToSecondsSeparator = ':' |
||
| ) |
Print the time portion of the given DateTime structure in HH:MM:SS format (24 Hour Clock)
|
inline |
Print the time portion of the current DateTime structure in HH:MM:SS format (24 Hour Clock)
| void DS3231_Simple::printTo | ( | Stream & | Printer | ) |
Print the current DateTime structure in ISO8601 Format.
YYYY-MM-DDThh:mm:ss
https://www.w3.org/TR/NOTE-datetime
Example: Clock.printTo(Serial);
| void DS3231_Simple::printTo | ( | Stream & | Printer, |
| const DateTime & | Timestamp | ||
| ) |
Print the given DateTime structure in ISO8601 Format.
YYYY-MM-DDThh:mm:ss
https://www.w3.org/TR/NOTE-datetime
Example: Clock.printTo(Serial, MyDateAndTimeVaraible);
|
protected |
Read a byte from the EEPROM.
| Address | The address of the EEPROM to read from. |
|
inline |
Read the oldest log entry and clear it from EEPROM.
| timestamp | Variable to put the timestamp of the log into. |
| data | Variable to put the data. |
| uint8_t DS3231_Simple::readLog | ( | DateTime & | timestamp, |
| uint8_t * | data, | ||
| uint8_t | size = 1 |
||
| ) |
Read the oldest log entry and clear it from EEPROM.
| timestamp | Variable to put the timestamp of the log into. |
| data | Pointer to buffer to put data associated with the log. |
| size | Size of the data buffer. Maximum 7 bytes. |
|
protected |
Read log timestamp and data from a given EEPROM address.
| Address | Byte address of log block |
| timestamp | DateTime structure to put the timestamp |
| data | Memory location to put the data associated with the log |
| size | Max size of the data to read (any more is discarded) |
| uint8_t DS3231_Simple::setAlarm | ( | const DateTime & | AlarmTime, |
| uint8_t | AlarmMode | ||
| ) |
Sets an alarm, the alarm will pull the SQW pin low (you can monitor with an interrupt).
| The | date/time for the alarm, as appropriate for the alarm mode (example, for ALARM_MATCH_SECOND then AlarmTime.Second will be the matching criteria). |
| The | mode of the alarm, from the following... |
ALARM_EVERY_SECOND ALARM_MATCH_SECOND ALARM_MATCH_SECOND_MINUTE ALARM_MATCH_SECOND_MINUTE_HOUR ALARM_MATCH_SECOND_MINUTE_HOUR_DATE ALARM_MATCH_SECOND_MINUTE_HOUR_DOW
ALARM_EVERY_MINUTE ALARM_MATCH_MINUTE ALARM_MATCH_MINUTE_HOUR ALARM_MATCH_MINUTE_HOUR_DATE ALARM_MATCH_MINUTE_HOUR_DOW
ALARM_HOURLY ALARM_DAILY ALARM_WEEKLY ALARM_MONTHLY
| uint8_t DS3231_Simple::setAlarm | ( | uint8_t | AlarmMode | ) |
Set an alarm using the current date/time as it's basis.
Just a convenience function.
| The | mode of the alarm, from the following... |
ALARM_EVERY_SECOND ALARM_MATCH_SECOND ALARM_MATCH_SECOND_MINUTE ALARM_MATCH_SECOND_MINUTE_HOUR ALARM_MATCH_SECOND_MINUTE_HOUR_DATE ALARM_MATCH_SECOND_MINUTE_HOUR_DOW
ALARM_EVERY_MINUTE ALARM_MATCH_MINUTE ALARM_MATCH_MINUTE_HOUR ALARM_MATCH_MINUTE_HOUR_DATE ALARM_MATCH_MINUTE_HOUR_DOW
ALARM_HOURLY ALARM_DAILY ALARM_WEEKLY ALARM_MONTHLY
| uint8_t DS3231_Simple::write | ( | const DateTime & | currentDate | ) |
Set the date and time from the settings in the given structure.
| The | date/time |
|
protected |
Write a byte during a pagewize operation.
Note that this function increments the eepromWriteAddress.
| data | Byte to write. |
|
protected |
End a pagewize write operation.
|
protected |
Start a "pagewize" write at the eepromWriteAddress.
Follow this call with 1 or more calls to writeBytePagewize() Finish with a call to writeBytePagewizeEnd()
Writes in the same page (or rather, 16 byte sections of a page) are performed as a single write, thence a new write is started for the next section.
This solves 2 problems, first the 32 byte Wire buffer which isn't large enough for a whole page of bytes plus the address bytes. Second the fact that the EEPROM loops back to the start of page when you run off the end of the page while writing (instead of to the start of the next page).
Note that you must not modify the eepromWriteAddress between a writeBytePagewizeStart() and a writeBytePagewizeEnd() or it's all going to get out of kilter.
|
inline |
Write a log entry to the EEPROM, having current timestamp, with an attached data of arbitrary datatype (7 bytes max).
This method allows you to record a "log entry" which you can later retrieve.
The full timestamp is recorded along with one piece of data. The type of data you provide is up to you, as long as your data is less than 7 bytes (byte, int, float, char, or a 6 character string would all be fine).
To store more than one piece of data in a log, use a struct, again, in total your structure needs to occupy 7 bytes or less of memory.
Examples: Clock.writeLog(analogRead(A0)); Clock.writeLog( MyTimeAndDate, MyFloatVariable );
// Remember, 7 bytes max! struct MyDataStructure { unsigned int AnalogValue1; unsigned int AnalogValue2; }; MyDataStructure MyData; MyData.AnalogValue1 = 123; MyData.AnalogValue2 = 456; Clock.writeLog(MyDataStructure);
| data | The data to store, any arbitrary scalar or structur datatype consisting not more than 7 bytes. |
DS3231::writeLog(const DateTime, const uint8_t *data, uint8_t size)
|
inline |
Write a log entry to the EEPROM, having supplied timestamp, with an attached data of arbitrary datatype (7 bytes max).
| timestamp | The timestamp to associate with the log entry. |
| data | The data to store, any arbitrary datatype consisting not more than 7 bytes. |
| uint8_t DS3231_Simple::writeLog | ( | const DateTime & | timestamp, |
| const uint8_t * | data, | ||
| uint8_t | size = 1 |
||
| ) |
Write a log entry to the EEPROM, having supplied timestamp, with an attached data.
| timestamp | The timestamp to associate with the log entry. |
| data | Pointer to the data to store |
| size | Length of data to store - max length is 7 bytes, this is not checked for compliance! |


|
pai
|
Static Public Member Functions | |
| static | init () |
| static | isInitialized () |
| static | isWindows () |
| static | hasLine () |
| static | getLine () |
| static | awaitLine () |
|
static |
Waits until the user has submitted a line and then returns it.
| BadMethodCallException | if pai is not initialized |
|
static |
Returns the line of text the user has submitted or null if they haven't.
| BadMethodCallException | if pai is not initialized |
|
static |
Returns true if the user has submitted a line of text.
| BadMethodCallException | if pai is not initialized |
|
static |
Initializes pai's input handling. After this, STDIN is in pai's hands, and there's no way out.
| BadMethodCallException | if pai is already initialized. |
|
static |
Returns true if pai is already initialized.
|
static |
Returns true if the code is running on a Windows machine.


Returns time in requested format.
formatTime(dateStr, format)
| dateStr |
string or number, date in common format |
| format |
string, format to output |
The str argument can be (1) a JavaScript Date, (2) a Unix epoch, (3) any standard date, which
will be used to create JavaScript Date object. To ensure correct translation it is best to pass a JavaScript Date.
The format can contain following elements:
hh
- hour
hhh
- hour with leading 0
h24
- hour in 24 hour format
hh24
- hour in 24 hour format with a leading 0
mi
- minute (always with a leading 0)
mm
- minute (always with a leading 0)
ss
- second (always with a leading 0)
am
- am or pm for US format
pm
- am or pm for US format


Now we'll look at how to create a branch off the main tree.
JSONNode n(JSON_NODE); n.push_back(JSONNode("RootA", "Value in parent node")); JSONNode c(JSON_NODE); c.set_name("ChildNode"); c.push_back(JSONNode("ChildA", "String Value")); c.push_back(JSONNode("ChildB", 42)); n.push_back(c); std::string jc = n.write_formatted(); std::cout << jc << std::endl;
The result will look like this:
{ "RootA" : "Value in parent node", "ChildNode" : { "ChildA" : "String Value", "ChildB" : 42 } }
As in the previous example, we create a root node to hold all of our child nodes on line one using the constructor.
Line 2 adds to the root a string node with the name "RootA" and a value of "Value in parent node".
On line 3 we're creating a new, floating node that will be a branch off the root. It's the same type as our root, JSON_NODE.
set_name lets us name the node that we've just created. If your branch is an object of some kind, you'll likely want to name it properly. Note that if you try to name the root node (n in our case), it won't be written out. The name will only appear if the JSON_NODE is a child of another node.
Lines 5 and 6 add new nodes with values to our branch node c.
Line 7 attaches our branch node c to the root node n after the string node named "RootA".
Line 8 returns the json_string nicely formatted and 9 prints it to stdout.
With these tools, we can create complicated JSON structures and mimick objects with child properties.


@(The total number of visitors:)
@(Memory usage:)
/
@(Requests/min.)
0
@(Files/min.)
0
@(Online-visitors)
0
@(Last visitor:)
@(Robots / Crawlers)
@(Mobile devices)
@(Desktop)
@(Sources today)
@(From social networks)
@(From adverts)
@(From organic search)
@(Direct visitors)
@(From unknown source)
@(Today statistics)
@(Hits)
@(Visitors)
@(Unique visitors)
@(Unique visitors per month)
@(Visited pages per user)
@(Type)
@(Address)
@(User)
@(IP address)
@(Time)
@(Maximum daily online visitors)
∅
@(Visitors)
@(Unique)
@(Desktop)
@(Mobile devices)
@(Pages)
@(Posts)
@(Contact forms)
@(Subscribers)
@(Newsletters)


Funds
Bitcoin
Transactions
Receive Money
Send Money
⚠ Please provide an address
To
*
⚠ Please provide an amount as a number
Amount
*
USD
BCH
Note
Clear
Are you sure?
Double check that the address and amount is correct
Cancel
Yes, Send
Send
Receive Money
Need Bitcoin?
Transactions
You have no transactions.
Settings
Fiat Currency
AUD
BRL
CAD
CHF
CLP
CNY
CZK
DKK
EUR
GBP
HKD
HUF
IDR
ILS
INR
JPY
KRW
MXN
MYR
NOK
NZD
PHP
PKR
PLN
RUB
SEK
SGD
THB
TRY
TWD
USD
ZAR
Bitcoin Unit
BCH
mBCH
bits
satoshi
Transaction Fee
Priority
Normal
Economic
Decimal Places
0
1
2
3
4
5
6
7
8
Show mnemonic seed
Resync blockchain
Are you sure?
Clicking yes will re-download the blockchain and scan for any missing payments.

You will need to restart for this to take effect.
Cancel
Yes, Do it
Set
Set socks5 proxy:
Set socks5 proxy?
You will need to restart for this to take effect.
Cancel
Yes, Do it
Set
Are you sure?
Clicking yes will delete your existing wallet, including any coins in it, and restore from the seed you entered.
Cancel
Yes, Do it
Restore From Seed
Wallet creation date:
⚠ Invalid private key
Are you sure?
Clicking yes will import the key and resync the blockchain from the creation date.
Cancel
Yes, Do it
Import Key
Key creation date:


Use these examples to learn about the Dojo 2 toolkit and to get started with your own app
A Dojo 2 implementation of todo mvc
The homepage of the milestone card game


Logo
Home
Profile
Login
Logged in as:
Logout
You have been logged out.
Invalid username and password.
User Name :
Password:
New user?
Register
new user.


---
layout: post
title: That which is to be, already has been
date: '2008-10-07T10:05:00.004-05:00'
author: Jabell
tags:
- Will of God
- Calvinism
- Sovereignty
modified_time: '2008-10-07T10:12:27.550-05:00'
blogger_id: tag:blogger.com,1999:blog-19739956.post-1394021628445367185
blogger_orig_url: http://theabellsix.blogspot.com/2008/10/that-which-is-to-be-already-has-been.html
---
I realize that there is a lot more going on in Ecclesiastes than meets the eye. Is there one writer or two? Is it Solomon or not?
Yet, there are nuggets of truth in Ecclesiastes that are beyond profound and require serious thought. So many of the arguments of our day wrestle around the doctrine of God's sovereignty. I have believed in God's absolute sovereignty for years now, and while I still wrestle with the ramifications of that belief, I find it very comforting.
Here is a nugget from Ecclesiastes that is worth our time pondering:
Ecclesiastes 3:14-15: I perceived that whatever God does endures forever; nothing can be added to it, nor anything taken from it. God has done it, so that people fear before him. 15 That which is, already has been; that which is to be, already has been; and God seeks what has been driven away.


| 534 | (A) | howe the haythyn here heldis to þe grownde |
| 536 | (C) | How þe heþen hopped hedles . to þe grounde |
| 530 | (D) | how þe hethin hepid hedeles to ground |
| 522 | (E) | how þe hethyn hoppedyn . heuydles to grounde |
| (Ex) | ---- no text ---- | |
| 551 | (L) | how þe heþyn here heldiþ to grounde |
| 508 | (P) | How þe hethynn here heledes to grounde |
| 529 | (U) | And howe the hethen hopped / hedeles to the grounde |
| (V) | ---- no text ---- |


FixedGate
public enum FixedGate
A quantum gate. with fixed inputs
-
Controlled not gate with 2 inputs:
target
&control
Declaration
Swift
case controlledNot(target: Int, control: Int)
-
Hadamard gate with 1 input:
target
Declaration
Swift
case hadamard(target: Int)
-
Generic quantum gate built with a
matrix
(it is expected to be unitary) and any number ofinputs
(as many inputs asmatrix
is able to handle)Declaration
Swift
case matrix(matrix: Matrix, inputs: [Int])
-
Not gate with 1 input:
target
Declaration
Swift
case not(target: Int)
-
Oracle gate composed of a
truthtable
that specifies whichcontrols
activate a controlled not gate applied totarget
Declaration
Swift
case oracle(truthTable: [String], target: Int, controls: [Int])
-
Quantum gate that shifts phase of the quantum state in
target
byradians
Declaration
Swift
case phaseShift(radians: Double, target: Int)
-
Declaration
Swift
public static func == (lhs: FixedGate, rhs: FixedGate) -> Bool


---
layout: post
title: ios stuffs I am using
categories: []
tags:
- iOS
status: publish
type: post
published: true
meta:
_edit_last: '1'
---
A growing list on what I am using in ios development. I didn't put all the stuffs in, just some which left a record in my brain. The list still grows, mark it if you interested. :)
Utility
Dependency management: Cocoapods
IDE: Appcode
Library
Logging: CocoaLumberjack(github)
Documentation: AppleDoc
Unit testing: Kiwi
Block-tize UIView, Array, Dictionary and dynamic delegate: BlocksKit(github)
Form build: Nimbus(github)
String utility: NSString-Ruby(github)
Sliding view: ECSlidingViewController(github)
JSON: JsonKit(github)
JOSNSerialization: JSONModel(github)
RestFul service support: RestKit(github)
Any recommendation? Leave a comment here.


David Bruno
Home
(current)
Resume
About Me
Contact
Reflections
Projects
Contact Me Page
Please Feel Free To Reach Out To Me
Loading…


Hello! My name is Daryl. My journey began when I learned how to build emails that went from text on a page to a work of art. It was in that moment I knew I wanted to learn more coding skills. Coding allowed me to build and bring ideas to life in the browser and useful for users. As a developer I am able to use my creative side to design and my logical side to code. My goal as a developer is to I work to make a better web; one that is fast, easy to use, beautiful, accessible to all, and frustration-free.
I take great pride in not only being able to complete work to the high standard you expect but also go the extra mile wherever possible. I enjoy getting to know a business, its goals, and how I can best apply myself to make sure your website succeeds.
HTML5 • CSS3 • JavaScript • React.JS • Node.JS • Sequelize.JS • MySQL • WordPress • Tailwind • Bootstrap • Sitefinity CMS • Blackbaud CRM


JinWang's Word Length Calculator
@JinWang
My Word Length Calculator
Type a word in the box below
Click to calculate word length


class Doctrine\DBAL\Driver\PDOStatement
The PDO implementation of the Statement interface.
Used by all PDO-based drivers.
Construction
| \PDOStatement |
| \Traversable | |
| Doctrine\DBAL\Driver\ |
Statement interface. |
| Doctrine\DBAL\Driver\ |
Driver-level result statement execution result. |
| Doctrine\DBAL\Driver\ |
Interface for the reading part of a prepare statement only. |
| Doctrine\DBAL\Driver\ |
Hierarchy
Constants
Properties
-
NULL $queryString = null
Prototype \PDOStatement::$queryString inherit
Methods
-
__construct () : void
Protected constructor.
Parameters Return void -
bindValue ($param, $value, $type = Doctrine\DBAL\ParameterType::STRING) : bool
Binds a value to a corresponding named (not supported by mysqli driver, see comment below) or positional
placeholder in the SQL statement that was used to prepare the statement.As mentioned above, the named parameters are not natively supported by the mysqli driver, use executeQuery(),
fetchAll(), fetchArray(), fetchColumn(), fetchAssoc() methods to have the named parameter emulated by doctrine.Parameters int string $param Parameter identifier. For a prepared statement using named placeholders,
this will be a parameter name of the form :name. For a prepared statement using question mark placeholders, this will be the 1-indexed position of the parameter.
mixed $value The value to bind to the parameter.
int $type = Doctrine\DBAL\ParameterType::STRING Explicit data type for the parameter using the
Doctrine\DBAL\ParameterType constants.
Return bool TRUE on success or FALSE on failure.
Prototype Doctrine\DBAL\Driver\ Statement::bindValue() Binds a value to a corresponding named (not supported by mysqli driver, see comment below) or positional implement -
bindParam ($param, &$variable, $type = Doctrine\DBAL\ParameterType::STRING, $length = null, $driverOptions = null) : bool
Parameters mixed $param mixed &$variable int $type = Doctrine\DBAL\ParameterType::STRING int null $length = null mixed $driverOptions = null Return bool Prototype Doctrine\DBAL\Driver\ Statement::bindParam() Binds a PHP variable to a corresponding named (not supported by mysqli driver, see comment below) or question implement -
closeCursor () : bool
Closes the cursor, enabling the statement to be executed again. Parameters Return bool TRUE on success or FALSE on failure.
Prototype Doctrine\DBAL\Driver\ ResultStatement::closeCursor() Closes the cursor, enabling the statement to be executed again. implement -
execute ($params = null) : bool
Executes a prepared statement If the prepared statement included parameter markers, you must either:
call PDOStatement->bindParam() to bind PHP variables to the parameter markers:
bound variables pass their value as input and receive the output value,
if any, of their associated parameter markers or pass an array of input-only
parameter values.Parameters mixed[] null $params = null An array of values with as many elements as there are
bound parameters in the SQL statement being executed.
Return bool TRUE on success or FALSE on failure.
Prototype Doctrine\DBAL\Driver\ Statement::execute() Executes a prepared statement implement -
fetch ($fetchMode = null, $cursorOrientation = PDO::FETCH_ORI_NEXT, $cursorOffset = 0) : mixed
Returns the next row of a result set. Parameters int null $fetchMode = null Controls how the next row will be returned to the caller.
The value must be one of the {@link FetchMode} constants, defaulting to {@link FetchMode::MIXED}.
int $cursorOrientation = PDO::FETCH_ORI_NEXT For a ResultStatement object representing a scrollable cursor,
this value determines which row will be returned to the caller. This value must be one of the \PDO::FETCH_ORI_* constants, defaulting to \PDO::FETCH_ORI_NEXT. To request a scrollable cursor for your ResultStatement object, you must set the \PDO::ATTR_CURSOR attribute to \PDO::CURSOR_SCROLL when you prepare the SQL statement with \PDO::prepare().
int $cursorOffset = 0 For a ResultStatement object representing a scrollable cursor for which the
cursorOrientation parameter is set to \PDO::FETCH_ORI_ABS, this value specifies the absolute number of the row in the result set that shall be fetched. For a ResultStatement object representing a scrollable cursor for which the cursorOrientation parameter is set to \PDO::FETCH_ORI_REL, this value specifies the row to fetch relative to the cursor position before ResultStatement::fetch() was called.
Return mixed The return value of this method on success depends on the fetch mode. In all cases, FALSE is
returned on failure.
Prototype Doctrine\DBAL\Driver\ ResultStatement::fetch() Returns the next row of a result set. implement -
fetchColumn ($columnIndex = 0) : mixed
false Returns a single column from the next row of a result set or FALSE if there are no more rows. Parameters int $columnIndex = 0 0-indexed number of the column you wish to retrieve from the row.
If no value is supplied, fetches the first column.
Return mixed false A single column in the next row of a result set, or FALSE if there are no more rows.
Prototype Doctrine\DBAL\Driver\ ResultStatement::fetchColumn() Returns a single column from the next row of a result set or FALSE if there are no more rows. implement -
fetchNumeric () : array<int,mixed>
false Returns the next row of the result as a numeric array or FALSE if there are no more rows. Parameters Return array<int,mixed> false Throws Doctrine\DBAL\Driver\ Exception Prototype Doctrine\DBAL\Driver\ Result::fetchNumeric() Returns the next row of the result as a numeric array or FALSE if there are no more rows. implement -
fetchAssociative () : array<string,mixed>
false Returns the next row of the result as an associative array or FALSE if there are no more rows. Parameters Return array<string,mixed> false Throws Doctrine\DBAL\Driver\ Exception Prototype Doctrine\DBAL\Driver\ Result::fetchAssociative() Returns the next row of the result as an associative array or FALSE if there are no more rows. implement -
fetchOne () : mixed
false Returns the first value of the next row of the result or FALSE if there are no more rows. Parameters Return mixed false Throws Doctrine\DBAL\Driver\ Exception Prototype Doctrine\DBAL\Driver\ Result::fetchOne() Returns the first value of the next row of the result or FALSE if there are no more rows. implement -
fetchAllNumeric () : array
Returns an array containing all of the result rows represented as numeric arrays. Parameters Return array Throws Doctrine\DBAL\Driver\ Exception Prototype Doctrine\DBAL\Driver\ Result::fetchAllNumeric() Returns an array containing all of the result rows represented as numeric arrays. implement -
fetchAllAssociative () : array
Returns an array containing all of the result rows represented as associative arrays. Parameters Return array Throws Doctrine\DBAL\Driver\ Exception Prototype Doctrine\DBAL\Driver\ Result::fetchAllAssociative() Returns an array containing all of the result rows represented as associative arrays. implement -
fetchFirstColumn () : array
Returns an array containing the values of the first column of the result. Parameters Return array Throws Doctrine\DBAL\Driver\ Exception Prototype Doctrine\DBAL\Driver\ Result::fetchFirstColumn() Returns an array containing the values of the first column of the result. implement -
free () : void
Discards the non-fetched portion of the result, enabling the originating statement to be executed again.
Parameters Return void Prototype Doctrine\DBAL\Driver\ Result::free() Discards the non-fetched portion of the result, enabling the originating statement to be executed again. implement -
bindColumn ($column, &$param, $type, $maxlen, $driverdata) : void
Parameters $column &$param $type $maxlen $driverdata Return void Prototype \PDOStatement::bindColumn() inherit -
rowCount () : int
Returns the number of rows affected by the DELETE, INSERT, or UPDATE statement that produced the result.
If the statement executed a SELECT query or a similar platform-specific SQL (e.g. DESCRIBE, SHOW, etc.),
some database drivers may return the number of rows returned by that query. However, this behaviour
is not guaranteed for all drivers and should not be relied on in portable applications.Parameters Return int The number of rows.
Prototype \PDOStatement::rowCount() inherit -
fetchAll ($fetchMode = null, $fetchArgument = null, $ctorArgs = null) : mixed[]
Parameters int null $fetchMode = null mixed $fetchArgument = null mixed $ctorArgs = null Return mixed[] Prototype Doctrine\DBAL\Driver\ PDOStatementImplementations::fetchAll() instead -
fetchObject ($class_name, $ctor_args) : void
-
errorCode () : string
int bool Fetches the SQLSTATE associated with the last operation on the statement handle.
Parameters Return string int bool The error code string.
Prototype \PDOStatement::errorCode() inherit See Doctrine_Adapter_Interface::errorCode() -
errorInfo () : mixed[]
Fetches extended error information associated with the last operation on the statement handle.
Parameters Return mixed[] The error info array.
Prototype \PDOStatement::errorInfo() inherit -
setAttribute ($attribute, $value) : void
-
getAttribute ($attribute) : void
-
columnCount () : int
Returns the number of columns in the result set
Parameters Return int The number of columns in the result set represented
by the PDOStatement object. If there is no result set, this method should return 0.
Prototype \PDOStatement::columnCount() inherit -
getColumnMeta ($column) : void
-
setFetchMode ($fetchMode, $arg2 = null, $arg3 = null) : bool
Parameters int $fetchMode mixed $arg2 = null mixed $arg3 = null Return bool Prototype Doctrine\DBAL\Driver\ PDOStatementImplementations::setFetchMode() instead -
nextRowset () : void
-
debugDumpParams () : void


@(keyword: String)
Lucene's Query Syntax may be used to compose advanced searches and narrow searches to specific fields.
For example, to search for collections containing finders:
isCollection:true AND hasFinder:trueOr, to find resources supporting partial updates:
method:partial_update
The following fields are available:
| Field | Description |
|---|---|
| keywords | this is the default search field ("activities" and "keywords: activities" are equivalent) and includes many of the terms from the other fields to make simple search more convenient. |
| resource | the name of a resource. E.g. "resource:countries" |
| cluster | the name of a cluster. E.g. "cluster:UscpProxyApi" |
| isCollection | matches collection resources. E.g. "isCollection:true" |
| hasComplexKey | matches collections with complex keys. E.g. "hasComplexKey:true" |
| isAssociation | matches association resources. E.g. "isAssociation:true" |
| isSimple | matches simple resources. E.g. "isSimple:true" |
| isActionSet | matches action set resources. E.g. "isActionSet:true" |
| isSubresource | matches subresources. E.g. "isSubresource:true" |
| hasFinder | matches resources containing finders. E.g. "hasFinder:true" |
| finder | the names of finders on a resource. E.g. "finder:criteria" |
| hasAction | matches resources containing any actions. E.g. "hasAction:true" |
| hasEntityAction | matches resources containing actions that are at the 'entity' level. E.g. "hasEntityAction:true" |
| action | the names of actions on a resource. E.g. "action:clear" |
| method | the names of supported methods on a resource. Available methods are E.g. "method:partial_update" |
| assocKeys | the names of association keys on an association resource. E.g. "assocKeys:src" |
| isDeprecated | matches resources that are marked as deprecated. E.g. "isDeprecated:true" |
| isInternalToSuperblock | matches resources that are marked as internal to their superblock. E.g. "isInternalToSuperblock:true" |
| hasDeprecated | matches resources with methods/finders/actions that are marked as deprecated. E.g. "hasDeprecated:true" |
| hasTestMethod | matches resources with methods/finders/actions that are intended for use by tests only. E.g. "hasTestMethod:true" |
| isColoVariant | matches resources that are a d2 colo variant of another resource. Defaults to "isColoVariant:false" unless isColoVariant or coloVariant are provided. |
| coloVariant | matches that have a specific d2 colo variant suffix. E.g. "coloVariant:Master" |
| createdDate | The date the resource was first added to D2. E.g. "createdDate[20131200 TO 20131231]" |
| modifiedDate | The date the resource was last modified in to D2. E.g. "modifiedDate[20131200 TO 20131231]" |


- Purpose: Abq@Night will provide a fast, and light experience for people looking for events in Abq. Also provide an easy streamlined experience for venue owners and promoters who are looking to advertise their even.
- Audience: People who are looking for entertainment in the Abq area.
- Goal: Provide easy access to information about the local night entertainment in Abq.
User Persona
- Name: Chad Bradley
- Age: 26
- Gender: Male
- Occupation: Chad is a business major at UNM
- Technology:
- Phone: iPhone X running iOS 12
- Laptop: MacBook OS 10.14
- Attitude: Chad is social, and goal oriented. He likes information at his fingertips, but does not like to wait for it. Chad likes live music and the dance club.
- Technology: Chad loves his apple products and has an iPhone and Macbook. Chad also runs the chrome browser in both. He is very comfortable with the internet and social media.
- Frustrations and Needs: Chad hates how hard it is to find interesting entertainment in Albuquerque. Chad dislikes slow/ unresponsive web pages, ugly pages with UI/UX problems, biased, targeted, or otherwise manipulated search results. Chad wants a search service that is responsive, unbiased, and modern.
- Goal: It’s friday night, and chad is at a local bar with his friends. Chad would like to see what is going on in town later this evening. Chad hates using google because often, small events are left out. Outdated information or even irrelevant, keyword heavy “best things to do” and other touristy aggregate/list websites plague and clog up the search engine. Local websites such as the alibi are feature bloated, unfocused, ad riddled, and sports unfriendly UI design and sluggish response. Chad has been using facebook as his main way to receive information about local events, but does not like the social integration, as it feels prying, “data hordish”, and insecure, and for some reason requires his personal information to work.
“Why does everything need access to my personal data to work? What happened to the days when websites were just tools?” he thinks to himself as he downs another domestic. Luckily, he recently saw a poster for a website that advertises fast simple searches of local events and music, called ABQ@Night. Chad is intrigued and visits the website. He notices the “I’m feeling adventurous” feature which shows him what events are happening close by tonight. He clicks on a event post that looks interesting, and quickly plans the rest of his evening with his friends.
User Story
Chad wants to find an event to attend tonight, but does not know what he wants to do specifically.
Interaction flow
- Chad is interested in attending an event tonight, but does not have any specific idea about what he wants to do. What is important to him right now is that he finds an event tonight and nearby.
- Chad begins this process by entering abqatnight.com into his browser and retrieving the site.
- Next, he finds the "I'm feeling Adventurous" button on the website, and clicks it.
- A single search query card slides across the screen, and pauses in the middle of the screen for several seconds, and then slides off screen.
- Chad finds a query that meets his needs.
- Chad selects it, spontaneously.
- Chad books the query with integrated google calender function, and pulls up the venue location with the google maps function.
- Chad attends the enoent and is pleased.
- Chad tells all of his friends about abqatnight.com


I studied through both primary and secondary school in Mandera East,Kenya.
Currently am a student at Moringa school
Increased career opportunities: Perhaps the most important reason i enrolled to the Programming school learn is to program is that doing so will qualify you for a wider variety of jobs.
This are list of My hobbies are;
I have gained some Programming skills, which are
This is a of an restaurant that explains more about the services offered.HTML and CSS are the tecnology used to make this webpage
This is a website that shows and elaborate my favourite band.HTML and CSS are the tecnology used to make this webpage >


Open Internals is a podcast for developers interested in how popular open source libraries are made. We talk to package maintainers and dive deep into the architecture, organization and implementation details. The podcast will be about an hour long and a new episode arrives roughly weekly.
It is hosted by Darshan Chaudhary (@deathbullet, github.com/darshanime), who works as a backend developer with Draup, Zinnov.
Suggestions and ideas welcome! Feel free to reach out at deathbullet@gmail.com


Doctor Lookup
Please enter your medical concern or a doctor's name to get a detailed list of matching doctors.
Enter your condition:
Enter name of doctor:
Search
Search results:


Welcome
A Work In Progress
This online course was made for complete beginners that are not sure where to start and I assume students to be in middle/high school or older and want to be self taught. I want to show that it is not that hard to learn and I am making this course to be something that I wished existed when I was growing up.
The course is also based on 6 years of teaching and self teaching myself programming to teach it. With plenty of written resources and videos of concepts scattered around, I want to bring together every thing with practice to understand concepts.
-
8/23/20
- School restarting
- Finished lesson repl.its in chapter 1
- Added Chapter Challenge to chapter 1
- Added an empty chapter 2
-
8/16/20
- Changed correct links for chapter 1
- Half of chapter 1 repl.its done
- Gifs added to chapter 1
- Figured how to add logo pic from github not from withen project
-
8/12/20
- Added type casting lesson to chapter 1
- Making gifs for chapter 1 with giphy
-
8/11/20
- Using KeyPress OSD to record keypress
- Practicing with more repl.it
-
7/31/20
- Removing replits being embedded from website
- New template for lessons
-
7/29/20
- Added last video for chapter 0
- Chapter 0 done, time for building curriculum for chapter 1
-
7/27/20
- Made and added third and fourth videos to website
- Messing around with repl.it to see what is easiest for new users to deal with files
- Made and added 1.a repl.its
-
7/24/20
- Made and added second video to website
- Have rough template for videos
-
7/21/20
- Made and added first video to website
- Using hyperlinks in markdown files
- Added shortcode for using repl.it
-
7/19/20
- Start of writing down progress
- Learned basics of hugo, github pages, and editing videos
- Mapped out basic layout of chapter 0 and 1
- Made general structure of a lesson
- Added protips to chapter 0 and general idea of text style through out website


City of Tshwane to probe corruption allegations over Hammanskraal water supply
The ANC Youth League claims some workers are demanding bribes from service providers for them to be outsourced by the City.
by News24 WireAbel Tau addresses supporters at the opening ceremony of the Democratic Alliance's Federal Congress held at the Thwane Events Center, 7 April 2018, Pretoria. Picture: Jacques Nelles
The City of Tshwane promised to launch investigations into allegations about officials soliciting bribes in the drought stricken Hammanskraal.
The City was reacting to allegations tabled by members of the ANC Youth League, who claimed some workers are demanding bribes from service providers for them to be outsourced by the City.
The DA’s Abel Tau requested acting city manager, Moeketsi Ntsimane, to direct the Forensic and Investigation Services Division to probe the alleged corruption.
“As an administration that promotes openness and honesty, it is imperative that we get to the bottom of these allegations of corruption, without fear or favour.
Tau called on residents to be on the look-out for unscrupulous people driving around in water tankers selling water in the area.
“The City would like to put it on record that we are not charging anyone for water that we are providing through the water tankers.
“No consumer is supposed to pay any amount of money to anyone who is contracted to the City to provide water in the area.”
Customers are advised to contact the local City’s regional offices should they be approached or spot a driver of a water tanker selling water.


Class ConfigurationExtensions
Inheritance
ConfigurationExtensions
Assembly: FluentDbTools.Extensions.MSDependencyInjection.dll
public static class ConfigurationExtensions
Methods
|
Improve this Doc
View Source
Return the first valid(non empty) configuration value
Declaration
public static string GetConfigValue(this IConfiguration configuration, params string[] keys)
Parameters
Returns
|
Improve this Doc
View Source
MigrationLogging with File location can be configured from configuration key(s):
[Logging:Migration:File | Logging:LogMigrationFile | LogMigrationFile] != null
If set, IsMigrationLogFileEnabled() will be true
Declaration
public static string GetMigrationLogFile(this IConfiguration configuration)
Parameters
Returns
|
Improve this Doc
View Source
MigrationLogging with Console logging can be enabled from configuration key(s):
ConsoleLog = true
OR
[Logging:Console:LogLevel | Logging:LogLevel:Console] != None
When both Logging:Console:LogLevel and Logging:LogLevel:Console is null, Console logging will be enabled.
Declaration
public static bool IsConsoleLogEnabled(this IConfiguration configuration)
Parameters
Returns
|
Improve this Doc
View Source
MigrationLogging with Console logging can be enabled from configuration key(s):
[Logging:Migration:Console | LogMigrationConsole ]= true
OR
[Logging:Migration:LogLevel |Logging:LogLevel:Migration] != None
When both Logging:Console:LogLevel and Logging:LogLevel:Console is null, Console logging will be enabled.
Declaration
public static bool IsMigrationConsoleLogEnabled(this IConfiguration configuration)
Parameters
Returns
|
Improve this Doc
View Source
MigrationLogging with File logging can be enabled from configuration key(s):
[Logging:Migration:FileEnabled | Logging:LogMigrationFileEnabled | LogMigrationFileEnabled ] == true
OR
[Logging:Migration:File | Logging:LogMigrationFile | LogMigrationFile] != null
Declaration
public static bool IsMigrationLogFileEnabled(this IConfiguration configuration)
Parameters
Returns
|
Improve this Doc
View Source
MigrationLogging with ElapsedTime can be enabled from configuration key(s):
[Logging:Migration:ShowElapsedTime | Logging:LogMigrationShowElapsedTime | LogMigrationShowElapsedTime] == true
Declaration
public static bool IsMigrationLogShowElapsedTimeEnabled(this IConfiguration configuration)
Parameters
Returns
|
Improve this Doc
View Source
MigrationLogging with Sql logging can be enabled from configuration key(s):
[Logging:Migration:ShowSql | Logging:LogMigrationShowSql | LogMigrationShowSql] = true
Declaration
public static bool IsMigrationLogShowSqlEnabled(this IConfiguration configuration)
Parameters
Returns


Toggle navigation
Rides
Enter your contact info
First Name:
Last Name:
Email:
Create your User Login:
Username:
Case sensitive
Password
8 character minimum; case sensitive
Password Confirmation
Submit
Subscribe to Monthly Newsletter


Domplate Inheritance Test
Test
Base class has tag:, derived classes override methods
Level 1
Level 2
Level 3
Derived classes have tag:, it uses TAG()
Level 1
Level 2
Level 3
Derived classes have tag:, it references base class tag:
Level 1
Level 2
Level 3


[gecode-users] First step in constraint progamming
Christian Schulte
cschulte at kth.se
Tue Jun 18 14:02:18 CEST 2013
Hi Philippe,
Unfortunately I cannot really answer your question as this is a general
modeling question and not a dedicated Gecode question.
Best
Christian
--
Christian Schulte, Professor of Computer Science, KTH,
www.ict.kth.se/~cschulte/
-----Original Message-----
From: users-bounces at gecode.org [mailto:users-bounces at gecode.org] On Behalf
Of Philippe K
Sent: Saturday, June 15, 2013 10:25 AM
To: users at gecode.org
Subject: [gecode-users] First step in constraint progamming
Hello Everybody,
First of all, my apologize if I've posted this message in the wrong place.
Apologies also for my poor english level.
I just start in constraint programming and I have difficulties getting the
right approach, the good reasoning, to pose my first problem (both
mathematically and with geocode).
Please, allow me to expose this quite interesting (and fun ?) problem.
Given :
--------
- A set of CPU
- 'Prioritized' tasks (a priority of 1 is the highest priority)
And knowing that :
-------------------
- A CPU can treat in parallel N tasks
- A CPU can only runs certain tasks
We have to distribute theses N tasks among these CPU such that we maximize
the number of allocated tasks.A distribution is invalid if there exist an
allocated task T and an unallocated task T' that have priority.
Example 1 :
-----------
TASK1 TASK2 MAX // TASKS
Priority 2 1
---------------------------------------------------------------
CPU1 affectable affectable 1
---------------------------------------------------------------
CPU1 : { TASK1 } is an invalid distribution since TASK2 has priority
but is not affected.
CPU1 : { TASK1 TASK2 } is an invalid distribution since the max number of
parallel tasks is 1
CPU1 : { TASK2 } valid distribution
CPU1 : { } Means 'no distribution', Not considered since we
have a non empty valid distribution
=> CPU1 : { TASK2 }
Example 2 :
-----------
TASK1 TASK2 MAX // TASKS
Priority 2 1
-------------------------------------------------------------
CPU1 affectable affectable 1
CPU2 not affectable affectable 2
-------------------------------------------------------------
CPU1: { } , CPU2: { TASK1 TASK2 }: invalid distribution, Task 1
not affectable to CPU2
CPU1: { TASK1 } , CPU2: { TASK2 } : valid distribution
CPU1: { TASK2 } , CPU2: { TASK1 } : invalid distribution,
Task 1 not affectable to CPU2
CPU1: { TASK1 TASK2 }, CPU2: { } : invalid distribution, only 1
tasks affectable to CPU1
CPU1: { } , CPU2: { } : Not considered since we have
a non empty valid distribution
Example 3 :
-----------
Now let's take this final example and refine it step by step.
TASK1 TASK2 MAX // TASKS
Priority 2 1
-----------------------------------------------------
CPU1 affectable affectable 2
CPU2 affectable affectable 2
-----------------------------------------------------
CPU1: { } , CPU2: { TASK1 TASK2 } : valid distribution
CPU1: { TASK1 } , CPU2: { TASK2 } : valid distribution
CPU1: { TASK2 } , CPU2: { TASK1 } : valid distribution
CPU1: { TASK1 TASK2 }, CPU2: { } : valid distribution
CPU1: { } , CPU2: { } : Not considered since we have
a non empty valid
distributions.
---------------------------------------------------------------------------
If we have multiple valid distributions, we prefer the one where the "Task
(+ pending task) per CPU" is "well balanced" across CPUs
for instance, with 3 CPU, the 'balance' of a distribution is :
|(nbAffectations(CPU1)+nbPendingTask(CPU1))-
(nbAffectations(CPU2)+nbPendingTask(CPU2))| +
|(nbAffectations(CPU1)+nbPendingTask(CPU1))-
(nbAffectations(CPU3)+nbPendingTask(CPU3))| +
|(nbAffectations(CPU2)+nbPendingTask(CPU2))-
(nbAffectations(CPU3)+nbPendingTask(CPU3))|
---------------------------------------------------------------------------
TASK1 TASK2 MAX // TASKS NB_PENDING_TASK
Priority 2 1
-----------------------------------------------------------------------
CPU1 affectable affectable 2 0
CPU2 affectable affectable 2 0
-----------------------------------------------------------------------
CPU1: { } , CPU2: { TASK1 TASK2 } : rejected, not the best balance
|0+0 - 2+0| = 2
CPU1: { TASK1 } , CPU2: { TASK2 } : best balance|1+0 - 1+0| = 0
CPU1: { TASK2 } , CPU2: { TASK1 } : best balance : |1+0 - 1+0| = 0
CPU1: { TASK1 TASK2 }, CPU2: { } : rejected, not the best balance
|2+0 - 0+0| = 2
----------------------------------------------------------------------------
But since we have more than one potential distribution, we prefer the one
where the "global affinity" is maximized. The "global affinity" of a
distribution could be expressed as :
Sum(CPUi) (Sum(Taskj) (isAffected(CPUi,Taskj)*Affinity(CPUi,Taskj)))
----------------------------------------------------------------------------
TASK1 TASK2 MAX // TASKS
Priority 2 1
----------------------------------------------------------------------------
CPU1 affectable, affinity = 3 affectable, affinity = 1 2
CPU2 affectable, affinity = 2 affectable, affinity = 4 2
----------------------------------------------------------------------------
CPU1: { TASK1 } , CPU2: { TASK2 } : affinity= (1*3 + 0*1) + (0*2 + 1*4) = 7
CPU1: { TASK2 } , CPU2: { TASK1 } : affinity= (0*3 + 1*1) + (1*2 + 0*4) = 3
Final solution : CPU1 : { TASK1 } , CPU2 : { TASK2 }
----------------------------------------------------------------------------
To speak honestly, I've absolutely no idea of how to express this problem in
a 'programming constraint' way. Is this can be expressed using geocode ?
Any help would be greatly appreciated to prototype this.
Philippe
_______________________________________________
Gecode users mailing list
users at gecode.org
https://www.gecode.org/mailman/listinfo/gecode-users
More information about the users
mailing list


{% extends "auctions/layout.html" %} {% block nav %} {% if user.is_authenticated %}
Description: {{auction.Description}}
Category: {{auction.Category}}
Listed by: {{auction.lister}}
{{num_bid}} bids are made
Maximum bid made by {{max_bidder}} for {{money}} dollars