# cython: language_level=3
# distutils: language = c++
# -*- coding: utf-8 -*-
# *****************************************************************************
# Copyright (c) 2016-2020, Intel Corporation
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# - Redistributions of source code must retain the above copyright notice,
# this list of conditions and the following disclaimer.
# - Redistributions in binary form must reproduce the above copyright notice,
# this list of conditions and the following disclaimer in the documentation
# and/or other materials provided with the distribution.
 IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
# THE POSSIBILITY OF SUCH DAMAGE.
# *****************************************************************************
"""
Interface of the statistics function of the Intel NumPy
Notes
-----
This module is a face or public interface file for the library
it contains:
- Interface functions
- documentation for the functions
- The functions parameters check
"""
import numpy
from dpnp.backend import *
from dpnp.dparray import dparray
from dpnp.dpnp_utils import *
import dpnp
__all__ = [
'amax',
'amin',
'average',
'cov',
'max',
'mean',
'median',
'min'
]
[docs]def amax(input, axis=None, out=None):
"""
Return the maximum of an array or maximum along an axis.
Parameters
----------
input : array_like
Input data.
axis : None or int or tuple of ints, optional
Axis or axes along which to operate. By default, flattened input is
used.
.. versionadded:: 1.7.0
If this is a tuple of ints, the maximum is selected over multiple axes,
instead of a single axis or all the axes as before.
out : ndarray, optional
Alternative output array in which to place the result. Must
be of the same shape and buffer length as the expected output.
See `ufuncs-output-type` for more details.
Returns
-------
amax : ndarray or scalar
Maximum of `a`. If `axis` is None, the result is a scalar value.
If `axis` is given, the result is an array of dimension
``a.ndim - 1``.
"""
return max(input, axis=axis, out=out)
[docs]def amin(input, axis=None, out=None):
"""
Return the minimum of an array or minimum along an axis.
Parameters
----------
input : array_like
Input data.
axis : None or int or tuple of ints, optional
Axis or axes along which to operate. By default, flattened input is
used.
.. versionadded:: 1.7.0
If this is a tuple of ints, the minimum is selected over multiple axes,
instead of a single axis or all the axes as before.
out : ndarray, optional
Alternative output array in which to place the result. Must
be of the same shape and buffer length as the expected output.
See `ufuncs-output-type` for more details.
keepdims : bool, optional
If this is set to True, the axes which are reduced are left
in the result as dimensions with size one. With this option,
the result will broadcast correctly against the input array.
If the default value is passed, then `keepdims` will not be
passed through to the `amin` method of sub-classes of
`ndarray`, however any non-default value will be. If the
sub-class' method does not implement `keepdims` any
exceptions will be raised.
initial : scalar, optional
The maximum value of an output element. Must be present to allow
computation on empty slice. See `~numpy.ufunc.reduce` for details.
.. versionadded:: 1.15.0
where : array_like of bool, optional
Elements to compare for the minimum. See `~numpy.ufunc.reduce`
for details.
.. versionadded:: 1.17.0
Returns
-------
amin : ndarray or scalar
Minimum of `input`. If `axis` is None, the result is a scalar value.
If `axis` is given, the result is an array of dimension
``input.ndim - 1``.
"""
return min(input, axis=axis, out=out)
[docs]def average(in_array1, axis=None, weights=None, returned=False):
"""
Compute the weighted average along the specified axis.
Parameters
----------
a : array_like
Array containing data to be averaged. If `a` is not an array, a
conversion is attempted.
axis : None or int or tuple of ints, optional
Axis or axes along which to average `a`. The default,
axis=None, will average over all of the elements of the input array.
If axis is negative it counts from the last to the first axis.
.. versionadded:: 1.7.0
If axis is a tuple of ints, averaging is performed on all of the axes
specified in the tuple instead of a single axis or all the axes as
before.
weights : array_like, optional
An array of weights associated with the values in `a`. Each value in
`a` contributes to the average according to its associated weight.
The weights array can either be 1-D (in which case its length must be
the size of `a` along the given axis) or of the same shape as `a`.
If `weights=None`, then all data in `a` are assumed to have a
weight equal to one. The 1-D calculation is::
avg = sum(a * weights) / sum(weights)
The only constraint on `weights` is that `sum(weights)` must not be 0.
returned : bool, optional
Default is `False`. If `True`, the tuple (`average`, `sum_of_weights`)
is returned, otherwise only the average is returned.
If `weights=None`, `sum_of_weights` is equivalent to the number of
elements over which the average is taken.
Returns
-------
retval, [sum_of_weights] : array_type or double
Return the average along the specified axis. When `returned` is `True`,
return a tuple with the average as the first element and the sum
of the weights as the second element. `sum_of_weights` is of the
same type as `retval`. The result dtype follows a genereal pattern.
If `weights` is None, the result dtype will be that of `a` , or ``float64``
if `a` is integral. Otherwise, if `weights` is not None and `a` is non-
integral, the result type will be the type of lowest precision capable of
representing values of both `a` and `weights`. If `a` happens to be
integral, the previous rules still applies but the result dtype will
at least be ``float64``.
Raises
------
ZeroDivisionError
When all weights along axis are zero. See `numpy.ma.average` for a
version robust to this type of error.
TypeError
When the length of 1D `weights` is not the same as the shape of `a`
along axis.
See Also
--------
mean
ma.average : average for masked arrays -- useful if your data contains
"missing" values
numpy.result_type : Returns the type that results from applying the
numpy type promotion rules to the arguments.
"""
is_dparray1 = isinstance(in_array1, dparray)
if (not use_origin_backend(in_array1) and is_dparray1):
if axis is not None:
checker_throw_value_error("average", "axis", type(axis), None)
if weights is not None:
checker_throw_value_error("average", "weights", type(weights), None)
if returned is not False:
checker_throw_value_error("average", "returned", returned, False)
return dpnp_average(in_array1)
input1 = dpnp.asnumpy(in_array1) if is_dparray1 else in_array1
return numpy.average(input1, axis, weights, returned)
[docs]def cov(in_array1, y=None, rowvar=True, bias=False, ddof=None, fweights=None, aweights=None):
"""
Estimate a covariance matrix, given data and weights.
Covariance indicates the level to which two variables vary together.
If we examine N-dimensional samples, :math:`X = [x_1, x_2, ... x_N]^T`,
then the covariance matrix element :math:`C_{ij}` is the covariance of
:math:`x_i` and :math:`x_j`. The element :math:`C_{ii}` is the variance
of :math:`x_i`.
See the notes for an outline of the algorithm.
Parameters
----------
m : array_like
A 1-D or 2-D array containing multiple variables and observations.
Each row of `m` represents a variable, and each column a single
observation of all those variables. Also see `rowvar` below.
y : array_like, optional
An additional set of variables and observations. `y` has the same form
as that of `m`.
rowvar : bool, optional
If `rowvar` is True (default), then each row represents a
variable, with observations in the columns. Otherwise, the relationship
is transposed: each column represents a variable, while the rows
contain observations.
bias : bool, optional
Default normalization (False) is by ``(N - 1)``, where ``N`` is the
number of observations given (unbiased estimate). If `bias` is True,
then normalization is by ``N``. These values can be overridden by using
the keyword ``ddof`` in numpy versions >= 1.5.
ddof : int, optional
If not ``None`` the default value implied by `bias` is overridden.
Note that ``ddof=1`` will return the unbiased estimate, even if both
`fweights` and `aweights` are specified, and ``ddof=0`` will return
the simple average. See the notes for the details. The default value
is ``None``.
.. versionadded:: 1.5
fweights : array_like, int, optional
1-D array of integer frequency weights; the number of times each
observation vector should be repeated.
.. versionadded:: 1.10
aweights : array_like, optional
1-D array of observation vector weights. These relative weights are
typically large for observations considered "important" and smaller for
observations considered less "important". If ``ddof=0`` the array of
weights can be used to assign probabilities to observation vectors.
.. versionadded:: 1.10
Returns
-------
out : ndarray
The covariance matrix of the variables.
See Also
--------
corrcoef : Normalized covariance matrix
Notes
-----
Assume that the observations are in the columns of the observation
array `m` and let ``f = fweights`` and ``a = aweights`` for brevity. The
steps to compute the weighted covariance are as follows::
>>> m = np.arange(10, dtype=np.float64)
>>> f = np.arange(10) * 2
>>> a = np.arange(10) ** 2.
>>> ddof = 1
>>> w = f * a
>>> v1 = np.sum(w)
>>> v2 = np.sum(w * a)
>>> m -= np.sum(m * w, axis=None, keepdims=True) / v1
>>> cov = np.dot(m * w, m.T) * v1 / (v1**2 - ddof * v2)
Note that when ``a == 1``, the normalization factor
``v1 / (v1**2 - ddof * v2)`` goes over to ``1 / (np.sum(f) - ddof)``
as it should.
Examples
--------
Consider two variables, :math:`x_0` and :math:`x_1`, which
correlate perfectly, but in opposite directions:
>>> x = np.array([[0, 2], [1, 1], [2, 0]]).T
>>> x
array([[0, 1, 2],
[2, 1, 0]])
Note how :math:`x_0` increases while :math:`x_1` decreases. The covariance
matrix shows this clearly:
>>> np.cov(x)
array([[ 1., -1.],
[-1., 1.]])
Note that element :math:`C_{0,1}`, which shows the correlation between
:math:`x_0` and :math:`x_1`, is negative.
Further, note how `x` and `y` are combined:
>>> x = [-2.1, -1, 4.3]
>>> y = [3, 1.1, 0.12]
>>> X = np.stack((x, y), axis=0)
>>> np.cov(X)
array([[11.71 , -4.286 ], # may vary
[-4.286 , 2.144133]])
>>> np.cov(x, y)
array([[11.71 , -4.286 ], # may vary
[-4.286 , 2.144133]])
>>> np.cov(x)
array(11.71)
"""
is_dparray1 = isinstance(in_array1, dparray)
if (not use_origin_backend(in_array1) and is_dparray1):
# behaviour of original numpy
if in_array1.ndim > 2:
raise ValueError("array has more than 2 dimensions")
if y is not None:
checker_throw_value_error("cov", "y", type(y), None)
if rowvar is not True:
checker_throw_value_error("cov", "rowvar", rowvar, True)
if bias is not False:
checker_throw_value_error("cov", "bias", bias, False)
if ddof is not None:
checker_throw_value_error("cov", "ddof", type(ddof), None)
if fweights is not None:
checker_throw_value_error("cov", "fweights", type(fweights), None)
if aweights is not None:
checker_throw_value_error("cov", "aweights", type(aweights), None)
return dpnp_cov(in_array1)
input1 = dpnp.asnumpy(in_array1) if is_dparray1 else in_array1
return numpy.cov(input1, y, rowvar, bias, ddof, fweights, aweights)
[docs]def max(input, axis=None, out=None):
"""
Return the maximum of an array or maximum along an axis.
Parameters
----------
input : array_like
Input data.
axis : None or int or tuple of ints, optional
Axis or axes along which to operate. By default, flattened input is
used.
.. versionadded:: 1.7.0
If this is a tuple of ints, the maximum is selected over multiple axes,
instead of a single axis or all the axes as before.
out : ndarray, optional
Alternative output array in which to place the result. Must
be of the same shape and buffer length as the expected output.
See `ufuncs-output-type` for more details.
Returns
-------
amax : ndarray or scalar
Maximum of `a`. If `axis` is None, the result is a scalar value.
If `axis` is given, the result is an array of dimension
``a.ndim - 1``.
"""
dim_input = input.ndim
is_input_dparray = isinstance(input, dparray)
if not use_origin_backend(input) and is_input_dparray:
if out is not None:
checker_throw_value_error("max", "out", type(out), None)
result = dpnp_max(input, axis=axis)
# scalar returned
if result.shape == (1,):
return result.dtype.type(result[0])
return result
input1 = dpnp.asnumpy(input) if is_input_dparray else input
# TODO need to put dparray memory into NumPy call
result_numpy = numpy.max(input1, axis=axis)
result = result_numpy
if isinstance(result, numpy.ndarray):
result = dparray(result_numpy.shape, dtype=result_numpy.dtype)
for i in range(result.size):
result._setitem_scalar(i, result_numpy.item(i))
return result
[docs]def mean(input, axis=None):
"""
Compute the arithmetic mean along the specified axis.
Returns the average of the array elements.
Parameters
----------
input : array_like
Array containing numbers whose mean is desired. If `input` is not an
array, a conversion is attempted.
axis : None or int or tuple of ints, optional
Axis or axes along which the means are computed. The default is to
compute the mean of the flattened array.
.. versionadded:: 1.7.0
If this is a tuple of ints, a mean is performed over multiple axes,
instead of a single axis or all the axes as before.
Returns
-------
m : ndarray, see dtype parameter above
If `out=None`, returns a new array containing the mean values,
otherwise a reference to the output array is returned.
"""
is_input_dparray = isinstance(input, dparray)
if not use_origin_backend(input) and is_input_dparray:
result = dpnp_mean(input, axis=axis)
# scalar returned
if result.shape == (1,):
return result.dtype.type(result[0])
return result
input1 = dpnp.asnumpy(input) if is_input_dparray else input
# TODO need to put dparray memory into NumPy call
result_numpy = numpy.mean(input1, axis=axis)
result = result_numpy
if isinstance(result, numpy.ndarray):
result = dparray(result_numpy.shape, dtype=result_numpy.dtype)
for i in range(result.size):
result._setitem_scalar(i, result_numpy.item(i))
return result
[docs]def min(input, axis=None, out=None):
"""
Return the minimum along a given axis.
Parameters
----------
input : array_like
Input data.
axis : None or int or tuple of ints, optional
Axis or axes along which to operate. By default, flattened input is used.
New in version 1.7.0.
If this is a tuple of ints, the minimum is selected over multiple axes,
instead of a single axis or all the axes as before.
out : ndarray, optional
Alternative output array in which to place the result. Must be of the
same shape and buffer length as the expected output.
See ufuncs-output-type for more details.
Returns
-------
m : ndarray, see dtype parameter above
Minimum of a. If axis is None, the result is a scalar value.
If axis is given, the result is an array of dimension a.ndim - 1.
"""
dim_input = input.ndim
is_input_dparray = isinstance(input, dparray)
if not use_origin_backend(input) and is_input_dparray:
if out is not None:
checker_throw_value_error("min", "out", type(out), None)
result = dpnp_min(input, axis=axis)
# scalar returned
if result.shape == (1,):
return result.dtype.type(result[0])
return result
input1 = dpnp.asnumpy(input) if is_input_dparray else input
# TODO need to put dparray memory into NumPy call
result_numpy = numpy.min(input1, axis=axis)
result = result_numpy
if isinstance(result, numpy.ndarray):
result = dparray(result_numpy.shape, dtype=result_numpy.dtype)
for i in range(result.size):
result._setitem_scalar(i, result_numpy.item(i))
return result


