text:
require 'net/ldap'
require 'yaml'
require 'active_directory_service/service'
require 'active_support'

module ActiveDirectoryService
  DEFAULT_LDAP_CONFIG = {
    host: 'localhost',
    basic_port: 389,
    ssl_port: 636,
    attribute: 'cn',
    ca_file_path: '/etc/ssl/certs/corpRootCa.cer',
    verify_certificate: false,
    ssl_version: 'TLSv1_1',
    base: 'ou=people,dc=test,dc=com',
    ssl: false
  }.freeze

  # A path to YAML config file or a Proc that returns a
  # configuration hash
  mattr_accessor :ldap_config

  def self.setup
    self.ldap_config = DEFAULT_LDAP_CONFIG
    yield self
  end
end


text:
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { FormsModule } from '@angular/forms';
import { NgbModule } from '@ng-bootstrap/ng-bootstrap';

import { TimepickerComponent } from './timepicker.component';

describe('TimepickerComponent', () => {
  let component: TimepickerComponent;
  let fixture: ComponentFixture<TimepickerComponent>;

  beforeEach(async(() => {
    TestBed.configureTestingModule({
      imports: [
        FormsModule,
        NgbModule
      ],
      declarations: [ TimepickerComponent ]
    })
    .compileComponents();
  }));

  beforeEach(() => {
    fixture = TestBed.createComponent(TimepickerComponent);
    component = fixture.componentInstance;
    fixture.detectChanges();
  });

  it('should create', () => {
    expect(component).toBeTruthy();
  });
});

redpajama_set_name: RedPajamaGithub


text:
<?xml version="1.0" encoding="latin1" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">

<erlref>

    <copyright>
      <year>1996</year><year>2010</year>
      <holder>Ericsson AB. All Rights Reserved.</holder>
    </copyright>
    <legalnotice>
      The contents of this file are subject to the Erlang Public License,
      Version 1.1, (the "License"); you may not use this file except in
      compliance with the License. You should have received a copy of the
      Erlang Public License along with this software. If not, it can be
      retrieved online at http://www.erlang.org/.

      Software distributed under the License is distributed on an "AS IS"
      basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
      the License for the specific language governing rights and limitations
      under the License.

    </legalnotice>

    <title>erl_scan</title>
    <prepared>Robert Virding</prepared>
    <responsible>Bjarne Däcker</responsible>
    <docno>1</docno>
    <approved>Bjarne Däcker</approved>
    <checked></checked>
    <date>97-01-24</date>
    <rev>B</rev>
    <file>erl_scan.sgml</file>

  <module>erl_scan</module>
  <modulesummary>The Erlang Token Scanner</modulesummary>
  <description>

This module contains functions for tokenizing characters into
      Erlang tokens.

  </description>

    <title>DATA TYPES</title>

category() = atom()
column() = integer() > 0
line() = integer()
location() = line() | {line(), column()}
reserved_word_fun() -> fun(atom()) -> bool()
set_attribute_fun() -> fun(term()) -> term()
symbol() = atom() | float() | integer() | string()
token() = {category(), attributes()} | {category(), attributes(), symbol()}
attributes() = line() | list() | tuple()

  <funcs>
    <func>
      <name>string(String) -> Return</name>
      <name>string(String, StartLocation) -> Return</name>
      <name>string(String, StartLocation, Options) -> Return</name>
      <fsummary>Scan a string and return the Erlang tokens</fsummary>
      <type>
        <v>String = string()</v>
        <v>Return = {ok, Tokens, EndLocation} | Error</v>
        <v>Tokens = [token()]</v>
        <v>Error = {error, ErrorInfo, EndLocation}</v>
        <v>StartLocation = EndLocation = location()</v>
        <v>Options = Option | [Option]</v>
        <v>Option = {reserved_word_fun,reserved_word_fun()}
                  | return_comments | return_white_spaces | return
                  | text</v>
      </type>
      <desc>

Takes the list of characters <c>String</c> and tries to
          scan (tokenize) them. Returns <c>{ok, Tokens, EndLocation}</c>,
          where <c>Tokens</c> are the Erlang tokens from
          <c>String</c>. <c>EndLocation</c> is the first location
          after the last token.

<c>{error, ErrorInfo, EndLocation}</c> is returned if an
          error occurs. <c>EndLocation</c> is the first location after
          the erroneous token.

<c>string(String)</c> is equivalent to
          <c>string(String, 1)</c>, and <c>string(String,
          StartLocation)</c> is equivalent to <c>string(String,
          StartLocation, [])</c>.

<c>StartLocation</c> indicates the initial location when
          scanning starts. If <c>StartLocation</c> is a line
          <c>attributes()</c> as well as <c>EndLocation</c> and
          <c>ErrorLocation</c> will be lines. If
          <c>StartLocation</c> is a pair of a line and a column
          <c>attributes()</c> takes the form of an opaque compound
          data type, and <c>EndLocation</c> and <c>ErrorLocation</c>
          will be pairs of a line and a column. The token
          attributes contain information about the column and the
          line where the token begins, as well as the text of the
          token (if the <c>text</c> option is given), all of which can
          be accessed by calling <seealso
          marker="#token_info/1">token_info/1,2</seealso> or <seealso
          marker="#attributes_info/1">attributes_info/1,2</seealso>.

A token is a tuple containing information about
          syntactic category, the token attributes, and the actual
          terminal symbol. For punctuation characters (e.g. <c>;</c>,
          <c>|</c>) and reserved words, the category and the symbol
          coincide, and the token is represented by a two-tuple.
          Three-tuples have one of the following forms: <c>{atom,
          Info, atom()}</c>,
          <c>{char, Info, integer()}</c>, <c>{comment, Info,
          string()}</c>, <c>{float, Info, float()}</c>, <c>{integer,
          Info, integer()}</c>, <c>{var, Info, atom()}</c>,
          and <c>{white_space, Info, string()}</c>.

The valid options are:

        <taglist>
        <tag><c>{reserved_word_fun, reserved_word_fun()}</c></tag>
        <item>
A callback function that is called when the scanner
          has found an unquoted atom. If the function returns
          <c>true</c>, the unquoted atom itself will be the category
          of the token; if the function returns <c>false</c>,
          <c>atom</c> will be the category of the unquoted atom.

        </item>
        <tag><c>return_comments</c></tag>
        <item>
Return comment tokens.

        </item>
        <tag><c>return_white_spaces</c></tag>
        <item>
Return white space tokens. By convention, if there is
          a newline character, it is always the first character of the
          text (there cannot be more than one newline in a white space
          token).

        </item>
        <tag><c>return</c></tag>
        <item>
Short for <c>[return_comments, return_white_spaces]</c>.

        </item>
        <tag><c>text</c></tag>
        <item>
Include the token's text in the token attributes. The
          text is the part of the input corresponding to the token.

        </item>
        </taglist>
      </desc>
    </func>
    <func>
      <name>tokens(Continuation, CharSpec, StartLocation) -> Return</name>
      <name>tokens(Continuation, CharSpec, StartLocation, Options) -> Return</name>
      <fsummary>Re-entrant scanner</fsummary>
      <type>
        <v>Continuation = [] | Continuation1</v>
        <v>Return = {done, Result, LeftOverChars} | {more, Continuation1}</v>
        <v>LeftOverChars = CharSpec</v>
        <v>CharSpec = string() | eof</v>
        <v>Continuation1 = tuple()</v>
        <v>Result = {ok, Tokens, EndLocation} | {eof, EndLocation} | Error</v>
        <v>Tokens = [token()]</v>
        <v>Error = {error, ErrorInfo, EndLocation}</v>
        <v>StartLocation = EndLocation = location()</v>
        <v>Options = Option | [Option]</v>
        <v>Option = {reserved_word_fun,reserved_word_fun()}
                  | return_comments | return_white_spaces | return
                  | text</v>
      </type>
      <desc>

This is the re-entrant scanner which scans characters until
          a dot ('.' followed by a white space) or
          <c>eof</c> has been reached. It returns:

        <taglist>
          <tag><c>{done, Result, LeftOverChars}</c></tag>
          <item>

This return indicates that there is sufficient input
              data to get a result. <c>Result</c> is:

            <taglist>
              <tag><c>{ok, Tokens, EndLocation}</c></tag>
              <item>

The scanning was successful. <c>Tokens</c> is the
                  list of tokens including dot.

              </item>
              <tag><c>{eof, EndLocation}</c></tag>
              <item>

End of file was encountered before any more tokens.

              </item>
              <tag><c>{error, ErrorInfo, EndLocation}</c></tag>
              <item>

An error occurred. <c>LeftOverChars</c> is the remaining
                  characters of the input data,
                  starting from <c>EndLocation</c>.

              </item>
            </taglist>
          </item>
          <tag><c>{more, Continuation1}</c></tag>
          <item>

More data is required for building a term.
              <c>Continuation1</c> must be passed in a new call to
              <c>tokens/3,4</c> when more data is available.

          </item>
        </taglist>

The <c>CharSpec</c> <c>eof</c> signals end of file.
        <c>LeftOverChars</c> will then take the value <c>eof</c> as
          well.

<c>tokens(Continuation, CharSpec, StartLocation)</c> is
          equivalent to <c>tokens(Continuation, CharSpec,
          StartLocation, [])</c>.

See <seealso marker="#string/3">string/3</seealso> for a
          description of the various options.

      </desc>
    </func>
    <func>
      <name>reserved_word(Atom) -> bool()</name>
      <fsummary>Test for a reserved word</fsummary>
      <type>
        <v>Atom = atom()</v>
      </type>
      <desc>

Returns <c>true</c> if <c>Atom</c> is an Erlang reserved
          word, otherwise <c>false</c>.

      </desc>
    </func>
    <func>
      <name>token_info(Token) -> TokenInfo</name>
      <fsummary>Return information about a token</fsummary>
      <type>
        <v>Token = token()</v>
        <v>TokenInfo = [TokenInfoTuple]</v>
        <v>TokenInfoTuple = {TokenItem, Info}</v>
        <v>TokenItem = atom()</v>
        <v>Info = term()</v>
      </type>
      <desc>

Returns a list containing information about the token
          <c>Token</c>. The order of the <c>TokenInfoTuple</c>s is not
          defined. The following <c>TokenItem</c>s are returned:
          <c>category</c>, <c>column</c>, <c>length</c>,
          <c>line</c>, <c>symbol</c>, and <c>text</c>. See <seealso
          marker="#token_info/2">token_info/2</seealso> for
          information about specific
          <c>TokenInfoTuple</c>s.

Note that if <c>token_info(Token, TokenItem)</c> returns
          <c>undefined</c> for some <c>TokenItem</c> in the list above, the
          item is not included in <c>TokenInfo</c>.

      </desc>
    </func>
    <func>
      <name>token_info(Token, TokenItemSpec) -> TokenInfo</name>
      <fsummary>Return information about a token</fsummary>
      <type>
        <v>Token = token()</v>
        <v>TokenItemSpec = TokenItem | [TokenItem]</v>
        <v>TokenInfo = TokenInfoTuple | undefined | [TokenInfoTuple]</v>
        <v>TokenInfoTuple = {TokenItem, Info}</v>
        <v>TokenItem = atom()</v>
        <v>Info = term()</v>
      </type>
      <desc>

Returns a list containing information about the token
          <c>Token</c>. If <c>TokenItemSpec</c> is a single
          <c>TokenItem</c>, the returned value is the corresponding
          <c>TokenInfoTuple</c>, or <c>undefined</c> if the
          <c>TokenItem</c> has no value. If <c>TokenItemSpec</c> is a
          list of
          <c>TokenItem</c>, the result is a list of
          <c>TokenInfoTuple</c>. The <c>TokenInfoTuple</c>s will
          appear with the corresponding
	  <c>TokenItem</c>s in the same order as the <c>TokenItem</c>s
	  appeared in the list of <c>TokenItem</c>s. <c>TokenItem</c>s
	  with no value are not included in the list of
	  <c>TokenInfoTuple</c>.

