This web app exists to explore loads and loads of the Rijksmuseums' art very fast. It has a minimal interface and allows you to find things you like visually.
Scroll to the right. Go to the collection.


Specialists in personalised iPhone cases, iPod cases and BlackBerry cases. All our cases are slim-fit, tough and lightweight
nd printed using our patented 3D technology.
Customize Slide
Specialists in personalised iPhone cases, iPod cases and BlackBerry cases. All our cases are slim-fit, tough and lightweight
nd printed using our patented 3D technology.
Customize Slide
Specialists in personalised iPhone cases, iPod cases and BlackBerry cases. All our cases are slim-fit, tough and lightweight
nd printed using our patented 3D technology.
Customize Slide
Specialists in personalised iPhone cases, iPod cases and BlackBerry cases. All our cases are slim-fit, tough and lightweight
nd printed using our patented 3D technology.


Recently I've been running into problems with a couple of my WPF applications which appear to be hardware related - specifically due to two things:
In error logs it can be useful to track down what type of machine - and specifically whether it's a VM or a metal box - is in use and what video card is used to determine if there's a pattern.
One of the errors - a DUCE Channel Exception in WPF - for example, could be traced back to specific video cards that have a compatbility issue with specific video cards, which took forever to track down at the time.
Likewise I've now run into a few other issues that appear to occur only on virtual machines.
So, to make it a bit easier to know what type of machine is causing a problem I think it would be useful to record the basic hardware info about the machine and specifically:
All of this information is available on Windows via the Windows WMI System and in .NET via the System.Management
libraries. WMI provides a wealth of information about the local machine and its configuration. I'm only after some basic information but you can dig up a lot more information into much of the detail to what you can find in UI tools like HWInfo.
Here's some code that I added recently to provide that info into exception logs:
// You'll need a reference to System.Management.dll
/// <summary>
/// Holds basic machine hardware info about Mfr, Model and GPU
/// </summary>
internal static string MachineInfo = GetMachineHardwareInfo();
/// <summary>
/// Get Machine Name and Model that allows to determine
/// whether the machine is a virtual machine
/// </summary>
/// <returns></returns>
static string GetMachineHardwareInfo()
{
string machine = null;
try
{
using (var searcher = new System.Management.ManagementObjectSearcher(
"Select Manufacturer, Model from Win32_ComputerSystem"))
{
using (var items = searcher.Get())
{
foreach (var item in items)
{
string manufacturer = item["Manufacturer"].ToString();
string model = item["Model"].ToString();
machine = manufacturer + " " + model;
}
}
}
using (var searcher = new System.Management.ManagementObjectSearcher(
"Select * from Win32_DisplayConfiguration"))
{
string graphicsCard = string.Empty;
using (var items = searcher.Get())
{
foreach (var item in items)
{
string gpu = item["Description"].ToString();
machine += ", " + gpu;
}
}
}
}
catch { }
return machine;
}
On my local machine this produces the following from mmApp.MachineInfo
:
Dell Inc. XPS 15 9520, NVIDIA GeForce RTX 3050 Laptop GPU
On my VPC Windows Web Server I get:
Vultr VHP, Microsoft Remote Display Adapter
which clearly marks this as a Virtual machine.
I can now use this information and apply it to my logged output that then shows up in both local and telemetry logs:
For me this ticks the two criteria I'm looking for:
##AD##
Note that the Virtual Machine question answers itself through the Manufacturer and Model name strings which are logged as is. I found a few posts that talked about determining VM status by checking the strings based on common, known VM namings, but I found that brittle as it's bound to change and even now is not reliable. For example, the VULTR VPC didn't work with the string filtering. So seeing the full Manufacturer and Model is actually more reliable in my opinion.
The requirements may be different if you actually need to conditionally branch code based on the Virtual Machine status in which case you can look for certain key words that indicate a VM.
Also note that the whole operation is stuffed into a try\catch
block to make sure that if running in a very low rights environment a failure to retrieve values from WMI won't crash the application. In that case null is returned.
I use this for logging errors both locally and into AppInsights from my WPF application:
if (ex != null)
{
AppRunTelemetry.Telemetry.Success = false;
AppInsights.TrackException(ex,
new Dictionary<string, string>
{
{"msg", msg},
{"exmsg", ex.Message},
{"exbasemsg", ex.GetBaseException().Message},
{"exsource", ex.Source},
{"extrace", ex.StackTrace},
{"extype", ex.GetType().ToString()},
{"severity", unhandledException ? "unhandled" : ""},
{"version", version},
{"winversion", winVersion},
{"dotnetversion", mmWindowsUtils.GetDotnetVersion()},
{"machine", mmApp.MachineInfo}, // <!--- this
{"usage", InternalUseCount.ToString()},
{"registered", UnlockKey.IsUnlocked.ToString()},
{"culture", CultureInfo.CurrentCulture.IetfLanguageTag},
{"uiculture", CultureInfo.CurrentUICulture.IetfLanguageTag},
{"seconds", secs.ToString() },
{"level", ((int) logLevel).ToString() + " - " + logLevel.ToString()}
});
}
This works great and even after just a few days in use, this has already paid off as I've actually verified another bug I've been tracking for some time and tied it to running in a virtual machine. Unfortunately I don't have a workaround for that yet, but knowing part of the cause is a good place to start...
Lots of information is available to retrieve out of WMI so if you need to know something about the hardware environment it's probably there, although it'll take some digging in finding the right keys to retrieve. I was actually surprised that there isn't some ready-made WMI key that knows whether you're running under virtualization or not - if there is I didn't find any reference to it...


Conclusion
And that sums up my explanation of these concepts in HTML interpretation. I have used Header, Navigation and Sections in this page HTML, however I have inputted this into the CSS Validator.
And that sums up my explanation of these concepts in HTML interpretation. I have used Header, Navigation and Sections in this page HTML, however I have inputted this into the CSS Validator.


Critical Error: DataProviderThe dataprovider class "[DATAPROVIDERCLASS]" could not be loaded.Please contact your site administrator. A technical explanation of why this error is caused is below. |
|
Zimbra Community expects to load a data abstraction layer (DAL) class; in this case: [DATAPROVIDERCLASS]. This DAL is used to communicate to whatever datastore you are using for Zimbra Community (the default data store class is SqlDataProvider).
This class requires that certain methods and properties are implemented as it
inherits these from the class below:
In this case, the WebCommonSqlDataProvider class defines methods and/or properties that are missing in [DATAPROVIDERCLASS]. Please open your data provider class and attempt to recompile. You should get detailed compilation errors noting the missing methods/properties. For more information you can also visit http://zimbra.com the home of the Zimbra Community development team. |