Optimisation of media and growth conditions for the production of high yield biomass of Lactococcus lactis with high acidification activity
Kirjeldus
Lactococcus lactis is and important organism in producing fermented dairy products. In order to produce an effective dairy starter it is important to understand and improve growth of L. lactis in milk. What is more, it is necessary to increase biomass yield and optimize the growth conditions of industrial starter production. All the latter issues are targeted in current project in co-operation with DuPont France.


Sponsored by the Association for the Advancement of Artificial Intelligence
Westin Arlington Gateway, Arlington, Virginia, USA
November 7 – 9, 2019
Recent developments in the availability of big data and computational power are continuing to revolutionize several domains opening up new opportunities and challenges. In this symposium, we highlight three specific disciplines where AI could be used for social good
This symposium solicits paper submissions from participants (2-6 pages) in either of the three disciplines described below:
Humanitarian Relief and Development: Detecting and predicting how a crisis or conflict could develop, analyzing the impact of catastrophes in a cyber-physical society, and assisting in disaster response as well as resource allocation are of utmost importance, and the advances in AI can be utilized in many such tasks. This track will focus on all aspects of humanitarian relief operations supported by the novel use of AI ranging from enabling missing persons to be located, leveraging crowdsourced data to provide early warning for rapid response to emergencies, increasing situational awareness, to logistics and supply chain management.
Planetary Intelligence from Spaceborne Imagery: We receive petabytes of image data from satellites every day that observes atmospheric processes, vegetation, and water bodies. Due to limited data assimilation techniques in practice, only a small fraction of these are used for extracting useful, actionable insights about our planet. This track will focus on computer vision and machine learning techniques applied on different types of imagery (satellite, drone, still and video capture, RGB, multispectral, hyperspectral, combination of imaging with other modalities) to address practical applications in the environmental and social sciences such as climate and weather prediction, urban planning, transportation systems, agricultural monitoring, and socio-economic development analysis.
Responsible AI in Healthcare: Healthcare data, in general, is characterized by several data problems such as missing data, lack of standardization, incompleteness, etc. which hinders the deployment of solutions which are relevant to real-world use cases. Moreover, many AI solutions in healthcare have the "last mile problem" to deliver a practical solution. These have broader implications in the context of fairness, explainability, and transparency. This track will focus on a broad range of AI healthcare applications and challenges encountered including but not limited to: automation bias, prescriptive AI models, explainability, privacy and security, transparency, decision rights, and so on, especially in the context of deployment of AI in healthcare.
Papers (2-6 pages) of the following flavors are sought:


{% extends 'disturbance/emails/base_email.html' %} {% block content %} The Proposal {{ proposal.lodgement_number }} has been assessed and has been recommended for approval.
Title: {{proposal.title}}
Activity: {{proposal.activity}}
Region: {{proposal.region}}
{% if proposal.district %}
District:{{proposal.district}}
{% else %}
District: -
{% endif %}
Approved:
Start date: {{ start_date }}
Expiry date: {{ expiry_date }}
Details: {{ details }}
{% endif %}You can access this Proposal using the following link:
Access Proposal {% endblock %}


