text:
var Data = require("./data.js").Data,
  errno = require("./errno.js")
var Base64 = {
  _keyStr: "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",
  decodeArrayBuffer: function(input) {
    var bytes = input.length / 4 * 3
    var ab = new ArrayBuffer(bytes)
    this.decode(input, ab)
    return ab
  },
  decode: function(input, arrayBuffer) {
    var lkey1 = this._keyStr.indexOf(input.charAt(input.length - 1))
    var lkey2 = this._keyStr.indexOf(input.charAt(input.length - 2))
    var bytes = input.length / 4 * 3
    if (lkey1 == 64) bytes--
    if (lkey2 == 64) bytes--
    var uarray
    var chr1, chr2, chr3
    var enc1, enc2, enc3, enc4
    var i = 0
    var j = 0
    if (arrayBuffer) uarray = new Uint8Array(arrayBuffer)
    else uarray = new Uint8Array(bytes)
    input = input.replace(/[^A-Za-z0-9\+\/\=]/g, "")
    for (i = 0; i < bytes; i += 3) {
      enc1 = this._keyStr.indexOf(input.charAt(j++))
      enc2 = this._keyStr.indexOf(input.charAt(j++))
      enc3 = this._keyStr.indexOf(input.charAt(j++))
      enc4 = this._keyStr.indexOf(input.charAt(j++))
      chr1 = enc1 << 2 | enc2 >> 4
      chr2 = (enc2 & 15) << 4 | enc3 >> 2
      chr3 = (enc3 & 3) << 6 | enc4
      uarray[i] = chr1
      if (enc3 != 64) uarray[i + 1] = chr2
      if (enc4 != 64) uarray[i + 2] = chr3
    }
    return uarray
  }
}

function Parser(base64str, offset, maxSize) {
  this.base64str = base64str
  this.maxSize = maxSize
  this.offset = offset || 0
  this.lastError = errno.PREMATURE_RETURN.copy({
    process: "parser"
  })
}
Parser.prototype = {
  _keyStr: "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",
  data: function() {
    var ret = [].slice.call(Base64.decode(this.base64str))
    if (!ret) {
      this.lastError = errno.BASE64_ERROR
      return null
    }
    if (this.maxSize && ret.length > this.maxSize) {
      this.lastError = errno.PROGRAM_TOO_LARGE.copy({
        maxSize: this.maxSize,
        progLength: ret.length
      })
      return null
    }
    this.lastError = errno.SUCCESS
    return new Data(ret, this.offset)
  }
}
module.exports.Parser = Parser

redpajama_set_name: RedPajamaGithub


text:
// Licensed to Cloudera, Inc. under one
// or more contributor license agreements.  See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership.  Cloudera, Inc. licenses this file
// to you 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.
package com.cloudera.api.v1;

import com.cloudera.api.DataView;
import com.cloudera.api.model.ApiCommand;
import com.cloudera.api.model.ApiCommandList;
import com.cloudera.api.model.ApiRoleTypeList;
import com.cloudera.api.model.ApiService;
import com.cloudera.api.model.ApiServiceConfig;
import static com.cloudera.api.Parameters.MESSAGE;
import static com.cloudera.api.Parameters.DATA_VIEW;
import static com.cloudera.api.Parameters.DATA_VIEW_DEFAULT;

import javax.ws.rs.Consumes;
import javax.ws.rs.DefaultValue;
import javax.ws.rs.GET;
import javax.ws.rs.Path;
import javax.ws.rs.POST;
import javax.ws.rs.PUT;
import javax.ws.rs.Produces;
import javax.ws.rs.QueryParam;
import javax.ws.rs.core.MediaType;

@Consumes({ MediaType.APPLICATION_JSON })
@Produces({ MediaType.APPLICATION_JSON })
public interface MgmtServiceResource {

  /**
   * Retrieve information about the Cloudera Management Services.
   *
   * @return Details about the management service.
   */
  @GET
  @Path("/")
  public ApiService readService();

  /**
   * Retrieve the configuration of the Cloudera Management Services.
   *
   * @param dataView The view of the data to materialize,
   *                 either "summary" or "full".
   * @return List with configured and available configuration options.
   */
  @GET
  @Path("/config")
  public ApiServiceConfig readServiceConfig(
      @QueryParam(DATA_VIEW)
      @DefaultValue(DATA_VIEW_DEFAULT) DataView dataView);

  /**
   * Update the Cloudera Management Services configuration.
   *

   * If a value is set in the given configuration, it will be added
   * to the service's configuration, replacing any existing entries.
   * If a value is unset (its value is null), the existing
   * configuration for the attribute will be erased, if any.
   *

   * Attributes that are not listed in the input will maintain their
   * current values in the configuration.
   *
   * @param message Optional message describing the changes.
   * @param config Configuration changes.
   * @return The new service configuration.
   */
  @PUT
  @Path("/config")
  public ApiServiceConfig updateServiceConfig(
      @QueryParam(MESSAGE) String message,
      ApiServiceConfig config);

  /**
   * List the supported role types for the Cloudera Management Services.
   *
   * @return List of role types the service supports.
   */
  @GET
  @Path("/roleTypes")
  public ApiRoleTypeList listRoleTypes();

  /**
   * List active Cloudera Management Services commands.
   *
   * @param dataView The view of the data to materialize,
   *                 either "summary" or "full".
   * @return A list of active role commands.
   */
  @GET
  @Path("/commands")
  public ApiCommandList listActiveCommands(
      @QueryParam(DATA_VIEW)
      @DefaultValue(DATA_VIEW_DEFAULT) DataView dataView);

  /**
   * Start the Cloudera Management Services.
   *
   * @return A reference to the submitted command.
   */
  @POST
  @Consumes()
  @Path("/commands/start")
  public ApiCommand startCommand();

  /**
   * Stop the Cloudera Management Services.
   *
   * @return A reference to the submitted command.
   */
  @POST
  @Consumes()
  @Path("/commands/stop")
  public ApiCommand stopCommand();

  /**
   * Restart the Cloudera Management Services.
   *
   * @return A reference to the submitted command.
   */
  @POST
  @Consumes()
  @Path("/commands/restart")
  public ApiCommand restartCommand();

  /**
   * Setup the Cloudera Management Services.
   *

   * Configure the CMS instance and create all the management roles. The
   * provided configuration data can be used to set up host mappings for
   * each role, and required configuration such as database connection
   * information for specific roles.
   *

   * Regardless of the list of roles provided in the input data, all
   * management roles are created by this call. The input is used to
   * override any default settings for the specific roles.
   *

   * This method needs a valid CM license to be installed beforehand.
   *

   * This method does not start any services or roles.
   *

   * This method will fail if a CMS instance already exists.
   *

   * Available role types:
   *

   *
SERVICEMONITOR

   *
ACTIVITYMONITOR

   *
HOSTMONITOR

   *
REPORTSMANAGER

   *
EVENTSERVER

   *
ALERTPUBLISHER

   *
NAVIGATOR

   *
NAVIGATORMETASERVER

   *

   *
   *

   * REPORTSMANAGER, NAVIGATOR and NAVIGATORMETASERVER are only available with
   * Cloudera Manager Enterprise Edition.
   *
   * @param service Role configuration overrides.
   * @return ApiService The CMS information.
   */
  @PUT
  @Path("/")
  public ApiService setupCMS(ApiService service);

  /**
   * Return the management roles resource handler.
   *
   * @return The roles resource handler.
   */
  @Path("/roles")
  public MgmtRolesResource getRolesResource();

  /**
   * Returns the management role commands resource handler.
   *
   * @return The roles command handler.
   */
  @Path("/roleCommands")
  public MgmtRoleCommandsResource getMgmtRoleCommandsResource();

}


text:
<?xml version="1.0" encoding="UTF-8"?>
<!--
    Copyright 2005-2006 The Apache Software Foundation or its licensors, as applicable

    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.
-->
<!DOCTYPE Test SYSTEM "test.dtd">
<!--
Author:  Alexander D. Shipilov
Version: $Revision: 1.4 $
-->
<Test
  ID="iaload0401"
  date-of-creation="2005-01-17"
  timeout="1"
  >
  <Author value="Alexander D. Shipilov"/>
  <Description>
    Tests iaload java virtual machine instruction.
    arrayref is primitive type. Must throw VerifyError.

    Covered assertions assert_instr26a065
  </Description>

  <Keyword name="verifier"/>

  <Source name="iaload0401n.j"/>

  <Runner ID="Runtime">
    <Param name="toRun" value="org.apache.harmony.vts.test.vm.jvms.share.vmVerifierRun">
      <Option name="load"/>
      <Option name="org.apache.harmony.vts.test.vm.jvms.instructions.reftypes.iaload.iaload04.iaload0401.iaload0401n"/>
      <Option name="java.lang.VerifyError"/>
    </Param>
  </Runner>
</Test>