QiPki is an effort to create Java developper tools to build cryptography into applications and heading towards building a suite of packaged cryptography services.
This is indeed a technology project. Development tries to follow principles learned from DDD, DCI, ReST and more using the Qi4j engine and framework.
The main goal of The Crypto API is to lower the developer pain by wrapping underlying tools with nice, strongly typed APIs, easing testability, mockability and usage with dependency injection tools like Guice, CDI or Qi4j.
Learn how to embedd a fully working CA inside your Java application. It's basically a matter of instanciating the good objects and using a simple API.
Learn where the project is, where it comes from and where it's headed.
See what is in the present feature set and what is coming.
QiPki is published under the open-source Apache Licence.
The project is quite ambitious and needs some help, see what you could do to help it grow.
QiPki is licenced under the Apache Licence Version 2.0
Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and (b) You must cause any modified files to carry prominent notices stating that You changed the files; and (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. END OF TERMS AND CONDITIONS
Before choosing between the latest release or a development build, be sure to check out the status and roadmap of the project.
QiPki artifacts are synced into maven central and can be downloaded from there.
QiPki use the awesome DEV@cloud service gracefully provided by Cloudbees to FOSS projects.
Here is a POM snippet to add the snapshot repository:
<repository>
<id>qipki-snapshots-repository</id>
<url>http://repository-qipki.forge.cloudbees.com/snapshot/</url>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
Current development version is ${version}.
If you want to go deeper, try to fix an issue you spotted or contribute a new feature, you can build QiPki yourself.
The build system is documented in the build page.
During the QiPki development a comprehensive Crypto API was build and is still enhanced. This library does not try to reinvent the wheel where good wheels are found. It leverages the JCA and BouncyCastle.
The main goal of the Crypto API is to ease the developer pain by wrapping underlying tools with nice, strongly typed APIs and being easily testable, mockable, usable with dependency injection tools like Guice, CDI or Qi4j.
You will need java and maven plus a source editor of your choice.
Start by creating a new maven project with the following command:
mvn -B archetype:generate -DarchetypeArtifactId=maven-archetype-quickstart -DgroupId=com.mycompany.app -DartifactId=my-app -Dversion=${version}
Replace com.mycompany.app
and my-app
by the groupId and artifactId you want to use.
This should have created a my-app
directory containing an empty java maven project.
Now, open the pom.xml
file and add this before the <dependencies>
section:
<build>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.5</source>
<target>1.5</target>
</configuration>
</plugin>
</plugins>
</build>
<repositories>
<repository>
<id>qipki-snapshots-repository</id>
<url>http://repository-qipki.forge.cloudbees.com/snapshot/</url>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
</repositories>
qipki-crypto
module
Add org.codeartisans.qipki:qipki-crypto
as dependency to your project inside the
<dependencies>
section:
<dependency>
<groupId>org.codeartisans.qipki</groupId>
<artifactId>qipki-crypto</artifactId>
<version>${version}</version>
</dependency>
Ensure that everything works by issueing a mvn clean install
command.
Note that the examples below are automaticaly extracted from actual code, often from unit tests. When applicable, theses examples show two ways to do things: with and without Qi4j. You'll se that the plumbing code provided for integration with Qi4j ease things a lot. Using another DI tool like Guice, CDI or Spring would help in quite the same way.
A cryptographic hash function is a deterministic procedure that takes an arbitrary block of data and returns a fixed-size bit string, the (cryptographic) hash value, such that an accidental or intentional change to the data will change the hash value. The data to be encoded is often called the "message," and the hash value is sometimes called the message digest or simply digest.
Cryptographic hash function From Wikipedia, the free encyclopedia
The following code generate hexadecimal encoded hashes of a single string using several algorithms.
${snippet.crypto.digest.1}
The DigestParameters
accept the following options:
DigestAlgorithm algorithm
: the hashing algorithm to usebyte[] salt
: the salt to useint iterations
: the number of times the hashing algorithm will be runTheses options let you make proper password hashing. Here is an example using a random 64 bits salt and 1024 iterations:
${snippet.crypto.digest.2}
Symmetric-key algorithms are a class of algorithms for cryptography that use trivially related, often identical, cryptographic keys for both encryption of plaintext and decryption of ciphertext. The encryption key is trivially related to the decryption key, in that they may be identical or there is a simple transformation to go between the two keys. The keys, in practice, represent a shared secret between two or more parties that can be used to maintain a private information link.
Symmetric-key algorithm From Wikipedia, the free encyclopedia
The following code generates a 128 bits AES key and then use it to cipher a string then to decipher it using CBC mode of operation and PKCS5 padding.
${snippet.crypto.cipher.block}
The very same operation applied on a data stream:
${snippet.crypto.cipher.stream}
In cryptography, a message authentication code (often MAC) is a short piece of information used to authenticate a message.
A MAC algorithm, sometimes called a keyed (cryptographic) hash function, accepts as input a secret key and an arbitrary-length message to be authenticated, and outputs a MAC (sometimes known as a tag). The MAC value protects both a message's data integrity as well as its authenticity, by allowing verifiers (who also possess the secret key) to detect any changes to the message content.
Message authentication code From Wikipedia, the free encyclopedia
${snippet.crypto.mac.1}
Public-key cryptography refers to a cryptographic system requiring two separate keys, one to lock or encrypt the plaintext, and one to unlock or decrypt the cyphertext. Neither key will do both functions. One of these keys is published or public and the other is kept private. If the lock/encryption key is the one published then the system enables private communication from the public to the unlocking key's owner. If the unlock/decryption key is the one published then the system serves as a signature verifier of documents locked by the owner of the private key.
Asymmetric-key cryptography From Wikipedia, the free encyclopedia
TODO Add examples from the unit tests.
In cryptography, X.509 is an ITU-T standard for a public key infrastructure (PKI) and Privilege Management Infrastructure (PMI). X.509 specifies, amongst other things, standard formats for public key certificates, certificate revocation lists, attribute certificates, and a certification path validation algorithm.
X.509 From Wikipedia, the free encyclopedia
The DistinguishedName
class hide api complexity needed to handle X.509 distinguished
names in the X.500
tradition, especially regarding encoding and special characters escape.
The DistinguishdNameTemplate
class build on this to provide a convenient way to
generate DNs from templates:
${snippet.crypto.dn}
TODO Add examples from the unit tests.
TODO Explain SLF4J usage and loggers hierarchy
You will need java and maven plus a source editor of your choice.
Start by creating a new maven project with the following command:
mvn -B archetype:generate -DarchetypeArtifactId=maven-archetype-quickstart -DgroupId=com.mycompany.app -DartifactId=my-app -Dversion=${version}
Replace com.mycompany.app
and my-app
by the groupId and artifactId you want to use.
This should have created a my-app
directory containing an empty java maven project.
Now, open the pom.xml
file and add this before the <dependencies>
section:
<build>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.5</source>
<target>1.5</target>
</configuration>
</plugin>
</plugins>
</build>
<repositories>
<repository>
<id>qipki-snapshots-repository</id>
<url>http://repository-qipki.forge.cloudbees.com/snapshot/</url>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
</repositories>
qipki-ca
module
Add org.codeartisans.qipki:qipki-ca
as dependency to your project inside the
<dependencies>
section:
<dependency>
<groupId>org.codeartisans.qipki</groupId>
<artifactId>qipki-ca</artifactId>
<version>${version}</version>
</dependency>
Ensure that everything works by issueing a mvn clean install
command.
package org.qipki.examples.embeddedca;
import /* ... snip ... */;
public class EmbeddedCaExample
{
public static void main( String[] args )
{
// Instanciate and run the embedded CA application
QiPkiEmbeddedCa ca = new QiPkiEmbeddedCa( TODO );
ca.run();
UnitOfWorkFactory uowf = ca.unitOfWorkFactory();
// Create a new UnitOfWork
UnitOfWork uow = uowf.newUnitOfWork();
// Interract with the CA here using the RootContext
RootContext<TODO> caCtx = ca.newRootContext();
// Keep reading for example interactions
// Apply changes
try {
uow.complete();
} catch ( UnitOfWorkCompletionException ex ) {
throw new RuntimeException( "Something went wrong" );
} finally {
uow.discard(); // No changes are discarded if the UnitOfWork completed successfully
}
// Stop gracefully
ca.stop();
}
}
TODO Explain this code snippet.
TODO Explain QiPki DCI implementation.
TODO Add examples from the unit tests.
TODO Add examples from the unit tests.
TODO Add examples from the unit tests.
TODO Add examples from the unit tests.
TODO Explain SLF4J usage and loggers hierarchy
TODO Add examples from the unit tests.
TODO Add examples from the unit tests.
TODO Add examples from the unit tests.
TODO Add examples from the unit tests.
TODO Add examples from the unit tests.
Latest release, 1.0, contains a usable embedded CA with CRL support. This version uses an embedded instance of Apache Derby to store all of its data, an embedded Sesame based RDF repository for indexing/querying and the filesystem to store keystores and crls.
The following release, probably 1.1-*, will be based on Qi4j 2.0, allows you to choose more store/indexing/querying backend implementations and have a comprehensive set of web user interfaces.
The current codebase is being worked on mainly to implement all the CA interactions as http resources for use over the network. The build already produces a UNIX daemon like packaging.
The HEAD of the source is kept as stable as possible thanks to continuous integration, if you are curious you can take a look at the ca-http-main module output, you'll find a tarball there.
See the detailed roadmap for details.
The first user of QiPki is QiPki. As every component is built to be embeddable, QiPki use this facility to build a new open-source cryptography services suite.
The CryptoAPI is used in several projects while for now the only project using the embeddable CA is the eKeynox suite from Netheos. It's already deployed and used in production in setups involving ten thousands of users/certificates.
QiPki is a young project, till it already is 2 years old. You can read more about it's history, status and roadmap here.
Any kind of help would be useful, from suggestions, bug reports, patches to spotting a typo in this very page :-) We'll welcome any kind of comment, remark, critics about the project, feel free to create a new issue.
As you certainly already understood, this is Work In Progress, don't expect something with easy setup and comprehensive documentation for now but in case you're already using the embedded API or want to show your support, use the widgets on the right.
You can follow the documentation about the Crypto API usage or on
how to embedd a CA. If you want to try the HTTP based CA you'll have to read
some code. We hope that the unit tests are readable enough to get you started. Take a look inside
the ca-tests
submodule, see below for details.
Git (with the help of Github) empower you to fork a module, hack on the source and share those changes with others. You only have to involve the project team when you are ready to contribute those changes back into the project's master (upstream) branch by sending a pull request. This is the preferred contribution workflow.
Here is a quick summary of the workflow:


Units
Class Hierarchy
Classes, Interfaces, Objects and Records
Types
Variables
Constants
Functions and Procedures
Identifiers
Generate primes of Int16 (c int16_t) type
Generate primes of Int32 (c int32_t) type
Generate primes of Int64 (c int64_t) type
Generate primes of UInt16 (c uint16_t) type
Generate primes of UInt32 (c uint32_t) type
Generate primes of UInt64 (c uint64_t) type
primesieve functions return PRIMESIEVE_ERROR (UINT64_MAX) if any error occurs.
Pascal API version


Summary
The Children's Advocacy Center is a facility-based community partnership dedicated to a team approach by professionals pursuing the truth in child abuse investigations.  The Children’s Advocacy Center is designed as a safe and welcoming place for children to be heard, while ensuring that children are not further victimized by the systems intended to protect them. them.
Mission Statement
The mission of the Children's Advocacy Center is to coordinate a timely, comprehensive, and multidisciplinary response to child sexual abuse and serious physical abuse allegations in a safe, agency-neutral, child-focused setting.
What Are Children's Advocacy Centers?
The development of Children's Advocacy Centers in Illinois began in DuPage County in 1987 under the leadership of then State's Attorney Jim Ryan. In 1989, specific requirements for the establishment and operation of Children's Advocacy Centers in Illinois were formalized by the passage of the Child Advocacy Center Act.
Children's Advocacy Centers are child-focused, facility based programs in which representatives from responsible agencies meet to discuss and make decisions about the investigation, treatment and prosecution of child sexual abuse and severe physical abuse cases. This multidisciplinary approach brings together under one umbrella all the professionals and agencies needed to offer comprehensive services: law enforcement, child protective services, prosecution, victim advocacy agencies, and the mental health and medical communities.
How CACs Help Kids from National Children's Alliance on Vimeo.
Governing Board and Staff
The Children’s Advocacy Center is administered by a Governing
Board whose role is to promote interdisciplinary communication
and training personnel from various Champaign County offices,
agencies, departments, and local service providers ; to supervise,
oversee, and communicate policy for the operation of the Children’s
Advocacy Center; to make such reports to contributing officers,
agencies, and departments as may be required; and to act as liaison
to the multidisciplinary professionals involved in the Children’s
Advocacy Center.
The following offices/agencies are represented on the CAC’s Governing Board:
- Carle Clinic
- Champaign Police Department
- Mental Health Practitioner
- Champaign County Probation and Court Services Department
- Champaign County Sheriff’s Office
- Champaign County State’s Attorney’s Office
- Champaign-Ford Counties Regional Office of Education
- Illinois Department of Children and Family Services
- Illinois State Police
- Mahomet Police Department
- Ford County State’s Attorney’s Office
- Rantoul Police Department
- University of Illinois Police Department
- Urbana Police Department
The Executive Director, Family Advocate, Multidisciplinary Team Coordinator, and Forensic Interviewer are responsible for overseeing the daily operations of the Children’s Advocacy Center. Their combined efforts ensure the provision of a coordinated, timely, comprehensive, and multidisciplinary response to child sexual abuse and serious physical abuse allegations. The CAC works collaboratively with local agencies and service providers to facilitate interviews, make medical and treatment referrals, and provide support to child victims and their non-offending family members throughout the life of the case.
 By coordinating services for the child from the moment a case opens, the center ensures immediate follow-up on reports of abuse as well as ongoing collaboration between the agencies.