| About Dailyrotten |
|
Feedback
If you like this page, hate it, or would like to suggest changes,
<EMAIL_ADDRESS>is listening. This page
is experimental and somewhat different from what we usually offer, so please
do send your feedback.
Adding Stories
If you are a rotten newshound and you would like to suggest a story,
visit our submit page to
send us the URL. Stories that are accepted will have your name credited.
Posting Comments
In order to post comments to stories, you will have to
create an account.
Accounts will generally be validated within 24 hours, and of
course will be disabled if there is abuse.
Viewership
On the first full day this page went live, 100,000 people visited this Rotten
News page. Of course that was the day after the WTC attacks, so that number is
somewhat distorted. Right now this page gets between 50,000 and 75,000 people
every day.
Linking
We encourage everyone to link to this page; if you like it, others probably
will as well.
 Korean comedian Hwang Seung-hwan, whose act is
a buffoonish transvestite, has been offered one billion won
to make the act that much more realistic. Apparently, the answer is
no, Hwang likes his penis too much. Wimp.
|
|
Read article...
|
|
FBI developing virus to fight encryption
MSNBC | Submitted by: rbw
It can be difficult, and often impossible, to decrypt data that has been
deliberately encoded on a PC. Furthermore there is absolutely no way to stop
the use of encryption products, since the "genie is already out of the bottle."
So one tact the FBI is using against encryption is the development of viruses
that will fool users into tapping their own keystrokes, and sending the
passwords to law enforcement. Alternatively, the software can be installed on
a target PC by black-bag job-- breaking and entering.
|
|
Read article...
|
|
Coat hanger caught in throat
Reuters | Submitted by: anonymous
"A Kansas man who got a coat hanger stuck in his throat while trying
to dislodge a balloon of cocaine he had swallowed faced possible criminal
charges after doctors trying to remove the hanger discovered the drugs,
police said Tuesday."
|
|
Read article...
|
|
Depleted Uranium can be nasty
Iraqi News Agency | Submitted by: mauri
Nearly a million depleted uranium (DU) rounds were expended by Allied
forces during the Gulf War, and additional rounds were fired in Bosnia and
Serbia more recently. Since its specific gravity is nearly twice that
of lead, it is indeed ideal for projectiles against armor or fortified
concrete installations. But also, expending such rounds will cause Leukemia
or other serious illness in both those firing (130,000 Gulf War veterans
have maladies that are otherwise difficult to explain) and as collateral
damage in the target vicinity. Here, we link to Iraqi propaganda-- take it
on face value, as Iraqi propaganda, realizing that it may not
actually be what it claims to be. [contains graphic image]
|
|
Read article...
|
|
Hazing in India
Yahoo India News | Submitted by: Soylent
In India, hazing is called "ragging" and is even more prevalent than
in the United States. And the Prohibition of Ragging Act and the
actions of various university Anti Ragging Committees have done
little to stop even the extreme: "Seniors at the Gandhi Medical College
allegedly forced women-freshers to undress at Necklace Road and blow
kisses to them and asked boys to indulge in oral sex." Freshers!
|
|
Read article...
|
|
They blew up kitty
Sacramento Bee | Submitted by: Soylent
Two teens were arrested for attempting to destroy a kitten:
"Doctors also found M-80 fireworks still strapped with electrical tape
to the left side of the cat's neck. The M-80 that detonated left deep,
penetrating wounds." The second story is an allegation by childhood
friends of George W Bush that he blew up frogs with firecrackers.
|
|
Read article... and
This article...
|
|
|
|
|


Ocean [ad10], ocean, in Crystal Sea
Last updated Turn #128
Ocean [ad10], ocean, in Crystal Sea
------------------------------------------------------------------------
3: Sirocco Traveller [ja8y], ship, 10 hulls, 1 rowing port, 30 sails,
3: 4% damaged, arrived from Ocean [ad11], owner:
3: Toulouse [h1q], Pen, with one worker, 32 sailors
4: Sirocco Traveller [ja8y], ship, 10 hulls, 1 rowing port, 30 sails,
4: 4% damaged, departed for Ocean [ad09].
30: The fog has cleared.
Routes leaving Ocean:
North, to Ocean [ac10], 6 days
East, to Ocean [ad11], 6 days
South, to Ocean [ae10], 6 days
West, to Ocean [ad09], 6 days


| Top |
| #define | SOUP_METHOD_OPTIONS |
| #define | SOUP_METHOD_GET |
| #define | SOUP_METHOD_HEAD |
| #define | SOUP_METHOD_PUT |
| #define | SOUP_METHOD_POST |
| #define | SOUP_METHOD_DELETE |
| #define | SOUP_METHOD_TRACE |
| #define | SOUP_METHOD_CONNECT |
| #define | SOUP_METHOD_PROPFIND |
| #define | SOUP_METHOD_PROPPATCH |
| #define | SOUP_METHOD_MKCOL |
| #define | SOUP_METHOD_COPY |
| #define | SOUP_METHOD_MOVE |
| #define | SOUP_METHOD_LOCK |
| #define | SOUP_METHOD_UNLOCK |
soup-method.h contains a number of defines for standard HTTP and
WebDAV headers. You do not need to use these defines; you can pass
arbitrary strings to soup_message_new()
if you prefer.
The thing that these defines are useful for is
performing quick comparisons against SoupMessage's method
field;
because that field always contains an interned string, and these
macros return interned strings, you can compare method
directly
against these macros rather than needing to use strcmp()
. This is
most useful in SoupServer handlers. Eg:
1 2 3 4 |
if (msg->method != SOUP_METHOD_GET && msg->method != SOUP_METHOD_HEAD) { soup_message_set_status (msg, SOUP_METHOD_NOT_IMPLEMENTED); return; } |
#define SOUP_METHOD_OPTIONS _SOUP_INTERN_METHOD (OPTIONS)
"OPTIONS" as an interned string.
#define SOUP_METHOD_DELETE _SOUP_INTERN_METHOD (DELETE)
"DELETE" as an interned string.
#define SOUP_METHOD_TRACE _SOUP_INTERN_METHOD (TRACE)
"TRACE" as an interned string.
#define SOUP_METHOD_CONNECT _SOUP_INTERN_METHOD (CONNECT)
"CONNECT" as an interned string.
#define SOUP_METHOD_PROPFIND _SOUP_INTERN_METHOD (PROPFIND)
"PROPFIND" as an interned string.
#define SOUP_METHOD_PROPPATCH _SOUP_INTERN_METHOD (PROPPATCH)
"PROPPATCH" as an interned string.
#define SOUP_METHOD_MKCOL _SOUP_INTERN_METHOD (MKCOL)
"MKCOL" as an interned string.


Nic Broeking, Frederik Lohner, Emily Randall, Peizhe Cao
Welcome to the San Fran parking Garages Web App. Navigate to either see a list of open parking garages or to see them in a map view. Parking has never been easier!
Image Source: http://cdn.lamborghini.com/content/models/veneno/gallery/gallery_veneno01_1920x1080.jpg


