text:
# AssociateEipAddress {#reference_i4w_xmt_ndb .reference}

Attaches an EIP to a cloud product instance in the same region.

Note the following when you call this action:

-   You can attach an EIP to a VPC ECS instance, a VPC SLB instance, or a NAT Gateway in the same region.
-   To attach an EIP to a NAT Gateway, make sure that there was no NAT bandwidth package under your account before January 26, 2018. Otherwise open a ticket to attach the EIP to the NAT Gateway.

## Debug {#apiExplorer .section}

By using [API Explorer](https://api.aliyun.com/#product=Vpc&api=DescribeVpcAttribute), you can easily debug APIs, automatically generate SDK code examples, and quickly search for APIs.

## Request parameters {#section_cch_pjg_mdb .section}

|Parameter|Type|Required?|Example value|Description|
|:--------|:---|:--------|-------------|:----------|
|Action|String|Yes|AssociateEipAddress| The name of this action. Value:

 AssociateEipAddress

 |
|AllocationId|String|Yes|eip-2zeerraiwb7uj6i0d0fo3| The ID of the EIP.

 |
|InstanceId|String|Yes|i-2zebb08phycz6pok9xwe| The ID of the instance to attach.

 |
|RegionId|String|Yes|cn-hangzhou| The ID of the region to which the EIP belongs.

 |
|InstanceRegionId|String|No|cn-hangzhou| The ID of the region to which the attached instance belongs.

 |
|InstanceType|String|No|EcsInstance| The type of the cloud product instance to attach.

 Valid values:**Nat | SlbInstance | EcsInstance | NetworkInterface**

 |
|PrivateIpAddress|String|No|<IP_ADDRESS>| An IP address in the CIDR block of the VSwitch.

 If you leave the option empty, the system allocates a private IP address according to the VPC ID and VSwitch ID.

 |

## Response parameters {#section_ugs_f1g_cz .section}

|Parameter|Type|Example value|Description|
|:--------|:---|-------------|:----------|
|RequestId|String|C0FD0EED-F90D-4479-803D-DD62335357E5|The ID of the request.|

## Examples {#section_ix5_h1g_cz .section}

**Request example**

``` {#createVPCpub}

http(s)://vpc.aliyuncs.com/?Action=AssociateEipAddress
&AllocationId=eip-2zeerraiwb7uj6i0d0fo3
&InstanceId=i-2zebb08phycz6pok9xwe
&<CommonParameters>

```

**Response example**

-   XML format

    ```
    <AssociateEipAddressResponse>
      <RequestId>0ED8D006-F706-4D23-88ED-E11ED28DCAC0</RequestId>
    </AssociateEipAddressResponse>

    ```

-   JSON format

    ```
    {
    	"RequestId":"0ED8D006-F706-4D23-88ED-E11ED28DCAC0"
    }
    ```

## Error codes {#section_u24_mw2_5gb .section}

|HTTP status code|Error code|Error message|Description|
|----------------|----------|-------------|-----------|
|400|InvalidAssociation.Duplicated|Specified instance already is associated.|This instance is already attached to an EIP or Global Acceleration instance. You must delete this instance before you can attach it to a different EIP or Global Acceleration instance.|
|400|OperationDenied|Specified instance is not in VPC.|The specified instance does not exist in the VPC.|
|400|InvalidParameter.Mismatch|Specified elastic IP address and ECS instance are not in the same region.|The specified EIP and ECS instances are not in the same region.|
|400|IncorrectEipStatus|Current elastic IP status does not support this operation|The current status of the specified EIP address does not support this operation.|
|404|InvalidInstanId.NotFound|Specified instance does not exist.|The specified instance does not exist.|
|400|IncorrectInstanceStatus|Current instance status does not support this operation.|The current instance status does not support this operation.|
|400|InvalidInstanceType.ValueNotSupported|The specified value of InstanceType is not supported.|The value of the InstanceType parameter is invalid.|
|400|IncorrectHaVipStatus|HaVip can be operated by this action only when it's status is Available or InUse.|You can perform this operation only if the HAVIP is the Available or InUse state.|
|400|InvalidParameter|The specified parameter is not valid.|The specified parameter value is invalid.|
|400|OperationDenied|Eip of default vpc not allow this operation|The EIP of the default VPC does not support this operation.|
|400|Forbbiden|The eip instance owener error|You need to be authorized to call the EIP. Please check that you have the appropriate permissions and try again.|
|400|InvalidBindingStatus|The eip binding status invalid.|The attaching status of the EIP is invalid.|
|400|BIND\_INSTANCE\_HAVE\_PORTMAP\_OR\_BIND\_EIP|The instance may have portMap or already bind eip.|You must delete the existing port forwarding rule associated with the ECS instance first.|
|400|BIND\_INSTANCE\_OWENER\_ERROR|Cannot operate the eip.|You cannot operate this EIP.|
|404|InvalidAllocationId.NotFound|Specified allocation ID is not found|The specified public IP address does not exist.|

[See common error codes](https://error-center.aliyun.com/status/product/Vpc)

repository: chenxixian/vpc

repo_name: chenxixian/vpc


text:
---
title: "Understand distributed trace easier in the incoming 6-GA"
date: 2019-01-01
author: Wu Sheng(Tetrate)
description: "Distributed tracing is a necessary part of modern microservices architecture, but how to understand or use distributed tracing data is unclear to some end users. This blog overviews typical distributed tracing use cases with new visualization features in SkyWalking v6."

tags:
- Tracing
---

## Background

Distributed tracing is a necessary part of modern microservices architecture, but how to understand or use distributed tracing data is unclear to some end users. This blog overviews typical distributed tracing use cases with new visualization features in SkyWalking v6. We hope new users will understand more through these examples.

## Metric and topology

Trace data underpins in two well known analysis features: **metric** and **topology**

**Metric** of each service, service instance, endpoint are derived from entry spans in trace. Metrics represent response time performance. So, you could have average response time, 99% response time, success rate, etc. These are broken down by service, service instance, endpoint.

**Topology** represents links between services and is distributed tracing's most attractive feature. Topologies allows all users to understand distributed service relationships and dependencies even when they are varied or complex. This is important as it brings a single view to all interested parties, regardless of if they are a developer, designer or operator.

Here's an example topology of 4 projects, including Kafka and two outside dependencies.

![](./demo-spring.png)

Topology in SkyWalking optional UI, RocketBot

## Trace

In a distributed tracing system, we spend a lot of resources(CPU, Memory, Disk and Network) to generate, transport and persistent trace data. Let's try to answer why we do this? What are the typical diagnosis and system performance questions we can answer with trace data?

SkyWalking v6 includes two trace views:
1. TreeMode: The first time provided. Help you easier to identify issues.
1. ListMode: Traditional view in time line, also usually seen in other tracing system, such as Zipkin.

### Error occurred

In the trace view, the easiest part is locating the error, possibly caused by a code exception or network fault. Both ListMode and TreeMode can identify errors, while the span detail screen provides details.

![](span-error.png)

ListMode error span

![](span-error-2.png)

TreeMode error span

### Slow span

A high priority feature is identifying the slowest spans in a trace. This uses execution duration captured by application agents. In the old ListMode trace view, parent span almost always includes the child span's duration, due to nesting. In other words, a slow span usually causes its parent to also become slow. In SkyWalking 6, we provide `Top 5 of slow span` filter to help you locate the spans directly.

![](top5-span.png)

Top 5 slow span

The above screenshot highlights the top 5 slow spans, excluding child span duration. Also, this shows all spans' execution time, which helps identify the slowest ones.

### Too many child spans

In some cases, individual durations are quick, but the trace is still slow, like this one:

![](top5-not-clear.png)

Trace with no slow span

To understand if the root problem is related to too many operations, use `Top 5 of children span number`. This filter shows the amount of children each span has, highlighting the top 5.

![](too-many-child.png)

13 database accesses of a span

In this screenshot, there is a span with 13 children, which are all Database accesses. Also, when you see overview of trace, database cost 1380ms of this 2000ms trace.

![](database-long-duration.png)

1380ms database accesses

In this example, the root cause is too many database accesses. This is also typical in other scenarios like too many RPCs or cache accesses.

### Trace depth
Trace depth is also related latency. Like the [too many child spans](#too-many-child-spans) scenario, each span latency looks good, but the whole trace is slow.

![](deep-trace-1.png)

Trace depth

Here, the slowest spans are less than 500ms, which are not too slow for a 2000ms trace. When you see the first line, there are four different colors representing four services involved in this distributed trace. Every one of them costs 100~400ms. For all four, there nearly 2000ms. From here, we know this slow trace is caused by 3 RPCs in a serial sequence.

## At the end

Distributed tracing and APM tools help users identify root causes, allowing development and operation teams to optimize accordingly. We hope you enjoyed this, and love Apache SkyWalking and our new trace visualization. If so, [give us a star on GitHub](https://github.com/apache/incubator-skywalking) to encourage us.

SkyWalking 6 is scheduled to release at the end of January 2019. You can contact the project team through the following channels:
- Follow [SkyWalking twitter](https://twitter.com/ASFSkyWalking)
- Subscribe mailing list<EMAIL_ADDRESS>. Send to<EMAIL_ADDRESS>to subscribe the mail list.
- Join [Gitter](https://gitter.im/OpenSkywalking/Lobby) room.

repository: apache/skywalking-website

branch_name: refs/heads/master

extension: md

gha_language: CSS

license_type: permissive

repo_name: apache/skywalking-website


text:
# 创建项目

- 进入当前目录

`⚡ cd demo-todos-vue `

- 初始化一个vue项目，用webpack模板

`⚡ vue init webpack .`

```
? Generate project in current directory? Yes
? Project name demo-todos-vue
? Project description A Vue.js project
? Author mingz<EMAIL_ADDRESS>? Vue build standalone
? Install vue-router? Yes
? Use ESLint to lint your code? Yes
? Pick an ESLint preset Standard
? Set up unit tests Yes
? Pick a test runner jest
? Setup e2e tests with Nightwatch? Yes
?

# Installing project dependencies ...
# ========================

npm WARN deprecated<EMAIL_ADDRESS>Browserslist 2 could fail on reading Browserslist >3.0 config used in other tools.
npm WARN deprecated<EMAIL_ADDRESS>Switch to the `bfj` package for fixes and new features!
npm WARN deprecated<EMAIL_ADDRESS>Browserslist 2 could fail on reading Browserslist >3.0 config used in other tools.
npm WARN deprecated<EMAIL_ADDRESS>If using 2.x branch, please upgrade to at least 2.1.6 to avoid a serious bug with socket data flow and an import issue introduced in 2.1.0

><EMAIL_ADDRESS>install /Users/zhaojm/projects/demo-todos-vue/node_modules/fsevents
> node install

node-pre-gyp WARN Using request for node-pre-gyp https download
[fsevents] Success: "/Users/zhaojm/projects/demo-todos-vue/node_modules/fsevents/lib/binding/Release/node-v67-darwin-x64/fse.node" is installed via remote

><EMAIL_ADDRESS>install /Users/zhaojm/projects/demo-todos-vue/node_modules/chromedriver
> node install.js

ChromeDriver binary exists. Validating...
ChromeDriver 2.46.628411 (3324f4c8be9ff2f70a05a30ebc72ffb013e1a71e)

ChromeDriver is already available at '/var/folders/pq/ltwj4_0n45d1rsznpjdv1b180000gn/T/2.46/chromedriver/chromedriver'.
Copying to target path /Users/zhaojm/projects/demo-todos-vue/node_modules/chromedriver/lib/chromedriver
Fixing file permissions
Done. ChromeDriver binary available at /Users/zhaojm/projects/demo-todos-vue/node_modules/chromedriver/lib/chromedriver/chromedriver

><EMAIL_ADDRESS>postinstall /Users/zhaojm/projects/demo-todos-vue/node_modules/webpack/node_modules/uglifyjs-webpack-plugin
> node lib/post_install.js

npm notice created a lockfile as package-lock.json. You should commit this file.
npm WARN<EMAIL_ADDRESS>requires a peer of<EMAIL_ADDRESS>but none is installed. You must install peer dependencies yourself.

added 1700 packages from 1107 contributors and audited 31705 packages in 60.963s
found 84 vulnerabilities (65 low, 8 moderate, 10 high, 1 critical)
  run `npm audit fix` to fix them, or `npm audit` for details

Running eslint --fix to comply with chosen preset rules...
# ========================

><EMAIL_ADDRESS>lint /Users/zhaojm/projects/demo-todos-vue
> eslint --ext .js,.vue src test/unit test/e2e/specs "--fix"

# Project initialization finished!
# ========================

To get started:

  npm run dev

Documentation can be found at https://vuejs-templates.github.io/webpack

```

- 运行测试

`⚡ npm run dev`

# 使用iview

- 安装iview
`⚡ npm install iview`

- 应用iview

在src/main.js 增加如下代码:
```javascript

import iView from 'iview'
import 'iview/dist/styles/iview.css'

Vue.use(iView)

```

在components/HelloWorld.vue里面替换如下iview控件：
```html
<Input v-model="value" placeholder="Enter something..." style="width: 300px" />
```

iview应用成功

# 使用vuex

`⚡ npm install vuex --save`

```
npm WARN<EMAIL_ADDRESS>requires a peer of<EMAIL_ADDRESS>but none is installed. You must install peer dependencies yourself.

+<EMAIL_ADDRESS>added 1 package from 1 contributor and audited 31719 packages in 8.966s
found 84 vulnerabilities (65 low, 8 moderate, 10 high, 1 critical)
  run `npm audit fix` to fix them, or `npm audit` for details

zhaojm@avril /Users/zhaojm/projects/demo-todos-vue                                                                                master
⚡
```

main.js中加入如下引用

```javascript
import Vuex from 'vuex'

Vue.use(Vuex)

```

# 使用axios

`⚡ npm install --save axios vue-axios`
```
npm WARN<EMAIL_ADDRESS>requires a peer of<EMAIL_ADDRESS>but none is installed. You must install peer dependencies yourself.

+<EMAIL_ADDRESS>+<EMAIL_ADDRESS>added 2 packages from 2 contributors and audited 31725 packages in 7.643s
found 84 vulnerabilities (65 low, 8 moderate, 10 high, 1 critical)
  run `npm audit fix` to fix them, or `npm audit` for details

zhaojm@avril /Users/zhaojm/projects/demo-todos-vue                                                                                master
⚡
```

main.js中加入如下引用
```javascript
import axios from 'axios'
import VueAxios from 'vue-axios'

Vue.use(VueAxios, axios)
```

gha_language: JavaScript


text:
# FluxDash
FluxDash is a dashboard terminal ui that is fully configurable through json files. You can either give it an indivudual json file or a folder and it will read any json file in the folder and attemp to turn it into a dashboard. You can then move between dashboard by pressing <N>.

### Example Dashboard
Here is an example dashboard. In the image below you will see that I am adjusting the time range of the queries for the dashboard. This is accomplished by pressing <t> to move forward in time and <y> to move back through the list of time ranges. Right now time ranges are hard coded to be:

`{"15m", "30m", "1h", "8h", "24h", "2d", "5d", "7d"}`

This will become configurable eventually but these are the most commonly used in our system.

![Example Dashboard](/fluxdashv2.gif)
You will also notice that the refresh and the group by interval are adjusted based on the time range. Again this will be come configurable at a later date. FluxDash uses a standard grid based system with rows and columns.

```json
	"rows": [{
		"height": 1,
		"span": 12,
		"offset": 0,
		"columns": [{
			"height": 1,
			"span": 6,
			"offset": 0,
			"timep": {
				"height": 3,
				"border": true
			}
		},{
			"height": 1,
			"span": 3,
			"offset": 0,
			"p": {
				"height": 3,
				"text": "System Health",
				"border": true
			}
		},
		{
			"height": 1,
			"span": 3,
			"offset": 0,
			"loading": {
				"height": 3,
				"border": true,
				"bordertop": true,
				"borderbottom": true,
				"borderright": true,
				"borderleft": true,
				"BarColor": 5,
				"BorderFg": 5
			}
		}]
	},
	 {
		"height": 1,
		"span": 12,
		"offset": 0,
		"columns": [{
			"height": 1,
			"span": 12,
			"offset": 0,
			"sparklines": {
				"Height" : 1,
				"lines": [{
					"from": "/system.cpu/",
					"title": "CPU",
					"where": "",
					"type": 2,
					"height": 1,
					"linecolor" : 5,
					"titlecolor": 0
				}, {
					"from": "/system.mem.free/",
					"title": "System Free memory",
					"type": 3,
					"height": 1
				},
				{
					"from": "/system.mem.cached/",
					"title": "System Cached memory",
					"type": 3,
					"height": 1
				},{
					"from": "/system.mem.buffers/",
					"title": "System Buffers memory",
					"type": 3,
					"height": 1
				}]
			}
		}]
	},
	 {
		"height": 1,
		"span": 12,
		"offset": 0,
		"columns": [{
			"height": 1,
			"span": 3,
			"offset": 0,
			"barchart": {
				"height": 6,
				"from": "/es.indices/",
				"where": "service='gomaintain'",
				"borderLabel": "Elastic Indices"
			}
		},{
		"height": 1,
		"span": 6,
		"offset": 0,
		"gauge": {
			"height": 3,
			"from": "/es.*.FS.Used.Percent/",
			"where": "service='gomaintain'",
			"border": true,
			"BorderLabel": "ES",
			"bordertop": true,
			"borderbottom": true,
			"borderright": true,
			"borderleft": true,
			"BarColor": 5,
			"BorderBg": 5,
			"label": "Disk Used"
		}
	}]
},{
		"height": 1,
		"span": 12,
		"offset": 0,
		"columns": [{
			"height": 1,
			"span": 12,
			"offset": 0,
			"sparklines": {
				"Height" : 1,
				"lines": [{
					"from": "/system.disk.[^dm|util].*.read.bytes/",
					"title": "Total Disk IO READ Bytes",
					"where": "",
					"type": 3,
					"height": 1,
					"linecolor" : 5,
					"titlecolor": 0
				},{
					"from": "/system.disk.[^dm|util].*.write.bytes/",
					"title": "Total Disk IO Write Bytes",
					"where": "",
					"type": 3,
					"height": 1,
					"linecolor" : 5,
					"titlecolor": 0
				}]
			}
		}]
	},
		 {
		"height": 1,
		"span": 12,
		"offset": 0,
		"columns": [{
			"height": 1,
			"span": 12,
			"offset": 0,
			"multispark": {
				"height": 3,
				"from": "/Dispatch.*/",
				"where": "service='godispatch'",
				"borderLabel": "Dispatch",
				"border" : true,
				"Bordertop" : true,
				"Borderbottom" : true,
				"Borderleft" : true,
				"Borderright" : true,
				"Borderfg": 4,
				"bg" : 1,
				"type": 1,
				"autocolor": true,
				"titlecolor": 6
			}
		}]
	}]
}
```

### Features

* Sparklines

Sparklines are a simplified single stat linechart that gives you basic trending over time.
Example json:

```json
"sparklines": {
	"Height": 1,
	"lines": [{
		"from": "/system.cpu/",
		"title": "CPU",
		"where": "",
		"type": 2,

		"height": 1,
		"linecolor": 5,
		"titlecolor": 0
	}, {
		"from": "/system.mem.free/",
		"title": "System Free memory",
		"type": 3,
		"height": 1
	}, {
		"from": "/system.mem.cached/",
		"title": "System Cached memory",
		"type": 3,
		"height": 1
	}, {
		"from": "/system.mem.buffers/",
		"title": "System Buffers memory",
		"type": 3,
		"height": 1
	}]
}
```

* MultiSpark

A set of sparklines that have been expanded automatically based on a
influxdb tag.

* Gauge

Gauge shows you the mean and max over the set time period.

* BarChart

BarChart is a graph that represents grouped data.

### Json Definition

* Types:

```go
	Short   = 1 #human readable numbers 100 1k 10m 1b
	Percent = 2 #Data should be treated as a percent
	Bytes   = 3 #human readable bytes 1b 30kb 1mb 10gb 1tb
	Time    = 4 #human readable time duration 1sec 5m 1h
)
```

* From:
From is the measurement you are going to query in influxdb.

"`/system.cpu.*/`" example regex.

"`system.cpu`" example full measurement name.

* Where:
Where allows you to add to the where clause in your influxdb query.

"`service='name'`"

"`service='name' AND host='hostname'"

license: MIT

repository: di-stars/FluxDash

repo_name: di-stars/FluxDash


text:
This API will allow you to search for everything in the Banjo universe such as:
* Character Names
* Locations
* Items
* Enemies
* Etc

## What will be (hopefully) covered?
Both main series ORIGINAL games will be covered by this API.
I may add Nuts & Bolts or the side/spinoff games, _maybe_.  That takes time for one man to do. But I guess this is why it's open source right 😉?

## Where are you getting your data from?
Currently I am referencing data from the [Fandom Wiki](https://banjokazooie.fandom.com/wiki/Banjo-Kazooie_Wiki). Images I haven't quite decided on how I will obtain due to licensing/copywrite

## Is there a public link for interacting with?
There sure is! Head over to [Grey Jinjo](http://greyjinjo.com) to get started. The website is still in development so check back often!!

## Getting Involved
If you'd like to get involved please go ahead! I'd love for more people to get involved and hopefully make this a great API OR even use this as the basis for your.

## Support
This is completely free to use (and hopefully forever). But unfortunately server costs are not.

repository: theredheaddev/grey-jinjo-api

gha_language: C#

gha_license_id: MIT

repo_name: theredheaddev/grey-jinjo-api


text:
# PhD thesis

Title:

> Unravelling higher order chromatin organisation through statistical analysis [[PDF](thesis.pdf)]

Submitted 2015, University of Edinburgh (accepted 2016).

Tags: bioinformatics, computational biology, Hi-C, chromosome conformation capture, machine learning

## Notes
* 41,000 words
* 73 figures
* Includes work from:
  1. [10.1186/s13059-015-0661-x](https://dx.doi.org/10.1186/s13059-015-0661-x)
  2. [10.15252/msb.20156492](https://dx.doi.org/10.15252/msb.20156492)

### Printing

For printing, remove the link and citations colours with:

```tex
\hypersetup{colorlinks=false}
```

repository: blmoore/thesis

gha_language: TeX

repo_name: blmoore/thesis


text:
---
title: Proxy
author: Vladimir
date: 2023-04-25
description: Proxy label
---

## Description

A proxy entity is a special type of entity that serves as an intermediary between other entities.

For example: Instead of interacting directly with the target contract, all calls are directed through the proxy, which then delegates
the request to the intended target contract. This allows for a greater degree of control and flexibility over the
contract's behavior.

## API Name

`proxy`

## Label Examples

MakerDAO DSProxy Contract [0x00002c65ba1e64d2fd8c6ffb7160fd6bde9e17dd]

## Available Blockchains

* ethereum

repository: santiment/academy

repo_name: santiment/academy


text:
Title: Personal Media Networks @ FOSDEM 2009
Date: 2009-03-19 10:01:39
Author: willsheward
Slug: personal-media-networks-fosdem-2009
Category: post
Tags:
Summary: description:
Link: http://xmpp.org/2009/03/personal-media-networks-fosdem-2009/
post_id: 345

XMPP isn't just about instant messaging - in his talk at FOSDEM, Dirk Meyer explored how XMPP can form the basis of a powerful, yet secure, Personal Media Network - allowing access to your music collection from wherever you are, playing your videos on your friend's TV, and seemlessly integrating your personal collection with global media.  [Dirk's Presentation is available in PDF format here](http://stage.xmpp.org/?attachment_id=349).   [caption id="attachment_346" align="aligncenter" width="422" caption="Dirk Meyer @ FOSDEM 2009"][![Dirk Meyer @ FOSDEM 2009](http://stage.xmpp.org/wp-content/uploads/2009/03/dirk.jpg)](http://stage.xmpp.org/?attachment_id=346)[/caption]

repository: Florob/site

repo_name: Florob/site


text:
# tapestry-react

![status](https://github.com/eddyson-de/tapestry-react/actions/workflows/main.yml/badge.svg)
[![Join the chat at https://gitter.im/eddyson-de/tapestry-react](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/eddyson-de/tapestry-react?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)

Use React (http://facebook.github.io/react/index.html) together with Tapestry (http://tapestry.apache.org/).

This library provides basic integration for using JSX templates with Tapestry.

## Usage

### `build.gradle`:
```groovy
repositories {
  maven { url "https://jitpack.io" }
}

dependencies {
  implementation 'com.github.eddyson-de:tapestry-react:0.36.0'
}

```

That's it, now you can import modules written in JSX. Just give them the `.jsx(m)` extension and they will be compiled to JavaScript automatically.

### `/META-INF/modules/app/react-test.jsx`:
```javascript
define(['t5/core/dom', 'react', 'react-dom'], function(dom, React, ReactDOM) {
  var HelloMessage = React.createClass({
    render: function() {
      return <div>Hello {this.props.name}</div>;
    }
  });
  var mountNode = (dom('example')).element;
  ReactDOM.render(<HelloMessage name="John" />, mountNode);
});

```

## Components
You can also use the `ReactComponent` component to keep the components' code separate from the page code:

### `/META-INF/modules/app/react/HelloMessage.jsx`:
```javascript
define(['react'], function(React) {
  return React.createClass({
    render: function() {
      return <div>Hello {this.props.name}</div>;
    }
  });
});
```

### `/org/example/app/pages/ReactDemo.tml`:
```html
<html title="React Demo Index"
	xmlns:t="http://tapestry.apache.org/schema/tapestry_5_4.xsd"
	xmlns:r="tapestry-library:react">
	<div class="row">
		<div class="col-md-10 col-md-offset-1 col-lg-8 col-lg-offset-2">
			<r:reactcomponent module="app/react/HelloMessage" name="John"/>
		</div>
	</div>
</html>
```

## ECMAScript 6 modules => AMD
If you want to write your classes as ES6 rather than AMD moudules, just use the `.jsxm` file extension to switch the transpiler to AMD output.

### `/META-INF/modules/app/react/HelloMessage.jsxm`:
```javascript
import React from 'react'

export default class HelloMessage extends React.Component {

  constructor(props){
    super(props);
  }

  render(){
    return (
      <div>Hello {this.props.name}!</div>
    )
  }
}

```
## Development code
If you want code to be executed only in development mode but not in production, you can use the `__DEV__` pseudo variable:
```javascript

if (__DEV__) {
  MyComponent.propTypes = {
    ...
  }
}

```
This will be compiled to `if (true)` or `if (false)` depending on the value of the `tapestry.production-mode` symbol.

## Standalone compiler
If you want to compile code outside of a Tapestry application (e.g. in your Gradle build), you can use the `de.eddyson.tapestry.react.StandaloneCompiler` and `de.eddyson.tapestry.react.readers.CompilingBabelReader` classes.

## Demo?
Unfortunately, there is no live demo available, but the test application can be examined by running `./gradlew runTestApp` and pointing your browser to `http://localhost:9040/`.

## Notes
### Speeding things up in production
Compiling templates can take some time. Combined with minification, this can quickly lead to Require.js timeouts in production.
To speed things up, you can have the files pre-compiled and minified upon registry startup using https://github.com/eddyson-de/tapestry-minification-cache-warming.
### Calling server-side code
You will probably end up having a lot of React components that do not have an associated page class. If this is the case and you find yourself wanting a proper REST API rather than component- or page-level event handlers, have a look at https://github.com/tynamo/tapestry-resteasy.

repository: eddyson-de/tapestry-react

gha_language: Java

repo_name: eddyson-de/tapestry-react


text:
---
layout: post
title: NUGO Dark Chocolate Pretzel Protein Bar
---

Rating & Review by: Rina

This bar slapped. I don't think I'll ever get tired of the taste. Unlike most other protein bars, it had a distinct saltiness to it, as promised by the pretzel flavor. As usual, the crunch factor and dark chocolate coating were gr9. Definitely one of my favorites. Would recommend.

# Ratings:

### Health: 8/10
### Taste: 10/10
### Texture: 10/10

## Overall rating: 10/10

![nugo dark chocolate pretzel](../images/bars/nugodarkpretzel.jpg "NUGO Dark Mocha Chocolate Bar")


text:
# Contributing to Mobility

Thanks for your interest in contributing to Mobility! Contributions are welcomed and encouraged. Bug reports, feature requests, and refactoring are all a great help, but please follow the instructions below to ensure things go as smoothly as possible.

## Questions

If you have a question about *usage* which is not covered in the [readme](https://github.com/shioyama/mobility/blob/master/README.md), [wiki](https://github.com/shioyama/mobility/wiki) or [API documentation](http://www.rubydoc.info/gems/mobility), please post a question to StackOverflow tagged with the [mobility tag](https://stackoverflow.com/questions/tagged/mobility). Questions will not be answered in Github issues, which are reserved for actual bugs and feature requests.

## Bugs

Notice a bug or something that seems not to be working correctly? Great, that's valuable information. First off, make sure you go through the [Github issues](https://github.com/shioyama/mobility/issues?utf8=%E2%9C%93&q=is%3Aissue) to see if what you're experiencing has already been reported.

If not, please post a new issue explaining how the issue happens, and steps to reproduce it. Also include what backend you are using, what ORM (ActiveRecord, Sequel, etc.), what Ruby version, and if relevant what platform, etc.

## Feature Requests

Have an idea for a new feature? Great! Please sketch out what you are thinking of and create an issue describing it in as much detail as possible. Note that Mobility aims to be as simple as possible, so complex features will probably not be added, but extensions and integrations with other gems may be created outside of the Mobility gem itself.

## Questions

If you are having issues understanding how to apply Mobility to your particular use case, or any other questions about the gem, please post a question to [Stack Overflow](http://stackoverflow.com) tagged with "mobility". If you don't get an answer, post an issue to the repository with a link to the question and someone will try to help you asap.

## Features

If you've actually built a new feature for Mobility, go ahead and make a pull request and we will consider it. In general you will need to have tests for whatever feature you are proposing.

To test that your feature does not break existing specs, run the specs with:

```ruby
bundle exec rspec
```

This will run specs which are not dependent on any ORM (pure Ruby specs only). To test against ActiveRecord, you will need to set the `ORM` environment variable, like this:

```ruby
ORM=active_record bundle exec rspec
```

This will run AR specs with an sqlite3 in-memory database. If you want to run specs against a specific database, you will need to specify which database to use with the `DB` env (either `mysql` or `postgres`), and first create and migrate the database:

```ruby
ORM=active_record DB=postgres bundle exec rspec
```

... will run the specs against Mobility running with AR 5.1 with postgres as the database.

For more info, see the [Testing Backends](https://github.com/shioyama/mobility#testing-backends) section of the README.

Once you've ensured that existing specs do not break, please try to write at least one spec covering the new feature. If you have questions about how to do this, first post the PR and we can help you in the PR comments section.

Note that when you submit the pull request, Travis CI will run the [test suite](https://travis-ci.org/mobility/mobility) against your branch and will highlight any failures. Unless there is a good reason for it, we do not generally accept pull requests that take Mobility from green to red.

## Other Resources

Be sure to check out these resources for more detailed info on how Mobility works:

- [API docs](http://www.rubydoc.info/gems/mobility)
- [Wiki](https://github.com/shioyama/mobility/wiki)
- [Translating with Mobility](http://dejimata.com/2017/3/3/translating-with-mobility)

repository: shioyama/mobility

gha_language: Ruby

repo_name: shioyama/mobility


text:
# React Bootstrap4 Tree View

![Bootstrap Tree View Default](https://raw.githubusercontent.com/gooney-zhu/react-bootstrap4-tree/master/screenshot/default.PNG)

## Dependencies

The project has very few dependencies, but you will need the following.
- [React](https://facebook.github.io/react/)
- [Bootstrap v4.3.1 (>= 4.0.0)](http://getbootstrap.com/)

## Getting Started

### Install

Npm:
```javascript
$ npm install react-bootstrap4-tree
```

### Usage

Include the correct styles, it's mainly just bootstrap but we add a few tweaks as well.

```html
<!-- Required CSS -->
<link href="path/to/bootstrap.css" rel="stylesheet">
```

OR

```javascript
npm install bootstrap
```
In index.js:
```javascript
import 'bootstrap/dist/css/bootstrap.css'
```

Then, a basic initialization would look like.

```javascript
React.render(
	<TreeView data={data} />,
	document.getElementById('treeview')
);
```

## Data Structure

In order to define the hierarchical structure needed for the tree it's necessary to provide a nested array of JavaScript objects.
You can define your custom data in the tree data.

Example

```javascript
let data = [
    {
        text: 'a1',
        customData: {
            id: '1'
        },
        nodes: [
            {
                text: 'a1-a1',
                customData: {
                    id: '2'
                },
                nodes: []
            }
        ]
    },
    {
        text: 'a2',
        customData: {
            id: '3'
        },
        nodes: [
            {
                text: 'a2-a1',
                customData: {
                    id: '4'
                },
                nodes: [
                    {
                        text: 'a2-a1-a1'
                    },
                    {
                        text: 'a2-a1-a2'
                    }
                ]
            }
        ]
    },
    {
        text: 'a3',
        customData: {
            id: '7',
            other: 'other'
        },
        nodes: [
            {
                text: 'a3-a1',
                customData: {
                    id: '9',
                    another: 'another'
                },
                nodes: [
                    {
                        text: 'a2-a1-a1',
                        nodes: [
                            {
                                text: 'a2-a1-a1'
                            },
                            {
                                text: 'a2-a1-a2'
                            }
                        ]
                    },
                    {
                        text: 'a2-a1-a2'
                    }
                ]
            },
            {
                text: 'a3-a2'
            }
        ]
    },
];
```

If you want to do more, here's the full node specification

```javascript
{
  text: "Text 1",
  color: "#000000",
  backgroundColor: "#FFFFFF",
  showBorder: true,
  showSelect: true,
  state: {
  	expanded: true,
  	selected: true
  },
  customData: {

  },
  nodes: [
    {},
    ...
  ]
}
```

### Node Properties

The following properties are defined to allow node level overrides, such as node specific colors and border.

#### text
`String` `Mandatory`

The text value displayed for a given tree node.

#### color
`String` `Optional`

The foreground color used on a given node, overrides global color option.

#### backgroundColor
`String` `Optional`

The background color used on a given node, overrides global color option.

#### state
`Object` `Optional`

Describes a node's initial state.

#### state.expanded
`Boolean` `Default: false`

Whether or not a node is expanded i.e. open.  Takes precedence over global option levels.

#### state.selected
`Boolean` `Default: false`

Whether or not a node is selected.

## Options

Options allow you to customise the treeview's default appearance and behaviour.  They are passed to the react component as properties on initialization.

```javascript
// Example: initializing the treeview
// with a background color of green
// with onExpand and onSelect function

let onExpand = function(nodeData, treeData) {
    console.log(nodeData);
    console.log(treeData);
}

let onSelect = function(nodeData, treeData) {
    console.log(nodeData);
    console.log(treeData);
}

React.render(
	<TreeView data={data} backgroundColor="green" onExpand={onExpand} onSelect={onSelect} />,
	document.getElementById('treeview')
);
```

The following is a list of all available options.

#### data
Array of Objects.  No default, expects data

This is the core data to be displayed by the tree view.

#### color
String, [any legal color value](http://www.w3schools.com/cssref/css_colors_legal.asp).  Default: inherits from Bootstrap.css.

Sets the default foreground color used by all nodes, except when overridden on a per node basis in data.

#### backgroundColor
String, [any legal color value](http://www.w3schools.com/cssref/css_colors_legal.asp).  Default: inherits from Bootstrap.css.

Sets the default background color used by all nodes, except when overridden on a per node basis in data.

#### showBorder
Boolean.  Default: true

Whether or not to display a border around nodes.

#### showSelect
Boolean.  Default: true

Whether or not to display a select icon.

#### onExpand
Function.  Default: Undefined

When the tree node expand or collapse, this function will be call. It will pass the current node data and the whole tree data as parameter.

#### onSelect
Function.  Default: Undefined

When the tree node is selected or unselected, this function will be call. It will pass the current node data and the whole tree data as parameter.

## License
[MIT license](http://opensource.org/licenses/MIT).


text:
---
layout: project_single
title:  "The 4-Week Dumbbell Workout Plan Part 2: Arms"
slug: "the-4-week-dumbbell-workout-plan-part-2-arms"
parent: "workout-calendar"
---
Dumbbell Workout Plan - ARMS! All you've got at home is a pair of dumbbells? Fear not? There is Still plenty of moves you can do to hit just about every major muscle group - ARMS. Although all arm dumbbell exercises below are simple, the way they are performed, can make all the difference in creating a workout that works. When you want to isolate specific muscle groups in the arms, using dumbbells is truly effective.


text:
# Privacy

## General Information
Gmailsync does not collect or send to third parties any information, not even usage metrics or error logs.

All information required for gmailsync to work is stored locally in your computer and nowhere else. This information includes:
 * The credentials for your project on the Google Cloud Platform.
 * The token for your user with the permissions granted.
 * The email messages, labels, or any other information retrieved through the Gmail API.
 * Application logs.

## Disclaimer
Since the objective of this application is to run locally on the user's computer it is the complete and absolute responsability of the user to securize and keep safe its own information.
None of the collaborators of this project, nor the project itself are responsible for any lost, theft or manipulation of the data stored on the user's computer.

repository: albertoalcolea/gmailsync

repo_name: albertoalcolea/gmailsync


text:
# inquirer-autocomplete-prompt-ipt

Autocomplete prompt for [inquirer](https://github.com/SBoudrias/Inquirer.js) fork, optimized for [iPipeTo](https://github.com/ruyadorno/ipt).

[![build status](https://secure.travis-ci.org/ruyadorno/inquirer-autocomplete-prompt.svg)](http://travis-ci.org/ruyadorno/inquirer-autocomplete-prompt)

## :warning: Important info about this fork

This is an attempt to keep a better maintained fork of **inquirer-autocomplete-prompt** since it's an important dependency of [iPipeTo](https://github.com/ruyadorno/ipt) and I do care about having nested dependencies up to date.

Published versions of this fork can be find at [inquirer-autocomplete-prompt-ipt](https://www.npmjs.com/package/inquirer-autocomplete-prompt-ipt) package in **npm**. e.g: `npm install inquirer-autocomplete-prompt-ipt` if you want to use it :blush:

<br />

## Usage

This prompt is anonymous, meaning you can register this prompt with the type name you please:

```javascript
inquirer.registerPrompt('autocomplete', require('inquirer-autocomplete-prompt'));
inquirer.prompt({
  type: 'autocomplete',
  ...
})
```

Change `autocomplete` to whatever you might prefer.

### Options

> **Note:** _allowed options written inside square brackets (`[]`) are optional. Others are required._

`type`, `name`, `message`, `source`[, `pageSize`, `filter`, `when`, `suggestOnly`, `validate`]

See [inquirer](https://github.com/SBoudrias/Inquirer.js) readme for meaning of all except **source** and **suggestOnly**.

**Source** will be called with previous answers object and the current user input each time the user types, it **must** return a promise.

**Source** will be called once at at first before the user types anything with **undefined** as the value. If a new search is triggered by user input it maintains the correct order, meaning that if the first call completes after the second starts, the results of the first call are never displayed.

**suggestOnly** is default **false**. Setting it to true turns the input into a normal text input. Meaning that pressing enter selects whatever value you currently have. And pressing tab autocompletes the currently selected value in the list. This way you can accept manual input instead of forcing a selection from the list.

**validate** is only active when **suggestOnly** is set to **true**. It behaves like validate for the input prompt.

#### Example

```javascript
inquirer.registerPrompt('autocomplete', require('inquirer-autocomplete-prompt'));
inquirer.prompt([{
  type: 'autocomplete',
  name: 'from',
  message: 'Select a state to travel from',
  source: function(answersSoFar, input) {
    return myApi.searchStates(input);
  }
}]).then(function(answers) {
  //etc
});
```

See also [example.js](https://github.com/mokkabonna/inquirer-autocomplete-prompt/blob/master/example.js) for a working example.

I recommend using this package with [fuzzy](https://www.npmjs.com/package/fuzzy) if you want fuzzy search. Again, see the example for a demonstration of this.

![Autocomplete prompt](./inquirer.gif)

## Credits
[Martin Hansen](https://github.com/mokkabonna/)

## License

ISC

license: ISC

gha_language: C


text:
---
layout: post
title:  "Rule Book Clarification"
date:   2015-08-29
author: "Bruce Maurer"
---

Rule Book, Page 63, the Penalty Summary, the second line states:

forward pass - (S35-9) - 5 yards plus loss of down; Arts. 2d, 3 - intentional

This is in error. It should read:

forward pass - (S35-9) - 5 yards plus loss of down; Arts. 2d, e - intentional

repository: paulghaddad/ohsaafb

branch_name: refs/heads/main

gha_language: HTML

repo_name: paulghaddad/ohsaafb


text:
---
permalink: /guides/collection-springboot2/
layout: guide-markdown
title: Developing cloud native microservices with the Spring Boot application stack
duration: 40 minutes
releasedate: 2020-01-27
description: Explore how to use the Spring Boot application stack to create, run, update, deploy, and deliver cloud native microservices.
tags: ['Java', 'Spring Boot', 'Spring', 'Tomcat', 'Collection']
guide-category: stacks
---
<!-- Note:
> This repository contains the guide documentation source. To view
> the guide in published form, view it on the [website](https://kabanero.io/guides/{projectid}.html).
-->

<!--
//
//	Copyright 2019, 2020 IBM Corporation and others.
//
//	Licensed under the Apache License, Version 2.0 (the "License");
//	you may not use this file except in compliance with the License.
//	You may obtain a copy of the License at
//
//	http://www.apache.org/licenses/LICENSE-2.0
//
//	Unless required by applicable law or agreed to in writing, software
//	distributed under the License is distributed on an "AS IS" BASIS,
//	WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
//	See the License for the specific language governing permissions and
//	limitations under the License.
//
-->

<!--
// =================================================================================================
// What you'll learn
// =================================================================================================
-->

## What you'll learn

In this guide, you’ll learn how to create and run a simple cloud native microservice based on the Spring Boot application stack. You’ll learn how to configure your development environment, update the microservice that you created and deploy it to Kubernetes or serverless. Deployment to serverless is optional depending on whether you want to Scale to Zero.

The Spring Boot application stack enables the development and optimization of microservices. With application stacks, developers don’t need to manage full software development stacks or be experts on underlying container technologies or Kubernetes. Application stacks are customized for specific enterprises to incorporate their company standards and technology choices.

Applications in this guide are written based on the Spring Boot API specifications, built and run with [Apache Tomcat](http://tomcat.apache.org/), and deployed to Kubernetes through a modern DevOps toolchain that is triggered in Git.

<!--
// =================================================================================================
// Prerequisites
// =================================================================================================
-->

## Prerequisites

- [Docker](https://docs.docker.com/get-started/) must be installed.
- [Appsody](https://appsody.dev/docs/getting-started/installation) must be installed.
- *Optional:* If your organisation has customized application stacks, you need the URL that points to the `index.yaml` configuration file.
- *Optional*: If you are testing multiple microservices together, you must have access to a local Kubernetes cluster for local development.
If you are using Docker Desktop, you can enable Kubernetes from the menu by selecting *Preferences* -> *Kubernetes* -> *Enable Kubernetes*. Other options include [Minishift](https://www.okd.io/minishift/) or [Minikube](https://kubernetes.io/docs/setup/learning-environment/minikube/). If you want to use remote cluster development, use Codewind.

<!--
// =================================================================================================
// Getting started
// =================================================================================================
-->

## Getting started

<!--
// =================================================================================================
// Configuring your development environment
// =================================================================================================
-->

### Configuring your development environment

To check the repositories that you can already access, run the following command:

```shell
appsody repo list
```

You see output similar to the following example:

```shell
NAME        URL
*incubator https://github.com/appsody/stacks/releases/latest/download/incubator-index.yaml
```

Next, run the following command to add the URL for your stack configuration file:

```shell
appsody repo add <my-org-stack> <URL>
```

where `<my-org-stack>` is the repository name for your stack hub and `<URL>` is the URL for
your stack hub index file.

**Note:** If you do not have a stack hub that contains customized, pre-configured application stacks, you can skip to
[Initializing your project](#initializing-your-project) and develop your app based on the public application stack
for Spring Boot.

Check the repositories again by running `appsody repo list` to see that your stack hub was added. In the following examples, the stack hub is called `acme-stacks` and the URL is `https://github.com/acme.inc/stacks/index.yaml`:

```shell
NAME        URL
*incubator https://github.com/appsody/stacks/releases/latest/download/incubator-index.yaml
acme-stacks https://github.com/acme.inc/stacks/index.yaml
```

In this example, the asterisk (\*) shows that `incubator` is the default repository. Run the following command to set `acme-stacks` as the default repository:

```shell
appsody repo set-default acme-stacks
```

Check the available repositories again by running `appsody repo list` to see that the default is updated:

```shell
NAME        URL
incubator   https://github.com/appsody/stacks/releases/latest/download/incubator-index.yaml
*acme-stacks https://github.com/acme.inc/stacks/index.yaml
```

**Recommendation**: To avoid initializing projects that are based on the public application stacks, it's best to remove `incubator` from the list. Run the following command to remove the `incubator` repository:

```shell
appsody repo remove incubator
```

Check the available repositories again by running `appsody repo list` to see that `incubator` is removed:

```shell
NAME        URL
*acme-stacks https://github.com/acme.inc/stacks/index.yaml
```

Your development environment is now configured to use your customized application stacks. Next, you need to initialize your project.

<!--
// =================================================================================================
// Initializing your project
// =================================================================================================
-->

### Initializing your project

First, create a directory that will contain the project:

```shell
mkdir -p ~/projects/simple-spring-boot2
cd ~/projects/simple-spring-boot2
```

Run the following command to initialize your Spring Boot project:

```shell
appsody init java-spring-boot2
```

The output from the command varies depending on whether you have an installation of Java on your system. The following output is from a system that has Java installed:

```shell
Running appsody init...
Downloading java-spring-boot2 template project from https://github.com/kabanero-io/collections/releases/download/0.5.0/incubator.java-spring-boot2.v0.3.9.templates.default.tar.gz
Download complete. Extracting files from java-spring-boot2.tar.gz
Setting up the development environment
Running command: docker[pull kabanero/java-spring-boot2:0.3]
Running command: docker[run --rm --entrypoint /bin/bash kabanero/java-spring-boot2:0.3 -c find /project -type f -name .appsody-init.sh]
Extracting project from development environment
Running command: docker[create --name my-project-extract -v /home/username/projects/simple-spring-boot2/.:/project/user-app -v /home/username/.m2/repository:/mvn/repository kabanero/java-spring-boot2:0.3]
Running command: docker[cp my-project-extract:/project /home/username/.appsody/extract/simple-spring-boot2]
Running command: docker[rm my-project-extract -f]
Project extracted to /home/username/projects/simple-spring-boot2/.appsody_init
Running command: ./.appsody-init.sh[]
Successfully initialized Appsody project
```

Your project is now initialized.

<!--
// =================================================================================================
// Understanding the project layout
// =================================================================================================
-->

### Understanding the project layout

For context, the following image displays the structure of the project that you’re working on:

![Project structure](/img/guide/collection-springboot2-spring-files.png)

This project contains the following artifacts:

- `pom.xml`, the project build file
- `LivenessEndpoint.java`, an example Liveness Endpoint
- `Main.java`, a Spring Application class
- `application.properties`, containing some configuration options for Spring
- `index.html`, a static file
- `MainTests.java`, a simple test class

<!--
// =================================================================================================
// Running the development environment
// =================================================================================================
-->

## Running the development environment

Run the following command to start the development environment:

```shell
appsody run
```

The CLI launches a local Docker image that contains an Apache Tomcat server that hosts the microservice. After some time, you see a message similar to the following example:

```shell
[Container] 2019-09-12 17:28:44.066  INFO 171 --- [  restartedMain] o.s.b.a.e.web.EndpointLinksResolver      : Exposing 4 endpoint(s) beneath base path '/actuator'
[Container] 2019-09-12 17:28:44.205  INFO 171 --- [  restartedMain] o.s.b.w.embedded.tomcat.TomcatWebServer  : Tomcat started on port(s): 8080 (http) with context path ''
[Container] 2019-09-12 17:28:44.209  INFO 171 --- [  restartedMain] application.Main                         : Started Main in 6.051 seconds (JVM running for 6.923)
```

This message indicates that the Tomcat server is started. Browse to `http://localhost:8080` and you can see the splash screen.

![Browser showing splash screen](/img/guide/collection-springboot2-splashscreen.png)

You are now ready to begin developing your application.

<!--
// =================================================================================================
// Creating and updating the application
// =================================================================================================
-->

## Creating and updating the application

In this example, you will create a new REST endpoint and add it to the application.

Create an `ExampleEndpoint.java` class in the `src/main/java/application` directory. Open the file, add the following code, and save it:

```java
package application;

import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class ExampleEndpoint {

    @RequestMapping("/example")
    public String example() {
        return "This is an example";
    }
}
```

After you save, the source compiles and the application updates. You see messages similar to the following example:

```shell
[Container] Running: /project/java-spring-boot2-build.sh recompile
[Container] Compile project in the foreground
[Container] > mvn compile
[Container] [INFO] Scanning for projects...
[Container] [INFO]
[Container] [INFO] ----------------------< dev.appsody:application >-----------------------
[Container] [INFO] Building application 0.0.1-SNAPSHOT
[Container] [INFO] --------------------------------[ jar ]---------------------------------
[Container] [INFO]
[Container] [INFO] --- maven-resources-plugin:3.1.0:resources (default-resources) @ application ---
[Container] [INFO] Using 'UTF-8' encoding to copy filtered resources.
[Container] [INFO] Copying 2 resources
[Container] [INFO]
[Container] [INFO] --- maven-compiler-plugin:3.8.1:compile (default-compile) @ application ---
[Container] [INFO] Changes detected - recompiling the module!
[Container] [INFO] Compiling 3 source files to /project/user-app/target/classes
[Container] [INFO]
[Container] [INFO] --- maven-antrun-plugin:1.1:run (trigger-spring-restart) @ application ---
[Container] [INFO] Executing tasks
[Container]      [echo] Triggering Spring app restart.
[Container] [INFO] Executed tasks
[Container] [INFO] ------------------------------------------------------------------------
[Container] [INFO] BUILD SUCCESS
[Container] [INFO] ------------------------------------------------------------------------
[Container] [INFO] Total time:  3.585 s
[Container] [INFO] Finished at: 2019-09-12T17:34:37Z
[Container] [INFO] ------------------------------------------------------------------------
[Container] 2019-09-12 17:34:38.316  INFO 171 --- [      Thread-15] o.s.s.concurrent.ThreadPoolTaskExecutor  : Shutting down ExecutorService 'applicationTaskExecutor'
[Container]
[Container]   .   ____          _            __ _ _
[Container]  /\\ / ___'_ __ _ _(_)_ __  __ _ \ \ \ \
[Container] ( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
[Container]  \\/  ___)| |_)| | | | | || (_| |  ) ) ) )
[Container]   '  |____| .__|_| |_|_| |_\__, | / / / /
[Container]  =========|_|==============|___/=/_/_/_/
[Container]  :: Spring Boot ::        (v2.1.6.RELEASE)
...
[Container] 2019-09-12 17:34:39.711  INFO 171 --- [  restartedMain] o.s.b.a.e.web.EndpointLinksResolver      : Exposing 4 endpoint(s) beneath base path '/actuator'
[Container] 2019-09-12 17:34:39.772  INFO 171 --- [  restartedMain] o.s.b.w.embedded.tomcat.TomcatWebServer  : Tomcat started on port(s): 8080 (http) with context path ''
[Container] 2019-09-12 17:34:39.773  INFO 171 --- [  restartedMain] application.Main                         : Started Main in 1.403 seconds (JVM running for 362.487)
[Container] 2019-09-12 17:34:39.788  INFO 171 --- [  restartedMain] .ConditionEvaluationDeltaLoggingListener : Condition evaluation unchanged
```

If you browse to the `http://localhost:8080/example` URL, the endpoint response is displayed, as shown in the following image:

![Browser showing example endpoint](/img/guide/collection-springboot2-example.png[)

Try changing the message in the `ExampleEndpoint.java` file, then save and refresh the page. You'll see that it takes only a few seconds for the change to take effect.

<!--
// =================================================================================================
// Testing the application
// =================================================================================================
-->

## Testing the application

If you are building an application that is composed of microservices, you need to test within the context of the overall system. First, test your application and perform unit testing in isolation. To test the application as part of the system, deploy the system and then the new application.

You can choose how you want to deploy the system and application. If you have adequate CPU and memory to run MiniShift, the application, and the associated services, then you can deploy the application on a local Kubernetes that is running on your computer. Alternatively, you can enable Docker Desktop for Kubernetes, which is described in the Prerequisites section of the guide.

You can also deploy the system, application, and the associated services in a private namespace on a development cluster. From this private namespace, you can commit the microservices in Git repositories and deploy them through a DevOps pipeline, not directly to Kubernetes.

<!--
// =================================================================================================
// Testing locally on Kubernetes
// =================================================================================================
-->

### Testing locally on Kubernetes

After you finish writing your application code, the CLI makes it easy to deploy directly to a Kubernetes cluster for further local testing. The ability to deploy directly to a Kubernetes cluster is valuable when you want to test multiple microservices together or test with services that the application requires.

Ensure that your `kubectl` command is configured with cluster details and run the following command to deploy the application:

```shell
appsody deploy
```

This command builds a new Docker image that is optimized for production deployment and deploys the image to your local Kubernetes cluster. After some time you see a message similar to the following example:

```shell
Deployed project running at http://localhost:30262
```

Run the following command to check the status of the application pods:

```shell
kubectl get pods
```

In the following example output, you can see that a `simple-spring-boot2` pod is running:

```shell
NAME                                   READY   STATUS    RESTARTS   AGE
appsody-operator-859b97bb98-xm8nl      1/1     Running   1          8d
simple-spring-boot2-77d6868765-bhd8x   1/1     Running   0          3m21s
```

After the `simple-spring-boot2` pod starts, go to the URL that was returned when you ran the `appsody deploy` command, and you see the splash screen. To see the response from your application, point your browser to the `<URL_STRING>/example` URL, where `<URL_STRING>` is the URL that was returned. For example, `http://localhost:30262` was returned in the previous example. Go to the `http://localhost:30262/example` URL to see the deployed application response.

Use the following command to stop the deployed application:

```shell
appsody deploy delete
```

After you run this command and the deployment is deleted, you see the following message:

```shell
Deployment deleted
```

<!--
// =================================================================================================
// Testing with serverless
// =================================================================================================
-->

### Testing with serverless

You can choose to test an application that is deployed with serverless to take advantage of Scale to Zero. Not all applications can be written to effectively take advantage of Scale to Zero. The Kabanero operator-based installation configures serverless on the Kubernetes cluster. Because of the resources that are required to run serverless and its dependencies, testing locally can be difficult. Publish to Kubernetes by using pipelines that are described later in the guide. Your operations team can configure the pipelines so that serverless is enabled for deployment.

<!--
// =================================================================================================
// Publishing to Kubernetes by using pipelines
// =================================================================================================
-->

## Publishing to Kubernetes by using pipelines

After you develop and test your application in your local environment, it’s time to publish it to your enterprise’s pipeline. From your enterprise’s pipeline, you can deploy the application to the appropriate Kubernetes cluster for staging or production. Complete this process in Git.

When Kabanero is installed, deploying applications to a Kubernetes cluster always occurs through the DevOps pipeline that is triggered in Git. Using DevOps pipelines to deploy applications ensures that developers can focus on application code, not on containers or Kubernetes infrastructure. From an enterprise perspective, this deployment process ensures that both the container image build and the deployment to Kubernetes or Knative happen in a secure and consistent way that meets company standards.

To deliver your application to the pipeline, push the project to the pre-configured Git repository that has a configured webhook. This configured webhook triggers the enterprise build and deploy pipeline.


text:
# Metasploit Resource Portal Data

This is the public repository for all the data that fuels the
[Metasploit Resource Portal][site], a community-driven effort
to collect and highlight especially useful resources for [Metasploit
Framework][framework] users and developers.

This Resource Portal is no mere link farm of out-of-date documentation.
Oh no. If you're looking for that, [let me Google that for you][lmgtfy]
-- there are nearly **900,000** such links for you to peruse.

Instead, the Resource Portal is a **curated** and **continuously
reviewed** collection of the most helpful videos, blog posts, podcasts,
and other helpful resources, produced mainly by community contributors.

While we do have some [Getting Started][getting-started] links, most of
the resources are heavy on more advanced developer and penetration-tester
[pro tips][pro-tips].

## Adding a Resource

If you have found or written something especially insightful involving
Metasploit, we'd love to hear about it! The procedure for review and
inclusion is easy:

1. [Fork] this repository.
1. Edit the appropriate category's corresponding [YAML][psych] file in the [data] subdirectory.
1. Create a [pull request][pulls] describing your resource addition.

All suggestions need to include at least a URL, a date, a title, and an
author. Follow the existing format, and you should be fine.

Once that's done, one of the kind collaborators will review it for
accuracy and relevency, and hopefully, include it on the [site] with a
heart-felt commit message of thanks.

## Other suggestions

If you have a more general bug or feature to report or suggest for the
site itself, feel free to [open an issue][issues].

  [site]: http://resources.metasploit.com
  [framework]: https://github.com/rapid7/metasploit-framework
  [fork]: https://guides.github.com/activities/forking/
  [psych]: https://github.com/tenderlove/psych
  [lmgtfy]: http://lmgtfy.com/?q=metasploit
  [issues]: https://github.com/metasploit/resource-portal-data/issues
  [data]: https://github.com/metasploit/resource-portal-data/blob/master/data
  [getting-started]: https://github.com/metasploit/resource-portal-data/blob/master/data/getting_started.yml
  [pro-tips]: https://github.com/metasploit/resource-portal-data/blob/master/data/pro_tips.yml
  [pulls]: https://github.com/metasploit/resource-portal-data/pulls

repository: metasploit/resource-portal-data

repo_name: metasploit/resource-portal-data


text:
# Connecting

!

old: `partyConnect(server, app_name, room_name, [callback])`
new: `party.connect(server, app_name, room_name, [clear = true], [callback]clear: option to clear the room if it currently has no connected guests

# Loading Shared Objects (Preloadable Functions)

!done
old: `partyLoadShared(id, [callback])`
new: `party.loadShared(id, [default = {}], [callback])`
maybe: `party.getShared(...)`
default: properties to assign to shared object if it does not exist

!done
old: `partyLoadMyShared([callback])`
new: `party.loadMyShared([default = {}], [callback])`
maybe: `party.getMyShared(...)`
default: properties to assign to shared object if it does not exist

!done
old: `partyLoadParticipantShareds([callback])`
new: `party.loadGuestShareds([callback])`
maybe: `party.getGuestsShareds(...)`

no: only add a shared object to guests array if loadMyShared is called. this would allow observers to see the guests array but not be in it? con, this already sounds confusing.

!done
maybe: only add to guestShareds[] if the shared is non-empty.

# Working with Shared Objects

old: `partySetShared(shared, newData)`
new: `party.setShared(shared, newData)`

old: `partyWatchShared(shared, [path], [callback])`
new: `party.watchShared(shared, [path], [callback])`

# p5.party info functions

old: `partyIsHost()`
maybe: `party.isHost()`
maybe: `party.isHost`
maybe: `party.iAmHost`
maybe: remove

old: -
new: `party.guestCount`
number of guests in the currrent room

old: -
maybe: `party.roomInfo(appName, roomName)`
returns `{guestCount: #, sharedObjects: [{id: string, data: object}]}`

# info panel

old: `partyToggleInfo([show])`
new: `party.toggleInfo([show])`
new: info panel hidden by default

# events

old: `partySubscribe(eventName, callback)`
new: `party.subscribe(eventName, callback)`

old: `partyEmit(eventName, data)`
new: `party.emit(eventName, data)`

# User Functions

maybe: `partySetup()`
called once before setup() only if room is empty
shared objects are hidden from other clients until partySetup() returns
intended for initializing shared objects
benefit over providing default object: - can get room info? - is host? no. always host - guest count? no. always 1 (yourself)
leaning NO

maybe: `partyStep()`
called before each call to draw() only if client is host
jb-i'm not sure if this is a good idea, i think this reflects a good practice but its not very p5-like
leaning NO

maybe: `guestJoined(guestShared)`
ideally called when a guest joins after it inits their own shared object

maybe: `guestLeft(guestShared)`
called when a guest leaves, before their shared object is destroyed

# Clean Up

maybe: `party.resetRoom()`
disconnects all guests and removes all shared objects in the room
including caller?

maybe: `party.deleteShared(shared)`
maybe: `party.disconnect()`
maybe: `party.removeGuest(guest's shared)`
maybe: `party.removeGuests()`

# warnings()

- warn/error on write to guests array (clients should write to `my`)
- warn/error on non host write to "host owned" shared objects (how to mark as host owned? maybe all shared objects are host owned by default?)

# preload()

p5 will will wait for all p5.party shared objects loaded in preload() to become ready before calling setup()


text:
---
layout: default
title: assertSelectOptionsAbsent(locator,options)
parent: web
tags: command web
comments: true
---

### Description
This command asserts that the specified `options` **MUST NOT** be found in the `SELECT` element as denoted by `locator`.
Note that the `options` parameter represents the `OPTION` text, not the `value` attribute of the `OPTION` elements.
Each of the `OPTION` text is separated by [`nexial.textDelimi`](../../systemvars/index.html#nexial.textDelim) or a
newline character. For example,

![](image/assertSelectOptionsPresent_01.png)

The highlighted (blue) portions are the text of the `OPTION` elements mentioned above. So, if one desires to assert that
this `SELECT` element **DOES NOT** contain, say, `русский` and `Polskie`, the following would be the use of this command:

![](image/assertSelectOptionsAbsent_01.png)

As shown above, the target `OPTION` text is separated by comma, which is the default value of
[`nexial.textDelimi`](../../systemvars/index.html#nexial.textDelim). One can also use newline character to separate
each `OPTION` text.

The corresponding step is considered as FAIL if:
- If the target `SELECT` element cannot be located via the specified `locator`.
- If the target `SELECT` element contains one or more of the specified `OPTION` text.

### Parameters
- **locator** - the locator of the target `SELECT` element.
- **options** - the `OPTION` text that MUST NOT exist under the target `SELECT` element.

### See Also
- [`assertAttribute(locator,attrName,value)`](assertAttribute(locator,attrName,value))
- [`assertElementNotPresent(locator,maxWaitMs)`](assertElementNotPresent(locator,maxWaitMs))
- [`assertElementPresent(locator)`](assertElementPresent(locator))
- [`assertSelectOptionsPresent(locator,options)`](assertSelectOptionsPresent(locator,options))
- [`deselect(locator,text)`](deselect(locator,text))
- [`deselectMulti(locator,array)`](deselectMulti(locator,array))
- [`select(locator,text)`](select(locator,text))
- [`selectMulti(locator,array)`](selectMulti(locator,array))
- [`selectMultiByValue(locator,array)`](selectMultiByValue(locator,array))

repository: nexiality/documentation

repo_name: nexiality/documentation


text:
# Monitoring stack for Varnish Operator

This chart's purpose is to show an example of a monitoring stack that monitors the Varnish Operator. Feel free to copy the chart and modify it to your needs.

The monitoring stack is built using the [Prometheus operator](https://github.com/helm/charts/tree/master/stable/prometheus-operator) and assumes it is installed already in the cluster.

The chart does the following:

* Installs and configures Prometheus to scrape Varnish Operator metrics
* Installs and configures Grafana to visualize scraped Prometheus metrics. A sample dashboard is included and available in Grafana after installation.

The example is not a complete solution and does not include PV/PVC creation, secure credentials setup, ingresses, etc. Those parts are left for the user to setup.

## Installation

[Install the operator](https://ibm.github.io/varnish-operator/installation.html) if you haven't yet.

Clone the repo and install the chart using the local path to the chart:

```bash
$ git clone https://github.com/IBM/varnish-operator.git
$ cd varnish-operator
$ helm install varnish-operator-monitoring config/samples/helm-charts/varnish-operator-monitoring
```

Make sure to install the chart in the same namespaces as your operator.

You should see your `Prometheus` and `Grafana` pods starting/running:

```bash
$ kubectl get pods
NAME                                                     READY   STATUS    RESTARTS   AGE
prometheus-varnish-operator-monitoring-prometheus-0      3/3     Running   1          37s
varnish-operator-0                                       1/1     Running   3          2d21h
varnish-operator-monitoring-grafana-6f7ff7f4f9-2pjpj     2/2     Running   0          37s
```

and the corresponding services created:

```bash
$ kubectl get svc
NAME                            TYPE        CLUSTER-IP       EXTERNAL-IP   PORT(S)           AGE
varnish-operator                          ClusterIP   <IP_ADDRESS>     <none>        9131/TCP            2d21h
varnish-operator-monitoring-grafana       ClusterIP   <IP_ADDRESS>    <none>        80/TCP              89s
varnish-operator-monitoring-prometheus    ClusterIP   <IP_ADDRESS>   <none>        9090/TCP            89s
varnish-operator-webhook-service          ClusterIP   <IP_ADDRESS>    <none>        443/TCP             15d
```

Port forward the Grafana pod to see the dashboard:

```bash
$ kubectl port-forward pod/varnish-operator-monitoring-grafana-6f7ff7f4f9-2pjpj 3000
Forwarding from <IP_ADDRESS>:3000 -> 3000
Forwarding from [::1]:3000 -> 3000
```

You can see your dashboard at `localhost:3000`. The login is `admin`, password is `pass`. You will find a dashboard called `Varnish Operator`.

## Uninstall

To uninstall the chart simply delete the chart:

```bash
helm uninstall varnish-operator-monitoring
```


text:
TODO
====

1. Slight (possible) optimization when interpolating.
	-	Currently, compute mean with greatest support first and then remove high and low elements.
	-	This adds an additional 6 operations, including 2 divisions.
	-	If possible, could switch the order, such that smaller support first, so long as does not require additional boolean checks, too much duplicated code, etc.
	-	The issue resides in wanting to early exit if `w2` exceeds `0.5`, obviating the need for interpolation.
2.

repository: compute-io/truncmean

repo_name: compute-io/truncmean


text:
# Learning Lane Graph Representations for Motion Forecasting

```
@inproceedings{lanegcn_eccv20,
author = {Ming Liang and Bin Yang and Rui Hu and Yun Chen and Renjie Liao and Song Feng and Raquel Urtasun},
title = {Learning Lane Graph Representations for Motion Forecasting},
booktitle = {The European Conference on Computer Vision (ECCV)},
pages = {541--556},
year = {2020}
}
```

links
- [springer](https://link.springer.com/chapter/10.1007/978-3-030-58536-5_32)
- [ecva](https://www.ecva.net/papers/eccv_2020/papers_ECCV/html/3622_ECCV_2020_paper.php)
- [arXiv](https://arxiv.org/abs/2007.13732)

gha_language: Jupyter Notebook


text:
# HeadObject

You can call this operation to query the metadata of an object. The object content is not included in the returned results.

## Versioning

By default, the HeadObject operation queries the metadata of the current version of an object. If the current version of the object is a delete marker, OSS returns 404 Not Found. If you specify a version ID in the request, OSS returns the metadata of the specified version of the object.

## Request structure

```
HEAD /ObjectName HTTP/1.1
Host: BucketName.oss-cn-hangzhou.aliyuncs.com
Date: GMT Date
Authorization: SignatureValue
```

## Request headers

|Header|Type|Required|Description|
|:-----|:---|:-------|:----------|
|If-Modified-Since|String|No|The information return condition. If the specified time is earlier than the last modified time of the object, OSS returns the metadata of the object and 200 OK. If the specified time is equal to or later than the last modified time of the object, OSS returns 304 Not Modified. Default value: null |
|If-Unmodified-Since|String|No|The information return condition. If the specified time is equal to or later than the last modified time of the object, OSS returns the metadata of the object and 200 OK. If the specified time is earlier than the last modified time of the object, OSS returns 412 Precondition Failed. Default value: null |
|If-Match|String|No|The information return condition. If the input ETag value matches the ETag value of the object, OSS returns the metadata of the object and 200 OK. If the input ETag value does not match the ETag value of the object, OSS returns 412 Precondition Failed. Default value: null |
|If-None-Match|String|No|The information return condition. If the input ETag value does not match the ETag value of the object, OSS returns the metadata of the object and 200 OK. If the input ETag value matches the ETag value of the object, OSS returns 304 Not Modified. Default value: null |

## Response headers

If the requested object is a symbolic link, the following headers are included in the response:

-   The Content-Length, ETag, and Content-Md5 headers are the metadata of the object to which the symbolic link points.
-   The Last-Modified header is the later one of the last modified time of the symbolic link and the object to which the symbolic link points.
-   Other headers are the metadata of the symbolic link.

|Header|Type|Description|
|:-----|:---|:----------|
|x-oss-meta-\*|String|The user metadata prefixed with x-oss-meta-. If you specify headers prefixed with x-oss-meta- in the PutObject request when you upload an object, the user metadata of the object is included in the response.|
|Custom headers that are not prefixed with x-oss-meta-|String|If you specify headers that are not prefixed with x-oss-meta- in the PutObject request to configure the user metadata of the object, the headers are included in the response. Example: x-oss-persistent-headers: key1:base64\_encode\(value1\),key2:base64\_encode\(value2\).....|
|x-oss-server-side-encryption|String|This header is included in the response if the object is encrypted by using the server-side encryption algorithm based on entropy encoding. The value of this header is the algorithm used to encrypt the object at the server side.|
|x-oss-server-side-encryption-key-id|String|This header is included in the response if the object is encrypted by using KMS at the server side. The value of this header is the CMK ID used to encrypt the object.|
|x-oss-storage-class|String|The storage class of the object. Valid values: -   Standard: provides highly reliable, highly available, and high-performance object storage services that can handle frequent data access.
-   IA: is suitable for long-term storage of data that is infrequently accessed \(once or twice per month on average\).
-   Archive: is suitable for long-term \(at least six months\) storage of data that is infrequently accessed. The data takes up to one minute to restore before it can be read.
-   Cold Archive: is suitable for long-term storage of data that is rarely accessed. |
|x-oss-object-type|String|The type of the object. Valid values: -   Normal: The object is uploaded by using PutObject.
-   Appendable: The object is uploaded by using AppendObject.
-   Multipart: The object is uploaded by using MultipartUpload. |
|x-oss-next-append-position|String|The position for the next append operation. This header is included in the response only when the type of the object is Appendable.|
|x-oss-hash-crc64ecma|String|The 64-bit CRC value of the object. This value is calculated based on the ECMA-182 standard.If an object is created before OSS supports CRC64, this header may not be included in the response when you call HeadObject to query the metadata of the object. |
|x-oss-expiration|String|The lifecycle information about the object. This header is included in the response if lifecycle rules are configured for the object. This header contains two parameters: expiry-date that specifies the expiration date of the object, and rule-id that specifies the ID of the matched lifecycle rule.|
|x-oss-restore|String|The state of the object when you restore an object. This header is included in the response when the storage class of the bucket is Archive and a RestoreObject request is submitted. -   If the RestoreObject request is not submitted or expires, this header is excluded from the response.
-   If the RestoreObject request is submitted and the restoration is incomplete, the value of this header is ongoing-request="true".
-   If the RestoreObject request is submitted and the restoration is complete, the value of this header is in the following format: ongoing-request="false", expiry-date="Sun, 16 Apr 2017 08:12:33 GMT", in which the expiry-date parameter is the date before which the restored object can be read. |
|x-oss-process-status|String|The result of event notification performed for the object. This header is included in the response if you create an OSS event notification rule by using MNS and an operation performed on the object triggers the rule. The value of this header is Base64-encoded and in the JSON format.|
|x-oss-request-charged|String|This header is included in the response when pay-by-requester is enabled for the bucket and the requester is not the bucket owner. The value of this header is requester.|
|Content-Md5|String|-   This header is included in the response only when the object type is Normal. The value of this header is calculated as follows: 1. Calculate the MD5 hash of the message content except for the headers based on RFC 1864 to obtain a 128-bit digit. 2. Encode the digit by using Base64.
-   This header is not included in the response if the object type is Multipart or Appendable. |
|Last-Modified|String|The time when the object is last modified. The time is in GMT specified in HTTP/1.1.|
|Access-Control-Allow-Origin|String|The allowed origins in CORS. This header is included in the response when a CORS rule is configured for the bucket that stores the object and the Origin header in the request meets the CORS rule.|
|Access-Control-Allow-Methods|String|The allowed methods in CORS. This header is included in the response when a CORS rule is configured for the bucket that stores the object and the Access-Control-Request-Method header in the request meets the CORS rule.|
|Access-Control-Max-Age|String|The maximum cache period in CORS. This header is included in the response when a CORS rule is configured for the bucket that stores the object and the request meets the CORS rule.|
|Access-Control-Allow-Headers|String|The allowed headers in CORS. This header is included in the response when a CORS rule is configured for the bucket that stores the object and the request meets the CORS rule.|
|Access-Control-Expose-Headers|String|The list of header fields that can be accessed by JavaScript applications on the client. The exposed headers in CORS. This header is included in the response when a CORS rule is configured for the bucket that stores the object and the request meets the CORS rule.|
|x-oss-tagging-count|String|The number of tags added to the object. This header is included in the response only when you have read permissions on tags.|

## Examples

-   Sample requests for querying the metadata of an object in an unversioned bucket

    ```
    HEAD /oss.jpg HTTP/1.1
    Host: oss-example.oss-cn-hangzhou.aliyuncs.com
    Date: Fri, 7 Aug 2020 07:32:52 GMT
    Authorization: OSS qn6qrrqxo2oawuk53otfjbyc:JbzF2LxZUtanlJ5dLA092wpD****
    ```

    Sample responses

    ```
    HTTP/1.1 200 OK
    x-oss-request-id: 559CC9BDC755F95A6448****
    x-oss-object-type: Normal
    x-oss-storage-class: Archive
    Date: Fri, 7 Aug 2020 07:32:52 GMT
    Last-Modified: Fri, 24 Feb 2012 06:07:48 GMT
    ETag: "fba9dede5f27731c9771645a3986****"
    Content-Length: 344606
    Content-Type: image/jpg
    Connection: keep-alive
    Server: AliyunOSS
    ```

-   Sample requests for querying the metadata of a specified object version in a versioned bucket

    ```
    HEAD /example? versionId=CAEQNRiBgICb8o6D0BYiIDNlNzk5NGE2M2Y3ZjRhZTViYTAxZGE0ZTEyMWYy****
    Host: versioning-test.oss-cn-hangzhou.aliyuncs.com
    Date: Fri, 7 Aug 2020 06:27:12 GMT
    Authorization: OSS ryghu9rp3mqp1ya:RvyjGvKxaUhdF0ibyEwX5mOM****
    ```

    Sample responses

    ```
    HTTP/1.1 200 OK
    x-oss-versionId: CAEQNRiBgICb8o6D0BYiIDNlNzk5NGE2M2Y3ZjRhZTViYTAxZGE0ZTEyMWYy****
    x-oss-request-id: 5CAC3B40B7AEADE01700****
    x-oss-object-type: Normal
    x-oss-storage-class: Archive
    Date: Fri, 7 Aug 2020 06:27:12 GMT
    Last-Modified: Fri, 7 Aug 2020 06:27:12 GMT
    ETag: "A082B659EF78733A5A042FA253B1****"
    Content-Length: 481827
    Content-Type: text/html
    Connection: keep-alive
    Server: AliyunOSS
    ```

-   Sample requests for querying the metadata of the current object version in a versioned bucket

    ```
    HEAD /example HTTP/1.1
    Host: versioning-test.oss-cn-hangzhou.aliyuncs.com
    Date: Fri, 7 Aug 2020 06:27:12 GMT
    Authorization: OSS ryghu9rp3mqp1ya:RvyjGvKxaUhdF0ibyEwX5mOM****
    ```

    Sample responses

    ```
    HTTP/1.1 200 OK
    x-oss-versionId: CAEQMxiBgMCZov2D0BYiIDY4MDllOTc2YmY5MjQxMzdiOGI3OTlhNTU0ODIx****
    x-oss-request-id: 5CAC3B40B7AEADE01700****
    x-oss-object-type: Normal
    x-oss-storage-class: Archive
    Date: Fri, 7 Aug 2020 06:27:12 GMT
    Last-Modified: Fri, 7 Aug 2020 06:27:12 GMT
    ETag: "3663F7B0B9D3153F884C821E7CF4****"
    Content-Length: 485859
    Content-Type: text/html
    Connection: keep-alive
    Server: AliyunOSS
    ```

-   Sample requests for querying the metadata of an object for which the RestoreObject request is submitted but the restoration is incomplete

    ```
    HEAD /oss.jpg HTTP/1.1
    Host: oss-archive-example.oss-cn-hangzhou.aliyuncs.com
    Date: Fri, 7 Aug 2020 07:32:52 GMT
    Authorization: OSS e1Unnbm1rgdnpI:KKxkdNrUBu2t1kqlDh0MLbDb****
    ```

    Sample responses

    ```
    HTTP/1.1 200 OK
    x-oss-request-id: 58F71A164529F18D7F00****
    x-oss-object-type: Normal
    x-oss-storage-class: Archive
    x-oss-restore: ongoing-request="true"
    Date: Fri, 7 Aug 2020 07:32:52 GMT
    Last-Modified: Fri, 7 Aug 2020 06:07:48 GMT
    ETag: "fba9dede5f27731c9771645a3986****"
    Content-Length: 344606
    Content-Type: image/jpg
    Connection: keep-alive
    Server: AliyunOSS
    ```

-   Sample requests for querying the metadata of an object for which the RestoreObject request is submitted and the restoration is complete

    ```
    HEAD /oss.jpg HTTP/1.1
    Host: oss-archive-example.oss-cn-hangzhou.aliyuncs.com
    Date: Fri, 7 Aug 2020 09:35:51 GMT
    Authorization: OSS e1Unnbm1rgdnpI:21qtGJ+ykDVmdu6O6FMJnn+W****
    ```

    Sample responses

    ```
    HTTP/1.1 200 OK
    x-oss-request-id: 58F725344529F18D7F00****
    x-oss-object-type: Normal
    x-oss-storage-class: Archive
    x-oss-restore: ongoing-request="false", expiry-date="Sun, 16 Apr 2017 08:12:33 GMT"
    Date: Fri, 7 Aug 2020 09:35:51 GMT
    Last-Modified: Fri, 7 Aug 2020 06:07:48 GMT
    ETag: "fba9dede5f27731c9771645a3986****"
    Content-Length: 344606
    ```

-   Sample requests for querying the metadata of an object that is encrypted by using SSE-OSS at the server side

    ```
    HEAD /oss.jpg HTTP/1.1
    Host: oss-example.oss-cn-hangzhou.aliyuncs.com
    Date: Fri, 7 Aug 2020 07:32:52 GMT
    Authorization: OSS qn6qrrqxo2oawuk53otfjbyc:JbzF2LxZUtanlJ5dLA092wpD****
    ```

    Sample responses

    ```
    HTTP/1.1 200 OK
    x-oss-request-id: 559CC9BDC755F95A6448****
    x-oss-object-type: Normal
    x-oss-storage-class: Archive
    x-oss-server-side-encryption: AES256
    Date: Fri, 7 Aug 2020 07:32:52 GMT
    Last-Modified: Fri, 7 Aug 2020 06:07:48 GMT
    ETag: "fba9dede5f27731c9771645a3986****"
    Content-Length: 344606
    Content-Type: image/jpg
    Connection: keep-alive
    Server: AliyunOSS
    ```

-   Sample requests for querying the metadata of an object that is encrypted by using SSE-KMS at the server side

    ```
    HEAD /oss.jpg HTTP/1.1
    Host: oss-example.oss-cn-hangzhou.aliyuncs.com
    Date: Fri, 7 Aug 2020 07:32:52 GMT
    Authorization: OSS qn6qrrqxo2oawuk53otfjbyc:JbzF2LxZUtanlJ5dLA092wpD****
    ```

    Sample responses

    ```
    HTTP/1.1 200 OK
    x-oss-request-id: 559CC9BDC755F95A64485981
    x-oss-object-type: Normal
    x-oss-storage-class: Archive
    x-oss-server-side-encryption: KMS
    x-oss-server-side-encryption-key-id: 9468da86-3509-4f8d-a61e-6eab1eac****
    Date: Fri, 7 Aug 2020 07:32:52 GMT
    Last-Modified: Fri, 7 Aug 2020 06:07:48 GMT
    ETag: "fba9dede5f27731c9771645a3986****"
    Content-Length: 344606
    Content-Type: image/jpg
    Connection: keep-alive
    Server: AliyunOSS
    ```

## Error codes

|Error|HTTP status code|Description|
|:----|:---------------|:----------|
|Not Found|404|The error message returned because the requested object does not exist.|
|SymlinkTargetNotExist|404|The error message returned because the requested object is a symbolic link.|
|InvalidTargetType|400|The error message returned because the requested object is a symbolic link that points to another symbolic link.|
|Not Modified|304|-   The error message returned because the If-Modified-Since header is specified in the request, but the requested object has not been modified since the time specified in the request.
-   The error message returned because the If-None-Match header is specified in the request, and the ETag value provided in the request is the same as the ETag value of the requested object. |
|Precondition Failed|412|-   The error message returned because the If-Unmodified-Since header is specified in the request, but the specified time is earlier than the modified time of the requested object.
-   The error message returned because the If-Match header is specified in the request, but the ETag value provided in the request is different from the ETag value of the requested object. |

repository: hglakfs/oss

path: /intl.en-US/API Reference/Object operations/Basic operations/HeadObject.md

repo_name: hglakfs/oss


text:
# autotesting

This is a very low-footprint extension to the standard PyUnit testing
framework. Simply copy the `testing.py` file from the `examplepackage` folder
into your own python package, adapt the `DEFAULT_PACKAGES` variable and your are
ready to rock.

The main philosophy behind this little module is to keep things simple but
practical and to minimize the code that deals with the management of your
testing infrastructure. Contrary to the opinion of serious experts, we very much
prefer to have our testing routines right next to and in the same file as the
code being tested. That's the scenario autotest is particularly good for.
The main features are:

  * fully automatic discovery of test cases from your package (without registration)
  * filtering and grouping of test cases by 'tags' and sub-packages
  * run all or selected tests using `testing.py` as a script or ...
  * ... execute tests of a given module by simply executing that module
  * test variables are pushed into global name space for interactive debugging
  * other tools supporting standard unittest will still work (e.g. WingIDE still
    identifies and runs `testing.AutoTest` classes as `unittest` instances)

This testing module was originally developed for the biskit python library
(https://github.com/graik/biskit) where we have been happily using and improving
it for the last 11 or such years. autotest is a only slightly modified
stand-alone version of the original `biskit.test.py` without any dependencies so
that it can be more easily transferred into new packages.

Run the example::
===============

    git clone https://github.com/graik/autotesting.git
    cd autotesting
    python examplepackage/testing.py -i

`testing.py` assumes that it is is located in the root of your python package
and it needs to be able to import this parent package. That means, your package
*must* be in the PYTHONPATH. However, you can run the example tests without
installing `examplepackage` into your python environment: simply call the script
from the parent folder, as shown above. (This works because Python automatically
adds the current working directory into the $PYTHONPATH.)

Setup for your python project
=============================

1. Copy `testing.py` into the root of your own python package.

2. Adapt the module-level parameter `DEFAULT_PACKAGES` in `testing.py`

   E.g. if the name of your package (folder) is `superpy` and it also contains a
   sub-package (sub-folder) `superpy/tools`:

   ```python
   DEFAULT_PACKAGES = ['superpy', 'superpy.tools']
   ```

3. Define Unittest classes derived from `testing.AutoTest` in the python modules
   of your package (see `example.py` for, well, an example).

4. Add the following lines to the end of any python module that contains test
   cases:

   ```python
   if __name__ == '__main__':
       testing.localTest()
   ```

Running Tests
=============

The module also acts as the script to collect and run the tests. In the simplest
case, the following will execute all the tests found in any module of your
registered package and sub-packages:

    ./testing.py -i

The following command will execute all the tests from a single sub-package,
except the ones that are tagged 'LONG'::

    ./testing.py -p superpy.tools -e long

Run `./testing.py` without arguments to see the complete help::

    Run unittest tests for the whole package.

        testing.py [-i |include tag1 tag2..| -e |exclude tag1 tag2..|
                    -p |package1 package2..|
                    -v |verbosity| -log |log-file| -nox -dry]

        i    - include tags, only run tests with at least one of these tags   [All]
        e    - exclude tags, do not run tests labeled with one of these tags  [old]
             valid tags are:
                 long   - long running test case
                 pvm    - depends on PVM
                 exe    - depends on external application
                 old    - is obsolete
             (If no tags are given to -i this means all tests are included)

        p    - packages to test, e.g. mypackage mypackage.parser           [All]
        v    - int, verbosity level, 3 switches on several graphical plots      [2]
        log  - path to logfile (overriden); empty -log means STDOUT        [STDOUT]
        nox  - suppress test plots                                          [False]
        dry  - do not actually run the but only collect tests               [False]

    Examples:

        * Run all but long or obsolete tests from mypackage and mypackage.parser:
        ./testing.py -e old long -p mypackage mypackage.subpackage

        * Run only PVM-dependent tests of the mypackage.calc sub-package:
        ./testing.py -i pvm -p mypackage.calc

Adapting your code
==================

Simply follow the example in the unimaginatively named file `example.py`.

Background & Motivation
=======================

autotest tries to recover the convenience of good old times, when testing
code was simply dumped into the `__main__` section of a module where it could be
executed and interactively debuged directly from emacs or ipython. The
introduction of unittests and test fixtures, despite many advantages, lost a lot
of this convenience: Tests where less convenient to execute (typically
requiring seperate test fixtures or third-party testing frameworks); testing
code tended to get separated from the module that it is supposed to test;
and intermediate variables remain hidden within the test instances.

autotest adds a thin layer on top of the unittest framework to address these
issues. When called as a script, `testing.py` will automatically extract and run
all `AutoTest`-derived test instances from all modules of your package and
registered sub-packages. Tests are run without individual output and can be
filtered by tags.

On the other hand, you can also execute the tests of only one particular python
module, by simply executing this module. Again there is no need to register your
tests. Simply place the `testing.localTest()` method into the `__main__` body of
your module. `localTest()` will automatically discover any `AutoTest` instances
in your module and execute them. In this case, your tests can report detailed
information (plots, detailed progress bars, etc). Moreover, any variables
assigned to the test instance (`self.*`) will be pushed to the global python
namespace for interactive inspection after your tests have run or failed.

BTW, although that's not our usage scenario, autotest can just as well be used if
your tests are collected in seperate files and folders. However, unless your
test files are bundled in their own sub-package, testing.py will, in this case,
report a high number of modules with missing test cases.

repository: graik/autotesting

repo_name: graik/autotesting