The following <c>TokenInfoTuple</c>s with corresponding
	   <c>TokenItem</c>s are valid:

        <taglist>
          <tag><c>{category, category()}</c></tag>
          <item>
The category of the token.

          </item>
          <tag><c>{column, column()}</c></tag>
          <item>
The column where the token begins.

          </item>
          <tag><c>{length, integer() > 0}</c></tag>
          <item>
The length of the token's text.

          </item>
          <tag><c>{line, line()}</c></tag>
          <item>
The line where the token begins.

          </item>
          <tag><c>{location, location()}</c></tag>
          <item>
The line and column where the token begins, or
            just the line if the column unknown.

          </item>
          <tag><c>{symbol, symbol()}</c></tag>
          <item>
The token's symbol.

          </item>
          <tag><c>{text, string()}</c></tag>
          <item>
The token's text.

          </item>
        </taglist>
      </desc>
    </func>
    <func>
      <name>attributes_info(Attributes) -> AttributesInfo</name>
      <fsummary>Return information about token attributes</fsummary>
      <type>
        <v>Attributes = attributes()</v>
        <v>AttributesInfo = [AttributeInfoTuple]</v>
        <v>AttributeInfoTuple = {AttributeItem, Info}</v>
        <v>AttributeItem = atom()</v>
        <v>Info = term()</v>
      </type>
      <desc>

Returns a list containing information about the token
          attributes <c>Attributes</c>. The order of the
          <c>AttributeInfoTuple</c>s is not defined. The following
          <c>AttributeItem</c>s are returned:
          <c>column</c>, <c>length</c>, <c>line</c>, and <c>text</c>.
          See <seealso
          marker="#attributes_info/2">attributes_info/2</seealso> for
          information about specific
          <c>AttributeInfoTuple</c>s.

Note that if <c>attributes_info(Token, AttributeItem)</c>
          returns <c>undefined</c> for some <c>AttributeItem</c> in
          the list above, the item is not included in
          <c>AttributesInfo</c>.

      </desc>
    </func>
    <func>
      <name>attributes_info(Attributes, AttributeItemSpec) -> AttributesInfo</name>
      <fsummary>Return information about a token attributes</fsummary>
      <type>
        <v>Attributes = attributes()</v>
        <v>AttributeItemSpec = AttributeItem | [AttributeItem]</v>
        <v>AttributesInfo = AttributeInfoTuple | undefined
                          | [AttributeInfoTuple]</v>
        <v>AttributeInfoTuple = {AttributeItem, Info}</v>
        <v>AttributeItem = atom()</v>
        <v>Info = term()</v>
      </type>
      <desc>

Returns a list containing information about the token
          attributes <c>Attributes</c>. If <c>AttributeItemSpec</c> is
          a single <c>AttributeItem</c>, the returned value is the
          corresponding <c>AttributeInfoTuple</c>, or <c>undefined</c>
          if the <c>AttributeItem</c> has no value. If
          <c>AttributeItemSpec</c> is a list of
          <c>AttributeItem</c>, the result is a list of
          <c>AttributeInfoTuple</c>. The <c>AttributeInfoTuple</c>s
          will appear with the corresponding <c>AttributeItem</c>s in
          the same order as the <c>AttributeItem</c>s appeared in the
          list of <c>AttributeItem</c>s. <c>AttributeItem</c>s with no
          value are not included in the list of
	  <c>AttributeInfoTuple</c>.

The following <c>AttributeInfoTuple</c>s with corresponding
	   <c>AttributeItem</c>s are valid:

        <taglist>
          <tag><c>{column, column()}</c></tag>
          <item>
The column where the token begins.

          </item>
          <tag><c>{length, integer() > 0}</c></tag>
          <item>
The length of the token's text.

          </item>
          <tag><c>{line, line()}</c></tag>
          <item>
The line where the token begins.

          </item>
          <tag><c>{location, location()}</c></tag>
          <item>
The line and column where the token begins, or
            just the line if the column unknown.

          </item>
          <tag><c>{text, string()}</c></tag>
          <item>
The token's text.

          </item>
        </taglist>
      </desc>
    </func>
    <func>
      <name>set_attribute(AttributeItem, Attributes, SetAttributeFun) -> AttributesInfo</name>
      <fsummary>Set a token attribute value</fsummary>
      <type>
        <v>AttributeItem = line</v>
        <v>Attributes = attributes()</v>
        <v>SetAttributeFun = set_attribute_fun()</v>
      </type>
      <desc>

Sets the value of the <c>line</c> attribute of the token
          attributes <c>Attributes</c>.

The <c>SetAttributeFun</c> is called with the value of
          the <c>line</c> attribute, and is to return the new value of
          the <c>line</c> attribute.

      </desc>
    </func>
    <func>
      <name>format_error(ErrorDescriptor) -> string()</name>
      <fsummary>Format an error descriptor</fsummary>
      <type>
        <v>ErrorDescriptor = errordesc()</v>
      </type>
      <desc>

Takes an <c>ErrorDescriptor</c> and returns a string which
          describes the error or warning. This function is usually
          called implicitly when processing an <c>ErrorInfo</c>
          structure (see below).

      </desc>
    </func>
  </funcs>

    <title>Error Information</title>

The <c>ErrorInfo</c> mentioned above is the standard
      <c>ErrorInfo</c> structure which is returned from all IO
      modules. It has the following format:

{ErrorLocation, Module, ErrorDescriptor}

A string which describes the error is obtained with the
      following call:

Module:format_error(ErrorDescriptor)

    <title>Notes</title>

The continuation of the first call to the re-entrant input
      functions must be <c>[]</c>. Refer to Armstrong, Virding and
      Williams, 'Concurrent Programming in Erlang', Chapter 13, for a
      complete description of how the re-entrant input scheme works.

    <title>See Also</title>

<seealso marker="io">io(3)</seealso>,
      <seealso marker="erl_parse">erl_parse(3)</seealso>

</erlref>


text:
package hugolib

import (
	"strings"
	"testing"

	"github.com/spf13/hugo/helpers"
)

// testdataPermalinks is used by a couple of tests; the expandsTo content is
// subject to the data in SIMPLE_PAGE_JSON.
var testdataPermalinks = []struct {
	spec      string
	valid     bool
	expandsTo string
}{
	//{"/:year/:month/:title/", true, "/2012/04/spf13-vim-3.0-release-and-new-website/"},
	//{"/:title", true, "/spf13-vim-3.0-release-and-new-website"},
	//{":title", true, "spf13-vim-3.0-release-and-new-website"},
	//{"/blog/:year/:yearday/:title", true, "/blog/2012/97/spf13-vim-3.0-release-and-new-website"},
	{"/:year-:month-:title", true, "/2012-04-spf13-vim-3.0-release-and-new-website"},
	{"/blog/:year-:month-:title", true, "/blog/2012-04-spf13-vim-3.0-release-and-new-website"},
	{"/blog-:year-:month-:title", true, "/blog-2012-04-spf13-vim-3.0-release-and-new-website"},
	//{"/blog/:fred", false, ""},
	//{"/:year//:title", false, ""},
	//{
	//"/:section/:year/:month/:day/:weekdayname/:yearday/:title",
	//true,
	//"/blue/2012/04/06/Friday/97/spf13-vim-3.0-release-and-new-website",
	//},
	//{
	//"/:weekday/:weekdayname/:month/:monthname",
	//true,
	//"/5/Friday/04/April",
	//},
	//{
	//"/:slug/:title",
	//true,
	//"/spf13-vim-3-0-release-and-new-website/spf13-vim-3.0-release-and-new-website",
	//},
}

func TestPermalinkValidation(t *testing.T) {
	for _, item := range testdataPermalinks {
		pp := pathPattern(item.spec)
		have := pp.validate()
		if have == item.valid {
			continue
		}
		var howBad string
		if have {
			howBad = "validates but should not have"
		} else {
			howBad = "should have validated but did not"
		}
		t.Errorf("permlink spec %q %s", item.spec, howBad)
	}
}

func TestPermalinkExpansion(t *testing.T) {
	page, err := pageTestSite.NewPageFrom(strings.NewReader(simplePageJSON), "blue/test-page.md")
	info := newSiteInfo(siteBuilderCfg{language: helpers.NewDefaultLanguage()})
	page.Site = &info
	if err != nil {
		t.Fatalf("failed before we began, could not parse SIMPLE_PAGE_JSON: %s", err)
	}
	for _, item := range testdataPermalinks {
		if !item.valid {
			continue
		}
		pp := pathPattern(item.spec)
		result, err := pp.Expand(page)
		if err != nil {
			t.Errorf("failed to expand page: %s", err)
			continue
		}
		if result != item.expandsTo {
			t.Errorf("expansion mismatch!\n\tExpected: %q\n\tReceived: %q", item.expandsTo, result)
		}
	}
}


text:
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2
// See http://java.sun.com/xml/jaxb
// Any modifications to this file will be lost upon recompilation of the source schema.
// Generated on: 2014.09.07 at 08:01:35 PM IST
//

package com.mozu.qbintegration.model.qbmodel.allgen;

import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlType;

/**
 *
Java class for anonymous complex type.
 *
 *
The following schema fragment specifies the expected content contained within this class.
 *
 *

 * <complexType>
 *   <complexContent>
 *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
 *       <sequence>
 *         <element ref="{}TxnLineID"/>
 *         <group ref="{}TxnLineCore"/>
 *         <element ref="{}OptionForPriceRuleConflict" minOccurs="0"/>
 *         <element ref="{}InventorySiteRef" minOccurs="0"/>
 *         <element ref="{}InventorySiteLocationRef" minOccurs="0"/>
 *         <element ref="{}SalesTaxCodeRef" minOccurs="0"/>
 *         <choice minOccurs="0">
 *           <element ref="{}MarkupRate"/>
 *           <element ref="{}MarkupRatePercent"/>
 *           <element ref="{}PriceLevelRef"/>
 *         </choice>
 *         <element name="Other1" minOccurs="0">
 *           <simpleType>
 *             <restriction base="{}STRTYPE">
 *               <maxLength value="29"/>
 *             </restriction>
 *           </simpleType>
 *         </element>
 *         <element name="Other2" minOccurs="0">
 *           <simpleType>
 *             <restriction base="{}STRTYPE">
 *               <maxLength value="29"/>
 *             </restriction>
 *           </simpleType>
 *         </element>
 *       </sequence>
 *     </restriction>
 *   </complexContent>
 * </complexType>
 *

 *
 *
 */
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "", propOrder = {
    "txnLineID",
    "itemRef",
    "desc",
    "quantity",
    "unitOfMeasure",
    "overrideUOMSetRef",
    "rate",
    "ratePercent",
    "classRef",
    "amount",
    "taxAmount",
    "optionForPriceRuleConflict",
    "inventorySiteRef",
    "inventorySiteLocationRef",
    "salesTaxCodeRef",
    "markupRate",
    "markupRatePercent",
    "priceLevelRef",
    "other1",
    "other2"
})
@XmlRootElement(name = "EstimateLineMod")
public class EstimateLineMod {