|
JavaTM 2 Platform Standard Ed. 5.0 |
|||||||||
| PREV LETTER NEXT LETTER | FRAMES NO FRAMES |
double
value that is closer than any other to
e, the base of the natural logarithms.
double
value that is closer than any other to
e, the base of the natural logarithms.
Cursor.E_RESIZE_CURSOR
.
m
elements with normal basis.
m
elements with
polynomial basis.
m
elements with
polynomial basis.
p
.
stdName
in order to generate the corresponding
(precomputed) elliptic curve domain parameters.
JPasswordField
has a character
set for echoing.
x
and affine y-coordinate y
.
editable
.
row
and
column
, if those indices are in the valid range, and
the cell at those indices is editable.
row
and
column
, if those indices are in the valid range, and
the cell at those indices is editable.
editingContainer
.
editorComponent
.
Component
that is handling the editing.
UndoableEdit
s
undone/redone en masse by this CompoundEdit
.
Element
interface represents an element in an HTML or XML
document.Element
.
tag
.
Ellipse2D
class describes an ellipse that is defined
by a bounding rectangle.Double
class defines an ellipse specified
in double
precision.Ellipse2D
, initialized to
location (0, 0) and size (0, 0).
Ellipse2D
from the
specified coordinates.
Float
class defines an ellipse specified
in float
precision.Ellipse2D
, initialized to
location (0, 0) and size (0, 0).
Ellipse2D
from the
specified coordinates.
field
and the coefficients a
and
b
.
field
, the coefficients a
and
b
, and the seed
used for curve generation.
Stack
class to indicate
that the stack is empty.EmptyStackException
with null
as its error message string.
setEnabled(boolean)
.
setEnabled(boolean)
.
setEnabled(boolean)
.
setEnabled(boolean)
.
java.awt.Component.setEnabled(boolean)
.
application/x-www-form-urlencoded
format using a specific encoding scheme.
decode
method.
Codec
.
DataFlavor
for use as a String
native.
String
native.
Encoder
is a class which can be used to create
files or streams that encode the state of a collection of
JavaBeans in terms of their public APIs.EncryptedPrivateKeyInfo
type
as defined in PKCS #8.EncryptedPrivateKeyInfo
from
its ASN.1 encoding.
EncryptedPrivateKeyInfo
from the
encryption algorithm name and the encrypted data.
EncryptedPrivateKeyInfo
from the
encryption algorithm parameters and the encrypted data.
inProgress
to false.
Action
for moving the caret
to the end of the document.
prepareInsertEmpty
.
Action
for moving the caret
to the end of a line.
Action
for moving the caret
to the end of a paragraph.
replacePixels
.
undoableEditHappened
in all listeners.
prepareWriteEmpty
.
prepareWriteSequence
.
SSLEngine
using this context.
SSLEngine
using this context.
Entry
for the specified
alias
is an instance or subclass of the specified
entryClass
.
inStream
.
inStream
.
CertPath
object and initializes it with
the data read from the InputStream
inStream.
CertPath
object and initializes it with
the data read from the InputStream
inStream.
CertPath
object and initializes it with
a List
of Certificate
s.
inStream
.
inStream
.
sharedSecret
, beginning at offset
inclusive.
SecretKey
object from the
provided key specification (key material).
output
buffer, starting at outputOffset
inclusive.
Collection
of Certificate
s that
match the specified selector.
CertPath
encodings supported
by this certificate factory, with the default encoding first.
SSLSessionContext
object for
this context.
Collection
of CRL
s that
match the specified selector.
KeyStore.Entry
for the specified alias
with the specified protection parameter.
update
or doFinal
operation, given the input length
inputLen
(in bytes).
engineGenExemptionBlob
operation, given the input length inputLen
(in bytes).
SSLSessionContext
object for
this context.
ServerSocketFactory
object for
this context.
SocketFactory
object for this
context.
paramSpec
.
params
and
decodes them according to the specified decoding format.
setCertificateEntry
,
or created by a call to setEntry
with a
TrustedCertificateEntry
.
setKeyEntry
,
or created by a call to setEntry
with a
PrivateKeyEntry
or a SecretKeyEntry
.
KeyStore.LoadStoreParameter
.
KeyStore.Entry
under the specified alias.
engineSetParameter
.
outbuf
, starting at
offset
.
KeyStore.LoadStoreParmeter
.
len
bytes in input
,
starting at offset
inclusive.
input.remaining()
bytes in the ByteBuffer
input
, starting at input.position()
.
ensureFileIsVisible
method on each UI handled by this object.
int
used by updateCurrentCursor()
indicating that the Cursor
has entered a DropTarget
.
Entity
.
EntityReference
.
EntityReference
nodes may be used to represent an entity
reference in the tree.Entry
for the specified
alias
is an instance or subclass of the specified
entryClass
.
Set
view of the mappings contained
in this RenderingHints
.
Set
view of the mappings contained in this map.
TabularDataSupport
instance.
EnumControl
provides control over a set of
discrete possible values, each represented by an object.EnumControl.Type
inner class identifies one kind of
enumerated control.Map
implementation for use with enum type keys.Set
implementation for use with enum types.Environment
object for this request.
Request
operations to make exceptions available to the client.EOFException
with null
as its error detail message.
EOFException
with the specified detail
message.
Query.eq(javax.management.ValueExp, javax.management.ValueExp)
query.
Any
object and the
given Any
object.
TypeCode
object with the given one,
testing for equality.
AlphaComposite
.
BasicStroke
by first testing if it is a BasicStroke
and then comparing
its width, join, cap, miter limit, dash, and dash phase attributes with
those of this BasicStroke
.
Color
.
Object
to this DataFlavor
for equality.
DataFlavor
to this DataFlavor
for
equality.
hashCode()
contract,
use isMimeTypeEqual(String)
instead.
Font
object to the specified
Object
.
GlyphVector
exactly
equals this GlyphVector
.
ImageGraphicAttribute
to the specified
Object
.
ImageGraphicAttribute
to the specified
ImageGraphicAttribute
.
NumericShaper
and shapes identically to this one.
ShapeGraphicAttribute
to the specified
Object
.
ShapeGraphicAttribute
to the specified
ShapeGraphicAttribute
.
true
if the specified Object
is a
TextHitInfo
and equals this TextHitInfo
.
true
if the specified TextHitInfo
has the same charIndex
and isLeadingEdge
as this TextHitInfo
.
true
if the specified Object
is a
TextLayout
object and if the specified Object
equals this TextLayout
.
true
if the two layouts are equal.
true
if this AffineTransform
represents the same affine coordinate transform as the specified
argument.
Area
objects
are equal.
Object
is
equal to this Rectangle2D
.
Object
is an instance of
ColorModel
and if it equals this
ColorModel
.
Object
is an instance
of PackedColorModel
and equals this
PackedColorModel
.
Object
with this
RenderingHints
for equality.
PropertyDescriptor
against the specified object.
PropertyDescriptor
against the specified object.
true
if and only if the argument is not
null
and is a Boolean
object that
represents the same boolean
value as this object.
Subset
objects for equality.
Constructor
against the specified object.
Field
against the specified object.
Method
against the specified object.
MarshalledObject
to another object.
ObjID
for
equality.
UID
for
equality.
Timestamp
object is
equal to the given Timestamp
object.
Timestamp
object is
equal to the given object.
SimpleDateFormat
for
equality.
Calendar
to the specified
Object
.
GregorianCalendar
to the specified
Object
.
SimpleTimeZone
objects.
true
if the given Object
is
an ImageTypeSpecifier
and has a
SampleModel
and ColorModel
that are
equal to those of this object.
obj
parameter with this ArrayType
instance for equality.
CompositeData
instance for equality.
CompositeDataSupport
instance for equality.
obj
parameter with this CompositeType
instance for equality.
OpenMBeanAttributeInfo
instance for equality.
OpenMBeanAttributeInfoSupport
instance for equality.
OpenMBeanConstructorInfo
instance for equality.
OpenMBeanConstructorInfoSupport
instance for equality.
OpenMBeanInfo
instance for equality.
OpenMBeanInfoSupport
instance for equality.
OpenMBeanOperationInfo
instance for equality.
OpenMBeanOperationInfoSupport
instance for equality.
OpenMBeanParameterInfo
instance for equality.
OpenMBeanParameterInfoSupport
instance for equality.
obj
parameter with this
open type instance for equality.
obj
parameter with this SimpleType
instance for equality.
TabularData
instance for equality.
TabularDataSupport
instance for equality.
obj
parameter with this TabularType
instance for equality.
JMXPrincipal
for equality.
Stub.equals(java.lang.Object)
.
PrivateCredentialPermission
objects for
equality.
Subject
for equality.
Object
with this
X500Principal
for equality.
true
if the objects are identical.
true
if
they are identical.
true
if the objects are identical.
TabSet
is equal to another one.
Duration
object.
obj
is "equal to" this one.
QName
for equality with another
Object
.
GSSName
objects to determine if they refer to the
same entity.
GSSName
object to another Object that might be a
GSSName
.
ObjectImpl
object with the given one
for equality.
String
to another String
,
ignoring case considerations.
TypeCode
object is
equivalent to this TypeCode
object.
get
and set
indicating the
era, e.g., AD or BC in the Julian calendar.
Error
is a subclass of Throwable
that indicates serious problems that a reasonable application
should not try to catch.null
as its detail message.
PrinterStateReason
is an
"error" (most severe).
setErrorListener
method to register an instance of the
implmentation with the Transformer
.establish_components
operation on all registered IORInterceptor
instances
when it is assembling the list of components that will be included
in the profile or profiles of an object reference.
FilteredRowSet
object
internal methods (not public) that control the RowSet
object's
cursor moving from row to the next.
FilteredRowSet
object
to check whether the value lies between the filtering criterion (or criteria
if multiple constraints exist) set using the setFilter()
method.
FilteredRowSet
object
to check whether the value lies between the filtering criteria set
using the setFilter method.
XPath
expression in the specified context and return the result as the specified type.
String
.
InputSource
and return the result as the specified type.
InputSource
and return the result as a String
.
String
.
InputSource
and return the result as the
specified type.
InputSource
and return the result as a
String
.
Event
class is obsolete and is
available only for backwards compatilibility.Event
class is obsolete and is
available only for backwards compatilibility.
Event
class is obsolete and is
available only for backwards compatilibility.
Event
class is obsolete and is
available only for backwards compatilibility.
Event
interface is used to provide contextual information
about an event to the handler processing the event.EventException
as specified in
their method descriptions.EventHandler
class provides
support for dynamically generating event listeners whose methods
execute a simple statement involving an incoming event object
and a target object.EventHandler
object;
you generally use one of the create
methods
instead of invoking this constructor directly.
EventListener
interface is the primary method for
handling events.EventQueue
is a platform-independent class
that queues events, both from the underlying peer classes
and from trusted application classes.DragGestureRecognizer
"recognized" as a "gesture" that triggers a drag.
EventTarget
interface is implemented by all
Nodes
in an implementation which supports the DOM Event
Model.Any
instance that contains the actual user exception thrown
by the server.
Exception
and its subclasses are a form of
Throwable
that indicates conditions that a reasonable
application might want to catch.null
as its detail message.
Environment
object.
Environment
object.
ExceptionInInitializerError
with
null
as its detail message string and with no saved
throwable object.
ExceptionInInitializerError
class by
saving a reference to the Throwable
object thrown for
later retrieval by the ExceptionInInitializerError.getException()
method.
Request
operations to
describe the exceptions that can be thrown by a method.ExceptionList
object for this request.