More efficient medical and mental health referrals. Open communication and case coordination facilitates the timeliness with which the child and family receive needed service. Children receive prompt and ongoing services that are tailored to their specific needs and family situations. Interagency agreements between the Center and other social service agencies assure that children receive prompt medical care and mental health therapy.
Reduction in the number of child victim interviews. The multidisciplinary team coordinates the interview of the child and non-offending family members at the Center. By coordinating the interview, the child is not subjected to multiple interviews by multiple agencies involved in handling the case.
Increased successful prosecution.  By coordinating the process of how information is collected and disseminated, child advocacy centers improve the quality of information provided to prosecutors and juvenile court attorneys. Experienced professionals who have been specially-trained to interview children thoroughly investigate allegations of abuse. Their child-focused approach produces a greater quantity of reliable information used in criminal, civil and juvenile court proceedings.
Consistent support for child victims and supportive adults. More non-offending family members are empowered to protect and support their children throughout the process and beyond. The CAC will ensure the family is connected to the appropriate resources and services based upon the specific needs of the family.


Codehaus XFire
DocumentationQuicklinksDevelopers
Sponsors |
WS-Security support is now included in the 1.1 release. XFire uses WSS4J to provide WS-Security support. In addition to the documentation here, you may find their site helpful as well. XFire also includes some WS-Security examples in the distribution which you can try out. Enabling WS-SecurityBefore enabling WS-Security module, you must make sure that you have installed Unlimited Strength Jurisdiction Policy Files for your SDK version ( bottom of the page http://java.sun.com/j2se/1.5.0/download.jsp or http://java.sun.com/j2se/1.4.2/download.html), and the Bouncy Castle security provider from http://BouncyCastle.org ( Here is short description of instalation process : http://docs.safehaus.org/display/PENROSE/Installing+Security+Provider ) . If you don't, you will probably receive an exception message about invalid algorithm or key size. To enable WS-Security support you must add two handlers to the incoming (inhandlers) and/or outgoing (outhandlers) handler chains ( If your client sends secured data but does not expect to get such response, its enough to only add security handlers to the client's outHandlers and if your server takes secured messages but does not send such, you can add handlers only to the server's inHandlers chain). These handlers must be added to the inHandlers: Note: DOMInHandler requires XML Transformer support which is included in Xalan 2.7.0. This library is not included with XFire by default. and the handlers below to outHandlers: Server side configuration : <tns:inHandlers> <tns:handler handlerClass="org.codehaus.xfire.util.dom.DOMInHandler" /> <bean id="org.codehaus.xfire.security.wss4j.WSS4JInHandler" class="org.codehaus.xfire.security.wss4j.WSS4JInHandler"> <!-- security configuration goes here --> .... </bean> </tns:inHandlers> <tns:outHandlers> <tns:handler handlerClass="org.codehaus.xfire.util.dom.DOMOutHandler" /> <bean id="org.codehaus.xfire.security.wss4j.WSS4JOutHandler" class="org.codehaus.xfire.security.wss4j.WSS4JOutHandler"> <!-- security configuration goes here --> .... </bean> </tns:outHandlers> Client side configuration : Service serviceModel = new ObjectServiceFactory().create( .. ) // Create service client IBook service = (IBook) new XFireProxyFactory().create( ...); Client client = Client.getInstance(service); client.addOutHandler(new DOMOutHandler()); Properties outProperties = new Properties(); // CONFIGURE OUTGOING SECURITY HERE (outProperties) <-- client.addOutHandler(new WSS4JOutHandler(outProperties)); client.addInHandler(new DOMInHandler()); Properties inProperties = new Properties(); // CONFIGURE INCOMMING SECURITY HERE (inProperties) <-- client.addInHandler(new WSS4JInHandler(inProperties)); // Execute service Building keysYou can generate a key pair for the development environment via the following steps. Keep in mind these will not be signed by an external authority like Verisign. 1. Creating private key with given alias and password like "myAlias"/"myAliasPassword" in keystore (protected by password for keytool -genkey -alias myAlias -keypass myAliasPassword -keystore privatestore.jks \
-storepass keyStorePassword -dname "cn=myAlias" -keyalg RSA
In this instance we are using the RSA algorithm. 2. Self-sign our certificate (in production environment this will be done by a company like Verisign). keytool -selfcert -alias myAlias -keystore privatestore.jks -storepass keyStorePassword -keypass myAliasPassword 3. Export the public key from our private keystore to file named key.rsa keytool -export -alias myAlias -file key.rsa -keystore privatestore.jks -storepass keyStorePassword 4. Import the public key to new keystore: keytool -import -alias myAlias -file key.rsa -keystore publicstore.jks -storepass keyStorePassword
So now we have two keystores containing our keys - a public one (publicstore.jks) and a private one (privatestore.jks). Both of them have keystore password set to keyStorePass (this not recommended for production but ok for development) and alias set to myAlias. The file key.rsa can removed from filesystem, since it used only temporarily. Storing keys in keystores is strongly advised because a keystore is protected by a password. A more detailed description of key generation can be found here: How to create a production certificate can be found here: User Token AuthenticationThis WS-Security scenario adds username and password values to the message header. A password can be sent as plain text or in hashed form (depending on "passwordType" property). Client side configuration : protected void configureOutProperties(Properties config) { // Action to perform : user token config.setProperty(WSHandlerConstants.ACTION, WSHandlerConstants.USERNAME_TOKEN); // Password type : plain text config.setProperty(WSHandlerConstants.PASSWORD_TYPE, WSConstants.PW_TEXT); // for hashed password use: //properties.setProperty(WSHandlerConstants.PASSWORD_TYPE, WSConstants.PW_DIGEST); // User name to send config.setProperty(WSHandlerConstants.USER, "serveralias"); // Callback used to retrive password for given user. config.setProperty(WSHandlerConstants.PW_CALLBACK_CLASS, PasswordHandler.class.getName()); } The PasswordHandler class is responsible for finding the password for given user name and must implement the org.apache.ws.security.WSPasswordCallback interface. You can also specify an existing handler instance, using the WSHandlerConstants.PW_CALLBACK_REF property on the client/service instance or MessageContext ( e.g. client.setProperty(new PasswordHandler())). The WSHandlerConstants.PASSWORD_TYPE property determines how the password will be sent. If it is set to WSConstants.PW_TEXT, the password will be sent as plain text. If the value is WSConstants.PW_DIGEST, a password digest will be sent. If no value is set, a digest is used by default.. Server side configuration : <!-- ============= User Token with Plain Pasword ============= --> <service> <!-- --> <name>BookServiceUTPP</name> <namespace>http://xfire.codehaus.org/BookService</namespace> <serviceClass>org.codehaus.xfire.demo.BookService</serviceClass> <inHandlers> <handler handlerClass="org.codehaus.xfire.util.dom.DOMInHandler" /> <bean class="org.codehaus.xfire.security.wss4j.WSS4JInHandler" xmlns=""> <property name="properties"> <map xmlns="" > <entry key="passwordCallbackRef" xmlns=""> <bean xmlns="" class="org.codehaus.xfire.demo.PasswordHandler" id="passHandler" name="passHandler"/> </entry> <entry key="action" value="UsernameToken" /> </map> <!-- props> <prop key="action">UsernameToken</prop> <prop key="passwordCallbackClass">org.codehaus.xfire.demo.PasswordHandler</prop> </props --> </property> </bean> <handler handlerClass="org.codehaus.xfire.demo.ValidateUserTokenHandler" /> </inHandlers> </service> The "action" property contains an action to perform. public class ValidateUserTokenHandler extends AbstractHandler { public void invoke(MessageContext context) throws Exception { Vector result = (Vector) context.getProperty(WSHandlerConstants.RECV_RESULTS); for (int i = 0; i < result.size(); i++) { WSHandlerResult res = (WSHandlerResult) result.get(i); for (int j = 0; j < res.getResults().size(); j++) { WSSecurityEngineResult secRes = (WSSecurityEngineResult) res.getResults().get(j); int action = secRes.getAction(); // USER TOKEN if( (action & WSConstants.UT )>0 ){ WSUsernameTokenPrincipal principal = (WSUsernameTokenPrincipal) secRes .getPrincipal(); // Set user property to user from UT to allow response encryption context.setProperty(WSHandlerConstants.ENCRYPTION_USER,principal.getName()); System.out.print("User : " + principal.getName() + " password : " + principal.getPassword() + "\n"); } // SIGNATURE if( ( action & WSConstants.SIGN ) > 0 ){ X509Certificate cert = secRes.getCertificate(); X500Name principal = (X500Name) secRes.getPrincipal(); // Do something whith cert System.out.print("Signature for : " + principal.getCommonName()); } } } } } TimestampsTimestamps specify how long the security data remains valid. Client side configuration: protected void configureOutProperties(Properties properties) { properties.setProperty(WSHandlerConstants.ACTION,WSHandlerConstants.TIMESTAMP); // How long ( in seconds ) message is valid since send. properties.setProperty(WSHandlerConstants.TTL_TIMESTAMP,"15"); // if you want to use millisecond precision use this //properties.setProperty(WSHandlerConstants.TIMESTAMP_PRECISION,"true"); } The WSHandlerConstants.TTL_TIMESTAMP property specifies the number of seconds or milliseconds for which the message is considered valid . The WSHandlerConstants.TIMESTAMP_PRECISION property determines the time unit for the time stamp ( seconds or miliseconds). If not specified, seconds are used. Server side configuration: <!-- ============= TimeStamp ============= --> <service> <name>BookServiceTS</name> <namespace>http://xfire.codehaus.org/BookService</namespace> <serviceClass>org.codehaus.xfire.demo.BookService</serviceClass> <inHandlers> <handler handlerClass="org.codehaus.xfire.util.dom.DOMInHandler" /> <bean class="org.codehaus.xfire.security.wss4j.WSS4JInHandler" xmlns=""> <property name="properties"> <props> <prop key="action">Timestamp</prop> </props> </property> </bean> </inHandlers> </service> EncryptionAllows one to encrypt the message body ( or only its part ) using the given crypthography algorithm. For performance reasons, message data is encrypted using a symmetric key and then the symmetic key is encrypted with the receiver's public key. Client side configuration: protected void configureOutProperties(Properties properties) { properties.setProperty(WSHandlerConstants.ACTION, WSHandlerConstants.ENCRYPT); properties.setProperty(WSHandlerConstants.USER, "serveralias"); //Configuration of public key used to encrypt message goes to properties file. properties.setProperty(WSHandlerConstants.ENC_PROP_FILE, "org/codehaus/xfire/client/outsecurity_enc.properties"); } WSHandlerConstants.ENC_PROP_FILE - contains path to file with details of encryption configuration. The file can look like the following : org.apache.ws.security.crypto.provider=org.apache.ws.security.components.crypto.Merlin org.apache.ws.security.crypto.merlin.keystore.type=jks org.apache.ws.security.crypto.merlin.keystore.password=keystorePass org.apache.ws.security.crypto.merlin.alias.password=aliaspass org.apache.ws.security.crypto.merlin.keystore.alias=alias org.apache.ws.security.crypto.merlin.file=META-INF/xfire/myPublicstore.jks Server side configuration: <!-- ============= Encryption ============= --> <service> <name>BookServiceENC</name> <namespace>http://xfire.codehaus.org/BookService</namespace> <serviceClass>org.codehaus.xfire.demo.BookService</serviceClass> <inHandlers> <handler handlerClass="org.codehaus.xfire.util.dom.DOMInHandler" /> <bean class="org.codehaus.xfire.security.wss4j.WSS4JInHandler" xmlns=""> <property name="properties"> <props> <prop key="action">Encrypt</prop> <prop key="decryptionPropFile">META-INF/xfire/insecurity_enc.properties</prop> <prop key="passwordCallbackClass">org.codehaus.xfire.demo.PasswordHandler</prop> </props> </property> </bean> </inHandlers> </service> SignatureAllows one to send along with the message a digital signature of it, which assures that no one modified the message content between the sender and receiver. This action creates a digest of the message and encrypts it with sender private key. The receiver must have the sender's public key to verify this signature. Client side configuration: protected void configureOutProperties(Properties properties) { properties.setProperty(WSHandlerConstants.ACTION,WSHandlerConstants.SIGNATURE); // User in keystore properties.setProperty(WSHandlerConstants.USER, "client-344-839"); // This callback is used to specify password for given user for keystore properties.setProperty(WSHandlerConstants.PW_CALLBACK_CLASS, org.codehaus.xfire.demo.PasswordHandler.class.getName()); // Configuration for accessing private key in keystore properties.setProperty(WSHandlerConstants.SIG_PROP_FILE,"org/codehaus/xfire/client/outsecurity_sign.properties"); properties.setProperty(WSHandlerConstants.SIG_KEY_ID,"IssuerSerial"); } WSHandlerConstants.SIG_KEY_ID specify what key identifier should be used ( possible values are : "IssuerSerial" ( recommended ) and "DirectReference" ). Configuration file can look like: org.apache.ws.security.crypto.provider=org.apache.ws.security.components.crypto.Merlin org.apache.ws.security.crypto.merlin.keystore.type=jks org.apache.ws.security.crypto.merlin.keystore.password=keystorePass org.apache.ws.security.crypto.merlin.alias.password=aliaspass org.apache.ws.security.crypto.merlin.keystore.alias=alias org.apache.ws.security.crypto.merlin.file=META-INF/xfire/myPrivatestore.jks Server side configuration: <!-- ============= Signature ============= --> <service> <name>BookServiceSign</name> <namespace>http://xfire.codehaus.org/BookService</namespace> <serviceClass>org.codehaus.xfire.demo.BookService</serviceClass> <inHandlers> <handler handlerClass="org.codehaus.xfire.util.dom.DOMInHandler" /> <bean class="org.codehaus.xfire.security.wss4j.WSS4JInHandler" xmlns=""> <property name="properties"> <props> <prop key="action">Signature</prop> <prop key="signaturePropFile">META-INF/xfire/insecurity_sign.properties</prop> <prop key="passwordCallbackClass">org.codehaus.xfire.demo.PasswordHandler</prop> </props> </property> </bean> </inHandlers> </service> The file insecurity_sign.properties: org.apache.ws.security.crypto.provider=org.apache.ws.security.components.crypto.Merlin org.apache.ws.security.crypto.merlin.keystore.type=jks org.apache.ws.security.crypto.merlin.keystore.password=keystorePass org.apache.ws.security.crypto.merlin.keystore.alias=alias org.apache.ws.security.crypto.merlin.file=META-INF/xfire/myPublicstore.jks Using WS-Security with JSR 181 AnnotationsThis blog entry shows how to configure WS-Security using JSR 181 Annotations and InHandlers. |


Apple could be making an iTunes successor specifically for Windows
by Mark Wycislik-WilsonApple could be making an iTunes successor specifically for Windows
Job ad gives a hint of things to come
(Image credit: Shutterstock)
After killing off iTunes for macOS, Apple could be looking to do the same for Windows. The company has posted a job listing seeking a senior software engineer to work on Windows media apps, fuelling speculation that an iTunes successor could be in the works.
While the job ad doesn't give too much away, it does give a tantalizing glimpse into the future. In the listing, Apple says: "The Media Apps team is looking for a creative senior software engineer to work on the next generation of media apps for Windows. You will help build innovative features that will delight millions of customers around the world."
- The best free Windows 10 apps
- The best free media players for Windows
- The best cheap MacBook deals this month
Neowin noticed the job posted on LinkedIn, but it can also be seen on the Apple site. In the qualification requirements, Apple says that "experience with UWP is a big plus".
The apparent embracing of UWP (Universal Windows Platform) means that Apple could well be looking to create a modern follow-up to iTunes that could be used not only on Windows 10 computers, but also on Xbox One consoles and other devices.
Work for Apple
Apple doesn't mention iTunes by name in the ad, but as the suggestion that the job will appeal "if you love music and you are passionate about writing code" is a pretty strong indication as to what's in store.
Having split iTunes up into three separate apps – Apple Music, Apple TV, Books and Podcasts – in macOS Catalina, many people thought it a little strange that the app so many people love to hate lived on in Windows 10. Is iTunes finally getting the chop for Windows users? Time will tell.


This page displays measures for the network Task x Unknown.
Network images have nodes colored by group and sized by betweenness centrality.
Task-Level Measures
These measures were run on the specified network, and produced a vector of values, one value for each Task node.
Input network: Task x Unknown
Measure Min Mean Max Std.Dev Centrality, Out-Degree 0.005 0.005 0.005 0 Centrality, Out-Degree [Unscaled] 5,070 5,070 5,070 0 Unknown-Level Measures
These measures were run on the specified network, and produced a vector of values, one value for each Unknown node.
Input network: Task x Unknown
Measure Min Mean Max Std.Dev Centrality, Authority 0 2.261e-04 0.046 0.002 Centrality, Authority [Unscaled] 0 1.599e-04 0.033 0.001 Centrality, In-Degree 0 0.005 1 0.039 Centrality, In-Degree [Unscaled] 0 2.536 520 20.078 Measure List
Centrality, Out-Degree
For any node, e.g. an individual or a resource, the out-links are the connections that the node of interest has to other nodes. For example, imagine an agent by knowledge network where the number of out-links an agent would have is the number of pieces of knowledge it is connected to. The scientific name of this measure is out-degree and it can be calculated on any network.
If the node of interest has a higher than normal value (greater than 1 standard deviation(s) above the mean) the row is colored red. The row is green if the node is within 1 standard deviation of the mean. Finally, the row is colored blue if the node has a lower than normal value (less than one standard deviation(s) below the mean).
Input network(s): Task x Unknown
Rank Task Value Unscaled 1 All nodes have this value 0.005 5,070 Overall Top-Ranked Unknown
This chart shows the Unknown nodes that are top-ranked overall using the node-level measures listed below. The value shown for a node is the average of its measure values, each of which is first converted into a z-score. The final scores are then normalized to be between zero and one.
There are 1999 nodes in the nodeset.
Overall Score Measure List
Centrality, Authority
A node is authority-central to the extent that its in-links are from nodes that have many out-links. Individuals or organizations that act as authorities are receiving information from a wide range of others each of whom sends information to a large number of others.
If the node of interest has a higher than normal value (greater than 1 standard deviation(s) above the mean) the row is colored red. The row is green if the node is within 1 standard deviation of the mean. Finally, the row is colored blue if the node has a lower than normal value (less than one standard deviation(s) below the mean).
Input network(s): Task x Unknown
Rank Unknown Value Unscaled 1 personality 0.046 0.033 2 perceived_vulnerability 0.028 0.020 3 perception 0.026 0.019 4 combining 0.018 0.013 5 protection_effect 0.016 0.012 6 participant_modeling 0.014 0.010 7 appraisal 0.014 0.010 8 focus 0.013 0.009 9 intrinsic_rewards 0.013 0.009 10 loss 0.013 0.009 11 extrinsic_rewards 0.012 0.009 12 process 0.010 0.007 13 gain 0.010 0.007 14 thinking 0.010 0.007 15 intelligence 0.009 0.007 16 behavior 0.009 0.006 17 source 0.009 0.006 18 possibility_effect 0.008 0.006 19 physical_quality 0.007 0.005 20 perceived_responsibility 0.007 0.005 21 knowledge 0.007 0.005 22 ﬂ 0.006 0.004 23 activity 0.006 0.004 24 experiential_awareness 0.006 0.004 25 syllogistic_rules 0.006 0.004 26 simplifying 0.006 0.004 27 perceived_consensus 0.005 0.004 28 isolation_effect 0.005 0.003 29 impact 0.005 0.003 30 learning 0.005 0.003 31 impulsive_effect 0.004 0.003 32 segregating 0.004 0.003 33 techniques 0.004 0.003 34 behavior_controlability 0.004 0.003 35 persistence 0.004 0.003 36 collection 0.003 0.002 37 mental_calculation 0.003 0.002 38 function 0.003 0.002 39 judging 0.003 0.002 40 satisfaction_of_needs 0.003 0.002 41 division 0.003 0.002 42 fear_arousal 0.003 0.002 43 policy 0.003 0.002 44 coding 0.002 0.002 45 constraint 0.002 0.002 46 evaluating 0.002 0.002 47 modeling 0.002 0.002 48 perceived_uniqueness 0.002 0.002 49 vicarious_experience 0.002 0.002 50 experience 0.002 0.002 51 goal 0.002 0.002 52 certainty_effect 0.002 0.002 53 intentionality 0.002 0.001 54 situational_circumstance 0.002 0.001 55 ﬀ 0.002 0.001 56 arousal 0.002 0.001 57 comply_effect 0.002 0.001 58 mastery_experience 0.002 0.001 59 capability 0.001 0.001 60 frustration_of_needs 0.001 8.824e-04 61 generalizing 0.001 8.824e-04 62 history 0.001 8.824e-04 63 attending 0.001 7.563e-04 64 authority 0.001 7.563e-04 65 exfiltration 0.001 7.563e-04 66 live_modeling 0.001 7.563e-04 67 motivation 0.001 7.563e-04 68 opportunity_for_criminal_acts 0.001 7.563e-04 69 planning 0.001 7.563e-04 70 vulnerabilities 0.001 7.563e-04 71 a_memory 8.913e-04 6.303e-04 72 imagination 8.913e-04 6.303e-04 73 ﬃ 7.131e-04 5.042e-04 74 ownership 7.131e-04 5.042e-04 75 phishing 7.131e-04 5.042e-04 76 skill 7.131e-04 5.042e-04 77 œ 5.348e-04 3.782e-04 78 circumstances 5.348e-04 3.782e-04 79 deadeye_jackal 5.348e-04 3.782e-04 80 emotional_intelligence 5.348e-04 3.782e-04 81 internalization 5.348e-04 3.782e-04 82 symbolic_modeling 5.348e-04 3.782e-04 83 á 3.565e-04 2.521e-04 84 ä 3.565e-04 2.521e-04 85 exposure 3.565e-04 2.521e-04 86 extrinsic_motivation 3.565e-04 2.521e-04 87 fingerprinting 3.565e-04 2.521e-04 88 interception 3.565e-04 2.521e-04 89 making 3.565e-04 2.521e-04 90 preference 3.565e-04 2.521e-04 91 selfefficacy 3.565e-04 2.521e-04 92 ß 1.783e-04 1.261e-04 93 å 1.783e-04 1.261e-04 94 é 1.783e-04 1.261e-04 95 é—the 1.783e-04 1.261e-04 96 ø 1.783e-04 1.261e-04 97 裹瓶 1.783e-04 1.261e-04 98 š 1.783e-04 1.261e-04 99 ș 1.783e-04 1.261e-04 100 σ 1.783e-04 1.261e-04
Value statistics Min: 0 Mean: 2.261e-04 Lower quartile: 0 Max: 0.046 Std.dev: 0.002 Median: 0 Upper quartile: 0
Unscaled value statistics Min: 0 Mean: 1.599e-04 Lower quartile: 0 Max: 0.033 Std.dev: 0.001 Median: 0 Upper quartile: 0 Centrality, In-Degree
The number of links directed into a node normalized by the maximum number of such links. This measure is also called Column Degree Centrality because it is computed by taking the sum of the column values in the input network.
If the node of interest has a higher than normal value (greater than 1 standard deviation(s) above the mean) the row is colored red. The row is green if the node is within 1 standard deviation of the mean. Finally, the row is colored blue if the node has a lower than normal value (less than one standard deviation(s) below the mean).
Input network(s): Task x Unknown
Rank Unknown Value Unscaled 1 personality 1 520 2 perceived_vulnerability 0.604 314 3 perception 0.569 296 4 combining 0.396 206 5 protection_effect 0.354 184 6 participant_modeling 0.300 156 7 appraisal 0.292 152 8 focus 0.281 146 9 intrinsic_rewards 0.277 144 10 loss 0.277 144 11 extrinsic_rewards 0.269 140 12 process 0.215 112 13 gain 0.208 108 14 thinking 0.208 108 15 intelligence 0.204 106 16 behavior 0.185 96 17 source 0.185 96 18 possibility_effect 0.177 92 19 physical_quality 0.158 82 20 perceived_responsibility 0.146 76 21 knowledge 0.142 74 22 ﬂ 0.135 70 23 activity 0.131 68 24 experiential_awareness 0.127 66 25 syllogistic_rules 0.123 64 26 simplifying 0.119 62 27 perceived_consensus 0.115 60 28 isolation_effect 0.104 54 29 impact 0.100 52 30 learning 0.100 52 31 impulsive_effect 0.092 48 32 segregating 0.088 46 33 techniques 0.085 44 34 behavior_controlability 0.081 42 35 persistence 0.077 40 36 collection 0.073 38 37 mental_calculation 0.069 36 38 function 0.062 32 39 judging 0.062 32 40 satisfaction_of_needs 0.062 32 41 division 0.058 30 42 fear_arousal 0.058 30 43 policy 0.058 30 44 coding 0.054 28 45 constraint 0.054 28 46 evaluating 0.054 28 47 modeling 0.054 28 48 perceived_uniqueness 0.054 28 49 vicarious_experience 0.054 28 50 experience 0.050 26 51 goal 0.050 26 52 certainty_effect 0.046 24 53 intentionality 0.042 22 54 situational_circumstance 0.042 22 55 ﬀ 0.038 20 56 arousal 0.038 20 57 comply_effect 0.038 20 58 mastery_experience 0.035 18 59 capability 0.031 16 60 frustration_of_needs 0.027 14 61 generalizing 0.027 14 62 history 0.027 14 63 attending 0.023 12 64 authority 0.023 12 65 exfiltration 0.023 12 66 live_modeling 0.023 12 67 motivation 0.023 12 68 opportunity_for_criminal_acts 0.023 12 69 planning 0.023 12 70 vulnerabilities 0.023 12 71 a_memory 0.019 10 72 imagination 0.019 10 73 ﬃ 0.015 8 74 ownership 0.015 8 75 phishing 0.015 8 76 skill 0.015 8 77 œ 0.012 6 78 circumstances 0.012 6 79 deadeye_jackal 0.012 6 80 emotional_intelligence 0.012 6 81 internalization 0.012 6 82 symbolic_modeling 0.012 6 83 á 0.008 4 84 ä 0.008 4 85 exposure 0.008 4 86 extrinsic_motivation 0.008 4 87 fingerprinting 0.008 4 88 interception 0.008 4 89 making 0.008 4 90 preference 0.008 4 91 selfefficacy 0.008 4 92 ß 0.004 2 93 å 0.004 2 94 é 0.004 2 95 é—the 0.004 2 96 ø 0.004 2 97 裹瓶 0.004 2 98 š 0.004 2 99 ș 0.004 2 100 σ 0.004 2
Value statistics Min: 0 Mean: 0.005 Lower quartile: 0 Max: 1 Std.dev: 0.039 Median: 0 Upper quartile: 0
Unscaled value statistics Min: 0 Mean: 2.536 Lower quartile: 0 Max: 520 Std.dev: 20.078 Median: 0 Upper quartile: 0


This script is created for test purposes for running inside
Chrome/Chromium browser.
The browser should be run from command line to have debug port open:
chrome --remote-shell-port=9222
See also: http://code.google.com/p/chromedevtools


Exercise HTML
My name is
Raúl Valencia
Profile
College
Contact
First options
Second options
Third options


| Class | Description |
|---|---|
| AppointmentFragment |
This is the AppointmentFragment class that extends Fragment.
|
| CalendarActivity |
The
CalendarActivity class extends the Activity class and sets the parameters for the
calendar. |
| FavoritesFragment |
The
FavoritesFragment inflates the fragment_favorites layout. |
| HomeFragment |
The
HomeFragment class extends the Fragment class and inflates the elements of the
home page including the list of scheduled appointments. |
| LoginActivity |
the
LoginActivity class sets the parameters for the log in page which requires a
username and a password. |
| MainActivity |
The
MainActivity class utilizes the toolbar features and establishes a home fragment
that allows the user to access the home screen from the navigation drawer. |
| PractitionerListFragment |
The
PractitionerListFragment creates the list of practitioners that is available to
the user. |
| ProfileFragment |
The ProfileFragment class has several elements to it including the calendar and the rating bar for
each one of the practitioners.
|
| ScheduleItem |
The ScheduleItem class establishes the parameters for an appointment.
|
| SpecialtyFragment |
The SpecialtyFragment sets the parameters for the list of Specialists and inflates that fragment.
|
| TimeListAdapter |
The TimeList adapter is used primarily to change the background color of the practitioners
schedule based on whether the appointment has been booked or not.
|
| UniDatabase |
The Database implements the series of Dao classes.
|
| UserStatsFragment |
The UserStatsFragment utilizes a FloatingAction Button to access its contents.
|


| User guide |
(The code for this example can be found here: [ view | edit | run ] )
When using layouts to position axes, the position property
is set by the layout, not the user. Whether the Position
or OuterPosition
property is used is determined by the
ActivePositionProperty
property of the axes
.
Note that the default setting is "outerposition".
The following example illustrates the two usages.
Open a new figure window and remove the toolbar and menus.
window = figure
( 'Name', 'Axes inside layouts', ...
'MenuBar', 'none', ...
'Toolbar', 'none', ...
'NumberTitle', 'off' );
The layout involves two axes side by side. This is done using a flexible horizontal box. The left-hand axes is left with the ActivePositionProperty
set to "outerposition", but the right-hand axes is switched to use Position
.
hbox =uix.HBoxFlex
('Parent', window, 'Spacing', 3); axes1 =axes
( 'Parent', hbox, ... 'ActivePositionProperty', 'outerposition' ); axes2 =axes
( 'Parent', hbox, ... 'ActivePositionProperty', 'Position' ); set( hbox, 'Widths', [-2 -1] );
Using OuterPosition
(left-hand axes) is the normal mode and looks good for virtually any plot type. Using Position
is only really useful for 2D plots with the axes turned off, such as images.
x = membrane( 1, 15 );surf
( axes1, x );lighting
( axes1, 'gouraud' );shading
( axes1, 'interp' ); l =light
( 'Parent', axes1 );camlight
( l, 'head' );axis
( axes1, 'tight' );imagesc
( x, 'Parent', axes2 ); set( axes2, 'xticklabel', [], 'yticklabel', [] );
| Position vs OuterPosition | [Top] | Colorbars and legends |


endclip
endclip()
The endclip() command is the companion to beginclip() and may only be called after the later. When endclip() is called, subsequent shapes, paths, texts and images are no longer clipped to the path supplied to beginclip()
None
beginclip


public class VoiceList
extends java.lang.Object
Voices
.| Constructor and Description |
|---|
VoiceList()
Class constructor.
|
VoiceList(SynthesizerModeDesc desc)
Constructs from the voice list in
desc . |
| Modifier and Type | Method and Description |
|---|---|
void |
addVoice(BaseVoice voice)
Adds a voice to the list.
|
BaseVoice |
getVoiceById(java.lang.String id)
Gets a voice by its identifier.
|
java.lang.String |
getVoiceId(java.lang.String name,
int gender,
int age,
int variant)
Gets id for voice based on parameters provided in JSML.
|
java.lang.String |
getVoiceId(Voice voice,
int variant)
Gets the id of a voice.
|
void |
removeVoice(BaseVoice voice)
Removes a voice from the list.
|
public VoiceList()
public VoiceList(SynthesizerModeDesc desc)
desc
.
Requires that all voices in mode desc be instances of
BaseVoice
.desc
- the SynthesizerModeDesc
to get voices frompublic void addVoice(BaseVoice voice)
voice
- the voice to addremoveVoice(com.sun.speech.engine.synthesis.BaseVoice)
public void removeVoice(BaseVoice voice)
voice
- the voice to removeaddVoice(com.sun.speech.engine.synthesis.BaseVoice)
public BaseVoice getVoiceById(java.lang.String id)
id
- the voice idnull
BaseVoice.getId()
public java.lang.String getVoiceId(Voice voice, int variant)
voice
- the voicevariant
- the voice variantpublic java.lang.String getVoiceId(java.lang.String name, int gender, int age, int variant)


| Modifier and Type | Field and Description |
|---|---|
private java.util.ArrayList<E> |
stackData
Inner data of stack.
|
| Constructor and Description |
|---|
Stack()
This constructor is used when there's no source stack.
|
Stack(java.util.Collection<? extends E> source)
Creates new stack and adds all items from source collection
|
Stack(Stack<E> source)
Creates new stack.
|
| Modifier and Type | Method and Description |
|---|---|
void |
clear()
Clears all items of queue.
|
E |
last()
Works like
LIFOQueue.pop() , but this method returns last element without removing it. |
int |
length()
Used for getting size of stack.
|
E |
pop()
Implements
method from superclass . |
void |
push(E obj)
Implements
LIFOQueue.push(Object) method from superclass}. |
java.lang.String |
toString() |
private java.util.ArrayList<E> stackData
ArrayList
because of strange Java's error - you can't do this in classes:
E[] stackData = new E[];
Where E
is generic type.public Stack(Stack<E> source)
source
- stack to copy. Note: clones another stack's stackData
, not sets link!public Stack()
first constructor
you can see
if-not-null-then-do
expression.public Stack(java.util.Collection<? extends E> source)
source
- collection with source items.public void push(E obj)
LIFOQueue.push(Object)
method from superclass}. This method is synchronized because JavaFX
creates many threads, and I don't need exceptions caused by stacks.public E pop()
method from superclass
. This method is synchronized because JavaFX
creates many threads, and I don't need exceptions caused by stacks.
Note: if stack is empty - returns null, not exception.
public void clear()
for ( ; stack.length() > 0; stack.pop());
more compact. Now, it will be
stack.clear();
public int length()
public java.lang.String toString()
toString
in class java.lang.Object
public E last()
LIFOQueue.pop()
, but this method returns last element without removing it.