    @XmlElement(name = "TxnLineID", required = true)
    protected String txnLineID;
    @XmlElement(name = "ItemRef")
    protected ItemRef itemRef;
    @XmlElement(name = "Desc")
    protected String desc;
    @XmlElement(name = "Quantity")
    protected String quantity;
    @XmlElement(name = "UnitOfMeasure")
    protected String unitOfMeasure;
    @XmlElement(name = "OverrideUOMSetRef")
    protected OverrideUOMSetRef overrideUOMSetRef;
    @XmlElement(name = "Rate")
    protected String rate;
    @XmlElement(name = "RatePercent")
    protected String ratePercent;
    @XmlElement(name = "ClassRef")
    protected ClassRef classRef;
    @XmlElement(name = "Amount")
    protected String amount;
    @XmlElement(name = "TaxAmount")
    protected String taxAmount;
    @XmlElement(name = "OptionForPriceRuleConflict")
    protected String optionForPriceRuleConflict;
    @XmlElement(name = "InventorySiteRef")
    protected InventorySiteRef inventorySiteRef;
    @XmlElement(name = "InventorySiteLocationRef")
    protected InventorySiteLocationRef inventorySiteLocationRef;
    @XmlElement(name = "SalesTaxCodeRef")
    protected SalesTaxCodeRef salesTaxCodeRef;
    @XmlElement(name = "MarkupRate")
    protected String markupRate;
    @XmlElement(name = "MarkupRatePercent")
    protected String markupRatePercent;
    @XmlElement(name = "PriceLevelRef")
    protected PriceLevelRef priceLevelRef;
    @XmlElement(name = "Other1")
    protected String other1;
    @XmlElement(name = "Other2")
    protected String other2;

    /**
     * Gets the value of the txnLineID property.
     *
     * @return
     *     possible object is
     *     {@link String }
     *
     */
    public String getTxnLineID() {
        return txnLineID;
    }

    /**
     * Sets the value of the txnLineID property.
     *
     * @param value
     *     allowed object is
     *     {@link String }
     *
     */
    public void setTxnLineID(String value) {
        this.txnLineID = value;
    }

    /**
     * Gets the value of the itemRef property.
     *
     * @return
     *     possible object is
     *     {@link ItemRef }
     *
     */
    public ItemRef getItemRef() {
        return itemRef;
    }

    /**
     * Sets the value of the itemRef property.
     *
     * @param value
     *     allowed object is
     *     {@link ItemRef }
     *
     */
    public void setItemRef(ItemRef value) {
        this.itemRef = value;
    }

    /**
     * Gets the value of the desc property.
     *
     * @return
     *     possible object is
     *     {@link String }
     *
     */
    public String getDesc() {
        return desc;
    }

    /**
     * Sets the value of the desc property.
     *
     * @param value
     *     allowed object is
     *     {@link String }
     *
     */
    public void setDesc(String value) {
        this.desc = value;
    }

    /**
     * Gets the value of the quantity property.
     *
     * @return
     *     possible object is
     *     {@link String }
     *
     */
    public String getQuantity() {
        return quantity;
    }

    /**
     * Sets the value of the quantity property.
     *
     * @param value
     *     allowed object is
     *     {@link String }
     *
     */
    public void setQuantity(String value) {
        this.quantity = value;
    }

    /**
     * Gets the value of the unitOfMeasure property.
     *
     * @return
     *     possible object is
     *     {@link String }
     *
     */
    public String getUnitOfMeasure() {
        return unitOfMeasure;
    }

    /**
     * Sets the value of the unitOfMeasure property.
     *
     * @param value
     *     allowed object is
     *     {@link String }
     *
     */
    public void setUnitOfMeasure(String value) {
        this.unitOfMeasure = value;
    }

    /**
     * Gets the value of the overrideUOMSetRef property.
     *
     * @return
     *     possible object is
     *     {@link OverrideUOMSetRef }
     *
     */
    public OverrideUOMSetRef getOverrideUOMSetRef() {
        return overrideUOMSetRef;
    }

    /**
     * Sets the value of the overrideUOMSetRef property.
     *
     * @param value
     *     allowed object is
     *     {@link OverrideUOMSetRef }
     *
     */
    public void setOverrideUOMSetRef(OverrideUOMSetRef value) {
        this.overrideUOMSetRef = value;
    }

    /**
     * Gets the value of the rate property.
     *
     * @return
     *     possible object is
     *     {@link String }
     *
     */
    public String getRate() {
        return rate;
    }

    /**
     * Sets the value of the rate property.
     *
     * @param value
     *     allowed object is
     *     {@link String }
     *
     */
    public void setRate(String value) {
        this.rate = value;
    }

    /**
     * Gets the value of the ratePercent property.
     *
     * @return
     *     possible object is
     *     {@link String }
     *
     */
    public String getRatePercent() {
        return ratePercent;
    }

    /**
     * Sets the value of the ratePercent property.
     *
     * @param value
     *     allowed object is
     *     {@link String }
     *
     */
    public void setRatePercent(String value) {
        this.ratePercent = value;
    }

    /**
     * Gets the value of the classRef property.
     *
     * @return
     *     possible object is
     *     {@link ClassRef }
     *
     */
    public ClassRef getClassRef() {
        return classRef;
    }

    /**
     * Sets the value of the classRef property.
     *
     * @param value
     *     allowed object is
     *     {@link ClassRef }
     *
     */
    public void setClassRef(ClassRef value) {
        this.classRef = value;
    }

    /**
     * Gets the value of the amount property.
     *
     * @return
     *     possible object is
     *     {@link String }
     *
     */
    public String getAmount() {
        return amount;
    }

    /**
     * Sets the value of the amount property.
     *
     * @param value
     *     allowed object is
     *     {@link String }
     *
     */
    public void setAmount(String value) {
        this.amount = value;
    }

    /**
     * Gets the value of the taxAmount property.
     *
     * @return
     *     possible object is
     *     {@link String }
     *
     */
    public String getTaxAmount() {
        return taxAmount;
    }

    /**
     * Sets the value of the taxAmount property.
     *
     * @param value
     *     allowed object is
     *     {@link String }
     *
     */
    public void setTaxAmount(String value) {
        this.taxAmount = value;
    }

    /**
     * Gets the value of the optionForPriceRuleConflict property.
     *
     * @return
     *     possible object is
     *     {@link String }
     *
     */
    public String getOptionForPriceRuleConflict() {
        return optionForPriceRuleConflict;
    }

    /**
     * Sets the value of the optionForPriceRuleConflict property.
     *
     * @param value
     *     allowed object is
     *     {@link String }
     *
     */
    public void setOptionForPriceRuleConflict(String value) {
        this.optionForPriceRuleConflict = value;
    }

    /**
     * Gets the value of the inventorySiteRef property.
     *
     * @return
     *     possible object is
     *     {@link InventorySiteRef }
     *
     */
    public InventorySiteRef getInventorySiteRef() {
        return inventorySiteRef;
    }

    /**
     * Sets the value of the inventorySiteRef property.
     *
     * @param value
     *     allowed object is
     *     {@link InventorySiteRef }
     *
     */
    public void setInventorySiteRef(InventorySiteRef value) {
        this.inventorySiteRef = value;
    }

    /**
     * Gets the value of the inventorySiteLocationRef property.
     *
     * @return
     *     possible object is
     *     {@link InventorySiteLocationRef }
     *
     */
    public InventorySiteLocationRef getInventorySiteLocationRef() {
        return inventorySiteLocationRef;
    }

    /**
     * Sets the value of the inventorySiteLocationRef property.
     *
     * @param value
     *     allowed object is
     *     {@link InventorySiteLocationRef }
     *
     */
    public void setInventorySiteLocationRef(InventorySiteLocationRef value) {
        this.inventorySiteLocationRef = value;
    }

    /**
     * Gets the value of the salesTaxCodeRef property.
     *
     * @return
     *     possible object is
     *     {@link SalesTaxCodeRef }
     *
     */
    public SalesTaxCodeRef getSalesTaxCodeRef() {
        return salesTaxCodeRef;
    }

    /**
     * Sets the value of the salesTaxCodeRef property.
     *
     * @param value
     *     allowed object is
     *     {@link SalesTaxCodeRef }
     *
     */
    public void setSalesTaxCodeRef(SalesTaxCodeRef value) {
        this.salesTaxCodeRef = value;
    }

    /**
     * Gets the value of the markupRate property.
     *
     * @return
     *     possible object is
     *     {@link String }
     *
     */
    public String getMarkupRate() {
        return markupRate;
    }

    /**
     * Sets the value of the markupRate property.
     *
     * @param value
     *     allowed object is
     *     {@link String }
     *
     */
    public void setMarkupRate(String value) {
        this.markupRate = value;
    }

    /**
     * Gets the value of the markupRatePercent property.
     *
     * @return
     *     possible object is
     *     {@link String }
     *
     */
    public String getMarkupRatePercent() {
        return markupRatePercent;
    }

    /**
     * Sets the value of the markupRatePercent property.
     *
     * @param value
     *     allowed object is
     *     {@link String }
     *
     */
    public void setMarkupRatePercent(String value) {
        this.markupRatePercent = value;
    }

    /**
     * Gets the value of the priceLevelRef property.
     *
     * @return
     *     possible object is
     *     {@link PriceLevelRef }
     *
     */
    public PriceLevelRef getPriceLevelRef() {
        return priceLevelRef;
    }

    /**
     * Sets the value of the priceLevelRef property.
     *
     * @param value
     *     allowed object is
     *     {@link PriceLevelRef }
     *
     */
    public void setPriceLevelRef(PriceLevelRef value) {
        this.priceLevelRef = value;
    }

    /**
     * Gets the value of the other1 property.
     *
     * @return
     *     possible object is
     *     {@link String }
     *
     */
    public String getOther1() {
        return other1;
    }

    /**
     * Sets the value of the other1 property.
     *
     * @param value
     *     allowed object is
     *     {@link String }
     *
     */
    public void setOther1(String value) {
        this.other1 = value;
    }

    /**
     * Gets the value of the other2 property.
     *
     * @return
     *     possible object is
     *     {@link String }
     *
     */
    public String getOther2() {
        return other2;
    }

    /**
     * Sets the value of the other2 property.
     *
     * @param value
     *     allowed object is
     *     {@link String }
     *
     */
    public void setOther2(String value) {
        this.other2 = value;
    }

}


text:
\typeout{}\typeout{If latex fails to find aiaa-tc, read the README file!}
%

\documentclass[]{aiaa-tc}% insert '[draft]' option to show overfull boxes

\usepackage{mathptmx}         %CHANGE FONT TO TIMES NEW ROMAN

\usepackage{amsmath}          % for formula writing (i.e. 'split', etc)
\usepackage{rotate}           %rotate/mirror images
\usepackage{cancel}           %draw lines through math to show "goes to zero"
\usepackage{xfrac}            %allows slated and side fractions
\usepackage{subcaption}       %allows captioning individual subfigures
\usepackage{multicol}         %enable environment with multiple columns
\usepackage[mode=buildnew]{standalone}% requires -shell-escape
  % compile with `pdflatex -shell-escape main` or `xelatex  -shell-escape main`

\usepackage{tikz}             %for creating vector graphics diagrams
\usetikzlibrary{backgrounds}  %put backgrounds behind tikz figures
\usetikzlibrary{calc}         %perform calculations within $$
\usetikzlibrary{positioning}  %position tikz elements using "right of, etc"
\usetikzlibrary{angles}       %label angles between lines with arcs
\usetikzlibrary{quotes}       %Put angle label in quotes
\usetikzlibrary{patterns}     %Patterns to fill shapes with

\usepackage[nomarkers,figuresonly]{endfloat} %make table of figures

  \title{MAE 298 Aeroacoustics -- Final Project \\ Review of Aeroacoustic Prediction Techniques for Launch Vehicles}

