|
JavaTM 2 Platform Standard Ed. 5.0 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.ietf.jgss.GSSManager
public abstract class GSSManager
This class serves as a factory for other important
GSS-API classes and also provides information about the mechanisms that
are supported. It can create instances of classes
implementing the following three GSS-API interfaces: GSSName
, GSSCredential
, and GSSContext
. It also has methods to query for the list
of available mechanisms and the nametypes that each mechanism
supports.
An instance of the default GSSManager
subclass
may be obtained through the static method getInstance
, but applications are free to instantiate other subclasses
of GSSManager
. The default GSSManager
instance
will support the Kerberos v5 GSS-API mechanism in addition to any
others. This mechanism is identified by the Oid "1.2.840.1135<IP_ADDRESS>"
and is defined in RFC 1964.
A subclass extending the GSSManager
abstract class may be
implemented as a modular provider based layer that utilizes some well
known service provider specification. The GSSManager
API
allows the application to set provider preferences on
such an implementation. These methods also allow the implementation to
throw a well-defined exception in case provider based configuration is
not supported. Applications that expect to be portable should be aware
of this and recover cleanly by catching the exception.
It is envisioned that there will be three most common ways in which providers will be used:
The GSSManager
class has two methods that enable these modes of
usage: addProviderAtFront
and
addProviderAtEnd
. These methods
have the effect of creating an ordered list of <provider,
oid> pairs where each pair indicates a preference of provider
for a given oid.
It is important to note that there are certain interactions
between the different GSS-API objects that are created by a
GSSManager, where the provider that is used for a particular mechanism
might need to be consistent across all objects. For instance, if a
GSSCredential contains elements from a provider p for a mechanism
m, it should generally be passed in to a GSSContext that will use
provider p for the mechanism m. A simple rule of thumb
that will maximize portability is that objects created from different
GSSManager's should not be mixed, and if possible, a different
GSSManager instance should be created if the application wants to invoke
the addProviderAtFront
method on a GSSManager that has
already created an object.
Here is some sample code showing how the GSSManager might be used:
GSSManager manager = GSSManager.getInstance(); Oid krb5Mechanism = new Oid("1.2.840.1135<IP_ADDRESS>"); Oid krb5PrincipalNameType = new Oid("1.2.840.1135<IP_ADDRESS>.1"); // Identify who the client wishes to be GSSName userName = manager.createName("duke", GSSName.NT_USER_NAME); // Identify the name of the server. This uses a Kerberos specific // name format. GSSName serverName = manager.createName("nfs/foo.sun.com", krb5PrincipalNameType); // Acquire credentials for the user GSSCredential userCreds = manager.createCredential(userName, GSSCredential.DEFAULT_LIFETIME, krb5Mechanism, GSSCredential.INITIATE_ONLY); // Instantiate and initialize a security context that will be // established with the server GSSContext context = manager.createContext(serverName, krb5Mechanism, userCreds, GSSContext.DEFAULT_LIFETIME);
The server side might use the following variation of this source:
// Acquire credentials for the server GSSCredential serverCreds = manager.createCredential(serverName, GSSCredential.DEFAULT_LIFETIME, krb5Mechanism, GSSCredential.ACCEPT_ONLY); // Instantiate and initialize a security context that will // wait for an establishment request token from the client GSSContext context = manager.createContext(serverCreds);
GSSName
,
GSSCredential
,
GSSContext
| Constructor Summary | |
|---|---|
GSSManager()
|
| Method Summary | |
|---|---|
abstract void |
addProviderAtEnd(Provider p,
Oid mech)
This method is used to indicate to the GSSManager that the application would like a particular provider to be used if no other provider can be found that supports the given mechanism. |
abstract void |
addProviderAtFront(Provider p,
Oid mech)
This method is used to indicate to the GSSManager that the application would like a particular provider to be used ahead of all others when support is desired for the given mechanism. |
abstract GSSContext |
createContext(byte[] interProcessToken)
Factory method for creating a previously exported context. |
abstract GSSContext |
createContext(GSSCredential myCred)
Factory method for creating a context on the acceptor' side. |
abstract GSSContext |
createContext(GSSName peer,
Oid mech,
GSSCredential myCred,
int lifetime)
Factory method for creating a context on the initiator's side. |
abstract GSSCredential |
createCredential(GSSName name,
int lifetime,
Oid[] mechs,
int usage)
Factory method for acquiring credentials over a set of mechanisms. |
abstract GSSCredential |
createCredential(GSSName name,
int lifetime,
Oid mech,
int usage)
Factory method for acquiring a single mechanism credential. |
abstract GSSCredential |
createCredential(int usage)
Factory method for acquiring default credentials. |
abstract GSSName |
createName(byte[] name,
Oid nameType)
Factory method to convert a byte array containing a name from the specified namespace to a GSSName object. |
abstract GSSName |
createName(byte[] name,
Oid nameType,
Oid mech)
Factory method to convert a byte array containing a name from the specified namespace to a GSSName object and canonicalize it at the same time for a mechanism. |
abstract GSSName |
createName(String nameStr,
Oid nameType)
Factory method to convert a string name from the specified namespace to a GSSName object. |
abstract GSSName |
createName(String nameStr,
Oid nameType,
Oid mech)
Factory method to convert a string name from the specified namespace to a GSSName object and canonicalize it at the same time for a mechanism. |
static GSSManager |
getInstance()
Returns the default GSSManager implementation. |
abstract Oid[] |
getMechs()
Returns a list of mechanisms that are available to GSS-API callers through this GSSManager. |
abstract Oid[] |
getMechsForName(Oid nameType)
Returns a list of mechanisms that support the indicated name type. |
abstract Oid[] |
getNamesForMech(Oid mech)
Returns then name types supported by the indicated mechanism. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public GSSManager()
| Method Detail |
|---|
public static GSSManager getInstance()
public abstract Oid[] getMechs()
getInstance()
method includes the Oid
"1.2.840.1135<IP_ADDRESS>" in its list. This Oid identifies the Kerberos
v5 GSS-API mechanism that is defined in RFC 1964.
null
value is returned when no
mechanism are available (an example of this would be when mechanism
are dynamically configured, and currently no mechanisms are
installed).public abstract Oid[] getNamesForMech(Oid mech) throws GSSException
The default GSSManager instance includes support for the Kerberos v5
mechanism. When this mechanism ("1.2.840.1135<IP_ADDRESS>") is indicated,
the returned list will contain at least the following nametypes:
GSSName.NT_HOSTBASED_SERVICE
,
GSSName.NT_EXPORT_NAME
, and the
Kerberos v5 specific Oid "1.2.840.1135<IP_ADDRESS>.1". The namespace for
the Oid "1.2.840.1135<IP_ADDRESS>.1" is defined in RFC 1964.
mech
- the Oid of the mechanism to query
GSSException
- containing the following
major error codes:
GSSException.BAD_MECH
GSSException.FAILURE
getMechsForName(Oid)
public abstract Oid[] getMechsForName(Oid nameType)
The Kerberos v5 mechanism ("1.2.840.1135<IP_ADDRESS>") will always be
returned in this list when the indicated nametype is one of
GSSName.NT_HOSTBASED_SERVICE
,
GSSName.NT_EXPORT_NAME
, or
"1.2.840.1135<IP_ADDRESS>.1".
nameType
- the Oid of the name type to look for
null
is returned when no
mechanisms are found to support the specified name type.getNamesForMech(Oid)
public abstract GSSName createName(String nameStr, Oid nameType) throws GSSException
GSSName
object created will contain multiple
representations of the name, one for each mechanism that is
supported; two examples that are exceptions to this are when
the namespace type parameter indicates NT_EXPORT_NAME or when the
GSS-API implementation is not multi-mechanism. It is
not recommended to use this method with a NT_EXPORT_NAME type because
representing a previously exported name consisting of abitrary bytes
as a String might cause problems with character encoding schemes. In
such cases it is recommended that the bytes be passed in directly to
the overloaded form of this method createName
.
nameStr
- the string representing a printable form of the name to
create.nameType
- the Oid specifying the namespace of the printable name
supplied. null
can be used to specify
that a mechanism specific default printable syntax should
be assumed by each mechanism that examines nameStr.
It is not advisable to use the nametype NT_EXPORT_NAME with this
method.
GSSException
- containing the following
major error codes:
GSSException.BAD_NAMETYPE
,
GSSException.BAD_NAME
,
GSSException.BAD_MECH
,
GSSException.FAILURE
GSSName
,
GSSName.NT_EXPORT_NAME
public abstract GSSName createName(byte[] name, Oid nameType) throws GSSException
GSSName
object created will contain multiple
representations of the name, one for each mechanism that is
supported; two examples that are exceptions to this are when the
namespace type parameter indicates NT_EXPORT_NAME or when the
GSS-API implementation is not multi-mechanism. The bytes that are
passed in are interpreted by each underlying mechanism according to
some encoding scheme of its choice for the given nametype.
name
- the byte array containing the name to createnameType
- the Oid specifying the namespace of the name supplied
in the byte array. null
can be used to specify that a
mechanism specific default syntax should be assumed by each mechanism
that examines the byte array.
GSSException
- containing the following
major error codes:
GSSException.BAD_NAMETYPE
,
GSSException.BAD_NAME
,
GSSException.BAD_MECH
,
GSSException.FAILURE
GSSName
,
GSSName.NT_EXPORT_NAME
public abstract GSSName createName(String nameStr, Oid nameType, Oid mech) throws GSSException
createName
and then also the GSSName.canonicalize
.
nameStr
- the string representing a printable form of the name to
create.nameType
- the Oid specifying the namespace of the printable name
supplied. null
can be used to specify
that a mechanism specific default printable syntax should
be assumed by each mechanism that examines nameStr.
It is not advisable to use the nametype NT_EXPORT_NAME with this
method.mech
- Oid specifying the mechanism for which the name should be
canonicalized
GSSException
- containing the following
major error codes:
GSSException.BAD_NAMETYPE
,
GSSException.BAD_NAME
,
GSSException.BAD_MECH
,
GSSException.FAILURE
GSSName.canonicalize(Oid)
,
GSSName.NT_EXPORT_NAME
public abstract GSSName createName(byte[] name, Oid nameType, Oid mech) throws GSSException
createName
and then also GSSName.canonicalize
.
name
- the byte array containing the name to createnameType
- the Oid specifying the namespace of the name supplied
in the byte array. null
can be used to specify that a
mechanism specific default syntax should be assumed by each mechanism
that examines the byte array.mech
- Oid specifying the mechanism for which the name should be
canonicalized
GSSException
- containing the following
major error codes:
GSSException.BAD_NAMETYPE
,
GSSException.BAD_NAME
,
GSSException.BAD_MECH
,
GSSException.FAILURE
GSSName.canonicalize(Oid)
,
GSSName.NT_EXPORT_NAME
public abstract GSSCredential createCredential(int usage) throws GSSException
GSS-API mechanism providers must impose a local access-control
policy on callers to prevent unauthorized callers from acquiring
credentials to which they are not entitled. The kinds of permissions
needed by different mechanism providers will be documented on a
per-mechanism basis. A failed permission check might cause a SecurityException
to be thrown from
this method.
usage
- The intended usage for this credential object. The value
of this parameter must be one of:
GSSCredential.INITIATE_AND_ACCEPT
,
GSSCredential.ACCEPT_ONLY
, and
GSSCredential.INITIATE_ONLY
.
GSSException
- containing the following
major error codes:
GSSException.BAD_MECH
,
GSSException.BAD_NAMETYPE
,
GSSException.BAD_NAME
,
GSSException.CREDENTIALS_EXPIRED
,
GSSException.NO_CRED
,
GSSException.FAILURE
GSSCredential
public abstract GSSCredential createCredential(GSSName name, int lifetime, Oid mech, int usage) throws GSSException
GSS-API mechanism providers must impose a local access-control
policy on callers to prevent unauthorized callers from acquiring
credentials to which they are not entitled. The kinds of permissions
needed by different mechanism providers will be documented on a
per-mechanism basis. A failed permission check might cause a SecurityException
to be thrown from
this method.
Non-default values for lifetime cannot always be honored by the
underlying mechanisms, thus applications should be prepared to call
getRemainingLifetime
on the returned credential.
name
- the name of the principal for whom this credential is to be
acquired. Use null
to specify the default principal.lifetime
- The number of seconds that credentials should remain
valid. Use GSSCredential.INDEFINITE_LIFETIME
to request that the credentials
have the maximum permitted lifetime. Use GSSCredential.DEFAULT_LIFETIME
to
request default credential lifetime.mech
- the Oid of the desired mechanism. Use (Oid) null
to request the default mechanism.usage
- The intended usage for this credential object. The value
of this parameter must be one of:
GSSCredential.INITIATE_AND_ACCEPT
,
GSSCredential.ACCEPT_ONLY
, and
GSSCredential.INITIATE_ONLY
.
GSSException
- containing the following
major error codes:
GSSException.BAD_MECH
,
GSSException.BAD_NAMETYPE
,
GSSException.BAD_NAME
,
GSSException.CREDENTIALS_EXPIRED
,
GSSException.NO_CRED
,
GSSException.FAILURE
GSSCredential
public abstract GSSCredential createCredential(GSSName name, int lifetime, Oid[] mechs, int usage) throws GSSException
GSSCredential.getMechs
method.
GSS-API mechanism providers must impose a local access-control
policy on callers to prevent unauthorized callers from acquiring
credentials to which they are not entitled. The kinds of permissions
needed by different mechanism providers will be documented on a
per-mechanism basis. A failed permission check might cause a SecurityException
to be thrown from
this method.
Non-default values for lifetime cannot always be honored by the
underlying mechanisms, thus applications should be prepared to call
getRemainingLifetime
on the returned credential.
name
- the name of the principal for whom this credential is to
be acquired. Use null
to specify the default
principal.lifetime
- The number of seconds that credentials should remain
valid. Use GSSCredential.INDEFINITE_LIFETIME
to request that the credentials
have the maximum permitted lifetime. Use GSSCredential.DEFAULT_LIFETIME
to
request default credential lifetime.mechs
- an array of Oid's indicating the mechanisms over which
the credential is to be acquired. Use (Oid[]) null
for
requesting a system specific default set of mechanisms.usage
- The intended usage for this credential object. The value
of this parameter must be one of:
GSSCredential.INITIATE_AND_ACCEPT
,
GSSCredential.ACCEPT_ONLY
, and
GSSCredential.INITIATE_ONLY
.
GSSException
- containing the following
major error codes:
GSSException.BAD_MECH
,
GSSException.BAD_NAMETYPE
,
GSSException.BAD_NAME
,
GSSException.CREDENTIALS_EXPIRED
,
GSSException.NO_CRED
,
GSSException.FAILURE
GSSCredential
public abstract GSSContext createContext(GSSName peer, Oid mech, GSSCredential myCred, int lifetime) throws GSSException
SecurityException
to be thrown from this method.
Non-default values for lifetime cannot always be honored by the
underlying mechanism, thus applications should be prepared to call
getLifetime
on the returned
context.
peer
- the name of the target peer.mech
- the Oid of the desired mechanism. Use null
to request the default mechanism.myCred
- the credentials of the initiator. Use
null
to act as the default initiator principal.lifetime
- the lifetime, in seconds, requested for the
context. Use GSSContext.INDEFINITE_LIFETIME
to request that the context have the
maximum permitted lifetime. Use GSSContext.DEFAULT_LIFETIME
to request a default lifetime for the
context.
GSSException
- containing the following
major error codes:
GSSException.NO_CRED
GSSException.CREDENTIALS_EXPIRED
GSSException.BAD_NAMETYPE
GSSException.BAD_MECH
GSSException.FAILURE
GSSContext
public abstract GSSContext createContext(GSSCredential myCred) throws GSSException
SecurityException
to be thrown from this method.
myCred
- the credentials for the acceptor. Use
null
to act as a default acceptor principal.
GSSException
- containing the following
major error codes:
GSSException.NO_CRED
GSSException.CREDENTIALS_EXPIRED
GSSException.BAD_MECH
GSSException.FAILURE
GSSContext
public abstract GSSContext createContext(byte[] interProcessToken) throws GSSException
Implementations are not required to support the inter-process
transfer of security contexts. Before exporting a context, calling
the GSSContext.isTransferable
will indicate if the context is transferable. Calling this method in
an implementation that does not support it will result in a
GSSException
with the error
code GSSException.UNAVAILABLE
.
Some mechanism providers might require that the caller be granted
permission to initiate or accept a security context. A failed
permission check might cause a SecurityException
to be thrown from this method.
interProcessToken
- the token previously emitted from the
export method.
GSSException
- containing the following
major error codes:
GSSException.NO_CONTEXT
,
GSSException.DEFECTIVE_TOKEN
,
GSSException.UNAVAILABLE
,
GSSException.UNAUTHORIZED
,
GSSException.FAILURE
GSSContext
public abstract void addProviderAtFront(Provider p, Oid mech) throws GSSException
Oid
for the mechanism,
the GSSManager must use the indicated provider ahead of all others
no matter what the mechanism is. Only when the indicated provider
does not support the needed mechanism should the GSSManager move on
to a different provider.
Calling this method repeatedly preserves the older settings but
lowers them in preference thus forming an ordered list of provider
and Oid
pairs that grows at the top.
Calling addProviderAtFront with a null Oid
will remove
all previous preferences that were set for this provider in the
GSSManager instance. Calling addProviderAtFront with a non-null
Oid
will remove any previous preference that was set
using this mechanism and this provider together.
If the GSSManager implementation does not support an SPI with a pluggable provider architecture it should throw a GSSException with the status code GSSException.UNAVAILABLE to indicate that the operation is unavailable.
Suppose an application desired that the provider A always be checked first when any mechanism is needed, it would call:
GSSManager mgr = GSSManager.getInstance(); // mgr may at this point have its own pre-configured list // of provider preferences. The following will prepend to // any such list: mgr.addProviderAtFront(A, null);Now if it also desired that the mechanism of Oid m1 always be obtained from the provider B before the previously set A was checked, it would call:
mgr.addProviderAtFront(B, m1);The GSSManager would then first check with B if m1 was needed. In case B did not provide support for m1, the GSSManager would continue on to check with A. If any mechanism m2 is needed where m2 is different from m1 then the GSSManager would skip B and check with A directly.
Suppose at a later time the following call is made to the same GSSManager instance:
mgr.addProviderAtFront(B, null)then the previous setting with the pair (B, m1) is subsumed by this and should be removed. Effectively the list of preferences now becomes {(B, null), (A, null), ... //followed by the pre-configured list.
Please note, however, that the following call:
mgr.addProviderAtFront(A, m3)does not subsume the previous setting of (A, null) and the list will effectively become {(A, m3), (B, null), (A, null), ...}
p
- the provider instance that should be used whenever support
is needed for mech.mech
- the mechanism for which the provider is being set
GSSException
- containing the following
major error codes:
GSSException.UNAVAILABLE
,
GSSException.FAILURE
public abstract void addProviderAtEnd(Provider p, Oid mech) throws GSSException
Calling this method repeatedly preserves the older settings but raises them above newer ones in preference thus forming an ordered list of providers and Oid pairs that grows at the bottom. Thus the older provider settings will be utilized first before this one is.
If there are any previously existing preferences that conflict with the preference being set here, then the GSSManager should ignore this request.
If the GSSManager implementation does not support an SPI with a pluggable provider architecture it should throw a GSSException with the status code GSSException.UNAVAILABLE to indicate that the operation is unavailable.
Suppose an application desired that when a mechanism of Oid m1 is needed the system default providers always be checked first, and only when they do not support m1 should a provider A be checked. It would then make the call:
GSSManager mgr = GSSManager.getInstance(); mgr.addProviderAtEnd(A, m1);Now, if it also desired that for all mechanisms the provider B be checked after all configured providers have been checked, it would then call:
mgr.addProviderAtEnd(B, null);Effectively the list of preferences now becomes {..., (A, m1), (B, null)}.
Suppose at a later time the following call is made to the same GSSManager instance:
mgr.addProviderAtEnd(B, m2)then the previous setting with the pair (B, null) subsumes this and therefore this request should be ignored. The same would happen if a request is made for the already existing pairs of (A, m1) or (B, null).
Please note, however, that the following call:
mgr.addProviderAtEnd(A, null)is not subsumed by the previous setting of (A, m1) and the list will effectively become {..., (A, m1), (B, null), (A, null)}
p
- the provider instance that should be used whenever support
is needed for mech.mech
- the mechanism for which the provider is being set
GSSException
- containing the following
major error codes:
GSSException.UNAVAILABLE
,
GSSException.FAILURE
|
JavaTM 2 Platform Standard Ed. 5.0 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright © 2004, 2010 Oracle and/or its affiliates. All rights reserved. Use is subject to license terms. Also see the documentation redistribution policy.


Pasties
Dough Ingredients
- 4 cups flour
- 1-1/2 tsp. salt
- 1-1/3 cups shortening
- 1 cup cold water
Stir flour and salt together. Cut in shortening until mixture resembles small crumbs. Stir in cold water until dough clings together. Knead lightly. Divide into 12 balls of dough. Set aside.
Filling Ingredients
- 2 sliced potatoes
- 2 sliced onions
- 2 pounds ground beef
- margarine, horseradish, and garlic as desired
Place filling ingredients on two plates, making 12 piles of ingredients, one for each pasty.
Roll ball of dough until about 6 inches by 12 inches. Cover half of rolled crust with ground beef, potatoes, and onion. Sprinkle lightly with salt and pepper. Top with dots of butter. If desired, top with horseradish and/or garlic. Fold other half of crust over filling and fold edges firmly together. Place 6 pasties on ungreased cookie sheet.
Cook 1 hour at 350 degrees.


| | |
- admission_control(data:List[cerebralcortex.core.datatypes.datapoint.DataPoint]) -> List[cerebralcortex.core.datatypes.datapoint.DataPoint]
- Checks if all the DataPoints in the input conform towards being a respiration
DataPoint and returns only those who passes the condition
:param data: list of respiration DataPoints
:return: list of filtered respiration datapoints
- bandpower(x:object, fs:object, fmin:object, fmax:object, nfft_point:object=1024) -> object
- returns the power in a frequency band of a signal
:rtype: object
:param x:
:param fs:
:param fmin: low frequency
:param fmax: high frequency
:param nfft_point:
:return: power in low to high frequency band
- calculate_power_in_frequency_band(y:object, Fs:object) -> object
- calculates power in respiration cycle from predefined frequency bands
:rtype: object
:param y:
:param Fs:
:return: an array of 5 represinting the power in each band
- filter_bad_rip(ts:object, sample:object, window_size:object=150, filter_condition:object=120) -> object
- Filters respiration signal to remove outliers
:rtype: object
:param ts:
:param sample:
:param window_size:
:param filter_condition: minimum range of acceptable signal
:return:
- get_covariance(data1:object, data2:object) -> object
- Get the correlation of two signals with unequal data length
:rtype: object
:param data1:
:param data2:
:return:
- get_cycle_quality(sample:object, ts:object, fs:object=25, acceptable_percentage:object=0.5) -> object
- get the quality of a respiration cycle through checking the number of
DataPoints present
:rtype: object
:param sample:
:param ts:
:param fs:
:return:
- get_recovery(rip:List[cerebralcortex.core.datatypes.datapoint.DataPoint], baseline:List[cerebralcortex.core.datatypes.datapoint.DataPoint], Fs) -> List[cerebralcortex.core.datatypes.datapoint.DataPoint]
- matches respiration raw with baseline signal and returns the recovered
signal
:param rip: respiration raw
:param baseline:
:param Fs:
:return: respiration recovered signal
- recover_rip_rawwithmeasuredref(RIP:list, ref:list, Fs:object) -> numpy.ndarray
- Recovers Respiration final signal from baseline and raw
:param RIP: respiration raw
:param ref: respiration baseline
:param Fs: sampling frequency
:return: recovered final respiration signal as a combination of respiration raw and baseline
- respiration_area_shape_velocity_calculation(sample:object, ts:object, peak:object, cycle_quality:object, fs:object=25, unacceptable:object=-9999) -> object
- Calculates the area , shape and velocity features from respiration cycles
:rtype: object
:param sample:
:param ts:
:param peak:
:param cycle_quality:
:param fs:
:return: respiration cycle quality,Inspiration area,Expiration area,
Respiration area,Insp Exp Area ratio,Inspiration velocity,
Expiration velocity,skewness of cycle, kurtosis of cycle
- return_bandPassedSignal(sample:object, f1L:object, f1H:object, f2L:object, f2H:object, Fs:object=25) -> object
- Return bandpass filtered signal with two set of cutoffs
:rtype: object
:param sample:
:param f1L:
:param f1H:
:param f2L:
:param f2H:
:param Fs:
:return:
- return_neighbour_cycle_correlation(sample:object, ts:object, inspiration:object, unacceptable:object=-9999) -> object
- Return Neighbour Cycle correlation array of respiration cycles.
:rtype: object
:param sample:
:param ts:
:param inspiration:
:return: modified cycle quality,correlation with previous cycle,
correlation with next cycle
- smooth(y:list, box_pts:int) -> numpy.ndarray
- smooths a 1d signal through convolution
:rtype: object
:param y: signal
:param box_pts: number of samples in moving average
:return: smoothed signal
- smooth_detrend(sample:object, ts:object, window_size:object=300, no_of_samples:object=13) -> object
- piecewise detrending of signal by subtracting the mean of every non
overlapping 300 seconds
:rtype: object
:param sample:
:param ts:
:param window_size:
:param no_of_samples:
:return:
- spectral_energy_calculation(sample:object, ts:object, cycle_quality:object, fs:object=25, unacceptable:object=-9999, f1L:object=0.01, f1H:object=0.05, f2L:object=1.8, f2H:object=1.85) -> object
- calculates the spectral energy of respiration cycle
:rtype: object
:param sample:
:param ts:
:param cycle_quality:
:param fs:
:return: energy of respiration cycle,power between .05-.2 Hz,.201-.4 Hz,
.401-.6 Hz,.601-.8 Hz,.801-1 Hz
- spectral_entropy_calculation(sample:object, ts:object, cycle_quality:object, unacceptable:object=-9999) -> object
- Calcuclates the entropy of a respiration cycle
:rtype: object
:param sample:
:param ts:
:param cycle_quality:
:return: entropy of respiration cycle
|


|
Assimp
5.0.1, master @ cd42b955
|
Helper class to export a given scene to a Collada file. More...
Classes | |
| struct | Material |
| struct | Property |
| struct | Surface |
Public Member Functions | |
| ColladaExporter (const aiScene *pScene, IOSystem *pIOSystem, const std::string &path, const std::string &file) | |
| Constructor for a specific scene to export. More... | |
| virtual | ~ColladaExporter () |
| Destructor. More... | |
| bool | ReadMaterialSurface (Surface &poSurface, const aiMaterial &pSrcMat, aiTextureType pTexture, const char *pKey, size_t pType, size_t pIndex) |
| Dammit C++ - y u no compile two-pass? No I have to add all methods below the struct definitions Reads a single surface entry from the given material keys. More... | |
| void | WriteFloatEntry (const Property &pProperty, const std::string &pTypeName) |
| Writes a scalar property. More... | |
| void | WriteImageEntry (const Surface &pSurface, const std::string &imageId) |
| Writes an image entry for the given surface. More... | |
| void | WriteTextureColorEntry (const Surface &pSurface, const std::string &pTypeName, const std::string &imageId) |
| Writes a color-or-texture entry into an effect definition. More... | |
| void | WriteTextureParamEntry (const Surface &pSurface, const std::string &pTypeName, const std::string &materialId) |
| Writes the two parameters necessary for referencing a texture in an effect entry. More... | |
Public Attributes | |
| const std::string | endstr |
| current line end string for simple stream insertion More... | |
| bool | mAdd_root_node = false |
| const std::string | mFile |
| Name of the file (without extension) where the scene will be exported. More... | |
| IOSystem * | mIOSystem |
| The IOSystem for output. More... | |
| std::stringstream | mOutput |
| Stringstream to write all output into. More... | |
| const std::string | mPath |
| Path of the directory where the scene will be exported. More... | |
| const aiScene *const | mScene |
| The scene to be written. More... | |
| std::string | mSceneId |
| std::string | startstr |
| current line start string, contains the current indentation for simple stream insertion More... | |
| std::map< unsigned int, std::string > | textures |
Protected Types | |
| enum class | AiObjectType { Mesh , Material , Animation , Light , Camera , Count } |
| enum | FloatDataType { FloatType_Vector , FloatType_TexCoord2 , FloatType_TexCoord3 , FloatType_Color , FloatType_Mat4x4 , FloatType_Weight , FloatType_Time } |
| typedef std::map< size_t, std::string > | IndexIdMap |
| typedef std::pair< std::string, std::string > | NameIdPair |
Protected Member Functions | |
| NameIdPair | AddObjectIndexToMaps (AiObjectType type, size_t pIndex) |
| void | CreateNodeIds (const aiNode *node) |
| std::string | GetBoneUniqueId (const aiBone *bone) |
| std::string | GetNodeName (const aiNode *node) |
| std::string | GetNodeUniqueId (const aiNode *node) |
| Get or Create a unique Node ID string for the given Node. More... | |
| IndexIdMap & | GetObjectIdMap (AiObjectType type) |
| std::string | GetObjectName (AiObjectType type, size_t pIndex) |
| Get or Create a name string for the given scene object index. More... | |
| IndexIdMap & | GetObjectNameMap (AiObjectType type) |
| std::string | GetObjectUniqueId (AiObjectType type, size_t pIndex) |
| Get or Create a unique ID string for the given scene object index. More... | |
| void | PopTag () |
| Leaves an element, decreasing the indentation. More... | |
| void | PushTag () |
| Enters a new xml element, which increases the indentation. More... | |
| void | WriteAmbienttLight (const aiLight *const light) |
| void | WriteAnimationLibrary (size_t pIndex) |
| void | WriteAnimationsLibrary () |
| void | WriteCamera (size_t pIndex) |
| void | WriteCamerasLibrary () |
| Writes the cameras library. More... | |
| void | WriteController (size_t pIndex) |
| Writes a skin controller of the given mesh. More... | |
| void | WriteControllerLibrary () |
| Writes the controller library. More... | |
| void | WriteDirectionalLight (const aiLight *const light) |
| void | WriteFile () |
| Starts writing the contents. More... | |
| void | WriteFloatArray (const std::string &pIdString, FloatDataType pType, const ai_real *pData, size_t pElementCount) |
| Writes a float array of the given type. More... | |
| void | WriteGeometry (size_t pIndex) |
| Writes the given mesh. More... | |
| void | WriteGeometryLibrary () |
| Writes the geometry library. More... | |
| void | WriteHeader () |
| Writes the asset header. More... | |
| void | WriteLight (size_t pIndex) |
| void | WriteLightsLibrary () |
| Writes the cameras library. More... | |
| void | WriteMaterials () |
| Writes the material setup. More... | |
| void | WriteNode (const aiNode *pNode) |
| Recursively writes the given node. More... | |
| void | WritePointLight (const aiLight *const light) |
| void | WriteSceneLibrary () |
| Writes the scene library. More... | |
| void | WriteSpotLight (const aiLight *const light) |
| void | WriteTextures () |
| Writes the embedded textures. More... | |
Protected Attributes | |
| std::string | mFoundSkeletonRootNodeID = "skeleton_root" |
Private Attributes | |
| std::map< const void *, std::string > | mNodeIdMap |
| std::array< IndexIdMap, static_cast< size_t >AiObjectType::Count)> | mObjectIdMap |
| std::array< IndexIdMap, static_cast< size_t >AiObjectType::Count)> | mObjectNameMap |
| std::unordered_set< std::string > | mUniqueIds |
Helper class to export a given scene to a Collada file.
Just for my personal comfort when implementing it.
|
protected |
|
protected |
|
strongprotected |
|
protected |
| Assimp::ColladaExporter::ColladaExporter | ( | const aiScene * | pScene, |
| IOSystem * | pIOSystem, | ||
| const std::string & | path, | ||
| const std::string & | file | ||
| ) |
Constructor for a specific scene to export.
|
virtual |
Destructor.
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
Get or Create a unique Node ID string for the given Node.
|
inlineprotected |
|
protected |
Get or Create a name string for the given scene object index.
|
inlineprotected |
|
protected |
Get or Create a unique ID string for the given scene object index.
|
inlineprotected |
Leaves an element, decreasing the indentation.
|
inlineprotected |
Enters a new xml element, which increases the indentation.
| bool Assimp::ColladaExporter::ReadMaterialSurface | ( | Surface & | poSurface, |
| const aiMaterial & | pSrcMat, | ||
| aiTextureType | pTexture, | ||
| const char * | pKey, | ||
| size_t | pType, | ||
| size_t | pIndex | ||
| ) |
Dammit C++ - y u no compile two-pass? No I have to add all methods below the struct definitions Reads a single surface entry from the given material keys.
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
Writes the cameras library.
|
protected |
Writes a skin controller of the given mesh.
|
protected |
Writes the controller library.
|
protected |
|
protected |
Starts writing the contents.
|
protected |
Writes a float array of the given type.
| void Assimp::ColladaExporter::WriteFloatEntry | ( | const Property & | pProperty, |
| const std::string & | pTypeName | ||
| ) |
Writes a scalar property.
|
protected |
Writes the given mesh.
|
protected |
Writes the geometry library.
|
protected |
Writes the asset header.
| void Assimp::ColladaExporter::WriteImageEntry | ( | const Surface & | pSurface, |
| const std::string & | imageId | ||
| ) |
Writes an image entry for the given surface.
|
protected |
|
protected |
Writes the cameras library.
|
protected |
Writes the material setup.
collect all materials from the scene
|
protected |
Recursively writes the given node.
|
protected |
|
protected |
Writes the scene library.
|
protected |
| void Assimp::ColladaExporter::WriteTextureColorEntry | ( | const Surface & | pSurface, |
| const std::string & | pTypeName, | ||
| const std::string & | imageId | ||
| ) |
Writes a color-or-texture entry into an effect definition.
| void Assimp::ColladaExporter::WriteTextureParamEntry | ( | const Surface & | pSurface, |
| const std::string & | pTypeName, | ||
| const std::string & | materialId | ||
| ) |
Writes the two parameters necessary for referencing a texture in an effect entry.
|
protected |
Writes the embedded textures.
| const std::string Assimp::ColladaExporter::endstr |
current line end string for simple stream insertion
| bool Assimp::ColladaExporter::mAdd_root_node = false |
| const std::string Assimp::ColladaExporter::mFile |
Name of the file (without extension) where the scene will be exported.
|
protected |
|
private |
|
private |
|
private |
| std::stringstream Assimp::ColladaExporter::mOutput |
Stringstream to write all output into.
| const std::string Assimp::ColladaExporter::mPath |
Path of the directory where the scene will be exported.
| const aiScene* const Assimp::ColladaExporter::mScene |
The scene to be written.
| std::string Assimp::ColladaExporter::mSceneId |
|
private |
| std::string Assimp::ColladaExporter::startstr |
current line start string, contains the current indentation for simple stream insertion
| std::map<unsigned int, std::string> Assimp::ColladaExporter::textures |