Area
to be the combined area
of its current shape and the shape of the specified Area
,
minus their intersection.
PreparedStatement
object,
which may be any kind of SQL statement.
CachedRowSet
object with data, using the
given connection to produce the result set from which the data will be read.
RowSet
object with data.
PreparedStatement
object
and returns the ResultSet
object generated by the query.
ResultSet
object.
PreparedStatement
object,
which must be an SQL INSERT
, UPDATE
or
DELETE
statement; or an SQL statement that returns nothing,
such as a DDL statement.
INSERT
,
UPDATE
, or DELETE
statement or an
SQL statement that returns nothing, such as an SQL DDL statement.
Statement
object
should be made available for retrieval.
Runnable
tasks.CompletionService
that uses a supplied Executor
to execute tasks.LinkedBlockingQueue
as a completion queue.
Executor
, ExecutorService
, ScheduledExecutorService
, ThreadFactory
, and Callable
classes defined in this
package.Executor
that provides methods to manage termination and
methods that can produce a Future
for tracking progress of
one or more asynchronous tasks.ExemptionMechanism
class.double
value.
double
value.
ExportException
is a RemoteException
thrown if an attempt to export a remote object fails.ExportException
with the specified
detail message.
ExportException
with the specified
detail message and nested exception.
Preferences.exportNode(OutputStream)
.
exportObject
method may be invoked explicitly
by an "activatable" object, that does not extend the
Activatable
class, in order to both a) register
the object's activation descriptor, constructed from the supplied
location
, and data
, with
the activation system (so the object can be activated), and
b) export the remote object, obj
, on a specific
port (if port=0, then an anonymous port is chosen).
exportObject
method may be invoked explicitly
by an "activatable" object, that does not extend the
Activatable
class, in order to both a) register
the object's activation descriptor, constructed from the supplied
location
, and data
, with
the activation system (so the object can be activated), and
b) export the remote object, obj
, on a specific
port (if port=0, then an anonymous port is chosen).
PortableRemoteObject.exportObject(java.rmi.Remote)
.
Preferences.exportSubtree(OutputStream)
.
Expression
object represents a primitive expression
in which a single method is applied to a target and a set of
arguments to return a result - as in "a.getFoo()"
.Statement
object with a target
,
methodName
and arguments
as per the parameters.
Expression
object for a method
that returns a result.
Name
object for Extension-Name
manifest attribute
used for declaring dependencies on installed extensions.
Name
object for Extension-List
manifest attribute
used for declaring dependencies on installed extensions.
Name
object for Extension-Name
manifest attribute
used for declaring dependencies on installed extensions.
Any
object in this
Any
object's value
field.
boolean
in this
Any
object's value
field.
char
in this
Any
object's value
field.
double
in this
Any
object's value
field.
java.math.BigDecimal
object in this
Any
object's value
field.
float
in this
Any
object's value
field.
int
in this
Any
object's value
field.
long
in this
Any
object's value
field.
org.omg.CORBA.Object
in this
Any
object's value
field.
byte
in this
Any
object's value
field.
short
in this
Any
object's value
field.
Streamable
from this Any
object's
value
field.
String
object in this
Any
object's value
field.
TypeCode
object in this
Any
object's value
field.
int
in this
Any
object's value
field.
long
in this
Any
object's value
field.
short
in this
Any
object's value
field.
java.io.Serializable
object in this
Any
object's value
field.
char
in this
Any
object's value
field.
String
object in this
Any
object's value
field.
String
s containing the class names of
any additional image metadata formats supported by this
plug-in, initially null
.
String
s containing the names of any
additional image metadata formats supported by this plug-in,
initially null
.
IIOMetadataFormat
and representing the metadata formats, other than the standard and
native formats, that are supported by this plug-in,
initialized to null
and set via the constructor.
null
and set via the constructor.
String
s containing the class names of
any additional stream metadata formats supported by this plug-in,
initially null
.
String
s containing the names of any
additional stream metadata formats supported by this plug-in,
initially null
.
|
JavaTM 2 Platform Standard Ed. 5.0 |
|||||||||
| PREV LETTER NEXT LETTER | FRAMES NO FRAMES |
Copyright © 2004, 2010 Oracle and/or its affiliates. All rights reserved. Use is subject to license terms. Also see the documentation redistribution policy.


SPX Canvas Particles
See source for configuration options.
Generate infinite particle stream or a burst of them.
Emitter position, gravity, wind, fade and other various options can be configured for different effects.
Demo 1 |
Demo 2 |
Demo 3 |
Demo 4 |
Demo 5
tuomo@smartpx.fi


vignettes/how-to-use-crul.Rmd
how-to-use-crul.Rmd
The following aims to help you decide how to use crul
in different scenarios.
First, crul
is aimed a bit more at developers than at the casual user doing HTTP requests. That is, crul
is probably a better fit for an R package developer, mainly because it heavily uses R6
- an interface that’s very unlike the interface in httr
but very similar to interacting with classes in Ruby/Python.
Second, there is not yet, but will be soon, the ability to mock HTTP requests. We are working on that, and should have it integrated soon. When that feature arrives we’ll update this vignette.
Load the library
Most likely you’ll want to do a GET
request - so let’s start with that - though the details are not much different for other HTTP verbs.
And in most cases you’ll likely not want to do asynchronous requests - though see below if you do.
You’ll probably want to write a small function, like so (annotated for clarity)
make_request <- function(url) {
# create a HttpClient object, defining the url
cli <- crul::HttpClient$new(url = url)
# do a GET request
res <- cli$get()
# check to see if request failed or succeeded
# - if succeeds this will return nothing and proceeds to next step
res$raise_for_status()
# parse response to plain text (JSON in this case) - most likely you'll
# want UTF-8 encoding
txt <- res$parse("UTF-8")
# parse the JSON to an R list
jsonlite::fromJSON(txt)
}
Use the function
make_request("https://httpbin.org/get")
#> $args
#> named list()
#>
#> $headers
#> $headers$Accept
#> [1] "application/json, text/xml, application/xml, */*"
#>
#> $headers$`Accept-Encoding`
#> [1] "gzip, deflate"
#>
#> $headers$Host
#> [1] "httpbin.org"
#>
#> $headers$`User-Agent`
#> [1] "libcurl/7.54.0 r-curl/3.3 crul/0.7.4"
#>
#>
#> $origin
#> [1] "<IP_ADDRESS>, <IP_ADDRESS>"
#>
#> $url
#> [1] "https://httpbin.org/get"
Now you can use the make_request
function in your script or package.
Once you get more familiar (or if you’re already familiar with HTTP) you may want to have more control, toggle more switches.
In the next function, we’ll allow for users to pass in curl options, use a custom HTTP status checker, and xxx.
make_request2 <- function(url, ...) {
# create a HttpClient object, defining the url
cli <- crul::HttpClient$new(url = url)
# do a GET request, allow curl options to be passed in
res <- cli$get(...)
# check to see if request failed or succeeded
# - a custom approach this time combining status code,
# explanation of the code, and message from the server
if (res$status_code > 201) {
mssg <- jsonlite::fromJSON(res$parse("UTF-8"))$message$message
x <- res$status_http()
stop(
sprintf("HTTP (%s) - %s\n %s", x$status_code, x$explanation, mssg),
call. = FALSE
)
}
# parse response
txt <- res$parse("UTF-8")
# parse the JSON to an R list
jsonlite::fromJSON(txt)
}
Use the function
make_request2("https://api.crossref.org/works?rows=0")
#> $status
#> [1] "ok"
#>
#> $`message-type`
#> [1] "work-list"
#>
#> $`message-version`
#> [1] "1.0.0"
#>
#> $message
#> $message$facets
#> named list()
#>
#> $message$`total-results`
#> [1] 103966337
#>
#> $message$items
#> list()
#>
#> $message$`items-per-page`
#> [1] 0
#>
#> $message$query
#> $message$query$`start-index`
#> [1] 0
#>
#> $message$query$`search-terms`
#> NULL
No different from the first function (besides the URL). However, now we can pass in curl options:
make_request2("https://api.crossref.org/works?rows=0", verbose = TRUE)
make_request2("https://api.crossref.org/works?rows=0", timeout_ms = 1)
We can also pass named parameters supported in the get
method, including query
, disk
, and stream
.
make_request2("https://api.crossref.org/works", query = list(rows = 0))
#> $status
#> [1] "ok"
#>
#> $`message-type`
#> [1] "work-list"
#>
#> $`message-version`
#> [1] "1.0.0"
#>
#> $message
#> $message$facets
#> named list()
#>
#> $message$`total-results`
#> [1] 103966680
#>
#> $message$items
#> list()
#>
#> $message$`items-per-page`
#> [1] 0
#>
#> $message$query
#> $message$query$`start-index`
#> [1] 0
#>
#> $message$query$`search-terms`
#> NULL
In addition, the failure behavior is different, and customized to the specific web resource we are working with
You may want to use asynchronous HTTP requests when any one HTTP request takes “too long”. This is of course all relative. You may be dealing with a server that responds very slowly, or other circumstances.
See the async with crul vignette for more details on asynchronous requests.


--- layout: default title: Open Data Manual ---
Every document is a work in progress. Look for these badges to find out the development status of each document:
A short phase in which we start researching the needs of the document's users, find out what we should be measuring, and explore technological or policy-related constraints.
A short phase in which we prototype solutions for the document. We’ll be testing with a small group of users or stakeholders and getting early feedback about the document's content and layout.
We’re developing against the demands of a live environment, understanding how to review and revise while meeting user needs. We’ll also be releasing a version to test in public.
The document is considered "in effect", however work doesn’t stop at this stage. We’ll be iteratively improving the document, reacting to new needs and demands, and keeping track of the changes as we go.