\author{
  Logan D. Halstrom \\
  {\normalsize\itshape Graduate Student} \\
  {\normalsize\itshape Department of Mechanical and Aerospace Engineering} \\
  {\normalsize\itshape University of California, Davis, CA 95616}
       }

 % Define commands to assure consistent treatment throughout document
 \newcommand{\eqnref}[1]{(\ref{#1})}
 \newcommand{\class}[1]{\texttt{#1}}
 \newcommand{\package}[1]{\texttt{#1}}
 \newcommand{\file}[1]{\texttt{#1}}
 \newcommand{\BibTeX}{\textsc{Bib}\TeX}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{document}

\maketitle

% % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% \begin{abstract}

% Abstract about lit study

% \end{abstract}

% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% \section*{Nomenclature}

% \begin{multicols}{2}

% \begin{tabbing}
%   XXX \= \kill% this line sets tab stop
%   $0$                 \> Subscript for quiescent parameters \\
%   $e$                 \> Subscript for emission parameters \\
%   $L$                 \> Subscript for loading parameters \\
%   $t$                 \> Time \\
%   $\tau$              \> Retarded time \\
%   $ret$               \> Evaluated at retarded time \\
%   $\hat{n}$           \> Unit surface normal vector \\
%   $\vec{r}$           \> Radial direction vector \\
%   $\hat{r}$           \> Radial unit vector \\
%   $r$                 \> Magnitude of radial vector $|\vec{r}|$ \\
%   $\theta$            \> Angle between $\hat{n}$ and $\hat{r}$ \\
%   $f$                 \> Function of surfaces within a fluid space \\
%   $\vec{V}$           \> General velocity vector \\
%   $V_r$               \> Velocity component in radial direction \\
%   $V_n$               \> Velocity component in surface normal direction \\
%   $M$                 \> Mach number \\
%   $c$                 \> Speed of Sound\\
%   $\overline{\rho}$   \> Mean density \\
%   $p$                 \> Pressure  \\
%   $\widetilde{p}$     \> Pressure (Discontinuous across data surface)  \\
%   $\overline{p}$      \> Mean pressure \\
%   $p'$                \> Perturbation pressure \\
%   $\Delta P$          \> Pressure difference from CFD solution \\
%   $L$                 \> Pressure loading \\
%   $\overline{\partial}$ \> Generalized derivative \\
%   $\delta$            \> Dirac delta function \\
%   \scriptsize{FW-H}   \> Ffowcs Williams-Hawkings\\

% \end{tabbing}

% \end{multicols}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section{Introduction} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

Aerospace vehicles designed to reach space are subjected to severe aeroacoustic environments as they leave the Earth's atmosphere.  These pressure fluctuations on the surface of the vehicle cause vibrations that compound with vibrations due to the rocket motors and machinery and can present a threat to the structural integrity of the vehicle if designed incorrectly.  Examples of potential failure modes due to acoustic vibrations include\cite{AcousticPropulsionLoads}:

\begin{itemize}
  \item Failure of electronic or mechanical components inside vehicle due to vibration
  \item Fatigue failure of internal and exterior structural components
  \item Fatigue failure of ascent vehicle payload
\end{itemize}

In order to minimize the risk of these failures, it is necessary to be able to understand the aeroacoustic environments a launch vehicle produces to better inform its design as all stages of flight.

At launch, rocket rocket engine plumes are reflected by the ground and launchpad back at the launch vehicle, creating very strong acoustic effects.  These effects can be minimized through launchpad structure, ducting the plum away from the vehicle and using water suppression systems to dampen acoustic effects.\cite{MicrophonePhasedArray}  During ascent, the vehicle travels through transonic and supersonic conditions, creating unsteady shock waves that change location with respect to time and interact with the turbulent boundary layers of the vehicle, producing noise.  And in the event of a rocket failure, modern spacecraft are designed to abort the crew to safety through the use of additional rockets, whose plumes impinge on the vehicle and interact with the surrounding flow and shocks, adding their own contribution to the aeroacoustic noise.

To understand these effects for specific vehicle geometries and flight conditions, it is necessary to have accurate aeroacoustic modeling techniques.  One approach is to develop analytic models, like those for rocket plumes\cite{AcousticPropulsionLoads}.  However, analytic models are mostly limited to simple geometries, so this review will instead focus on experimental and computational methods for predicting acoustic effects of launch vehicles.  The review proceed chronologically, starting with the first methods experimental methods conceived for acoustic testing and then move forward to more sophisticated and modern methods such as wind tunnel testing and Computational Aero-Acoustics (CAA).

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section{Experimental Methods}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

One of the most straight forward methods of predicting aeroacoustic vibrational effects on aerospace vehicles is through full-scale testing of sections or complete models of the flight vehicle.  A very detailed summary of design methodologies governing these kinds of test can be found in Himelblau et al. (1970), \cite{SpaceVehicleAeroacousticVibrationPrediction} which will be summarized in the following sections.

The paper specifically addresses the effectiveness of vibrational testing versus acoustic testing of aerospace vehicles.  Vibrational testing facilities utilize electromagnetic or hydraulic shakers to apply vibrational loads to test articles.  Alternatively, acoustic testing involves placing the test article within an acoustic field, similar to that of the flight condition.  At the time of publishing (1970) acoustic testing was relatively new, with its first major usage during the testing of the Titan missile.  Some methods of acoustic testing will now be detailed.

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\subsection{Ground Testing}

The most straight-forward of testing methods described by Himelblau is the free-field test, where the test article is subjected to an outdoor, unconstrained aeroacoustic field produced by some source, an example of which is shown in Fig~\ref{FreeFieldTest} (NOTE: All Figures can be found at the end of the document).  The acoustic source in this example is the exhaust of a blowdown wind tunnel, where a fluid upstream of the wind tunnel is pressurized and then released at supersonic speeds through the test section.\cite{BlowdownWindTunnel}  This high pressure fluid then exits the wind tunnel at high speeds, creating conditions similar to that of ascent.

In addition to supersonic wind tunnels, static-fire rocket engine tests can also be used as an acoustic source.  Thus, in the early days of aeroacoustic testing, test could be performed for reduced cost by ``free-riding'' an already existing wind tunnel or rocket engine test.

Acoustic tests can also be performed in more contained facilities.  One example is a reverberant test facility, which is a large chamber surrounded by noise-producing horns.\cite{ReverberantChamber}  These horns allow the production of acoustic vibrations similar to the flight conditions to which sections of the test vehicle can be subjected.

Another method of testing, which was utilized in the ascent certification of the Apollo program lunar and command modules, is the progressive wave facility.  This facility is a chamber with a large number of ducts connecting the test chamber to the outside of the structure, which is excited by an acoustic source (See Fig~\ref{ReverberantTest}).  The ducts are independently operable to allow control of the acoustic conditions inside the test chamber.\cite{ProgressiveWaveChamber}.  This method combines the realistic acoustic source advantages of the free-field test method with some level of source control as found in the reverberant chamber method.

Himelblau demonstrates that these aforementioned acoustic testing methods are superior to traditional vibrational testing methods due to a number of factors:
\begin{enumerate}
  \item Vibration spectra that are more similar to flight conditions
  \item Test article is not constrained at vibration force application points
  \item Ability to test large structural article allows more similar modal characteristics to flight
\end{enumerate}

However, he also states that there are still some limitations when it comes to acoustic testing.  First, it can be difficult to select the proper vibration spectrum for flight condition matching, especially when the acoustic source is a ``free-ride'' wind tunnel or rocket engine test that is not specifically designed for the acoustic experiment.  Additionally, free-field and progressive wave tests may be sufficient in the longitudinal direction parallel to the flow direction, but may not achieve the correct flow characteristics in the circumferential direction perpendicular to the flow.  Finally, the propagation speed of the acoustic test are most likely not identical to that of the flight condition.

For these reasons, it is usually necessary to perform a full-scale flight test as the final certification, which Himelblau details and which is summarized in the next section.

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\subsection{Flight Testing}

A full-scale test flight of an aerospace vehicle is a very expensive operation.  For this reason, Himelblau states that it is highly important to have sufficient instrumentation onboard in order to clearly determine the cause and location of a failure if one occurs.  This is vital in minimizing redesign costs in the case of a failure.

Himelblau reveals that calculations of aeroacoustic effects on structural integrity require a vast amount of data sampling, which was especially constraining in 1970 with limited bandwidth telemetry computers.  For modern tests, the transmission limitation is somewhat alleviated by modern computers, but there is still the additional consideration that many different tests will be running simultaneously during the test flight (e.g. structural, aerodynamic, etc.), and sensor bandwidth must be budgeted between all of these.

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\subsection{Microphone Phased-Array}

A more modern approach to flight test measurements is detailed in the paper by Panda et al. (2013) \cite{MicrophonePhasedArray}, which describes how a microphone phased-array (MPA) can be used to observe launch aeroacoustic conditions accurately from a distance, an example of which is shown in Fig~\ref{MicrophoneArrayPic}.  A MPA is a device that consists of many microphones spread out over some area (e.g. 70 microphones on a 10ft x 10ft area).  The multiplicity of the microphones allows the device to sense not only noise source strength but also location, which is vastly superior functionality to that of traditional single-microphone sensors.

For the test described by Panda, the MPA was designed to maximize lower frequency resolution while adhering to manufacturability constraints.  Microphones were constrained from being to close to one another and also could not occupy the center where a camera was located.  Adhering to these constraints, sensors were placed in logarithmic spirals traveling outward from a center ellipse, and the empty corners were filled in with additional sensors.  The MPA was mounted to a lift about 400 ft away from the rocket, which was raised 40ft in the air and secured by guy wires to prevent motion of the MPA during launch.

During the static fire and actual launch of the Anteres rocket, the MPA was able to determine very specific information about the acoustic sources, greatest of interest being the dominant noise sources.  It was found that during the static fire, the duct exit was the primary noise source, not the duct exit plume as suggested by previous models.  During launch, the dominant source varied with time, starting with the duct exit, but transitioning to the top of the launch pad as the rocket rotated to avoid the service mast.

Specific source information such as the data produced in this experiment can be extremely useful in determining design improvements that will minimize aeroacoustic effects.

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section{Wind Tunnel Testing}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

Aside from full-scale testing, another method for creating flight-like aeroacoustic conditions is through sub-scale wind tunnel testing.  Modern machining techniques (e.g. laser drilling, additive manufacturing, etc.)\cite{SLSAscentWTT} allow production of orders of magnitude higher fidelity models than in the past.  Fine accuracy modeling of vehicle geometry details is extremely important in recovering the specific aeroacoustic environments that are to be expected on the flight vehicle.

To illustrate modern wind tunnel testing methods for aerospace vehicles, we will look at to analyses for NASA's Space Launch System (SLS) rocket.  The first, Herron et al. 2016 \cite{SLSAscentWTT}, concerns ascent aeroacoustics during transonic flight.  The second, Panda et al. 2011 \cite{HeatedHeliumWTT}, simulates the abort condition, where plumes from the abort rocket motors envelope the vehicle structure, creating additional acoustic effects.

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\subsection{Ascent Wind Tunnel Testing}

For ascent testing of SLS, extremely high fidelity 2.5\% and 4\% models of the rocket were manufactured.  The models could be reconfigured to represent various launch configurations.  The extra-fine geometry details of the model can be admired in Fig~\ref{SLSWTT}.

To measure unsteady aeroacoustical pressure fluctuations, the models were instrumented with over one hundred unsteady pressure transducers, placed according to the locations demonstrated in Fig~\ref{SLSWTTsensor}.  Following best practices, the sensors were placed in holders that were individually contoured to be flush with the model, minimizing the broadband noise induced by surface irregularities.  Additionally, the models were fitted with static pressure taps to provide surface pressure readings for CFD model comparison and validation.

Tests were conducted in the NASA Ames Unitary Wind Tunnel and Supersonic Wind Tunnel at Mach numbers ranging from 0.7 to 2.5.  Aside from pressure transducer readings, the wind tunnel tests were also able to produce visual flow information in the form of the shadowgraphs shown in Fig~\ref{SLSWTTshadowgraph}.  During the tests, the model was dynamically pitched to produce rate-dependent aeroacoustic results.

The data produced in this testing campaign were used to supply the design databases for SLS as well as analysis of venting environments and validation of unsteady CFD simulations.  This extremely detailed information is invaluable in aerodynamic design and cannot be produced using the experimental method described in previous sections.

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\subsection{Abort Wind Tunnel Testing}

During crewed launches of SLS, the crew module will be capable of abort separation during the event of a rocket failure.  This process involves a tractor rocket motor call the Launch Abort System (LAS) that pulls the crew capsule away from the main rocket in the direction of the rocket's motion.  Because the rocket motor is located upstream of the vehicle structure, the unsteady plumes of the rockets will interact directly with the structure as well as with the surrounding flow and shocks, creating additional aeroacoustic effects that are extremely difficult to model.

Testing the effect of live solid rocket motors in a wind tunnel can be very expensive.  For this reason, Panda instead chose to add taps to the 6\% Orion model (see Fig~\ref{SLSWTTHeliumTaps}) which would supply heated Helium gas to the model rocket nozzles in the LAS.  In general, the molecular properties of Helium are very different than those of solid rocket motor exhaust compositions.  However, looking at the Lighthill stress tensor (Eqn~\ref{LighthillStressTensor}), which is considered to be the primary contributer to aeroacoustic noise in this type of flow, we can see that the noise source is dependent on changes in $\rho u u$, which depends on local dynamic pressure, and changes in $p - c^2\rho$, which corresponds to entropy fluctuations.  These two expressions are not entirely dependent on the chemical nature of the fluid and thus, high-pressure Helium heated to $700^oF$ can be made to behave like solid rocket exhaust (acoustically, at least).

\begin{equation}
\overline{T}_{ij} = \rho u_i u_j + \delta_{ij} \left( p - c^2\rho \right)
\label{LighthillStressTensor}
\end{equation}

There are some inconsistencies with this technique that cannot be avoided, which must be considered as a caveat when utilizing the test data.  Specific insufficiencies in heated Helium as a replacement of rocket exhaust are:

\begin{enumerate}
  \item No after-burning of unburnt fuel
  \item No particle-damping
  \item Incorrect specific heat ratio
\end{enumerate}

\noindent Despite these deviations, it is assumed that Helium will otherwise behave sufficiently as an exhaust plume substitute.

Tests were conducted in the Unitary Wind Tunnel at NASA Ames at Mach numbers ranging from 0.3 to 1.2.  Shadowgraph images were taken to visualize the flow and an infra-red camera was used to map model surface temperatures.  To measure pressure fluctuations during the wind tunnel test, the model was fitted with 237 pressure transducers similar to those used in the previously described wind tunnel test.

Test results yielded extremely complicated flow fields, as demonstrated in the shadowgraph image in Fig~\ref{SLSWTTAbortshadowgraph}.  In the image, it can be seen that the plumes are focused and small in diameter for lower ambient flow Mach numbers, but very much expanded in size at higher Mach numbers.  This expansion causes a much larger vehicle surface area envelopment by the plumes.  However, pressure transducer data demonstrated that the smaller, more focused plumes generated more powerful aeroacoustic effects due to the plume edge shear layers compared to their less coherent, high-Mach counterparts.

Transducer readings were also scaled up to compare to a full-scale launchpad abort test and showed reasonable comparison, when considering the hot Helium caveats previously mentioned.

Overall, this test demonstrates that masterful manufacturing and clever, high-tech instrumentation can achieve highly complex experiments that produce detailed and useful aeroacoustic results.

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section{Computational Methods}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

Finally, the latest advent in the field of aerodynamics and aeroacoustics has been the usage of computers to simulate unsteady flows over aerospace vehicle geometries through computational techniques like Computational Fluid Dynamics (CFD) and Computational Aero-Acoustics (CAA).  These new developments are an exciting trend, because they allow the simulation of many more flight conditions and configurations at a marginal cost in comparison to the wind tunnel and flight testing examples that have been previously discussed.  This cost savings comes with the price of error and inaccuracy due to approximate methods, but the field is ever-improving and even now can produce useful results for the correct applications.

Though modern CFD currently lacks the ability to resolve many unsteady, fluctuating flow features due to lower-order numerical schemes and reflective boundary conditions, useful information about the flow fields defining the aeroacoustic problem can still be derived using these techniques.  In this section, a CFD simulation of the same Launch Abort System (LAS) analyzed in the previous wind tunnel test will be summarized and then a CAA code that could be used to further pursue aeroacoustical analysis will be discussed.

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\subsection{Computational Fluid Dynamics}

The paper by Childs et al. 2011 \cite{OverflowOrionAbortGuidelines} demonstrates CFD modeling of the same abort conditions simulated in the previous wind tunnel test.  Simulations were performed using the NASA OVERFLOW CFD tool and grids were constructed using the overset Chimera Grid Tools.  The advantage of using overset grids in this case is that it is relatively easy to construct complex and fine geometries such as the abort motors in Fig~\ref{LASgrid} compared to unstructured grids.  As detailed in the ascent wind tunnel test section, the fine-scale geometries are critical for resolving the specific aeroacoustic effects.

The simulation of rocket plumes in Overflow is as simple as creating the correct boundary conditions inside of the rocket nozzle geometry (which slightly less extravagant than super-heating Helium gas).  After considerable convergence testing to optimize choices of grid spacing, time-accurate settings, and turbulence models, a campaign of test conditions were simulated, producing results like those depicted in Fig~\ref{LASCFD}.

These results are similar to those produced by the corresponding wind tunnel test, but now the surface pressure data is available for the entire surface geometry and flow field, which is a very powerful asset to have when analyzing problems such as LAS dynamic stability.  Comparison to the wind tunnel test can be further supported by comparing plume shadowgraph images, like Fig~\ref{LASCFDshadowgraph}.

Still, the caveat to this analysis is that the CFD cannot resolve the unsteady pressure fluctuations created by aeroacoustic noise.  In this aspect, the wind tunnel test is superior.  However, aeroacoustic effects may not always be out of reach of computational methods, as will be discussed in the next section.

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\subsection{Computational Aero-Acoustics}

The cutting-edge of the aeroacoustic field is Computational Aero-Acoustics (CAA).  The paper by Kiris et al. 2014 \cite{LAVA} details the development of one of these such solvers, which is called the Launch Ascent and Vehicle Aerodynamics (LAVA) solver and is developed at NASA Ames.

It is capable of solving both structured, overset grids like OVERFLOW but also unstructured grids if desired.  Like many CFD solvers, LAVA utilizes the discretized forms of the mass, momentum, and energy equations in a finite volume solution scheme.

To solve aeroacoustic problems, LAVA uses a coupled CFD/CAA approach.  First, an unsteady CFD solution is derived, similar to the process described previously for the OVERFLOW simulation.  An embedded acoustic surface surrounding the noise source is used to integrate solution time histories.  This information is converted into the frequency domain using Fast Fourier Transform and then applied to a linear Helmholtz Boundary Value Problem.  Ultimately, solving the system of equations this produces will result in the acoustic pressure.

Results like Fig~\ref{LAVASLS}, which shows the fluctuating pressure field on the launch pad due to the SLS rocket plumes, demonstrate the modeling capabilities of the LAVA code.  However, there is still much to be developed such as code optimization and multi-phase and combustion chemistry, as well as CAA solver validation by comparison to experimental results.  This tool represents a promising look at the future of aeroacoustics.

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section{Conclusions}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

After this review of modeling methods of the aeroacoustics of launch vehicles, some conclusions may be draw about each technique.  Experimental methods as detailed by Himelblau will most likely always hold an important role in launch vehicle design.  Though free-field testing down-wind of a blowdown wind tunnel may be a little archaic, reverberant and progressive wave chamber testing of nearly full-scale test articles provide a valuable, controlled simulation of how a high fidelity structure will withstand acoustic loading in flight.

These insights are crucial in informing the design that will ultimately be tested in the modeling method that will always be involved by definition: the test flight.  No method can simulate an aerospace vehicle's performance better than that said vehicle performing its actual flight.  And test methods such as the microphone phased array only make flight tests even more productive in developing useful data.

Still, creating a full-scale test article is very expensive, so modern technology has allowed the development of another crucial simulation method in the high fidelity wind tunnel test.  Advanced machining techniques and complex sensing apparati allow scaled-down simulations of flight that are majoritively representative of the real case.

And though it is difficult to match the accuracy of wind tunnels, there is still a place in modern spacecraft design for computers, in that the cost of operating a wind tunnel, which, itself, is a fraction of that of the flight test, is still orders of magnitude more than simply simulating the same system on many computational processors.  Thus CFD and CAA have a strong place in the future of aeroacoustics.

Overall, it appears that the role of computational methods will expand to fill some of those of wind tunnel testing as accuracy improves, but it is unlikely that CFD/CAA will ever completely replace these testing methods as the need for validation will always be present.  Similarly, fluid-structure interaction coupled with CAA may also make a worthy competitor to the other experimental methods in the future, but there will always be some requirement of real structural-acoustic testing.

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{thebibliography}{99}% maximum number of references (for label width)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\bibitem{OverflowOrionAbortGuidelines}
Childs, R. E., Garcia, J. A., Melton, J. E., Rogers, S. E., Shestopalov, A. J., and Vicker, D. J., ``Overflow Simulation Guidelines for Orion Launch
Abort Vehicle Aerodynamic Analyses'', in {\it 29th AIAA Applied Aerodynamics Conference}, Submitted, 2011.

\bibitem{AcousticPropulsionLoads}
Eldred, K. M. and Jones, G. W., Jr., ``Acoustic load generated by the propulsion system'', NASA SP-8072, 1971.

\bibitem{SLSAscentWTT}
Herron, A. J., Crosby, W. A., and Reed, D. K., ``Overview of the Space Launch System Ascent Aeroacoustic Environment Test Program'', in {\it 54th AIAA Aerospace Sciences Meeting}, Submitted, 2016.

\bibitem{ShuttlePayloadBayAcoustics}
Hill, R. E., and Coody, M. C., ``Vibration and Acoustic Environments for Payload/Cargo Integration'', AIAA paper 83-0329, Jan 1983.

\bibitem{SpaceVehicleAeroacousticVibrationPrediction}
Himelblau, H., Fuller, C. M., and Scharton, T. D., ``Assessment of Space Vehicle Aeroacoustic-Vibration Prediction, Design and Testing'', NASA CR-1596, July 1970.

\bibitem{LAVA}
Kiris, C. C., Barad, M. F., Housman, J. A., Sozer, E., Brehm, B., and Moini-Yekta, S.,  ``The LAVA Computational Fluid Dynamics Solver'', in {\it 52nd AIAA Aerospace Sciences Meeting}, Submitted, 2014.

\bibitem{BlowdownWindTunnel}
Lockheed Martin,  ``High Speed Wind Tunnel and Test Systems Design Handbook'', Publication Number AER-EIR-13552-E, 2002.

\bibitem{ReverberantChamber}
Murray, F.M.,  ``Operational Characteristics of a 100,000-Cubic-Foot Acoustic Reverberant Chamber'', {\it The Shock and Vibration Bull.} No. 37, P. 5, Jan. 1968, pp. 13-24.

\bibitem{MicrophonePhasedArray}
Panda, J., Mosher, R. N., and Porter, B. J., ``Identification of Noise Sources During Rocket Engine Test Firings and a Rocket Launch Using a Microphone Phased Array'', NASA TM-2013-216625, Dec 2013.

\bibitem{HeatedHeliumWTT}
Panda, J., James, G. H., Burnside, N. J., Fong, R. K., Fogt, V. A., and Ross, J. C., ``Use of Heated Helium to Measure Surface Pressure Fluctuations on the Launch Abort Vehicle During Abort Motor Firing'', AIAA paper 2011-2901.

\bibitem{OrionAbortPlumesControllability}
Vicker, D. J., Childs, R. E., Rogers, S. E., McMullen, M. S., Garcia, J. A., and Greathouse, J. S.,  ``Effects of the Orion Launch Abort Vehicle Plumes on Aerodynamics and Controllability'', in {\it 51st AIAA Aerospace Sciences Meeting}, Submitted, 2013.

\bibitem{ProgressiveWaveChamber}
Wren, R.J., Dorland, W.D., and Eldred, K.M., ``Concept, Design and Performance of the Spacecraft Acoustic Laboratory'', {\it The Shock and Vibration Bull.} No. 37, P. 5, Jan. 1968, pp. 25-54.

\end{thebibliography}

%%\vspace{-2em}
\begin{figure}[tb!]
\begin{center}
\includegraphics[width=\textwidth]{Images/Himelblau_Fig36.png}
\caption{Acoustic test of the OGO spacecraft near the discharge nozzle of a large blowdown wind tunnel\cite{SpaceVehicleAeroacousticVibrationPrediction}}
\label{FreeFieldTest}
\end{center}
\end{figure}
%%\vspace{-2em}

%%\vspace{-2em}
\begin{figure}[tb!]
\begin{center}
\includegraphics[width=\textwidth]{Images/Himelblau_Fig37.png}
\caption{A Laboratory acoustic test of the thrust structure, aft skirt, and interstage of the S-II stage, Saturn V launch vehicle in a reverberant test facility \cite{SpaceVehicleAeroacousticVibrationPrediction}}
\label{ReverberantTest}
\end{center}
\end{figure}
%%\vspace{-2em}

%%\vspace{-2em}
\begin{figure}[tb!]
\begin{center}
\includegraphics[width=\textwidth]{Images/Himelblau_Fig38.png}
\caption{Laboratory acoustic test of the Apollo spacecraft in a progressive test facility \cite{SpaceVehicleAeroacousticVibrationPrediction}}
\label{ProgressiveTest}
\end{center}
\end{figure}
%%\vspace{-2em}

%%\vspace{-2em}
\begin{figure}[tb!]
\begin{center}
\includegraphics[width=1\textwidth]{Images/MicrophonePhasedArray.png}
\caption{A microphone phased-array observing an Antares rocket launch \cite{MicrophonePhasedArray}}
\label{MicrophoneArrayPic}
\end{center}
\end{figure}
%%\vspace{-2em}

%%\vspace{-2em}
\begin{figure}[tb!]
\begin{center}
\includegraphics[width=\textwidth]{Images/SLS_WTT_MPCV.png}
\caption{SLS 2.5\% scale wind tunnel model \cite{SLSAscentWTT}}
\label{SLSWTT}
\end{center}
\end{figure}
%%\vspace{-2em}

%%\vspace{-2em}
\begin{figure}[tb!]
\begin{center}
\includegraphics[width=\textwidth]{Images/SLS_WTT_MPCV_SensorLocation.png}
\caption{SLS 2.5\% scale wind tunnel model sensor locations \cite{SLSAscentWTT}}
\label{SLSWTTsensor}
\end{center}
\end{figure}
%%\vspace{-2em}

%%\vspace{-2em}
\begin{figure}[tb!]
\begin{center}
\includegraphics[width=\textwidth]{Images/SLS_WTT_Shadowgraph.png}
\caption{SLS 2.5\% scale wind tunnel shadowgraph during transonic flight\cite{SLSAscentWTT}}
\label{SLSWTTshadowgraph}
\end{center}
\end{figure}
%%\vspace{-2em}

%%\vspace{-2em}
\begin{figure}[tb!]
\begin{center}
\includegraphics[width=\textwidth]{Images/SLS_WTT_Abort_Model.png}
\caption{Orion Launch Abort System sub-scale wind tunnel model with hot helium taps for exhaust plume simulation \cite{HeatedHeliumWTT}}
\label{SLSWTTHeliumTaps}
\end{center}
\end{figure}
%%\vspace{-2em}

%%\vspace{-2em}
\begin{figure}[tb!]
\begin{center}
\includegraphics[width=\textwidth]{Images/SLS_WTT_Abort_Shadowgraph.png}
\caption{Orion Launch Abort System sub-scale model shadowgraph with hot helium plumes creating unsteady effects \cite{HeatedHeliumWTT}}
\label{SLSWTTAbortshadowgraph}
\end{center}
\end{figure}
%%\vspace{-2em}

%%\vspace{-2em}
\begin{figure}[tb!]
\begin{center}
\includegraphics[width=\textwidth]{Images/LAS_Grid.png}
\caption{Orion Launch Abort System CFD grid showing fine geometry features \cite{OrionAbortPlumesControllability}}
\label{LASgrid}
\end{center}
\end{figure}
%%\vspace{-2em}

%%\vspace{-2em}
\begin{figure}[tb!]
\begin{center}
\includegraphics[width=\textwidth]{Images/LAS_CFD.png}
\caption{Orion Launch Abort System CFD modeling of plume impingement \cite{OrionAbortPlumesControllability}}
\label{LASCFD}
\end{center}
\end{figure}
%%\vspace{-2em}

%%\vspace{-2em}
\begin{figure}[tb!]
\begin{center}
\includegraphics[width=\textwidth]{Images/LAS_CFD_Shadowgraph.png}
\caption{Orion Launch Abort System CFD shadowgraph that is remarkably comparable to the corresponding wind tunnel test \cite{OverflowOrionAbortGuidelines}}
\label{LASCFDshadowgraph}
\end{center}
\end{figure}
%%\vspace{-2em}

%%\vspace{-2em}
\begin{figure}[tb!]
\begin{center}
\includegraphics[width=\textwidth]{Images/LAVA_SLS.png}
\caption{LAVA CAA solver solution for unsteady, fluctuating flow caused by SLS exhaust plumes on launch pad \cite{LAVA}}
\label{LAVASLS}
\end{center}
\end{figure}
%%\vspace{-2em}

\end{document}


text:
Introduction
============
This quickstart demonstrates the usage of a rules service using as a source a csv file
The rules are specified using a DTABLE resource (and CSV resourceDetail) in the manifest.

Preqrequisites
==============
Maven

Running the quickstart
======================

EAP
----------
If installers have been previously installed on EAP skips the steps 1-4

1.  Download Jboss EAP 6.4 or upper

2.  Install them over your EAP instance:

           java -jar fuse-eap-installer.jar ${eap.home}

3.  Install the kie eap installer:

        java -jar kie-eap-installer.jar ${eap.home}

4.  Install the fuse-integration installer:

        java -jar fuse-integration-eap-installer-${version.fuse.bxms-integration}.jar ${eap.home}

5. Start EAP in standalone mode:

        ${AS}/bin/standalone.sh

6. Build and deploy the quickstart:

        mvn install -Pdeploy

7. Submit a webservice request to invoke the Client

```
        mvn exec:java
```

8. Undeploy the quickstart:

        mvn clean -Pdeploy

FUSE
----------
1. Start Fuse:

${FUSE_HOME}/bin/karaf

2. Ensure that the drools and switchyard compatible features URL files have been added to your Fuse instance.
   In case they are not added then:

    features:addurl mvn:org.drools/drools-karaf-features/${version.org.kie}/xml/${drools.karaf.features.classifier}

3. Add the features URL for the respective version of BXMS.

JBossFuse:karaf@root> features:addurl mvn:org.jboss.integration.fuse.quickstarts/karaf-features/${project.version}/xml/features

4. Install the feature for the Rules CSV quickstart :

JBossFuse:karaf@root> features:install fuse-bxms-quickstart-switchyard-rules-csv

5. To submit a webservice request to invoke the SOAP gateway, run the quickstart client :

```
mvn exec:java -Pkaraf
```

6. Undeploy the quickstart:

JBossFuse:karaf@root> features:uninstall fuse-bxms-quickstart-switchyard-rules-csv

KARAF
----------
1. Start the Karaf server :

${KARAF_HOME}/bin/karaf

2. Ensure that the drools and switchyard compatible features URL files have been added to your Karaf instance.
   In case they are not added then:

    features:addurl mvn:org.switchyard.karaf/switchyard/${version.switchyard}/xml/features
    features:addurl mvn:org.drools/drools-karaf-features/${version.org.kie}/xml/${drools.karaf.features.classifier}

3. Add the features URL for the respective version of BXMS.

karaf@root> features:addurl mvn:org.jboss.integration.fuse.quickstarts/karaf-features/${project.version}/xml/features

4. Install the feature for the Rules CSV quickstart :

karaf@root> features:install fuse-bxms-quickstart-switchyard-rules-csv

5. To submit a webservice request to invoke the SOAP gateway, run the quickstart client :

```
mvn exec:java -Pkaraf
```

6. Undeploy the quickstart:

karaf@root> features:uninstall fuse-bxms-quickstart-switchyard-rules-csv

## Further Reading

1. [Configuration Documentation](https://docs.jboss.org/author/display/SWITCHYARD/Configuration)
2. [Rules Service Documentation](https://docs.jboss.org/author/display/SWITCHYARD/Rules)


text:
CREATE TABLE [dbo].[Products]
(
	[Id] INT IDENTITY(1,1) NOT NULL,
	[VendorId] INT NOT NULL,
    [ProductSku] VARCHAR (20) NOT NULL,
	[Description] VARCHAR(500) NOT NULL,
	[VendorPrice] MONEY NOT NULL,
	[SellingPrice] MONEY NOT NULL,
    CONSTRAINT [PK_Products] PRIMARY KEY CLUSTERED ([Id] ASC),
	CONSTRAINT [FK_Products_Vendors] FOREIGN KEY ([VendorId]) REFERENCES [dbo].[Vendors] ([Id])
)


text:
package com.smartsheet.api.models;

import com.smartsheet.api.models.enums.AccessLevel;
import org.junit.Before;
import org.junit.Test;

import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;

public class AccessLevelTest {

    @Before
    public void setUp() throws Exception {
    }

    @Test
    public void test() {
        assertNotNull(AccessLevel.valueOf("VIEWER"));
        assertNotNull(AccessLevel.valueOf("EDITOR"));
        assertNotNull(AccessLevel.valueOf("EDITOR_SHARE"));
        assertNotNull(AccessLevel.valueOf("ADMIN"));
        assertNotNull(AccessLevel.valueOf("OWNER"));
        assertEquals(5,AccessLevel.values().length);
    }
}


text:
import * as React from "react";
import { CarbonIconProps } from "../../";
declare const TextWrap20: React.ForwardRefExoticComponent<
  CarbonIconProps & React.RefAttributes<SVGSVGElement>
>;
export default TextWrap20;


text:
package com.marklogic.contentpump;

import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;

import org.junit.After;
import org.junit.Test;

import com.marklogic.contentpump.utilities.OptionsFileUtil;
import com.marklogic.mapreduce.utilities.AssignmentManager;
import com.marklogic.xcc.ResultSequence;

public class TestImportArchive {
    @After
    public void tearDown() {
        Utils.closeSession();
    }

    @Test
    public void testBug19403() throws Exception {
        String cmd = "IMPORT -host localhost -username admin -password"
            + " admin -input_file_path " + Constants.TEST_PATH.toUri()
            + "/archive"
            + " -input_file_type archive"
            + " -port " + Constants.port + " -database " + Constants.testDb;
        String[] args = cmd.split(" ");
        assertFalse(args.length == 0);

        Utils.clearDB(Utils.getTestDbXccUri(), Constants.testDb);

        String[] expandedArgs = null;
        expandedArgs = OptionsFileUtil.expandArguments(args);
        ContentPump.runCommand(expandedArgs);

        ResultSequence result = Utils.runQuery(
            Utils.getTestDbXccUri(), "fn:count(fn:collection())");
        assertTrue(result.hasNext());
        assertEquals("5", result.next().asString());
        Utils.closeSession();
    }

    @Test
    public void testArchiveWithNaked() throws Exception {
        String cmd = "IMPORT -host localhost -username admin -password"
            + " admin -input_file_path " + Constants.TEST_PATH.toUri()
            + "/mixnakedzip"
            + " -input_file_type archive"
            + " -port " + Constants.port + " -database " + Constants.testDb;
        String[] args = cmd.split(" ");
        assertFalse(args.length == 0);

        Utils.clearDB(Utils.getTestDbXccUri(), Constants.testDb);

        String[] expandedArgs = null;
        expandedArgs = OptionsFileUtil.expandArguments(args);
        ContentPump.runCommand(expandedArgs);

        ResultSequence result = Utils.runQuery(
            Utils.getTestDbXccUri(), "fn:count(fn:collection())");
        assertTrue(result.hasNext());
        assertEquals("6", result.next().asString());

        result = Utils.runQuery(
            Utils.getTestDbXccUri(),
            "fn:count(" +
            "for $i in cts:search(xdmp:document-properties(),cts:not-query(cts:document-fragment-query(cts:and-query( () )))) \n" +
            "where fn:contains(fn:base-uri($i),\"naked\") eq fn:false() \n" +
            "return fn:base-uri($i)" +
            ")");
        assertTrue(result.hasNext());
        assertEquals("5", result.next().asString());

        Utils.closeSession();
    }

    @Test
    public void testArchiveTransformWithNaked() throws Exception {
        Utils.prepareModule(Utils.getTestDbXccUri(), "/lc.xqy");
        String cmd = "IMPORT -host localhost -username admin -password"
            + " admin -input_file_path " + Constants.TEST_PATH.toUri()
            + "/mixnakedzip -fastload"
            + " -transform_namespace http://marklogic.com/module_invoke"
            + " -transform_module /lc.xqy"
            + " -input_file_type archive"
            + " -port " + Constants.port + " -database " + Constants.testDb;
        String[] args = cmd.split(" ");
        assertFalse(args.length == 0);

        Utils.clearDB(Utils.getTestDbXccUri(), Constants.testDb);

        String[] expandedArgs = null;
        expandedArgs = OptionsFileUtil.expandArguments(args);
        ContentPump.runCommand(expandedArgs);

        ResultSequence result = Utils.runQuery(
            Utils.getTestDbXccUri(), "fn:count(fn:collection())");
        assertTrue(result.hasNext());
        assertEquals("6", result.next().asString());

        result = Utils.runQuery(
            Utils.getTestDbXccUri(),
            "fn:count(" +
            "for $i in cts:search(xdmp:document-properties(),cts:not-query(cts:document-fragment-query(cts:and-query( () )))) \n" +
            "where fn:contains(fn:base-uri($i),\"naked\") eq fn:false() \n" +
            "return fn:base-uri($i)" +
            ")");
        assertTrue(result.hasNext());
        assertEquals("5", result.next().asString());

        Utils.closeSession();
        AssignmentManager.getInstance().setInitialized(false);
    }

    @Test
    public void testArchiveTransformWithNakedTxn1() throws Exception {
        Utils.prepareModule(Utils.getTestDbXccUri(), "/lc.xqy");
        String cmd = "IMPORT -host localhost -username admin -password"
            + " admin -input_file_path " + Constants.TEST_PATH.toUri()
            + "/mixnakedzip -fastload -transaction_size 1"
            + " -transform_namespace http://marklogic.com/module_invoke"
            + " -transform_module /lc.xqy"
            + " -input_file_type archive"
            + " -port " + Constants.port + " -database " + Constants.testDb;
        String[] args = cmd.split(" ");
        assertFalse(args.length == 0);

        Utils.clearDB(Utils.getTestDbXccUri(), Constants.testDb);

        String[] expandedArgs = null;
        expandedArgs = OptionsFileUtil.expandArguments(args);
        ContentPump.runCommand(expandedArgs);

        ResultSequence result = Utils.runQuery(
            Utils.getTestDbXccUri(), "fn:count(fn:collection())");
        assertTrue(result.hasNext());
        assertEquals("6", result.next().asString());

        result = Utils.runQuery(
            Utils.getTestDbXccUri(),
            "fn:count(" +
            "for $i in cts:search(xdmp:document-properties(),cts:not-query(cts:document-fragment-query(cts:and-query( () )))) \n" +
            "where fn:contains(fn:base-uri($i),\"naked\") eq fn:false() \n" +
            "return fn:base-uri($i)" +
            ")");
        assertTrue(result.hasNext());
        assertEquals("5", result.next().asString());

        Utils.closeSession();
        AssignmentManager.getInstance().setInitialized(false);
    }

    @Test
    public void testBug19403_1() throws Exception {
        String cmd = "IMPORT -host localhost -username admin -password"
            + " admin -input_file_path " + Constants.TEST_PATH.toUri()
            + "/archive/wiki-000001.zip"
            + " -input_file_type archive"
            + " -port " + Constants.port + " -database " + Constants.testDb;
        String[] args = cmd.split(" ");
        assertFalse(args.length == 0);

        Utils.clearDB(Utils.getTestDbXccUri(), Constants.testDb);

        String[] expandedArgs = null;
        expandedArgs = OptionsFileUtil.expandArguments(args);
        ContentPump.runCommand(expandedArgs);

        ResultSequence result = Utils.runQuery(
            Utils.getTestDbXccUri(), "fn:count(fn:collection())");
        assertTrue(result.hasNext());
        assertEquals("0", result.next().asString());
        Utils.closeSession();
    }

    @Test
    public void testBug38160() throws Exception {
        Utils.prepareModule(Utils.getTestDbXccUri(), "/38160/dummy-trans.xqy");
        String cmd = "IMPORT -host localhost -username admin -password admin "
                + "-input_file_path " + Constants.TEST_PATH.toUri()
                + "/38160/20130327183855-0700-000000-XML.zip" + " -input_file_type archive "
                + "-transform_module /38160/dummy-trans.xqy "
                + "-transform_namespace my.dummy.transform.module "
                + "-output_permissions "
                + "admin,read,admin-builtins,read,admin-module-internal,read,"
                + "admin,insert,admin-builtins,insert,admin-module-internal,insert,"
                + "admin,update,admin-builtins,update,admin-module-internal,update,"
                + "admin,execute,admin-builtins,execute,admin-module-internal,execute"
                + " -port " + Constants.port + " -database " + Constants.testDb;
        String[] args = cmd.split(" ");
        assertFalse(args.length == 0);

        Utils.clearDB(Utils.getTestDbXccUri(), Constants.testDb);
        String[] expandedArgs = null;
        expandedArgs = OptionsFileUtil.expandArguments(args);
        ContentPump.runCommand(expandedArgs);

        String permQry = "declare namespace sec = 'http://marklogic.com/xdmp/security';\n" +
                "let $perms := xdmp:document-get-permissions('/bug18908/xml/1.xml')\n" +
                "return (fn:count($perms/sec:capability[text()='read']), "
                + "fn:count($perms/sec:capability[text()='insert']), "
                + "fn:count($perms/sec:capability[text()='insert']), "
                + "fn:count($perms/sec:capability[text()='execute']))";
        ResultSequence result = Utils.runQuery(
                Utils.getTestDbXccUri(), permQry);

        for (int i = 0; i < 4; i++) {
            assertTrue(result.hasNext());
            assertEquals("3", result.next().asString());
        }
    }
}


text:
$("#eDataZoom_colorSetting").change(dataZoomColorSetting)
function dataZoomColorSetting(){

	if ($("#eDataZoom_colorSetting").prop("checked")){
		$("label[for=eDataZoom_backgroundColor]").show()
		$("label[for=eDataZoom_databackgroundColor]").show()
		$("label[for=eDataZoom_fillerColor]").show()
		$("label[for=eDataZoom_handleColor]").show()

		$("#eDataZoom_backgroundColor").show()
		$("#eDataZoom_databackgroundColor").show()
		$("#eDataZoom_fillerColor").show()
		$("#eDataZoom_handleColor").show()
	}else{
		$("label[for=eDataZoom_backgroundColor]").hide()
		$("label[for=eDataZoom_databackgroundColor]").hide()
		$("label[for=eDataZoom_fillerColor]").hide()
		$("label[for=eDataZoom_handleColor]").hide()

		$("#eDataZoom_backgroundColor").hide()
		$("#eDataZoom_databackgroundColor").hide()
		$("#eDataZoom_fillerColor").hide()
		$("#eDataZoom_handleColor").hide()
	}
}
dataZoomColorSetting()

$("#eAxisX_layoutSetting").change(xAxisLayoutSetting)
function xAxisLayoutSetting(){
	if ($("#eAxisX_layoutSetting").prop("checked")){
		$("label[for=eAxisX_valueLabel]").show()
		$("label[for=eAxisX_label_color]").show()
		$("label[for=eAxisX_label_fontSize]").show()
		$("label[for=eAxisX_label_margin]").show()
		$("label[for=eAxisX_label_rotate]").show()
		$("label[for=eAxisX_label_interval]").show()
		$("label[for=eAxisX_tick_show]").show()
		$("label[for=eAxisX_tick_color]").show()
		$("label[for=eAxisX_tick_width]").show()
		$("label[for=eAxisX_tick_length]").show()
		$("label[for=eAxisX_splitLine]").show()
		$("label[for=eAxisX_splitArea]").show()

		$("#eAxisX_valueLabel").show()
		$("#eAxisX_label_color").show()
		$("#eAxisX_label_fontSize").show()
		$("#eAxisX_label_margin").show()
		$("#eAxisX_label_rotate").show()
		$("#eAxisX_label_interval").show()
		$("#eAxisX_tick_show").show()
		$("#eAxisX_tick_color").show()
		$("#eAxisX_tick_width").show()
		$("#eAxisX_tick_length").show()
		$("#eAxisX_splitLine").show()
		$("#eAxisX_splitArea").show()
	}else{
		$("label[for=eAxisX_valueLabel]").hide()
		$("label[for=eAxisX_label_color]").hide()
		$("label[for=eAxisX_label_fontSize]").hide()
		$("label[for=eAxisX_label_margin]").hide()
		$("label[for=eAxisX_label_rotate]").hide()
		$("label[for=eAxisX_label_interval]").hide()
		$("label[for=eAxisX_tick_show]").hide()
		$("label[for=eAxisX_tick_color]").hide()
		$("label[for=eAxisX_tick_width]").hide()
		$("label[for=eAxisX_tick_length]").hide()
		$("label[for=eAxisX_splitLine]").hide()
		$("label[for=eAxisX_splitArea]").hide()

		$("#eAxisX_valueLabel").hide()
		$("#eAxisX_label_color").hide()
		$("#eAxisX_label_fontSize").hide()
		$("#eAxisX_label_margin").hide()
		$("#eAxisX_label_rotate").hide()
		$("#eAxisX_label_interval").hide()
		$("#eAxisX_tick_show").hide()
		$("#eAxisX_tick_color").hide()
		$("#eAxisX_tick_width").hide()
		$("#eAxisX_tick_length").hide()
		$("#eAxisX_splitLine").hide()
		$("#eAxisX_splitArea").hide()
	}

}

$("#eAxisY_layoutSetting").change(yAxisLayoutSetting)
function yAxisLayoutSetting(){
	if ($("#eAxisY_layoutSetting").prop("checked")){
		$("label[for=eAxisY_valueLabel]").show()
		$("label[for=eAxisY_label_color]").show()
		$("label[for=eAxisY_label_fontSize]").show()
		$("label[for=eAxisY_label_margin]").show()
		$("label[for=eAxisY_label_rotate]").show()
		$("label[for=eAxisY_label_interval]").show()
		$("label[for=eAxisY_tick_show]").show()
		$("label[for=eAxisY_tick_color]").show()
		$("label[for=eAxisY_tick_width]").show()
		$("label[for=eAxisY_tick_length]").show()
		$("label[for=eAxisY_splitLine]").show()
		$("label[for=eAxisY_splitArea]").show()

		$("#eAxisY_valueLabel").show()
		$("#eAxisY_label_color").show()
		$("#eAxisY_label_fontSize").show()
		$("#eAxisY_label_margin").show()
		$("#eAxisY_label_rotate").show()
		$("#eAxisY_label_interval").show()
		$("#eAxisY_tick_show").show()
		$("#eAxisY_tick_color").show()
		$("#eAxisY_tick_width").show()
		$("#eAxisY_tick_length").show()
		$("#eAxisY_splitLine").show()
		$("#eAxisY_splitArea").show()
	}else{
		$("label[for=eAxisY_valueLabel]").hide()
		$("label[for=eAxisY_label_color]").hide()
		$("label[for=eAxisY_label_fontSize]").hide()
		$("label[for=eAxisY_label_margin]").hide()
		$("label[for=eAxisY_label_rotate]").hide()
		$("label[for=eAxisY_label_interval]").hide()
		$("label[for=eAxisY_tick_show]").hide()
		$("label[for=eAxisY_tick_color]").hide()
		$("label[for=eAxisY_tick_width]").hide()
		$("label[for=eAxisY_tick_length]").hide()
		$("label[for=eAxisY_splitLine]").hide()
		$("label[for=eAxisY_splitArea]").hide()

		$("#eAxisY_valueLabel").hide()
		$("#eAxisY_label_color").hide()
		$("#eAxisY_label_fontSize").hide()
		$("#eAxisY_label_margin").hide()
		$("#eAxisY_label_rotate").hide()
		$("#eAxisY_label_interval").hide()
		$("#eAxisY_tick_show").hide()
		$("#eAxisY_tick_color").hide()
		$("#eAxisY_tick_width").hide()
		$("#eAxisY_tick_length").hide()
		$("#eAxisY_splitLine").hide()
		$("#eAxisY_splitArea").hide()
	}

}
xAxisLayoutSetting()
yAxisLayoutSetting()


text:
package it.cnr.isti.zigbee.zcl.library.impl.core;

import it.cnr.isti.primitivetypes.util.Integers;
import it.cnr.isti.zigbee.zcl.library.api.core.ZBDeserializer;
import it.cnr.isti.zigbee.zcl.library.api.core.ZBSerializer;
import it.cnr.isti.zigbee.zcl.library.api.core.ZigBeeType;

/**
 *
 * The defualt implementation of the {@link ZBSerializer}
 *
 * @author Stefano "Kismet" Lenzi
 * @author Francesco Furfari
 * @version $LastChangedRevision$ ($LastChangedDate: 2013-08-06 18:00:05
 *          +0200 (Tue, 06 Aug 2013) $)
 * @since 0.1.0
 * @deprecated From version 0.7.0 please use the
 *             {@link ByteArrayOutputStreamSerializer} instead
 *
 */
public class DefaultSerializer implements ZBSerializer {
    int index = 0;
    private byte[] payload;

    /**
     *
     * @param payload
     *            the byte array that will used for storing the serialiazed data
     * @param index
     *            the first empty byte where data will be written
     * @deprecated From version 0.7.0 please use the
     *             {@link ByteArrayOutputStreamSerializer} instead
     */
    public DefaultSerializer(byte[] payload, int index) {
        this.payload = payload;
        this.index = index;
    }

    public void appendBoolean(Boolean data) {
        index += Integers.writeBooleanObject(payload, index, data);
    }

    public void appendByte(Byte data) {
        index += Integers.writeByteObject(payload, index, data);
    }

    public void appendInteger(Integer data) {
        index += Integers.writeIntObject(payload, index, data);
    }

    public void appendLong(Long data) {
        index += Integers.writeLongObject(payload, index, data);
    }

    public void appendString(String str) {
        final byte[] raw = str.getBytes();
        if (raw.length > 255) {
            throw new IllegalArgumentException("Given string '" + str
                    + "' is too long - maximum String size is 255.");
        }

        payload[index] = (byte) (raw.length & 0xFF);
        System.arraycopy(raw, 0, payload, index + 1, raw.length);
        index += raw.length + 1;
    }

    public void appendZigBeeType(Object data, ZigBeeType type) {
        if (data == null) {
            throw new NullPointerException(
                    "You can not append null data to a stream");
        }
        switch (type) {
        case Boolean:
            appendBoolean((Boolean) data);
            break;
        case Data8bit:
        case SignedInteger8bit:
        case Bitmap8bit:
        case UnsignedInteger8bit:
        case Enumeration8bit:
            final Number b = (Number) data;
            append_byte(b.byteValue());
            break;
        case Data16bit:
        case SignedInteger16bit:
        case Bitmap16bit:
        case UnsignedInteger16bit:
        case Enumeration16bit:
            final Number s = (Number) data;
            append_short(s.shortValue());
            break;
        case Data24bit:
        case SignedInteger24bit:
        case Bitmap24bit:
        case UnsignedInteger24bit:
            new IllegalArgumentException("No reader defined by this "
                    + ZBDeserializer.class.getName() + " for "
                    + type.toString() + " (" + type.getId() + ")");
            break;
        case Data32bit:
        case SignedInteger32bit:
        case Bitmap32bit:
        case UnsignedInteger32bit:
            if (type == ZigBeeType.UnsignedInteger32bit) {
                final Long l = (Long) data;
                append_int(l.intValue());
            } else {
                final Integer i = (Integer) data;
                append_int(i.intValue());
            }
            break;
        case CharacterString:
        case OctectString: {
            final String str = (String) data;
            append_byte((byte) (str.length() & (0xFF)));
            appendString(str);
        }
            break;
        case LongCharacterString:
        case LongOctectString: {
            final String str = (String) data;
            append_short((short) (str.length() & (0xFFFF)));
            appendString(str);
        }
            break;
        default:
            throw new IllegalArgumentException("No reader defined by this "
                    + ZBDeserializer.class.getName() + " for "
                    + type.toString() + " (" + type.getId() + ")");
        }
    }

    public void appendObject(Object data) {
        index += Integers.writeObject(payload, index, data);
    }

    public void appendShort(Short data) {
        index += Integers.writeShortObject(payload, index, data);
    }

    public void append_boolean(boolean data) {
        index += Integers.writeBoolean(payload, index, data);
    }

    public void append_byte(byte data) {
        index += Integers.writeByte(payload, index, data);
    }

    public void append_int(int data) {
        index += Integers.writeInt(payload, index, data);
    }

    public void append_int24bit(int data) {
        index += Integers.writeInt24bit(payload, index, data);
    }

    public void append_long(long data) {
        index += Integers.writeLong(payload, index, data);
    }

    public void append_short(short data) {
        index += Integers.writeShort(payload, index, data);
    }

    public byte[] getPayload() {
        byte[] copy = new byte[index];
        System.arraycopy(payload, 0, copy, 0, copy.length);
        return copy;
    }

    public void appendFloat(Float data) {
        final String msg = "appendFloat: we are not going to implement it because this class is depreacated please use the "
                + ByteArrayOutputStreamSerializer.class.getName();
        throw new UnsupportedOperationException(msg);
    }

    public void append_long(long data, int size) {
        final String msg = "append_long: we are not going to implement it because this class is depreacated please use the "
                + ByteArrayOutputStreamSerializer.class.getName();
        throw new UnsupportedOperationException(msg);
    }
}


text:
<?php
if(count($arrTestsSeq)){
	$strQuery = sprintf("select count(*) as question_count from test_question_list where test_seq in (".join(',',$arrTestsSeq).")");
}else if(!is_null($strTestsSeqGroup)){
	$strQuery = sprintf("select count(*) as question_count from test_question_list where test_seq in (".$strTestsSeqGroup.")");
}else{
	$strQuery = sprintf("select count(*) as question_count from test_question_list where test_seq=%d",$intTestSeq);
}
?>


text:
""" Tests for applications.signals"""
import pytest

from klasses.factories import BootcampRunFactory, PersonalPriceFactory
from klasses.signals import personal_price_post_save, personal_price_post_delete

pytestmark = pytest.mark.django_db

# pylint: disable=redefined-outer-name

def test_bootcamp_run_signal(mocker):
    """Test that hubspot_sync is synced whenever a Bootcamp is created/updated"""
    mock_on_commit = mocker.patch("klasses.signals.on_commit")
    bootcamp = BootcampRunFactory.create()
    bootcamp.save()
    bootcamp.save()
    assert mock_on_commit.call_count == 3  # Once for creation, twice for updates

def test_personal_price_save_signal(mocker):
    """An API method to update a bootcamp application should be called after a personal price is created/saved"""
    mock_on_commit = mocker.patch("klasses.signals.on_commit")
    personal_price = PersonalPriceFactory.create()
    # This signal is called twice when the record is created (as opposed to just being saved)
    assert mock_on_commit.call_count == 2
    personal_price.save()
    assert mock_on_commit.call_count == 3
    # Test the function call from the signal handler
    patched_adjust_app = mocker.patch("klasses.signals.adjust_app_state_for_new_price")
    personal_price_post_save(mocker.Mock(), personal_price, False)
    # Call the function that was passed into "on_commit", which in this case should be our patched API function
    mock_on_commit.call_args[0][0]()
    patched_adjust_app.assert_called_once_with(
        user=personal_price.user,
        bootcamp_run=personal_price.bootcamp_run,
        new_price=personal_price.price,
    )

def test_personal_price_delete_signal(mocker):
    """An API method to update a bootcamp application should be called after a personal price is deleted"""
    mock_on_commit = mocker.patch("klasses.signals.on_commit")
    personal_price = PersonalPriceFactory.create()
    prev_call_count = mock_on_commit.call_count
    personal_price.delete()
    assert mock_on_commit.call_count == prev_call_count + 1
    # Test the function call from the signal handler
    patched_adjust_app = mocker.patch("klasses.signals.adjust_app_state_for_new_price")
    personal_price_post_delete(mocker.Mock(), personal_price)
    # Call the function that was passed into "on_commit", which in this case should be our patched API function
    mock_on_commit.call_args[0][0]()
    patched_adjust_app.assert_called_once_with(
        user=personal_price.user, bootcamp_run=personal_price.bootcamp_run
    )


text:
package com.intellij.codeInsight;

import com.intellij.ide.DataManager;
import com.intellij.openapi.actionSystem.IdeActions;
import com.intellij.openapi.editor.actionSystem.EditorActionHandler;
import com.intellij.openapi.editor.actionSystem.EditorActionManager;
import com.intellij.openapi.editor.ex.DocumentEx;

/**
 * @author mike
 */
public class GenerateJavadocTest extends CodeInsightTestCase {
  public void test1() throws Exception { doTest(); }
  public void test2() throws Exception { doTest(); }
  public void test3() throws Exception { doTest(); }
  public void testIdeadev2328() throws Exception { doTest(); }
  public void testIdeadev2328_2() throws Exception { doTest(); }

  private void doTest() throws Exception {
    String name = getTestName(false);
    configureByFile("/codeInsight/generateJavadoc/before" + name + ".java");
    performAction();
    checkResultByFile("/codeInsight/generateJavadoc/after" + name + ".java", true);
  }

  private void performAction() {
    EditorActionManager actionManager = EditorActionManager.getInstance();
    EditorActionHandler actionHandler = actionManager.getActionHandler(IdeActions.ACTION_EDITOR_ENTER);
    actionHandler.execute(myEditor, DataManager.getInstance().getDataContext());
    ((DocumentEx)myEditor.getDocument()).stripTrailingSpaces(false);
  }
}