Hiera 1: Complete Example
In this example, we’ll use the popular Puppet Labs ntp module, an exemplar of the package/file/service pattern in common use among Puppet users. We’ll start simply, using Hiera to provide the ntp module with parameter data based on particular nodes in our organization. Then we’ll use Hiera to assign the ntp
class provided by the module to specific nodes.
What Can We Do With Hiera?
Let’s get started by looking at the ntp module. It does all of its work in a single ntp
class, which lives in the init.pp
manifest. The ntp
class also evaluates some ERB templates stored in the module’s template directory. So, what can we do with Hiera?
Express Organizational Information
The ntp
class takes five parameters:
- servers
- restrict
- autoupdate
- enable
- template
Most of these parameters reflect decisions we have to make about each of the nodes to which we’d apply the ntp
class: Can it act as a time server for other hosts? (restrict
), which servers should it consult? (servers
), or should we allow Puppet to automatically update the ntp package or not? (autoupdate
).
Without Hiera, we might find ourselves adding organizational data to our module code as default parameter values, reducing how shareable it is. We might find ourselves repeating configuration data in our site manifests to cover minor differences in configuration between nodes.
With Hiera, we can move these decisions into a hierarchy built around the facts that drive these decisions, increase sharability, and repeat ourselves less.
Classify Nodes With Hiera
We can also use Hiera to assign classes to nodes using the hiera_include function, adding a single line to our site.pp
manifest, then assigning classes to nodes within Hiera instead of within our site manifests. This can be a useful shortcut when we’re explicitly assigning classes to specific nodes within Hiera, but it becomes very powerful when we implicitly assign classes based on a node’s characteristics. In other words, we’ll show you how you don’t need to know the name of very VMWare guest in your organization to make sure they all have a current version of VMWare Tools installed.
Describing Our Environment
For purposes of this walkthrough, we’ll assume a situation that looks something like this:
- We have two ntp servers in the organization that are allowed to talk to outside time servers. Other ntp servers get their time data from these two servers.
- One of our primary ntp servers is very cautiously configured — we can’t afford outages, so it’s not allowed to automatically update its ntp server package without testing. The other server is more permissively configured.
- We have a number of other ntp servers that will use our two primary servers.
- We have a number of VMWare guest operating systems that need to have VMWare Tools installed.
Our Environment Before Hiera
How did things look before we decided to use Hiera? Classes are assigned to nodes via the puppet site manifest (/etc/puppet/manifests/sites.pp
for Puppet open source), so here’s how our site manifest might have looked:
node "kermit.example.com" {
class { "ntp":
servers => [ '0.us.pool.ntp.org iburst','1.us.pool.ntp.org iburst','2.us.pool.ntp.org iburst','3.us.pool.ntp.org iburst'],
autoupdate => false,
restrict => false,
enable => true,
}
}
node "grover.example.com" {
class { "ntp":
servers => [ 'kermit.example.com','0.us.pool.ntp.org iburst','1.us.pool.ntp.org iburst','2.us.pool.ntp.org iburst'],
autoupdate => true,
restrict => false,
enable => true,
}
}
node "snuffie.example.com", "bigbird.example.com", "hooper.example.com" {
class { "ntp":
servers => [ 'grover.example.com', 'kermit.example.com'],
autoupdate => true,
restrict => true,
enable => true,
}
}
Configuring Hiera and Setting Up the Hierarchy
All Hiera configuration begins with hiera.yaml
. You can read a full discussion of this file, including where you should put it depending on the version of Puppet you’re using. Here’s the one we’ll be using for this walkthrough:
---
:backends:
- json
:json:
:datadir: /etc/puppet/hiera
:hierarchy:
- "node/%{::fqdn}"
- common
Step-by-step:
:backends:
tells Hiera what kind of data sources it should process. In this case, we’ll be using JSON files.
:json:
configures the JSON data backend, telling Hiera to look in /etc/puppet/hiera
for JSON data sources.
:hierarchy:
configures the data sources Hiera should consult. Puppet users commonly separate their hierarchies into directories to make it easier to get a quick top-level sense of how the hierarchy is put together. In this case, we’re keeping it simple:
- A single
node/
directory will contain any number of files named after some node’sfqdn
(fully qualified domain name) fact. (E.g./etc/puppet/hiera/node/grover.example.com.json
) This lets us specifically configure any given node with Hiera. Not every node needs to have a file innode/
— if it’s not there, Hiera will just move onto the next hierarchy level. - Next, the
common
data source (the/etc/puppet/hiera/common.json
file) will provide any common or default values we want to use when Hiera can’t find a match for a given key elsewhere in our hierarchy. In this case, we’re going to use it to set common ntp servers and default configuration options for the ntp module.
Hierarchy and facts note: When constructing a hierarchy, keep in mind that most of the useful Puppet variables are facts. Since facts are submitted by the agent node itself, they aren’t necessarily trustworthy. We don’t recommend using facts as the sole deciding factor for distributing sensitive credentials.
In this example, we’re using the
fqdn
fact to identify specific nodes; the specialclientcert
variable is another option, which the agent sets to the value of itscertname
setting. (This is usually the same as the fqdn, but not always.) Right now, Puppet doesn’t provide any variables with trusted data about a given node; we’re currently investigating the possibility of adding some.
Puppet master note: If you modify
hiera.yaml
between agent runs, you’ll have to restart your puppet master for your changes to take effect.
Configuring for the Command Line
The Hiera command line tool is useful when you’re in the process of designing and testing your hierarchy. You can use it to mock in
facts for Hiera to look up without having to go through cumbersome trial-and-error puppet runs. Since the hiera
command expects to find
hiera.yaml
at /etc/hiera.yaml
, you should set a symbolic link from your hiera.yaml
file to /etc/hiera.yaml
:
$ ln -s /etc/puppet/hiera.yaml /etc/hiera.yaml
Writing the Data Sources
Now that we’ve got Hiera configured, we’re ready to return to the ntp module and take a look at the ntp
class’s parameters.
Learning About Hiera Data Sources: This example won’t cover all the data types you might want to use, and we’re only using one of two built-in data backends (JSON). For a more complete look at data sources, please see our guide to writing Hiera data sources, which includes more complete examples written in JSON and YAML.
Identifying Parameters
We need to start by figuring out the parameters required by the ntp
class. So let’s look at the ntp module’s init.pp
manifest, where we see five:
- servers
- An array of time servers;
UNSET
by default. Conditional logic ininit.pp
provides a list of ntp servers maintained by the respective maintainers of our module’s supported operating systems. - restrict
- Whether to restrict ntp daemons from allowing others to use as a server;
true
by default - autoupdate
- Whether to update the ntp package automatically or not;
false
by default - enable
- Whether to start the ntp daemon on boot;
true
by default - template
- The name of the template to use to configure the ntp service. This is
undef
by default, and it’s configured within theinit.pp
manifest with some conditional logic.
Making Decisions and Expressing Them in Hiera
Now that we know the parameters the ntp
class expects, we can start making decisions about the nodes on our system, then expressing those decisions as Hiera data. Let’s start with kermit and grover: The two nodes in our organization that we allow to talk to the outside world for purposes of timekeeping.
kermit.example.com.json
We want one of these two nodes, kermit.example.com
, to act as the primary organizational time server. We want it to consult outside time servers, we won’t want it to update its ntp server package by default, and we definitely want it to launch the ntp service at boot. So let’s write that out in JSON, making sure to express our variables as part of the ntp
namespace to insure Hiera will pick them up as part of its automatic parameter lookup.
{
"ntp::restrict" : false,
"ntp::autoupdate" : false,
"ntp::enable" : true,
"ntp::servers" : [
"0.us.pool.ntp.org iburst",
"1.us.pool.ntp.org iburst",
"2.us.pool.ntp.org iburst",
"3.us.pool.ntp.org iburst"
]
}
Since we want to provide this data for a specific node, and since we’re using the fqdn
fact to identify unique nodes in our hierarchy, we need to save this data in the /etc/puppet/hiera/node
directory as kermit.example.com.json
.
Once you’ve saved that, let’s do a quick test using the Hiera command line tool:
$ hiera ntp::servers ::fqdn=kermit.example.com
You should see this:
["0.us.pool.ntp.org iburst", "1.us.pool.ntp.org iburst", "2.us.pool.ntp.org iburst", "3.us.pool.ntp.org iburst"]
That’s just the array of outside ntp servers and options, which we expressed as a JSON array and which Hiera is converting to a Puppet-like array. The module will use this array when it generates configuration files from its templates.
Something Went Wrong? If, instead, you get
nil
,false
, or something else completely, you should step back through your Hiera configuration making sure:
- Your
hiera.yaml
file matches the example we provided- You’ve put a symlink to
hiera.yaml
where the command line tool expects to find it (/etc/hiera.yaml
)- You’ve saved your
kermit.example.com
data source file with a.json
extension- Your data source file’s JSON is well formed. Missing or extraneous commas will cause the JSON parser to fail
- You restarted your puppet master if you modified
hiera.yaml
Provided everything works and you get back that array of ntp servers, you’re ready to configure another node.
grover.example.com.json
Our next ntp node, grover.example.com
, is a little less critical to our infrastructure than kermit, so we can be a little more permissive with its configuration: It’s o.k. if grover’s ntp packages are automatically updated. We also want grover to use kermit as its primary ntp server. Let’s express that as JSON:
{
"ntp::restrict" : false,
"ntp::autoupdate" : true,
"ntp::enable" : true,
"ntp::servers" : [
"kermit.example.com iburst",
"0.us.pool.ntp.org iburst",
"1.us.pool.ntp.org iburst",
"2.us.pool.ntp.org iburst",
]
}
As with kermit.example.com
, we want to save grover’s Hiera data source in the /etc/puppet/hiera/nodes
directory using the fqdn
fact for the file name: grover.example.com.json
. We can once again test it with the hiera command line tool:
$ hiera ntp::servers ::fqdn=grover.example.com
["kermit.example.com iburst", "0.us.pool.ntp.org iburst", "1.us.pool.ntp.org iburst", "2.us.pool.ntp.org iburst"]
common.json
So, now we’ve configured the two nodes in our organization that we’ll allow to update from outside ntp servers. However, we still have a few nodes to account for that also provide ntp services. They depend on kermit and grover to get the correct time, and we don’t mind if they update themselves. Let’s write that out in JSON:
{
"ntp::restrict" : true,
"ntp::autoupdate" : true,
"ntp::enable" : true,
"ntp::servers" : [
"grover.example.com iburst",
"kermit.example.com iburst"
]
}
Unlike kermit and grover, for which we had slightly different but node-specific configuration needs, we’re comfortable letting any other node that uses the ntp class use this generic configuration data. Rather than creating a node-specific data source for every possible node on our network that might need to use the ntp module, we’ll store this data in /etc/puppet/hiera/common.json
. With our very simple hierarchy, which so far only looks for the fqdn
facts, any node with a fqdn
that doesn’t match the nodes we have data sources for will get the data found in common.json
. Let’s test against one of those nodes:
$ hiera ntp::servers ::fqdn=snuffie.example.com
["kermit.example.com iburst", "grover.example.com iburst"]
Modifying Our site.pp
Manifest
Now that everything has tested out from the command line, it’s time to get a little benefit from this work in production.
If you’ll remember back to our pre-Hiera configuration, we were declaring a number of parameters for the ntp
class in our site.pp
manifest, like this:
node "kermit.example.com" {
class { "ntp":
servers => [ '0.us.pool.ntp.org iburst','1.us.pool.ntp.org iburst','2.us.pool.ntp.org iburst','3.us.pool.ntp.org iburst'],
autoupdate => false,
restrict => false,
enable => true,
}
}
In fact, we had three separate stanzas of that length. But now that we’ve moved all of that parameter data into Hiera, we can significantly pare down site.pp
:
node "kermit.example.com", "grover.example.com", "snuffie.example.com" {
include ntp
# or:
# class { "ntp": }
}
That’s it.
Since Hiera is automatically providing the parameter data from the data sources in its hierarchy, we don’t need to do anything besides assign the ntp
class to the nodes and let Hiera’s parameter lookups do the rest. In the future, as we change or add nodes that need to use the ntp
class, we can:
- Quickly copy data source files to cover cases where a node needs a specialized configuration.
- If the new node can work with the generic configuration in
common.json
, we can sayinclude ntp
in oursite.pp
without writing any new Hiera data. - Since Hiera looks up each parameter individually, we can also write a new JSON file that, for example, only changes
ntp::autoupdate
— Hiera will get the rest of the parameters fromcommon.json
.
If you’re interested in taking things a step further, using the decision-making skills you picked up in this example to choose which nodes even get a particular class, let’s keep going.
Assigning a Class to a Node With Hiera
In the first part of our example, we were concerned with how to use Hiera to provide data to a parameterized class, but we were assigning the classes to nodes in the traditional Puppet way: By making class
declarations for each node in our site.pp
manifest. Thanks to the hiera_include
function, you can assign nodes to a class the same way you can assign values to class parameters: Picking a facter fact on which you want to base a decision, adding to the hierarchy in your hiera.yaml
file, then writing data sources.
Using hiera_include
Where last we left off, our site.pp
manifest was looking somewhat spare. With the hiera_include
function, we can pare things down even further by picking a key to use for classes (we recommend classes
), then declaring it in our site.pp
manifest:
hiera_include('classes')
From this point on, you can add or modify an existing Hiera data source to add an array of classes you’d like to assign to matching nodes. In the simplest case, we can visit each of kermit, grover, and snuffie and add this to their JSON data sources in /etc/puppet/hiera/node
:
"classes" : "ntp",
modifying kermit’s data source, for instance, to look like this:
{
"classes" : "ntp",
"ntp::restrict" : false,
"ntp::autoupdate" : false,
"ntp::enable" : true,
"ntp::servers" : [
"0.us.pool.ntp.org iburst",
"1.us.pool.ntp.org iburst",
"2.us.pool.ntp.org iburst",
"3.us.pool.ntp.org iburst"
]
}
hiera_include
requires either a string with a single class, or an array of classes to apply to a given node. Take a look at the “classes” array at the top of our kermit data source to see how we might add three classes to kermit:
{
"classes" : [
"ntp",
"apache",
"postfix"
],
"ntp::restrict" : false,
"ntp::autoupdate" : false,
"ntp::enable" : true,
"ntp::servers" : [
"0.us.pool.ntp.org iburst",
"1.us.pool.ntp.org iburst",
"2.us.pool.ntp.org iburst",
"3.us.pool.ntp.org iburst"
]
}
We can test which classes we’ve assigned to a given node with the Hiera command line tool:
$ hiera classes ::fqdn=kermit.example.com
["ntp", "apache", "postfix"]
Note: The
hiera_include
function will do an array merge lookup, which can let more specific data sources add to common sources instead of replacing them. This helps you avoid repeating yourself.
Using Facts to Drive Class Assignments
That demonstrates a very simple case for hiera_include
, where we knew that we wanted to assign a particular class to a specific host by name. But just as we used the fqdn
fact to choose which of our nodes received specific parameter values, we can use that or any other fact to drive class assignments. In other words, you can assign classes to nodes based on characteristics that aren’t as obvious as their names, creating the possibility of configuring nodes based on more complex characteristics.
Some organizations might choose to make sure all their Macs have Homebrew installed, or assign a postfix
class to nodes that have a mail server role expressed through a custom fact, or assign a vmware_tools
class that installs and configures VMWare Tools packages on every host that returns vmware
as the value for its virtual
fact.
In fact, let’s use that last case for this part of the walkthrough: Installing VMWare Tools on a virtual guest. There’s a puppet-vmwaretools module on the Puppet Forge that addresses just this need. It takes two parameters:
- version
- The version of VMWare Tools we want to install
- working_dir
- The directory into which we want to install VMWare
Two ways we might want to use Hiera to help us organize our use of the class this module provides include making sure it’s applied to all our VMWare virtual hosts, and configuring where it’s installed depending on the guest operating system for a given virtual host.
So let’s take a look at our hiera.yaml
file and make provisions for two new data sources. We’ll create one based on the virtual
fact, which will return vmware
when a node is a VMWare-based guest. We’ll create another based on the osfamily
fact, which returns the general family to which a node’s operating system belongs (e.g. “Debian” for Ubuntu and Debian systems, or “RedHat” for RHEL, CentOS, and Fedora systems):
---
:backends:
- json
:json:
:datadir: /etc/puppet/hieradata
:hierarchy:
- "node/%{::fqdn}"
- "virtual/%{::virtual}"
- "osfamily/%{osfamily}"
- common
Next, we’ll need to create directories for our two new data sources:
`mkdir /etc/puppet/hiera/virtual; mkdir /etc/puppet/hiera/osfamily`
In our virtual
directory, we’ll want to create the file vmware.json
. In this data source, we’ll be assigning the vmwaretools
class, so the file will need to look like this:
{
"classes": "vmwaretools"
}
Next, we need to provide the data for the vmwaretools
class parameters. We’ll assume we have a mix of Red Hat and Debian VMs in use in our organization, and that we want to install VMWare Tools in /opt/vmware
in our Red Hat VMs, and /usr/local/vmware
for our Debian VMs. We’ll need RedHat.json
and Debian.json
files in the /etc/puppet/hiera/osfamily
directory.
RedHat.json
should look like this:
{
"vmwaretools::working_dir" : "/opt/vmware"
}
Debian.json
should look like this:
{
"vmwaretools::working_dir" : "/usr/local/vmware"
}
That leaves us with one parameter we haven’t covered: the version
parameter. Since we don’t need to vary which version of VMWare Tools any of our VMs are using, we can put that in common.json
, which should now look like this:
{
"vmwaretools::version" : "8.6.5-621624",
"ntp::restrict" : true,
"ntp::autoupdate" : true,
"ntp::enable" : true,
"ntp::servers" : [
"grover.example.com iburst",
"kermit.example.com iburst"
]
}
Once you’ve got all that configured, go ahead and test with the Hiera command line tool:
$ hiera vmwaretools::working_dir osfamily=RedHat
/opt/vmware
$ hiera vmwaretools::working_dir osfamily=Debian
/usr/local/vmware
$ hiera vmwaretools::version
8.6.5-621624
$ hiera classes virtual=vmware
vmwaretools
If everything worked, great. If not, consult the checklist we provided earlier and give it another shot.
Exploring Hiera Further
We hope this walkthrough gave you a good feel for the things you can do with Hiera. There are a few things we didn’t touch on, though:
- We didn’t discuss how to use Hiera in module manifests, preferring to highlight its ability to provide data to parameterized classes. Hiera also provides a collection of functions that allow you to use Hiera within a module. Tread carefully here, though: Once you start requiring Hiera for your module to work at all, you’re reducing its shareability and potentially closing it off to some users.
- We showed how to conduct priority lookups with Hiera; that is, retrieving data from the hierarchy based on the first match for a given key. This is the only way to use Hiera with parameterized classes, but Hiera’s lookup functions include special hash and array lookups, allowing you to collect data from sources throughout your hierarchy, or to selectively override your hierarchy’s normal precedence. This allows you to declare, for instance, certain base values for all nodes, then layer on additional values for nodes that match differing keys, receiving all the data back as an array or hash.