Get In Touch
{% if message_name %}
I received your email and will contact you shortly.
{% endif %}
Thanks, {{message_name}}!
I received your email and will contact you shortly.


Trevor Demille
Artist & Physicist
I'm currently pursuing a Ph.D in Aerospace/Mechanical Engineering at the University of Notre Dame with an ultimate goal of working in the space industry. My doctoral work is in Plasmonics and Nanofabrication. My primary interests include fine arts, science & mathematics, and linguistics. The gallery below features some selected work - for more art, visit my instagram page!


Search
By Certificate Number
The fastest way to locate a vital record is by using the certificate number. Note that certificate numbering restarts at 0000001 annually for each borough and you must limit by borough and year to retrieve a unique record.
Finding Certificate Numbers
Indexes of the birth, death, and marriage records contain certificate numbers, and can be searched on:
- Ancestry
- German Genealogy Group
- Italian Genealogical Group
- Internet Archive (marriage licenses only)
By Name beta
Searching by name is in beta mode, and may not produce accurate results. Because marriage licenses are not yet indexed by name, marriage licenses will not be returned in name search results.
The searchable index used on this site was created by the Long Island Genealogy Federation by transcribing original hard-copy indexes (which may have been inaccurately transcribed from original certificates). Future phases of the Historical Vital Records of NYC project may include opportunities for crowd-sourcing to improve and correct the index.
Search tips:
- Certificate numbering restarts at 0000001 for each borough*
- Try alternate name spellings if necessary
- The year on the certificate represents the date the document was filed with the City agency, not necessarily the year of the birth, death, or marriage event
- Use the mother’s maiden name to narrow searches for birth certificates Note: approximately 25% of all births before 1909 were not reported to the Health Department so there will not be a record on file
- Marriage certificates and licenses are indexed by the bride’s maiden name not married name
- The date of birth or age at time of death is useful in identifying the correct individual
* One exception: Manhattan records were continuously numbered from 1881-1887