Launch Year
Successful Launch
Successful Landing
Mission Ids:
Launch Year: {{item.launch_year}}
Successful Launch: {{item.launch_success}}
Successful Landing: {{item.launch_landing}}


MY PHP PROJECT
Home
Brief History
How it works
References
Members
References
Introduction to PHP Programming language
Introduction to PHP Programming language 2
Brief History of PHP
How PHP works
Characteristics of PHP
Characteristics of PHP 2
Uses of PHP
Advantages and Disadvantages of PHP
Advantages and Disadvantages of PHP 2
Advantages and Disadvantages of PHP 3
Brief History of PHP
How PHP works
Characteristics of PHP
Characteristics of PHP
Uses of PHP
Advantages and Disadvantages of PHP


Plug
Plug is:
- A specification for composable modules between web applications
- Connection adapters for different web servers in the Erlang VM
Documentation for Plug is available online.
Hello world
defmodule MyPlug do
import Plug.Conn
def init(options) do
# initialize options
options
end
def call(conn, _opts) do
conn
|> put_resp_content_type("text/plain")
|> send_resp(200, "Hello world")
end
end
The snippet above shows a very simple example on how to use Plug. Save that snippet to a file and run it inside the plug application with:
$ iex -S mix
iex> c "path/to/file.ex"
[MyPlug]
iex> {:ok, _} = Plug.Adapters.Cowboy.http MyPlug, []
{:ok, #PID<...>}
Access “http://localhost:4000/“ and we are done! For now, we have directly started the server in our terminal but, for production deployments, you likely want to start it in your supervision tree. See the “Supervised handlers” section below.
Installation
You can use plug in your projects in two steps:
Add plug and your webserver of choice (currently cowboy) to your
mix.exs
dependencies:def deps do [{:cowboy, "~> 1.0.0"}, {:plug, "~> 1.0"}] end
List both
:cowboy
and:plug
as your application dependencies:def application do [applications: [:cowboy, :plug]] end
Supported Versions
| Branch | Support |
|---|---|
| v1.4 | Bug fixes |
| v1.3 | Security patches only |
| v1.2 | Security patches only |
| v1.1 | Security patches only |
| v1.0 | Unsupported from 05/2017 |
The Plug.Conn
In the hello world example, we defined our first plug. What is a plug after all?
A plug takes two shapes. A function plug receives a connection and a set of options as arguments and returns the connection:
def hello_world_plug(conn, _opts) do
conn
|> put_resp_content_type("text/plain")
|> send_resp(200, "Hello world")
end
A module plug implements an init/1
function to initialize the options and a call/2
function which receives the connection and initialized options and returns the connection:
defmodule MyPlug do
def init([]), do: false
def call(conn, _opts), do: conn
end
As per the specification above, a connection is represented by the Plug.Conn
struct:
%Plug.Conn{host: "www.example.com",
path_info: ["bar", "baz"],
...}
Data can be read directly from the connection and also pattern matched on. Manipulating the connection often happens with the use of the functions defined in the Plug.Conn
module. In our example, both put_resp_content_type/2
and send_resp/3
are defined in Plug.Conn
.
Remember that, as everything else in Elixir, a connection is immutable, so every manipulation returns a new copy of the connection:
conn = put_resp_content_type(conn, "text/plain")
conn = send_resp(conn, 200, "ok")
conn
Finally, keep in mind that a connection is a direct interface to the underlying web server. When you call send_resp/3
above, it will immediately send the given status and body back to the client. This makes features like streaming a breeze to work with.
The Plug Router
In practice, developers rarely write their own plugs. For example, Plug ships with a router that allows developers to quickly match on incoming requests and perform some action:
defmodule MyRouter do
use Plug.Router
plug :match
plug :dispatch
get "/hello" do
send_resp(conn, 200, "world")
end
forward "/users", to: UsersRouter
match _ do
send_resp(conn, 404, "oops")
end
end
The router is a plug and, not only that, it contains its own plug pipeline too. The example above says that when the router is invoked, it will invoke the :match
plug, represented by a local match/2
function, and then call the :dispatch
plug which will execute the matched code.
Plug ships with many plugs that you can add to the router plug pipeline, allowing you to plug something before a route matches or before a route is dispatched to. For example, if you want to add logging to the router, just do:
plug Plug.Logger
plug :match
plug :dispatch
Note Plug.Router
compiles all of your routes into a single function and relies on the Erlang VM to optimize the underlying routes into a tree lookup, instead of a linear lookup that would instead match route-per-route. This means route lookups are extremely fast in Plug!
This also means that a catch all match
is recommended to be defined, as in the example above, otherwise routing fails with a function clause error (as it would in any regular Elixir function).
Each route needs to return the connection as per the Plug specification. See Plug.Router
docs for more information.
Supervised handlers
On a production system, you likely want to start your Plug application under your application’s supervision tree. Plug provides the child_spec/3
function to do just that. Start a new Elixir project with the --sup
flag:
$ mix new my_app --sup
and then update lib/my_app.ex
as follows:
defmodule MyApp do
use Application
# See https://hexdocs.pm/elixir/Application.html
# for more information on OTP Applications
def start(_type, _args) do
import Supervisor.Spec
children = [
# Define workers and child supervisors to be supervised
Plug.Adapters.Cowboy.child_spec(:http, MyRouter, [], [port: 4001])
]
# See https://hexdocs.pm/elixir/Supervisor.html
# for other strategies and supported options
opts = [strategy: :one_for_one, name: MyApp.Supervisor]
Supervisor.start_link(children, opts)
end
end
Testing plugs
Plug ships with a Plug.Test
module that makes testing your plugs easy. Here is how we can test the router from above (or any other plug):
defmodule MyPlugTest do
use ExUnit.Case, async: true
use Plug.Test
@opts MyRouter.init([])
test "returns hello world" do
# Create a test connection
conn = conn(:get, "/hello")
# Invoke the plug
conn = MyRouter.call(conn, @opts)
# Assert the response and status
assert conn.state == :sent
assert conn.status == 200
assert conn.resp_body == "world"
end
end
Available Plugs
This project aims to ship with different plugs that can be re-used across applications:
Plug.CSRFProtection
- adds Cross-Site Request Forgery protection to your application. Typically required if you are usingPlug.Session
;Plug.Head
- converts HEAD requests to GET requests;Plug.Logger
- logs requests;Plug.MethodOverride
- overrides a request method with one specified in headers;Plug.Parsers
- responsible for parsing the request body given its content-type;Plug.RequestId
- sets up a request ID to be used in logs;Plug.Session
- handles session management and storage;Plug.SSL
- enforce requests through SSL;Plug.Static
- serves static files;
You can go into more details about each of them in our docs.
Helper modules
Modules that can be used after you use Plug.Router
or Plug.Builder
to help development:
Plug.Debugger
- shows a helpful debugging page every time there is a failure in a request;Plug.ErrorHandler
- allows developers to customize error pages in case of crashes instead of sending a blank one;
Contributing
We welcome everyone to contribute to Plug and help us tackle existing issues!
Use the issue tracker for bug reports or feature requests. You may also start a discussion on the mailing list or the #elixir-lang channel on Freenode IRC. Open a pull request when you are ready to contribute.
When submitting a pull request you should not update the CHANGELOG.md
.
If you are planning to contribute documentation, please check our best practices for writing documentation.
Finally, remember all interactions in our official spaces follow our Code of Conduct.
License
Plug source code is released under Apache 2 License. Check LICENSE file for more information.


Hello,
My
name is
Zambino
the weird.
(
Q
E
D
)
and don't you forget it.
Where
in
the world
are my marbles?
Load Visual ARIA
Calculate Accessible Name and Description


Change the look and feel of Cinnamon with themes! Developers are free to create their own themes and share them with other users here.


func runtime.spanOfHeap
6 uses
runtime (current package)
mgcmark.go#L1321: span := spanOfHeap(val)
mgcmark.go#L1373: span := spanOfHeap(val)
mheap.go#L599: return spanOfHeap(b) != nil
mheap.go#L677: func spanOfHeap(p uintptr) *mspan {
mheap.go#L1679: span := spanOfHeap(uintptr(p))
mheap.go#L1728: span := spanOfHeap(uintptr(p))
The pages are generated with Golds v0.2.7-preview. (GOOS=darwin GOARCH=amd64)


#almondmilk
#coconutmilk
33
13
11
life
11
healthyfood
9
nutrition
9
fitness
6
baristalife
6
healthyeating
5
healthylifestyle
4
xanorexia
3
fitfood
3
style
3
health
2
healthyfoodshare
2
healthylife
2
veganfoodshare
2
rawvegan
2
2
caffeinekeepsmesane
...
...
1
@so_delicious
@lovemysilk
Brand
4
47
51
22
172
710
8
5
4
3
2
Users
530 Post
31k followers
4371 following
658 Post
15,5k followers
1527 following
662,539 post
312,499 post
health
99
28
healthyfood
25
fitfood
15
healthylife
12
healthylifestyle
9
eatclean
8
veganfoodshare
8
8
8
fitness
7
7
veganfood
7
fitfam
workout
6
healthyfoodshare
5
healthybreakfast
5
diet
5
life
5
cleaneating
4
healthyfoodporn
4
lactosefree
4
fitbody
4
healthyliving
3
eathealthy
3
healthysmoothie
3
healthyeating
3
cleaneats
3
fitstyle
3
instafit
3
fitspo
3
fitandhealthy
3
govegan
3
crueltyfree
3
healthyfoodie
2
behealthy
1
healthyfoodporn
1
healthychristmas
1
healthybreakfast
1
healthyhappy
1
healthyliving
1
healthychoice
1
healthyeats
1
eatclean
1
jualhealthyfood
1
eathealthy
1
supernaturalgoodness
1
ttccommunity
1
perfectbody
1
justfitfoods
1
89
vegansofig
healthy
healthy
healthy
organic
organic
organic
protein
protein
whatveganseat
whatveganseat
vegan
vegan
vegan
vegan


| DOSE: T+ 0:00 |
9.5 g |
oral |
Nutmeg |
(ground / crushed) |
| T+ 1:00 |
4.5 g |
oral |
Nutmeg |
(ground / crushed) |
I ingested Ĺ ounce of fresh grated nutmeg between 8:00 and 8:30 and 9:00 and 9:15 on Thursday morning, consuming 2/3 of the quantity in the first half hour with water, and finishing it in the quarter of an hour. I mixed the nutmeg with water and drank it down. It tasted fookin bad. My mindset was calm, I had had a good nights sleep, and was on no medication whatsoever. At the time, the only other drugs I had tried was cannabis and alcohol.
Around 12:00 I was starting to feel the drugs mild effects, mostly dizziness as well as a new appreciation of nature and better mood, and by 15:30 I was blissfully relaxed, lying outside much like being heavily stoned on mj. I watched the clouds seem to change shape (they probably did, being water vapour) and appreciated the blue sky and the warm sun. I took a trip into town and found the sounds and sights of nature more endearing than ever before, however I experienced slight paranoia in that I believed I was being followed. I went into two shops and found the shopkeepers were really, really nice, (nicer than usual) however I couldnít decide on what bread to buy, and found myself staring at colourful rows of neatly stacked books.
At around 17:30 I returned home, only to find a batch of freshly baked oat crunchies. I helped myself, and found myself marvelling at the golden colour and savouring the amazing taste.
 I went upstairs and lay on my bed. I watched a poster on my wall, and found that if I stared hard at its face, it would float away.  It was quite painful, especially after I felt like my heart was being squeezed, so I tried to close my eyes and forget about it.
At 18:30 my limbs were feeling so heavy that it felt like I was detached from the rest of the world, or moving in slow motion, like in water, and I could swear I could see ripples as my arm passed through the air. When I looked in the mirror I could see that my eyes were bloodshot, and I was quite pale. I went back to bed and attempted to philosiphize. However, due to the tiny memory span I had whilst on the nutmeg, I could not manage to follow even the simplest train of thought.
At 19:30 I went and watched some TV, and laughed at any attempt at humour from anyone. Although I still felt detached and heavy, I started to feel a sensation like falling.
At 20:00 I went upstairs and lay on my bed, enjoying the falling sensation, but snapping out of it when I felt like I was going to hit the ground. I did this for about an hour before watching some comedy downstairs. It was extremely funny. I watched TV until 23:00 before going upstairs and sitting in my room with the light on.
At 23:30, I think I must have blacked out. I wasnít awake for 3 hours, but I wasnít asleep? Because instead of waking painfully, I just opened my eyes and I was still sitting up, not tired or weary, with the light still on. I got little auditory hallucinations through the night. The next day was a blur. Just a stoned feeling throughout the day, stomach aches, fooooking dry mouth.
All in all, I think it was a worthwhile, pleasant experience, and would recommend it. I think nutmeg actively enhances the senses of taste, sight, hearing and touch. Iím not sure about smell. The hangover was pretty harsh so I would recommend setting aside 48 hours+. Iím not sure I would try it again because of the rank taste and longevity of the trip. The effects were pleasant enough though.
Experience Reports are the writings and opinions of the individual authors who submit them.
Some of the activities described are dangerous and/or illegal and none are recommended by Erowid.


public class BasicStroke extends Object implements Stroke
BasicStroke
class defines a basic set of rendering
attributes for the outlines of graphics primitives, which are rendered
with a Graphics2D
object that has its Stroke attribute set to
this BasicStroke
.
The rendering attributes defined by BasicStroke
describe
the shape of the mark made by a pen drawn along the outline of a
Shape
and the decorations applied at the ends and joins of
path segments of the Shape
.
These rendering attributes include:
SEG_CLOSE
for more information on the CLOSE segment.
The three different decorations are: CAP_BUTT
,
CAP_ROUND
, and CAP_SQUARE
.
SEG_CLOSE
.
The three different decorations are: JOIN_BEVEL
,
JOIN_MITER
, and JOIN_ROUND
.
Shape
argument. When a Graphics2D
object uses a
Stroke
object to redefine a path during the execution
of one of its draw
methods, the geometry is supplied
in its original form before the Graphics2D
transform
attribute is applied. Therefore, attributes such as the pen width
are interpreted in the user space coordinate system of the
Graphics2D
object and are subject to the scaling and
shearing effects of the user-space-to-device-space transform in that
particular Graphics2D
.
For example, the width of a rendered shape's outline is determined
not only by the width attribute of this BasicStroke
,
but also by the transform attribute of the
Graphics2D
object. Consider this code:
// sets the Graphics2D object's Transform attribute g2d.scale(10, 10); // sets the Graphics2D object's Stroke attribute g2d.setStroke(new BasicStroke(1.5f));Assuming there are no other scaling transforms added to the
Graphics2D
object, the resulting line
will be approximately 15 pixels wide.
As the example code demonstrates, a floating-point line
offers better precision, especially when large transforms are
used with a Graphics2D
object.
When a line is diagonal, the exact width depends on how the
rendering pipeline chooses which pixels to fill as it traces the
theoretical widened outline. The choice of which pixels to turn
on is affected by the antialiasing attribute because the
antialiasing rendering pipeline can choose to color
partially-covered pixels.
For more information on the user space coordinate system and the
rendering process, see the Graphics2D
class comments.
Graphics2D
| Modifier and Type | Field and Description |
|---|---|
static int |
CAP_BUTT
Ends unclosed subpaths and dash segments with no added
decoration.
|
static int |
CAP_ROUND
Ends unclosed subpaths and dash segments with a round
decoration that has a radius equal to half of the width
of the pen.
|
static int |
CAP_SQUARE
Ends unclosed subpaths and dash segments with a square
projection that extends beyond the end of the segment
to a distance equal to half of the line width.
|
static int |
JOIN_BEVEL
Joins path segments by connecting the outer corners of their
wide outlines with a straight segment.
|
static int |
JOIN_MITER
Joins path segments by extending their outside edges until
they meet.
|
static int |
JOIN_ROUND
Joins path segments by rounding off the corner at a radius
of half the line width.
|
| Constructor and Description |
|---|
BasicStroke()
Constructs a new
BasicStroke with defaults for all
attributes. |
BasicStroke(float width)
Constructs a solid
BasicStroke with the specified
line width and with default values for the cap and join
styles. |
BasicStroke(float width,
int cap,
int join)
Constructs a solid
BasicStroke with the specified
attributes. |
BasicStroke(float width,
int cap,
int join,
float miterlimit)
Constructs a solid
BasicStroke with the specified
attributes. |
BasicStroke(float width,
int cap,
int join,
float miterlimit,
float[] dash,
float dash_phase)
Constructs a new
BasicStroke with the specified
attributes. |
| Modifier and Type | Method and Description |
|---|---|
Shape |
createStrokedShape(Shape s)
Returns a
Shape whose interior defines the
stroked outline of a specified Shape . |
boolean |
equals(Object obj)
Tests if a specified object is equal to this
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 . |
float[] |
getDashArray()
Returns the array representing the lengths of the dash segments.
|
float |
getDashPhase()
Returns the current dash phase.
|
int |
getEndCap()
Returns the end cap style.
|
int |
getLineJoin()
Returns the line join style.
|
float |
getLineWidth()
Returns the line width.
|
float |
getMiterLimit()
Returns the limit of miter joins.
|
int |
hashCode()
Returns the hashcode for this stroke.
|
@Native public static final int JOIN_MITER
@Native public static final int JOIN_ROUND
@Native public static final int JOIN_BEVEL
@Native public static final int CAP_BUTT
@Native public static final int CAP_ROUND
@Native public static final int CAP_SQUARE
@ConstructorProperties(value={"lineWidth","endCap","lineJoin","miterLimit","dashArray","dashPhase"}) public BasicStroke(float width, int cap, int join, float miterlimit, float[] dash, float dash_phase)
BasicStroke
with the specified
attributes.width
- the width of this BasicStroke
. The
width must be greater than or equal to 0.0f. If width is
set to 0.0f, the stroke is rendered as the thinnest
possible line for the target device and the antialias
hint setting.cap
- the decoration of the ends of a BasicStroke
join
- the decoration applied where path segments meetmiterlimit
- the limit to trim the miter join. The miterlimit
must be greater than or equal to 1.0f.dash
- the array representing the dashing patterndash_phase
- the offset to start the dashing patternIllegalArgumentException
- if width
is negativeIllegalArgumentException
- if cap
is not either
CAP_BUTT, CAP_ROUND or CAP_SQUAREIllegalArgumentException
- if miterlimit
is less
than 1 and join
is JOIN_MITERIllegalArgumentException
- if join
is not
either JOIN_ROUND, JOIN_BEVEL, or JOIN_MITERIllegalArgumentException
- if dash_phase
is negative and dash
is not null
IllegalArgumentException
- if the length of
dash
is zeroIllegalArgumentException
- if dash lengths are all zero.public BasicStroke(float width, int cap, int join, float miterlimit)
BasicStroke
with the specified
attributes.width
- the width of the BasicStroke
cap
- the decoration of the ends of a BasicStroke
join
- the decoration applied where path segments meetmiterlimit
- the limit to trim the miter joinIllegalArgumentException
- if width
is negativeIllegalArgumentException
- if cap
is not either
CAP_BUTT, CAP_ROUND or CAP_SQUAREIllegalArgumentException
- if miterlimit
is less
than 1 and join
is JOIN_MITERIllegalArgumentException
- if join
is not
either JOIN_ROUND, JOIN_BEVEL, or JOIN_MITERpublic BasicStroke(float width, int cap, int join)
BasicStroke
with the specified
attributes. The miterlimit
parameter is
unnecessary in cases where the default is allowable or the
line joins are not specified as JOIN_MITER.width
- the width of the BasicStroke
cap
- the decoration of the ends of a BasicStroke
join
- the decoration applied where path segments meetIllegalArgumentException
- if width
is negativeIllegalArgumentException
- if cap
is not either
CAP_BUTT, CAP_ROUND or CAP_SQUAREIllegalArgumentException
- if join
is not
either JOIN_ROUND, JOIN_BEVEL, or JOIN_MITERpublic BasicStroke(float width)
BasicStroke
with the specified
line width and with default values for the cap and join
styles.width
- the width of the BasicStroke
IllegalArgumentException
- if width
is negativepublic BasicStroke()
BasicStroke
with defaults for all
attributes.
The default attributes are a solid line of width 1.0, CAP_SQUARE,
JOIN_MITER, a miter limit of 10.0.public Shape createStrokedShape(Shape s)
Shape
whose interior defines the
stroked outline of a specified Shape
.createStrokedShape
in interface Stroke
s
- the Shape
boundary be strokedShape
of the stroked outline.public float getLineWidth()
Graphics2D
class comments for more information on
the user space coordinate system.BasicStroke
.Graphics2D
public int getEndCap()
BasicStroke
as one
of the static int
values that define possible end cap
styles.public int getLineJoin()
BasicStroke
as one
of the static int
values that define possible line
join styles.public float getMiterLimit()
BasicStroke
.public float[] getDashArray()
Shape
to be stroked, the user space
distance that the pen travels is accumulated. The distance
value is used to index into the dash array.
The pen is opaque when its current cumulative distance maps
to an even element of the dash array and transparent otherwise.public float getDashPhase()
float
value.public int hashCode()
hashCode
in class Object
Object.equals(java.lang.Object)
,
System.identityHashCode(java.lang.Object)
public boolean equals(Object obj)
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
.equals
in class Object
obj
- the specified object to compare to this
BasicStroke
true
if the width, join, cap, miter limit, dash, and
dash phase are the same for both objects;
false
otherwise.Object.hashCode()
,
HashMap
Dracula Javadoc Sample, Made with Allan Im.


Company Name
Email
Category
Glass Recycling
Paper Recycling
Texttile Recycling
Plastic Processing
Location
Mombasa CDB
Majengo
Jomvu
Old Town
Mwakirunge
Phone
Password
account_balance


Fit-Kidz
Home
About
Contact
Food Ranking
Park Finding
Register
Log in
Finding Park Nearby
Find Parks in
Address:
Telephone:
Rating:
Website:


I will try to keep this brief and only give information that interseted readers will find useful. After reading about many experiences with morning glory seeds from this website and other sources, I decided to take a chance and try them out. A little description of preparations: took Dramamine to help reduce nausea and washed/soaked seeds in detergent for at least five minutes and then dried before grinding in electric coffee grinder till fine powder achieved. I soaked seed powder in cold water in small bowl and after putting cling wrap on top of tiny bowl put seed mixture in fridge for about thirty minutes.
I had eaten some food about thirty minutes before taking Dramamine and it ended up being about another thirty minutes after taking Dramamine that I swallowed unpleasant-tasting seed mixture that I mixed with two or more glasses of extra strong green tea. It was gross but was able to swallow without much difficulty.
 I thought about throwing up then but was able to wait almost an hour before vomiting. I had already starting feeling strange dizziness but was not sure if this was from nausea or from seeds taking effect.
After throwing up and washing water on face, I started to feel much better and then decided that I NEEDED to be outside (I remembered feeling too confined inside in past when feelings of acid were starting). Driving was out of the question since I was not sure if I was starting a heavy trip or not. I walked about a mile to a nice woody area after making one detour: going into a video store to rent a movie- an experience that told me YES I was under influence of newly discovered drug and had much difficulty talking with waves of heat (energy?) rushing through body (VERY much like acid trip).
I found a cozy, quiet area and finally realxed getting into mood for what could be a long event like past acid trips that have lasted over twelve hours. I eventually walked around my old neighborhood which was another two miles from where I started and ended up lying down in a small cemetery that I used to visit when stoned with friends. This may sound strange and/or morbid but it is a cool place and I have always felt at peace there. There are only about ten graves in this small place that is within a residential neighborhood. It must be a private cemetery and I noticed a few of the graves are quite old.
I felt GREAT then and sat back staring at some tall trees in the distance. A crow seemed to be communicating with me from high up on a brance and the cold breeze (unusally cold for a late spring day in Georgia) was mesmerizing. At that point I felt like I was in touch with my withheld creative and spriritual thoughts and saw things CLEARLY as I have only experienced from strong psychoactive drugs such as acid and mushrooms. I began to notice that the temperature was dropping now that it was late afternoon and I had been outside now for about two hours. I started wandering home then.
I made one final stop at a store to buy food and again was sure I was tripping because of the difficulty of purchasing beer. I went into the restroom and wrote on the wall 'I'm tripping hard right here, right now. It's groovy!' and then headed to my empty apartment where I had started this fascinating day. I ate some food with much difficulty (swallowing was almost impossible-ANOTHER sign of tripping I experienced under acid trips) and drank beer, which was comforting. I rarely drink beer or anything with alcohol but have found beer is a nice addition during the middle to late stages of an acid trip. My stomach never felt quite right throughout this trip but beer did seem to take away edge.
I played some live Grateful Dead music and stretched out on the floor with a blanket, completely at peace and still tripping strong after three hours. The music sounded heavenly and I sang out loud to familiar verses. This was GREAT to reexperience the awesome effects certain drugs (pot and acid) have on one when hearing music! I listened to long trippy songs like Dark Star and listened deeply to the melodies tapping my feet with my eyes shut.  Well, all things have an end and this trip ABRUPTLY ended near the four hour point.
All in all, worth the effort and expense (seeds and electric coffee blender) for this LEGAL high. Acid is superior but lasts sometimes too long and not accessable for me now (neither is pot). Well, I was amazed at the effects of these little seeds and tried the 'experiment' at least five times since last year. Some good results but nothing close to 'magical' effects produced the first time described above. My friend believes I tapped into 'shamanistic' feelings and these metaphysical experience came to me out of pure luck, which means I may NEVER relive similar results.
I read somewhere that the morning glory seeds were used by Indians in ceremonies ad should not be treated as recreational drugs, therefore it does seem likely that my first encounter was unique and I should be thankful for what I experienced. I am hoping that if I wait longer and longer between 'experiments' I can find some of these feeling again (and again). I WISH OTHERS LUCK AND FEELINGS OF INNERPEACE THROUGH MORNING GLORY SEEDS OR OTHER MEANS- IT IS WORTH THE EFFORT TO ACHIEVE SUCH BLISS!
Experience Reports are the writings and opinions of the individual authors who submit them.
Some of the activities described are dangerous and/or illegal and none are recommended by Erowid.


This is a "Facebook" styled Card. The header is created from a Thumbnail List item, the content is from a card-body consisting of an image and paragraph text. The footer The terms and conditions are as follows: 1. 2.


Get Your Survey Link
Enter your user id to see if you have a survey available
User Id
Please enter a user id
The user id is too long, must be less than 32 characters
Take Survey
Currency:
Minimum:
Maximum:
No Survey Available
Request timeout. Please try again.
There was an error. Please try again.
Something unexpected happened. Please try again.
Submit


Commonwealth urges world to count cost of domestic abuse
LONDON, Nov 25 — Domestic violence is a pandemic that costs billions of dollars a year, be it in lost work, damaged children or police time, Commonwealth Secretary-General Patricia Scotland said today.
Scotland - the first woman to run the group - urged her 53 members to count the price of doing nothing as she launched formal action to tackle the scourge.
“There’s a cost in human terms, but also in economic terms,” Scotland, a British lawyer and politician, told the Thomson Reuters Foundation in an interview.
“There’s no point in saying it’s someone else’s business. This is like a pandemic. It’s everybody’s business,” she said.
Violence in the home often affects a victim’s work and increases absenteeism, she said. It also costs the health services, police and criminal justice systems and may set back any children in the family, with repercussions for their future.
“If we don’t have peace in our homes, we are very unlikely to have peace in our world,” she said.
About one in three women worldwide has suffered physical or sexual violence, most frequently by a partner, but it often goes unreported due to stigma, fear and shame, said Scotland.
Time to act
The Commonwealth announced today- International Day for the Elimination of Violence Against Women - that it was teaming up with the NO MORE Foundation, a global movement of 1,400 organisations working to stop domestic and sexual abuse.
Some 1.1 billion women and girls live in the Commonwealth, a loose alliance of mostly former British colonies.
Domestic abuse was recently estimated to cost England and Wales about £66 billion (RM355.2 billion) a year, a fifth arising from lost output due to missed work and reduced productivity.
The Commonwealth has developed a tool to help governments measure the cost of violence against women and girls.
Monday’s new initiative will help members record data, train community leaders and raise public awareness.
It includes supporting LGBT+ victims.
“Our homes now come in a multiplicity of forms and we want peace in all of them,” Scotland said.
Some countries are already leading efforts to address domestic violence, she added, citing New Zealand, which this year introduced paid leave for domestic abuse victims.
In Britain, training on how to spot the signs of domestic violence is given to midwives, teachers, taxi drivers - who may be called to pick up women fleeing abuse - and locksmiths, who may be asked to make a home safe.
Globally, only two-thirds of countries have outlawed domestic violence. Among Commonwealth countries, 47 have legislation, but 33 do not explicitly criminalise marital rape and only nine offer broad protections for LGBT people. — Reuters


Tutorial_001:In this tutorial, we create a simple simulation of a ring of current (with no current) falling under gravity towards a “wall” (really a floor) with which it will collide with perfect elasticity. There are no electromagnetic fields in this simple simulation.
|


US: CPI likely to post +0.2% mom increase – Deutsche Bank
by Sandeep KanihamaAccording to Deutsche Bank analysts, the main highlight for the US markets is CPI release on Wednesday and the retail sales figures on Friday.
Key Quotes
“For the CPI, the consensus reading is expecting a +0.2% mom increase in both the main CPI and core CPI, while for retail sales a +0.4% mom increase is expected.”
“In more details on the CPI and detailing DB’s above consensus call, our economists suggest the gap between trimmed mean CPI and core CPI was 14bps in October, while the gap between the sticky CPI ex-shelter and core CPI was 19bps. These divergences are in the top 8% and 3% of historical experience, respectively.”
“As such, the team expect November core CPI to rise +0.26% month-over-month.”


Jan 19, 2017
Firing up the container
This guide, was tried on macOS SIERRA where Docker was already installed.
First of all, a brief introduction. Docker is a virtualization environment where you will use one or more images fired up into “containers” for your work.
Images usually represetns those essential parts of the services you need to run, such as the apache web server. Remember, containers are not virtual machines. They run into special environments as if they had their own life.
Therefore you can expect to fire up an httpd (apache) container with no shell access at all.
Here are the steps to run Magento 2 devbox into a docker environment.
1 Clone the git repository
git clone https://github.com/magento/magento2devbox-web.git
2 Move into the folder
3 Compile our custom image (expect it to take while…)
docker build -t magento2devbox ./
With this command we tell docker to build a custom image named “magento2devbox”. Docker will read the current directory for the Dockerfile containing the configuration a will begin the compilation. You should see it downloading a bunch of “docker containers” and after that the custom commands run a series of initial configurations.
You will now have a new image, ready to be fired into a container. You can check a new image “magento2devbox” has been created with:
docker images
4 quit any other local web server
(please, don’t have me say this thing twice…)
5 fire up your containers
docker run --name devbox -p 80:80 -p 22:22 -it magento2devbox
We now told docker to run a new container from the image “magento2devbox” in interactive mode (-it) and name it “devbox”. We also told it to forward ports 22 and 80 from the host to the container.
NOTE: you will have to keep this terminal session open as long as you want to use the devbox. You can run the container in background with different commands but as we may like to have everything under control, in this tutorial we will use it this way.
At this point, you will need to open another shell.
6 check the devbox is running
Run in terminal the command
docker ps
You should see a line like this:
where the column PORTS will tell us on which ports the new container is currently listening.
Now, you can login open your browser to your localhost and log into your container with the command
ssh<EMAIL_ADDRESS>Environment up, running and ready to go.
[…to be continued]
Docker command tips
Stop all containers and delete them all
(Note this will not remove the images from your machine)
docker stop $(docker ps -a -q) && docker rm $(docker ps -a -q)
Angelo
Jan 15, 2017
Is it really worth to deliver a project based on Magento 2 in this current state of development?
For the company I work for, mostly no.
Magento 2 is wonderful, but still under massive changes and improvements
It’s january 2017 and more than year has already passed sincce Magento 2 officiale release.
As a web developer used to rely on opensource projects, I really appreciate the efforts that every community puts in place to make a platform really great and I aslo understand the difficulties a new release may have to walk thorugh.
The community edition of Magento 2 has a huge number of open issues and in the past days I read comments on github and a post by a gold partner that make you seriously think twice before starting a project to the world.
Two months ago I also started my official and planned study of the new platform. Currently half way to the end of the course, I find Magento has completely changed from the version 1.
There is a massive difference between very small company applications and big enterprises solutions. Magento 1, somehow, represents a solutions that can address the online needs of a small shop and can scale up to big projects where computational requirements can be split across different servers.
For big companies
Magento 2 seem to have completely forgotten the really small business and becomes the best ecommerce platform only in the hands of a big company, with a structured web development department.
The small developer, and the medium company, have to set aside their desires of “fast and different projects” and think instead on a bigger scale. Plan ahead the development, its required test phases, and plan ahead the adoption of technologies, frameworks and assets that may speed up any possible process.
Fast on big implementations
I read about people complaining about Magento 2 speed. On a development environment is slow. I complain about it too. But the more I study, and through the experience I gathered with the amazing php framework Laravel, and the more I realise Magento 2 development requires me to change my way of coding.
No more, tweaks, test, tweak, test, works, refactor, test, go.
 More observations, reasoning, and lesstime wasted in coding.
As I read on James Cowie blog, it’s time to abandon var_dump/die in favor of xdebug for a better way of coding.
is it Magento 2 ready to begin a project?
Yes, but if you plan to avoid a proper coding environment without tools for tests automation, debugging, tasks automation (I read grunt is the fastest at the minute), css compilation, deployment automation, you should wait another 6 months longer before beginning to work on Magento 2.
Angelo
(image credits Michael Ramey)


09. Optional: Configure RESTful API endpoint
# Optional: Configure RESTful API endpoint to return a registered star
NOTE: This section is not required for your project to pass.
Utilizing your previous coursework experience in the course, create a new web API using Node.js and a RESTful framework. Include a library that will connect with your smart contract using a web3 instance.
Configure an endpoint function that will use the web3 instance to communicate with your smart contract and return a star by the star token ID. The endpoint must utilize a GET method with URL path for star token ID.
Route path example:
method: 'GET',
path: '/star/{starTokenId}'
- Endpoint returns a json object
JSON response example:
["Star power 103!", "I love my wonderful star", "ra_032.155", "dec_121.874", "mag_245.978"]


Placement class. More...
#include <placement.h>
Public Member Functions | |
| placement (netlist::netlist *netlist, library *lib) | |
| Constructor. More... | |
| geometry::multi_polygon < geometry::polygon < geometry::point< double > > > | cell_geometry (entity_system::entity cell) const |
| Cell geometry getter. More... | |
| void | cell_position (entity_system::entity cell, geometry::point< double > position) |
| Places a cell. More... | |
| geometry::point< double > | cell_position (entity_system::entity cell) const |
| Cell position getter. More... | |
| void | cell_fixed (entity_system::entity cell, bool fixed) |
| bool | cell_fixed (entity_system::entity cell) const |
| geometry::point< double > | cell_dimensions (entity_system::entity cell) const |
| entity_system::entity | cell_create (std::string name, std::string type) |
| const cells & | cell_properties () |
| geometry::point< double > | pin_position (entity_system::entity pin) const |
| Pin position getter. More... | |
| void | pad_position (entity_system::entity pad, geometry::point< double > position) |
| Places a pad. More... | |
| const netlist::netlist & | netlist () const |
| Netlist getter. More... | |
| const library & | lib () const |
| Placement library getter. More... | |
This class provides the basic placement interface, such as cells and pads position manipulation.
| ophidian::placement::placement::placement | ( | netlist::netlist * | netlist, |
| library * | lib | ||
| ) |
Placement constructor. Initializes the placement cell properties, such as positions and geometries.
| netlist | Circuit netlist. |
| lib | Placement library. |
|
inline |
Returns the geometry of a cell as a multi polygon. Each polygon in the multi polygon represents a rectangle of the cell.
| cell | Cell to get the geometry. |
| void ophidian::placement::placement::cell_position | ( | entity_system::entity | cell, |
| geometry::point< double > | position | ||
| ) |
Changes the position of a cell.
| cell | Cell to move. |
| position | Target position of the cell. |
|
inline |
Returns the position of a cell.
| cell | Cell to get the position. |
|
inline |
Returns the placement library used in the placement construction.
|
inline |
Returns the netlist used in the placement construction.
| void ophidian::placement::placement::pad_position | ( | entity_system::entity | pad, |
| geometry::point< double > | position | ||
| ) |
Changes the position of a pad.
| pad | Pad to move. |
| position | Target position of the pad. |
|
inline |
Returns the position of a pin, calculated from the cell position and the pin offset.
| pin | Pin to get the position. |


Sony WH1000XM3 Over-Ear Wireless Headphones Are $72 Off
Another popular pair of Sony headphones are on sale at the moment, the Sony WH1000XM3. These are the company's higher-end headphones, and they're currently priced at $278.
These headphones usually cost $350, which means that you're getting a $72 discount here (21-percent). These are wireless headphones, and they offer great comfort and sound.
These are over-ear headphones, as you can see, and they support Amazon's Alexa. So, you can control your Alexa-powered / connected smart devices using these headphones.
Advertisement
These headphones come with really soft and comfortable ear cups. The headphones are ergonomically designed, and they're foldable, so they're easy to carry around with you.
The Sony WH1000XM3 offer digital active noise canceling, and the company claims that it can provide a virtually soundproof experience.
These headphones have a really neat feature which enables you to quickly chat with someone without the need to pause your music or remove the headphones. If you cover the right ear cup with your hand, the volume will lower considerably, and you'll be able to talk with a person next to you.
Advertisement
The Sony WH1000XM3 also have the 'Smart Listening' feature, which adjusts the ambient sound to your activity in order to give you the best noise cancellation.
Touch controls are included on these headphones. You can control music tracks and volume via these touch controls, and also take phone calls, not to mention that you can call upon a voice assistant as well.
The company claims that these headphones can provide you with up to 30 hours of play time, before you'll need to charge them. That is great battery life, no doubt.
Advertisement
If you decide to purchase the Sony WX1000XM3 headphones, you'll get the carrying case, and a charging cable, not to mention an audio cable as well. That audio cable can be used even if there's no battery left in these headphones, of course.
If you'd like to purchase the Sony WX1000XM3 headphones, click here. We've also included a purchase button down below, for your convenience.
Sony WH1000XM3 - Amazon - $278
Advertisement


ContextMenuRequest QML Type
A request for showing a context menu. More...
| Import Statement: | import QtWebEngine 1.5 |
| Since: | QtWebEngine 1.4 |
Properties
- accepted : bool
- isContentEditable : bool
- linkText : string
- linkUrl : url
- mediaType : enumeration
- mediaUrl : url
- misspelledWord : string
- selectedText : string
- spellCheckerSuggestions : stringlist
- x : int
- y : int
Detailed Description
A ContextMenuRequest is passed as an argument of the WebEngineView::contextMenuRequested signal. It provides further information about the context of the request. The position of the request origin can be found via the x and y properties.
The accepted property of the request indicates whether the request is handled by the user code or the default context menu should be displayed.
The following code uses a custom menu to handle the request:
WebEngineView { id: view // ... onContextMenuRequested: function(request) { request.accepted = true; myMenu.x = request.x; myMenu.y = request.y; myMenu.trigger.connect(view.triggerWebAction); myMenu.popup(); } // ... }
Property Documentation
Indicates whether the context menu request has been handled by the signal handler.
If the property is false
after any signal handlers for WebEngineView::contextMenuRequested have been executed, a default context menu will be shown. To prevent this, set request.accepted
to true
.
The default is false
.
Note: The default content of the context menu depends on the web element for which the request was actually generated.
[read-only] linkUrl : url |
The URL of the link if the selected web page content is a link.
The type of the media element or MediaTypeNone
if the selected web page content is not a media element.
| Constant | Description |
|---|---|
ContextMenuRequest.MediaTypeNone | Not a media. |
ContextMenuRequest.MediaTypeImage | An image. |
ContextMenuRequest.MediaTypeVideo | A video. |
ContextMenuRequest.MediaTypeAudio | An audio element. |
ContextMenuRequest.MediaTypeCanvas | A canvas. |
ContextMenuRequest.MediaTypeFile | A file. |
ContextMenuRequest.MediaTypePlugin | A plugin. |
[read-only] mediaUrl : url |
The URL of media if the selected web content is a media element.
If the context is a word considered misspelled by the spell-checker, returns the misspelled word.
If the context is a word considered misspelled by the spell-checker, returns a list of suggested replacements.
The x coordinate of the user action from where the context menu request originates.
The y coordinate of the user action from where the context menu request originates.


more than 7 years of programming experience in academic and professional projects including 3 years of professional experience in Linux kernel development for embedded devices based on ARM/MIPS architecture and Application Software Development in Java/JSP/JSF/Servlets using MVC architecture
Languages : C, C++ (STL, Boost, OpenGL), Java, Perl, Shell script, HTML, CSS, JavaScript, MIPS assembly, ARM assembly, Device Drivers, Linux kernel Programming
Tools : GDB, Make, oprofile, ARM Streamline, QEMU, Xen, Git, Perforce, Prevent, Coverity, Rhapsody, cscope
IDE/Editor : Eclipse, Visual Studio, Vim, MARS
Architecture : ARM, MIPS
OS : Linux, Windows
developed a couple of desktop apps acadamically and professionally. checkout the link below
Learn Morehave developed a couple of android apps for a connected car platform, checkout the link below
Learn MoreCurrently a toddler in web development, working on some projects, checkout the link below
Learn Morelove the OS and assembly stuff, did a bunch of Linux kernel dev while working with Samsung Research, have tried my hands on assembly programming as well, check out the link below
Learn More


{% extends "base_generic.html" %} {% block title %}
Your site is up and running!
If you are seeing this message it means a page with the name index was not found in the database. Log in to the administrative panel and create a page with "index" without the quotes, as the slug to dismiss this message.
{% endblock %}


{{'enter_the_target_locations_of_your_project_in_the_form_below' | translate}};
Group Target Locations by Union?
Recommended for Project Plans with over 30 Target Locations!


Activities
In-person events for artists to share active works, ideas or challenges they face in
arts. Each artist receives peer-to-peer support from the group, offering support and
advice from our hive mind.Please note that our peer groups are currently on hold due
to COVID-19. We’re still running some online events though.
In addition to the above we now run other weekly events, including professional
development workshops and socials. In the future we’ll also be organizing
exhibitions.
A place to connect with other artists, share works and challenges,
discoverresources, or just check-in with others in the sector.Art for SDGs events
will be run at the hub focusing on creating mentors and train the artists on
financial literacy and HRBA to community development through Art.


public class NGramModel extends Object implements Iterable<StringList>
NGramModel
can be used to crate ngrams and character ngrams.StringList
| Constructor and Description |
|---|
NGramModel()
Initializes an empty instance.
|
NGramModel(InputStream in)
Initializes the current instance.
|
| Modifier and Type | Method and Description |
|---|---|
void |
add(String chars,
int minLength,
int maxLength)
Adds character NGrams to the current instance.
|
void |
add(StringList ngram)
Adds one NGram, if it already exists the count increase by one.
|
void |
add(StringList ngram,
int minLength,
int maxLength)
Adds NGrams up to the specified length to the current instance.
|
boolean |
contains(StringList tokens)
Checks fit he given tokens are contained by the current instance.
|
void |
cutoff(int cutoffUnder,
int cutoffOver)
Deletes all ngram which do appear less than the cutoffUnder value
and more often than the cutoffOver value.
|
boolean |
equals(Object obj) |
int |
getCount(StringList ngram)
Retrieves the count of the given ngram.
|
int |
hashCode() |
Iterator<StringList> |
iterator()
Retrieves an
Iterator over all StringList entries. |
int |
numberOfGrams()
Retrieves the total count of all Ngrams.
|
void |
remove(StringList tokens)
Removes the specified tokens form the NGram model, they are just dropped.
|
void |
serialize(OutputStream out)
Writes the ngram instance to the given
OutputStream . |
void |
setCount(StringList ngram,
int count)
Sets the count of an existing ngram.
|
int |
size()
Retrieves the number of
StringList entries in the current instance. |
Dictionary |
toDictionary()
Creates a dictionary which contain all
StringList which
are in the current NGramModel . |
Dictionary |
toDictionary(boolean caseSensitive)
Creates a dictionary which contains all
StringList s which
are in the current NGramModel . |
String |
toString() |
public NGramModel()
public NGramModel(InputStream in) throws IOException, InvalidFormatException
in
- IOException
InvalidFormatException
public int getCount(StringList ngram)
ngram
- public void setCount(StringList ngram, int count)
ngram
- count
- public void add(StringList ngram)
ngram
- public void add(StringList ngram, int minLength, int maxLength)
ngram
- the tokens to build the uni-grams, bi-grams, tri-grams, ..
from.minLength
- - minimal lengthmaxLength
- - maximal lengthpublic void add(String chars, int minLength, int maxLength)
chars
- minLength
- maxLength
- public void remove(StringList tokens)
tokens
- public boolean contains(StringList tokens)
tokens
- public int size()
StringList
entries in the current instance.public Iterator<StringList> iterator()
Iterator
over all StringList
entries.iterator
in interface Iterable<StringList>
public int numberOfGrams()
public void cutoff(int cutoffUnder, int cutoffOver)
cutoffUnder
- cutoffOver
- public Dictionary toDictionary()
StringList
which
are in the current NGramModel
.
Entries which are only different in the case are merged into one.
Calling this method is the same as calling toDictionary(boolean)
with true.public Dictionary toDictionary(boolean caseSensitive)
StringList
s which
are in the current NGramModel
.caseSensitive
- Specifies whether case distinctions should be kept in the creation of the dictionary.public void serialize(OutputStream out) throws IOException
OutputStream
.out
- IOException
- if an I/O Error during writing occursCopyright © 2015 The Apache Software Foundation. All rights reserved.


Welcome to the Cesium Short Links Interface! This is a basic page with links I've created so that I don't have to use a link shortener. The moajority of pages here are on the Cesium domain (cesium.gq), but there may be some external links to other sites such as the Horizons Forums, documents, etc.


|
GPGPU-Sim
|
#include <logic.h>
Public Member Functions | |
| selection_logic (bool _is_default, int win_entries_, int issue_width_, const InputParameter *configure_interface, enum Device_ty device_ty_=Core_device, enum Core_type core_ty_=Inorder) | |
| void | selection_power () |
| void | leakage_feedback (double temperature) |
| Public Member Functions inherited from Component | |
| Component () | |
| ~Component () | |
| double | compute_gate_area (int gate_type, int num_inputs, double w_pmos, double w_nmos, double h_gate) |
| double | compute_tr_width_after_folding (double input_width, double threshold_folding_width) |
| double | height_sense_amplifier (double pitch_sense_amp) |
Public Attributes | |
| bool | is_default |
| InputParameter | l_ip |
| uca_org_t | local_result |
| const ParseXML * | XML_interface |
| int | win_entries |
| int | issue_width |
| int | num_threads |
| enum Device_ty | device_ty |
| enum Core_type | core_ty |
| Public Attributes inherited from Component | |
| Area | area |
| powerDef | power |
| powerDef | rt_power |
| double | delay |
| double | cycle_time |
Additional Inherited Members | |
| Protected Member Functions inherited from Component | |
| int | logical_effort (int num_gates_min, double g, double F, double *w_n, double *w_p, double C_load, double p_to_n_sz_ratio, bool is_dram_, bool is_wl_tr_, double max_w_nmos) |
| selection_logic::selection_logic | ( | bool | _is_default, |
| int | win_entries_, | ||
| int | issue_width_, | ||
| const InputParameter * | configure_interface, | ||
| enum Device_ty | device_ty_ = Core_device , |
||
| enum Core_type | core_ty_ = Inorder |
||
| ) |
| void selection_logic::leakage_feedback | ( | double | temperature | ) |
| InputParameter selection_logic::l_ip |


Rapid testing can end the pandemic in just weeks.
Here's how: Test 50%+ of the population twice a week. Seriously. We can do this at a fraction of the cost of the current plans, it has an almost unlimited supply chain (vs. vaccine for example) requiring much less expertise — e.g., the tests can be easily self-administered without needing a physician.
Below is an animation showing how rapid testing can quickly and easily contain an outbreak by testing 60% of the population every 3 days. Each dot represents a person, and when they're red and infected they can bump into a blue uninfected person (susceptible) and infect them. Every 3 days, 60% of the population administers a self test and even if they're not symptomatic, they can isolate and stop the spread. Go ahead click the Start button and play around with the numbers.
Rapid testing uses a self-administerable paper strip to quickly (usually in under 15 minutes) and cheaply (<$15 cost) identify positive cases of COVID-19 — in time to act and prevent further spread.
Similar to an at-home pregnancy test, rapid tests are easy to use and aren't designed to be the final diagnosis of COVID (or pregnancy), but are meant to be privately administered in a way that you can quickly tell "Should I change my behavior/call my doctor?" and you can do so quickly and easily.
Rapid tests can change the course of the COVID-19 pandemic and may be the most amazing tool for identifying, containing and preventing future outbreaks. (Even a potential COVID-19 variant outbreak) due to their low-cost and massive production scale. We could literally be testing 50%+ of the entire US population twice a week. And we could do it at a fraction of the cost of our most recent aid package with better results.
There are 3 major differences between a rapid test (technically called an "Antigen test") and standard lab tests (called "PCR tests"):
Below you can try the same simulation above using thousands of people. Below is a robust statistical simulation we built that imitates the same bouncy balls above, but using thousands and thousands of people -- you'll see that in every case, massive scale rapid testing crushes the pandemic quickly and conclusively. And all this with a higher sensitivity to our American freedoms, at lower cost, and much, much (MUCH!) faster.
Some things to try:
Join Dr. Mina, a Harvard professor spearheading the effort for rapid tests.
Learn more on his website: RapidTests.org


Please watch this video to get a sense of how D3 can be used. Skip to 33:01 if you already understand SVG, HTML, CSS and JavaScript basics.
References from the video:
This video uses version 3 of D3, but the examples linked below use version 4.
The D3 CHANGES document contains all differences between these versions, and is useful to consult.
Please watch Unit 1 of the D3.js in Motion, which builds up a scatter plot using D3 version 4.
You are welcome to fork (using Blockbuilder) any of these scatter plot examples as a starting point for this assignment:
You may also choose to make it from scratch, or fork from any other scatter plot examples on bl.ocks.org. Be sure to tweak things so the scatter plot makes sense with your data and looks decent (e.g. margins, circle size, circle opacity, labels, tick marks).
The data may be any data you choose. For example, the data could be:
- One of the datasets from your "Find 3 Datasets" assignment
- The same data you used for last week's Bar Chart assignment
- A dataset from one of the current events visualizations shared with the class
When you're done, please:
- Review the grading criteria in detail and double check that you have everything.
- Submit the link to your work on bl.ocks.org as the submission for this assignment (URL should contain "bl.ocks.org", not "blockbuilder.org").
- You are welcome to also post the link in the course Slack to share your work with other students
- Also post in the #examples channel of the global D3 slack if you think it turned out to be really cool.
Good luck!
Clarifications:
- The three datasets should ideally be totally unrelated, totally separate.
- Each dataset should be in its own separate bl.ock, and 3 separate URLs should be submitted.
- If you are getting errors, please post to Slack and ask for help. Usually the errors are solvable. Common errors are related to text formatting (e.g. an extra comma in CSV, a missing quote in JSON).
- Missing data values are tricky to deal with, and handling missing data is a whole topic on its own. If your data has missing values, you can:
- Omit rows or columns with missing data
- Treat missing values as another value to be visualized
- Fill in zeros for missing values (but be careful - often this doesn't make sense to do)
- Find another dataset that doesn't have missing values


The Walking Dead
Sheriff Deputy Rick Grimes wakes up from a coma to learn the world is in ruins, and must lead a group of survivors to stay alive.


Guess A Number!
I'm thinking of a number between 1 and 100. Try to guess what it is.
Guess!
Too High!
Guesses:
3
10
low
99
high
44
right
Start Over


Add Applicant
First Name:
Last Name:
Source:
Location:
Position:
PHP-Dev
Java-Dev
Full Stack
Availability:


Variable set by inline style of element:
Variable set by CSS rule matching element:
Variable set by CSS rule matching pseudo element:


| Table 1 |
Input parameters for microsimulation models. |
| Table 2 |
Input parameters for variables in the microsimulation models ... |
| Table 3 |
Estimated health and economic costs of salmonellosis and its ... |
| Table 4 |
Percentage and 95% confidence intervals of the estimated cos ... |
| Table 5 |
Percentage and 95% confidence intervals of the estimated cos ... |