Real-Life Minecraft Mobs Appear to Celebrate Minecraft Earth
by Alistair JonesIn celebration of Minecraft Earth’s continued early access rollout, Microsoft has unveiled ‘Mobs in the Park’. The event, which was announced at X019, will give players in London, Sydney, and New York access to an exclusive new in-game adventure, starting this weekend.
Life-size statues of the Muddy Pig, Moobloom, and brand-new (and extremely festive) Jolly Llama have arrived in three locations; Hudson Yard in New York City, Queen’s Walk in London, and Campbell’s Cove in Sydney. They’ll be available from 10:00 to 19:00 local time on the 16/17, 23/24, and 30 November - 1 December, with a bonus New York pop-up on Black Friday.
When you find the mobs, scanning the QR code on the Jolly Llama will unlock a new adventure developed by the Minecraft Earth team. Completing that adventure will grant players exclusive early access to the new mob in-game, ahead of its official release next month. If you can’t be there in-person, the Llama will arrive in the game after the event ends in a few weeks’ time.
Featured image: Minecraft Earth/Twitter


| Home | About Me | Portfolio | Contact Me | Blog |
| About Me! | |||||
|---|---|---|---|---|---|
BackgroundI am from Darien, Connecticut. |
InterestsI have many hobbies: I love to cook and volunteering to tutor! |
EducationI went high school in Darien Connecticut, at Darien High School. I attended the George Washington University and studied Art History and Journalism and Mass Communications. I am currently in Dev Bootcamp and plan on graduating in May of 2016. I hope to continue finishing my degree at a school more geared towards my interests in tech and the arts. |
You Would Never KnowI have 6 siblings and basically live in a modern day brady bunch family! |
| Recent Blog Posts | ||||
|---|---|---|---|---|
|
Blog Post 1
Blog Post Snippet |
Blog Post 2
Blog Post Snippet |
Blog Post 3
Blog Post Snippet |
Blog Post 4
Blog Post Snippet |
Blog Post 5
Blog Post Snippet |
Search This Site:


[gecode-users] Extra information during propagation
Vincent Barichard
Vincent.Barichard at univ-angers.fr
Fri Jan 23 22:08:48 CET 2009
Le vendredi 23 janvier 2009 09:45:57 Christian Schulte, vous avez écrit :
> Hmmm, I would go for more info in the variables. While Gecode's variables
> are incredibly slim, a variable always will have a couple of fields (for
> Booleans it is for example 5 words, for integers at least 12) that adding
> one more field will not hurt much.
>
Ok, I will add a field to store the information I need.
> I was about to write that advisors will not work but maybe they will: if
> you have a UNIFY event and the variable operations emit that event then
> advisors should also be executed.
I would like to try this way too and compare with the first approach. So I
tried to understand exactly how advisors work. I looked at the "notify"
functions in var-imp.icc and I noticed that the "schedule" function is always
called (except for the SUBSCRIBE event). So when the advise function of a
propagator returns ES_FIX, the propagator is still scheduled. In the comments
just above the "advise" function it is said that when ES_FIX is returned, the
propagator doesn't need to be run. Is it possible for an advisor (or another
class) to cancel the scheduling of a propagator?
Furthermore, I tried to ES_SUBSUMED a propagator within its "advise" function
but the propagator still exists when I print the actor list of the Space.
Nevertheless, I succeeded to ES_SUBSUMED the same propagator within its
"propagate" function. So is it possible to ES_SUBSUMED a propagator within its
"advise" function?
Thank you for your help, I learn every day by digging inside the code of
GeCode :-)
>
> Honestly, what you try to do sounds very scary to me and Gecode has not
> been designed with something like that in mind. But: good luck!
I like scary things :-)
Cheers,
Vincent
>
> Cheers
> Christian
>
> --
> Christian Schulte, www.ict.kth.se/~cschulte/
>
>
> -----Original Message-----
> From: users-bounces at gecode.org [mailto:users-bounces at gecode.org] On Behalf
> Of Vincent Barichard
> Sent: Thursday, January 22, 2009 6:16 PM
> To: Christian Schulte; users at gecode.org
> Subject: Re: [gecode-users] Extra information during propagation
>
> Hi Christian,
>
> Le mercredi 21 janvier 2009 10:39:22 Christian Schulte, vous avez écrit :
> > Hi Vincent,
> >
> > basically you want to have equivalence (or even equality) reasoning in
> > Gecode. Gecode has been explicitly designed to not deal with it. Prior
> > systems (logic programming based systems such as SICStus, Eclipse,
> > Mozart, ...) do have equality reasoning (but typically with lots of
> > restrictions
>
> if
>
> > not bugs). However my own experience has been that it is not useful
> > enough (from a general perspective) and the chosen implementation
> > technology (maintaining equivalence classes) is totally ill matched to
> > performing propagation efficiently.
>
> I agree. I don't want to perform a full equality reasoning.
>
> > What would be possible on a general level is to use a substitution based
> > approach. We know how to do it but it is a lot of work.
>
> That's why I think about a "rewrite" approach where propagators are
> rewritten
> when they detect that two of their variables are the same.
>
> > Okay that was just the background info and the answer that there is no
> > general way and just fixing something in Gecode will not do the trick.
> >
> > Then what you might want to do is to define a new type of variables
> > yourself that just extends Gecode variables by an additional level of
> > indirection to do equivalence reasoning.
>
> I began something like that. I have a new type of variables and propagators
> over these variables.
> When a variable has been found equal to another, I post a "domain equality"
> propagator which ensures that the domains will be always equal. So, normal
> propagators will be scheduled when domain of one of the two equal
> variables
>
> will be updated.
>
> Furthermore, a UNIFY event is emitted. But propagators which are able to
> deal
> with this event have to know which are the equal variables. How to get this
> piece of information from the propagators?
> I think about advisors (with the Delta parameter), but I don't know if it
> is
>
> the right choice. I also think about creating an additional field in my new
> variable type, but It will increase the size of the variable (so it will
> lead
> to increase the cloning time).
> I am not sure of how to proceed to get the best efficiency.
>
> > Hope that helps
>
> Yes it helps a lot. Thank you very much.
> Vincent
>
>
>
> _______________________________________________
> Gecode users mailing list
> users at gecode.org
> https://www.gecode.org/mailman/listinfo/gecode-users
--
Vincent Barichard Université d'Angers (LERIA)
Tel: 02 41 73 52 06 Département Informatique
Fax: 02 41 73 50 73 H203
More information about the gecode-users
mailing list


