1.0 Introduction
4.0 Tools
Appendix A Sun PKCS#11 Provider's Supported Algorithms
Appendix B Sun PKCS#11 Provider's KeyStore Restrictions
Appendix C Example Provider
The Java platform defines a set of programming interfaces for performing cryptographic operations. These interfaces are collectively known as the Java Cryptography Architecture (JCA) and the Java Cryptography Extension (JCE). Specifications are available at the Java SE Security Documentation page.
The cryptographic interfaces are provider-based. Specifically, applications talk to Application Programming Interfaces (APIs), and the actual cryptographic operations are performed in configured providers which adhere to a set of Service Provider Interfaces (SPIs). This architecture supports different provider implementations. Some providers may perform cryptographic operations in software; others may perform the operations on a hardware token (for example, on a smartcard device or on a hardware cryptographic accelerator).
The Cryptographic Token Interface Standard, PKCS#11, is produced by RSA Security and defines native programming interfaces to cryptographic tokens, such as hardware cryptographic accelerators and Smartcards. To facilitate the integration of native PKCS#11 tokens into the Java platform, a new cryptographic provider, the Sun PKCS#11 provider, has been introduced into the J2SE 5.0 release. This new provider enables existing applications written to the JCA and JCE APIs to access native PKCS#11 tokens. No modifications to the application are required. The only requirement is the proper configuration of the provider into the Java Runtime.
Although an application can make use of most PKCS#11 features using existing APIs, some applications might need more flexibility and capabilities. For example, an application might want to deal with Smartcards being removed and inserted dynamically more easily. Or, a PKCS#11 token might require authentication for some non-key-related operations and therefore, the application must be able to log into the token without using keystore. In J2SE 5.0, the JCA was enhanced to allow applications greater flexibility in dealing with different providers.
This document describes how native PKCS#11 tokens can be configured into the Java platform for use by Java applications. It also describes the enhancements that were made to the JCA to make it easier for applications to deal with different types of providers, including PKCS#11 providers.
The Sun PKCS#11 provider, in contrast to most other providers, does not implement cryptographic algorithms itself. Instead, it acts as a bridge between the Java JCA and JCE APIs and the native PKCS#11 cryptographic API, translating the calls and conventions between the two. This means that Java applications calling standard JCA and JCE APIs can, without modification, take advantage of algorithms offered by the underlying PKCS#11 implementations, such as, for example,
The Sun PKCS#11 provider is supported on Solaris (SPARC and x86), Linux (x86), and Windows platforms in both 32-bit and 64-bit Java processes.
The Sun PKCS#11 provider requires an implementation of PKCS#11 v2.0 or later to be installed on the system. This implementation must take the form of a shared-object library (.so on Solaris and Linux) or dynamic-link library (.dll on Windows). Please consult your vendor documentation to find out if your cryptographic device includes such a PKCS#11 implementation, how to configure it, and what the name of the library file is.
The Sun PKCS#11 provider supports a number of algorithms, provided that the underlying PKCS#11 implementation offers them. The algorithms and their corresponding PKCS#11 mechanisms are listed in the table in Appendix A.
sun.security.pkcs11.SunPKCS11
and accepts the full
pathname of a configuration file as an argument. To use the
provider, you must first install it by using the Java Cryptography
Architecture (JCA). As with all JCA providers, installation of
the provider can be done either statically or programmatically. To
install the provider statically, add the provider to the Java
Security properties file
($JAVA_HOME/lib/security/java.security). For example,
here's a fragment of the java.security file that installs
the Sun PKCS#11 provider with the configuration file
/opt/bar/cfg/pkcs11.cfg.
# configuration for security providers 1-6 omitted security.provider.7=sun.security.pkcs11.SunPKCS11 /opt/bar/cfg/pkcs11.cfgTo install the provider dynamically, create an instance of the provider with the appropriate configuration filename and then install it. Here is an example.
String configName = "/opt/bar/cfg/pkcs11.cfg"; Provider p = new sun.security.pkcs11.SunPKCS11(configName); Security.addProvider(p);
To use more than one slot per PKCS#11 implementation, or to use more than one PKCS#11 implementation, simply repeat the installation for each with the appropriate configuration file. This will result in a Sun PKCS#11 provider instance for each slot of each PKCS#11 implementation.
The configuration file is a text file that contains entries in the following format.
attribute = value The valid values for attribute and value are described in the table in this section. The two mandatory attributes are name and library. Here is a sample configuration file.name = FooAccelerator library = /opt/foo/lib/libpkcs11.soComments are denoted by lines starting with the # (number) symbol.
| Attribute | Value | Description |
|---|---|---|
| library | pathname of PKCS#11 implementation | This is the full pathname (including extension) of the PKCS#11
implementation; the format of the pathname is platform dependent.
For example, /opt/foo/lib/libpkcs11.so might be the
pathname of a PKCS#11 implementation on Solaris and Linux while
C:\foo\mypkcs11.dll might be the pathname on
Windows. |
| name | name suffix of this provider instance | This string is concatenated with the prefix SunPKCS11-
to produce this provider instance's name (that is, the string
returned by its Provider.getName() method). For
example, if the name attribute is
"FooAccelerator", then the provider instance's name will
be "SunPKCS11-FooAccelerator" . |
| description | description of this provider instance | This string will be returned by the provider instance's
Provider.getInfo() method. If none is specified, a
default description will be returned. |
| slot | slot id | This is the id of the slot that this provider instance is to be
associated with. For example, you would use 1 for the
slot with the id 1 under PKCS#11. At most one of
slot or slotListIndex may be specified. If
neither is specified, the default is a slotListIndex of
0. |
| slotListIndex | slot index | This is the slot index that this provider instance is to be
associated with. It is the index into the list of all slots
returned by the PKCS#11 function C_GetSlotList . For
example, 0 indicates the first slot in the list. At
most one of slot or slotListIndex may be
specified. If neither is specified, the default is a
slotListIndex of 0. |
| enabledMechanisms | brace enclosed, whitespace-separated list of PKCS#11 mechanisms to enable | This is the list PKCS#11 mechanisms that this provider instance
should use, provided that they are supported by both the Sun
PKCS#11 provider and PKCS#11 token. All other mechanisms will be
ignored. Each entry in the list is the name of a PKCS#11 mechanism.
Here is an example that lists two PKCS#11 mechanisms.
enabledMechanisms = { CKM_RSA_PKCS CKM_RSA_PKCS_KEY_PAIR_GEN }At most one of enabledMechanisms or disabledMechanisms may be specified. If neither is specified, the mechanisms enabled are those that are supported by both the Sun PKCS#11 provider and the PKCS#11 token. |
| disabledMechanisms | brace enclosed, whitespace-separated list of PKCS#11 mechanisms to disable | This is the list of PKCS#11 mechanism that this provider
instance should ignore. Any mechanism listed will be ignored by the
provider, even if they are supported by the token and the Sun
PKCS#11 provider. The strings SecureRandom and
KeyStore may be specified to disable those services.
At most one of enabledMechanisms or disabledMechanisms may be specified. If neither is specified, the mechanisms enabled are those that are supported by both the Sun PKCS#11 provider and the PKCS#11 token. |
| attributes | see below | The attributes option can be used to specify additional PKCS#11 that should be set when creating PKCS#11 key objects. This makes it possible to accommodate tokens that require particular attributes. For details, see the section below. |
The attributes option can be used if you do not like the default values your PKCS#11 implementation assigns or if your PKCS#11 implementation does not support defaults and requires a value to be specified explicitly. Note that specifying attributes that your PKCS#11 implementation does not support or that are invalid for the type of key in question may cause the operation to fail at runtime.
The option can be specified zero or more times, the options are processed in the order specified in the configuration file as described below. The attributes option has the format:
attributes(operation, keytype, keyalgorithm) = { name1 = value1 [...] }Valid values for operation are:
Valid values for keyalgorithm are one of the CKK_xxx constants from the PKCS#11 specification, or * to match keys of any algorithm. The algorithms currently supported by the SunPKCS11 provider are CKK_RSA, CKK_DSA, CKK_DH, CKK_AES, CKK_DES, CKK_DES3, CKK_RC4, CKK_BLOWFISH, and CKK_GENERIC.
The attribute names and values are specified as a list of one or more name-value pairs. name must be a CKA_xxx constant from the PKCS#11 specification, for example CKA_SENSITIVE. value can be one of the following:
attributes(*,CKO_PRIVATE_KEY,*) = { CKA_SIGN = true } attributes(*,CKO_PRIVATE_KEY,CKK_DH) = { CKA_SIGN = null } attributes(*,CKO_PRIVATE_KEY,CKK_RSA) = { CKA_DECRYPT = true }The first entry says to specify CKA_SIGN = true for all private keys. The second option overrides that with null for Diffie-Hellman private keys, so the CKA_SIGN attribute will not specified for them at all. Finally, the third option says to also specify CKA_DECRYPT = true for RSA private keys. That means RSA private keys will have both CKA_SIGN = true and CKA_DECRYPT = true set.
There is also a special form of the attributes option. You can write attributes = compatibility in the configuration file. That is a shortcut for a whole set of attribute statements. They are designed to provider maximum compatibility with existing Java applications, which may expect, for example, all key components to be accessible and secret keys to be useable for both encryption and decryption. The compatibility attributes line can be used together with other attributes lines, in which case the same aggregation and overriding rules apply as described earlier.
Network Security Services (NSS) is a set of open source security libraries used by the Mozilla/Firefox browsers, Sun's Java Enterprise System server software, and a number of other products. Its crypto APIs are based on PKCS#11 but it includes special features that are outside of the PKCS#11 standard. The Sun PKCS#11 provider includes code to interact with these NSS specific features, including several NSS specific configuration directives, which are described below.
For best results, we recommend that you use the latest version of NSS available. It should be at least version 3.12.
The Sun PKCS#11 provider uses NSS specific code when any of the
nss
configuration directives described below are used.
In that case, the regular configuration commands
library
, slot
, and
slotListIndex
cannot be used.
| Attribute | Value | Description |
|---|---|---|
| nssLibraryDirectory | directory containing the NSS and NSPR libraries | This is the full pathname of the directory containing the NSS
and NSPR
libraries. It must be specified unless NSS has already been loaded
and initialized by another component running in the same process as
the Java VM.
Depending on your platform, you may have to set
|
| nssSecmodDirectory | directory containing the NSS DB files | The full pathname of the directory containing the NSS
configuration and key information (secmod.db ,
key3.db , and cert8.db ). This directive
must be specified unless NSS has already been initialized by
another component (see above) or NSS is used without database files
as described below. |
| nssDbMode | one of readWrite , readOnly , and
noDb |
This directives determines how the NSS database is accessed. In
read-write mode, full access is possible but only one process at a
time should be accessing the databases. Read-only mode disallows
modifications to the files.
The noDb mode allows NSS to be used without database files purely as a cryptographic provider. It is not possible to create persistent keys using the PKCS11 KeyStore. This mode is useful because NSS includes highly optimized implementations and algorithms not currently available in Sun's bundled Java based crypto providers, for example Elliptic Curve Cryptography (ECC). |
| nssModule | one of keystore , crypto ,
fips , and trustanchors |
NSS makes its functionality available using several different
libraries and slots. This directive determines which of these
modules is accessed by this instance of SunPKCS11.
The The The The |
name = NSScrypto nssLibraryDirectory = /opt/tests/nss/lib nssDbMode = noDb attributes = compatibility
name = NSSfips nssLibraryDirectory = /opt/tests/nss/lib nssSecmodDirectory = /opt/tests/nss/fipsdb nssModule = fips
Sometimes, there could be issues with PKCS#11 which requires
debugging. To show debug info about Library, Slots, Token and
Mechanism, add showInfo=true
in
$JAVA-HOME/jre/lib/security/sunpkcs11-solaris.cfg
file.
For additional debugging info, users can start or restart the Java processes with one of the following options:
-Djava.security.debug=sunpkcs11
-Djava.security.debug=pkcs11keystore
As part of the troubleshooting process, it could be helpful to temporarily disable a PKCS#11 provider or the specific mechanisms of a given provider. Please note that this is only a temporary measure. By disabling the PKCS#11 provider, the provider is no longer available which can cause applications to break or have a performance impact. Once the issue has been identified, only that specific mechanism should remain disabled.
A PKCS#11 provider can be disabled using one of the following methods:
-Dsun.security.pkcs11.enable-solaris=false
sun.security.pkcs11.SunPKCS11,
/lib/security/sunpkcs11-solaris.cfg, /usr/lib/libpkcs11.so
).
$JAVA_HOME/jre/lib/security/java.security
file and
commenting out the PKCS#11 security provider (do not forget to
re-number the order of providers) as shown below.# List of providers and their preference orders (see above): security.provider.1=com.oracle.security.ucrypto.UcryptoProvider ${java.home}/lib/security/ucrypto-solaris.cfg #security.provider.2=sun.security.pkcs11.SunPKCS11 ${java.home}/lib/security/sunpkcs11-solaris.cfg security.provider.2=sun.security.provider.Sun security.provider.3=sun.security.rsa.SunRsaSign security.provider.4=sun.security.ec.SunEC security.provider.5=com.sun.net.ssl.internal.ssl.Provider security.provider.6=com.sun.crypto.provider.SunJCE .................... ....................
Start or restart the Java processes being run on this installation of Java.
When an issue occurs in one of the mechanisms of PKCS11, it can
be resolved by disabling only that particular mechanism, rather
than the entire PKCS11 provider (do not forget to re-enable the
PKCS11 provider if it was disabled earlier). For example, to
disable the SecureRandom
mechanism only, you can add
SecureRandom
to the list of disabled mechanisms in the
$JAVA_HOME/jre/lib/security/sunpkcs11-solaris.cfg
file. Here is an excerpt from such a file:
$ more sunpkcs11-solaris.cfg ....... ........ ........ disabledMechanisms = { SecureRandom CKM_MD2 CKM_MD5 CKM_SHA_1 ......... ......... }
Note: The portion of the
sunpkcs11-solaris.cfg
file shown above is an example
to show where to add the mechanisms that are to be disabled but is
not the complete file.
Java applications can use the existing JCA and JCE APIs to access PKCS#11 tokens via the Sun PKCS#11 provider. This is sufficient for many applications but it might be difficult for an application to deal with certain PKCS#11 features, such as unextractable keys and dynamically changing Smartcards. Consequently, a number of enhancements were made to the APIs to better support applications using certain PKCS#11 features. These enhancements are discussed in this section.
Certain PKCS#11 operations, such as accessing private keys, require a login using a Personal Identification Number, or PIN, before the operations can proceed. The most common type of operations that require login are those that deal with keys on the token. In a Java application, such operations often involve first loading the keystore. When accessing the PKCS#11 token as a keystore via the java.security.KeyStore class, you can supply the PIN in the password input parameter to the load method, similar to how applications initialize a keystore prior to J2SE 5.0. The PIN will then be used by the Sun PKCS#11 provider for logging into the token. Here is an example.
char[] pin = ...; KeyStore ks = KeyStore.getInstance("PKCS11"); ks.load(null, pin);
This is fine for an application that treats PKCS#11 tokens as static keystores. For an application that wants to accommodate PKCS#11 tokens more dynamically, such as Smartcards being inserted and removed, you can use the new KeyStore.Builder class. Here is an example of how to initialize the builder for a PKCS#11 keystore with a callback handler.
KeyStore.CallbackHandlerProtection chp = new KeyStore.CallbackHandlerProtection(new MyGuiCallbackHandler()); KeyStore.Builder builder = KeyStore.Builder.newInstance("PKCS11", null, chp);
For the Sun PKCS#11 provider, the callback handler must be able to satisfy a PasswordCallback, which is used to prompt the user for the PIN. Whenever the application needs access to the keystore, it uses the builder as follows.
KeyStore ks = builder.getKeyStore(); Key key = ks.getKey(alias, null);
The builder will prompt for a password as needed using the previously configured callback handler. The builder will prompt for a password only for the initial access. If the user of the application continues using the same Smartcard, the user will not be prompted again. If the user removes and inserts a different SmartCard, the builder will prompt for a password for the new card.
Depending on the PKCS#11 token, there may be non-key-related operations that also require token login. Applications that use such operations can use the newly introduced java.security.AuthProvider class. The AuthProvider class extends from java.security.Provider and defines methods to perform login and logout operations on a provider, as well as to set a callback handler for the provider to use.
For the Sun PKCS#11 provider, the callback handler must be able to satisfy a PasswordCallback, which is used to prompt the user for the PIN.
Here is an example of how an application might use an AuthProvider to log into the token.
AuthProvider aprov = (AuthProvider)Security.getProvider("SunPKCS11"); aprov.login(subject, new MyGuiCallbackHandler());
Java Key
objects may or may not contain actual key
material.
Applications and providers must use the correct interfaces to represent these different types of Key objects. Software Key objects (or any Key object that has access to the actual key material) should implement the interfaces in the java.security.interfaces and javax.crypto.interfaces packages (such as DSAPrivateKey). Key objects representing unextractable token keys should only implement the relevant generic interfaces in the java.security and javax.crypto packages (PrivateKey, PublicKey, or SecretKey). Identification of the algorithm of a key should be performed using the Key.getAlgorithm() method.
Applications should note that a Key object for an unextractable token key can only be used by the provider associated with that token.
Prior to J2SE 5.0, the Java cryptography getInstance() methods, such as Cipher.getInstance("DES"), returned the implementation from the first provider that implemented the requested algorithm. This is problematic if an application attempts to use a Key object for an unextractable token key with a provider that only accepts software key objects. In such a case, the provider would throw an InvalidKeyException. This is an issue for the Cipher, KeyAgreement, Mac, and Signature classes.
J2SE 5.0, addresses this issue by delaying the selection of the provider until the relevant initialization method is called. The initialization method accepts a Key object and can determine at that point which provider can accept the specified Key object. This ensures that the selected provider can use the specified Key object. The following represents the affected initialization methods.
Although this delayed provider selection is hidden from the
application, it does affect the behavior of the
getProvider()
method for Cipher,
KeyAgreement, Mac, and Signature. If
getProvider()
is called before the
initialization operation has occurred (and therefore before
provider selection has occurred), then the first provider that
supports the requested algorithm is returned. This may not be the
same provider as the one selected after the initialization
method is called. If getProvider()
is called
after the initialization operation has occurred, then the
actual selected provider is returned. It is recommended that
applications only call getProvider()
after they have
called the relevant initialization method.
In addition to getProvider()
, the following
additional methods are similarly affected.
Use the following options to configure the KeyStoreLoginModule to use a PKCS#11 token as the keystore.
other { com.sun.security.auth.module.KeyStoreLoginModule required keyStoreURL="NONE" keyStoreType="PKCS11" keyStorePasswordURL="file:/home/joe/scpin"; };
If more than one Sun PKCS#11 provider has been configured dynamically or in the java.security security properties file, you can use the keyStoreProvider option to target a specific provider instance. The argument to this option is the name of the provider. For the Sun PKCS#11 provider, the provider name is of the form SunPKCS11-TokenName, where TokenName is the name suffix that the provider instance has been configured with, as detailed in the configuration attributes table. For example, the following configuration file names the PKCS#11 provider instance with name suffix SmartCard.
other { com.sun.security.auth.module.KeyStoreLoginModule required keyStoreURL="NONE" keyStoreType="PKCS11" keyStorePasswordURL="file:/home/joe/scpin" keyStoreProvider="SunPKCS11-SmartCard"; };
Some PKCS#11 tokens support login via a protected authentication path. For example, a Smartcard may have a dedicated PIN-pad to enter the pin. Biometric devices will also have their own means to obtain authentication information. If the PKCS#11 token has a protected authentication path, then use the protected=true option and omit the keyStorePasswordURL option. Here is an example of a configuration file for such a token.
other { com.sun.security.auth.module.KeyStoreLoginModule required keyStoreURL="NONE" keyStoreType="PKCS11" protected=true; };
JSSE also supports configuring the use of keystores and trust stores via system properties, as described in the JSSE Reference Guide. To use a PKCS#11 token as a keystore or trust store, set the javax.net.ssl.keyStoreType and javax.net.ssl.trustStoreType system properties, respectively, to "PKCS11", and set the javax.net.ssl.keyStore and javax.net.ssl.trustStore system properties, respectively, to NONE. To specify the use of a specific provider instance, use the javax.net.ssl.keyStoreProvider and javax.net.ssl.trustStoreProvider system properties (e.g., "SunPKCS11-SmartCard").
In J2SE 5.0, the security tools were updated to support operations using the new Sun PKCS#11 provider. The changes are discussed below.
If the Sun PKCS#11 provider has been configured in the java.security security properties file (located in the $JAVA_HOME/lib/security directory of the Java runtime), then keytool and jarsigner can be used to operate on the PKCS#11 token by specifying the following options.
keytool -keystore NONE -storetype PKCS11 -listThe PIN can be specified using the -storepass option. If none has been specified, then keytool and jarsigner will prompt for the token PIN. If the token has a protected authentication path (such as a dedicated PIN-pad or a biometric reader), then the -protected option must be specified, and no password options can be specified.
If more than one Sun PKCS#11 provider has been configured in the java.security security properties file, you can use the -providerName option to target a specific provider instance. The argument to this option is the name of the provider.
keytool -keystore NONE -storetype PKCS11 \ -providerName SunPKCS11-SmartCard \ -list
If the Sun PKCS#11 provider has not been configured in the java.security security properties file, you can use the following options to instruct keytool and jarsigner to install the provider dynamically.
keytool -keystore NONE -storetype PKCS11 \ -providerClass sun.security.pkcs11.SunPKCS11 \ -providerArg /foo/bar/token.config \ -list
Prior to J2SE 5.0, the keystore entry in the default policy implementation had the following syntax.
keystore "some_keystore_url", "keystore_type";This syntax was inadequate for accessing a PKCS#11 keystore because such access usually required a PIN, and there might be multiple PKCS#11 provider instances. To accommodate these requirements, the keystore entry syntax has been updated in J2SE 5.0, to the following.
keystore "some_keystore_url", "keystore_type", "keystore_provider"; keystorePasswordURL "some_password_url";Where keystore_provider is the keystore provider name (for example, "SunPKCS11-SmartCard"), and some_password_url is a URL pointing to the location of the token PIN. Both keystore_provider and the keystorePasswordURL line are optional. If keystore_provider has not been specified, then the first configured provider that supports the specified keystore type is used. If the keystorePasswordURL line has not been specified, then no password is used.
The following is an example keystore policy entry for a PKCS#11 token.
keystore "NONE", "PKCS11", "SunPKCS11-SmartCard"; keystorePasswordURL "file:/foo/bar/passwordFile";
J2SE 5.0 introduces new facilities in the java.security.Provider class for provider implementations to more easily support PKCS#11 tokens and cryptographic services in general. These new facilities are discussed below.
See Appendix C for an example of a simple provider designed to demonstrate the new facilities.
As described in the above provider documentation, prior to J2SE 5.0, providers were required to create java.util.Property entries describing the services they supported. For each service implemented by the provider, there must be a property whose name is the type of service (Cipher, Signature, etc), followed by a period and the name of the algorithm to which the service applies. The property value must specify the fully qualified name of the class implementing the service. Here is an example of a provider setting KeyAgreement.DiffieHellman property to have the value com.sun.crypto.provider.DHKeyAgreement.
put("KeyAgreement.DiffieHellman", "com.sun.crypto.provider.DHKeyAgreement")
J2SE 5.0 introduces a new public static nested class, Provider.Service, to help better encapsulate the properties of a provider service (including its type, attributes, algorithm name, and algorithm aliases). Providers can instantiate Provider.Service objects and register them by calling the Provider.putService() method. This is equivalent to creating a Property entry and calling the Provider.put() method (as was done prior to J2SE 5.0). Note that legacy Property entries registered via Provider.put are still supported.
Here is an example of a provider creating a Service object with the KeyAgreement type, for the DiffieHellman algorithm, implemented by the class com.sun.crypto.provider.DHKeyAgreement.
Service s = new Service(this, "KeyAgreement", "DiffieHellman", "com.sun.crypto.provider.DHKeyAgreement", null, null); putService(s);
Using Provider.Servicee objects instead of legacy Property entries has a couple of major benefits. One benefit is that it allows the provider to have greater flexibility when instantiating engine classes. Another benefit is that it allows the provider to test parameter validity. These features are discussed in detail next.
Prior to J2SE 5.0, the Java Cryptography framework looked up the provider property for a particular service and directly instantiated the engine class registered for that property. J2SE 5.0, has the same behavior by default, but allows the provider to override this behavior and instantiate the engine class for the requested service itself.
To override the default behavior, the provider overrides the Provider.Service.newInstance() method to add its customer behavior. For example, the provider might call a custom constructor, or might perform initialization using information not accessible outside the provider (or that are only known by the provider).
The Java Cryptography framework may attempt a fast check to determine whether a provider's service implementation can use an application-specified parameter. To perform this fast check, the framework calls Provider.Service.supportsParameter().
In J2SE 5.0, the framework relies on this fast test during
delayed provider selection. When an
application invokes an initialization method
and passes it a Key object, the framework asks an
underlying provider whether it supports the object by calling its
Service.supportsParameter() method. If
supportsParameter()
returns false
, the
framework can immediately remove that provider from consideration.
If supportsParameter()
returns true
, the
framework passes the Key object to that provider's
initialization engine class implementation. A provider that
requires software Key objects should override this method
to return false
when it is passed non-software keys.
Likewise, a provider for a PKCS#11 token that contains
unextractable keys should only return true
for
Key objects that it created, and which therefore
correspond to the Keys on its respective token.
Note that the default implementation of
supportsParameter()
returns true
. This
allows existing providers to work without modification. However,
because of this lenient default implementation, the framework must
be prepared to catch exceptions thrown by providers that reject the
Key object inside their initialization engine class
implementations. The framework treats these cases the same as when
supportsParameter()
returns false
.
disabledMechanisms
and enabledMechanisms
configuration directives.
For Elliptic Curve mechanisms, SunPKCS11 will only use keys that
use the namedCurve
choice as encoding for the
parameters and only allow the uncompressed point format. The Sun
PKCS#11 provider assumes that a token supports all standard named
domain parameters.
| Java Algorithm | PKCS#11 Mechanisms |
|---|---|
| Signature.MD2withRSA | CKM_MD2_RSA_PKCS, CKM_RSA_PKCS, CKM_RSA_X_509 |
| Signature.MD5withRSA | CKM_MD5_RSA_PKCS, CKM_RSA_PKCS, CKM_RSA_X_509 |
| Signature.SHA1withRSA | CKM_SHA1_RSA_PKCS, CKM_RSA_PKCS, CKM_RSA_X_509 |
| Signature.SHA224withRSA | CKM_SHA224_RSA_PKCS, CKM_RSA_PKCS, CKM_RSA_X_509 |
| Signature.SHA256withRSA | CKM_SHA256_RSA_PKCS, CKM_RSA_PKCS, CKM_RSA_X_509 |
| Signature.SHA384withRSA | CKM_SHA384_RSA_PKCS, CKM_RSA_PKCS, CKM_RSA_X_509 |
| Signature.SHA512withRSA | CKM_SHA512_RSA_PKCS, CKM_RSA_PKCS, CKM_RSA_X_509 |
| Signature.SHA1withDSA | CKM_DSA_SHA1, CKM_DSA |
| Signature.NONEwithDSA | CKM_DSA |
| Signature.SHA1withECDSA | CKM_ECDSA_SHA1, CKM_ECDSA |
| Signature.SHA224withECDSA | CKM_ECDSA |
| Signature.SHA256withECDSA | CKM_ECDSA |
| Signature.SHA384withECDSA | CKM_ECDSA |
| Signature.SHA512withECDSA | CKM_ECDSA |
| Signature.NONEwithECDSA | CKM_ECDSA |
| Cipher.RSA/ECB/PKCS1Padding | CKM_RSA_PKCS |
| Cipher.ARCFOUR | CKM_RC4 |
| Cipher.DES/CBC/NoPadding | CKM_DES_CBC |
| Cipher.DESede/CBC/NoPadding | CKM_DES3_CBC |
| Cipher.AES/CBC/NoPadding | CKM_AES_CBC |
| Cipher.Blowfish/CBC/NoPadding | CKM_BLOWFISH_CBC |
| Cipher.RSA/ECB/NoPadding | CKM_RSA_X_509 |
| Cipher.AES/CTR/NoPadding | CKM_AES_CTR |
| KeyAgreement.ECDH | CKM_ECDH1_DERIVE |
| KeyAgreement.DiffieHellman | CKM_DH_PKCS_DERIVE |
| KeyPairGenerator.RSA | CKM_RSA_PKCS_KEY_PAIR_GEN |
| KeyPairGenerator.DSA | CKM_DSA_KEY_PAIR_GEN |
| KeyPairGenerator.EC | CKM_EC_KEY_PAIR_GEN |
| KeyPairGenerator.DiffieHellman | CKM_DH_PKCS_KEY_PAIR_GEN |
| KeyGenerator.ARCFOUR | CKM_RC4_KEY_GEN |
| KeyGenerator.DES | CKM_DES_KEY_GEN |
| KeyGenerator.DESede | CKM_DES3_KEY_GEN |
| KeyGenerator.AES | CKM_AES_KEY_GEN |
| KeyGenerator.Blowfish | CKM_BLOWFISH_KEY_GEN |
| Mac.HmacMD5 | CKM_MD5_HMAC |
| Mac.HmacSHA1 | CKM_SHA_1_HMAC |
| Mac.HmacSHA224 | CKM_SHA224_HMAC |
| Mac.HmacSHA256 | CKM_SHA256_HMAC |
| Mac.HmacSHA384 | CKM_SHA384_HMAC |
| Mac.HmacSHA512 | CKM_SHA512_HMAC |
| MessageDigest.MD2 | CKM_MD2 |
| MessageDigest.MD5 | CKM_MD5 |
| MessageDigest.SHA1 | CKM_SHA_1 |
| MessageDigest.SHA-224 | CKM_SHA224 |
| MessageDigest.SHA-256 | CKM_SHA256 |
| MessageDigest.SHA-384 | CKM_SHA384 |
| MessageDigest.SHA-512 | CKM_SHA512 |
| KeyFactory.RSA | Any supported RSA mechanism |
| KeyFactory.DSA | Any supported DSA mechanism |
| KeyFactory.EC | Any supported EC mechanism |
| KeyFactory.DiffieHellman | Any supported Diffie-Hellman mechanism |
| SecretKeyFactory.ARCFOUR | CKM_RC4 |
| SecretKeyFactory.DES | CKM_DES_CBC |
| SecretKeyFactory.DESede | CKM_DES3_CBC |
| SecretKeyFactory.AES | CKM_AES_CBC |
| SecretKeyFactory.Blowfish | CKM_BLOWFISH_CBC |
| SecureRandom.PKCS11 | CK_TOKEN_INFO has the CKF_RNG bit set |
| KeyStore.PKCS11 | Always available |
The following describes the requirements placed by the Sun PKCS#11 Provider's KeyStore implementation on the underlying native PKCS#11 library. Note that changes may be made in future releases to maximize interoperability with as many existing PKCS#11 libraries as possible.
To map existing objects stored on a PKCS#11 token to KeyStore entries, the Sun PKCS#11 Provider's KeyStore implementation performs the following operations.
For each matching pair, the certificate chain is built by following the issuer->subject path. From the end entity certificate, a call fo C_FindObjects[Init|Final] is made with a search template that includes the following attributes:
This search is continued until either no certificate for the issuer is found, or until a self-signed certificate is found. If more than one certificate is found the first one is used.
Once a private key and certificate have been matched (and its certificate chain built), the information is stored in a private key entry with the CKA_LABEL value from end entity certificate as the KeyStore alias.
If the end entity certificate has no CKA_LABEL, then the alias is derived from the CKA_ID. If the CKA_ID can be determined to consist exclusively of printable characters, then a String alias is created by decoding the CKA_ID bytes using the UTF-8 charset. Otherwise, a hex String alias is created from the CKA_ID bytes ("0xFFFF...", for example).
If multiple certificates share the same CKA_LABEL, then the alias is derived from the CKA_LABEL plus the end entity certificate issuer and serial number ("MyCert/CN=foobar/1234", for example).
If the CKA_TRUSTED attribute is not supported then no trusted certificate entries are created.
A KeyStore secret key entry is created for each secret key object, with the CKA_LABEL value as the KeyStore alias. Each secret key object must have a unique CKA_LABEL.
To create new KeyStore entries on a PKCS#11 token to KeyStore entries, the Sun PKCS#11 Provider's KeyStore implementation performs the following operations.
Private key objects are stored with CKA_PRIVATE=true. The KeyStore alias (UTF8-encoded) is set as the CKA_ID for both the private key and the corresponding end entity certificate. The KeyStore alias is also set as the CKA_LABEL for the end entity certificate object.
Each certificate in a private key entry's chain is also stored. The CKA_LABEL is not set for CA certificates. If a CA certificate is already in the token, a duplicate is not stored.
Secret key objects are stored with CKA_PRIVATE=true. The KeyStore alias is set as the CKA_LABEL.
In addition to the searches listed above, the following searches may be used by the Sun PKCS#11 provider's KeyStore implementation to perform internal functions. Specifically, C_FindObjects[Init|Final] may be called with any of the following attribute templates:
CKA_TOKEN true CKA_CLASS CKO_CERTIFICATE CKA_SUBJECT [subject DN]
CKA_TOKEN true CKA_CLASS CKO_SECRET_KEY CKA_LABEL [label]
CKA_TOKEN true CKA_CLASS CKO_CERTIFICATE or CKO_PRIVATE_KEY CKA_ID [cka_id]
package com.foo; import java.io.*; import java.lang.reflect.*; import java.security.*; import javax.crypto.*; /** * Example provider that demonstrates some of the new API features. * * . implement multiple different algorithms in a single class. * Previously each algorithm needed to be implemented in a separate class * (e.g. one for MD5, one for SHA-1, etc.) * * . multiple concurrent instances of the provider frontend class each * associated with a different backend. * * . it uses "unextractable" keys and lets the framework know which key * objects it can and cannot support * * Note that this is only a simple example provider designed to demonstrate * several of the new features. It is not explicitly designed for efficiency. */ public final class ExampleProvider extends Provider { // reference to the crypto backend that implements all the algorithms final CryptoBackend cryptoBackend; public ExampleProvider(String name, CryptoBackend cryptoBackend) { super(name, 1.0, "JCA/JCE provider for " + name); this.cryptoBackend = cryptoBackend; // register the algorithms we support (MD5, SHA1, DES, and AES) putService(new MyService (this, "MessageDigest", "MD5", "com.foo.ExampleProvider$MyMessageDigest")); putService(new MyService (this, "MessageDigest", "SHA1", "com.foo.ExampleProvider$MyMessageDigest")); putService(new MyCipherService (this, "Cipher", "DES", "com.foo.ExampleProvider$MyCipher")); putService(new MyCipherService (this, "Cipher", "AES", "com.foo.ExampleProvider$MyCipher")); } // the API of our fictitious crypto backend static abstract class CryptoBackend { abstract byte[] digest(String algorithm, byte[] data); abstract byte[] encrypt(String algorithm, KeyHandle key, byte[] data); abstract byte[] decrypt(String algorithm, KeyHandle key, byte[] data); abstract KeyHandle createKey(String algorithm, byte[] keyData); } // the shell of the representation the crypto backend uses for keys private static final class KeyHandle { // fill in code } // we have our own ServiceDescription implementation that overrides newInstance() // that calls the (Provider, String) constructor instead of the no-args constructor private static class MyService extends Service { private static final Class[] paramTypes = {Provider.class, String.class}; MyService(Provider provider, String type, String algorithm, String className) { super(provider, type, algorithm, className, null, null); } public Object newInstance(Object param) throws NoSuchAlgorithmException { try { // get the Class object for the implementation class Class clazz; Provider provider = getProvider(); ClassLoader loader = provider.getClass().getClassLoader(); if (loader == null) { clazz = Class.forName(getClassName()); } else { clazz = loader.loadClass(getClassName()); } // fetch the (Provider, String) constructor Constructor cons = clazz.getConstructor(paramTypes); // invoke constructor and return the SPI object Object obj = cons.newInstance(new Object[] {provider, getAlgorithm()}); return obj; } catch (Exception e) { throw new NoSuchAlgorithmException("Could not instantiate service", e); } } } // custom ServiceDescription class for Cipher objects. See supportsParameter() below private static class MyCipherService extends MyService { MyCipherService(Provider provider, String type, String algorithm, String className) { super(provider, type, algorithm, className); } // we override supportsParameter() to let the framework know which // keys we can support. We support instances of MySecretKey, if they // are stored in our provider backend, plus SecretKeys with a RAW encoding. public boolean supportsParameter(Object obj) { if (obj instanceof SecretKey == false) { return false; } SecretKey key = (SecretKey)obj; if (key.getAlgorithm().equals(getAlgorithm()) == false) { return false; } if (key instanceof MySecretKey) { MySecretKey myKey = (MySecretKey)key; return myKey.provider == getProvider(); } else { return "RAW".equals(key.getFormat()); } } } // our generic MessageDigest implementation. It implements all digest // algorithms in a single class. We only implement the bare minimum // of MessageDigestSpi methods private static final class MyMessageDigest extends MessageDigestSpi { private final ExampleProvider provider; private final String algorithm; private ByteArrayOutputStream buffer; MyMessageDigest(Provider provider, String algorithm) { super(); this.provider = (ExampleProvider)provider; this.algorithm = algorithm; engineReset(); } protected void engineReset() { buffer = new ByteArrayOutputStream(); } protected void engineUpdate(byte b) { buffer.write(b); } protected void engineUpdate(byte[] b, int ofs, int len) { buffer.write(b, ofs, len); } protected byte[] engineDigest() { byte[] data = buffer.toByteArray(); byte[] digest = provider.cryptoBackend.digest(algorithm, data); engineReset(); return digest; } } // our generic Cipher implementation, only partially complete. It implements // all cipher algorithms in a single class. We implement only as many of the // CipherSpi methods as required to show how it could work private static abstract class MyCipher extends CipherSpi { private final ExampleProvider provider; private final String algorithm; private int opmode; private MySecretKey myKey; private ByteArrayOutputStream buffer; MyCipher(Provider provider, String algorithm) { super(); this.provider = (ExampleProvider)provider; this.algorithm = algorithm; } protected void engineInit(int opmode, Key key, SecureRandom random) throws InvalidKeyException { this.opmode = opmode; myKey = MySecretKey.getKey(provider, algorithm, key); if (myKey == null) { throw new InvalidKeyException(); } buffer = new ByteArrayOutputStream(); } protected byte[] engineUpdate(byte[] b, int ofs, int len) { buffer.write(b, ofs, len); return new byte[0]; } protected int engineUpdate(byte[] b, int ofs, int len, byte[] out, int outOfs) { buffer.write(b, ofs, len); return 0; } protected byte[] engineDoFinal(byte[] b, int ofs, int len) { buffer.write(b, ofs, len); byte[] in = buffer.toByteArray(); byte[] out; if (opmode == Cipher.ENCRYPT_MODE) { out = provider.cryptoBackend.encrypt(algorithm, myKey.handle, in); } else { out = provider.cryptoBackend.decrypt(algorithm, myKey.handle, in); } buffer = new ByteArrayOutputStream(); return out; } // code for remaining CipherSpi methods goes here } // our SecretKey implementation. All our keys are stored in our crypto // backend, we only have an opaque handle available. There is no // encoded form of these keys. private static final class MySecretKey implements SecretKey { final String algorithm; final Provider provider; final KeyHandle handle; MySecretKey(Provider provider, String algorithm, KeyHandle handle) { super(); this.provider = provider; this.algorithm = algorithm; this.handle = handle; } public String getAlgorithm() { return algorithm; } public String getFormat() { return null; // this key has no encoded form } public byte[] getEncoded() { return null; // this key has no encoded form } // Convert the given key to a key of the specified provider, if possible static MySecretKey getKey(ExampleProvider provider, String algorithm, Key key) { if (key instanceof SecretKey == false) { return null; } // algorithm name must match if (!key.getAlgorithm().equals(algorithm)) { return null; } // if key is already an instance of MySecretKey and is stored // on this provider, return it right away if (key instanceof MySecretKey) { MySecretKey myKey = (MySecretKey)key; if (myKey.provider == provider) { return myKey; } } // otherwise, if the input key has a RAW encoding, convert it if (!"RAW".equals(key.getFormat())) { return null; } byte[] encoded = key.getEncoded(); KeyHandle handle = provider.cryptoBackend.createKey(algorithm, encoded); return new MySecretKey(provider, algorithm, handle); } } }


Start test
End Test
Go back to home page
Practice Test
MCQ
Fill-up
Programming
Assessment Test
MCQ
Fill-up
Programming
Learning Video
MCQ
Fill-up
Programming
Calculate the skill


Alex - Java guy
Bad Developer • Coffeeee
Contact:
Email
Github
Steam
Websites done:
http://festive.tf
http://dngaming.tf
http://tvc.tf


TAM: Test Analysis Modules
Includes marginal maximum likelihood estimation and joint maximum
likelihood estimation for unidimensional and multidimensional
item response models. The package functionality covers the
Rasch model, 2PL model, 3PL model, generalized partial credit model,
multi-faceted Rasch model, nominal item response model,
structured latent class model, mixture distribution IRT models,
and located latent class models. Latent regression models and
plausible value imputation are also supported. For details see
Adams, Wilson and Wang, 1997 <doi:10.1177/0146621697211001>,
Adams, Wilson and Wu, 1997 <doi:10.3102/10769986022001047>,
Formann, 1982 <doi:10.1002/bimj.4710240209>,
Formann, 1992 <doi:10.1080/01621459.1992.10475229>.
| Version: |
3.0-21 |
| Depends: |
R (≥ 2.15.1), CDM (≥ 6.4-19) |
| Imports: |
coda, graphics, grDevices, MASS, methods, mvtnorm, Rcpp, sfsmisc, stats, utils |
| LinkingTo: |
Rcpp, RcppArmadillo |
| Suggests: |
GPArotation, lattice, lavaan, LSAmitR, miceadds, plyr, psych, sirt, WrightMap |
| Published: |
2018-12-10 |
| Author: |
Alexander Robitzsch [aut, cre], Thomas Kiefer [aut], Margaret Wu [aut] |
| Maintainer: |
Alexander Robitzsch <robitzsch at ipn.uni-kiel.de> |
| License: |
GPL-2 | GPL-3 [expanded from: GPL (≥ 2)] |
| URL: |
http://www.edmeasurementsurveys.com/TAM/Tutorials/,
https://github.com/alexanderrobitzsch/TAM,
https://sites.google.com/site/alexanderrobitzsch2/software |
| NeedsCompilation: |
yes |
| Citation: |
TAM citation info |
| Materials: |
README NEWS |
| In views: |
MissingData, Psychometrics |
| CRAN checks: |
TAM results |
Downloads:
Reverse dependencies:
Linking:
Please use the canonical form
https://CRAN.R-project.org/package=TAM
to link to this page.


Bangladesh, to the east of India on the Bay of Bengal, is a South Asian country marked by lush greenery and many waterways. Its Padma (Ganges), Meghna and Jamuna rivers create fertile plains, and travel by boat is common. On the southern coast, the Sundarbans, an enormous mangrove forest shared with Eastern India, is home to the royal Bengal tiger.
This is a blockquote with source title.
Some famous in Source Title
This is a blockquote aligned to the right.Someone famous in Source Title


In Ruby, common characteristics among many objects tend to reside in modules. The Enumerable module provides a set of methods to traverse, search, sort and manipulate collections. Enumerable's biggest advantage over the for loop is clarity - we can do more with prettier, fewer lines of code. Using Enumerable's looping power tools, like any?, all?, and friends makes your code read semantically, but the each method is Ruby's preferred way to iterate across a collection.
Here’s what we’re working with:
[:all?, :any?, :chunk, :collect, :collect_concat, :count, :cycle, :detect, :drop, :drop_while, :each_cons, :each_entry, :each_slice, :each_with_index, :each_with_object, :entries, :find, :find_all, :find_index, :first, :flat_map, :grep, :group_by, :include?, :inject, :lazy, :map, :max, :max_by, :member?, :min, :min_by, :minmax, :minmax_by, :none?, :one?, :partition, :reduce, :reject, :reverse_each, :select, :slice_after, :slice_before, :slice_when, :sort, :sort_by, :take, :take_while, :to_a, :to_h, :zip]
Focusing in on Enumerable#group_by, in In the simple terms, this method breaks a collection into groups based on some given criteria. It expects a block containing the criteria by which the items in the collection will be grouped, and will return a hash where each key represents a group. Each key’s corresponding value is an array containing the members of that group.
Example:
(0..15).group_by {|number| number % 3}
=> {0=>[0, 3, 6, 9, 12, 15], 1=>[1, 4, 7, 10, 13], 2=>[2, 5, 8, 11, 14]}
In this code the numbers 0 through 15 are passed to the block, which receives each number as the parameter number. The group that each number is placed into is determined by the result value of the block, 0, 1 or 2 and so, the resulting hash will have three groups, represented by the keys 0, 1 and 2.


{% extends 'main/layout.html' %} {% load static %} {% load i18n %} {% block title %}Events | OK!Thess{% endblock %} {% block content %}
{{ event.description }}
{% trans 'Meetings, especially regular meetings of people who share a particular interest such as a programming language or entrepreneurship' %}


To start the game, put all cards face against table so that the images are not visible, mix them and align them. The first player reveals two cards if they match, he wins otherwise he hides again. It is then the next player to return two cards and so on ... The aim of the game is to try to memorize the location of different cards and when the player put face up successively two identical cards forming the pair he wins them. When the player wins a pair, he can play again. The game is over when all pairs were found. The player who won the highest number of cards wins the game.


PRAM Demo
person_outline
... ms
Rules
---
arrow_drop_down
No info
Docstring
Source code
No info
arrow_drop_down
add_circle
Add this rule
Population
---
arrow_drop_down
---
arrow_drop_down
Schema
arrow_drop_down
add_circle
Generate population from this table
Column
Type
Values
Attribute
Relation
Relation name
Probes
Simulation
Control
Rules
Population
Probes
Settings
Runs:
0
Itererations:
0
Run 1 step
play_circle_filled
Run 5 steps
play_circle_filled
Run 10 steps
play_circle_filled
Stop
stop
Reset the simulation
cached
clear
Clear the rules
No info
Distribution of group size
Distribution of group size (log scale)
No info
arrow_drop_down
clear
Clear the population
clear
Clear the probes
Off
On
Autocompact
Off
On
Autostop
Off
On
Live info
Off
On
Live info timestamp
Output
Timeseries
stdout
clear
Clear timeseries
clear
Clear stdout
memory
System Load
.
.
.
Resource
Size
Used
Free
CPU
.
.
.
RAM
.
.
.
HDD
.
.
.
Reset session
cached


Google Reverse Search
Choose file ...
... or enter URL
You can also paste or drop your image to load
Search


--- layout: default title: Kristal Spreadborough ---
On this site you will fond a glossary of terms commonly used by the #DataCreativities team. This glossary is expressed in two ways: as an Interactive Glossary, and as a Text Glossary page. Both have the same information, but offer different ways to engage with the content. Please use the suggested citations when refering to the glossary.
To find out more about the #DataCreativites team and our work, visit our Omeka Page


Please contact us directly for technical support.
If you wish to solve the issue on your own, there are 2 possible causes and solutions
gudab connects to the monitored servers via SSH, considering Linux host’s authority, security, auditing etc. It is suggested to create Linux service accounts(e.g. gudab) exclusively for the monitored servers.
Please contact us directly for technical support.
If you wish to solve the issue on your own, there are 2 possible causes and solutions
gudab has 2 licensing versions (see table below)
| Express | Enterprise | |
|---|---|---|
| Metric Monitoring | ||
| Alert | ||
| Backup/Restore | ||
| Yearly licensing fees | ||
| Professional consulting | ||
| Validity per license | N/A | 12 months |
Your gudab service will be suspended.
For gudab business or Enterprise, we will start sending notification one month prior to the licensing expiry date. In case, you are unable to renew your license in time. We offer grace period of 30 days. If you do not wish to extend the license, the service will downgrade to gudab express.
Note: Discount will be offered when license renews before the expiry date.
| root | admin | power user | operator | |
|---|---|---|---|---|
| System monitoring | ||||
| Add server | ||||
| System activity | ||||
| Alert switch on/off | ||||
| Alert setting | ||||
| Backup/Restore | ||||
| Profile update | ||||
| Add admin | ||||
| Add power user | ||||
| Add operator |
Yes, But gudab will only adapt and store the database account/password that first set up the monitoring server.
Considering monitoring server’s authority, security, auditing etc. It is suggested to create a MongoDB service account(e.g. root) exclusively for the monitored servers.
Please contact us directly for technical support.
If you wish to solve the issue on your own, there are 4 possible solutions
Please contact us directly for technical support.
If you wish to solve the issue on your own, there are 2 possible solutions
Yes, additional metrics can be added through customization integration.
Yes, it can be done through customization integration
gudab backup oplog from secondary member. If connection fails to establish with secondary member then backup from primary member will be performed.
In order to perform incremental backup for standalone MongoDB, you will first configure database into single member replica set so oplog can be generated and allow gudab to perform incremental backup.
If you create a backup setting by specifying collection individually (not select all) then whenever there is a new collection added then the backup setting needs to be redefined.
gudab’s default backup is 7 days of oplog. User must evaluate the growth of oplog and set the appropriate capacity of the storage space.
Note: Days of oplog backup can be adjusted from gudab.properties. (Restart gudab to have the newly set oplog backup days in effective.)
Data collection can be specified for backup purpose. But restore by data collection is currently not supported.
Yes, gudab turned opensource on 2018/02/01.
Yes
It can be found under READ directory.
For replica set, the suggested minimum host number is 3
Svr1(Primary) + Svr2 (Secondary) + Svr3(Arbiter & gudab)
Metric monitoring and alert.
Is there a minimum data node purchase quantity for gudab Enterprise?
For technical support pricing details, please contact our sales representative.


This is where high-fashion clothing is designed and crafted from the heart by an amazing team of craftsmen and designers who understand what fashion is.
"SALE:Buy anything for 40% off. Use promo CODE YOLOMY45 when you buy items"
YOLOMY
WE ARE YOLOMY-WE UNDERSTAND FASHION AND STYLE. WE CRAFT OUR PRODUCTS WITH LOVE AND DILIGENCE.


Neuromancer
William Gibson
Neuromancer is a 1984 novel by William Gibson, a seminal work in the cyberpunk genre and the first winner of the science-fiction "triple crown" — the Nebula Award, the Philip K. Dick Award, and the Hugo Award.[1] It was Gibson's debut novel and the beginning of the Sprawl trilogy. The novel tells the story of a washed-up computer hacker hired by a mysterious employer to pull off the ultimate hack.
Robot Visions
Isaac Asimov
Robot Visions (1990) is a collection of science fiction short stories and factual essays by Isaac Asimov. Many of the stories are reprinted from other Asimov collections, particularly I, Robot and The Bicentennial Man and Other Stories. It also includes the title story, "Robot Visions" (written specifically for this collection[1]), which combines Asimov's motifs of robots and of time travel. It is the companion book to Robot Dreams.


Projects
add
NYC Open Data
NYC Open Data
close- Description Used API to find the nearest public wifi spots from any given location in NYC.
- Challenges Filtering the dataset.
- Future Iterations Merge Starbucks and McDonald's datasets.
Python
Jupyter Notebook
Pandas
API
add
Book Swap
Book Swap
close- Description A platform for my university where students can swap textbooks.
- Challenges Server-side integration.
- Future Iterations Project still in development.
Full-Stack
MongoDB
Materialize
Airline Simulator
close- Description Passengers can book and cancel tickets from Dubai to any country worldwide and vice versa..
- Challenges Running at O(n^3), couldn't generate more than 500k flights.
- Future Iterations Reduce prices for additional layovers. Add more airlines.
Java
user input
object-oriented prog.
add
Coding for Dummies
Coding for Dummies
close- Devised easy-to-grasp curriculum on how to design websites using HTML, CSS and JavaScript.
- Coordinated a team of upperclassmen to help club's 50 members grasp programming.
Teaching
Teamwork
Front-End
add
TED Talks
TEDxBrooklynTechHS
close- Introduced a TEDx event themed on how communication changes with the advent of technology.
- Responsible for selecting and preparing keynotes, handling logistics and marketing event to school's 5,600 students.
Team Development
Recruiting
Marketing
Leadership


Portal Layout Components Events Implementation
Just like in AWT or Swing libraries, portlet layout components
can receive events by implementing a listener.
The current component event implementations are:
- {@link org.gridsphere.layout.event.impl.PortletFrameEventImpl}
- {@link org.gridsphere.layout.event.impl.PortletTabEventImpl}
- {@link org.gridsphere.layout.event.impl.PortletTitleBarEventImpl}


--- layout: post title: Blogger date: 2016-11-06 20:24:00 UTC updated: 2016-11-06 20:24:45 UTC comments: false categories: permalink : /p/blogger.html ---


Human-Computer Interaction · Front-End Developer · UX Designer
Waiting in Line
Needfinding
Prototyping
Heuristic Evaluation
Visualization
Social design
Gestural interaction
Design tools


Quark 2016
About
Accomodation
Sponsors
Reach BITS
Team
Feedback
Events
Guest Lectures
Workshops
Aurora Nites
Exhibitions
Quark 2016


Classes
The following classes are available globally.
-
ColorSlider is a customizable color picker with live preview.
Inspired by Snapchat, ColorSlider lets you drag to select black, white, or any color in between. Customize
ColorSlider
and its preview via a simple API, and receive callbacks viaUIControlEvents
.Use the convenience initializer to create a
.vertical
ColorSlider with a live preview that appears to the.left
of it:let colorSlider = ColorSlider(orientation: .vertical, previewSide: .left)
You can create a custom preview view using the
ColorSliderPreviewing
protocol, or by subclassingDefaultPreviewView
. To pass in a custom preview view, simply use the default initializer instead:let myPreviewView = MyPreviewView() let colorSlider = ColorSlider(orientation: .vertical, previewView: myPreviewView)
ColorSlider is a
UIControl
subclass and fully supports the followingUIControlEvents
:.valueChanged
.touchDown
.touchUpInside
.touchUpOutside
.touchCancel
Once adding your class as a target, you can get callbacks via the
color
property:colorSlider.addTarget(self, action: #selector(ViewController.changedColor(_:)), forControlEvents: .valueChanged) func changedColor(_ slider: ColorSlider) { var color = slider.color // ... }
Customize the appearance of ColorSlider by setting properties on the
gradientView
:// Add a border colorSlider.gradientView.layer.borderWidth = 2.0 colorSlider.gradientView.layer.borderColor = UIColor.white // Disable rounded corners colorSlider.gradientView.automaticallyAdjustsCornerRadius = false
ColorSlider uses the HSB color standard internally. You can set the
See moresaturation
of your ColorSlider’sgradientView
to change the saturation of colors on the slider. See theGradientView
andHSBColor
for more details on how colors are calculated.Declaration
Swift
public class ColorSlider: UIControl
-
A gradient view that acts as the background of any
ColorSlider
. This class draws colors based on theorientation
passed to the initializer and determines the output color ofColorSlider
after a touch event.Customize the appearance of ColorSlider by setting layer properties on this class, including
See moreborderWidth
,borderColor
, andcornerRadius
.Declaration
Swift
public final class GradientView: UIView
-
The default preview view of a
ColorSlider
.Appears to the given
side
of the associatedColorSlider
at the point of the currently selected color with an offset ofoffsetAmount
and a scale given byscaleAmounts
for a given state.You can subclass this class and pass it as a preview to
See moreColorSlider
to customize its appearance or animation. You may also create your own customUIView
and conform to thePreviewView
protocol and pass that toColorSlider
‘s initializer.Declaration
Swift
public class DefaultPreviewView: UIView


Japanese Jazz from 70’s Vinyl Set
by arnitologCBS: Japanese Jazz from 70's Vinyl Set
All music rights belong to their rightful owners. Please support the musicians and buy their music. Coffee Break Sessions is the new format that I will be post…www.youtube.com
Уместный сет для ночи с субботы на воскресение.


Acting Like a Thief is a short film about Budhan Theatre of Chharanagar. Starting with playwright Dakxin Bajrange discussing his arrest , the film brings us inside the lives of a dedicated group of young actors and their families as they discuss what it means to be a “born criminal” and how theater changed their lives.
On May 11th, 2003 Dakxin Bajrange was arrested for allegedly assaulting Prahlad Chhara. The real reason? Performing plays critical of the police.
Says Paschim, Daxin’s brother, “My brother has been writing plays and performing them with his group DNT-NT Rights Action group, Chharanagar, since 1998. All his plays are against police atrocities on tribals and that is why I feel the police have implicated him without proper investigation. Prahlad Chhara was attacked by some other people from our community but Daxin got the blame.”
Besides his family, several noted playwrights and theatre personalities have come out in defence of Daxin. In a joint statement on Saturday, Dr G.N. Devy, an activist working in the tribal belt, Malayam writer and Jnanpith Award winner M.T. Vasudevan Nair, Bengali writer and recipient of Magsaysay and Jnanpith Awards Mahashweta Devi, noted painter Bhupen Khakkar, Malayalam poet and Secretary, Sahitya Akademi, K. Satchidanandan, and Kanji Patel, a Gujarati writer, expressed shock at Daxin’s arrest.
The statement says, “We are shocked to learn that a young and talented dramatist and theatre director like Daxin Bajrangee has been arrested by police on a very serious charge though he is innocent.”
The publicity soon got Daxin out of jail, but tension between the community and the police continue, even as efforts have been made to resolve these differences.
Budhan Theatre was founded on 31st August 1998 in commemoration of the day when India’s first Prime Minister, Jawaharlal Nehru, lifted the stigma of criminality from the settled tribes in 1952. A population of some 60 million of these “denotified tribes” can be found throughout India today. Since 1998, Budhan Theatre has performed street plays to raise awareness about the condition of such tribes. Their goal is to demonstrate that Chharas are not “born criminals,” they are humans with real emotions, capacities, and aspirations. Each of their productions has dramatized the events surrounding custodial deaths, abductions, beatings and torture of such tribes throughout the country. At present Budhan Theatre is reaching out to other similarly stigmatized communities and including their stories in its repertoire.
Nomadic and Denotified Tribes are well-versed culturally, but due to difficult living conditions they have lacked the opportunity to develop their cultural talent properly. According to theatrical director Dakxin Bajrange, himself a Chhara, these tribes have an innate and extraordinary talent for acting. While working with these tribes for many years he has found that their quality of facial expression, speech and gesture are unmatched by other communities. Traditional performers, their families have been acting for hundreds of years. Additionally, the youth now feel they are acting to change their lives, and in many real ways doing it to keep themselves alive. They are performing with what little they have — their bodies, their voices and their creative talent — to change their society so that they may have a future within it.
The so-called denotified tribes of India are among the lasting victims of British imperialism. Originally “notified” by the government as criminals in 1871, the DNTs should have enjoyed the freedom of independence that came to the rest of India’s people in 1947. Instead, they have languished as the most handicapped community in the nation, with health, literacy, and employment levels far below the average.
The British labeled them criminals because they pursued a nomadic way of life. The nomadic tribes traditionally carried important commodities such as salt and honey between the coasts and the inland forests. The British relied on these networks to establish their own trading relationships and to guide their armies through unknown regions. Indeed, these traders and transporters of goods were crucial informants for the new rulers, who benefited from tribal knowledge of flora and fauna, transportation and communication.
As railways and telegraphs were built in the 1850s such networks became redundant. The colonial authorities grew nervous about people who moved around, carrying intelligence they could not control directly. In the aftermath of the Revolt of 1857 these former allies were seen as potential enemies. In 1871, an Act was passed for “the notification of criminal tribes.” Hundreds of tribes that traditionally collected food from the forest became criminals with the stroke of a pen. When they could not be forcibly settled, they were sometimes shot on sight. Those who were settled were subjected to a pass system to control their movements and were rehabilitated through rigorous labor.
These criminal tribes were properly de-notified in 1952 after India’s independence. But they were reclassified as “habitual offenders” in 1959. The stigma of the criminal label still follows them to this day. Many laws and regulations in various states prohibit certain communities of people from traveling; others must still register at police stations in the districts they pass through. This close association with authority makes nomadic tribes especially liable to suspicion when crimes actually occur. The percentage of DNTs in custody and under investigation is greatly disproportionate to their population.
In 1952, five years after independence, the Criminal Tribes Act of 1911 was finally repealed. Released from the forced labor camp which had been their prison for the past forty years, the Chhara were resettled on the outskirts of Ahmedabad, in Chharanagar. Roughly three square miles, with a population of over twenty thousand, Chharanagar is primarily known for its home brewed liquor – illegal in the dry state of Gujarat.
The Chhara community were indigenous and nomadic people of the Punjab region who were “notified” and settled by order of the British colonial government in the 1930s. At that time they were confined in a colony called Chharanagar and rehabilitated through industrial and agricultural labor. After independence they were released from the settlement, but many chose to remain, having essentially no resources or other means of livelihood and no retraining in useful skills.
Due to their history of nomadism and forced sedentization, social stigmas have developed about the Chharas that place them at considerable disadvantage in competing for jobs and education. They have become scapegoats and usual suspects for police, who are able to use Chharas for illegal purposes, such as brewing country liquor under threat of compulsion. This places Chharas in constant uneasy relation to authority and has resulted in an extremely high rate of incarceration. Youth find it very difficult to acquire and retain employment. Yet Chharas are highly motivated to excel at education, and Chharanagar boasts an impressive number of professionals.
Shashwati Taulukdar is an independent filmmaker whose work ranges from documentary, narrative and experimental. Shashwati worked as an editor in the film and television industry, where she got her start as an assistant editor for a TV show by Michael Moore.
P. Kerim Friedman lives and teaches in Taiwan where he is an associate professor in the Department of Ethnic Relations and Cultures (within the College of Indigenous Studies), at National Dong Hwa University in Hualien. Trained in both linguistic and visual anthropology, he has worked extensively with indigenous Taiwanese and with India's Denotified and Nomadic Tribes (DNTs).


The "function" package provides the interfaces to implement custom-made manipulation of data.
Functions are used from a query. So before using a function, it has to exist somewhere in the system: this is the purpose of the Function package.
You create a function by implementing a new class that directly inherits from {@link bzh.plealog.hge.api.function.AbstractFunction}. Then you add that function to the HGE core system using {@link bzh.plealog.hge.api.function.FunctionSystem#addFunction(Function)}.
You can use a function as soon as it exists in the {@link bzh.plealog.hge.api.function.FunctionSystem} of HGE. For instance, if you have define a function named "Cardinality", then you use that name in a query.


- What is Aurelia-Kendoui bridge
- GRID - example of an Aurelia-Kendoui component
- We've done the hard work for you
- Use Kendo UI components in your Aurelia application without writing any wrapper code
- Powerful binding expressions directly in your markup
- Full support for Aurelia's templating system in Kendo templates
- See the catalog or check out the example in the second tab
Example
- Without Bridge
- With Bridge (View)
- With Bridge (View-Model)


Men due in court after alleged assault on McDonald's staff
by Michael StewardTwo men are due in court after two McDonald's staff members were allegedly assaulted in Essex.
Police received reports around 2.40am on Saturday, April 20 that two men were assaulted in McDonald's restaurant in Galley's Corner, Braintree.
Ben Dyer, 28, of Cressing Road, Braintree, and Steven Toms, 38, of Cherwell Way, Gorleston, have been summonsed to Chelmsford Magistrates' Court on Monday, December 9 for assault causing actual bodily harm (ABH).


| Package | Description |
|---|---|
| org.apache.beam.runners.core |
Provides utilities for Beam runner authors.
|
| org.apache.beam.runners.spark.io |
Spark-specific transforms for I/O.
|
| org.apache.beam.sdk.io | |
| org.apache.beam.sdk.io.hdfs |
Transforms used to read from the Hadoop file system (HDFS).
|
| org.apache.beam.sdk.io.hdfs.simpleauth |
Transforms used to read from the Hadoop file system (HDFS) with authentication.
|
| org.apache.beam.sdk.io.jms |
Transforms for reading and writing from JMS (Java Messaging Service).
|
| org.apache.beam.sdk.io.kafka |
Transforms for reading and writing from Apache Kafka.
|
| org.apache.beam.sdk.io.kinesis |
Tests for KinesisIO.
|
| org.apache.beam.sdk.io.mongodb |
Transforms for reading and writing from MongoDB.
|
| org.apache.beam.sdk.testing |
Defines utilities for unit testing Apache Beam pipelines.
|
| Class and Description |
|---|
| BoundedSource
A
Source that reads a finite amount of input and, because of that, supports
some additional operations. |
| Source
Base class for defining input formats and creating a
Source for reading the input. |
| UnboundedSource
A
Source that reads an unbounded amount of input and, because of that, supports
some additional operations such as checkpointing, watermarks, and record ids. |
| Class and Description |
|---|
| BoundedSource
A
Source that reads a finite amount of input and, because of that, supports
some additional operations. |
| Class and Description |
|---|
| AvroIO.Read.Bound
A
PTransform that reads from an Avro file (or multiple Avro
files matching a pattern) and returns a bounded PCollection containing
the decoding of each record. |
| AvroIO.Write.Bound
A
PTransform that writes a bounded PCollection to an Avro file (or
multiple Avro files matching a sharding pattern). |
| AvroSource
A
FileBasedSource for reading Avro files. |
| BlockBasedSource
A
BlockBasedSource is a FileBasedSource where a file consists of blocks of
records. |
| BlockBasedSource.Block
A
Block represents a block of records that can be read. |
| BlockBasedSource.BlockBasedReader
A
Reader that reads records from a BlockBasedSource . |
BoundedReadFromUnboundedSource
PTransform that reads a bounded amount of data from an UnboundedSource ,
specified as one or both of a maximum number of elements or a maximum period of time to read. |
| BoundedSource
A
Source that reads a finite amount of input and, because of that, supports
some additional operations. |
| BoundedSource.BoundedReader
A
Reader that reads a bounded amount of input and supports some additional
operations, such as progress estimation and dynamic work rebalancing. |
| CompressedSource
A Source that reads from compressed files.
|
| CompressedSource.CompressionMode
Default compression types supported by the
CompressedSource . |
| CompressedSource.DecompressingChannelFactory
Factory interface for creating channels that decompress the content of an underlying channel.
|
| CountingInput.BoundedCountingInput
A
PTransform that will produce a specified number of Longs starting from
0. |
| CountingInput.UnboundedCountingInput |
| CountingSource.CounterMark
The checkpoint for an unbounded
CountingSource is simply the last value produced. |
| FileBasedSink
Abstract
Sink for file-based output. |
| FileBasedSink.CompressionType
Directly supported file output compression types.
|
| FileBasedSink.FileBasedWriteOperation
Abstract
Sink.WriteOperation that manages the process of writing to a
FileBasedSink . |
| FileBasedSink.FileBasedWriteOperation.TemporaryFileRetention
Options for handling of temporary output files.
|
| FileBasedSink.FileBasedWriter
Abstract
Sink.Writer that writes a bundle to a FileBasedSink . |
| FileBasedSink.FileResult
Result of a single bundle write.
|
| FileBasedSink.WritableByteChannelFactory
Implementations create instances of
WritableByteChannel used by FileBasedSink
and related classes to allow decorating, or otherwise transforming, the raw data that
would normally be written directly to the WritableByteChannel passed into
FileBasedSink.WritableByteChannelFactory.create(WritableByteChannel) . |
| FileBasedSource
A common base class for all file-based
Source s. |
| FileBasedSource.FileBasedReader
A
reader that implements code common to readers of
FileBasedSource s. |
| FileBasedSource.Mode
A given
FileBasedSource represents a file resource of one of these types. |
| OffsetBasedSource
A
BoundedSource that uses offsets to define starting and ending positions. |
| OffsetBasedSource.OffsetBasedReader
A
Source.Reader that implements code common to readers of all
OffsetBasedSource s. |
| PubsubIO.PubsubSubscription
Class representing a Cloud Pub/Sub Subscription.
|
| PubsubIO.PubsubTopic
Class representing a Cloud Pub/Sub Topic.
|
| PubsubIO.Read.Bound
A
PTransform that reads from a Cloud Pub/Sub source and returns
a unbounded PCollection containing the items from the stream. |
| PubsubIO.Write.Bound |
Read.Bounded
PTransform that reads from a BoundedSource . |
Read.Unbounded
PTransform that reads from a UnboundedSource . |
| Sink
A
Sink represents a resource that can be written to using the Write transform. |
| Sink.WriteOperation
A
Sink.WriteOperation defines the process of a parallel write of objects to a Sink. |
| Sink.Writer
A Writer writes a bundle of elements from a PCollection to a sink.
|
| Source
Base class for defining input formats and creating a
Source for reading the input. |
| Source.Reader
The interface that readers of custom input sources must implement.
|
| TextIO.CompressionType
Possible text file compression types.
|
| TextIO.Read.Bound
A
PTransform that reads from one or more text files and returns a bounded
PCollection containing one element for each line of the input files. |
| TextIO.Write.Bound
A PTransform that writes a bounded PCollection to a text file (or
multiple text files matching a sharding pattern), with each
PCollection element being encoded into its own line.
|
| UnboundedSource
A
Source that reads an unbounded amount of input and, because of that, supports
some additional operations such as checkpointing, watermarks, and record ids. |
| UnboundedSource.CheckpointMark
A marker representing the progress and state of an
UnboundedSource.UnboundedReader . |
| UnboundedSource.UnboundedReader
A
Reader that reads an unbounded amount of input. |
| Write.Bound
A
PTransform that writes to a Sink . |
| XmlSink.Bound
A
FileBasedSink that writes objects as XML elements. |
XmlSink.XmlWriteOperation
Sink.WriteOperation for XML Sink s. |
| XmlSink.XmlWriter
A
Sink.Writer that can write objects as XML elements. |
| XmlSource
A source that can be used to read XML files.
|
| Class and Description |
|---|
| BoundedSource
A
Source that reads a finite amount of input and, because of that, supports
some additional operations. |
| BoundedSource.BoundedReader
A
Reader that reads a bounded amount of input and supports some additional
operations, such as progress estimation and dynamic work rebalancing. |
Read.Bounded
PTransform that reads from a BoundedSource . |
| Sink
A
Sink represents a resource that can be written to using the Write transform. |
| Sink.WriteOperation
A
Sink.WriteOperation defines the process of a parallel write of objects to a Sink. |
| Sink.Writer
A Writer writes a bundle of elements from a PCollection to a sink.
|
| Source
Base class for defining input formats and creating a
Source for reading the input. |
| Class and Description |
|---|
| BoundedSource
A
Source that reads a finite amount of input and, because of that, supports
some additional operations. |
Read.Bounded
PTransform that reads from a BoundedSource . |
| Sink
A
Sink represents a resource that can be written to using the Write transform. |
| Sink.WriteOperation
A
Sink.WriteOperation defines the process of a parallel write of objects to a Sink. |
| Sink.Writer
A Writer writes a bundle of elements from a PCollection to a sink.
|
| Source
Base class for defining input formats and creating a
Source for reading the input. |
| Class and Description |
|---|
| UnboundedSource.CheckpointMark
A marker representing the progress and state of an
UnboundedSource.UnboundedReader . |
| Class and Description |
|---|
| UnboundedSource.CheckpointMark
A marker representing the progress and state of an
UnboundedSource.UnboundedReader . |
| Class and Description |
|---|
Read.Unbounded
PTransform that reads from a UnboundedSource . |
| Class and Description |
|---|
| BoundedSource
A
Source that reads a finite amount of input and, because of that, supports
some additional operations. |
| BoundedSource.BoundedReader
A
Reader that reads a bounded amount of input and supports some additional
operations, such as progress estimation and dynamic work rebalancing. |
| Source
Base class for defining input formats and creating a
Source for reading the input. |
| Class and Description |
|---|
| BoundedSource
A
Source that reads a finite amount of input and, because of that, supports
some additional operations. |
| BoundedSource.BoundedReader
A
Reader that reads a bounded amount of input and supports some additional
operations, such as progress estimation and dynamic work rebalancing. |
| Source.Reader
The interface that readers of custom input sources must implement.
|
Copyright © 2016 The Apache Software Foundation. All rights reserved.


I am a student currently enrolled in AP Computer Science at William Lyon Lyon Mackenzie CI. I have been programming for two years, and I am hoping to get a career in the technology sector.
OOP stands for Object Oriented Programming. It is a type of computer programming that lets the programmer define not only the data type of a data structure, but also its functions. An object in programming is similar to an object in real life in the way that they both have properties and behaviors. An dog will be a set color (brown, black, etc), and will also have behaviors, (run, jump, etc). A dog object in java will first have to be defined in a class. This class is essentially a list of attributes and behaviors of an object. In java, an attribute is called a variable, and a behavior is called a method. So the class "dog" will have all the attributes and behaviors that you want a dog object to have. When you create the dog object, it will have all of the attributes and behaviors of its class.
/*Example dog class *this class has the color of the dog, and two methods, *run and jump. */ public class Dog { private String color; /*this is the constructor, which sets the variables *of this class */ Dog(){ //This is a blank constructor, so we default color to black this.color = "black"; } Dog(String color){ //sets the color variable of the dog this.color = color; } public void run(int feet){ //implementation } public void jump(int feet){ //implementation } }
To create a dog object, you must define the variables in its constructor.
/*Creating dog object *You can either define the color of the dog, or let it default *to black */ //this is the main method, which executes the code above public static void main(string args){ //here we create the dogs Dog brownDog = new Dog(brown); Dog blackDog = new Dog(); //We can make the brownDog jump 3 feet brownDog.jump(3); //We can make the blackDog run 5 feet blackDog.run(5) }
There are three fundamental principles of OOP.
Abstraction, which lets the programmer define the basic outline of a class, Encapsulation, which lets the programmer hide data, and inheritance, which lets the programmer make subclasses have inherit properties from a superclass.
An abstract class is a class where there is at least one method without implementation. This is useful if you just want to have a very basic template for your subclasses.
//Example of abstract class abstract class Teacher{ abstract void teach(); } //class that provides implementation for teacher class BillNye extends Teacher{ teach(){ System.out.println("Science rules"); } }
Encapsulation is useful for Java programmers when they want to keep data separate between classes. It lets the programmer control where the data goes, which makes your code much easier to organize, among other thing.
//we can hide data by using the "private" access modifier public class Dog{ //private data member private String name; //getter method for name public String getName(){ return name; } //setter method for name public void setName(String name){ this.name=name } } //This is the class used to demo the methods class Demo{ public static void main(String[] args){ //creating instance of the encapsulated class Dog d =new Dog(); //setting value in the name member d.setName("Buddy"); //getting value of the name member System.out.println(d.getName()); } }
In java, classes can be many different things. Two of the things they can be are superclasses and subclasses. A superclass is a class that is being inherited from. Its methods and variables will be inherited into all of its subclasses, unless the programmer specifies otherwise.
A subclass is a class that has inherited properties from a superclass. The superclass's variables and methods can be called(used),in a subclass without it being written in the subclass's code.
//This is the superclass class SuperClass{ public void superClassMethod{ System.out.println("I am from a superclass"); } } //the subclass will inherit the superClassMethod from the superclass class SubClass extends Superclass{ public void subClassMethod{ System.out.println("I am from a subclass"); } } class demo{ public static void main (String[] args){ SubClass s = new SubClass; s.superClassMethod(); s.subClassMethod(); } }
Polymorphism is another part of object oriented programming. In programming terms, it means "The ability of an object to take many forms". A common way of using polymorphism is when you use a parent class reference to refer to a child class reference. In other words, you can use a superclass reference to refer to a subclass reference.
//This is the superclass class SuperClass{ public void superClassMethod{ System.out.println("I am from a superclass"); } } //the subclass will inherit the superClassMethod from the superclass class SubClass extends Superclass{ public void subClassMethod{ System.out.println("I am from a subclass"); } } class demo{ public static void main (String[] args){ SubClass s = new SuperClass; //this code will work because the subclass //will automatically upcast to become a superclass } }
Arrays are essentially a list of variables of one data type. They are used to simplify code that needs many variables of the same type and same use.
/*For example, a method that would need to store five integers *and print it out would need to do this */ int print() { int number1; int number2; int number3; int number4; int number5; number1 = 10; number2 = 20; number3 = 30; number4 = 40; number5 = 50; System.out.println( "number1:" + number1); System.out.println( "number2:" + number2); System.out.println( "number3:" + number3); System.out.println( "number4:" + number4); System.out.println( "number5:" + number5); } /*If we used arrays, it could be simplified */ int print() { int [] numberList = new int { 10,20,30,40,50}; for (int x = 1; x < 6; x++){ System.out.println("number" + (x) + ": " + numberList[x-1]); } }
Arraylists are a list of arrays, so we can say that they are an array of arrays. They are different than multiple dimensional arrays, because of how they are a dynamic data structure. Normal arrays are a static data structure, so they are stuck to the initial size that you give them. If you want to make an array larger, you have to copy the contents to a new array, and initialize that array to a larger size. An arraylist can be made larger or smaller. By using the arraylist.add() and arraylist.remove() methods, we can add or remove elements from the arraylist. This is useful when you want a dynamic list of something that doesn't have a set amount of elements. For example, arraylists are more useful if you want to create a sign in sheet for an event that you don't know the number of addendants. The arraylist will resize automatically as you keep adding the attendants.
/*here is the method if you want to resize an array to include an element *we must initialize a new array, by using Arrays.copyOf() *and make the size larger *the oldArray is the array that you want to resize *the addElement int is the element you want to add *preconditions: oldArray is full */ int [] addToArray(int[] oldArray, int addElement){ int [] newArray = Arrays.copyOf(oldArray, oldArray.length + 1); newArray[newArray.length - 1] = addElement; return newArray; } /*this is how you can resize an arraylist to include an element *our arraylist is named example, our int is named addInt *all we have to do is to do example.add(addInt) *and it would automatically add it to the end */ ArrayList <Integer> example = new ArrayList <Integer>;
Heap sort is a sort based off of the binary tree based data structure, heaps. There are two types of heaps, max heaps and min heaps, but for our tutorial we will be using max heaps. As stated before, heaps are based off of binary tree data structures, which basically look like this:
As you can see, there are root nodes, nodes and leaves. A tree will only have one root node, and it is typically the first index of the array. Each node can only have a maximum of two child nodes. We will refer to leaf nodes as just nodes, because it doesn't make a difference in the explanation. Max heaps are essentially trees that meet a certain condition. To be a max heap, the tree's root node must be larger or equal to its child nodes, and its child nodes must be greater or equal to their child nodes, and so on and so forth. Here we can see an example of a max heap:
Trees are made from arrays or arraylists, and the root nodes are typically the first index. The left child node is then set to the second index, and the right node set to the third. This continues until the end of the array. To provide a better example, here is the implementation to create a tree in Java.
Code should be here blah blah
After creating our tree, we will need to change it into a max heap, so the parent nodes must be larger or equal to its child nodes. We will call this method heapify. Here is the implementation to heapify an array.
// To heapify a subtree rooted with node i which is // an index in arr[]. n is size of heap void heapify(int arr[], int n, int i) { int largest = i; // Initialize largest as root int l = 2*i + 1; // left = 2*i + 1 int r = 2*i + 2; // right = 2*i + 2 // If left child is larger than root if (l > n && arr[l] > arr[largest]) largest = l; // If right child is larger than largest so far if (r > n && arr[r] > arr[largest]) largest = r; // If largest is not root if (largest != i) { int swap = arr[i]; arr[i] = arr[largest]; arr[largest] = swap; // Recursively heapify the affected sub-tree heapify(arr, n, largest); } } //This code is taken from https://www.geeksforgeeks.org/heap-sort/
The heapify method will ensure that the largest element always ends up at the first index, so after the heap is created, we swap the largest to the first index, and then heapify the
Close ProjectLorem ipsum dolor sit amet, consectetur adipisicing elit. Mollitia neque assumenda ipsam nihil, molestias magnam, recusandae quos quis inventore quisquam velit asperiores, vitae? Reprehenderit soluta, eos quod consequuntur itaque. Nam.
Close ProjectLorem ipsum dolor sit amet, consectetur adipisicing elit. Mollitia neque assumenda ipsam nihil, molestias magnam, recusandae quos quis inventore quisquam velit asperiores, vitae? Reprehenderit soluta, eos quod consequuntur itaque. Nam.
Close Project


Site Map
Text Link One
Text Link Two
Text Link Three
Text Link Four
Text Link Five
Main Content Area.


Welcome, {{ active_user }}
{% endif %}Help diverse talent thrive in their businesses and startups today!
Join NowDon't have an account yet? Click here to join our community!
Sign UpAlready have an account? Click here to log in!
Log inPitch your project! Our platform will help you gather funds to bring your ideas to life.
Sign UpMentors from all walks of life are here to give feedback on your business plan.
Sign UpAsk your mentor questions you have about making a statement in the small business world


Comments
-
Greg Hurrell
So where would be the right place to handle this? There are three places where we can change "metadata" on an issue (not really "metadata" but just attributes):
- Using the issues#edit form.
- Using AJAX in-place editors in issues#show.
-
Programmatically (eg. from the
script/console
).
If we decide that we only want to annotate edits done from a web browser then the right place to do it would be in the issues controller. If we decide we ant to annotate all edits, including programmatic ones, then the right place would be in the issues model itself.
At this stage I really don't know what level would be appropriate, although I am leaning towards the first two levels only (1 and 2).
Regardless of the decision I make, need to decide who will "own" these comments. If they have no owner they will appear as coming from "anonymous", which is probably not what I want. Ideally they would be tagged as coming from "system"; perhaps they would have an entirely different appearance. Perhaps they shouldn't even be comments at all, but a new model called "annotations"; which would be another database query, and I'd have to decide whether they would be displayed interleaved with the comments or separately (as they are in Bugzilla, I think).
-
Greg Hurrell
For an example of what Bugzilla does, go to this bug and click the "history" link next to the "Modified" header.
-
Greg Hurrell
For comparison, take a look at this Trac ticket. You can see how changes appear as comments, owned by the person who made the change.
-
Greg Hurrell
Ok, I think I'm going to do this like Trac does, and I'm going to do it at the controller level, because only the controller knows who is doing the edit. The model can't and shouldn't know that.
-
Greg Hurrell
Ok, looks like I've got it all implemented. But the changes are relatively complicated so will subject them to a bit of testing before deploying.
-
Greg Hurrell
Ok, so I've been testing this for a while in the staging environment and it seems to work well. It's now live on the production server as well.
-
Greg Hurrell
Status changed:
- From: Open
- To: Closed
Add a comment
Comments are now closed for this issue.


CHAPTER 454
MORTGAGE BROKERS AND SOLICITORS
REPEALED. L 2010, c 84, §29.
Cross References
Secure and fair enforcement for mortgage licensing act, see chapter 454F.


News
2010 IASSIST Conference
5 May 2010
Staff from ADA’s nodes will be presenting at the 2010 IASSIST Conference in June 2010 under the topics ‘Developing a Longitudinal Data Archive: Lessons Throughout the Data Lifecycle’, ‘Connecting with the Community: Stakeholder Participation in the Development and Operation of Qualitative Data Archives’ and ‘Models of Collaboration in Data Curation’. Read more
Twenty cubes now available
5 May 2010
Twenty cubes from the 1966 Census are now available in the ADA Data Catalogue. Read more
Mapping variable added
5 May 2010
The Australian Survey of Social Attitudes, the Australian Election Study and the Australian Demographic Data Bank datasets in the ADA Data Catalogue now include a mapping variable. If the mapping variable is added to a cross-tabulation, the map icon can be used to display state-level information on a map of Australia.Read more
Qualitative researchers callout
23 December 2009
Qualitative researchers are invited to respond to a National Consultation Process. For details, please refer to the discussion paper - Archiving Qualitative Data: Prospects and Challenges of Data Preservation and Sharing among Australian Qualitative Researchers.Read more
Steve McEachern is the new Deputy Director of ADA
9 September 2009
Steve McEachern is the new Deputy Director of ADA. Steve has previously worked as a lecturer in the areas of management and organisational behaviour at the Universities of Ballarat and Curtin. He also established the University of Ballarat’s Survey Research Facility, funded through an ARC-LIEF grant in collaboration with Deakin University in 2003, which provided telephone and mail survey data collection systems for projects conducted by staff and students.Read more
Longitudinal Surveys of Australian Youth
30 July 2009
Accessing and using data from the Longitudinal Surveys of Australian Youth: current and potential users of the LSAY data are encouraged to attend a one-day data workshop hosted by the National Centre for Vocational Education Research. Participants will gain a better understanding of the usefulness of the LSAY data as well as its limitations. The newly developed cohort reports will be showcased. There will also be opportunity for participation through exercises focusing on how the LSAY data can be used to answer real-life research questions. The data workshop will be held in Melbourne on Tuesday 1 September, 9.30 - 4.00pm. A fee of $180 (inc. GST) applies. For further information and registration see LSAY events.Read more
Funding is available for organisations
29 June 2009
Funding is available for organisations who are not members of ACSPRI to access data from the Longitudinal Surveys of Australian Youth (LSAY), a research program that tracks young people from around age 15 to 25 as they move from school to post-school destinations. See How to access LSAY data for more details. The funds are provided by the federal Department of Education, Employment and Workplace Relations through the LSAY Research Innovation and Expansion Fund managed by the National Centre for Vocational Education Research.Read more
Twenty cubes now available
18 June 2009
The Historical Census and Colonial Data Archive web site is now available. The HCCDA is a searchable archive of Australian Colonial census publications and reports and is a sub-archive of ADA.Read more
ADA Nesstar Catalogue has now been consolidated
13 May 2009
The ADA Nesstar Catalogue has now been consolidated so that all of the data are held on one server. The topic classification folders now form the top-level view replacing the ANU, UQ, UWA and UNSW folder views. The non-Australian studies are now rearranged into views by country. These changes should improve resource discovery and require less drilling down through folders to locate data. Read more
Recent data is now available
8 April 2009
A list of Recent data is now available.
Karen Dennison is the new National Manager of ADA
16 March 2009
Karen Dennison is the new National Manager of ADA, seconded until February 2010 from her post as Support Services Manager at the UK Data Archive.Read more


We focus on our Quality Management System implementation, maintainability and continuous improvement as one of our main strategic goals
"To become a singular and recognized reference in software quality assurance and process management, with a perfect implementation for continuous improvement and an unquestionable prestige."


This is just a toy demo - don't really expect any point to it
There is no submit button - just enter a label, then click on the large swatch to change your color.
Play with choosing whose colors to see in realtime below. As other users change their color, they will
be updated in realtime.


KWS
Prototype
Projects
About
Contact
KWS
PROTOTYPE
KWS Order Submission Form
Name
Phone Number
Email
Location(approximate)
Order Details (Estimate)
send a file!
Your email:
Your file:
Send