View the source differences on GitHub
package.json
(duh...)nwayo update
In bundle files, add a not dead
entry below the > .25%
for to babel
and autoprefixer
entries.
Example:
babel: # https://browserl.ist/?q=%3E+.25%25%2C+not+dead
- '> .25%'
- 'not dead'
vendor
directory in your nwayo root folderOpen your old bower.json
and change your new vendor/package.json
to transfer all packages.
Here's a conversion guide for packages that are used or recommended by nwayo.
| Bower | npm | Notes |
|---|---|---|
| foundation-sites | foundation-sites | identical |
| what-input | has to be included explicitly now | |
| imagesloaded | imagesloaded | identical |
| jquery | jquery | identical |
| jsrender | jsrender | identical |
| kafe | @absolunet/kafe | only name change |
| motion-ui | motion-ui | identical |
| nwayo-toolbox | @absolunet/nwayo-toolbox | only name change |
| pinki | @absolunet/pinki | only name change |
| Bower | npm | Notes |
|---|---|---|
| accounting.js | accounting | only name change |
| cssuseragent | cssuseragent | identical |
| easy-markerwithlabel | @google/markerwithlabel | minimum version at 1.2.1 |
| ez-plus | ez-plus | maximum version at 1.2.1 |
| fitvids | none | no direct replacement |
| gsap | gsap | identical |
| hello | hellojs | only name change |
| inputmask | inputmask | identical |
| inputmask.phone | has to be included explicitly now | |
| isotope-layout | isotope-layout | identical |
| jcarousellite | jcarousellite | minimum version at 1.9.1 |
| jquery-ajax-unobtrusive | jquery-ajax-unobtrusive | identical |
| jquery-colorbox | jquery-colorbox | identical |
| jquery-deparam | jquery-deparam | identical |
| jquery-hashchange | bahashchange | only name change |
| jquery-powertip | jquery-powertip | identical |
| jquery-ui | jquery-ui | identical |
| jquery-validation | jquery-validation | identical |
| jquery-validation-unobtrusive | jquery-validation-unobtrusive | identical |
| jquery.bbq | jquery-bbq | version fixed at 1.0.0 |
| jquery.scrollTo | jquery.scrollto | only name change |
| js-cookie | js-cookie | identical |
| jScrollPane | jscrollpane | only name change |
| json2 | none | useless now |
| markerclustererplus | @google/markerclustererplus | minimum version at 2.1.9 |
| masonry-layout | masonry-layout | identical |
| moment | moment | identical |
| select2 | select2 | identical |
| slick-carousel | slick-carousel | identical |
| svg-injector | svg-injector | identical |
| video.js | video.js | identical |
| webfontloader | webfontloader | identical |
If your package isn't here try to find it on npm.
If there's is a version problem that you can't fix or that your package isn't on npm, there's a last resort solution to copy the bower_components sources into a nwayo component and reference this code instead.
npm install
in the vendor
folder to fetch all packagesbower_components
for vendor/node_modules
(this should do the trick for the majority of the inclusions)allowBabel
for kafe
, nwayo-toolbox
, pinki
with one catch-all vendor/node_modules/@absolunet
nwayo rebuild
to assure that everything works wellnwayo doctor
to assure that you have the latest versions of the packages.gitignore
.eslintignore
.stylelintignore
bower.json
bower_components
(whole directory)