text:
@charset "utf-8";
*{scrollbar-3dlight-color:#D4D0C8;
   scrollbar-highlight-color:#fff;
   scrollbar-face-color:#E4E4E4;
   scrollbar-arrow-color:#666;
   scrollbar-shadow-color:#808080;
   scrollbar-darkshadow-color:#D7DCE0;
   scrollbar-base-color:#D7DCE0;
   scrollbar-track-color:#;
}
html{height:100%;}
body{padding:5px;margin:0;font-family:"宋体",Arial Narrow,Arial,serif;background:#ffffff;font-size:12px; height:100%;}
div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,form,fieldset,input,textarea,blockquote,p{padding:0; margin:0;}
table,td,tr,th{font-size:12px;}
li{list-style-type:none;}
table{margin:0 auto;}
img{vertical-align:top;border:0;}
ol,ul {list-style:none;}
caption,th {text-align:left;}
h1,h2,h3,h4,h5,h6 {font-size:12px;font-weight:normal;}
q:before,q:after {content:'';}
abbr,acronym {border:0;}
address,caption,cite,code,dfn,em,th,var {font-weight:normal; font-style:normal;}
a{color:#3B5999;text-decoration:none;}
a:hover{ text-decoration:underline;}

.inactive{color:#ccc;}

.fB{font-weight:bold;}
.fI{font-style: italic;}
.f12px{font-size:12px;}
.f14px{font-size:14px;}
.fl{float:left;}
.fr{float:right;}
.tl{text-align:left;}
.tc{text-align:center;}
.tc{text-align:right;}
.hidden{display:none;}
.pointer{cursor:pointer;}
.select{background:#787b8a; color:#fff; padding:2px;}
.disabled,
a.disabled{color:#b0aea1!important;}

.clear {clear:both; height:0; overflow:hidden; display:block;}
.clearfix:after {clear:both; height:0; overflow:hidden; display:block; visibility:hidden; content:"."; }

.blank3 {clear:both; height:3px; overflow:hidden; display:block;}
.blank6 {clear:both; height:6px; overflow:hidden; display:block;}
.blank9 {clear:both; height:9px; overflow:hidden; display:block;}
.blank12 {clear:both; height:12px; overflow:hidden; display:block;}
.blank15 {clear:both; height:15px; overflow:hidden; display:block;}
.blank20 {clear:both; height:20px; overflow:hidden; display:block;}

.textinput{height:14px; padding:1px 2px; line-height:14px; border:solid 1px #666;}
.fileinput{border:solid 1px #666; padding:3px;}
.areainput{width:80%; font-size:12px; padding:5px; height:auto;border:solid 1px #666;}
input.formbutton{border-top:#9397ae 1px solid;border-left: #9397ae 1px solid;width: auto; background: #6a7080; letter-spacing: 0.1em; color: #fff; overflow: visible;  cursor: pointer; border-bottom:#2a2f51 1px solid;border-right:#2a2f51 1px solid;_width:0;padding:4px 1.5em 2px 1.5em; * padding: 4px 1.5em 0 1.5em; font-size:12px; font-weight:bold; font-family:'宋体';}
input.resetbutton{border-top:#ebebeb 1px solid;border-left: #ebebeb 1px solid;width: auto; background: #b0aea1; letter-spacing: 0.1em; color: #fff; overflow: visible;  cursor: pointer; border-bottom:#7d7d7d 1px solid;border-right:#7d7d7d 1px solid;_width:0;padding:4px 1.5em 2px 1.5em; * padding: 4px 1.5em 0 1.5em; font-size:12px; font-weight:bold; font-family:'宋体';}
.requireinput{border-left:solid 2px #f00;}

.fanwe-header{height:66px; background:url(./Images/b1.gif) repeat-x 0 0; float:left; width:100%; position:relative;}
.fh-top{height:55px; float:left; width:100%;}
/*.fh-bottom{height:41px; float:left; width:100%; background:url(./Images/b2-1.gif) no-repeat 0 0; position:relative;}
.fhb-body{height:41px; float:left; width:100%; background:url(./Images/b2-2.gif) no-repeat right 0; position:absolute; left:0; top:0;}*/
.fht-logo{float:left; height:55px; width:195px;}
.fht-links{float:right; line-height:28px; height:28px;}
.fht-links span,
.fht-links a{float:left; margin:0 10px 0 0; color:#fff;}
.fht-navs{float:left; margin:34px 0 0 0;}
.fht-navs div{float:left; height:26px; padding:0 0 0 18px; overflow:hidden;}
.fht-navs p{float:left; height:26px; padding:0 18px 0 0;}
.fht-navs a{float:left; display:block; line-height:28px; font-size:13px; font-weight:bold; font-family:"微软雅黑", "黑体", "宋体", Arial; color:#fff;}
.fht-navs a:hover{text-decoration:none; color:#fff;}

.fht-navs div.active{background:url(./Images/b11.gif) no-repeat 0 0;}
.fht-navs div.active p{background:url(./Images/b11.gif) no-repeat right -26px}
.fht-navs div.active a{line-height:28px; color:#fff;}
.fht-navs div.active a:hover{color:#fff;}

.fanwe-body{width:100%; height:98%; position:relative;}
.fanwe-body .fb-title{height:35px; background:none;position:absolute; top:0; left:0; z-index:2;}
.fanwe-body .fb-title div{height:35px; background:none }
.fanwe-body .fb-title p{height:35px; padding:0 12px; display:block;}
.fanwe-body .fb-title span{display:block; height:35px; color:#1E325C; padding:0 0 0 0px;font-weight:bold;font-size: 14px;;line-height:38px;_line-height:40px; overflow:hidden;}
.fanwe-body .fb-body{position:absolute; top:0; left:0; z-index:1; width:100%; height:100%;}
.fanwe-body .body-table{width:100%; background:#9CB8CC; height:100%;}
.fanwe-body .body-table-td{background:#fff; vertical-align:top;}
.fanwe-body .body-table-div{width:100%; height:400px; overflow:hidden; overflow-y:auto; float:left; margin:34px 0 0 0; position:relative;}

.ajax-loading{height:22px; border:solid 1px #868686; line-height:24px; _line-height:26px; background:url(./Images/ajaxloading.gif) no-repeat 3px 3px #fff; padding:0 8px 0 24px; position:absolute; top:6px; right:6px; z-index:3; overflow:hidden; display:none;}
.ajax-error{background:url(./Images/ajaxerror.gif) no-repeat 3px 4px #fff; color:#f30;}

.fanwe-menu{margin:0px;width:173px;}
.fanwe-menu dt{height:32px;width:173px;display:block;clear:both;float:left; background:url(./Images/b3-3.gif) repeat-x 0 0;}
.fanwe-menu dt div{height:32px; background:url(./Images/b3-1.gif) no-repeat 0 0; }
.fanwe-menu dt strong{display:block; height:32px; background:url(./Images/b3-2.gif) no-repeat right 0; color:#fff; padding:0 15px;padding-left:20px;line-height:36px; overflow:hidden;}
.fanwe-menu dd{width:173px;float:left;display:block;}
.fanwe-menu dd p{height:32px; background:url(./Images/b4-1.gif) no-repeat right 0;}
.fanwe-menu dd a{background:url(./Images/b4-1.gif) no-repeat 0 0;display:block; height:32px; line-height:34px; padding:0 0 0 20px; margin:0 30px 0 0; overflow:hidden;}
.fanwe-menu dd div{height:8px;border-bottom:solid 1px #c8c8c8;}
.fanwe-menu .active p{background:url(./Images/b4-2.gif) no-repeat right 0;}
.fanwe-menu .active a{background:url(./Images/b4-2.gif) no-repeat 0 0;}

.fanwe-menu dd.cur p{height:32px; background:url(./Images/b4-2.gif) no-repeat right 0;}
.fanwe-menu dd.cur a{background:url(./Images/b4-2.gif) no-repeat 0 0;display:block; height:32px; line-height:34px; padding:0 0 0 20px; margin:0 30px 0 0; overflow:hidden;}

.fanwe-change{height:100%; float:right; width:9px; background:url(./Images/b6-1.gif) no-repeat 0 center; cursor:pointer;}
.fanwe-change-right{background:url(./Images/b6-2.gif) no-repeat 0 center; }

.fanwe-footer{height:22px;position:relative; background:url(./Images/b5.gif) repeat-x 0 0; text-align:right; padding:0 10px 0 0; line-height:22px; color:#fff; border-top:solid 1px #566676; margin:0px 0 0 0;}

.handle-btns{float:left; width:100%; height:32px; background:#D2DBEA;border-bottom:1px solid #C8CFDA; overflow:hidden;}
.handle-btns .img-button{margin:4px 0 0 8px; }
.handle-btns .link-button{margin:4px 0 0 8px;}

.handle-btns .link-button-hover{background:url(./Images/b9.gif) no-repeat 0 -26px;}
.handle-btns .link-button-hover p{background:url(./Images/b9.gif) no-repeat right -26px;}

.handle-btns .img-button-hover{background:url(./Images/b9.gif) no-repeat 0 -26px;}
.handle-btns .img-button-hover p{background:url(./Images/b9.gif) no-repeat right -26px;}

.search-box{float:left; width:100%; background:#fff;border-bottom:1px solid #C8CFDA; overflow:hidden; padding:4px 0;}
.search-box form{padding:0 6px;}
.handle-btns form{float:right; padding:4px 6px;}
.search-box form *,
.handle-btns form *{float:left; margin:0 0 0 6px;}
.search-box span,
.handle-btns span{line-height:24px;}
.search-box small,
.handle-btns small{height:24px; display:block; overflow:hidden; width:1px; background:#C8CFDA;}
.search-box .textinput,
.handle-btns .textinput{padding:4px 2px;}
.search-box select,
.handle-btns select{margin-top:2px;}
.search-box form .img-button,
.handle-btns form .img-button{margin:-1px 0 0 6px;}

.table-tootip{margin:100px auto 0 auto;}
.table-tootip th{padding:20px;}
.table-tootip td{padding:20px 20px 20px 0;}
.table-tootip p{line-height:1.5em;}
.table-tootip-success{border:solid 1px #006f36;}
.table-tootip-error{border:solid 1px #9f1017;}

/*按钮*/
.img-button{float:left; height:26px; padding:0 0 0 6px; background:url(./Images/b9.gif) no-repeat 0 0; display:inline; overflow:hidden;}
.img-button p{float:left; height:26px; padding:0 12px 0px 6px; background:url(./Images/b9.gif) no-repeat right 0;}
.img-button input{float:left; border:none; background:transparent; color:#4b4c47; margin:0; cursor:pointer; padding:5px 0 0 0;padding:7px 0 0 0\9;*padding:5px 0 0 0;}

.link-button{float:left; height:26px; padding:0 0 0 6px; background:url(./Images/b9.gif) no-repeat 0 0; display:inline; overflow:hidden;}
.link-button p{float:left; height:26px; padding:0 12px 0 6px; background:url(./Images/b9.gif) no-repeat right 0;}
.link-button a{float:left; color:#4b4c47; line-height:28px; display:block; padding:0 5px; text-decoration:none;}
.link-button a:hover{color:#4b4c47;text-decoration:none;}

/*列表*/
.table-list{width:100%; border-bottom:1px solid #C1C8D2; table-layout:fixed; float:left;}
.table-list thead th{height:22px; background:url(./Images/b8.gif) repeat-x 0 0; text-align:center; color:#7D7D7D;; border-left:1px solid #C1C8D2; vertical-align:middle;}
.table-list thead th a{ color:#7d7d7d}
.table-list thead th img{margin:3px 0 0 2px;}
.table-list thead th.first{border:none;padding-left:5px}

.table-list tbody{text-align:center;}
.table-list tbody tr.even{background:#e7ecf0;}
.table-list tbody td{padding: 8px 0 8px 5px;color:#3d3d3d; border-left:solid 1px #c7c7c7; vertical-align:middle; font-family:Arial;}
.table-list tbody td.first{border:none;}

.pager{float:left;background:#F7F7F7; width:100%; height:34px; line-height:34px; border-bottom:1px solid #9DB8CB; text-align:center; font-family:Arial; overflow:hidden;}
.pager strong{color:#1E325C;}
.pager span{color:#ccc; font-weight:bold;}

/*表单*/
.table-form{width:100%; float:left; table-layout:fixed;border-top:dashed 1px #ccc;}
.table-form th{vertical-align:middle;border-bottom:dashed 1px #ccc; padding:12px 10px;padding-left:0; font-weight:normal; color:#333; text-align:right; border-right:solid 1px #ccc;}
.table-form td.border{border-bottom:dashed 1px #ccc; padding:12px 8px; font-weight:normal; color:#333; border-right:solid 1px #ccc;}
.table-form td{ border-bottom:dashed 1px #ccc; padding:12px 8px; text-align:left;}
.table-form .first{border-left:none;}
.table-form td .textinput{padding:4px 2px;}
.table-form td p{line-height:1.5em; font-family:Tahoma;}
.table-form td.tc{text-align:center;}
.table-form td.tr{text-align:right;}
.table-form tr.act th,.table-form tr.act td{border:0;}

/*tabs*/
.tabs-title{float:left; width:100%; height:32px; background: #D2DBEA;border-bottom: 1px solid #C8CFDA; overflow:hidden;}
.tabs-title .link-button{margin:4px 0 0 8px; float:left;}
.tabs-title .tt-item{margin:4px 0 0 8px; float:left; display:inline; height:28px; padding:0 0 0 6px; background:url(./Images/b9.gif) no-repeat 0 0; overflow:hidden;}
.tabs-title .tt-item p{float:left; height:28px; padding:0 6px 0 0; background:url(./Images/b9.gif) no-repeat right 0;}
.tabs-title .tt-item a{float:left; color:#333; line-height:26px;*line-height:28px; display:block; padding:0 5px; text-decoration:none;}
.tabs-title .tt-item{margin:4px 0 0 8px; float:left; display:inline; height:26px; padding:0 0 0 6px; background:url(./Images/b9.gif) no-repeat 0 0; overflow:hidden;}
.tabs-title .tt-item p{float:left; height:26px; padding:0 6px 0 0; background:url(./Images/b9.gif) no-repeat right 0;}
.tabs-title .tt-item a{float:left; color:#333; line-height:26px; display:block; padding:0 5px; text-decoration:none;}
.tabs-title .tt-item a:hover{color:#111;text-decoration:none;}
.tabs-title .active{ background-position: 0 -26px;}
.tabs-title .active p{ background-position:right -26px}
.tabs-title .active a{font-weight:bold; color:#333;}
.tabs-title .active a:hover{color:#111;}

.tabs-body .tabs-item{display:none;}
.tabs-body .tabs-active{display:block;}

.cke_editor td{ border:none;padding:0}
.submit_btn{background:url(./Images/btn_b.gif) no-repeat 0 0; width:60px; height:24px;border:0;font-size:12px;color:#fff; cursor:pointer}
.reset_btn{background:url(./Images/btn_b_1.gif) no-repeat 0 0; width:60px; height:24px;border:0;font-size:12px;color:#fff; cursor:pointer}

.tag_list{width:100%; float:left; overflow:hidden; overflow-y:scroll; border:solid 1px #333;}
.tag_list li{float:left; margin:5px 0 0 5px; padding:5px 5px 4px 5px; border:solid 1px #999; cursor:pointer;white-space: nowrap;}
.tag_list li span{white-space: nowrap;}
.submit_btn{background:url(./Images/btn_b.gif) no-repeat 0 0; width:60px; height:24px;border:0;font-size:12px;color:#fff; cursor:pointer}
.reset_btn{background:url(./Images/btn_b_1.gif) no-repeat 0 0; width:60px; height:24px;border:0;font-size:12px;color:#fff; cursor:pointer}

.img_list{ float:left; display:inline-block; width:100px; padding:5px; text-align:center; }
.img_list img{ border:#ccc solid 1px;}
.selectmul{ width:200px; height:90px;}

.tipslis li{list-style:none outside disc; font-family:Arial; line-height:18px; padding:4px 0 0 0; margin:0 0 0 30px; color:#333;}

.label_box label{float:left; padding:3px; margin:3px 10px 3px 0;background:#E6E6E6; cursor:pointer;}
.label_box label.active{background:#3964b4; color:#fff;}

#office_forum{ padding-left:10px;}
#office_forum a{ color:#FFF; text-decoration:none;}
#office_forum a:hover{ text-decoration:underline;}

/************jQuery.Validate插件样式开始********************/
label.error{background: url(./Images/error2.png) no-repeat 0px 0px;color: Red;padding-left: 20px;}
label.error2{color: Red;padding-left: 20px;}
input.error{border: dashed 1px red;}
/************jQuery.Validate插件样式结束********************/
/***************************分页样式****************************/
.pager a { margin: 0 5px 0 0; padding: 3px 6px; text-decoration:none;border: 1px solid #ddd; color:#000;}
.pager span{ margin: 0 5px 0 0; padding: 3px 6px;color:#000;}
.pager span.page_now { border-color: #bd8100 !important; color: #000 !important; font-weight:bold; }

.clearline:after {
content: ".";
display: block;
height: 0;
clear: both;
visibility: hidden;
}
/* Hides from IE-mac \*/
* html .clearline {height: 1%;}
/* End hide from IE-mac */

.button5{height:30px; line-height:30px; width:85px!important;display: inline-block; background-color:#000; padding:0; color: #fff !important; font-size: 12px !important;cursor: pointer;text-decoration: none; text-align:center;}
.button5:hover{ background-color:#4D4D4D; color: #fff!important; }


text:
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html
     PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN"
     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">

<!--

    GoogleAjaxSearch

  -->
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>GoogleAjaxSearch</title>
  <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
</head>
<frameset rows="20%, 80%">
    <frameset cols="25%,35%,45%">
        <frame src="fr_file_index.html"   title="Files" name="Files" />
        <frame src="fr_class_index.html"  name="Classes" />
        <frame src="fr_method_index.html" name="Methods" />
    </frameset>
    <frame src="files/README_markdown.html" name="docwin" />
</frameset>
</html>


text:
- Add pod creation and start times to `rkt list` and `rkt status` ([#2030](https://github.com/coreos/rkt/pull/2030)). See [`rkt list`](https://github.com/coreos/rkt/blob/master/Documentation/subcommands/list.md) and [`rkt status`](https://github.com/coreos/rkt/blob/master/Documentation/subcommands/status.md) documentation.
- The DNS configuration can now be passed to the pod via the command line ([#2040](https://github.com/coreos/rkt/pull/2040)). See [`DNS support`](https://github.com/coreos/rkt/blob/master/Documentation/networking.md#dns-support) documentation.
- Errors are now structured, allowing for better control of the output. See [#1937](https://github.com/coreos/rkt/pull/1937) for background and the [Error & Output](https://github.com/coreos/rkt/blob/master/Documentation/hacking.md#errors--output) section of the Hacking document for usage.
- All output now uses the new log package in `pkg/log` to provide a more clean and consistent output format and more helpful debug output. See [#1937](https://github.com/coreos/rkt/pull/1937)

#### Bug fixes

- Don't link to libacl, but dlopen it ([#1963](https://github.com/coreos/rkt/pull/1963)). This means that rkt will not crash if libacl is not present on the host, but it will just print a warning.

#### Other changes

- Trusted Platform Module logging (TPM) is now enabled by default ([#1815](https://github.com/coreos/rkt/issues/1815)). This ensures that rkt benefits from security features by default. See rkt's [Build Configuration](https://github.com/coreos/rkt/blob/master/Documentation/build-configure.md#security) documentation.

#### Note for packagers

With this release, `rkt` RPM/dpkg packages should have the following updates:

- Pass `--enable-tpm=no` to configure script, if `rkt` should not use TPM.

## v0.16.0

#### New features and UX changes

- Explicitly allow http connections via a new 'http' option to `--insecure-options` ([#1945](https://github.com/coreos/rkt/pull/1945)). Any data and credentials will be sent in the clear.
- When using `bash`, `rkt` commands can be auto-completed ([#1955](https://github.com/coreos/rkt/pull/1955)).
- The executables given on the command line via the `--exec` parameters don't need to be absolute paths anymore ([#1953](https://github.com/coreos/rkt/pull/1953)). This change reflects an update in the appc spec since [v0.7.2](https://github.com/appc/spec/releases/tag/v0.7.2). See rkt's [rkt run --exec](https://github.com/coreos/rkt/blob/master/Documentation/subcommands/run.md#overriding-executable-to-launch) documentation.
- Add a `--full` flag to rkt fetch so it returns full hash of the image ([#1976](https://github.com/coreos/rkt/pull/1976)).
- There is a new global flag for specifying the user configuration directory, `--user-config`. It overrides whatever is configured in system and local configuration directories. It can be useful for specifying different credentials for fetching images without putting them in a globally visible directory like `/etc/rkt`. See rkt's [Global Options](https://github.com/coreos/rkt/blob/master/Documentation/commands.md#global-options) documentation ([#1981](https://github.com/coreos/rkt/pull/1981)).
- As a temporary fix, search for network plugins in the local configuration directory too ([#2005](https://github.com/coreos/rkt/pull/2005)).
- Pass the environment defined in the image manifest to the application when using the fly stage1 image ([#1989](https://github.com/coreos/rkt/pull/1989)).

#### Build improvements

- Fix vagrant rkt build ([#1960](https://github.com/coreos/rkt/pull/1960)).
- Switch to using unrewritten imports, this will allow rkt packages to be cleanly vendored by other projects ([#2014](https://github.com/coreos/rkt/pull/2014)).

#### API service

- Allow filtering images by name ([#1985](https://github.com/coreos/rkt/pull/1985)).

#### Bug fixes

- Fix bug where the wrong image signature was checked when using dependencies ([#1991](https://github.com/coreos/rkt/pull/1991)).

#### Test improvements

- A new script to run test on AWS makes it easier to test under several distributions: CentOS, Debian, Fedora, Ubuntu ([#1925](https://github.com/coreos/rkt/pull/1925)).
- The functional tests now skip user namespace tests when user namespaces do not work ([#1947](https://github.com/coreos/rkt/pull/1947)).
- Check that rkt is not built with go 1.5.{0,1,2} to make sure it's not vulnerable to CVE-2015-8618 ([#2006](https://github.com/coreos/rkt/pull/2006)).

#### Other changes

- Cleanups in the kvm stage1 ([#1895](https://github.com/coreos/rkt/pull/1895)).
- Document stage1 filesystem layout for developers ([#1832](https://github.com/coreos/rkt/pull/1832)).

#### Note for packagers

With this release, `rkt` RPM/dpkg packages should have the following updates:

- Install the new file `dist/bash_completion/rkt.bash` in `/etc/bash_completion.d/`.

## v0.15.0

rkt v0.15.0 is an incremental release with UX improvements, bug fixes, API service enhancements and new support for Go 1.5.

#### New features and UX changes

- Images can now be deleted from the store by both ID and name ([#1866](https://github.com/coreos/rkt/pull/1866)). See rkt's [rkt image rm](https://github.com/coreos/rkt/blob/master/Documentation/subcommands/image.md#rkt-image-rm) documentation.
- The journals of rkt pods can now be accessed by members of the Unix group rkt ([#1877](https://github.com/coreos/rkt/pull/1877)). See rkt's [journalctl -M](https://github.com/coreos/rkt/blob/master/Documentation/using-rkt-with-systemd.md#journalctl--m) documentation.

#### Improved documentation

- Mention [rkt integration in Nomad](https://github.com/coreos/rkt/blob/master/Documentation/using-rkt-with-nomad.md) ([#1884](https://github.com/coreos/rkt/pull/1884)).
- Document [how to start the api service](https://github.com/coreos/rkt/blob/master/Documentation/subcommands/api-service.md) and add a [program example](https://github.com/coreos/rkt/blob/master/api/v1alpha/client_example.go) explaining how the api service can be used to integrate rkt with other programs ([#1915](https://github.com/coreos/rkt/pull/1915)).

#### API service

- Programs using rkt's API service are now provided with the size of the images stored in rkt's store ([#1916](https://github.com/coreos/rkt/pull/1916)).
- Programs using rkt's API service are now provided with any annotations found in the [image manifest](https://github.com/appc/spec/blob/master/spec/aci.md#image-manifest-schema) and [pod manifest](https://github.com/appc/spec/blob/master/spec/pods.md#pod-manifest-schema) ([#1924](https://github.com/coreos/rkt/pull/1924)).
- Fix a panic in the API service by making the store database thread-safe ([#1892](https://github.com/coreos/rkt/pull/1892)) and by refactoring the API service functions to get the pod state ([#1893](https://github.com/coreos/rkt/pull/1893)).

#### Build improvements

- Add support for building rkt with Go 1.5, which is now the preferred version. rkt can still be built with Go 1.4 as best effort ([#1907](https://github.com/coreos/rkt/pull/1907)). As part of the move to Go 1.5, rkt now has a godep-save script to support Go 1.5 ([#1857](https://github.com/coreos/rkt/pull/1857)).
- Continuous Integration on Travis now builds with both Go 1.4.2 and Go 1.5.2. Go 1.4.3 is avoided to workaround recent problems with go vet ([#1941](https://github.com/coreos/rkt/pull/1941)).

#### Bug fixes

- Fix regression issue when downloading image signatures from quay.io ([#1909](https://github.com/coreos/rkt/pull/1909)).
- Properly cleanup the tap network interface that were not cleaned up in some error cases when using the kvm stage1 ([#1921](https://github.com/coreos/rkt/pull/1921)).
- Fix a bug in the 9p filesystem used by the kvm stage1 that were preventing `apt-get` from working propertly ([#1918](https://github.com/coreos/rkt/pull/1918)).

## v0.14.0

rkt v0.14.0 brings new features like resource isolators in the kvm stage1, a new stage1 flavor called *fly*, bug fixes and improved documentation.
The appc spec version has been updated to v0.7.4

#### New features and UX changes

- The data directory that rkt uses can now be configured with a config file ([#1806](https://github.com/coreos/rkt/pull/1806)). See rkt's [paths configuration](https://github.com/coreos/rkt/blob/master/Documentation/configuration.md#rktkind-paths) documentation.
- CPU and memory resource isolators can be specified on the command line to override the limits specified in the image manifest ([#1851](https://github.com/coreos/rkt/pull/1851), [#1874](https://github.com/coreos/rkt/pull/1874)). See rkt's [overriding isolators](https://github.com/coreos/rkt/blob/master/Documentation/subcommands/run.md#overriding-isolators) documentation.
- CPU and memory resource isolators can now be used within the kvm stage1 ([#1404](https://github.com/coreos/rkt/pull/1404))
- The `rkt image list` command can now display the image size ([#1865](https://github.com/coreos/rkt/pull/1865)).
- A new stage1 flavor has been added: fly; and it represents the first experimental implementation of the upcoming rkt fly feature. ([#1833](https://github.com/coreos/rkt/pull/1833))

#### Build improvements

- It is now possible to build rkt inside rkt ([#1681](https://github.com/coreos/rkt/pull/1681)). This should improve the reproducibility of builds. This release does not use it yet but it is planned for future releases.
- Linux distribution packagers can override the version of stage1 during the build ([#1821](https://github.com/coreos/rkt/pull/1821)). This is needed for any Linux distributions that might carry distro-specific patches along the upstream release. See rkt's documentation about [building stage1 flavors](https://github.com/coreos/rkt/blob/master/Documentation/build-configure.md#--with-stage1-flavors-version-override).
- Smaller build improvements with dep generation ([#1838](https://github.com/coreos/rkt/pull/1838)), error messages on `make clean` ([#1850](https://github.com/coreos/rkt/pull/1850)), dependency checks in the kvm flavor ([#1860](https://github.com/coreos/rkt/pull/1860))

#### Bug fixes

- rkt is now able to override the application command with `--exec` when the application manifest didn't specify any command ([#1843](https://github.com/coreos/rkt/pull/1843)).
- In some cases, user namespaces were not working in Linux distributions without systemd, such as Ubuntu 14.04 LTS. This is fixed by creating a unique cgroup for each pod when systemd is not used ([#1844](https://github.com/coreos/rkt/pull/1844))
- rkt's tar package didn't prefix the destination file correctly when using hard links in images. This was not a issue in rkt itself but was causing acbuild to misbehave ([#1852](https://github.com/coreos/rkt/pull/1852)).
- ACIs with multiple dependencies can end up depending on the same base image through multiple paths. In some of those configuration with multiple dependencies, fetching the image via image discovery was not working. This is fixed and a new test ensures it will keep working ([#1822](https://github.com/coreos/rkt/pull/1822)).
- The pod cgroups were misconfigured when systemd-devel is not installed. This was causing per-app CPU and memory isolators to be ineffective on those systems. This is now fixed but will require an additional fix for NixOS ([#1873](https://github.com/coreos/rkt/pull/1873)).
- During the garbage collection of pods (`rkt gc`), all mounts will be umounted even when the pod is in an inconsistent state ([#1828](https://github.com/coreos/rkt/pull/1828), [#1856](https://github.com/coreos/rkt/pull/1856))

#### Improved documentation

- New documentation about configure flags ([#1824](https://github.com/coreos/rkt/pull/1824)). This also includes formatting and typos fixes and updates. The examples about rkt's configuration files are also clarified ([#1847](https://github.com/coreos/rkt/pull/1847)).
- New documentation explaining [how cgroups are used by rkt](https://github.com/coreos/rkt/blob/master/Documentation/devel/cgroups.md) ([#1870](https://github.com/coreos/rkt/pull/1870)). This should make it easier for software developers to integrate rkt with monitoring software.

#### API service

- The API service is meant to be used by orchestration tools like Kubernetes. The performance of the API service was improved by reducing the round-trips in the ListPods and ListImages requests ([#1786](https://github.com/coreos/rkt/pull/1786)). Those requests also gained multiple filters for more flexibility ([#1853](https://github.com/coreos/rkt/pull/1853)).

## v0.13.0

The primary motivation for this release is to add support for fetching images on the Docker Registry 2.0. It also includes other small improvements.

- docker2aci: support Docker Registry 2.0 ([#1826](https://github.com/coreos/rkt/pull/1826))
- always use https:// when fetching docker images ([#1837](https://github.com/coreos/rkt/pull/1837))
- stage0: add container hash data into TPM ([#1775](https://github.com/coreos/rkt/pull/1775))
- host flavor: fix systemd copying into stage1 for Debian packaging ([#1811](https://github.com/coreos/rkt/pull/1811))
- clarify network error messages ([#1707](https://github.com/coreos/rkt/pull/1707))
- documentation: add more build-time requirements ([#1834](https://github.com/coreos/rkt/pull/1834))

## v0.12.0

rkt v0.12.0 is an incremental release with UX improvements like fine-grained security controls and implicit generation of empty volumes, performance improvements, bug fixes and testing enhancements.

#### New features and UX changes

- implement `rkt cat-manifest` for pods ([#1744](https://github.com/coreos/rkt/pull/1744))
- generate an empty volume if a required one is not provided ([#1753](https://github.com/coreos/rkt/pull/1753))
- make disabling security features granular; `--insecure-skip-verify` is now `--insecure-options={feature(s)-to-disable}` ([#1738](https://github.com/coreos/rkt/pull/1738)). See rkt's [Global Options](https://github.com/coreos/rkt/blob/master/Documentation/commands.md#global-options) documentation.
- allow skipping the on-disk integrity check using `--insecure-options=ondisk`. This greatly speeds up start time. ([#1804](https://github.com/coreos/rkt/pull/1804))
- set empty volumes' permissions following the [spec](https://github.com/appc/spec/blob/master/spec/pods.md#pod-manifest-schema) ([1803](https://github.com/coreos/rkt/pull/1803))
- flannel networking support in kvm flavor ([#1563](https://github.com/coreos/rkt/pull/1563))

#### Bug fixes

- store used MCS contexts on the filesystem ([#1742](https://github.com/coreos/rkt/pull/1742))
- fix Docker images with whiteout-ed hard links ([#1653](https://github.com/coreos/rkt/pull/1653))
- fix Docker images relying on /dev/stdout ([#1617](https://github.com/coreos/rkt/pull/1617))
- use authentication for discovery and trust ([#1801](https://github.com/coreos/rkt/pull/1801))
- fix build in Docker ([#1798](https://github.com/coreos/rkt/pull/1798))
- fix kvm networking ([#1530](https://github.com/coreos/rkt/pull/1530))

#### Improved testing

- add functional tests for rkt api service ([#1761](https://github.com/coreos/rkt/pull/1761))
- fix TestSocketActivation on systemd-v219 ([#1768](https://github.com/coreos/rkt/pull/1768))
- fix the ACE validator test ([#1802](https://github.com/coreos/rkt/pull/1802))

#### Other changes

- Bumped appc spec to 0.7.3 ([#1800](https://github.com/coreos/rkt/pull/1800))

## v0.11.0

rkt v0.11.0 is an incremental release with mostly bug fixes and testing improvements.

#### New features and UX changes

- support resuming ACI downloads ([#1444](https://github.com/coreos/rkt/pull/1444))
- `rkt image gc` now also removes images from the store ([#1697](https://github.com/coreos/rkt/pull/1697))

#### Build

- handle building multiple flavors ([#1683](https://github.com/coreos/rkt/pull/1683))
- verbosity control ([#1685](https://github.com/coreos/rkt/pull/1685), [#1686](https://github.com/coreos/rkt/pull/1686))
- fix bugs in `make clean` ([#1695](https://github.com/coreos/rkt/pull/1695))

#### Improved testing

- nicer output in tests ([#1698](https://github.com/coreos/rkt/pull/1698))
- refactor test code ([#1709](https://github.com/coreos/rkt/pull/1709))
- skip CI tests when the source was not modified ([#1619](https://github.com/coreos/rkt/pull/1619))
- better output when tests fail ([#1728](https://github.com/coreos/rkt/pull/1728))
- fix tests in `10.*` IP range ([#1736](https://github.com/coreos/rkt/pull/1736))
- document how to run functional tests ([#1736](https://github.com/coreos/rkt/pull/1736))

#### Improved documentation

- add some help on how to run rkt as a daemon ([#1684](https://github.com/coreos/rkt/pull/1684))

#### API service

- do not return manifest in `ListPods()` and `ListImages()` ([#1688](https://github.com/coreos/rkt/pull/1688))

#### Bug fixes

- parameter `--mount` fixed in kvm flavour ([#1687](https://github.com/coreos/rkt/pull/1687))
- fix rkt leaking containers in machinectl on CoreOS ([#1694](https://github.com/coreos/rkt/pull/1694), [#1704](https://github.com/coreos/rkt/pull/1704))
- `rkt status` now returns the stage1 pid ([#1699](https://github.com/coreos/rkt/pull/1699))
- fix crash in `rkt status` when an image is removed ([#1701](https://github.com/coreos/rkt/pull/1701))
- fix fd leak in store ([#1716](https://github.com/coreos/rkt/pull/1716))
- fix exec line parsing in ACI manifest ([#1652](https://github.com/coreos/rkt/pull/1652))
- fix build on 32-bit systems ([#1729](https://github.com/coreos/rkt/pull/1729))

## v0.10.0

rkt v0.10.0 is an incremental release with numerous bug fixes and a few small new features and UX improvements.

#### New features and UX changes

- added implementation for basic API service (`rkt api-service`) ([#1508](https://github.com/coreos/rkt/pull/1508))
- mount arbitrary volumes with `--mount` ([#1582](https://github.com/coreos/rkt/pull/1582), [#1678](https://github.com/coreos/rkt/pull/1678))
- `--net=none` only exposes the loopback interface ([#1635](https://github.com/coreos/rkt/pull/1635))
- better formatting for rkt help ([#1597](https://github.com/coreos/rkt/pull/1597))
- metadata service registration (`--mds-register`) disabled by default ([#1635](https://github.com/coreos/rkt/pull/1635))

#### Improved documentation
- [compare rkt and other projects](https://github.com/coreos/rkt/blob/master/Documentation/rkt-vs-other-projects.md) ([#1588](https://github.com/coreos/rkt/pull/1588))
- [Stage 1 systemd Architecture](https://github.com/coreos/rkt/blob/master/Documentation/devel/architecture.md) ([#1631](https://github.com/coreos/rkt/pull/1631))
- [packaging rkt in Linux distributions](https://github.com/coreos/rkt/blob/master/Documentation/packaging.md) ([#1511](https://github.com/coreos/rkt/pull/1511))

#### Improved testing
- new test for user namespaces (`--private-users`) ([#1580](https://github.com/coreos/rkt/pull/1580))
- fix races in tests ([#1608](https://github.com/coreos/rkt/pull/1608))

#### Bug fixes
- suppress unnecessary output when `--debug` is not used ([#1557](https://github.com/coreos/rkt/pull/1557))
- fix permission of rootfs with overlayfs ([#1607](https://github.com/coreos/rkt/pull/1607))
- allow relative path in parameters ([#1615](https://github.com/coreos/rkt/pull/1615))
- fix pod garbage collection failure in some cases ([#1621](https://github.com/coreos/rkt/pull/1621))
- fix `rkt list` when an image was removed ([#1655](https://github.com/coreos/rkt/pull/1655))
- user namespace (`--private-users`) regression with rkt group fixed ([#1654](//github.com/coreos/rkt/pull/1654))

## v0.9.0

rkt v0.9.0 is a significant milestone release with a number of internal and user-facing changes.

There are several notable breaking changes from the previous release:
- The on-disk format for pod trees has changed slightly, meaning that `rkt gc` and `rkt run-prepared` may not work for pods created by previous versions of rkt. To work around this, we recommend removing the pods with an older version of rkt.
- The `--private-net` flag has been renamed to `--net` and its semantic has changed (in particular, it is now enabled by default) - see below for details.
- Several changes to CLI output (e.g. column names) from the `rkt list` and `rkt image list` subcommands.
- The image fetching behaviour has changed, with the introduction of new flags to `rkt run` and `rkt fetch` and the removal of `--local` - see below for details.

#### New features and UX changes

###### `--private-net` --> `--net`, and networking is now private by default
The `--private-net` flag has been changed to `--net`, and has been now made the default behaviour. ([#1532](https://github.com/coreos/rkt/pull/1532), [#1418](https://github.com/coreos/rkt/pull/1418))
That is, a `rkt run` command will now by default set up a private network for the pod.
To achieve the previous default behaviour of the pod sharing the networking namespace of the host, use `--net=host`.
The flag still allows the specification of multiple networks via CNI plugins, and overriding plugin configuration on a per-network basis.
For more details, see the [networking documentation](Documentation/networking.md).

###### New image fetching behaviour
When fetching images during `rkt fetch` or `rkt run`, rkt would previously behave inconsistently for different formats (e.g when performing discovery or when retrieving a Docker image) when deciding whether to use a cached version or not.
`rkt run` featured a `--local` flag to adjust this behaviour but it provided an unintuitive semantic and was not available to the `rkt fetch` command.
Instead, rkt now features two new flags, `--store-only` and `--no-store`, on both the `rkt fetch` and `rkt run` commands, to provide more consistent, controllable, and predictable behaviour regarding when images should be retrieved.
For full details of the new behaviour see the [image fetching documentation](Documentation/image-fetching-behavior.md).

###### Unprivileged users
A number of changes were made to the permissions of rkt's internal store to facilitate unprivileged users to access information about images and pods on the system ([#1542](https://github.com/coreos/rkt/pull/1542), [#1569](https://github.com/coreos/rkt/pull/1569)).
In particular, the set-group-ID bit is applied to the directories touched by `rkt install` so that the `rkt` group (if it exists on the system) can retain read-access to information about pods and images.
This will be used by the rkt API service (targeted for the next release) so that it can run as an unprivileged user on the system.
This support is still considered partially experimental.
Some tasks like `rkt image gc` remain a root-only operation.

###### /etc/hosts support
If no `/etc/hosts` exists in an application filesystem at the time it starts running, rkt will now provide a basic default version of this file.
If rkt detects one already in the app's filesystem (whether through being included in an image, or a volume mounted in), it will make no changes. ([#1541](https://github.com/coreos/rkt/pull/1541))

##### Other new features
- rkt now supports setting supplementary group IDs on processes ([#1514](https://github.com/coreos/rkt/pull/1514)).
- rkt's use of cgroups has been reworked to facilitate rkt running on a variety of operating systems like Void and older non-systemd distributions ([#1437](https://github.com/coreos/rkt/pull/1437), [#1320](https://github.com/coreos/rkt/pull/1320), [#1076](https://github.com/coreos/rkt/pull/1076), [#1042](https://github.com/coreos/rkt/pull/1042))
- If `rkt run` is used with an image that does not have an app section, rkt will now create one if the user provides an `--exec` flag ([#1427](https://github.com/coreos/rkt/pull/1427))
- A new `rkt image gc` command adds initial support for garbage collecting images from the store ([#1487](https://github.com/coreos/rkt/pull/1487)). This removes treeStores not referenced by any non-GCed rkt pod.
- `rkt list` now provides more information including image version and hash ([#1559](https://github.com/coreos/rkt/pull/1559))
- `rkt image list` output now shows shortened hash identifiers by default, and human readable date formats.
  To use the previous output format, use the `--full` flag. ([#1455](https://github.com/coreos/rkt/pull/1455))
- `rkt prepare` gained the `--exec` flag, which restores flag-parity with `rkt run` ([#1410](https://github.com/coreos/rkt/pull/1410))
- lkvm stage1 backend has experimental support for `rkt enter` ([#1303](https://github.com/coreos/rkt/pull/1303))
- rkt now supports empty volume types ([#1502](https://github.com/coreos/rkt/pull/1502))
- An early, experimental read-only API definition has been added ([#1359](https://github.com/coreos/rkt/pull/1359), [#1518](https://github.com/coreos/rkt/pull/1518)).

#### Bug fixes
- Fixed bug in `--stage1-image` option which prevented it from using URLs ([#1524](https://github.com/coreos/rkt/pull/1524))
- Fixed bug in `rkt trust`'s handling of `--root` ([#1494](https://github.com/coreos/rkt/pull/1494))
- Fixed bug when decompressing xz-compressed images ([#1462](https://github.com/coreos/rkt/pull/1462), [#1224](https://github.com/coreos/rkt/pull/1224))
- In earlier versions of rkt, hooks had an implicit timeout of 30 seconds, causing some pre-start jobs which took a long time to be killed. This implicit timeout has been removed. ([#1547](https://github.com/coreos/rkt/pull/1547))
- When running with the lkvm stage1, rkt now sets `$HOME` if it is not already set, working around a bug in the lkvm tool ([#1447](https://github.com/coreos/rkt/pull/1447), [#1393](https://github.com/coreos/rkt/pull/1393))
- Fixed bug preventing `run-prepared` from working if the metadata service was not available ([#1436](https://github.com/coreos/rkt/pull/1436))

#### Other changes
- Bumped appc spec to 0.7.1 ([#1543](https://github.com/coreos/rkt/pull/1543))
- Bumped CNI and netlink dependencies ([#1476](https://github.com/coreos/rkt/pull/1476))
- Bumped ioprogress to a version which prevents the download bar from being drawn when rkt is not drawing to a terminal ([#1423](https://github.com/coreos/rkt/pull/1423), [#1282](https://github.com/coreos/rkt/pull/1282))
- Significantly reworked rkt's internal use of systemd to orchestrate apps, which should facilitate more granular control over pod lifecycles ([#1407](https://github.com/coreos/rkt/pull/1407))
- Reworked rkt's handling of images with non-deterministically dependencies ([#1240](https://github.com/coreos/rkt/pull/1240), [#1198](https://github.com/coreos/rkt/pull/1198)).
- rkt functional tests now run appc's ACE validator, which should ensure that rkt is always compliant with the specification. ([#1473](https://github.com/coreos/rkt/pull/1473))
- A swathe of improvements to the build system
  - `make clean` should now work
  - Different rkt stage1 images are now built with different names ([#1406](https://github.com/coreos/rkt/pull/1406))
  - rkt can now build on older Linux distributions (like CentOS 6) ([#1529](https://github.com/coreos/rkt/pull/1529))
- Various internal improvements to the functional test suite to improve coverage and consolidate code
- The "ACI" field header in `rkt image` output has been changed to "IMAGE NAME"
- `rkt image rm` now exits with status 1 on any failure ([#1486](https://github.com/coreos/rkt/pull/1486))
- Fixed permissions in the default stage1 image ([#1503](https://github.com/coreos/rkt/pull/1503))
- Added documentation for `prepare` and `run-prepared` subcommands ([#1526](https://github.com/coreos/rkt/pull/1526))
- rkt should now report more helpful errors when encountering manifests it does not understand ([#1471](https://github.com/coreos/rkt/pull/1471))

## v0.8.1

rkt v0.8.1 is an incremental release with numerous bug fixes and clean-up to the build system. It also introduces a few small new features and UX improvements.

- New features and UX changes:
  - `rkt rm` is now variadic: it can now remove multiple pods in one command, by UUID
  - The `APPNAME` column in `rkt image list` output has been changed to the more accurate `NAME`. This involves a schema change in rkt's on-disk datastore, but this should be upgraded transparently.
  - Headers are now sent when following HTTP redirects while trying to retrieve an image
  - The default metadata service port number was changed from a registered/reserved IANA port to an arbitrary port in the non-dynamic range
  - Added the ability to override arguments for network plugins
  - rkt will now error out if someone attempts to use `--private-users` with the lkvm backend
- Bug fixes:
  - Fixed creation of /tmp in apps' root filesystems with correct permissions
  - Fixed garbage collection after umounts (for example, if a system reboots before a pod is cleanly destroyed)
  - Fixed a race in interactive mode when using the lkvm backend that could cause a deadlock or segfault
  - Fixed bad parameter being passed to the metadata service ("uid" -> "uuid")
  - Fixed setting of file permissions during stage1 set up
  - Fixed a potential race condition during simultaneous `iptables` invocation
  - Fixed ACI download progress being sent to stderr instead of stdout, now consistent with the output during retrieval of Docker images
  - `rkt help prepare` will now show the correct default stage1 image
  - rkt will refuse to add isolators with nil Limits, preventing a panic caused by an ambiguity in upstream appc schema
- Other changes:
  - Reworked the SELinux implementation to use `systemd-nspawn`'s native context-switching feature
  - Added a workaround for a bug in Docker <1.8 when it is run on the same system as rkt (see https://github.com/coreos/rkt/issues/1210#issuecomment-132793300)
  - Added a `rkt-xxxx-tapN` name to tap devices that rkt creates
  - Functional tests now clean intermediate images between tests
  - Countless improvements and cleanup to the build system
  - Numerous documentation improvements, including splitting out all top-level `rkt` subcommands into their own documents

## v0.8.0

rkt 0.8.0 includes support for running containers under an LKVM hypervisor
and experimental user namespace support.

Full changelog:

- Documentation improvements
- Better integration with systemd:
 - journalctl -M
 - machinectl {reboot,poweroff}
- Update stage1's systemd to v222
- Add more functional tests
- Build system improvements
- Fix bugs with garbage-collection
- LKVM stage1 support with network and volumes
- Smarter image discovery: ETag and Cache-Control support
- Add CNI DHCP plugin
- Support systemd socket activation
- Backup CAS database when migrating
- Improve error messages
- Add the ability to override ACI exec
- Optimize rkt startup times when a stage1 is present in the store
- Trust keys fetched via TLS by default
- Add the ability to garbage-collect a specific pod
- Add experimental user namespace support
- Bugfixes

## v0.7.0

rkt 0.7.0 includes new subcommands for `rkt image` to manipulate images from
the local store.

It also has a new build system based on autotools and integration with SELinux.

Full changelog:

- New subcommands for `rkt image`: extract, render and export
- Metadata service:
  - Auth now based on tokens
  - Registration done by default, unless --mds-register=false is passed
- Build:
  - Remove support for Go 1.3
  - Replace build system with autoconf and make
- Network: fixes for plugins related to mnt namespace
- Signature: clearer error messages
- Security:
  - Support for SELinux
  - Check signature before downloading
- Commands: fix error messages and parameter parsing
- Output: reduce output verbosity
- Systemd integration: fix stop bug
- Tests: Improve tests output

## v0.6.1

The highlight of this release is the support of per-app memory and CPU
isolators. This means that, in addition to restricting a pod's CPU and memory
usage, individual apps inside a pod can also be restricted now.

rkt 0.6.1 also includes a new CLI/subcommand framework, more functional testing
and journalctl integration by default.

Full changelog:

* Updated to v0.6.1 of the appc spec
* support per-app memory and CPU isolators
* allow network selection to the --private-net flag which can be useful for
  grouping certain pods together while separating others
* move to the Cobra CLI/subcommand framework
* per-app logging via journalctl now supported by default
* stage1 runs an unpatched systemd v220
* to help packagers, rkt can generate stage1 from the binaries on the host at
  runtime
* more functional tests
* bugfixes

## v0.5.6

rkt 0.5.6 includes better integration with systemd on the host, some minor bug
fixes and a new ipvlan network plugin.

- Updated to v0.5.2 of the appc spec
- support running from systemd unit files for top-level isolation
- support per-app logging via journalctl. This is only supported if stage1 has
  systemd v219 or v220
- add ipvlan network plugin
- new rkt subcommand: cat-manifest
- extract ACI in a chroot to avoid malformed links modifying the host
  filesystem
- improve rkt error message if the user doesn't provide required volumes
- fix rkt status when using overlayfs
- support for some arm architectures
- documentation improvements

## v0.5.5

rkt 0.5.5 includes a move to [cni](https://github.com/appc/cni) network
plugins, a number of minor bug fixes and two new experimental commands for
handling images: `rkt images` and `rkt rmimage`.

Full changelog:
- switched to using [cni](https://github.com/appc/cni) based network plugins
- fetch images dependencies recursively when ACIs have dependent images
- fix the progress bar used when downloading images with no content-length
- building the initial stage1 can now be done on various versions of systemd
- support retrying signature downloads in the case of a 202
- remove race in doing a rkt enter
- various documentation fixes to getting started and other guides
- improvements to the functional testing using a new gexpect, testing for
  non-root apps, run context, port test, and more

## v0.5.4

rkt 0.5.4 introduces a number of new features - repository authentication,
per-app arguments + local image signature verification, port forwarding and
more. Further, although we aren't yet guaranteeing API/ABI stability between
releases, we have added important work towards this goal including functional
testing and database migration code.

This release also sees the removal of the `--spawn-metadata-svc` flag to
`rkt run`. The flag was originally provided as a convenience, making it easy
for users to get started with the metadata service.  In rkt v0.5.4 we removed
it in favor of explicitly starting it via `rkt metadata-service` command.

Full changelog:
- added configuration support for repository authentication (HTTP Basic Auth,
  OAuth, and Docker repositories). Full details in
  `Documentation/configuration.md`
- `rkt run` now supports per-app arguments and per-image `--signature`
  specifications
- `rkt run` and `rkt fetch` will now verify signatures for local image files
- `rkt run` with `--private-net` now supports port forwarding (using
  `--port=NAME:1234`)
- `rkt run` now supports a `--local` flag to use only local images (i.e. no
  discovery or remote image retrieval will be performed)
- added initial support for running directly from a pod manifest
- the store DB now supports migrations for future versions
- systemd-nspawn machine names are now set to pod UUID
- removed the `--spawn-metadata-svc` option from `rkt run`; this mode was
  inherently racy and really only for convenience. A separate
  `rkt metadata-service` invocation should be used instead.
- various internal codebase refactoring: "cas" renamed to "store", tasks to
  encapsulate image fetch operations, etc
- bumped docker2aci to support authentication for Docker registries and fix a
  bug when retrieving images from Google Container Registry
- fixed a bug where `--interactive` did not work with arguments
- garbage collection for networking is now embedded in the stage1 image
- when rendering images into the treestore, a global syncfs() is used instead
  of a per-file sync(). This should significantly improve performance when
  first extracting large images
- added extensive functional testing on semaphoreci.com/coreos/rkt
- added a test-auth-server to facilitate testing of fetching images

## v0.5.3
This release contains minor updates over v0.5.2, notably finalising the move to
pods in the latest appc spec and becoming completely name consistent on `rkt`.
- {Container,container} changed globally to {Pod,pod}
- {Rocket,rocket} changed globally to `rkt`
- `rkt install` properly sets permissions for all directories
- `rkt fetch` leverages the cas.Store TmpDir/TmpFile functions (now exported)
  to generate temporary files for downloads
- Pod lifecycle states are now exported for use by other packages
- Metadata service properly synchronizes access to pod state

## v0.5.2

This release is a minor update over v0.5.1, incorporating several bug fixes and
a couple of small new features:
- `rkt enter` works when overlayfs is not available
- `rkt run` now supports the `--no-overlay` option referenced (but not
  implemented!) in the previous release
- the appc-specified environment variables (PATH, HOME, etc) are once again set
  correctly during `rkt run`
- metadata-service no longer manipulates IP tables rules as it connects over a
  unix socket by default
- pkg/lock has been improved to also support regular (non-directory) files
- images in the cas are now locked at runtime (as described in [#460](https://github.com/coreos/rkt/pull/460))

## v0.5.1

This release updates Rocket to follow the latest version of the appc spec,
v0.5.1. This involves the major change of moving to _pods_ and _Pod Manifests_
(which enhance and supplant the previous _Container Runtime Manifest_). The
Rocket codebase has been updated across the board to reflect the schema/spec
change, as well as changing various terminology in other human-readable places:
for example, the previous ambiguous (unqualified) "container" is now replaced
everywhere with "pod".

This release also introduces a number of key features and minor changes:
- overlayfs support, enabled for `rkt run` by default (disable with
  `--no-overlayfs`)
- to facilitate overlayfs, the CAS now features a tree store which stores
  expanded versions of images
- the default stage1 (based on systemd) can now be built from source, instead
  of only derived from an existing binary distribution as previously. This is
  configurable using the new `RKT_STAGE1_USR_FROM` environment variable when
  invoking the build script - see fdcd64947
- the metadata service now uses a Unix socket for registration; this limits who
  can register/unregister pods by leveraging filesystem permissions on the
  socket
- `rkt list` now abbreviates UUIDs by default (configurable with `--full`)
- the ImageManifest's `readOnly` field (for volume mounts) is now overridden by
  the rkt command line
- a simple debug script (in scripts/debug) to facilitate easier debugging of
  applications running under Rocket by injecting Busybox into the pod
- documentation for the metadata service, as well as example systemd unit files

## v0.4.2

- First support for interactive containers, with the `rkt run --interactive`
  flag. This is currently only supported if a container has one app. [#562](https://github.com/coreos/rkt/pull/562) #[601](https://github.com/coreos/rkt/pull/601)
- Add container IP address information to `rkt list`
- Provide `/sys` and `/dev/shm` to apps (per spec)
- Introduce "latest" pattern handling for local image index
- Implement FIFO support in tar package
- Restore atime and mtime during tar extraction
- Bump docker2aci dependency

## v0.4.1

This is primarily a bug fix release with the addition of the `rkt install`
subcommand to help people setup a unprivileged `rkt fetch` based on unix users.

- Fix marshalling error when running containers with resource isolators
- Fixup help text on run/prepare about volumes
- Fixup permissions in `rkt trust` created files
- Introduce the `rkt install` subcommand

## v0.4.0

This release is mostly a milestone release and syncs up with the latest release
of the [appc spec](https://github.com/appc/spec/releases/tag/v0.4.0) yesterday.

Note that due to the introduction of a database for indexing the local CAS,
users upgrading from previous versions of Rocket on a system may need to clear
their local cache by removing the `cas` directory. For example, using the
standard Rocket setup, this would be accomplished with
`rm -fr /var/lib/rkt/cas`.

Major changes since v0.3.2:
- Updated to v0.4.0 of the appc spec
- Introduced a database for indexing local images in the CAS (based on
  github.com/cznic/ql)
- Refactored container lifecycle to support a new "prepared" state, to
- pre-allocate a container UUID without immediately running the application
- Added support for passing arguments to apps through the `rkt run` CLI
- Implemented ACI rendering for dependencies
- Renamed `rkt metadatasvc` -> `rkt metadata-service`
- Added documentation around networking, container lifecycle, and rkt commands

## v0.3.2

This release introduces much improved documentation and a few new features.

The highlight of this release is that Rocket can now natively run Docker
images. To do this, it leverages the appc/docker2aci library which performs a
straightforward conversion betwen images in the Docker format and the appc
format.

A simple example:

```
$ rkt --insecure-skip-verify run docker://redis docker://tenstartups/redis-commander
rkt: fetching image from docker://redis
rkt: warning: signature verification has been disabled
Downloading layer: 511136ea3c5a64f264b78b5433614aec563103b4d4702f3ba7d4d2698e22c158
```

Note that since Docker images do not support image signature verifications, the
`-insecure-skip-verify` must be used.

Another important change in this release is that the default location for the
stage1 image used by `rkt run` can now be set at build time, by setting the
`RKT_STAGE1_IMAGE` environment variable when invoking the build script. (If
this is not set, `rkt run` will continue with its previous behaviour of looking
for a stage1.aci in the same directory as the binary itself. This makes it
easier for distributions to package Rocket and include the stage1 wherever
they choose (for example, `/usr/lib/rkt/stage1.aci`). For more information, see
https://github.com/coreos/rocket/pull/520

## v0.3.1

The primary motivation for this release is to resynchronise versions with the
appc spec. To minimise confusion in the short term we intend to keep the
major/minor version of Rocket aligned with the version of spec it implements;
hence, since yesterday v0.3.0 of the appc spec was released, today Rocket
becomes v0.3.1. After the spec (and Rocket) reach v1.0.0, we may relax this
restriction.

This release also resolves an upstream bug in the appc discovery code which was
causing rkt trust to fail in certain cases.

## v0.3.0

This is largely a momentum release but it does introduce a few new user-facing
features and some important changes under the hood which will be of interest to
developers and distributors.

First, the CLI has a couple of new commands:
- `rkt trust` can be used to easily add keys to the public keystore for ACI
  signatures (introduced in the previous release). This supports retrieving
  public keys directly from a URL or using discovery to locate public keys - a
  simple example of the latter is `rkt trust --prefix coreos.com/etcd`. See the
  commit for other examples.
- `rkt list` is an extremely simple tool to list the containers on the system

As mentioned, v0.3.0 includes two significant changes to the Rocket build process:
- Instead of embedding the (default) stage1 using go-bindata, Rocket now
  consumes a stage1 in the form of an actual ACI, containing a rootfs and
  stage1 init/exec binaries. By default, Rocket will look for a `stage1.aci` in
  the same directory as the location of the binary itself, but the stage1 can
  be explicitly specified with the new `-stage1-image` flag (which deprecates
  `-stage1-init` and `-stage1-rootfs`). This makes it much more straightforward
  to use alternative stage1 images with rkt and facilitates packing it for
  different distributions like Fedora.
- Rocket now vendors a copy of the appc/spec instead of depending on HEAD. This
  means that Rocket can be built in a self-contained and reproducible way and
  that master will no longer break in response to changes to the spec. It also
  makes explicit the specific version of the spec against which a particular
  release of Rocket is compiled.

As a consequence of these two changes, it is now possible to use the standard
Go workflow to build the Rocket CLI (e.g. `go get github.com/coreos/rocket/rkt`
will build rkt). Note however that this does not implicitly build a stage1, so
that will still need to be done using the included ./build script, or some
other way for those desiring to use a different stage1.

## v0.2.0

This introduces countless features and improvements over v0.1.1. Highlights
include several new commands (`rkt status`, `rkt enter`, `rkt gc`) and
signature validation.

## v0.1.1

The most significant change in this release is that the spec has been split
into its own repository (https://github.com/appc/spec), and significantly
updated since the last release - so many of the changes were to update to match
the latest spec.

Numerous improvements and fixes over v0.1.0:
- Rocket builds on non-Linux (in a limited capacity)
- Fix bug handling uncompressed images
- More efficient image handling in CAS
- mkrootfs now caches and GPG checks images
- stage1 is now properly decoupled from host runtime
- stage1 supports socket activation
- stage1 no longer warns about timezones
- cas now logs download progress to stdout
- rkt run now acquires an exclusive lock on the container directory and records
  the PID of the process

## v0.1.0

- tons of documentation improvements added
- actool introduced along with documentation
- image discovery introduced to rkt run and rkt fetch

## v0.0.0

Initial release.


text:
package se.jsa.jles;

import java.util.ArrayList;
import java.util.List;

public class NewEventNotificationListeners {

	public interface NewEventNotificationListener {
		void onNewEvent();
	}

	private final List<NewEventNotificationListener> listeners = new ArrayList<NewEventNotificationListener>();

	public void registerListener(NewEventNotificationListener listener) {
		this.listeners.add(listener);
	}

	public void onNewEvent() {
		for (NewEventNotificationListener listener : listeners) {
			listener.onNewEvent();
		}
	}

}


text:
package com.atlassian.stash.plugin.enforcecommit;

import com.atlassian.stash.commit.CommitService;
import com.atlassian.stash.content.Changeset;
import com.atlassian.stash.content.ChangesetsBetweenRequest;
import com.atlassian.stash.hook.HookResponse;
import com.atlassian.stash.hook.repository.PreReceiveRepositoryHook;
import com.atlassian.stash.hook.repository.RepositoryHookContext;
import com.atlassian.stash.repository.RefChange;
import com.atlassian.stash.repository.RefChangeType;
import com.atlassian.stash.repository.Repository;
import com.atlassian.stash.setting.RepositorySettingsValidator;
import com.atlassian.stash.setting.Settings;
import com.atlassian.stash.setting.SettingsValidationErrors;
import com.atlassian.stash.util.PageRequestImpl;
import com.google.common.collect.Lists;

import javax.annotation.Nonnull;
import java.util.Collection;
import java.util.List;
import java.util.regex.Pattern;
import java.util.regex.PatternSyntaxException;

public class EnforceCommitHook implements PreReceiveRepositoryHook, RepositorySettingsValidator {

    private static final PageRequestImpl PAGE_REQUEST = new PageRequestImpl(0, 100);

    private static final String DEFAULT_PATTERN = "((?<!([A-Z]{1,10})-?)[A-Z]+-\\d+)";

    private static final String DEFAULT_MESSAGE =
            "The git commit message(s) for the following\n" +
                    "must be prepended with a valid JIRA key.\n" +
                    "Use CAPS for the project key.\n" +
                    "For example:\n" +
                    "    KEY-123: Your message here\n" +
                    "Use \"git commit --amend -m\" to fix the message or\n" +
                    "\"git rebase\" if you are pushing multiple commits.";

    private static final String SETTINGS_PATTERN = "pattern";
    private static final String SETTINGS_MESSAGE = "message";

    private final CommitService commitService;

    public EnforceCommitHook(CommitService commitService) {
        this.commitService = commitService;
    }

    @Override
    public boolean onReceive(@Nonnull RepositoryHookContext context, @Nonnull Collection<RefChange> refChanges, @Nonnull HookResponse hookResponse) {
        Pattern pattern = Pattern.compile(getString(context.getSettings(), SETTINGS_PATTERN, DEFAULT_PATTERN));
        List<Changeset> badChangesets = Lists.newArrayList();
        for (RefChange refChange : refChanges) {
            if (refChange.getType() == RefChangeType.DELETE) {
                continue;
            }
            // TODO What about new branches?
            final ChangesetsBetweenRequest changesetsBetweenRequest = new ChangesetsBetweenRequest.Builder(context.getRepository())
                    .include(refChange.getToHash())
                    .exclude(refChange.getFromHash())
                    .build();
            for (Changeset changeset : commitService.getChangesetsBetween(changesetsBetweenRequest, PAGE_REQUEST).getValues()) {
                if (!pattern.matcher(changeset.getMessage()).find()) {
                    badChangesets.add(changeset);
                }
            }
        }
        if (badChangesets.isEmpty()) {
            return true;
        }
        hookResponse.err().println(getString(context.getSettings(), SETTINGS_MESSAGE, DEFAULT_MESSAGE));
        for (Changeset changeset : badChangesets) {
            hookResponse.err().println(String.format("Changeset '%s' with message '%s'", changeset.getId(), changeset.getMessage()));
        }
        return false;
    }

    @Override
    public void validate(@Nonnull Settings settings, @Nonnull SettingsValidationErrors errors, @Nonnull Repository repository) {
        try {
            //noinspection ResultOfMethodCallIgnored
            Pattern.compile(getString(settings, SETTINGS_PATTERN, DEFAULT_PATTERN));
        } catch (PatternSyntaxException e) {
            errors.addFieldError(SETTINGS_PATTERN, e.getMessage());
        }
    }

    private static String getString(Settings settings, String key, String def) {
        String value = settings.getString(key, "");
        return value.trim().isEmpty() ? def : value;
    }

}


text:
var ews = require('ews-javascript-api');
ews.EwsLogging.DebugLogEnabled = false;

var args = process.argv.slice(2);
var messages = [];
var IDs = [];
var data = "";

process.stdin.setEncoding('utf8');

process.stdin.on('readable', () => {
    var chunk = process.stdin.read();

    if (chunk !== null)
        data += chunk;
});

process.stdin.on('end', () => {
	var [authData_base64, IDs_base64, messages_base64] = data.split('\n');
    var [ URL,
          username,
          password,
          authType,
          TLS ] = Buffer.from(authData_base64, "base64").toString("utf-8").split('\n');
    var IDsArray = (IDs_base64 == "") ? [] : Buffer.from(IDs_base64, "base64").toString("utf-8").split('\n');
    var messagesArray = (messages_base64 == "") ? [] : Buffer.from(messages_base64, "base64").toString("utf-8").split('\n');

    if ( TLS == "false" )
        process.env.NODE_TLS_REJECT_UNAUTHORIZED = '0';

    for ( var i = 0; i < IDsArray.length; i++ )
        IDs.push(new ews.ItemId(IDsArray[i]));

    try
    {
        var exch = new ews.ExchangeService(ews.ExchangeVersion.Exchange2007_SP1);
        exch.Url = new ews.Uri(URL);

        if ( authType == "Basic" )
        {
            exch.Credentials = new ews.ExchangeCredentials(username, password);
        }
        else if ( authType == "NTLM" )
        {
            exch.Credentials = new ews.ExchangeCredentials("xxx", "xxx");
            var ntlmXHR = require("./ntlmXHRApi");
            var ntlmXHRApi = new ntlmXHR.ntlmXHRApi(username, password);
            exch.XHRApi = ntlmXHRApi;
        }

        for ( var i = 0; i < messagesArray.length; i += 2 )
	    {
	    	var message = new ews.EmailMessage(exch);
			var mimeContent = new ews.MimeContent();
			var bccRecipients = (messagesArray[i] == "") ? [] : messagesArray[i].split(',');
			mimeContent.Content = messagesArray[i+1];
			message.MimeContent = mimeContent;

			for ( var j = 0; j < bccRecipients.length; j++ )
				message.BccRecipients.Add(bccRecipients[j]);

			messages.push(message);
	    }
    }
    catch (ex)
    {
        process.stdout.write("ERROR");
        process.exit(1);
    }

    var d = require('domain').create()
    d.on('error', function (error) {
        process.stdout.write("ERROR");
        process.exit(1);
    });

	// d.run(function () {
	// 	var Promise = require('bluebird');
	// 	Promise.reduce(messages, function (totalNotUsed, resp) {
	// 		// first send all local messages
	// 		return resp.SendAndSaveCopy().then(function () {
	// 			return null;
	// 		}, function (error) {
	// 			process.stdout.write("ERROR");
	// 			process.exit(1);
	// 		});
	// 	}, null).then(function (totalNotUsed) {
	// 		// done sending local messages
	// 		exch.BindToItems(IDs, new ews.PropertySet(ews.BasePropertySet.IdOnly)).then(function (response) {
	// 			Promise.reduce(response.Responses, function (totalNotUsed, resp) {
	// 				// second send messages stored on server
	// 				return resp.Item.Load(new ews.PropertySet(ews.BasePropertySet.IdOnly,
	// 					                  [ews.EmailMessageSchema.MimeContent])).then(function () {
	// 					resp.Item.SendAndSaveCopy().then(function () {

	// 					}, function (error) {
	// 						process.stdout.write("ERROR");
	// 						process.exit(1);
	// 					});

	// 					return null;
	// 				});
	// 			}, null).then(function (totalNotUsed) {
	// 				// done sending server messages
	// 			});
	// 		}, function (error) {
	// 			process.stdout.write("ERROR");
	// 			process.exit(1);
	// 		});
	// 	});
	// });

	d.run(function () {
		for ( var i = 0; i < messages.length; i++ )
		{
			messages[i].SendAndSaveCopy().then(function () {

			}, function (error) {
				process.stdout.write("ERROR");
				process.exit(1);
			});
		}

        for ( var i = 0; i < IDs.length; i++ )
		{
			ews.EmailMessage.Bind(exch, IDs[i], new ews.PropertySet(ews.BasePropertySet.IdOnly,
							                    [ews.EmailMessageSchema.MimeContent])).then(function (response) {
				response.SendAndSaveCopy().then(function () {

				}, function (error) {
					process.stdout.write("ERROR");
					process.exit(1);
				});
			}, function (error) {
				process.stdout.write("ERROR");
				process.exit(1);
			});
		}
    });
});


text:
require 'spaceship'

module Fastlane
  class SetupIos < Setup
    # the tools that are already enabled
    attr_accessor :tools
    attr_accessor :project
    attr_accessor :apple_id

    attr_accessor :portal_ref
    attr_accessor :itc_ref

    attr_accessor :dev_portal_team
    attr_accessor :itc_team

    attr_accessor :app_identifier
    attr_accessor :app_name

    attr_accessor :is_swift_fastfile

    def run(user: nil, is_swift_fastfile: false)
      self.is_swift_fastfile = is_swift_fastfile
      self.apple_id = user
      show_infos

      FastlaneCore::FastlaneFolder.create_folder! unless Helper.is_test?
      is_manual_setup = false

      setup_project
      react_native_pre_checks
      ask_for_apple_id

      begin
        if self.project.mac?
          UI.important("Generating apps on the Apple Developer Portal and iTunes Connect is not currently available for Mac apps")
        else
          detect_if_app_is_available
        end
        print_config_table
        if self.project.schemes.count > 1
          UI.important("Note: If the values above are incorrect, it is possible the wrong scheme was selected")
        end
        if UI.confirm("Please confirm the above values")
          default_setup
        else
          is_manual_setup = true
          UI.message("Falling back to manual onboarding")
          manual_setup
        end
        UI.success('Successfully finished setting up fastlane')
      rescue Spaceship::Client::InsufficientPermissions, Spaceship::Client::ProgramLicenseAgreementUpdated => ex
        # We don't want to fallback to manual onboarding for this
        # as the user needs to first accept the agreement / get more permissions
        # Let's re-raise the exception to properly show the error message
        raise ex
      rescue => ex # this will also be caused by Ctrl + C
        UI.message("Ran into error while trying to connect to iTunes Connect / Dev Portal: #{ex}")
        UI.message("Falling back to manual onboarding")

        if is_manual_setup
          handle_exception(exception: ex)
        else
          UI.error(ex.to_s)
          UI.error('An error occurred during the setup process. Falling back to manual setup!')
          try_manual_setup
        end
      end
    end

    def handle_exception(exception: nil)
      # Something went wrong with the setup, clear the folder again
      # and restore previous files
      UI.error('Error occurred with the setup program! Reverting changes now!')
      restore_previous_state
      raise exception
    end

    def try_manual_setup
      manual_setup
    rescue => ex
      handle_exception(exception: ex)
    end

    # React Native specific code
    # Make it easy for people to onboard
    def react_native_pre_checks
      return unless self.class.project_uses_react_native?
      if app_identifier.to_s.length == 0
        error_message = []
        error_message << "Could not detect bundle identifier of your react-native app."
        error_message << "Make sure to open the Xcode project and update the bundle identifier"
        error_message << "in the `General` section of your project settings."
        error_message << "Restart `fastlane init` once you're done!"
        UI.user_error!(error_message.join(" "))
      end
    end

    def self.project_uses_react_native?(path: Dir.pwd)
      package_json = File.join(path, "..", "package.json")
      return false unless File.basename(path) == "ios"
      return false unless File.exist?(package_json)
      package_content = File.read(package_json)
      return true if package_content.include?("react-native")
      false
    end

    def default_setup
      copy_existing_files
      generate_appfile(manually: false)
      detect_installed_tools # after copying the existing files
      if !self.project.mac? && self.itc_ref.nil? && self.portal_ref.nil?
        create_app_if_necessary
      end
      enable_deliver
      generate_fastfile(manually: false)

      if self.is_swift_fastfile
        update_swift_runner
      end

      show_analytics
    end

    def manual_setup
      copy_existing_files
      generate_appfile(manually: true)
      detect_installed_tools # after copying the existing files
      ask_to_enable_other_tools
      generate_fastfile(manually: true)

      if self.is_swift_fastfile
        update_swift_runner
      end

      show_analytics
    end

    def ask_to_enable_other_tools
      if self.itc_ref.nil? && self.portal_ref.nil?
        wants_to_create_app = UI.confirm('Would you like to create your app on iTunes Connect and the Developer Portal?')
        if wants_to_create_app
          create_app_if_necessary
          detect_if_app_is_available # check if the app was, in fact, created.
        end
      end
      if self.itc_ref && self.portal_ref
        wants_to_setup_deliver = UI.confirm("Do you want to setup 'deliver', which is used to upload app screenshots, app metadata and app updates to the App Store? This requires the app to be in the App Store already")
        enable_deliver if wants_to_setup_deliver
      end
    end

    def setup_project
      config = {}
      FastlaneCore::Project.detect_projects(config)
      self.project = FastlaneCore::Project.new(config)
      self.project.select_scheme(preferred_to_include: self.project.project_name)
      self.app_identifier = self.project.default_app_identifier # These two vars need to be accessed in order to be set
      self.app_name = self.project.default_app_name # They are set as a side effect, this could/should be changed down the road
    end

    def print_config_table
      rows = []
      rows << ["Apple ID", self.apple_id]
      rows << ["App Name", self.app_name]
      rows << ["App Identifier", self.app_identifier]
      rows << [(self.project.is_workspace ? "Workspace" : "Project"), self.project.path]
      require 'terminal-table'
      puts ""
      puts Terminal::Table.new(rows: FastlaneCore::PrintTable.transform_output(rows),
                              title: "Detected Values")
      puts ""

      unless self.itc_ref || self.project.mac?
        UI.important "This app identifier doesn't exist on iTunes Connect yet, it will be created for you"
      end

      unless self.portal_ref || self.project.mac?
        UI.important "This app identifier doesn't exist on the Apple Developer Portal yet, it will be created for you"
      end
    end

    def show_infos
      UI.success('This setup will help you get up and running in no time.')
      UI.success("fastlane will check what tools you're already using and set up")
      UI.success('the tool automatically for you. Have fun! ')
    end

    def files_to_copy
      ['Deliverfile', 'deliver', 'screenshots', 'metadata']
    end

    def copy_existing_files
      files_to_copy.each do |current|
        current = File.join(File.expand_path('..', FastlaneCore::FastlaneFolder.path), current)
        next unless File.exist?(current)
        file_name = File.basename(current)
        to_path = File.join(folder, file_name)
        UI.success("Moving '#{current}' to '#{to_path}'")
        FileUtils.mv(current, to_path)
      end
    end

    def ask_for_apple_id
      self.apple_id ||= UI.input("Your Apple ID (e.g. fastlane@krausefx.com): ")
    end

    def ask_for_app_identifier
      self.app_identifier = UI.input("App Identifier (com.krausefx.app): ")
    end

    def generate_appfile(manually: false)
      template = File.read(appfile_template_path)
      if manually
        ask_for_app_identifier
        ask_for_apple_id
      end

      template.gsub!('[[DEV_PORTAL_TEAM_ID]]', self.dev_portal_team) if self.dev_portal_team
      template.gsub!('[[APP_IDENTIFIER]]', self.app_identifier)
      template.gsub!('[[APPLE_ID]]', self.apple_id)

      if self.is_swift_fastfile
        itc_team = self.itc_team ? "\"#{self.itc_team}\"" : "nil"
        path = File.join(folder, 'Appfile.swift')
      else
        itc_team = self.itc_team ? "itc_team_id \"#{self.itc_team}\" # iTunes Connect Team ID\n" : ""
        path = File.join(folder, 'Appfile')
      end
      template.gsub!('[[ITC_TEAM]]', itc_team)

      File.write(path, template)
      UI.success("Created new file '#{path}'. Edit it to manage your preferred app metadata information.")
    end

    # Detect if the app was created on the Dev Portal / iTC
    def detect_if_app_is_available
      UI.important "Verifying that app is available on the Apple Developer Portal and iTunes Connect..."
      UI.message "Starting login with user '#{self.apple_id}'"
      Spaceship.login(self.apple_id, nil)
      self.dev_portal_team = Spaceship.select_team
      self.portal_ref = Spaceship::App.find(self.app_identifier)

      Spaceship::Tunes.login(@apple_id, nil)
      self.itc_team = Spaceship::Tunes.select_team
      self.itc_ref = Spaceship::Application.find(self.app_identifier)
    end

    def create_app_if_necessary
      UI.important "Creating the app on iTunes Connect and the Apple Developer Portal"
      require 'produce'
      config = {} # this has to be done like this
      FastlaneCore::Project.detect_projects(config)
      project = FastlaneCore::Project.new(config)
      produce_options_hash = {
        app_name: project.app_name,
        app_identifier: self.app_identifier
      }
      Produce.config = FastlaneCore::Configuration.create(Produce::Options.available_options, produce_options_hash)
      begin
        ENV['PRODUCE_APPLE_ID'] = Produce::Manager.start_producing
      rescue => exception
        if exception.to_s.include?("The App Name you entered has already been used")
          UI.important("It looks like that #{project.app_name} has already been taken by someone else, please enter an alternative.")
          Produce.config[:app_name] = UI.input("App Name: ")
          Produce.config[:skip_devcenter] = true # since we failed on iTC
          ENV['PRODUCE_APPLE_ID'] = Produce::Manager.start_producing
        end
      end
    end

    def detect_installed_tools
      self.tools = {}
      self.tools[:snapshot] = File.exist?(File.join(folder, 'Snapfile'))
      self.tools[:snapshot] ||= File.exist?(File.join(folder, 'Snapfile.swift'))
      self.tools[:cocoapods] = File.exist?(File.join(File.expand_path('..', folder), 'Podfile'))
      self.tools[:carthage] = File.exist?(File.join(File.expand_path('..', folder), 'Cartfile'))
    end

    def enable_deliver
      UI.message("Loading up 'deliver', this might take a few seconds")
      require 'deliver'
      require 'deliver/setup'

      options = FastlaneCore::Configuration.create(Deliver::Options.available_options, {})
      options[:run_precheck_before_submit] = false # precheck doesn't need to run during init
      options[:username] = self.apple_id if self.apple_id
      options[:app_identifier] = self.app_identifier if self.app_identifier

      Deliver::Runner.new(options) # to login...
      Deliver::Setup.new.run(options, is_swift: self.is_swift_fastfile)
    end

    def generate_fastfile(manually: false)
      scheme = self.project.schemes.first unless manually

      template = File.read(fastfile_template_path)

      scheme = UI.input("Optional: The scheme name of your app (If you don't need one, just hit Enter): ") unless scheme
      if scheme.length > 0
        if self.is_swift_fastfile
          template.gsub!('[[SCHEME]]', "scheme: \"#{scheme}\"")
        else
          template.gsub!('[[SCHEME]]', "(scheme: \"#{scheme}\")")
        end
      else
        template.gsub!('[[SCHEME]]', "")
      end

      template.gsub!('[[FASTLANE_VERSION]]', Fastlane::VERSION)

      if self.is_swift_fastfile
        template.gsub!('snapshot()', '// snapshot') unless self.tools[:snapshot]
        template.gsub!('cocoapods()', '// cocoapods()') unless self.tools[:cocoapods]
        template.gsub!('carthage()', '// carthage()') unless self.tools[:carthage]
        path = File.join(folder, 'Fastfile.swift')
      else
        template.gsub!('snapshot', '# snapshot') unless self.tools[:snapshot]
        template.gsub!('cocoapods', '# cocoapods') unless self.tools[:cocoapods]
        template.gsub!('carthage', '# cocoapods') unless self.tools[:carthage]
        path = File.join(folder, 'Fastfile')
      end

      self.tools.each do |key, value|
        UI.message("'#{key}' enabled.".magenta) if value
        UI.important("'#{key}' not enabled.") unless value
      end

      File.write(path, template)
      UI.success("Created new file '#{path}'. Edit it to manage your own deployment lanes.")
    end

    def folder
      FastlaneCore::FastlaneFolder.path
    end

    def appfile_template_path
      if self.is_swift_fastfile
        return "#{Fastlane::ROOT}/lib/assets/AppfileTemplate.swift"
      else
        return "#{Fastlane::ROOT}/lib/assets/AppfileTemplate"
      end
    end

    def fastfile_template_path
      if self.is_swift_fastfile
        return "#{Fastlane::ROOT}/lib/assets/DefaultFastfileTemplate.swift"
      else
        return "#{Fastlane::ROOT}/lib/assets/DefaultFastfileTemplate"
      end
    end

    def update_swift_runner
      runner_source_resources = "#{Fastlane::ROOT}/swift/."

      destination_path = File.expand_path('swift', FastlaneCore::FastlaneFolder.path)
      FileUtils.cp_r(runner_source_resources, destination_path)

      UI.success("Copied Swift fastlane runner project to '#{destination_path}'.")
    end

    def restore_previous_state
      # Move all moved files back
      files_to_copy.each do |current|
        from_path = File.join(folder, current)
        to_path = File.basename(current)
        if File.exist?(from_path)
          UI.important("Moving '#{from_path}' to '#{to_path}'")
          FileUtils.mv(from_path, to_path)
        end
      end

      UI.important("Deleting the 'fastlane' folder")
      FileUtils.rm_rf(folder)
    end
  end
end


text:
@interface STKViewController ()

@end

@implementation STKViewController

- (void)viewDidLoad
{
    [super viewDidLoad];
	// Do any additional setup after loading the view, typically from a nib.
}

- (void)didReceiveMemoryWarning
{
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

- (IBAction)openModally:(UIButton *)sender {
    NSURL *url = [NSURL URLWithString:@"https://github.com/sticksen/STKWebKitViewController"];
    STKWebKitModalViewController *controller = [[STKWebKitModalViewController alloc] initWithURL:url];
    [self presentViewController:controller animated:YES completion:nil];
}

- (IBAction)pushOnNavController:(UIButton *)sender {
    NSURL *url = [NSURL URLWithString:@"https://github.com/sticksen/STKWebKitViewController"];
    STKWebKitViewController *controller = [[STKWebKitViewController alloc] initWithURL:url];
    self.navigationController.hidesBarsOnSwipe = YES;
    [self.navigationController pushViewController:controller animated:YES];
}

- (IBAction)openWithCustomColors:(UIButton *)sender {
    NSURL *url = [NSURL URLWithString:@"https://github.com/sticksen/STKWebKitViewController"];
    STKWebKitModalViewController *controller = [[STKWebKitModalViewController alloc] initWithURL:url];
    controller.webKitViewController.navigationBarTintColor = [UIColor brownColor];
    controller.webKitViewController.toolbarTintColor = [UIColor brownColor];
    [self presentViewController:controller animated:YES completion:nil];
}

@end


text: View a users initial repository.


text:
layout: default
title: Posts
permalink: /posts/
---
{% for post in site.posts %}

{{ post.title }}

{% endfor %}


text:
import {Injectable} from "@angular/core";
import { CATEGORIES } from "./mock-categories";

@Injectable()
export class CategoriesService {
  private categories:any;

  constructor() {
    this.categories = CATEGORIES;
  }

  getAll() {
    return this.categories;
  }

  getItem(id) {
    for (var i = 0; i < this.categories.length; i++) {
      if (this.categories[i].id === parseInt(id)) {
        return this.categories[i];
      }
    }
    return null;
  }

  remove(item) {
    this.categories.splice(this.categories.indexOf(item), 1);
  }
}


text:
<!--
    Please leave this section at the top of the change log.

    Changes for the current release should go under the section titled "Current Release", and should adhere to the following format:

    ## Current Release
    * Overview of change #1
        - Additional information about change #1
    * Overview of change #2
        - Additional information about change #2
        - Additional information about change #2
    * Overview of change #3
    * Overview of change #4
        - Additional information about change #4

    ## YYYY.MM.DD - Version X.Y.Z (Previous Release)
    * Overview of change #1
        - Additional information about change #1
-->
## Current Release
* Added storage properties to threat detection cmdlets

## Version 2.3.0