3.2.9. How to Use Purpose-specific APIs¶
This section describes how to use purpose-specific APIs.
- To acquire input parameters and expected values for return values, etc. from an Excel file
- To execute the same test method with different test data
- To describe the data of multiple test cases on a single sheet
- To fix the system date and time to a value of your choice
- To test the numbering that uses sequence objects
- To configure user ID, request ID, etc. in ThreadContext
- To read an Excel file in any directory
- To perform common processing before and after executing a test.
- To use transactions other than the default
- To use this framework without inheriting its class
- To validate the properties of a class
- To enter whitespaces, line feeds and nulls in test data
- To write a blank row in test data
- To conduct a test by changing the master data
- To change the directory from which test data is read
- To add a routine conversion process for test data in the messaging process
<IP_ADDRESS>. To acquire input parameters and expected values for return values, etc. from an Excel file¶
It is possible to describe the arguments when you call a method of the class to be tested or return values of the method in an Excel file. The described data can be acquired in List-Map format (List<Map<String, String>> format).
- When acquiring data in this format, the data type LIST_MAP is used.
- LIST_MAP=<SETUP_TABLE[case_001]=EMPLOYEE_TABLE that is unique in the sheet (any string)
The second row of data is interpreted as a Map Key. After the third row of data is interpreted as a Map Value.
Data can be acquired from an Excel file in Map or List-Map format using the following methods: Specify sheet name in the first argument, and ID in the second argument.
TestSupport#getListMap(String sheetName, String id)
DbAccessTestSupport#getListMap(String sheetName, String id)
<IP_ADDRESS>.1. Example of test source code implementation¶
public class EmployeeComponentTest extends DbAccessTestSupport { // ＜Middle is omitted＞ public void testGetName() { // Acquire data from Excel file List<Map<String, String>> parameters = getListMap("testGetName", "parameters"); Map<String, String>> param = parameters.get(0); // Acquire arguments and expectations String empNo = parameter.get("empNo"); String expected = parameter.get("expected"); // Invoke a test method EmployeeComponent target = new EmployeeComponent(); String actual = target.getName(empNo); // Confirmation of results assertEquals(expected, actual); // ＜Rest is omitted＞ }
<IP_ADDRESS>.2. Example of Excel file description¶
LIST_MAP=parameters
| empNo | expected |
|---|---|
| CHAR(4) | Yamada Taro |
| Yamada Taro | Ichiro Suzuki |
The objects that can be acquired in the above table are equivalent to the list that can be fetched by the following code.
List<Map<String, String>> list = new ArrayList<Map<String, String>>(); Map<String, String> first = new HashMap<String, String>(); first.put("empNo","CHAR(4)"); first.put("expected", "Yamada Taro"); list.add(first); Map<String, String> second = new HashMap<String, String>(); second.put("empNo","Yamada Taro"); map.put("expected", "Suzuki Ichiro"); list.add(second);
<IP_ADDRESS>. To execute the same test method with different test data¶
If you want to execute the same test method with different test data, use a loop to run the test with the above-mentioned List-Map acquiring method. This allows you to increase the data variation simply by adding Excel data.
In the following example, multiple tests are executed using a single method using the above-mentioned List-Map format.
<IP_ADDRESS>.1. Example of test source code implementation¶
public class EmployeeComponentTest extends DbAccessTestSupport { // ＜Middle is omitted＞ public void testSelectByPk() { // Preparation data input setUpDb("testSelectByPk"); // Acquire data from Excel file List<Map<String, String>> parameters = getListMap("testGetName", "parameters"); for (Map<String, String> param : parameters) { // Acquire arguments and expectations String empNo = parameter.get("empNo"); String expectedDataId = parameter.get("expectedDataId"); // Invoke a test method EmployeeComponent target = new EmployeeComponent(); SqlResultSet actual = target.selectByPk(empNo); // Confirmation of results assertSqlResultSetEquals("testSelectByPk", expectedDataId, actual); } }
<IP_ADDRESS>.2. Example of Excel file description¶
// Data to loop
LIST_MAP=parameters
| empNo | expectedDataId |
|---|---|
| CHAR(4) | expected01 |
| Yamada Taro | expected02 |
// Database preparation data
SETUP_TABLE=EMPLOYEE
| NO | NAME |
|---|---|
| CHAR(4) | Yamada Taro |
| Yamada Taro | Ichiro Suzuki |
// Expected data 1
LIST_MAP=expected01
| NO | NAME |
|---|---|
| CHAR(4) | Yamada Taro |
// Expected data 2
LIST_MAP=expected02
| NO | NAME |
|---|---|
| CHAR(4) | Yamada Taro |
Important
To test the update process, call the setUpDb method in a loop. If this is not done, then the success or failure of the test would depend on the order of the data.
<IP_ADDRESS>. To describe the data of multiple test cases on a single sheet¶
If there are many test cases for a single test method to be tested, then there is a concern that writing one test case per sheet will increase the number of sheets, thereby decreasing maintainability.
Assigning information (Group SETUP_TABLE[case_001]=EMPLOYEE_TABLE) for grouping of table data allows the data of multiple test cases to be included on a single sheet.
The supported data type is as follows.
- EXPECTED_TABLE
- SETUP_TABLE
The format is as follows.
Data type[Group SETUP_TABLE[case_001]=EMPLOYEE_TABLE] = Table <Omitted>
For example, describe as follows when putting the data of two types of test cases (case_001, case_002) together.
In the test class, the argument Group ID is passed to the overload method with the same name as the above-mentioned API. This allows only the data of the specified Group ID to be processed.
<IP_ADDRESS>.1. Example of test source code implementation¶
// Registering data in DB (only the data with Group ID "case_001" will be registered) setUpDb("testUpdate", "case_001"); // Confirmation of results (only the data with Group ID "case_001" will be considered for assertion) assertTableEquals("Confirmation of database results", "testUpdate", "case_001");
<IP_ADDRESS>.2. Example of Excel file description¶
// Case 001: Change the department of employees.
SETUP_TABLE[case_001]=EMPLOYEE_TABLE
| ID | EMP_NAME | DEPT_CODE |
|---|---|---|
| // CHAR(5) | VARCHAR(64) | CHAR(4) |
| 00001 | Yamada Taro | 0001 |
| 00002 | Tanaka Ichiro | 0002 |
EXPECTED_TABLE[case_001]=EMPLOYEE_TABLE
| ID | EMP_NAME | DEPT_CODE | |
|---|---|---|---|
| // CHAR(5) | VARCHAR(64) | CHAR(4) | |
| 00001 | Yamada Taro | 0001 | |
| 00002 | Tanaka Ichiro | 0010 | //Update |
//Case 002: Change the name of employees.
SETUP_TABLE[case_002]=EMPLOYEE_TABLE
| ID | EMP_NAME | DEPT_CODE |
|---|---|---|
| // CHAR(5) | VARCHAR(64) | CHAR(4) |
| 00001 | Yamada Taro | 0001 |
| 00002 | Tanaka Ichiro | 0002 |
EXPECTED_TABLE[case_002]=EMPLOYEE_TABLE
| ID | EMP_NAME | DEPT_CODE | |
|---|---|---|---|
| // CHAR(5) | VARCHAR(64) | CHAR(4) | |
| 00001 | Satou Taro | 0001 | //Update |
| 00002 | Tanaka Ichiro | 0002 |
<IP_ADDRESS>.3. Note¶
When describing data with multiple Group IDs, the data should be described in groups based on the Group IDs, same as Describing data by grouping together based on data types when using multiple data types. If the data is not described in groups based on the Group IDs, then reading of the data is aborted in the middle and the test is not executed correctly.
<IP_ADDRESS>. To fix the system date and time to a value of your choice¶
In the case of items such as registration date and time, or update date and time, for which system date is set, it is not possible to check with an automated test that the set value is correct since the expected result changes depending on the date when the test is routinely executed. Therefore, this framework provides a function to configure a fixed value for the system date.By using this function, it is possible to check with an automated test that the set value is correct, even for items having system date set.
In the Nablarch Application Framework, the implementation class of the SystemTimeProvider interface provides the system date and time. By replacing this implementation class with a testing class that returns a fixed value, it is possible to return the system date and time of your choice.
<IP_ADDRESS>.1. Configuration file example¶
In the component configuration file, specify FixedSystemTimeProvider at the place where implementation class of the SystemTimeProvider interface is specified, and configure the date and time of your choice as its property. For example, configure as follows when the system date and time is September 14, 2010 12:34:56.
<component name="systemTimeProvider"
class="nablarch.test.FixedSystemTimeProvider">
<property name="fixedDate" value="20100913123456" />
</component>
| property name | Settings |
|---|---|
| fixedDate |
|
// Acquire system date and time
SystemTimeProvider provider = (SystemTimeProvider) SystemRepository.getObject("systemTimeProvider");
Date now = provider.getDate();
<IP_ADDRESS>. To test the numbering that uses sequence objects¶
When sequence objects are used for numbering values, it is not possible to set an expected value since the value that will be numbered next cannot be predicted in advance. Therefore, this framework provides a function to replace the numbering process that uses sequence objects, with table numbering, simply by a change in the configuration file. By using this function, it is possible to check that the numbering is done correctly.
The procedure is as follows:
(1) Set up preparation data in a table.(2) Set the expected values based on the values configured in the table.
Configuration example and use case are shown below.
<IP_ADDRESS>.1. Configuration file example¶
In this example, it is assumed that the sequence object numbering is defined in the configuration file for production, as follows:
<!-- Configuration of numbering that uses sequence objects --> <component name="idGenerator" class="nablarch.common.idgenerator.OracleSequenceIdGenerator"> <property name="idTable"> <map> <entry key="1101" value="SEQ_1"/> <!-- For ID1 numbering --> <entry key="1102" value="SEQ_2"/> <!-- For ID2 numbering --> <entry key="1103" value="SEQ_3"/> <!-- For ID3 numbering --> <entry key="1104" value="SEQ_4"/> <!-- For ID4 numbering --> </map> </property> </component>
In this case, in the configuration file for testing, the above configuration for production is overwritten by the configuration for table numbering.
<!-- Replace numbering configuration that uses sequence objects, with numbering configuration that uses tables --> <component name="idGenerator" class="nablarch.common.idgenerator.FastTableIdGenerator"> <property name="tableName" value="TEST_SBN_TBL"/> <property name="idColumnName" value="ID_COL"/> <property name="noColumnName" value="NO_COL"/> <property name="dbTransactionManager" ref="dbTransactionManager" / > </component>Tip
For more information about setting values for table numbering, see IdGenerator.
<IP_ADDRESS>.2. Example of Excel file description¶
We will explain based on an example when testing a numbering process where the ID to be numbered is 1101.
// Preparation data// Numbering tableSETUP_TABLE=TEST_SBN_TBL
ID_COL NO_COL 1101 100 Tip
Configure the preparation data in the table for numbering. In the preparation data, configure only those records with the ID to be numbered and are within testing scope.
// Expected value// Numbering tableEXPECTED_TABLE=TEST_SBN_TBL
ID_COL NO_COL 1101 101 // Expected value// Table in which the numbered values are registered (the numbered value is registered in USER_ID.)EXPECTED_TABLE=USER_INFO
USER_ID KANJI_NAME KANA_NAME<PHONE_NUMBER> Kanji name Kana name Tip
In this example, it is assumed that the numbering process is done only once in the test. Therefore, the expected value is “the value in the preparation data + 1”.
<IP_ADDRESS>. To configure user ID, request ID, etc. in ThreadContext¶
In the Nablarch Application Framework, user IDs and request IDs are usually configured in advance in ThreadContext. In the case of automated testing of database access classes, values are not configured in ThreadContext since the class to be tested is invoked directly from the test class without going through the framework.
You can configure the values in ThreadContext by describing the values to be configured in an Excel file and calling the following methods:
TestSupport#setThreadContextValues(String sheetName, String id)
DbAccessTestSupport#setThreadContextValues(String sheetName, String id)
Tip
In particular, when registering and updating the database using automatically configured items, it is necessary that the request ID and user ID are configured in ThreadContext. These values should be configured to ThreadContext before invoking the class to be tested.
<IP_ADDRESS>.1. Example of test source code implementation¶
public class DbAccessTestSample extends DbAccessTestSupport { // ＜Middle is omitted＞ @Test public void testInsert() { // Configure the value for ThreadContext (specify the sheet name and ID) setThreadContextValues("testSelect", "threadContext"); // ＜Rest is omitted＞
<IP_ADDRESS>.2. Test data description example¶
Describe the data as follows in the sheet [testInsert]. (ID is optional)
LIST_MAP=threadContext
| USER_ID | REQUEST_ID | LANG |
|---|---|---|
| U00001 | RS000001 | ja_JP |
<IP_ADDRESS>. To read an Excel file in any directory¶
If an Excel file exists in the same directory as the test source code, it can be read simply by specifying the sheet name, however, if you want to read a file in a different directory, and the file can be acquired directly by using the TestDataParser implementation class directly.
An example of reading data from the file “Buz.xlsx”, which exists under “/foo/bar/” is shown below.
<IP_ADDRESS>.1. Example of test source code implementation¶
TestDataParser parser = (TestDataParser) SystemRepository.getObject("testDataParser"); List<Map<String, String>> list = parser.getListMap("/foo/bar/Baz.xlsx", "sheet001", "params");
<IP_ADDRESS>. To perform common processing before and after executing a test.¶
By using the annotations (@Before, @After, @BeforeClass, and @AfterClass) provided in JUnit4, it is possible to execute common processing before and after executing a test.
<IP_ADDRESS>.1. Note¶
The following points must be noted when using the above annotations.
<IP_ADDRESS>.1.1. Points to be noted when using @BeforeClass and @AfterClass¶
- A method with the same name and the same annotations as the superclass must not be created in the subclass. If methods having the same name are assigned the same type of annotations, then the method of the superclass is not invoked.
public class TestSuper { @BeforeClass public static void setUpBeforeClass() { System.out.println("super"); // Not displayed. } } public class TestSub extends TestSuper { @BeforeClass public static void setUpBeforeClass() { // Override the superclass methods } @Test public void test() { System.out.println("test"); } }
When the above TestSub is executed, “test” will be displayed.
<IP_ADDRESS>. To use transactions other than the default¶
When carrying out the unit test of a database access class, invoke the database access class from the test class. Normally, since transaction control is not performed in the database access class, it is required to control the transaction in the test class.
Since transaction control is a routine process, a mechanism for transaction control is provided in the testing framework.If the transaction name is described in the property file, the testing framework will start the transaction before executing the test method and end the transaction after the test method ends. This mechanism eliminates the need to explicitly start the transaction before executing a test in individual tests.Also, the transaction is ended without fail.
- The procedure to use this function is as follows:
- Inherit DbAccessTestSupport in the test class (This will automatically call the @Before and @After methods of the superclass).
<IP_ADDRESS>. To use this framework without inheriting its class¶
Normally, when a test class is created, the superclass provided in this framework can be inherited, however, there are cases where the superclass of this framework cannot be inherited as it is necessary to inherit other classes, and so on. In such cases, substitution is possible by instantiating the superclass of this framework and delegating the process.
If delegation is used, it is necessary to pass a Class instance of the test class itself to the constructor. In addition, preprocessing (@Before) and postprocessing (@After) methods need to be called explicitly.
<IP_ADDRESS>.1. Example of test source code implementation¶
public class SampleTest extends AnotherSuperClass { /** DbAcces test support */ private DbAccessTestSupport dbSupport = new DbAccessTestSupport(getClass()); /** Preprocessing */ @Before public void setUp() { // Launch DbSupport pre-processs dbSupport.beginTransactions(); } /** Post-processing */ @After public void tearDown() { // Launch DbSupport post-process dbSupport.endTransactions(); } @Test public void test() { // Preparation data input to database dbSupport.setUpDb("test"); // ＜Middle is omitted＞ dbSupport.assertSqlResultSetEquals("test", "id", actual); } }
<IP_ADDRESS>. To validate the properties of a class¶
Verification of properties of the class to be tested can be implemented easily.
How to describe test data is described in the same way as To acquire input parameters and expected values for return values, etc. from an Excel file.
The data implies the property name in the second row and property value to be used at the time of verification from the third row onward.
With the following methods, it can be verified that the property value is the same as the data described in an Excel file. The first argument is the message to be displayed in case of an error, the second is the sheet name, the third is the ID, and the fourth is the class, an array of classes, or a list of classes to be verified.
HttpRequestTestSupport#assertObjectPropertyEquals(String message, String sheetName, String id, Object actual)
HttpRequestTestSupport#assertObjectArrayPropertyEquals(String message, String sheetName, String id, Object[] actual)
HttpRequestTestSupport#assertObjectListPropertyEquals(String message, String sheetName, String id, List<?> actual)
<IP_ADDRESS>.1. Example of test source code implementation¶
public class UserUpdateActionRequestTest extends HttpRequestTestSupport { @Test public void testRW11AC0301Normal() { execute("testRW11AC0301Normal", new BasicAdvice() { @Override public void afterExecute(TestCaseInfo testCaseInfo, ExecutionContext context) { String message = testCaseInfo.getTestCaseName(); String sheetName = testCaseInfo.getSheetName(); UserForm form = (UserForm) context.getRequestScopedVar("user_form"); UsersEntity users = form.getUsers(); // Validate the properties kanjiName, kanaName, and mailAddress of users. assertObjectPropertyEquals(message, sheetName, "expectedUsers", users); } } }
<IP_ADDRESS>.2. Example of Excel file description¶
LIST_MAP=expectedUsers
| kanjiName | kanaName | mailAddress |
|---|---|---|
| Kanji name | Kana name |<EMAIL_ADDRESS>|
<IP_ADDRESS>. To enter whitespaces, line feeds and nulls in test data¶
For more information, see Special ways to write in a cell.
<IP_ADDRESS>. To write a blank row in test data¶
You may want to include a blank row in the test data, for example,
when you handle a file of variable length, etc.
Since all blank rows are ignored, you can write an empty string like
""
using double quotation marks of Special ways to write in a cell to represent a blank row.
In the following example, the second record is a blank row.
SETUP_VARIABLE=/path/to/file.csv
<Omitted>
| name | address |
|---|---|
| Yamada | Tokyo |
| “” | |
| Tanaka | Osaka |
Tip
You do not need to fill in all the cells with ""
if you want to represent a blank line.
Only one cell of the row can be filled in.
For readability, it is recommended to enter ""
in the leftmost cell.
<IP_ADDRESS>. To conduct a test by changing the master data¶
<IP_ADDRESS>. To change the directory from which test data is read¶
In the default configuration, test data is read from under test/java
.
To change the test data directory according to the directory configuration of the project, add the following configuration to the component configuration file .[1]
| Key | Value |
|---|---|
| nablarch.test.resource-root | Relative path from the current directory at the time of test execution Multiple entries can be separated by semicolons (;) [2] |
The configuration example shown below.
nablarch.test.resource-root=path/to/test-data-dir
If you want to read test data from multiple directories, multiple paths can be specified by separating with a semicolon. The configuration example shown below.
nablarch.test.resource-root=test/online;test/batch
| [1] | To change the configuration temporarily, substitution is possible by specifying the VM argument at the time of test execution without changing the configuration file. Example |
| [2] | If more than one directory is specified, the test data detected first is read if there is test data with the same name. |
<IP_ADDRESS>. To add a routine conversion process for test data in the messaging process¶
The data written in an Excel file for test data is simply converted to a byte sequence by default using the specified encoding. For example, when URL-encoded data is linked from other systems, it is necessary to write the URL-encoded data in an Excel file, but it is not practical in terms of readability, maintainability, and work efficiency.
By implementing the following interface and registering it in the system repository, you can add a routine conversion process such as URL encoding.
<IP_ADDRESS>.1. Interface to be implemented¶
nablarch.test.core.file.TestDataConverter
<IP_ADDRESS>.2. Contents registered in the system repository¶
| Key | Value |
|---|---|
| TestDataConverter_<data type> | Class name of the class that implements the above interface. Data type is the value specified for file-type of the test data. |
<IP_ADDRESS>.3. Example of system repository registration¶
<!-- Test data converter definition -->
<component name="TestDataConverter_FormUrlEncoded"
class="please.change.me.test.core.file.FormUrlEncodedTestDataConverter"/>
<IP_ADDRESS>.4. Example of Excel file description¶
When the converter specified above is implemented to perform URL encoding for each data within the cells, it is handled in the same way as when the following data is described internally in the test framework.


Every once in a while, I want to reply to a forum post part by part. For the common BBCode forums, doing this manually is a tedious matter of repeatedly typing and/or copy-and-pasting [QUOTE]
and [/QUOTE]
tags. An obvious candidate for automation.
I figured the best vehicle for this piece of magic would be a bookmarklet.
I can initiate a quoted reply, put “-snip-” or “-s-” wherever I want a word in, and then run the bookmarklet. It will insert the appropriate start and end tags, including any attributes to the start tag (e.g. [QUOTE="Squid"]
or [QUOTE from="Squid"]
), newlines to make room for my reply (after first removing superfluous whitespace around the snip point), and then put the caret in the first such slot.
So
1 2 3 4 5 6 7 |
|
becomes
1 2 3 4 5 6 7 8 9 10 11 |
|
with the caret automagically placed after the first quotation.
I have the Firefox bookmark keyword “quote” tied to the bookmarklet, meaning I can type that in the address bar and hit ↩ to run it.
Right-click this link and bookmark it: Break up BBCode quote.
Formatted for readability:
1 2 3 4 5 6 7 8 9 10 |
|
This code makes the (rather safe, I think) assumption that you only care about the first textarea on the page. Modify to taste.
setSelectionRange()
– to move the caret – is Gecko (Firefox) specific, so some modifications are necessary if you want to use this with some other browser.


--- layout: post status: publish published: true title: Daytona Cubs Announce 2014 Roster author: display_name: Corey Fineran login: Corey email<EMAIL_ADDRESS>url: '' author_login: Corey author_email<EMAIL_ADDRESS>wordpress_id: 9456 wordpress_url: http://ivyenvy.com/?p=9456 date: '2014-03-30 13:21:15 +0000' date_gmt: '2014-03-30 18:21:15 +0000' categories: - Minor Leagues - Prospects tags: - Daytona Cubs - Dan Vogelbach - Albert Almora - Jeimer Candelario - Arodys Vizcaino comments: - id: 10520 author: cubs_corner author_email<EMAIL_ADDRESS>author_url: '' date: '2014-04-03 16:12:23 +0000' date_gmt: '2014-04-03 21:12:23 +0000' content: Nice. Thanks for the heads up. Hope to see this team play all 9 of their games in Tampa this year. ---
The Cubs High-A affiliate, Daytona Cubs (Florida State League) have announced their tentative roster to start the 2014 season.
Four of the Cubs Baseball America Prospects Top 10 Prospects will be starting 2014 in Daytona: Albert Almora (#4), Jeimer Candelario (#8), Dan Vogelbach (#9) and Arodys Vizcaino (#10).
Here is the full list of prospects that are on the Daytona Cubs 2014 roster:
Pitchers
Zach Cates
Michael Jensen
Austin Kirk
Andrew McKirahan
Felix Pena
Stephen Perakslis
Starling Peralta
Austin Reed
Jose Rosario
Tayler Scott
Arodys Vizcaino
Yao-Lin Wang
Rob Zastryzny
Catchers
Willson Contreras
Chadd Krist
Lance Rymel
Infielders
Gioskar Amaya
Jeimer Candelario
Marco Hernandez
Tim Saunders
Rock Shoulders
Dan Vogelbach
Outfielders
Albert Almora
Pin-Chieh Chen
Bijan Rademacher
Oliver Zapata
Staff
Manager - Dave Keller
Hitting Coach - Mariano Duncan
Pitching Coach - Ron Villone
Trainer - Pete Fagan
Strength & Conditioning Coach - Jason Morriss


X
BOOK DIRECT. GET REWARDED.
GET 3 FREE REWARDS LIKE:
Starbucks
Free Coffee
United Airlines
Free $25 Credit
Go-Go Wi-Fi
Free Wi-fi
Book Now + Get Free Rewards
Best Rate Gauranteed


Where do we eat lunch today?
Press to find out!
And the answer is:
...
Submit new lunch place
Name
Submit
List of lunch places
name
visit count
last visit
actions
remove


TMTouchByte Code Example
long session_handle;
short result, i;
unsigned char ROM[8];
/* session_handle set from a call to TMExtendedStartSession */
...
/* read the ROM number of a single 1-Wire device on the 1-Wire network */
result = TMTouchReset(session_handle);
if (result == 1 || result == 2)
{
/* device reset now, send read ROM command */
TMTouchByte(session_handle, 0x33);
/* now loop to receive all 8 bytes of the ROM */
for (i = 0; i < 8; i++)
ROM[i] = (unsigned char)TMTouchByte(session_handle, 0xFF);
}
else
{
/* device not on the 1-Wire network to read ROM */
...
}
/* close the session with a call to TMEndSession */
...


Basic xtal-fetch demo
Name: [[item.name]]
Email: [[item.email]]
DetailContents: [[item.detail_contents.message]]
Test of binding in expression -- need to watch network monitor to see the effects
Search string:


Newcomb's Problem
Posted: 2016-04-22 , Modified: 2016-04-22
Tags: rationality, game theory, decision theory
Posted: 2016-04-22 , Modified: 2016-04-22
Tags: rationality, game theory, decision theory
Newcomb’s Paradox is a classical problem in decision theory. There’s a lot more you can do with it than argue with what the right answer is.
My aim is to give a whole constellation of problems that it’s related to (which modify the parameters), to disentangle the different threads that make it paradoxical (free will, causality, etc.). It leads naturally to a discussion of decision-making for individuals and for society if you think beyond the literal statements.
(Steel-man the problem. Find the best interpretation. Find what it wants to talk about, find the least brittle interpretation.)
I’ll give the problems first, and encourage you to come up with answers or reactions before reading on. I will give different arguments that I do not necessarily endorse.
(Newcomb’s Problem) You walk into a tent at the Carnival of Science.
“Welcome to our next contestant!” says the host.  Before you are two boxes. Box A is transparent and contains $1,000. Box B is opaque, and may contain $1,000,000.
“You may take just box A, or both boxes.
“With our brain-scanning technologies, we have already made a prediction whether or not you will take both boxes. If we predict that you will, box A will be empty. If we predict that you will only take box A, box A will have $1,000,000.
“Many people have played, and we have never once been wrong!”
Assuming the host is trustworthy, and this is not a trick. Do you take one box or both boxes? (Hereafter we will refer to these choices as one-boxing and two-boxing.)
How would your answer change if you only knew the host was correct 60% of the time? What if the host were a omnipotent alien? What if the host were a friend who knows you well?  He tells you, > “I’ll pay you a thousand dollars tomorrow morning if, at midnight tonight, you intend to drink the toxin tomorrow afternoon.” You don’t actually need to drink it. In fact, the money will already be in your bank account before you wake up in the morning if you succeed in having the intention.
You think: if I wake up tomorrow and see money in my bank account, then I won’t drink the toxin! But this thought is problemsome: doesn’t that mean I don’t fully intend to drink it?Parfit Hitchhiker: Assume you are a selfish agent. You’re stranded in the desert without your wallet.  By the way, I’m a psychologist. I can tell whether or not you’re telling the truth.” You think: Once I get to town, I have no reason to give the driver $100. I could say yes now, but the driver will be able to tell that I don’t intend to give him $100 once I get to town, which means I’ll be stranded in the desert!
I wish I could commit to paying the $100 once I get to town, but I know once I get to town I will have no reason to.The first argument is a (possibly naive) application of causal decision theory and the second argument is a (possibly naive) application of evidential decision theory.
The smoking lesion problem seems clearer than the Newcomb problem. Why? The causal structure is laid clear.
Let’s think about the Newcomb problem again in the light, concentrating on the causal structure. When you walked into the tent, the brain scan was already taken. Whether there is $1,000,000 in the first box was already determined by your brain scan, so taking one or two boxes has no effect on whether there is $1,000,000 in the first box. Therefore, argument (2) applies and you should 2-box.
Another way to think of this is that you can’t have causality going backwards in time!
This seems like a paradox. Let’s try to resolve it by stating it as a logic problem. (Another good problem to try this on is the Unexpected Hanging Paradox.)
The host does the following. Given an algorithm \(A\) that either outputs 1 or 2 (in bounded time), the host runs it to determines what it outputs, and puts $1,000,000 in box 1 if it outputs 1.
Here, we are modeling the contestant’s brain as an algorithm \(A\). For this model to be correct, we are assuming the world is deterministic: your brain state (and your surroundings) at one moment completely determine your future actions. But then we might as well throw our hands up in the air: there’s no sense in which you can even “decide” to one-box or two-box!1
But here’s something you can do. You can flip a coin, and decide to 1-box if it is heads and 2-box if it is tails. The host would have no way to know, unless he can also predict the coin. So assume you have a source of randomness.
So we change the problem to say “The host puts $1,000,000 in box 1 iff he is sure that you will take only 1 box.”
The host does the following. Given a randomized algorithm \(A\) that either outputs 1 or 2 (in bounded time), the host determines whether it is certain that the algorithm will output 1. If and only if this is true, the host puts $1,000,000 in box 1.
We’re not done yet with the logical perspective. It will get more interesting later.
?? So it seems we can dismiss this problem as being not well-stated! But this would be ignoring a lot of important ideas we have yet to draw out. A more reasonable view, then, is to stipulate that historically, the host has only been right 60% of the time, and that this is a distribution over actual people, not Turing machines. The paradox still stands.
Here’s a subtlety to the Newcomb problem. In the formulation above, I wanted you to imagine that you were walking into a tent NOW, and that you didn’t know about the Newcomb problem before you walked into the tent.
But here you are, reading about the Newcomb problem, and thinking about it. Suppose that tomorrow morning you will walk into that tent. Will you one-box or two-box?(Transparent Newcomb) This is the same setup as the Newcomb problem, with a superintelligent AI, but the box B is transparent. You can see whether whether it contains $1,000,000.
You enter the room, and see that indeed there is $1,000,000 in the transparent box. (This is not an illusion.) Do you one-box or two-box?
Learning of Newcomb’s Problem before you play the game changes the question. * If you only learn the rules as you walk into the tent, your decision comes after the money was placed, so has no causal bearing on whether it is placed. * If you learn about it now, you can’t help thinking about it and having some idea about whether you will one-box or two-box—thoughts that will be accessible to the host when he takes your brain scan. Your decision is now causally entangled with whether or not the money is placed, unlike in the Smoking Lesion problem.
 I’ve seen the Newcomb problem given to actual people, and the host predicted correctly in both cases. How did this happen? Well, the host knew the personalities of both people involved, made an educated guess to whether they would one-box or two-box, and planned accordingly.
 I’ve seen the Newcomb problem given to actual people, and the host predicted correctly in both cases. How did this happen? Well, the host knew the personalities of both people involved, made an educated guess to whether they would one-box or two-box, and planned accordingly.
Newcomb’s Problem and Prisoner’s Dilemma are very similar when iterated. Imagine that someone leaves a cake on the table in the lounge every day, intending it to be shared. Every day, you can either (1) take a fair share of the cake, or (2) eat the whole cake. (Assume your value function is the total amount of cake consumed.) If the baker thinks that you will take the whole cake, she will not leave the cake on the table.
This means that you should turn yourself into the kind of person that would one-box. When other people see you as the kind of person who will one-box (e.g., take your fair share of the cake), then they will offer you more. It’s good to appear consistent to other people: they will be able to model you correctly; if you are a person who takes eir fair share, you want other people to know this so that they will leave cake out for you. If you act chaotically or irrationally, people may not give you the benefit of the doubt.
“: If you can, right now, try to shape yourself into the sort of person who, whenever you’re faced with a Newcomb Problem, will just take the box.”
Another way to look at the Toxin Puzzle and the Parfit Hitchhiker problem is that you have trouble trusting yourself. In both, you have the trouble that once you get the good thing (money, or trip to town), you have no incentive to keep your promise. But this means that if the other person can read your mind, then they will not give you the good thing!
We can object to this by saying that people can’t read minds.
Let’s steel-man the problem. What is it getting at? We’re thinking about the Newcomb problem in a vacuum: a host who’s never seen you before attempts to make a prediction about you using futuristic technology.
What if it were your friends—people who know you well?
One way to get around this is to consider an iterated Newcomb problem.
“You should always act in the way that you wish you would have initially committed yourself to act. That’s approximately what’s going on.  Even though now you don’t. Similarly, you should take the one box in the Newcomb case, because that’s what you would have wished yourself to be committed to before you entered the tent.”

(Scene: School playground.  We give him a choice between two pennies and a dime, and every time he chooses two pennies. Here, A-Fu, would you rather have two pennies or a dime? See? He chose the pennies!
What if you can run \(A\) and do the opposite? Can you resolve this paradox?↩


Flat Admin
Log In...
Login Success. Please wait for loading.
Email Address
Password
Create new account
Forgot password?


Data Container Changes Part 3
Just over a year ago we detailed some improvements to the data container, including the availability of Off Heap storage in part 2. There have been quite a few fixes for Off Heap especially around memory size estimations with Infinispan 9.2. There is also a brand new "eviction" strategy that has a bit of a twist.
Eviction Strategy Resurrected
Some of you may have remembered that Infinispan used to have an eviction strategy. This was originally used to decide what eviction algorithm was used, such as LRU or LIRS. This was removed when the new data container was introduced. Well… it is back again, but it will be used for a slightly different purpose.
The eviction strategy still has NONE & MANUAL which are exactly the same as before.
Remove strategy
There is a new REMOVE strategy that is configured by default if eviction size is greater than 0. This strategy essentially enables eviction and removes old entries as new ones are inserted.
Exception strategy
We have a brand new "eviction" strategy that provides new functionality. It is unique in that it doesn’t really evict, but rather prevent entries from being inserted. This is the EXCEPTION strategy which blocks new entries from being inserted (or updated if they exceed memory size) by throwing a ContainerFullException when the size is reached.
This strategy only works on transactional caches that always have 2 phase commit enabled. This can be useful if you want to always have only so many entries and to give priority to currently inserted entries. This strategy has better performance than REMOVE since it doesn’t have to bookkeep all entries to know what to remove as well.
Note this strategy works across all storage types: OBJECT, BINARY and OFFHEAP and works with both MEMORY and SIZE based "eviction types. This makes it just as flexible as the REMOVE eviction strategy and hope it finds some uses by people.
How to Configure EXCEPTION Strategy
This is how you can enable MEMORY based EXCEPTION "eviction" using xml configuration.
This is how you configure the same thing but programmatically.
Off Heap Memory Size Allocations & Estimations
Before the off heap memory based eviction only counted the allocated memory chunks for the stored entries themselves. This unfortunately meant that the size estimate is a bit less than what it should have been. There are a few things that we improved since then, including reducing the overhead of our allocations. Note all of the below things require no configuration changes and users should just get the benefits.
Reduced per object overhead
Prior the overhead for immutable entries with eviction, Infinispan itself use to allocate 2 chunks of memory with one being 28 bytes and adding 8 bytes to the actual object. Now we only allocate an additional 16 bytes to the object memory block itself (saving the extra allocation and requiring less on the object) when using eviction. Due to memory allocation overhead this saves much more than the 20 bytes as the allocator also has its own overhead.
We also shaved off 4 bytes off of all entries if expiration was not used, meaning overhead for an immutable cache entry without eviction only requires 21 bytes of overhead from ISPN when using off heap (retained in the same allocation block).
Per allocation memory sizing estimations
Internally ISPN allocates a new chunk of memory for each object. This is done currently to leverage the underlying OS allocator to handle features such as fragmentation or compaction (if the allocator does so). Unfortunately this means that each object has its own overhead from the allocator. Thus we now take that into account when estimating the memory used by adding 8 bytes overhead and aligning to 16 bytes. This seems to be a pretty common way for allocators to work. If possible we could allow for tweaking these values, but they are hard coded currently.
Accounting for Address Count
As was mentioned in the prior blog post about off heap, we allocate a single block of memory to hold address counters for our lookups when using Off Heap. Unfortunately we didn’t account for that in the memory eviction count. We now account for that in the eviction mechanism, thus your memory eviction size must be greater than the address count rounded up to the nearest power of 2, multiplied by 8. What a mouthful…
Wrap up
Off heap has been overhauled quite a bit to try to reduce memory usage, fix bugs and more accurately estimate the memory used. We hope that along with the new eviction strategy are welcome additions to various applications.
Please make sure to contact us if you have any feedback, find any bugs or have any questions! You can get in contact with various places listed on our website.


Simple Maps is a simple maps app (self-explanatory). The source code is on Github.
Simple Maps is made with Polymer. Polymer is a library for web components that can be used to build web apps with material design components. Find out more here:
Polymer 1.0 was recently released at Google I/O 2015. This project currently uses Polymer 0.5, but will be updated to 1.0 in the future.
Simple Maps uses the
And of course the real Google Maps is awesome.
Even though this project is fully functional, it is not finished yet. More map services will be added soon, such as Leaflet Maps. More settings like satellite view, startup location, current location, etc. will be added.
Simple Maps follows material design, a new design language by Google.
Most of the material design components are provided by the Polymer Paper Elements.


I used to have nightmares every night, without fail, really awful ones. My psychiatrist assured me they would subside due to my new regimen of trazodone, but they never did. He decided to prescribe me Risperdol. I felt a bit awkward, like he was implying that I was psychotic. But it was worth a shot to get rid of these horrible nightmares.
My first dose was taken September 11, 2001. I rushed to take the 3mgs in the morning, as I was late for school.  About 15 minutes into our travel we heard it on the radio, a plane had crashed into the world trade center. I was in awe. Still nothing yet. I got to school, no one had heard yet but me. I was the only one who had had a chance to learn of the incident on the radio. I was the only one who wasn't in class when it happened. I went to my first class, current events. I was feeling a bit dizzy by this point. I told them what happened. My teacher hardly believed me, he thought I must have misheard. He excused himself, and about 10 minutes later someone came in and told us all to come to the lounge to watch what was happening on the TV.
By this point I was really feeling detached. I was very drowsy, it was hard to move my limbs. All of me felt heavy. I went into the lounge and slumped onto one of the couches, but I wasn't paying much attention to the destruction on the TV. Instead I was blankly looking around at everyone's expressions. Their reactions seemed almost inappropriate. It was as if my brain had plateaued at a state of apathy. Another plane hit. I watched.
After a few more minutes it was hard to keep my eyes open. Everyone's voices sounded like I was hearing them from underwater. But then it happened, a huge explosion in the distance, everyone went silent. The ground shook under our feet. My school was only a few miles from the Pentagon. They gasped, they screamed, they cried, they had loved ones there. I watched. My brain wasn't computing the disaster around me. I was confused. It took me a minute to realize the explosion had anything to do with what was happening on TV, and when I did, it still didn't matter. Their despair was unsettling, but not in the way you'd think. It was almost irritating. I got too uncomfortable and decided to get up and walk down the hall to another classroom.
The hallway seemed long and the lights bright. My body was even heavier than before. I found one of my friends in another classroom. I knew I should ask her if she was okay, but my face felt tight, and it was hard to get the words out. I finally choked it out, she responded but it was unexplainably hard to concentrate on what she was saying. The words didn't seem to fit together, it was nonsense. I sat down on a desk next to her, but I started to feel uncomfortable in that room too. Nowhere I went was the right place to be. I told her I would be right back, that I was going to get some water. I squinted at the brightness of the hallway as I walked toward the fountain, only I went right past it into another classroom. I was disconcertingly confused.
I sat down and put my head down. I think I fell asleep for a minute until a few people came in exchanging opinions of what had happened. It didn't make sense. I decided it was mind over matter, if I could just concentrate I could understand what they were saying. I tried, but I couldn't seem to stay conscious anymore. I was drooling and gripping the desk.
Everything after that is a blur. I was a zombie.  It took her almost four hours to get there through all the traffic. Finally I got home and slept the rest of the day and night. I stopped taking the Risperdol.
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.


Let ABC be a triangle having the angle ABC equal to the angle ACB.
I say that the side AB also equals the side AC.
If AB does not equal AC, then one of them is greater.
Let AB be greater. Cut off DB from AB the greater equal to AC the less, and join DC.
Since DB equals AC, and BC is common, therefore the two sides DB and BC equal the two sides AC and CB respectively, and the angle DBC equals the angle ACB. Therefore the base DC equals the base AB, and the triangle DBC equals the triangle ACB, the less equals the greater, which is absurd. Therefore AB is not unequal to AC, it therefore equals it.
Therefore if in a triangle two angles equal one another, then the sides opposite the equal angles also equal one another.
A proposition and its converse are not logically equivalent. There are examples where “If P, then Q” is valid, but “If Q, then P” is not valid. An example from the Elements is proposition III.5 which states “If two circles cut one another, then they do not have the same center.” The converse would be “If two circles do not have the same center, then they cut one another” which is certainly not valid since if one circle lies entirely outside the other, then they don’t cut one another.
In general, to prove a statement of the form “P” with a proof by contradiction, begin with an assumption “not P” and derive some contradiction “Q and not Q,” and finally conclude “P.”
Euclid often uses proofs by contradiction, but he does not use them to conclude the existence of geometric objects. That is, he does not use them in constructions. But he does use them to show what has been constructed is correct.
In modern mathematics nonconstructive proofs by contradiction do occur. Famous examples are Brouwer’s fixed point theorems published in 1912. One of these states that any continuous transformation f of a circle (circular disk) to itself has a fixed point x, that is, a point such that f(x) = x. In his proof, he assumed that such a point did not exist and derived a contradiction. Although his proof is logically correct, he was not satisfied since the proof does not help in constructing a fixed point. Brouwer was an adherent of a philosophy of mathematics called intuitionism that holds, among other things, that mathematical objects have not been shown to exist until constructions have been given for them.
Proposition I.3 can be read as a construction to determine whether one line is less than, equal to, or greater than another. Using I.3, one line is laid along another, and it will fall short, fall equal, or extend beyond the other. For this proposition I.6, the construction simplifies since the two lines AB and AC already have one end in common.
The other part of the law of trichotomy is also used in the proof, the part that says only one of the three cases can occur: “... the triangle DBC equals the triangle ACB, the less equals the greater, which is absurd.” C.N.5, the whole is greater than the part, allows the conclusion that triangle DBC (the part) is less than triangle ACB (the whole). But the contradiction arises because only one of the two cases DBC = ACB and DBC < ACB can occur.


Person: Weight {{this.weight}} kg, Height {{this.height}} cm
BMI: {{bmiValue}}
You are {{bmiMessage}}
Person: Weight {{this.weight}} kg, Height {{this.height}} cm
BMR: {{BMR}}
You need more than {{BMR}} if want to gain weight
You need consistent value {{BMR}} if want to maintain weight
You need less than {{BMR}} if want to lose weight


Custom-able Weather
Ui Element Weather
Broos-UI speed up development of your web projects, both web apps and websites. it also gives your web projects a light speed.
We focus on a great deal of UX, giving your users a great web Experience, as Broos-UI can be used on projects of all business environments.
Try it, its like magic right ?. This is the most responsive design framework ever, we are better than our competitors and we provide vaid resposive examples of use.
We focus of the user friendly animations which add value to user experience.
Broos UI is the most colorfull ui framework, the color tone is that to give value to your business and thus adding value to user experience..
We try our very best to add 3d components where neccesary, Broos UI is a great deal when it comes to building super professional websites.
Broos UI, has a strong unbeatable mobility features, thus very clean and touch friendly. your design flow of information is never brokern even on mobile.
Broos UI is inspired by Litebase Inc/ litebase.xyz. major components in this framework can also be noticed on the litebase website, though not all components but for sure many say "Broos-UI is the real design Source-code of litebase" .
Broos UI is built using the concepts of Materilize-css, bootstrap, jquerymobile, framework7 and sencha framework. Broos UI is indeed better and Advanced. to get the latest version. folk us on github. @broosaction
Ui Element Weather
Ui Element Buttons
dropdown component is not yet arirable for version 0.3.14
Broos UI tabs feature is fully customizable and its an anvanced tab engine.
it is smooth and responsive, with multiple inbelt design to fit your neeeds.
Quick and touch friendly. it uses the Broos UI vice engine. thus its stable and reliable.


Sweet Free Stuff
///////////////////////////////////////////
Free Goat BackCountry.com Sticker
Posted: 16 Jun 2013 07:52 AM PDT
http://feedproxy.google.com/&;r/SweetFreeStuff/&;3/VzRX66v4oh0/?utm_source=feedburner&utm_medium=email
Get it for Free!
///////////////////////////////////////////
10 Free Pampers Gifts to Grow Points
Posted: 16 Jun 2013 02:02 AM PDT
http://feedproxy.google.com/&;r/SweetFreeStuff/&;3/gAQAkje6yhk/?utm_source=feedburner&utm_medium=email
To login please click here and enter the code: FBPA6XW7KRU8J13 to receive
10 more points. (If you need to register, click here to sign up and receive
100 points!) The Pampers Gifts to Grow Rewards Program rewards you every
time you choose Pampers diapers, training pants and wipes for your growing
baby. To start, simply […]


Class SessionPanel
- MvcCore\Ext\Debug\Tracy\SessionPanel implements Tracy\IBarPanel
Namespace: MvcCore\Ext\Debug\Tracy
Located at ext-debug-tracy-session/src/MvcCore/Ext/Tracy/SessionPanel.php
Located at ext-debug-tracy-session/src/MvcCore/Ext/Tracy/SessionPanel.php
public
|
|
public
|
|
public
|
|
public
|
|
protected
|
string |
VERSION
MvcCore Extension - Debug - Tracy Panel - Session - version: Comparation by PHP function version_compare(); |
#
'4.2.0'
|
integer |
TYPE_PHP
|
#
0
|
integer |
TYPE_NAMESPACE
|
#
1
|
integer |
EXPIRATION_HOOPS
|
#
1
|
integer |
EXPIRATION_TIME
|
#
2
|
public static
string
|
$MetaStoreKey
\MvcCore\Session meta info store key in $_SESSION |
#
\MvcCore\Session::SESSION_METADATA_KEY
|
public static
array
|
$Session
Readed session store as data printed in template |
#
array()
|
public static
string
|
$SessionMaxLifeTime
Formated max. lifetime from \MvcCore\Session namespace |
#
''
|
public static
string
|
$Id
Debug panel id |
#
'session-panel'
|
public static
integer
|
$Now
Now time at \MvcCore\Ext\Debug\SessionPanel static init - mostly in request begin |
#
0
|


| Created: | 4/29/2013 12:00:00 AM |
| Modified: | 4/30/2013 3:39:13 PM |
| Project: | |
| Advanced: |
| Attribute | ||
|
Public Identifier. Type UBLVersionID |
||
Details:
|
||
|
Public Identifier. Type CustomizationID |
||
Details:
|
||
|
Public Identifier. Type ProfileID |
||
Details:
|
||
|
Public Identifier. Type ProfileExecutionID |
||
Details:
|
||
|
Public Identifier. Type ID |
||
Details:
|
||
|
Public Indicator. Type CopyIndicator |
||
Details:
|
||
|
Public Identifier. Type UUID |
||
Details:
|
||
|
Public Date. Type IssueDate |
||
Details:
|
||
|
Public Time. Type IssueTime |
||
Details:
|
||
|
Public Text. Type Note |
||
Details:
|
||
|
Public Date. Type TaxPointDate |
||
Details:
|
||
|
Public Currency_ Code. Type DocumentCurrencyCode |
||
Details:
|
||
|
Public Currency_ Code. Type TaxCurrencyCode |
||
Details:
|
||
|
Public Currency_ Code. Type PricingCurrencyCode |
||
Details:
|
||
|
Public Currency_ Code. Type PaymentCurrencyCode |
||
Details:
|
||
|
Public Currency_ Code. Type PaymentAlternativeCurrencyCode |
||
Details:
|
||
|
Public Code. Type AccountingCostCode |
||
Details:
|
||
|
Public Text. Type AccountingCost |
||
Details:
|
||
|
Public Numeric. Type LineCountNumeric |
||
Details:
|
| Element | Source Role | Target Role |
|
«ABIE» Allowance Charge Class |
Name: |
Name: |
|
Details:
A discount or charge that applies to a price component.
|
||
|
«ABIE» Billing Reference Class |
Name: |
Name: |
|
Details:
A reference to a billing document associated with this document.
|
||
|
«ABIE» Delivery Terms Class |
Name: |
Name: |
|
Details:
A set of delivery terms associated with this document.
|
||
|
«ABIE» Customer Party Class |
Name: |
Name: Accounting Customer Party |
|
Details:
The accounting customer party.
|
||
|
«ABIE» Customer Party Class |
Name: |
Name: Buyer Customer Party |
|
Details:
The buyer.
|
||
|
«ABIE» Debit Note Line Class |
Name: |
Name: |
|
Details:
A Debit Note line.
|
||
|
«ABIE» Delivery Class |
Name: |
Name: |
|
Details:
A delivery associated with this document.
|
||
|
«ABIE» Document Reference Class |
Name: |
Name: Additional Document Reference |
|
Details:
A reference to an additional document associated with this document.
|
||
|
«ABIE» Document Reference Class |
Name: |
Name: Contract Document Reference |
|
Details:
A reference to a contract associated with this document.
|
||
|
«ABIE» Document Reference Class |
Name: |
Name: Despatch Document Reference |
|
Details:
A reference to a Despatch Advice associated with this document.
|
||
|
«ABIE» Document Reference Class |
Name: |
Name: Receipt Document Reference |
|
Details:
A reference to a Receipt Advice associated with this document.
|
||
|
«ABIE» Document Reference Class |
Name: |
Name: Statement Document Reference |
|
Details:
A reference to a Statement associated with this document.
|
||
|
«ABIE» Exchange Rate Class |
Name: |
Name: Payment Alternative Exchange Rate |
|
Details:
The exchange rate between the document currency and the payment alternative currency.
|
||
|
«ABIE» Exchange Rate Class |
Name: |
Name: Payment Exchange Rate |
|
Details:
The exchange rate between the document currency and the payment currency.
|
||
|
«ABIE» Exchange Rate Class |
Name: |
Name: Pricing Exchange Rate |
|
Details:
The exchange rate between the document currency and the pricing currency.
|
||
|
«ABIE» Exchange Rate Class |
Name: |
Name: Tax Exchange Rate |
|
Details:
The exchange rate between the document currency and the tax currency.
|
||
|
«ABIE» Monetary Total Class |
Name: |
Name: Requested Monetary Total |
|
Details:
The total amount payable on the Debit Note, including allowances, charges, and taxes.
|
||
|
«ABIE» Order Reference Class |
Name: |
Name: |
|
Details:
A reference to an Order with which this Debit Note is associated.
|
||
|
«ABIE» Party Class |
Name: |
Name: Tax Representative Party |
|
Details:
The tax representative.
|
||
|
«ABIE» Party Class |
Name: |
Name: Payee Party |
|
Details:
The payee.
|
||
|
«ABIE» Payment Class |
Name: |
Name: Prepaid Payment |
|
Details:
A prepaid payment.
|
||
|
«ABIE» Payment Means Class |
Name: |
Name: |
|
Details:
Expected means of payment.
|
||
|
«ABIE» Payment Terms Class |
Name: |
Name: |
|
Details:
A set of payment terms associated with this document.
|
||
|
«ABIE» Period Class |
Name: |
Name: Invoice Period |
|
Details:
A period (rather than a specific invoice) associated with this document.
|
||
|
«ABIE» Response Class |
Name: |
Name: Discrepancy Response |
|
Details:
A reason for the Debit Note as a whole.
|
||
|
«ABIE» Signature Class |
Name: |
Name: |
|
Details:
A signature applied to this document.
|
||
|
«ABIE» Supplier Party Class |
Name: |
Name: Accounting Supplier Party |
|
Details:
The accounting supplier party.
|
||
|
«ABIE» Supplier Party Class |
Name: |
Name: Seller Supplier Party |
|
Details:
The seller.
|
||
|
«ABIE» Tax Total Class |
Name: |
Name: |
|
Details:
The total amount of a specific type of tax.
|


Secret Service
William C. Bordley Secret Service Uniformed Officer
Gary Byrne Secret Service Uniformed
Officer
Daniel Carbonetti Secret Service Uniformed Officer
Brent Chinery Secret Service Uniformed Officer
Larry Cockell Special Agent In Charge,
Secret Service Presidential
Protective Division
Douglas Dragotta Secret Service Uniformed Officer
Robert C. Ferguson Secret Service Uniformed Officer
Lewis Fox Retired Secret Service
Uniformed Officer
Mathew Fitsch Lt., Secret Service Uniformed
Division
Nelson Garabito Secret Service Uniformed Officer
Bryan Hall Secret Service Uniformed
Officer
Brian Henderson Secret Service Uniformed Officer
Reginald Hightower Secret Service Uniformed Officer
Oliver Janney Secret Service Uniformed Officer
Greg LaDow Secret Service Uniformed Officer
William Ludtke III Secret Service Uniformed Officer
Tim Lynn Secret Service Uniformed Officer
Lewis Merletti Director, Secret Service
John Muskett Secret Service Uniformed
Officer
Fremon Myles, Jr. Secret Service Uniformed Officer
Robert Myrick Secret Service Uniformed Officer
Gary Niedzwieki Secret Service Uniformed Officer
Joe Overstreet Secret Service Uniformed Officer
Steven Pape Secret Service Uniformed Officer
Stacy Porter Secret Service Uniformed Officer
Geoffrey Purdie Secret Service Uniformed Officer, Captain
William Clair Shegogue Secret Service Uniformed Officer
Barry Smith Secret Service Uniformed Officer
William Tyler Secret Service Uniformed
Officer
Sandra Verna Secret Service Uniformed Officer
Keith Williams Secret Service Uniformed Officer, Sergeant
Michael Wilson Secret Service Uniformed Officer
Bryant Withrow Lt., Secret Service Uniformed
Office Division
Lawyers and Judges
Kirbe Behre Linda Tripp's former attorney
Robert Bennett Attorney for President Clinton
Robert Bittman Deputy Independent Counsel
Plato Cacheris Attorney for Monica Lewinsky
Frank Carter Monica Lewinsky's former
attorney
Lloyd Cutler Former White House Counsel
Mitchell Ettinger Attorney for President Clinton
Vince Foster Former Deputy White House
Counsel
Hon. Norma Holloway Johnson Chief Judge, U.S. District
Court for the District of
Columbia
David Kendall Attorney for President Clinton
Karl Metzner Attorney for Betty Currie
Kathy Sexton Attorney for President Clinton
Hon. Susan Webber Wright U.S. District Judge
presiding over Jones v.
Clinton civil suit
Hon. David Tatel Judge, U.S. Court of Appeals
for the D.C. Circuit
Media
Matt Drudge Drudge Report
Kristen Ganong Manager of Publications, The
Heritage Foundation
Lucianne Goldberg Literary Agent
Michael Isikoff Reporter, Newsweek Magazine
Jim Lehrer Television Journalist
Eleanor Mondale Reporter, CBS News
Susan Schmidt Correspondent, Washington Post
Foreign Dignitaries
Yitzak Rabin Former Prime Minister of
Israel
Ernesto Zedillo President of Mexico
Other
Ron Brown Former Commerce Secretary
Patrick Fallon Special Agent, Federal Bureau of Investigation
Webster L. Hubbell Former Associate Attorney
General, Friend of the Clinton
Family
Pornopolis |
Rotten |
Faces of Death |
Famous Nudes


Get Tickets
Gets count of activities associated to the ticket /// Please use the /sales/activities/count?conditions=ticket/id={id} endpoint
Gets activities associated to the ticket /// Please use the /sales/activities?conditions=ticket/id={id} endpoint
Delete Configuration Association
Get Configuration Association
Get Ticket Configurations Count
Get Ticket Configurations
Create Configuration Association
Delete Ticket By Id
Get Ticket Documents Count
Gets the documents associated to the ticket /// Please use the /system/documents?recordType=Ticket&recordId={id} endpoint
Get Ticket By Id
Merge Company
Update Ticket
Gets the products associated to the ticket /// Please use the /procurement/products/count?conditions=chargeToType='Ticket' AND chargeToId={id} endpoint
Gets the products associated to the ticket /// Please use the /procurement/products?conditions=chargeToType='Ticket' AND chargeToId={id} endpoint
Gets the schedule entries count associated to the ticket /// Please use the /schedule/entries/count?conditions=type/id=4 AND objectId={id} endpoint
Gets the schedule entries associated to the ticket /// Please use the /schedule/entries?conditions=type/id=4 AND objectId={id} endpoint
Gets time entries count associated to the ticket /// Please use the /time/entries/count?conditions=(chargeToType="ServiceTicket" OR chargeToType="ProjectTicket") AND chargeToId={id} endpoint
Gets time entries associated to the ticket /// Please use the /time/entries?conditions=(chargeToType="ServiceTicket" OR chargeToType="ProjectTicket") AND chargeToId={id} endpoint
Ticket Search
Generated using TypeDoc
Get Tickets Count


Credential Management API is not available on your browser. Try Google Chrome version 51 or above.
Welcome! [[userProfile.name]]
or
This is a demo website of the Credential Management API.
You can find various resources:
- The source code of this demo
- An introduction article
- The official spec
- MDN API reference
- A codelab to experience implementing this API
By using Credential Management API, you will be able to add following functionalities to a website, for example:
- Show account chooser when signing in: Shows a native account chooser UI when a user taps "Sign In".
- Store credentials: Upon successful sign-in, store the credential information to the browser's password manager for later use.
- Let the user automatically sign back in: Let the user sign back in if a session is expired.
- Mediate auto sign-in: Once a user signs out, disable automatic sign-in.
Here's a quick instruction how to experience those features.
- Register with fake name, id and password
- Save password when prompted.
- Reload the page.
- You should be signed out.
- Tap "Sign In".
- You should see an account chooser. Choose one.
- Opt-in to auto sign-in.
- You should be signed in now.
- Reload the page again.
- You will be auto signed in.
- Notice a banner telling that you are signed in.