--- layout: example categories: example/v1.0.0 version: v1.0.0 title: Marker tooltips outside the map description: Display tooltip content from a container outside of a map. tags: - markers ---


| DOSE: |
repeated |
insufflated |
Ketamine |
(powder / crystals) |
| |
250 mg |
insufflated |
Ketamine |
(powder / crystals) |
It was coming to the end of a long day. Before this day I had only used Ketamine a total of four times. Each rather low doses, producing euphoric feelings, and a bit of detachment from my body. These experiences were all very pleasant, and so I purchased quite a small amount (0.5g) to do a bit of experimentation. The night before I used around 0.05g, once again for the euphoric effects, but this day I was going to change things. There are quite a few bits and pieces that I simply cannot explain in words, and there are other pieces that have disappeared from my memory, but I wrote this account as best as I could.
When using Ketamine, I use small lines, as it allows me to take very specific doses. Throughout the day I used 0.2g, this kept me feeling amazing all day, with some difficulty walking, and a tendency to speak my thoughts aloud. However, by the time it reached 10pm, I was feeling quite sober (albeit very happy), and I still had 0.25g left.
I started by taking one small line, which left me feeling nice, but wanting more. So right after it, I did another. Quickly I began to feel dizzy, and my typing skill started to deteriorate, but before I knew it I had done another two small lines. Eventually I gave in and simply snorted the rest of what was left, until the wrap was left empty and bare.
Within a minute or two it hit me hard, and I was really struggling to continue my conversations on MSN. I quickly closed my browser, and began to focus all my energy on trying to keep up meaningful conversations, as I could feel myself falling, and I knew the 'K Hole' awaited me. Soon my typing started to turn to gibberish, and I knew I would simply be bugging my friends if I continued to try and type, so I said goodbye and signed off. I could feel the music I was listening to wash over me in waves, it was an extremely pleasurable experience, but I was beginning to get scared, I had never felt this detached from my body before. 'What if I'm dying?' I asked myself, and suddenly I felt extremely empty and terrified of what might happen. I knew I had to stop my music, so I quickly closed my music player, and switched off my computer. I then proceeded to head to bed so that I could lay down for a while.
After the struggle to reach my bed, in which I nearly fell over a few times, I felt a little calmer. Most of my body felt numb now, and I could only feel any of it if I moved. I signed back onto MSN with my mobile, as I felt like I might be able to communicate easier while laying down, but this was a mistake. I continued to say really random and strange things to my friends, as I would tell them what I was experiencing, so they got worried, and I decided it was best to sign off again. I could feel my body being absorbed, I was being dragged down into some form of abyss, I tried to struggle but eventually I gave in and let myself go.
Once I was in the 'K Hole', everything lost its meaning. I was no longer a person, just an entity, and everything I saw was meaningless. Everything started to fade to black, and I knew then that I was dying. I didn't want to die, I suddenly regretted taking a bigger dose than normal, as I thought I would never see my friends or family again, and this was the end. There was a sort of click and suddenly I could see the room again, it was lit with a strangely surreal white glow. I was experiencing every emotion at once, from pure happiness to extreme pain and terror. The strange thing was, the overall feeling was simply amazing, and even the bad feelings served only to make it better. I started to hear a subtle voice, it kept muttering things, things I couldn't make out, but then I realised what it was trying to say, 'This is heaven.'
 I was experiencing everything and nothing at the same time. Soon the glow started to shift, and I began to look up at the ceiling, where the glow still remained. I had an intense feeling that this remaining glow was 'God', only it was no human, and it was no single entity, it was almost like 'God' was an expression or feeling rather than a person. This part of my experience is the hardest to explain, but I felt as if I was being purified by this 'God'. Suddenly I was on MSN again, reliving the conversation I had a few minutes ago, and once again signing off. I felt the experience of heaven once more, and then everything slowly but surely faded to black.