Overview
Incremental Search
Chemr has fuzzy matched incremental search. You can query any old how.
On-demand Indexers
Chemr includes indexing system for generating index. You can index any web sites on your demand.
Built on Electron
Chemr is developed with standard web technologies: HTML, CSS, JavaScript. So you can modify this very easily.
Screenshots
OS X
Windows
Download
Build from source
Or create your own build with following:
Install Development Tools
Install Electron and Build Tools
npm -g install electron-prebuilt electron-packager electron-builder
Clone Repository
git clone https://github.com/cho45/Chemrtron.git
Package
sh dev/package.sh
Packaged application is located under build/releases
Packaged release
For Mac
For Windows or Mac
Usage
Introduction
- Enable indexer at settings dialog.
- Start initial indexing by selecting icon.
- Ready to query.
Select Index
Press Control + Enter to open select index dialog.
Or Alt + [Number] / Command + [Number] for selecting index directly.
Keyboard shortcuts
| Alt + Space | (Global) Default shortcut key for activating Chemr window. This is customizable on settings. |
|---|---|
| ⌘L Control + L |
Focus to query text area. |
|
Control + N ↓ |
Select next item. |
|
Control + P ↑ |
Select previous item. |
| Control + U | Clear current query. |
| ⌘↵ Control + Enter |
Open index selection dialog. |
| ⌘[ Control + [ |
Back navigation. |
| ⌘] Control + ] |
Forward navigation. |
| ⌘[Numer] Control + [Number] |
Select index by index. |
Reindex by hand
To reindex by hand for updating to latest index. Right click or double click index icon and open menu by clicking gear icon.
Including Indexers
Create New Indexer
The indexer definition files is written in JavaScript and load from following paths:
- $HOME/.chemr/indexers/*.js
- $APP_ROOT/indexers/*.js
You can put your own indexer to $HOME/.chemer/indexers/.
Indexer definition file
This is a sample indexer definition for PHP:
indexer = {
id: 'php',
name: 'PHP',
index : function (ctx) {
return ctx.fetchDocument('http://www.php.net/manual/en/indexes.functions.php', { srcdoc: true }).then(function (document) {
console.log(document);
var links = document.querySelectorAll('a.index');
for (var i = 0, it; (it = links[i]); i++) {
ctx.pushIndex(it.textContent, it.href);
}
});
}
};
id : string
- Unique identifier for this indexer.
name : string
- Display name. This is also used for indexer search.
index : function(ctx: IndexerContext):Promise<string | null>
-
A function for creating index. Index data is following format:
[Search string]\t[URI] [Search string]\t[URI] ...
Or you can use pushIndex() on IndexerContext instead of returning string.
beforeSearch : function(query : string): string
- A function for query translator.
item : function(item: Item):Item
- Callback of item called when item will be shown.
IndexerContext
IndexerContext is passed as index()
argument.
pushIndex(name: string, url: string)
-
Add specified index to current context index.
You do not return any value from a promise returned from
index()
. Chemr will generate index string from current context index. fetchDocument(url: string: opts: Object):Promise<HTMLDocument>
-
Fetche a URL and create HTMLDocument.
Specified URL is loaded to sandboxed iframe (scripting is disabled).
You may encounter with error when the target URL issues
X-Frame-Options
header. This is restriction of iframe. You can ignore that error with specifingsrcdoc: true
option toopts
.With
srcdoc: true
option,fetchDocument()
fetches a URL byfetchText()
and set its result to iframe'ssrcdoc
attribute and append<base>
element with target URL todocument.head
. This meansdocument.URL
is not more usable (this may beabout:srcdoc
). But you can load URLs which usesX-Frame-Options
. fetchJSON(url: string):Promise<any>
-
Fetch a URL by
fetchText()
and parse withJSON.parse
. fetchText(url: string):Promise<string>
-
Fetche a URL and just resolves with its
responseText
. fetchAsXHR(opts: Object):Promise<XMLHttpRequest>
-
This is raw method for
fetch*
. crawl(list: Array
, callback: function (url, doc: HTMLDocument):void):Promise<any> -
crawl
can crawl specifiedlist
which is array of URLs and callcallback
with its document.callback
function is called with specialthis
object which haspushPage(url)
method.pushPage(url)
adds tourl
to current crawl queue.
Contributing
Chemr is open source project. You can read whole code and submit patch any time.
If you can contribute to Chemr, see also CONTRIBUTING.md.
Supports
Report to github issue.
Privacy Policy
Chemr does not collect any privacy information of users.


preview:
type: swordfish
information:
Swordfish, also known as broadbill in some countries,
are large, highly migratory, predatory fish
characterized by a long, flat bill.
Swordfish are elongated, round-bodied, and lose all
teeth and scales by adulthood.
These fish are found widely in tropical and temperate
parts of the Atlantic, Pacific and Indian oceans.


Installing SAP Commerce Cloud 2011 for use with Spartacus
Note: Spartacus 3.x is no longer maintained. Please upgrade to the latest version.
Note: Spartacus 3.x was tested with SAP Commerce Cloud versions 1905 to 2105. Spartacus 3.x has not been verified to work with (and is not guaranteed to work with) SAP Commerce Cloud 2211 or later releases.
The following instructions describe how to install and configure SAP Commerce Cloud release 2011 for use with a Spartacus storefront. In these instructions, SAP Commerce Cloud is installed to your local computer, so localhost
is used in the browser URLs.
Table of Contents
- Important Disclaimers
- Installation and Configuration Instructions
- Notes
- Troubleshooting
- config.properties file
Important Disclaimers
-
Starting with release 2005, SAP Commerce Cloud ships with all users inactive and without passwords. These users may need to be restored for certain back end functionality to work. For example, although you will be able to add products to cart and check out, certain users are required to fulfill orders with Order Management as used in the default cx recipe. For more information, and for a sample ImpEx that enables such users, see Setting Passwords for Default Users on the SAP Help Portal.
-
Starting with release 1905, SAP Commerce Cloud ships without a default admin password. You must specify a password when running recipe commands, or you can specify a password in a file named
custom.properties
that is stored inCXCOMM*\installer\customconfig
. The samplecustom.properties
file included in these instructions contains the default passwordnimda
. We strongly recommend you change this password to suit your requirements, as it should not be used for production servers. -
The sample custom properties file and OCC credentials supplied here are for evaluation purposes only. Aside from a default password, for example, the CORS settings are permissive to prevent access issues. We strongly recommend that a professional SAP Commerce Cloud administrator review these settings to suit your requirements, as they should not be used for production servers.
Installation and Configuration Instructions
Summary:
- Step 1: Download, unzip, and create the new recipe
- Step 2: Build and initialize the recipe
- Step 3: Import OCC credentials
- Step 4: Update system and user credentials (optional)
Step 1: Download, unzip, and create the new recipe
- Download and unzip the following files:
- SAP Commerce Cloud 2011 from the SAP Software Downloads web site.
- Spartacus Sample Data extension from the Spartacus GitHub Release page.
- The zip file itself,
spartacussampledata.2011.zip
, is found in the the Assets section of the most recent release of thestorefront
library. - Direct link to spartacussampledata.2011.zip (newer versions of the sample data may be released in later releases)
- The zip file itself,
-
Move the file
custom.properties
fromspartacussampledata/resources/installer/customconfig
tohybris-commerce-suite-2011/installer/customconfig
.It is strongly recommend that you inspect this file’s settings using a text editor (see the notes below for more information). The contents of this file are listed at the end of this document for reference.
- In
hybris/bin
:- Create the folder
custom
. - Move the entire
spartacussampledata
folder tohybris/bin/custom
.
- Create the folder
- In the
installer/recipes
folder:- Duplicate the
cx
folder. - Change the name of the duplicate folder to
cx-for-spa
.
- Duplicate the
- In the new
cx-for-spa
folder:- Open
build.gradle
with a text editor. - Uncomment
// extName 'spartacussampledata'
in the list of extensions. - Save and close the file.
- Open
Step 2: Build and initialize the new recipe
-
Open a terminal or command prompt window inside the
installer
folder. -
Set up the recipe using the following command:
./install.sh -r cx-for-spa
If you are using Windows, change
./install.sh
toinstall.bat
. -
Initialize the system using the following command:
./install.sh -r cx-for-spa initialize
-
Start SAP Commerce Cloud using the following command:
./install.sh -r cx-for-spa start
(Using
spartacussampledata
and the fullcx
recipe, startup may take approximately 30 minutes, depending on your system.) - Verify that SAP Commerce Cloud is working. To do this, you can:
- Display the Admin Console: https://localhost:9002
- Display Backoffice: https://localhost:9002/backoffice (can take 15-20 seconds to start the first time)
- Display the Accelerator Electronics storefront: https://localhost:9002/yacceleratorstorefront/?site=electronics
- Verify that the Spartacus versions of the sample stores were created.
- Display Backoffice.
- Go to WCMS > Website. You should see “-spa” versions of the sample stores.
Step 3: Import OCC credentials
Spartacus uses OCC REST API calls to get information from and make changes to the backend. To do this, the backend must be configured with certain credentials.
-
Open the Hybris Administration Console for your local SAP Commerce Cloud, in a web browser at the following address:
https://localhost:9002
-
Point to the Console tab, then click Impex Import.
-
Copy-paste the following code into the Import content field.
INSERT_UPDATE OAuthClientDetails;clientId[unique=true] ;resourceIds ;scope ;authorizedGrantTypes ;authorities ;clientSecret ;registeredRedirectUri ;client-side ;hybris ;basic ;implicit,client_credentials ;ROLE_CLIENT ;secret ;http://localhost:9001/authorizationserver/oauth2_implicit_callback; ;mobile_android ;hybris ;basic ;authorization_code,refresh_token,password,client_credentials ;ROLE_CLIENT ;secret ;http://localhost:9001/authorizationserver/oauth2_callback;
-
Click the Import content button
You can verify that the OAuth client has been successfully defined by entering the following curl command in a terminal or command prompt window:
curl -k -d "client_id=mobile_android&client_secret=secret&grant_type=client_credentials" -X POST https://localhost:9002/authorizationserver/oauth/token
The curl command sends a POST request for an access token, using the client ID and password that you added to the back end. The command should return something similar to the following:
{
"access_token" : "550d9a25-87c8-4e76-af21-6174a1e56d5c",
"token_type" : "bearer",
"expires_in" : 41809,
"scope" : "basic openid"
}
Step 4: Update system and user credentials (optional)
You may need to enable users and passwords for certain functionality to work.
See this help topic for more information.
All Done
You can now start Spartacus. After you have configured SAP Commerce Cloud to accept OCC REST API calls, you can set up and start your storefront. See Building the Spartacus Storefront From Libraries for more information.
Notes
General
- Some of the steps in this procedure are derived from the documentation for installing SAP Commerce Cloud using recipes. For more information, see Installing SAP Commerce Using Installer Recipes in the SAP Help Portal.
- The default cx recipe is used to create the recipe for Spartacus. Among other extensions, the cx recipe uses the Order Management Services feature (OMS). If you make an order, OMS doesn’t ship the order, so orders remain in processing. To ship the order, a Warehouse Agent must confirm order shipment. For more information, see the OMS documentation.
Spartacus Sample Data Extension
- The Spartacus Sample Data extension contains both sample data modifications used by Spartacus. The extension makes a copy of the Electronics and Apparel sample stores, if present (and Powertools in a future release). If you are trying out Spartacus for the first time and intend to use the default sample data, using the Spartacus Sample Data extension is strongly recommended. However, you can use you own sample data or recipe as long as it includes extensions that support OCC APIs like
commercewebservices
. - The Spartacus Sample Data extension copies data from other storefronts, so at minimum,
electronicsstore
extension is required. You can also useapparelstore
, and when supported in the future,powertoolstore
. Note that the time to initialize is longer because SAP Commerce Cloud builds the standard stores first, then the stores for Spartacus. If you do not need all these sample stores, you can comment them out in your recipe’sbuild.gradle
file. - For more information about the changes that are implemented with the Spartacus Sample Data extension, see Spartacus Sample Data Extension.
Sample configuration properties
The sample custom properties file is meant for development and evaluation purposes only. Please be careful to at least review the following properties:
- The admin password (
initialpassword.admin
) (default isnimda
). - CORS settings as described further in this document, and in the Spartacus documentation.
The following table summarizes the settings included in this file:
| Setting | Description |
|---|---|
| initialpassword.admin | Admin password so you can access the console and Backoffice |
| occ.rewrite.overlapping.paths.enabled | Defines if certain B2B OCC calls are prefixed with ‘org’ to avoid endpoint conflicts |
| sop.post.url | Defines where to send mock payment creation requests, so you can check out |
| corsfilter* | Defines various CORS settings required for Spartacus functionality to work (see more information below) - note that the settings are permissive and should be changed to match your site configuration |
| mockup.payment.label.billTo* | Defines extra state and phone number fields for payment, used by Spartacus |
| yacceleratorordermanagement.fraud* | Increases the fraud score limits so you mock purchases are not cancelled |
| task.polling.interval.min | Defines how long the system waits to kick off a new task - smaller values speed up order processing |
| build.parallel | Speeds up initialization if your system has multiple cores |
Sample OCC credentials
By default, SAP Commerce Cloud successfully replies to OCC REST API calls that do not require authentication. For example, you can do the following:
- Display Open API documentation: https://localhost:9002/occ/v2/swagger-ui.html
- Display information about the
Electronics
base store: https://localhost:9002/occ/v2/electronics/basestores/electronics
To be able to register users and check out, SAP Commerce Cloud must be configured with a client ID and password. When required, your Spartacus storefront sends this client ID and password when communicating with the back end.
- When you import the OCC credentials ImpEx, you add the client ID
mobile_android
and password (or secret):secret
. The values for client ID and password are samples. You would use different values for your production environments. - For more information on this topic, see this help topic.
CORS Settings
- CORS settings are very important for security. We strongly recommend that a professional SAP Commerce Cloud administrator review these settings to suit your requirements, as the sample properties should not be used for production servers.
- CORS (Cross-Origin Resource Sharing) defines a way for a browser and a server to decide which cross-origin requests for restricted resources can or cannot be allowed. Certain Spartacus functionality, such as checkout and consent management, may not work properly if the CORS OCC REST API settings are not configured properly in SAP Commerce Cloud.
- You can add these settings using the Hybris Administration Console. Hover your mouse over the Platform tab, click Configuration, then update the CORS settings.
- For information on Spartacus and CORS settings, see Cross-Origin Resource Sharing (CORS).
- There are a number of other Spartacus features that also require additional CORS settings. For more information about CORS, see ycommercewebservices Extension in the SAP Help Portal.
Troubleshooting
- If SAP Commerce Cloud installer doesn’t work, make sure there are no spaces in the path to the SAP Commerce Cloud folder.
- If Spartacus starts or partially starts, check all CORS settings. For more information, see Cross-Origin Resource Sharing (CORS).
config.properties file
To use these settings, create a file named custom.properties
inside the spartacussampledata/resources/customconfig
folder, and then add the following to the file:
initialpassword.admin=nimda
sop.post.url=https://localhost:9002/acceleratorservices/sop-mock/process
occ.rewrite.overlapping.paths.enabled=true
corsfilter.default.allowedOrigins=*
corsfilter.acceleratorservices.allowedOrigins=*
corsfilter.permissionswebservices.allowedOrigins=*
corsfilter.ycommercewebservices.allowedOrigins=*
corsfilter.ycommercewebservices.allowedHeaders=origin content-type accept authorization cache-control x-anonymous-consents x-profile-tag-debug x-consent-reference
corsfilter.ycommercewebservices.exposedHeaders=x-anonymous-consents
corsfilter.commercewebservices.allowedOrigins=*
corsfilter.commercewebservices.allowedHeaders=origin content-type accept authorization cache-control x-anonymous-consents x-profile-tag-debug x-consent-reference
corsfilter.commercewebservices.exposedHeaders=x-anonymous-consents
corsfilter.assistedservicewebservices.allowedOrigins=*
corsfilter.assistedservicewebservices.allowedHeaders=origin content-type accept authorization cache-control x-anonymous-consents x-profile-tag-debug x-consent-reference
corsfilter.assistedservicewebservices.exposedHeaders=x-anonymous-consents
mockup.payment.label.billTo.region=billTo_state
mockup.payment.label.billTo.phoneNumber=billTo_phoneNumber
yacceleratorordermanagement.fraud.scoreLimit=500000
yacceleratorordermanagement.fraud.scoreTolerance=500000
yacceleratorordermanagement.fraud.scoreLimitExternal=500000
yacceleratorordermanagement.fraud.scoreToleranceExternal=500000
task.polling.interval.min=0
smarteditaddon.dynamicattribute.enabled=true
build.parallel=true


Chapter 7 Regression
7.1 Ordinary least-squares
Both OLS and WLS are implemented here using QR decomposition. As for OLS this is very easily done in R. Given some feature matrix X
and a corresponding outcome variable y
we can use qr.solve(X, y)
to compute \(\hat\beta\).
7.2 Weighted least-squares
For the weighted least-squares estimator we have: (see appendix for derivation)
\[ \begin{equation} \begin{aligned} && \hat\beta_m^{WLS}&= \left( \mathbf{X}^T \Phi^{-1} \mathbf{X} \right)^{-1} \mathbf{X}^T\Phi^{-1}\mathbf{y}\\ \end{aligned} \tag{7.1} \end{equation} \]
In R weighted this can be implemented as follows:
function (X, y, weights = NULL)
{if (!is.null(weights)) {
<- diag(weights)
Phi <- qr.solve(t(X) %*% Phi %*% X, t(X) %*% Phi %*% y)
beta
}else {
<- qr.solve(X, y)
beta
}return(beta)
}
7.3 Logisitic regression
To model the probability of \(y=1\) we will use logistic regression:
\[ \begin{equation} \begin{aligned} && \mathbf{p}&= \frac{ \exp( \mathbf{X} \beta )}{1 + \exp(\mathbf{X} \beta)} \end{aligned} \tag{7.2} \end{equation} \]
Equation (7.2) is not estimated directly but rather derived from linear predictions
\[ \begin{equation} \begin{aligned} \log \left( \frac{\mathbf{p}}{1-\mathbf{p}} \right)&= \mathbf{X} \beta \\ \end{aligned} \tag{7.3} \end{equation} \]
where \(\beta\) can be estimated through iterative re-weighted least-squares (IRLS) which is a simple implementation of Newton’s method (see for example Wasserman (2013); a complete derivation can also be found in the appendix):
\[ \begin{equation} \begin{aligned} && \beta_{s+1}&= \left( \mathbf{X}^T \mathbf{W} \mathbf{X} \right) \mathbf{X}^T \mathbf{W}z\\ \text{where}&& z&= \mathbf{X}\beta_{s} + \mathbf{W}^{-1} (\mathbf{y}-\mathbf{p}) \\ && \mathbf{W}&= \text{diag}\{p_i(\beta_{s})(1-p_i(\beta_{s}))\}_{i=1}^n \\ \end{aligned} \tag{7.4} \end{equation} \]
In R this can be implemented from scratch as below. For the empirical exercises we will rely on glm([formula], family="binomial")
which scales much better to higher dimensional problems than my custom function and also implements weighted logit.
function (X, y, beta_0 = NULL, tau = 1e-09, max_iter = 10000)
{if (!all(X[, 1] == 1)) {
<- cbind(1, X)
X
}<- ncol(X)
p <- nrow(X)
n if (is.null(beta_0)) {
<- matrix(rep(0, p))
beta_latest
}<- diag(n)
W <- T
can_still_improve <- 1
iter while (can_still_improve & iter < max_iter) {
<- X %*% beta_latest
y_hat <- exp(y_hat)/(1 + exp(y_hat))
p_y <- crossprod(X, y - p_y)
df_latest diag(W) <- p_y * (1 - p_y)
<- X %*% beta_latest + qr.solve(W) %*% (y - p_y)
Z <- qr.solve(crossprod(X, W %*% X), crossprod(X, W %*% Z))
beta_latest <- mean(abs(df_latest)) > tau
can_still_improve <- iter + 1
iter
}return(list(fitted = p_y, coeff = beta_latest))
}


This website wil help you calculate the day of week you were born and also your supposed Akan name only using your date of birth.
welcome and have a fun!!!!
You entered date:
/ /
Day of the week:
Akan Name:


---
title: "Weather App - Plugin"
date: 2020-11-15
lesson: 37
---
{% set html %}
Checking the weather near you...
{% endset %}
{% set js %}
{% endset %}
{{ html | safe }}
{% highlight "html" %} {{ html | safe }} {{ js | safe }} {% endhighlight %}
{{ js | safe }}