The final part of my experience was just a total utter darkness, it felt as though time had stopped completely, or rather, as if I'd left time behind, and travelled outside of everything for a while. This continued for what seemed like forever, until even this darkness faded out. I then woke up the next morning feeling extremely light-headed and happy, like I would after smoking a couple of joints, only minus the paranoia and confusion.
In conclusion, all I can say is that this was the most profound and interesting experience of my entire life, and I believe Ketamine is a very valuable research chemical, both scientifically and spiritually. I truly experienced infinity that night, and I would be very happy to relive the same experience, despite the terror I went through initially.
Experience Reports are the writings and opinions of the individual authors who submit them.
Some of the activities described are dangerous and/or illegal and none are recommended by Erowid.


CoreASM Eclipse Update Site
This site provides the current version of the CoreASM Eclipse Plugin.
This version of the CoreASM Eclipse Plugin has been developed and tested under
- Ubuntu Linux 64bit v13.10 &
- Windows 7 and 8.1
with
- Kepler Service Release 2 64 bit
- Oracle Java SE JDK 6u45
The Plugin can be installed either from the Eclipse Marketplace or by perfoming the following steps:
- Open the "Help"-menu inside Eclipse
- Select the menu item "Install New Software..."
- Paste the url of this site http://webcoreasm.informatik.uni-ulm.de/coreasm-repository into the field "work with" and press ENTER
- Next press "Select All"- and afterwards "Next"-button
- Confirm the selection of the "CoreASM Eclipse Plugin" for installation by pressing the "Next"-button
- Accept the license and start the installation by pressing the "Finish"-button
- When the warning appears that you are installing unsigned content, you have to press the "Okay"-button to continue
- Last, you have to restart Eclipse so that the "CoreASM Eclipse Plugin" becomes available to you
If you like, you can build CoreASM by your own using the sources on github.
The sources are available at github.com.
We hope you will enjoy working with CoreASM for Eclipse -
Sincerely Your CoreASM Team


9.1. Priority queues (WORK IN PROGRESS)¶
9.1.1. Priority queues¶
So far we have seen two ADTs that represent a collection of objects, and support adding and removing objects:
Stacks, where the object removed is always the one most recently inserted (LIFO).
Queues, where the object removed is always the one first inserted (FIFO).
There are many situations, both in real life and in computing applications, where we wish to choose the next “most important” from a collection of people, tasks, or objects. For example, doctors in a hospital emergency room often choose to see next the “most critical” patient rather than the one who arrived first. When scheduling programs for execution in a multitasking operating system, at any given moment there might be several programs (usually called jobs) ready to run. The next job selected is the one with the highest priority. Priority is indicated by a particular value associated with the job (and might change while the job remains in the wait list).
When a collection of objects is organized by importance or priority, we call this a priority queue. A priority queue supports the following operations:
adding a new object to the priority queue
removing the smallest object from the priority queue.
In this chapter, we will see how to implement a priority queue so that both adding and removing the minimum take \(O(\log n)\) time.
interface PriorityQueue(E) extends Collection(E)
add(x:E) // Adds x to the priority queue.
removeMin() : E // Removes the minimum element, and returns it.
getMin() : E // Returns the minimum element, without removing it.
// Note: iterator() can yield the elements in any order, but the minimum element should come first.
// Note: This is an interface, while java.util.PriorityQueue is a class
// implementing the Queue interface (so different method names)!
interface PriorityQueue<E> extends Collection<E> {
void add(E x); // Adds x to the priority queue.
E removeMin(); // Removes the minimum element, and returns it.
E getMin(); // Returns the minimum element, without removing it.
// Note: iterator() can yield the elements in any order, but the minimum element should come first.
}
class PriorityQueue(Collection):
def add(self, x): """Adds x to the priority queue."""
def removeMin(self): """Removes the minimum element, and returns it."""
def getMin(self): """Returns the minimum element, without removing it."""
# Note: __iter__() can yield the elements in any order, but the minimum element should come first.
Todo
Add max priority queues, and the version with an explicit priority (and/or comparator?)
Now let’s look at a couple of applications of priority queues.
9.1.2. Sorting¶
We can use a priority queue to make an efficient sorting algorithm. To sort a list of items:
First create an empty priority queue, and add all the items to it.
Then repeatedly find and remove the smallest item. The items will come out in ascending order.
Here is an implementation of this algorithm in code:
pqsort(array: T[]): T[]
pq = MinHeap()
// MinHeap is a class that implements the
// priority queue ADT; we will see how it works
// in the next section.
for item in array
pq.add(item)
result = new array of length "array.length"
for i in 0..result.length-1
result[i] = pq.removeMin()
return result
static <T extends Comparable<T>> T[] pqsort(T[] array) {
PriorityQueue<T> pq = new MinHeap<T>();
// MinHeap is a class that implements the
// priority queue ADT; we will see how it works
// in the next section.
for (T item: array)
pq.add(item);
T[] result = new T[array.length];
for (int i = 0; i < result.length; i++)
result[i] = pq.removeMin();
return result;
}
def pqsort(array):
pq = MinHeap()
# MinHeap is a class that implements the
# priority queue ADT; we will see how it works
# in the next section.
for item in array:
pq.add(item)
result = []
while not pq.isEmpty():
result.add(pq.removeMin())
return result
What is the time complexity of this algorithm? Well, for an input list
of size \(n\), the algorithm calls add
\(n\) times and
removeMin
\(n\) times. In a binary heap, add
and
removeMin
both take \(O(\log n)\) time. Therefore, the total
runtime is \(O(n \log n)\) – as efficient as any of the sorting
algorithms we have seen so far!
9.1.3. Finding the top 100 items¶
Suppose that we are running a bank. Every day, every transaction that occurs at the bank is recorded in a list. When the bank closes at the end of the day, we would like to find the 100 highest-valued transactions from that day. How can we do it?
One way is to use sorting. If we store the transactions in an array and sort it by value, then the highest-value transactions will be at the end of the array. If there are n transactions in total, then transactions number \(n-100\ldots n-1\) are the ones we need. If we use an efficient sorting algorithm, this will take \(O(n \log n)\) time. (More generally, this gives us an algorithm for finding the largest \(k\) items in a list of \(n\) items, in \(O(n \log n)\) time.)
Now suppose that we want to monitor the transactions throughout the day. At any point, we want to be able to find the 100 highest-valued transactions so far today. How can we do this?
We could still use the sorting approach, but we would need to sort the list of transactions every time we wanted to find the 100 top transactions. This may be prohibitively expensive if there are a lot of transactions: it takes \(O(n \log n)\) time every time we do it.
We can do better with the help of a priority queue. The idea is to have a priority queue that holds the 100 highest-value transactions only. Whenever a new transaction comes in, we need to update the priority queue accordingly:
If the priority queue has fewer than 100 transactions (i.e. there have been fewer than 100 transactions so far today), then add the new transaction to the priority queue.
Otherwise, if the new transaction is greater in value than the lowest-valued of the top 100 transactions, then remove that transaction and add the new transaction.
Otherwise, don’t add the new transaction to the priority queue (it’s not in the top 100).
Notice that in step 2, we are comparing the new transaction to the
lowest-valued of the top 100 transactions – if the transactions
are ordered by value, then this transaction can be found by calling
getMin
, and removed using removeMin
. So this algorithm can
be implemented efficiently using a priority queue.
In fact, we can simplify these three steps into two steps. First, we add the new transaction to the priority queue. This might make the priority queue grow to 101 transactions. If so, we remove the lowest-valued transaction. Here it is in code:
class Top100Transactions
// Assume that the Transaction class implements comparisons
// by comparing the value of the transaction.
private PriorityQueue(Transaction) pq = new MinHeap()
// Add a new transaction to the priority queue.
public add(transaction: Transaction):
pq.add(transaction)
// If the priority queue grows to 101 transactions,
// cut it down to 100 by removing the smallest-valued one.
if pq.size() > 100
pq.removeMin()
// Return the top 100 transactions.
top100(): Iterator(Transaction)
return pq.iterator()
class Top100Transactions {
// Assume that the Transaction class implements Comparable
// by comparing the value of the transaction.
private PriorityQueue<Transaction> pq = new MinHeap<>();
// Add a new transaction to the priority queue.
public void add(Transaction transaction) {
pq.add(transaction);
// If the priority queue grows to 101 transactions,
// cut it down to 100 by removing the smallest-valued one.
if (pq.size() > 100)
pq.removeMin();
}
// Return the top 100 transactions.
public Iterator<Transaction> top100() {
return pq.iterator();
}
}
class Top100Transactions:
# Assume that the Transaction class implements comparisons
# by comparing the value of the transaction.
def __init__(self):
self.pq = MinHeap()
# Add a new transaction to the priority queue.
def add(transaction):
pq.add(transaction)
# If the priority queue grows to 101 transactions,
# cut it down to 100 by removing the smallest-valued one.
if pq.size() > 100:
pq.removeMin()
# Return the top 100 transactions.
def top100():
return pq.iterator()
What is the complexity of add
? Well, in fact it takes constant
time, because the priority queue has a constant maximum size of 100
elements. If we generalize this problem to keeping track of the top
\(k\) transactions, then the complexity of add
is
\(O(\log k)\).


| Util | Util |
| Logging | Implemenation of different loggers. |
| MaybeChanged | MaybeChanged monad represents a value that might change during a computation. |
| ScaledMonomials | Provides default implementation of a scaled monomial. |
| Var | Provides default implementations of variables. |
| Bound | Implementation of bounds, i.e., polynomials, exponential terms and max/min terms. |
| VarSet | Provides implemenation variable sets. |
| RenameMap | Module provides mapping from variables to other variables. |
| Valuation | Provides valuations which are functions mapping from variables to values. |
| Monomials | Provides default implementation of a monomial. |
| Polynomials | Provides default implementations of polynomials. |
| OurInt | Implementation of an integer-ring using Big_int. |
| PolyTypes | Provides all modules related to polynomials. |
| Atoms | Provides default implementations of atoms. |
| Formulas | Provides default implementations of formulas. |
| Constraints | Provides default implementations of constraints. |
| ConstraintTypes | Provides all modules related to constraints, i.e., atoms, constraints and formulas. |
| SMT | |
| TransitionLabel | |
| Program | |
| RVGTypes | |
| ProgramTypes | |
| LocalSizeBound | |
| GraphPrint | |
| Readers | Provides a unified interface of the parser and lexer for transition graphs. |
| ParserUtil | Provides implemenation of transition and program generation. |
| Parser | |
| Lexer | Provides an lexer generated with ocamllex to lex transition graphs, its constraints and polynomials. |
| SizeBounds | |
| SizeApproximation | |
| TransitionApproximation | |
| RankingFunction | |
| Approximation | |
| RankingBounds | |
| Bounds | |
| CostBounds | |
| TrivialTimeBounds | |
| TrivialSizeBounds | |
| NontrivialSizeBounds | |
| Preprocessor | |
| InvariantGeneration | |
| Chaining | |
| CutUnsatisfiableTransitions | |
| CutUnreachableLocations | |
| AnalyseCommand | |
| NormalizeCommand | |
| Main | |
| MainUtil | |
| SMTCommand | |
| PrfCommand | |
| SizeCommand | |
| ProofOutput | |
| LocalSizeBoundCommand |


CSS
Introduction
-
What is CSS?
Like HTML, CSS is not really a programming language. It is not a mark-up language either ! CSS is a stylesheet language.
- CSS stands for Cascading Style Sheets.
- It describes how HTML elements are to be displayed on screen, paper, or in other media.
-
Why use CSS?
CSS is used to define styles for your web pages, including the design, layout and variations in display for different devices and screen sizes.
HTML was created to describe the content of a web page. When tags like font, and color attributes were added to the HTML 3.2 specification, it started a nightmare for web developers. Development of large websites, where fonts and color information were added to every single page, became a long and expensive process.
To solve this problem, the World Wide Web Consortium (W3C) created CSS. CSS removed the style formatting from the HTML page!
Thus, CSS Saves a Lot of Work!
-
CSS Syntax
A CSS rule-set consists of a selector and a declaration block. The selector points to the HTML element you want to style. The declaration block contains one or more declarations separated by semicolons. Each declaration includes a CSS property name and a value, separated by a colon. A CSS declaration always ends with a semicolon, and declaration blocks are surrounded by curly braces.
p {
color: red;
text-align: center;
}In the above example,
p is a selector in CSS.
color is a property, and red is the property value.
text-align is a property, and center is the property value.
-
CSS Comments
Comments are used to explain the code, and may help when you edit the source code at a later date. Comments are ignored by browsers. A CSS comment starts with /* and ends with */
/*This is a single line comment*/
p {
color: red;
}
/*This is
a multi-line comment*/
h1 {
color:blue;
}
CSS Colors
-
Background Color
The background-color property sets the background color of an element. The background of an element is the total size of the element, including padding and border (but not the margin).
Different property values that can be used for background-color are :
- color
- transparent
- initial
- inherit
Note: Use a background color that makes the text easy to read.
-
Text Color
The color property is used to set the color of the text. The default text color for a page is defined in the body selector.
h1 {
/*Background Color*/
background-color: black;
/*Text Color*/
color: white;
}
-
Border Color
The border-color property sets the color of an element's four borders. An element must have borders before you can change the color. This property can have one to four values.
/*Top, right, bottom and left borders are set to coral*/
div {
border-color: coral;
}
/*top,bottom borders are set to blue & right,left borders are set to black*/
h3 {
border-color: blue black;
}
-
Color Values
Colors in CSS can be specified by the following methods:
- Hexadecimal colors: A hexadecimal color is specified with: #RRGGBB, where the RR (red), GG (green) and BB (blue) hexadecimal integers specify the components of the color.
- RGB colors: An RGB color value is specified with the rgb() function. Each parameter (red, green, and blue) defines the intensity of the color and can be an integer between 0 and 255 or a percentage value (from 0% to 100%).
- RGBA colors: RGBA color values are an extension of RGB color values with an alpha channel, which specifies the opacity of the object. The alpha parameter is a number between 0.0 (fully transparent) and 1.0 (fully opaque).
- HSL colors: HSL stands for hue, saturation, and lightness and represents a cylindrical-coordinate representation of colors. Hue is a degree on the color wheel (from 0 to 360) - 0 (or 360) is red, 120 is green, 240 is blue. Saturation is a percentage value; 0% means a shade of gray and 100% is the full color. Lightness is also a percentage; 0% is black, 100% is white.
- HSLA colors: HSLA color values are an extension of HSL color values with an alpha channel - which specifies the opacity of the object.
- Predefined color names: 140 color names are predefined in the HTML and CSS color specification. A list of all predefined names can be found here.
CSS Backgrounds
-
Background color
The background-color property sets the background color of an element. The background of an element is the total size of the element, including padding and border (but not the margin).
Note: Use a background color that makes the text easy to read.
-
Background image
The background-image property specifies an image to use as the background of an element. By default, the image is repeated so it covers the entire element.
body {
background-image: url("paper.jpg");
}
-
Background repeat
By default, the background-image property repeats an image both horizontally and vertically. Some images should be repeated only horizontally or vertically, or they will look strange.
- To repeat an image vertically, set "background-repeat: repeat-y;"
- To repeat an image horizontally, set "background-repeat: repeat-x;"
-
Opacity
The opacity property specifies the opacity/transparency of an element. It can take a value from 0.0 - 1.0. Lower the value, higher the transparency.
CSS Borders
-
Border Color
The CSS border properties allow you to specify the style, width, and color of an element's border.
The border-color property sets the color of an element's four borders. An element must have borders before you can change the color. This property can have one to four values.
/*Top, right, bottom and left borders are set to yellow*/
div {
border-color: yellow;
}
/*top border is set to blue, right,left borders to green & bottom border to red*/
h3 {
border-color: blue green red;
}
-
Border Style
The border-style property specifies what kind of border to display. It can have one to four values (for the top border, right border, bottom border, and the left border). The values can be dotted, dashed, solid, double, groove, ridge, inset, outset, none and hidden.
Note: None of the other CSS border properties will have ANY effect unless the border-style property is set!
-
Rounded Borders
The border-radius property is used to add rounded borders to an element:
p {
border: 2px solid black;
border-radius:6px;
}
CSS Text
-
Text Color
The color property is used to set the color of the text. The default text color for a page is defined in the body selector.
h1 {
color: white; /*Text Color*/
}
-
Text Decoration
The text-decoration property is used to set or remove decorations from text. The value "text-decoration: none;" is often used to remove underlines from links.
The other text-decoration values that are used to decorate text are:
- overline
- line-through
- underline
Note: It is not recommended to underline text that is not a link, as this often confuses the reader.
-
Text Transformation
The text-transform property is used to specify uppercase and lowercase letters in a text. It can be used to turn everything into uppercase or lowercase letters, or capitalize the first letter of each word
p.uppercase {
text-transform: uppercase;
} -
Letter Spacing
The letter-spacing property is used to specify the space between the characters in a text.
-
Line Height
The line-height property is used to specify the space between lines.
p.big {
line-height: 1.8;
}
CSS Fonts
-
Font Family
In CSS, there are two types of font family names:
- Generic family :- A group of font families with a similar look.
- Font family :- A specific font family
The font family of a text is set with the font-family property.It should hold several font names as a "fallback" system. If the browser does not support the first font, it tries the next font, and so on.
Note: If the name of a font family is more than one word, it must be in quotation marks, like "Times New Roman".
-
Font Weight
The font-weight property sets how thick or thin characters in text should be displayed. It specifies the weight of a font.
The possible property values are:
- normal
- bold
- initial
- inherit
- 100-900 (Defines from thin to thick characters)
-
Font Style
The font-style property is mostly used to specify italic text. The three property values are normal, italic and oblique (Here, the text is leaning).
h3 {
font-style: italic;
} -
Font Size
The font-size property sets the size of the text. Being able to manage the text size is important in web design. However, you should not use font size adjustments to make paragraphs look like headings, or headings look like paragraphs. The font-size can be an absolute, or relative value.
- Setting the text size with pixels gives you full control over the text size.
- To allow users to resize the text (in the browser menu), many developers use em instead of pixels. 1em is equal to the current font size. The default text size in browsers is 16px. So, the default size of 1em is 16px.
- The solution that works in all browsers is to use a combination of percent and em, i.e., to set a default font-size in percent for the body element.
h1 {
font-size: 10vw; /*1vw = 1% of viewport width*/
}
References:
All the documentation on this page is taken from here.


The Action Sheet is a dialog that displays a set of options. It appears on top of the app’s content, and must be manually dismissed by the user before they can resume interaction with the app. There are multiple ways to dismiss the action sheet, including tapping the backdrop or hitting the escape key.


--- layout: post title: Debugging localhost with Rubymine excerpt: I had a problem with Setting Rubymine to debug localhost having subdomain categories: - Rubymine tags: - [Rubymine, Rails] ---
I had to spend one day to find out how to test localhost having subdomain when I use Rubymine IDE. Rubymine is great tool but there is no way to setup subdomain in Run configuration.
So I had to change my MBP's hosts file; /etc/hosts
<IP_ADDRESS> localhost <IP_ADDRESS> audi.myadbox.dev