text:
function Convert2Bin(outstring, statstring, signBit, power, rounding)
{
  output = new String()                 //Output

  var binexpnt, index1, index2, cnst, bias, lastbit, rounded, index3, binexpnt2
  var moreBits

  cnst = 2102		// 1 (carry bit) + 1023 + 1 + 1022 + 53 + 2 (round bits)
  bias = 1024

  //init
  for (index1 = 0; index1 < this.Size; index1++)  this.Result[index1] = 0

  with (Math)
  {
    //sign bit
    this.Result[0] = signBit

    //obtain exponent value
    index1 = 0

    if (this.Size == 32) index2 = 9
    else index2 = 12

    if (rounding && (outstring == ""))
    {
      //find most significant bit of significand
      while ((index1 < cnst) && (this.BinVal[index1] != 1)) index1++

      binexpnt = bias - index1

      //regular normalized numbers
      if (binexpnt >= this.MinExp)
      {
				//the value is shifted until the most
        index1++		//significant 1 is to the left of the binary
				//point and that bit is implicit in the encoding
      }//if normalized numbers

      //support for zero and denormalized numbers
      //exponent underflow for this precision
      else
      {
        binexpnt = this.MinExp - 1
        index1 = bias - binexpnt
      }//if zero or denormalized (else section)

      //use round to nearest value mode

      //compute least significant (low-order) bit of significand
      lastbit = this.Size - 1 - index2 + index1

      //the bits folllowing the low-order bit have a value of (at least) 1/2
      if (this.BinVal[lastbit + 1] == 1)
      {
        rounded = 0

        //odd low-order bit
        if (this.BinVal[lastbit] == 1)
        {
          //exactly 1/2 the way between odd and even rounds up to the even,
          //so the rest of the bits don't need to be checked to see if the value
          //is more than 1/2 since the round up to the even number will occur
          //anyway due to the 1/2
          rounded = 1
        }//if odd low-order bit

        //even low-order bit
        else  //this.BinVal[lastbit] == 0
        {
          //exactly 1/2 the way between even and odd rounds down to the even,
          //so the rest of the bits need to be checked to see if the value
          //is more than 1/2 in order to round up to the odd number
          index3 = lastbit + 2
          while ((rounded == 0) && (index3 < cnst))
          {
            rounded = this.BinVal[index3]
            index3++
          }//while checking for more than 1/2

        }//if even low-order bit (else section)

        //do rounding "additions"
        index3 = lastbit
        while ((rounded == 1) && (index3 >= 0))
        {
          // 0 + 1 -> 1 result with 0 carry
          if (this.BinVal[index3] == 0)
          {
            // 1 result
            this.BinVal[index3] = 1

            // 0 carry
            rounded = 0

          }//if bit is a 0

          // 1 + 1 -> 0 result with 1 carry
          else  //this.BinVal[index3] == 1
          {
            // 0 result
            this.BinVal[index3] = 0

            // 1 carry
//          rounded = 1
          }//if bit is a 1 (else section)

          index3--
        }//while "adding" carries from right to left in bits

      }//if at least 1/2

      //obtain exponent value
      index1 = index1 - 2
      if (index1 < 0) index1 = 0

    }//if rounding

    //find most significant bit of significand
    while ((index1 < cnst) && (this.BinVal[index1] != 1)) index1++

    binexpnt2 = bias - index1

    if (outstring == "")
    {
      binexpnt = binexpnt2

      //regular normalized numbers
      if ((binexpnt >= this.MinExp) && (binexpnt <= this.MaxExp))
      {
                                //the value is shifted until the most
        index1++                //significant 1 is to the left of the binary
                                //point and that bit is implicit in the encoding
      }//if normalized numbers

      //support for zero and denormalized numbers
      //exponent underflow for this precision
      else if (binexpnt < this.MinExp)
      {
        if (binexpnt2 == bias - cnst)
          //value is truely zero
          this.StatCond = "normal"
        else if (binexpnt2 < this.MinUnnormExp)
          this.StatCond = "underflow"
        else
          this.StatCond = "denormalized"

        binexpnt = this.MinExp - 1
        index1 = bias - binexpnt
      }//if zero or denormalized (else if section)
    }

    else //already special values
    {
      binexpnt = power
      index1 = bias - binexpnt

      //compute least significant (low-order) bit of significand
      lastbit = this.Size - 1 - index2 + index1

      moreBits = this.BinVal[lastbit]

      index3 = lastbit + 1
      while ((moreBits == 0) && (index3 < cnst))
      {
        moreBits = this.BinVal[index3]
        index3++
      }//while checking for more bits from other precision

      this.BinVal[lastbit] = moreBits

    }//if already special (else section)

    //copy the result
    while ((index2 < this.Size) && (index1 < cnst))
    {
      this.Result[index2] = this.BinVal[index1]
      index2++
      index1++
    }//while

    //max exponent for this precision
    if ((binexpnt > this.MaxExp) || (outstring != ""))
    {
      binexpnt = this.MaxExp + 1

      //overflow of this precision, set infinity
      if (outstring == "")
      {
        this.StatCond = "overflow"
        this.DispStr = "Infinity"

        if (this.Result[0] == 1)
          this.DispStr = "-" + this.DispStr

        if (this.Size == 32) index2 = 9
        else index2 = 12

        //zero the significand
        while (index2 < this.Size)
        {
          this.Result[index2] = 0
          index2++
        }//while

      }//if overflowed

      else //already special values
      {
        this.StatCond = statstring
        this.DispStr = outstring
      }//if already special (else section)

    }//if max exponent

    //convert exponent value to binary representation
    if (this.Size == 32) index1 = 8
    else index1 = 11
    this.BinaryPower = binexpnt
    binexpnt += this.ExpBias		//bias
    while ((binexpnt / 2) != 0)
    {
      this.Result[index1] = binexpnt % 2
      if (binexpnt % 2 == 0) binexpnt = binexpnt / 2
        else binexpnt = binexpnt / 2 - 0.5
      index1 -= 1
    }

    //output binary result
    output = ""
    for (index1 = 0; index1 < this.Size; index1++)
      output = output + this.Result[index1]
    return output

  }//with Math
}

function Hex2Bin(input)
{
  output = new String()                 //Output
  numerals = new String()

  var index1, nibble, i, s, binexpnt, cnst, bias, index2, zeroFirst, zeroRest
  var binexpnt2, index3

  cnst = 2102           // 1 (carry bit) + 1023 + 1 + 1022 + 53 + 2 (round bits)
  bias = 1024

  //init
  numerals = "0123456789ABCDEF"

  for (index1 = 0; index1 < cnst; index1++)  this.BinVal[index1] = 0

  for (index1 = 0; index1 < this.Size; index1++)  this.Result[index1] = 0

  with (Math)
  {

    input = RemoveBlanks(input)

    if (input.length > (this.Size / 4))
    {
      //alert("too many hex digits")
      output = "exit"
      return output
    }

    else if (input.length < (this.Size / 4))
    {
      //alert("too few hex digits")
      output = "exit"
      return output
    }

    else
    {
      input = input.toUpperCase()

      for (index1 = 0; index1 < this.Size; index1 +=4)
      {
        nibble = numerals.indexOf(input.charAt(index1 / 4))

        if (nibble == -1)
        {
          //alert("invalid hex digit")
          output = "exit"
          return output
        }

        temp = nibble / 16

        for (i = 0; i < 4; i++)
        {
          temp *= 2
          if (temp >= 1)
          {
            this.Result[index1 + i] = 1
            temp --
          }
          else
            this.Result[index1 + i] = 0
        }
      }
    }

    //obtain exponent value
    binexpnt = 0

    if (this.Size == 32) index2 = 9
    else index2 = 12

    for (index1 = 1; index1 < index2; index1++)
      binexpnt += parseInt(this.Result[index1])*pow(2, index2 - index1 - 1)

    binexpnt -= this.ExpBias            //bias
    this.BinaryPower = binexpnt

    index1 = bias - binexpnt

    //regular normalized numbers
    if ((binexpnt >= this.MinExp) && (binexpnt <= this.MaxExp))
    {
      //the encoding's hidden 1 is inserted
      this.BinVal[index1] = 1
      index1++
    }//if normalized numbers

    index3 = index1

    //copy the input
    if (this.Result[index2] == 0)
      zeroFirst = true
    this.BinVal[index1] = this.Result[index2]
    index2++
    index1++

    zeroRest = true
    while ((index2 < this.Size) && (index1 < cnst))
    {
      if (this.Result[index2] == 1)
        zeroRest = false
      this.BinVal[index1] = this.Result[index2]
      index2++
      index1++
    }//while

    //find most significant bit of significand
    //for the actual denormalized exponent test for zero
    while ((index3 < cnst) && (this.BinVal[index3] != 1)) index3++
    binexpnt2 = bias - index3

    //zero and denormalized numbers
    if (binexpnt < this.MinExp)
    {
      if (binexpnt2 == bias - cnst)
        //value is truely zero
        this.StatCond = "normal"
      else if (binexpnt2 < this.MinUnnormExp)
        this.StatCond = "underflow"
      else
        this.StatCond = "denormalized"
    }//if zero or denormalized

    //max exponent for this precision
    else if (binexpnt > this.MaxExp)
    {
      if (zeroFirst && zeroRest)
      {
        //Infinity
        this.StatCond = "overflow"
        this.DispStr = "Infinity"
      }//if Infinity
      else if (!zeroFirst && zeroRest && (this.Result[0] == 1))
      {
        //Indeterminate quiet NaN
        this.StatCond = "quiet"
        this.DispStr = "Indeterminate"
      }//if Indeterminate quiet NaN (else if section)
      else if (!zeroFirst)
      {
        //quiet NaN
        this.StatCond = "quiet"
        this.DispStr = "NaN"
      }//if quiet NaN (else if section)
      else
      {
        //signaling NaN
        this.StatCond = "signaling"
        this.DispStr = "NaN"
      }//if signaling NaN (else section)

      if ((this.Result[0] == 1) && (this.DispStr != "Indeterminate"))
        this.DispStr = "-" + this.DispStr

    }//if max exponent (else if section)

    //output binary result
    output = ""
    for (index1 = 0; index1 < this.Size; index1++)
      output = output + this.Result[index1]
    return output

  }//with Math
}

function RemoveBlanks(input)
{
  output = new String()

  var start, stop

  start = 0
  while ((input.charAt(start) == " ") && (start < input.length))
    start++

  stop = input.length - 1
  while ((input.charAt(stop) == " ") && (stop >= 0))
    stop--

  output = input.substring(start, stop + 1)

  return output
}

function Convert2Hex()
{
  output = new String()
  numerals = new String()

  var temp, index, i

  numerals = "0123456789ABCDEF"

  with (Math)
  {
    //convert binary result to hex and output
    for (index = 0; index < this.Size; index +=4)
    {
      temp = 0
      for (i = 0; i < 4; i++)
        temp += pow(2, 3 - i)*this.Result[index + i]

      output = output + numerals.charAt(temp)
    }
  }
  return output
}

function numStrClipOff(input, precision)
{
  result = new String()
  numerals = new String()
  tempstr = new String()
  expstr = new String()
  signstr = new String()

  var locE, stop, expnum, locDP, start, MSD, MSDfound, index, expdelta, digits
  var number

  numerals = "0123456789";

  tempstr = input.toUpperCase()

  locE = tempstr.indexOf("E");
  if (locE != -1)
  {
    stop = locE
    expstr = input.substring(locE + 1, input.length)
    expnum = expstr * 1
  }
  else
  {
    stop = input.length
    expnum = 0
  }

  if (input.indexOf(".") == -1)
  {
    tempstr = input.substring(0, stop)
    tempstr += "."
    if (input.length != stop)
      tempstr += input.substring(locE, input.length)

    input = tempstr

    locE = locE + 1
    stop = stop + 1
  }

  locDP = input.indexOf(".");

  start = 0
  if (input.charAt(start) == "-")
  {
    start++
    signstr = "-"
  }
  else
    signstr = ""

  MSD = start
  MSDfound = false
  while ((MSD < stop) && !MSDfound)
  {
    index = 1
    while (index < numerals.length)
    {
      if (input.charAt(MSD) == numerals.charAt(index))
      {
        MSDfound = true
        break
      }
      index++
    }
    MSD++
  }
  MSD--

  if (MSDfound)
  {
    expdelta = locDP - MSD
    if (expdelta > 0)
      expdelta = expdelta - 1

    expnum = expnum + expdelta

    expstr = "e" + expnum
  }
  else  //No significant digits found, value is zero
    MSD = start

  digits = stop - MSD

  tempstr = input.substring(MSD, stop)

  if (tempstr.indexOf(".") != -1)
    digits = digits - 1

  number = digits
  if (precision < digits)
    number = precision

  tempstr = input.substring(MSD, MSD + number + 1)

  if ( (MSD != start) || (tempstr.indexOf(".") == -1) )
  {
    result = signstr
    result += input.substring(MSD, MSD + 1)
    result += "."
    result += input.substring(MSD + 1, MSD + number)

    while (digits < precision)
    {
      result += "0"
      digits += 1
    }

    result += expstr
  }
  else
  {
    result = input.substring(0, start + number + 1)

    while (digits < precision)
    {
      result += "0"
      digits += 1
    }

    if (input.length != stop)
      result += input.substring(locE, input.length)
  }

  return result;
}

function numCutOff(input, precision)
{
  result = new String()
  tempstr = new String()

  var temp = input;
  if(temp < 1)
    temp += 1;

  tempstr = "" + temp;

  tempstr = numStrClipOff(tempstr, precision);

  if(temp == input)
    result = tempstr.substring(0, 1);
  else
    result = "0";

  result += tempstr.substring(1, tempstr.length);

  return result;
}

function Convert2Dec()
{
  output = new String()

  var s, i, dp, val, hid, temp, decValue, power

  with (Math)
  {
  if (this.Size == 32) s = 9
  else s = 12

  if ((this.BinaryPower < this.MinExp) || (this.BinaryPower > this.MaxExp))
  {
    dp = 0
    val = 0
  }
  else
  {
    dp = - 1
    val = 1
  }

  for (i = s; i < this.Size; i++)
    val += parseInt(this.Result[i])*pow(2, dp + s - i)

  decValue = val * pow(2, this.BinaryPower)

  this.FullDecValue = decValue

  if (this.Size == 32)
  {
    s = 8
    if (val > 0)
    {
      power = floor( log(decValue) / LN10 )
      decValue += 0.5 * pow(10, power - s + 1)
      val += 5E-8
    }
  }
  else s = 17

  if (this.Result[0] == 1)
  {
    decValue = - decValue
    this.FullDecValue = - this.FullDecValue
  }

  //the system refuses to display negative "0"s with a minus sign
  this.DecValue = "" + decValue
  if ((this.DecValue == "0") && (this.Result[0] == 1))
    this.DecValue = "-" + this.DecValue

  this.DecValue = numStrClipOff(this.DecValue, s)

  output = numCutOff(val, s)

  }
  return output
}

//object construction function
function ieee (Size){

  this.Size = Size
  this.BinaryPower = 0
  this.DecValue = ""
  this.FullDecValue = 0
  this.DispStr = ""
  this.Convert2Bin = Convert2Bin   //convert input to bin.
  this.Convert2Hex = Convert2Hex   //convert bin. to hex.
  this.Convert2Dec = Convert2Dec   //convert bin. significand to dec.
  this.Hex2Bin = Hex2Bin           //convert hex. to bin.
  this.StatCond = "normal"
  this.BinString = ""
  // 1 (carry bit) + 1023 + 1 + 1022 + 53 + 2 (round bits)
  this.BinVal = new Array(2102)    //Binary Representation
  if (Size == 32){
    this.ExpBias = 127
    this.MaxExp = 127
    this.MinExp = -126
    this.MinUnnormExp = -149
    this.Result = new Array(32)
  }
  else if (Size == 64){
    this.ExpBias = 1023
    this.MaxExp = 1023
    this.MinExp = -1022
    this.MinUnnormExp = -1074
    this.Result = new Array(64)
  }

}

function compute(obj, rounding){
/*
  in this javascript program, bit positions are numbered
  0 ~ 32/64 from left to right instead of right to left, the
  way the output is presented
*/

  var index1, cnst

  ieee32 = new ieee(32)
  ieee64 = new ieee(64)

  ieee64.BinString = ieee64.Hex2Bin(obj.hex64b.value)
  if (ieee64.BinString != "exit")
  {
    obj.bin64_0.value = ieee64.BinString.substring(0, 1)
    obj.bin64_1.value = ieee64.BinString.substring(1, 12)
    if ((ieee64.BinaryPower < ieee64.MinExp) ||
        (ieee64.BinaryPower > ieee64.MaxExp))
    {
      obj.bin64_12.value = "  "
      obj.bin64_12.value += ieee64.BinString.substring(12, 13)
      obj.bin64_12.value += "."
      obj.bin64_12.value += ieee64.BinString.substring(13, 64)
    }
    else
    {
      obj.bin64_12.value = "1 ."
      obj.bin64_12.value += ieee64.BinString.substring(12, 64)
    }
    obj.stat64.value = ieee64.StatCond
    obj.binpwr64.value = ieee64.BinaryPower
    obj.binpwr64f.value = ieee64.BinaryPower + ieee64.ExpBias
    obj.dec64sig.value = ieee64.Convert2Dec()
    if (ieee64.DispStr != "")
    {
      obj.entered.value = ieee64.DispStr
      obj.dec64.value = ieee64.DispStr
      obj.dec64sig.value = ""
    }
    else
    {
      obj.entered.value = ieee64.FullDecValue
      obj.dec64.value = ieee64.DecValue
    }
    obj.hex64.value = ieee64.Convert2Hex()

    cnst = 2102         // 1 (carry bit) + 1023 + 1 + 1022 + 53 + 2 (round bits)
    for (index1 = 0; index1 < cnst; index1++)
      ieee32.BinVal[index1] = ieee64.BinVal[index1]

    ieee32.BinString =
      ieee32.Convert2Bin(ieee64.DispStr, ieee64.StatCond, ieee64.Result[0],
                         ieee64.BinaryPower, rounding)
    obj.bin32_0.value = ieee32.BinString.substring(0, 1)
    obj.bin32_1.value = ieee32.BinString.substring(1, 9)
    if ((ieee32.BinaryPower < ieee32.MinExp) ||
        (ieee32.BinaryPower > ieee32.MaxExp))
    {
      obj.bin32_9.value = "  "
      obj.bin32_9.value += ieee32.BinString.substring(9, 10)
      obj.bin32_9.value += "."
      obj.bin32_9.value += ieee32.BinString.substring(10, 32)
    }
    else
    {
      obj.bin32_9.value = "1 ."
      obj.bin32_9.value += ieee32.BinString.substring(9, 32)
    }
    obj.stat32.value = ieee32.StatCond
    obj.binpwr32.value = ieee32.BinaryPower
    obj.binpwr32f.value = ieee32.BinaryPower + ieee32.ExpBias
    obj.dec32sig.value = ieee32.Convert2Dec()
    if (ieee32.DispStr != "")
    {
      obj.dec32.value = ieee32.DispStr
      obj.dec32sig.value = ""
    }
    else
      obj.dec32.value = ieee32.DecValue
    obj.hex32.value = ieee32.Convert2Hex()
  }
}

var seed = 0xbbd1;

function rand()
{
  var a = (seed * 5) & 0xFFFF;
  // Swap bytes
  a = ((a & 0xFF) << 8) + (a >> 8);
  seed = (((seed + a) & 0xff)<<8) + (a & 0xff);
  // Return low byte
  return (a & 0xff);
}

function compute2() {
  ieee32 = new ieee(32)
  ieee64 = new ieee(64)

  value = ""
  for (var i = 0; i < 16; i++) {
    var chr = rand() & 0xF
    if (chr <= 9)
        value = value + String.fromCharCode(48 + chr)
    else
        value = value + String.fromCharCode(65 - 10 + chr)
  }

  //print(value)
  ieee64.BinString = ieee64.Hex2Bin(value)
  ieee32.BinString =
      ieee32.Convert2Bin(ieee64.DispStr, ieee64.StatCond, ieee64.Result[0],
                         ieee64.BinaryPower, true)

  //print(ieee64.Convert2Dec())
  //print(ieee32.Convert2Dec())
}

// ~ 0.025s
for (var i = 0; i < 480; i++)
  compute2()


text:
var NULL_OBJECT = {};

function resolveAdapterProxy(){
  this.fn.call(this.context, this.source);
}

/**
* @class
*/
var ResolveAdapter = function(context, fn, source, handler){
  this.context = context;
  this.fn = fn;
  this.source = source;
  this.handler = handler;
};

ResolveAdapter.prototype = {
  context: null,
  fn: null,
  source: null,
  handler: null,
  next: null,
  attach: function(){
    this.source.addHandler(this.handler, this);
  },
  detach: function(){
    this.source.removeHandler(this.handler, this);
  }
};

/**
* Binding bridge resolve adapter
* @class
*/
var BBResolveAdapter = function(){
  ResolveAdapter.apply(this, arguments);
};
BBResolveAdapter.prototype = new ResolveAdapter();
BBResolveAdapter.prototype.attach = function(destroyCallback){
  this.source.bindingBridge.attach(this.source, this.handler, this, destroyCallback);
};
BBResolveAdapter.prototype.detach = function(){
  this.source.bindingBridge.detach(this.source, this.handler, this);
};

//
// adapter handlers
//

var DEFAULT_CHANGE_ADAPTER_HANDLER = function(){
  this.fn.call(this.context, this.source);
};
var DEFAULT_DESTROY_ADAPTER_HANDLER = function(){
  this.fn.call(this.context, null);
};
var RESOLVEVALUE_DESTROY_ADAPTER_HANDLER = function(){
  this.fn.call(this.context, resolveValue(NULL_OBJECT, null, this.source.bindingBridge.get(this.source)));
};

/**
* Class instance resolve function factory
*/
function createResolveFunction(Class){
  return function resolve(context, fn, source, property, factoryContext){
    var oldAdapter = context[property] || null;
    var newAdapter = null;

    if (fn !== resolveAdapterProxy && typeof source == 'function')
      source = source.call(factoryContext || context, factoryContext || context);

    if (source && source.bindingBridge)
    {
      if (!oldAdapter || oldAdapter.source !== source)
        newAdapter = new BBResolveAdapter(context, fn, source, DEFAULT_CHANGE_ADAPTER_HANDLER);
      else
        newAdapter = oldAdapter;

      source = resolve(newAdapter, resolveAdapterProxy, source.bindingBridge.get(source), 'next');
    }

    if (source instanceof Class == false)
      source = null;

    if (property && oldAdapter !== newAdapter)
    {
      var cursor = oldAdapter;

      // drop old adapter chain
      while (cursor)
      {
        var adapter = cursor;
        adapter.detach();
        cursor = adapter.next;
        adapter.next = null;
      }

      if (newAdapter)
        newAdapter.attach(DEFAULT_DESTROY_ADAPTER_HANDLER);

      context[property] = newAdapter;
    }

    return source;
  };
}

/**
* Resolve value from source.
*/
function resolveValue(context, fn, source, property, factoryContext){
  var oldAdapter = context[property] || null;
  var newAdapter = null;

  // as functions could be a value, invoke only functions with factory property
  // i.e. source -> function(){ /* factory code */ }).factory === FACTORY
  // apply only for top-level resolveValue() invocation
  if (source && fn !== resolveAdapterProxy && basis.fn.isFactory(source))
    source = source.call(factoryContext || context, factoryContext || context);

  if (source && source.bindingBridge)
  {
    if (!oldAdapter || oldAdapter.source !== source)
      newAdapter = new BBResolveAdapter(context, fn, source, DEFAULT_CHANGE_ADAPTER_HANDLER);
    else
      newAdapter = oldAdapter;

    source = resolveValue(newAdapter, resolveAdapterProxy, source.bindingBridge.get(source), 'next');
  }

  if (property && oldAdapter !== newAdapter)
  {
    var cursor = oldAdapter;

    // drop old adapter chain
    while (cursor)
    {
      var adapter = cursor;
      adapter.detach();
      cursor = adapter.next;
      adapter.next = null;
    }

    if (newAdapter)
      newAdapter.attach(RESOLVEVALUE_DESTROY_ADAPTER_HANDLER);

    context[property] = newAdapter;
  }

  return source;
}

module.exports = {
  DEFAULT_CHANGE_ADAPTER_HANDLER: DEFAULT_CHANGE_ADAPTER_HANDLER,
  DEFAULT_DESTROY_ADAPTER_HANDLER: DEFAULT_DESTROY_ADAPTER_HANDLER,

  ResolveAdapter: ResolveAdapter,
  BBResolveAdapter: BBResolveAdapter,

  createResolveFunction: createResolveFunction,
  resolveValue: resolveValue
};

redpajama_set_name: RedPajamaGithub


text:
"""
Copyright (c) 2010-2011 Tyler Kennedy <tk@tkte.ch>

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
"""
__all__ = ["AttributeTable"]

try:
    from collections import namedtuple
except ImportError:
    from ..compat import namedtuple

class Attribute(object):
    """
    Generic Attribute.
    """
    def __init__(self, read, constants):
        length = read(">I")[0]
        self.data = read(">%ss" % length)[0]

CodeException = namedtuple("CodeException", [
    "start_pc",
    "end_pc",
    "handler_pc",
    "catch_type"
])
class CodeAttribute(object):
    """
    Implements the Code attribute (S4.8.3).
    """
    def __init__(self, read, constants):
        length = read(">I")[0] # We don't really care...
        self.max_stack, self.max_locals, code_len = read(">HHI")
        self.code, exp_len = read(">%ssH" % code_len)

        self.exception_table = []
        while exp_len:
            exp_len -= 1
            self.exception_table.append(CodeException(*read(">HHHH")))

        self.attributes = AttributeTable(read, constants)

_attribute_map = {
    "Code": CodeAttribute,
}

class AttributeTable(object):
    def __init__(self, read, constants):
        self.__store = []

        attrib_count = read(">H")[0]

        while attrib_count:
            attrib_count -= 1

            name_i = read(">H")[0]
            name = constants[name_i]["value"]

            attrib = _attribute_map.get(name, Attribute)( read, constants)
            attrib.name = name
            self.storage.append(attrib)

    @property
    def storage(self):
        return self.__store

    def find(self, name=None, f=None):
        if not name:
            return self.storage

        ret = []
        for attribute in self.storage:
            if name and attribute.name != name:
                continue

            if f and not f(attribute):
                continue

            ret.append(attribute)

        return attribute

    def find_one(self, name=None, f=None):
        for attribute in self.storage:
            if name and name != attribute.name:
                continue

            if f and not f(attribute):
                continue

            return attribute

        return None


text:
<?php
/**
 * author: shenzhe
 * Date: 13-6-17
 */
namespace ZPHP\Core;

class Factory
{
    private static $instances = array();

    public static function getInstance($className, $params = null)
    {
        $keyName = $className;
        if (!empty($params['_prefix'])) {
            $keyName .= $params['_prefix'];
        }
        if (isset(self::$instances[$keyName])) {
            return self::$instances[$keyName];
        }
        if (!\class_exists($className)) {
            throw new \Exception("no class {$className}");
        }
        if (empty($params)) {
            self::$instances[$keyName] = new $className();
        } else {
            self::$instances[$keyName] = new $className($params);
        }
        return self::$instances[$keyName];
    }
}


text:
class PrefRegistrySimple;
class PrefService;

namespace ntp_snippets {

// An implementation of a CategoryRanker based on a number of clicks per
// category. Initial order is hardcoded, but sections with more clicks are moved
// to the top. The new remote categories must be registered using
// AppendCategoryIfNecessary. All other categories must be hardcoded in the
// initial order. The order and category usage data are persisted in prefs and
// reloaded on startup.
// TODO(crbug.com/675929): Remove unused categories from prefs.
class ClickBasedCategoryRanker : public CategoryRanker {
 public:
  explicit ClickBasedCategoryRanker(PrefService* pref_service,
                                    base::Clock* clock);
  ~ClickBasedCategoryRanker() override;

  // CategoryRanker implementation.
  bool Compare(Category left, Category right) const override;
  void ClearHistory(base::Time begin, base::Time end) override;
  void AppendCategoryIfNecessary(Category category) override;
  void InsertCategoryBeforeIfNecessary(Category category_to_insert,
                                       Category anchor) override;
  void InsertCategoryAfterIfNecessary(Category category_to_insert,
                                      Category anchor) override;
  std::vector<CategoryRanker::DebugDataItem> GetDebugData() override;
  void OnSuggestionOpened(Category category) override;
  void OnCategoryDismissed(Category category) override;

  // Returns time when last decay occured. For testing only.
  base::Time GetLastDecayTime() const;

  static void RegisterProfilePrefs(PrefRegistrySimple* registry);

  // Returns passing margin, i.e. a number of extra clicks required to move a
  // category upwards. For testing only.
  static int GetPassingMargin();

  // Returns number of top categories with extra margin (i.e. with increased
  // passing margin). For testing only.
  static int GetNumTopCategoriesWithExtraMargin();

  // Returns number of positions by which a dismissed category is downgraded.
  // For testing only.
  static int GetDismissedCategoryPenalty();

 private:
  struct RankedCategory {
    Category category;
    int clicks;
    base::Time last_dismissed;

    RankedCategory(Category category,
                   int clicks,
                   const base::Time& last_dismissed);
  };

  int GetPositionPassingMargin(
      std::vector<RankedCategory>::const_iterator category_position) const;
  void RestoreDefaultOrder();
  void AppendKnownCategory(KnownCategories known_category);
  bool ReadOrderFromPrefs(std::vector<RankedCategory>* result_categories) const;
  void StoreOrderToPrefs(const std::vector<RankedCategory>& ordered_categories);
  std::vector<RankedCategory>::iterator FindCategory(Category category);
  bool ContainsCategory(Category category) const;
  void InsertCategoryRelativeToIfNecessary(Category category_to_insert,
                                           Category anchor,
                                           bool after);

  base::Time ReadLastDecayTimeFromPrefs() const;
  void StoreLastDecayTimeToPrefs(base::Time last_decay_time);
  bool IsEnoughClicksToDecay() const;
  bool DecayClicksIfNeeded();

  std::vector<RankedCategory> ordered_categories_;
  PrefService* pref_service_;
  base::Clock* clock_;

  DISALLOW_COPY_AND_ASSIGN(ClickBasedCategoryRanker);
};

}  // namespace ntp_snippets

#endif  // COMPONENTS_NTP_SNIPPETS_CATEGORY_RANKERS_CLICK_BASED_CATEGORY_RANKER_H_


text:
package com.example.leandro.appcar.control;

import android.content.Context;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteOpenHelper;
import android.util.Log;

public class SQLiteConnector extends SQLiteOpenHelper {

    public static final String DB_NAME = "appcar";
    public static final int DB_VERSION = 1;

    public SQLiteConnector(Context context) {
        super(context, DB_NAME, null, DB_VERSION);
    }

    @Override
    public void onCreate(SQLiteDatabase sqLiteDatabase) {
        dump(sqLiteDatabase, DB_VERSION);
    }

    @Override
    public void onUpgrade(SQLiteDatabase sqLiteDatabase, int i, int i1) {
        /*
        if (DB_VERSION > i1) {
            dump(sqLiteDatabase, i);
        }
        */
    }

    private void dump(SQLiteDatabase database, int version) {
        database.execSQL(
                "create table if not exists login(" +
                        " cod integer primary key," +
                        " senha text," +
                        " usuario text" +
                        ");");
        database.execSQL(
                "create table if not exists endereco(" +
                        " cod integer primary key," +
                        " bairro text," +
                        " cep text," +
                        " cidade text," +
                        " complemento text," +
                        " numero text," +
                        " rua text" +
                        ");");
        database.execSQL(
                "create table if not exists servico_os(" +
                        " cod integer primary key," +
                        " funcionario_codigo integer," +
                        " ordemservico_cod integer," +
                        " servico_cod integer" + ");");
        database.execSQL(
                "create table if not exists funcionario(" +
                        " codigo integer primary key," +
                        " login_cod integer" + ");");
        database.execSQL(
                "create table if not exists pessoa(" +
                        " codigo integer primary key," +
                        " tipo text," +
                        " cpf text," +
                        " email text," +
                        " nome text," +
                        " rg text," +
                        " sexo text," +
                        " telefoneF text," +
                        " telefoneM text," +
                        " endereco_cod integer" + ");");
        database.execSQL(
                "create table if not exists cliente(" +
                        " codigo integer primary key" + ");");
        database.execSQL(
                "create table if not exists carro(" +
                        " cod integer primary key," +
                        " ano text," +
                        " chassi text," +
                        " cor text," +
                        " km text," +
                        " marca text," +
                        " modelo text," +
                        " obs text," +
                        " placa text," +
                        " dono_codigo integer" + ");");
        database.execSQL(
                "create table if not exists servico(" +
                        " cod integer primary key," +
                        " descricao text," +
                        " valor double" + ");");
        database.execSQL(
                "create table if not exists ordemservico(" +
                        " cod integer primary key," +
                        " tipo text," +
                        " data text," +
                        " situacao integer," +
                        " cliente_codigo integer," +
                        " carro_cod integer," +
                        " descricao integer" + ");");
        database.execSQL(
                "create table if not exists log(" +
                        " cod integer primary key," +
                        " descricao text," +
                        " data text," +
                        " funcionario_cod integer" + ");");
        database.execSQL(
                "create table if not exists remember_me(" +
                        "cod_login integer primary key );");
        Log.d("DB", "Criado");
    }
}


text:
:- consult('features.pl').

:- dynamic maxCircleSD/1.

maxCircleSD(0.80).

updateMaxSD(SD) :-
    retractall(maxCircleSD(_)),
    assert(maxCircleSD(SD)).

isCircle(Filename) :-
    standardDeviationImg(Filename, SD),
    maxCircleSD(MaxSD),
    write(Filename),
    ((SD =< MaxSD) ->
        writeln(' is a circle'), Circle = 'True';
        writeln(' is not a circle'), Circle = 'False'),
    viewPGM(Filename),
    writeln('Am I correct? y/n'),
    read(Answer),
    ((Circle = 'True', Answer = 'n') ->
        NewSD is MaxSD - 0.5,
        updateMaxSD(NewSD); true),
    ((Circle = 'False', Answer = 'n') ->
        updateMaxSD(SD); true).


text:
ACCEPTED

#### According to
Index Fungorum

#### Published in
in Crous & Braun, CBS Diversity Ser. (Utrecht) 1: 454 (2003)

#### Original name
Phaeoramularia grewiae Y.L. Guo & Li Xu

### Remarks
null


text:
using System.Collections.Generic;
using System.Linq;
using UnityEngine;
using UnityEngine.EventSystems;

namespace Framework.Base.Gameplay
{
    public class Activateable : MonoBehaviour
    {
        [Header("Debug")]
        public  bool DrawDebug;
        public  bool PoolInput;

        [Header("UI")]
        public  IGUIActivateable      ActivatorMessage;
        public  string                ActivatorUITag = "Activator";
        private List<ActionActivator> ActiveActivators = new List<ActionActivator>();

        private bool CanSubmit => ActivatorMessage
                               && BaseGame.Instance.IsPlaying()
                               && ActiveActivators.Any();

        public void OnLevelLoaded()
        {
            if (!ActivatorMessage)
            {
                var go = GameObject.FindGameObjectWithTag(ActivatorUITag);
                if (go)
                {
                    ActivatorMessage = go.GetComponentInChildren<IGUIActivateable>();
                    ActivatorMessage?.Init(this);
                }
            }
        }

//        void Update()
//        {
//            if (!ActivatorMessage)
//                return;
//
//            ActivatorMessage.OnActivatorSelected(null);
//
//            if (!BaseGame.Instance.IsPlaying())
//                return;
//
//            if (!ActiveActivators.Any())
//                return;
//
//            ActivatorMessage.OnActivatorSelected();
//
//            if (Input.GetButtonDown("Submit"))
//            {
//                ActiveActivators.Last().Activate(this);
//            }
//        }

        public void PushActivator(ActionActivator activator)
        {
            var lastTop = ActiveActivators.LastOrDefault();
            if (!ActiveActivators.Contains(activator))
            {
                if (DrawDebug) Debug.LogFormat("{0} :: New Activator {1}", Time.realtimeSinceStartup, activator);
                ActiveActivators.Add(activator);
            }

            var newTop = ActiveActivators.LastOrDefault();
            if (lastTop != newTop && ActivatorMessage)
                ActivatorMessage.OnActivatorSelected(newTop);
        }

        public void PopActivator(ActionActivator activator)
        {
            var lastTop = ActiveActivators.LastOrDefault();
            if (ActiveActivators.Remove(activator))
            {
                if (DrawDebug) Debug.LogFormat("{0} :: Lost Activator {1}", Time.realtimeSinceStartup, activator);
            }

            var newTop = ActiveActivators.LastOrDefault();
            if (newTop == null && ActivatorMessage)
                ActivatorMessage.OnActivatorSelected(null);
            else if (lastTop != newTop && CanSubmit)
                ActivatorMessage.OnActivatorSelected(newTop);
        }

        public void Update()
        {
            if (!PoolInput)
                return;

            if (Input.GetButtonDown("Submit"))
            {
                OnSubmit();
            }
        }

        public void OnSubmit()
        {
            if (!CanSubmit)
                return;

            var last = ActiveActivators.LastOrDefault();
            if (last)
                last.Activate(this);
        }
    }
}


text:
class Mailer < ActionMailer::Base
  default from: "info@openlets.org"

  def item_purchased(item, buyer)
  	@item = item
  	@buyer = buyer
  	mail(to: @item.user.email, subject: "#{buyer.name} just purchased your item - #{item.title}")
  end

  def wish_fulfilled(item)
    @item = item
    @wish = item.wish
    @wisher = @wish.user
    mail(to: @wisher.email, subject: "#{item.user.name} just offered to fulfill your wish - #{@wish.title}")
  end

  def new_message(message)
    @message  = message
    @receiver = message.conversation.other_user(message.user)
    mail(to: @receiver.email, subject: "#{message.user.name} just sent you a message")
  end

end


text:
_homebrew-installed() {
  type brew &> /dev/null
}

_awscli-homebrew-installed() {
  brew list awscli &> /dev/null
}

export AWS_HOME=~/.aws

function agp {
  echo $AWS_DEFAULT_PROFILE
}

function asp {
  local rprompt=${RPROMPT/<aws:$(agp)>/}

  export AWS_DEFAULT_PROFILE=$1
  export AWS_PROFILE=$1

  export RPROMPT="<aws:$AWS_DEFAULT_PROFILE>$rprompt"
}

function aws_profiles {
  reply=($(grep profile $AWS_HOME/config|sed -e 's/.*profile \([a-zA-Z0-9_-]*\).*/\1/'))
}

function aws_change_access_key {
  if [[ "x$1" == "x" ]] then
    echo "usage: $0 <profile.name>"
    return 1
  else
    echo "Insert the credentials when asked."
    asp $1
    aws iam create-access-key
    aws configure --profile $1
    echo "You can now safely delete the old access key running 'aws iam delete-access-key --access-key-id ID'"
    echo "Your current keys are:"
    aws iam list-access-keys
  fi
}

compctl -K aws_profiles asp aws_change_access_key

if _homebrew-installed && _awscli-homebrew-installed ; then
  _aws_zsh_completer_path=$(brew --prefix awscli)/libexec/bin/aws_zsh_completer.sh
else
  _aws_zsh_completer_path=$(which aws_zsh_completer.sh)
fi

[ -x $_aws_zsh_completer_path ] && source $_aws_zsh_completer_path
unset _aws_zsh_completer_path


text:
.. GrowthRatesPy documentation master file, created by
   sphinx-quickstart on Wed Mar 30 21:21:47 2016.
   You can adapt this file completely to your liking, but it should at least
   contain the root `toctree` directive.

=========================================
GrowthRatesPy: Python API for GrotwhRates
=========================================

**Author**: `Yoav Ram <http://www.yoavram.com>`_

`GrowthRates <https://sourceforge.net/projects/growthrates/>`_ is a program for analysis of growth curve data:
"GrowthRates uses the output from microbial growth rate experiments that are done using microtiter plate readers
to caculate the best-fit growth rates, the lag times and the maximum OD".

**GrowthRatesPy** provides a Python API for using **GrowthRates** from within Python code.

Install
-------

To install the latest stable version of **GrowthRatesPy**, use `pip`:

>>> pip install git+https://github.com/yoavram/GrowthRatesPy.git

You will need to install `pandas <http://pandas.pydata.org/>`_, which requires NumPy etc.
This is most easily done on Windows using `Anaconda <https://store.continuum.io/>`_ .

You will also need to download `GrowthRates <https://sourceforge.net/projects/growthrates/>`_
and unzip it to either `C:\\Program Files`, `C:\\Program Files (x86)` or to anywhere else of your choice,
provided that you add it to your `PATH`.

**GrowthRatesPy** supports both Python 2 and 3 and was tested with Python 2.7 and 3.4.

Usage
-----

To use **GrowthRatesPy** you'll need a TSV (tab-separated values) file in the format specified in **GrowthRates** documentation:
one time column, in minutes, called `Min`, and one or more columns of OD data (usually one column per well).

You can use the file supplied with the package, called `Tecan_210115.tsv`,
which will be located in your Python package library (search is your friend).

>>> from growthratespy import growthrates
>>> summary = growthrates(infile='Tecan_210115.tsv', well=96)

Here, `well` is the number of the well that has the blank sample.

The result, `summary`, is a table of type `pandas.DataFrame` that contains the results of the analysis:

.. csv-table::
  :file: _static/Tecan_210115.summary.head8.csv

If the data is in a `pandas.DataFrame` called `df` rather than a file,
you can give this dataframe directly to the `growthrates` function:

>>> summary = growthrates(data=df, well=96)

Support
-------

Please report bugs and file feature requests by `opening an issue on github <https://github.com/yoavram/GrowthRatesPy/issues>`_.

Citation
--------
If you use **GrowthRates**, please cite:

.. note::

   Hall, B. G., H. Acar and M. Barlow. 2014 *Growth Rates Made Easy*. Mol. Biol. Evol. 31:
   232-238 doi:10.1093/molbev/mst197

License
-------

**GrowthRatesPy** is not related to **GrowthRates** and is independently developed.

**GrowthRatesPy** source code is licensed under the terms of the `MIT license <http://opensource.org/licenses/MIT>`_.

**GrowthRatesPy** documentation and other content is licensed under the terms of the `Attribution 4.0 International (CC BY 4.0) license <https://creativecommons.org/licenses/by/4.0/>`_.

**GrowthRates** is distributed under a separate license, please see the PDF attached to the program.

API
---

.. automodule:: growthratespy.core
    :members:


text:
<?php

use Behat\Behat\Context\ClosuredContextInterface,
    Behat\Behat\Context\TranslatedContextInterface,
    Behat\Behat\Context\BehatContext,
    Behat\Behat\Context\Step\Then,
	Behat\Behat\Context\Step\When,
    Behat\Behat\Exception\PendingException;
use Behat\Gherkin\Node\PyStringNode,
    Behat\Gherkin\Node\TableNode;
use Behat\MinkExtension\Context\MinkContext;

//
// Require 3rd-party libraries here:
//
require_once 'C:/wamp/www/Tutorials/Web_Developer/PHP/Zend2/vendor/autoload.php';

/**
 * Features context.
 */
class UIContext extends MinkContext
{
	protected $page_list = array(
		'home' => '/'
	);

	protected $element_list = array(
		'albums table' => '.albums',
		'user table' => '.conferences'
	);

    public function __construct(array $parameters)
    {

    }

	 /**
	  * @When /^I am on the "([^"]*)" page$/
	  */
	 public function iAmOnThePage($page_name)
	 {
	 	 if(!isset($this->page_list[$page_name])){
	 	 	throw new Exception( "{$page_name}: not in page list");
		 }

		 $page = $this->page_list[$page_name];

		 return new When("I am on \"{$page}\"");
	 }

	 /**
	  * @Then /^I should see "([^"]*)" in the "([^"]*)"$/
	  */
	 public function iShouldSeeInThe($text, $element)
	 {
	 	 if(!isset($this->element_list[$element])) {
	 	 	 throw new Exception( "Element: {$element} not in element list");
		 }

		 $element = $this->element_list[$element];

		 return new Then("I should see \"{$text}\" in the \"{$element}\" element");
	 }

	 /**
	  * @When /^I wait (\d+) seconds?$/
	  */
	 public function waitSeconds($seconds)
	 {
	 	$this->getSession()->wait(1000 * $seconds);
	 }
}


text:
require 'slidox'

ROOT = File.expand_path('../', File.dirname(__FILE__))

def run_cmd(cmd)
  `bundle exec #{Gem.ruby} #{ROOT}/bin/slidox #{cmd}`
end


text:
.//============================================================================
.// Notice:
.// (C) Copyright 1998-2013 Mentor Graphics Corporation
.//     All rights reserved.
.//
.// This document contains confidential and proprietary information and
.// property of Mentor Graphics Corp.  No part of this document may be
.// reproduced without the express written permission of Mentor Graphics Corp.
.//============================================================================
.//
.//
/*----------------------------------------------------------------------------
 *
 * Run time instrumentation and tracing declarations are defined here.
 *
 * Note:
 *   Multi-line macros use the do {...} while (0) construct recommended
 *   by cert.org (PRE10-C, PRE10-CPP).
 *
 *   Users may copy this file to the /gen folder and modify these macros
 *   as desired to change the way tracing works.
 *
 *--------------------------------------------------------------------------*/

.if ( te_thread.flavor == "Nucleus" )
#define XTUML_TRACE_FLUSH( i )
.else
#define XTUML_TRACE_FLUSH( i ) fflush( i )
.end if

/*
 * State transition start tracing:
 */
/* To suppress source identification in tracing, uncomment the following macro */
/* #define ${te_prefix.define_usw}XTUML_SOURCE_PROLOGUE */

#ifndef ${te_prefix.define_usw}XTUML_SOURCE_PROLOGUE
#define ${te_prefix.define_usw}XTUML_SOURCE_PROLOGUE ${printf}( "%s #%6u: ", __FILE__, __LINE__ ); XTUML_TRACE_FLUSH( 0 )
#endif

/* To suppress state transition start tracing, uncomment the following macro */
/* #define ${te_trace.state_txn_start}( obj_kl, state_num, state_name ) */

#ifndef ${te_trace.state_txn_start}
#define ${te_trace.state_txn_start}( obj_kl, state_num, state_name ) \
do { \
  ${te_prefix.define_usw}XTUML_SOURCE_PROLOGUE; \
  ${printf}( "Transition started:  %s State [%u] %s\n", obj_kl, state_num, state_name ); \
} while (0)
#endif

/*
 * State transition complete tracing:
 */
/* To suppress state transition complete tracing, uncomment the following macro */
/* #define ${te_trace.state_txn_end}( obj_kl, state_num, state_name ) */

#ifndef ${te_trace.state_txn_end}
#define ${te_trace.state_txn_end}( obj_kl, state_num, state_name ) \
do { \
  ${te_prefix.define_usw}XTUML_SOURCE_PROLOGUE; \
  ${printf}( "Transition complete:  %s State [%u] %s\n", obj_kl, state_num, state_name ); \
  XTUML_TRACE_FLUSH( 0 ); \
} while (0)
#endif

/*
 * Event ignored tracing:
 */
/* To unsuppress event ignored tracing, comment out the following macro.  */
#define ${te_trace.state_txn_event_ignored}( obj_kl, state_num )

#ifndef ${te_trace.state_txn_event_ignored}
#define ${te_trace.state_txn_event_ignored}( obj_kl, state_num ) \
do { \
  ${te_prefix.define_usw}XTUML_SOURCE_PROLOGUE; \
  ${printf}( "Event ignored:  %s current_state = %u\n", obj_kl, state_num ); \
  XTUML_TRACE_FLUSH( 0 ); \
} while (0)
#endif

/*
 * Event can't happen tracing:
 */
/* To suppress can't happen tracing, uncomment the following macro */
/* #define ${te_trace.state_txn_cant_happen}( obj_kl, state_num ) */

#ifndef ${te_trace.state_txn_cant_happen}
#define ${te_trace.state_txn_cant_happen}( obj_kl, state_num ) \
do { \
  ${te_prefix.define_usw}XTUML_SOURCE_PROLOGUE; \
  ${printf}( "Event cannot happen:  %s current_state = %u\n", obj_kl, state_num ); \
  XTUML_TRACE_FLUSH( 0 ); \
} while (0)
#endif

/*
 * Component message start tracing:
 */
/* To suppress component message start tracing, uncomment the following macro */
/* #define ${te_trace.component_msg_start}( arg_format, component_number, port_number, message_number, args... ) */

#ifndef ${te_trace.component_msg_start}
#define ${te_trace.component_msg_start}( arg_format, component_number, port_number, message_number, args... ) \
do { \
  ${te_prefix.define_usw}XTUML_SOURCE_PROLOGUE; \
  ${printf}( "component %d port %d message %d " arg_format "\n", component_number, port_number, message_number, ## args ); \
  XTUML_TRACE_FLUSH( 0 ); \
} while (0)
#endif

/*
 * Component message end tracing:
 */

/*
 * Object Action Language (OAL) statement level tracing:
 */

/* To suppress statement source identification, uncomment the following macro */
/* #define ${te_prefix.define_usw}XTUML_OAL_STMT_TRACE( blck_level, stmt_action ) */

#ifndef ${te_prefix.define_usw}XTUML_OAL_STMT_TRACE
#define ${te_prefix.define_usw}XTUML_OAL_STMT_TRACE( blck_level, stmt_action ) \
do { \
  ${te_prefix.define_usw}XTUML_SOURCE_PROLOGUE; \
  { /* indenting */ s1_t i; for ( i = 0; i < blck_level; i++ ) ${printf}( "  " ); } \
  ${printf}( "%s\n", stmt_action ); \
  XTUML_TRACE_FLUSH( 0 ); \
} while (0)
#endif

/* To suppress empty handle detection, modify the following macro.  */

#ifndef ${te_prefix.define_usw}XTUML_EMPTY_HANDLE_TRACE
#define ${te_prefix.define_usw}XTUML_EMPTY_HANDLE_TRACE( object_keyletters, s ) \
do { ${te_callout.empty_handle_detected}( object_keyletters, s ); } while (0)
#endif

/*
 * Declare state information structure.
 */
typedef struct ${te_prefix.type}StateInfo_s ${te_prefix.type}StateInfo_s;
struct ${te_prefix.type}StateInfo_s {
  ${te_typemap.state_number_name} state_number;  /* 'real' state number */
  c_t * state_name;
};


text:
import sys
import json
import csv

if __name__ == "__main__":
    try:
        if len(sys.argv) < 2:
            print "Usage: %s <JSON settings file>" % sys.argv[0]
            print "       <settings file>: access settings (IP/user/password)"
            sys.exit(0)
        f = open(sys.argv[1], 'r')
        settings_file = json.load(f)

        from ucscsdk.ucschandle import UcscHandle
        handle = UcscHandle(ip=settings_file['ip'], username=settings_file['user'], password=settings_file['pw'])
        handle.login()

        print "Creating Domain Group Heirarchy:" #% (template)

        from ucscsdk.mometa.org.OrgDomainGroup import OrgDomainGroup

        mo = OrgDomainGroup(parent_mo_or_dn="domaingroup-root",
                        descr="Domain Group for North America",
                        name="DG-NA"
                        )

        handle.add_mo(mo)
        handle.commit()

	mo = OrgDomainGroup(parent_mo_or_dn="domaingroup-root/domaingroup-DG-NA",
                        descr="Domain Group for United States",
                        name="DG-US"
                        )

        handle.add_mo(mo)
        handle.commit()

        mo = OrgDomainGroup(parent_mo_or_dn="domaingroup-root/domaingroup-DG-NA/domaingroup-DG-US",
                            descr="Domain Group for United States",
                            name="DG-QCJA-Lab"
                            )

        handle.add_mo(mo)
        handle.commit()

        handle.logout()

    except Exception, err:
        print "Exception:", str(err)
        import traceback, sys
        print '-'*60
        traceback.print_exc(file=sys.stdout)
        print '-'*60


text:
package de.website.Bean;

import org.primefaces.context.RequestContext;

import java.sql.*;
import java.util.ArrayList;
import java.util.List;

import javax.faces.bean.ManagedBean;
import javax.faces.bean.RequestScoped;

/**
 * Created by Nick on 07.03.2016.
 */
@RequestScoped
@ManagedBean(name = "projectImageBean")
public class ProjectImageBean {
    private int imageID;
    Statement stmt = null;
    PreparedStatement ps;
    ResultSet rs;
    Exchange ex = Exchange.getInstance();
    List<String> wobauPid = new ArrayList<String>();

    public List<ProjectImageBean> getAllImage() {
        List<ProjectImageBean> imageInfo = new ArrayList<ProjectImageBean>();
        Connection con = ex.getConnection();
        int pid = ex.getPid();

        try {
            stmt = con.createStatement();
            String strSql = "select id from bilder where iid =" + pid + " order by id";
            rs = stmt.executeQuery(strSql);
            while (rs.next()) {
                ProjectImageBean idb = new ProjectImageBean();
                idb.setImageID(rs.getInt("id"));
                imageInfo.add(idb);
            }
        } catch (SQLException e) {
            System.out.println("Exception in getAllImage:" + e.getMessage());
        }
        return imageInfo;
    }

    public List<ProjectImageBean> getSpecialImage(String pid) {
        List<ProjectImageBean> imageInfo = new ArrayList<ProjectImageBean>();
        Connection con = ex.getConnection();
        try {
            stmt = con.createStatement();
            String strSql = "select id from bilder where iid =" + pid + " order by id";
            rs = stmt.executeQuery(strSql);
            while (rs.next()) {
                ProjectImageBean idb = new ProjectImageBean();
                idb.setImageID(rs.getInt("id"));
                imageInfo.add(idb);
            }
        } catch (SQLException e) {
            System.out.println("Exception in getAllImage::" + e.getMessage());
        }
        return imageInfo;
    }

    public void deleteImage(String id) {
        Connection con = ex.getConnection();

        try {
            PreparedStatement preState = con.prepareStatement("delete from bilder where id = " + id);
            preState.execute();
        } catch (SQLException e) {
            System.out.println("Exception in deleteImage:" + e.getMessage());
        }
    }

    public int getImageID() {
        return imageID;
    }

    public void setImageID(int imageID) {
        this.imageID = imageID;
    }

    public List<String> getWobauPid() {
        String sectorSql;
        List<String> sectors = new ArrayList<String>();
        Connection con = ex.getConnection();
        int kid = ex.getCid();
        try {
            stmt = con.createStatement();
            String strSql = "select id from projekte where kid = " + kid + " order by id";
            rs = stmt.executeQuery(strSql);
            while (rs.next()) {
                wobauPid.add(rs.getString("id"));
            }
            if (!rs.next()) {
                int sid = ex.getSid();
                if (rs.first()) {
                } else if (sid == 0) {
                    strSql = "select id from sektor where kid = " + kid + " order by id";
                    rs = stmt.executeQuery(strSql);
                    while (rs.next()) {
                        sectors.add(rs.getString("id"));
                    }
                    sectorSql = sectors.get(0);
                    for (int i = 1; i < sectors.size(); i++) {
                        sectorSql += " or sid = " + sectors.get(i);
                    }
                    strSql = "select id from projekte where sid = " + sectorSql + " order by id";
                    rs = stmt.executeQuery(strSql);
                    while (rs.next()) {
                        wobauPid.add(rs.getString("id"));
                    }
                } else {
                    strSql = "select id from projekte where sid = " + sid + " order by id";
                    rs = stmt.executeQuery(strSql);
                    while (rs.next()) {
                        wobauPid.add(rs.getString("id"));
                    }
                }
            }
        } catch (Exception e) {
            e.printStackTrace();
            return null;
        }

        return wobauPid;
    }
}


text:
package ru.taximaxim.dbreplicator2.el;

import java.lang.Thread.UncaughtExceptionHandler;
import org.apache.log4j.Logger;

import ru.taximaxim.dbreplicator2.utils.Core;

/**
 * Обработчик по умолчанию необработанных исключений потока
 *
 * @author volodin_aa
 *
 */
public class DefaultUncaughtExceptionHandler implements UncaughtExceptionHandler {

    private static final Logger LOG = Logger
            .getLogger(DefaultUncaughtExceptionHandler.class);

    /**
     * Идентификатор раннера
     */
    private Integer runnerId;

    /**
     * Конструктор для конкретного раннера
     *
     * @param runnerId
     */
    public DefaultUncaughtExceptionHandler(Integer runnerId) {
        this.runnerId = runnerId;
    }

    /**
     * Получение раннера потока
     *
     * @return the runnerId
     */
    protected Integer getRunnerId() {
        return runnerId;
    }

    /*
     * (non-Javadoc)
     *
     * @see
     * java.lang.Thread.UncaughtExceptionHandler#uncaughtException(java.lang.
     * Thread, java.lang.Throwable)
     */
    @Override
    public void uncaughtException(Thread t, Throwable e) {
        // Сразу пишем в лог
        try (ErrorsLog errorsLog = Core.getErrorsLog()) {
            try {
                LOG.fatal("Непредвиденная ошибка потока: ", e);
            } catch (Throwable internal) {
                // Записываем ошибку записи в лог
                errorsLog.add(getRunnerId(), null, null, "Ошибка при записи в лог: ",
                        internal);
            }
            // В случае непредвиденной остановки потока пишем в лог сообщение об
            // ошибке
            errorsLog.add(getRunnerId(), null, null, "Непредвиденная ошибка потока: ", e);
        }
    }

}


text:
@cd /D %~dp0
@call ../../scripts/set-variables

IF not "%1" == "release" (

%msbuild% Installer.csproj

) ELSE (

%msbuild% Installer.csproj /p:Configuration=Release

)


text:
package com.nhl.link.rest.runtime.cayenne.processor;

import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertNotSame;
import static org.junit.Assert.assertSame;
import static org.mockito.Mockito.mock;

import org.apache.cayenne.exp.Expression;
import org.apache.cayenne.query.Ordering;
import org.apache.cayenne.query.PrefetchTreeNode;
import org.apache.cayenne.query.SelectQuery;
import org.junit.Before;
import org.junit.Test;

import com.nhl.link.rest.ResourceEntity;
import com.nhl.link.rest.it.fixture.cayenne.E1;
import com.nhl.link.rest.it.fixture.cayenne.E2;
import com.nhl.link.rest.it.fixture.cayenne.E3;
import com.nhl.link.rest.meta.LrPersistentEntity;
import com.nhl.link.rest.meta.LrRelationship;
import com.nhl.link.rest.runtime.processor.select.SelectContext;
import com.nhl.link.rest.unit.TestWithCayenneMapping;

public class CayenneQueryAssembleStageTest extends TestWithCayenneMapping {

	private CayenneQueryAssembleStage<Object> fetchStage;

	@Before
	public void before() {
		this.fetchStage = new CayenneQueryAssembleStage<>(null, mockCayennePersister);
	}

	@Test
	public void testBuildQuery_Ordering() {

		Ordering o1 = E1.NAME.asc();
		Ordering o2 = E1.NAME.desc();

		SelectQuery<E1> query = new SelectQuery<E1>(E1.class);
		query.addOrdering(o1);

		ResourceEntity<E1> resourceEntity = getResourceEntity(E1.class);
		resourceEntity.getOrderings().add(o2);

		SelectContext<E1> context = new SelectContext<E1>(E1.class);
		context.setSelect(query);
		context.setEntity(resourceEntity);

		SelectQuery<E1> amended = fetchStage.buildQuery(context);
		assertSame(query, amended);
		assertEquals(2, amended.getOrderings().size());
		assertSame(o1, amended.getOrderings().get(0));
		assertSame(o2, amended.getOrderings().get(1));
	}

	@Test
	public void testBuildQuery_Prefetches() {
		SelectQuery<E2> query = new SelectQuery<E2>(E2.class);

		ResourceEntity<E2> resultFilter = getResourceEntity(E2.class);
		LrRelationship incoming = resultFilter.getLrEntity().getRelationship(E2.E3S.getName());
		@SuppressWarnings("unchecked")
		LrPersistentEntity<E3> target = mock(LrPersistentEntity.class);
		resultFilter.getChildren().put(E2.E3S.getName(), new ResourceEntity<E3>(target, incoming));

		SelectContext<E2> context = new SelectContext<E2>(E2.class);
		context.setEntity(resultFilter);
		context.setSelect(query);

		SelectQuery<E2> amended = fetchStage.buildQuery(context);
		assertSame(query, amended);
		PrefetchTreeNode rootPrefetch = amended.getPrefetchTree();

		assertNotNull(rootPrefetch);
		assertEquals(1, rootPrefetch.getChildren().size());

		PrefetchTreeNode child1 = rootPrefetch.getChildren().iterator().next();
		assertEquals(E2.E3S.getName(), child1.getPath());
	}

	@Test
	public void testBuildQuery_Pagination() {

		ResourceEntity<E1> resourceEntity = new ResourceEntity<>(getLrEntity(E1.class));
		resourceEntity.setFetchLimit(10);
		resourceEntity.setFetchOffset(0);

		SelectContext<E1> c = new SelectContext<E1>(E1.class);
		c.setEntity(resourceEntity);

		SelectQuery<E1> q1 = fetchStage.buildQuery(c);

		assertEquals("Pagination in the query for paginated request is expected", 10, q1.getPageSize());
		assertEquals(0, q1.getFetchOffset());
		assertEquals(0, q1.getFetchLimit());

		resourceEntity.setFetchLimit(0);
		resourceEntity.setFetchOffset(0);

		SelectQuery<E1> q2 = fetchStage.buildQuery(c);
		assertEquals(0, q2.getPageSize());
		assertEquals(0, q2.getFetchOffset());
		assertEquals(0, q2.getFetchLimit());

		resourceEntity.setFetchLimit(0);
		resourceEntity.setFetchOffset(5);

		SelectQuery<E1> q3 = fetchStage.buildQuery(c);
		assertEquals(0, q3.getPageSize());
		assertEquals(0, q3.getFetchOffset());
		assertEquals(0, q3.getFetchLimit());
	}

	@Test
	public void testBuildQuery_Qualifier() {
		Expression extraQualifier = E1.NAME.eq("X");
		ResourceEntity<E1> resourceEntity = getResourceEntity(E1.class);

		resourceEntity.andQualifier(extraQualifier);

		SelectContext<E1> c1 = new SelectContext<>(E1.class);
		c1.setEntity(resourceEntity);

		SelectQuery<E1> query = fetchStage.buildQuery(c1);
		assertEquals(extraQualifier, query.getQualifier());

		SelectQuery<E1> query2 = new SelectQuery<E1>(E1.class);
		query2.setQualifier(E1.NAME.in("a", "b"));

		SelectContext<E1> c2 = new SelectContext<>(E1.class);
		c2.setSelect(query2);
		c2.setEntity(resourceEntity);

		SelectQuery<E1> query2Amended = fetchStage.buildQuery(c2);
		assertEquals(E1.NAME.in("a", "b").andExp(E1.NAME.eq("X")), query2Amended.getQualifier());
	}

	@Test
	public void testById() {

		SelectContext<E1> c = new SelectContext<>(E1.class);
		c.setId(1);
		c.setEntity(getResourceEntity(E1.class));

		SelectQuery<E1> s1 = fetchStage.basicSelect(c);
		assertNotNull(s1);
		assertSame(E1.class, s1.getRoot());
	}

	@Test
	public void testById_WithQuery() {
		SelectQuery<E1> select = new SelectQuery<E1>(E1.class);

		SelectContext<E1> c = new SelectContext<>(E1.class);
		c.setId(1);
		c.setSelect(select);
		c.setEntity(getResourceEntity(E1.class));

		SelectQuery<E1> s2 = fetchStage.basicSelect(c);
		assertNotNull(s2);
		assertNotSame(select, s2);
		assertSame(E1.class, s2.getRoot());
	}
}


text:
<?php
/**
 * This file is part of the DVSA MOT Common project.
 *
 * @link http://gitlab.clb.npm/mot/mot
 */

namespace DvsaCommonTest\Validation;

use DateTime;
use DvsaCommon\Auth\MotAuthorisationServiceInterface;
use DvsaCommon\Auth\PermissionInSystem;
use DvsaCommon\Enum\EmergencyReasonCode;
use DvsaCommon\Validation\CommonContingencyTestValidator;
use DvsaCommon\Validation\ValidationResult;
use PHPUnit\Framework\TestCase;

class CommonContingencyTestValidatorTest extends \PHPUnit\Framework\TestCase
{
    /** @var MotAuthorisationServiceInterface */
    private $authorisationService;

    public function setUp()
    {
        $this->authorisationService = $this->getMockBuilder(MotAuthorisationServiceInterface::class)->getMock();
    }

    public function testValidateReturnsValidationResultInstance()
    {
        $this->authorisationService
            ->expects($this->once())
            ->method('isGranted')
            ->with(PermissionInSystem::INFINITY_CONTINGENCY_TEST)
            ->willReturn(true);

        $validator = $this->createCommonContingencyTestValidator();

        $validationResult = $validator->validate([]);
        $this->assertInstanceOf(ValidationResult::class, $validationResult);
    }

    /**
     * @dataProvider dataProvider
     *
     * @param string      $group
     * @param array       $data
     * @param bool        $valid
     * @param null|string $message
     */
    public function testInputGroup($group, array $data, $valid, $message = null)
    {
        $validator = $this->createCommonContingencyTestValidator();
        $result = $validator->validate($data);
        $messages = $result->getFlattenedMessages();

        if (false === $valid) {
            $this->assertArrayHasKey($group, $messages);
            $this->assertNotEmpty($messages[$group]);
            $this->assertEquals($message, $messages[$group]);
            $this->assertFalse($result->isValid());
        } else {
            $this->assertArrayNotHasKey($group, $messages);
        }
    }

    /**
     * @return array
     */
    public function dataProvider()
    {
        return array_merge(
            $this->siteDataProvider(),
            $this->dateDataProvider(),
            $this->timeDataProvider(),
            $this->reasonDataProvider(),
            $this->otherReasonDataProvider(),
            $this->contingencyCodeDataProvider()
        );
    }

    /**
     * @return array
     */
    public function siteDataProvider()
    {
        return $this->prependFieldsetToDataProvider(CommonContingencyTestValidator::FIELDSET_SITE, [
            // FAIL: Site id is missing
            [
                ['site_id' => null], false, CommonContingencyTestValidator::MESSAGE_MUST_CHOOSE_A_SITE,
            ],
            // FAIL: Site id is empty
            [
                ['site_id' => ''], false, CommonContingencyTestValidator::MESSAGE_MUST_CHOOSE_A_SITE,
            ],
            // FAIL: Site id not numeric
            [
                ['site_id' => '123ABC'], false, CommonContingencyTestValidator::MESSAGE_MUST_CHOOSE_A_SITE,
            ],
            // PASS
            [
                ['site_id' => '123'], true,
            ],
        ]);
    }

    /**
     * @return array
     */
    public function dateDataProvider()
    {
        $now = new DateTime();
        $ninetyDaysAgo = new DateTime('-90 days', new \DateTimeZone("Europe/London"));
        $oneHourAgo = new DateTime('-1 hour', new \DateTimeZone("Europe/London"));
        $tomorrow = new DateTime('+1 day', new \DateTimeZone("Europe/London"));

        return $this->prependFieldsetToDataProvider(CommonContingencyTestValidator::FIELDSET_DATE, [
            // FAIL: Date not provided
            [
                [], false, CommonContingencyTestValidator::MESSAGE_MUST_ENTER_A_DATE,
            ],
            // FAIL: Date fields are null
            [
                [
                    'performed_at_year'  => null,
                    'performed_at_month' => null,
                    'performed_at_day'   => null,
                ], false, CommonContingencyTestValidator::MESSAGE_MUST_ENTER_A_DATE,
            ],
            // FAIL: Date fields are empty
            [
                [
                    'performed_at_year'  => '',
                    'performed_at_month' => '',
                    'performed_at_day'   => '',
                ], false, CommonContingencyTestValidator::MESSAGE_MUST_ENTER_A_DATE,
            ],
            // FAIL: Date fields don't match format Y-m-d (wrong year format)
            [
                [
                    'performed_at_year'  => '15',
                    'performed_at_month' => '11',
                    'performed_at_day'   => '16',
                ], false, CommonContingencyTestValidator::MESSAGE_MUST_BE_VALID_DATE,
            ],
            // FAIL: Date fields don't match format Y-m-d (day without leading zero)
            [
                [
                    'performed_at_year'  => '2015',
                    'performed_at_month' => '11',
                    'performed_at_day'   => '1',
                ], false, CommonContingencyTestValidator::MESSAGE_MUST_BE_VALID_DATE,
            ],
            // FAIL: Date entered is 90 days ago
            [
                [
                    'performed_at_year'   => $ninetyDaysAgo->format('Y'),
                    'performed_at_month'  => $ninetyDaysAgo->format('m'),
                    'performed_at_day'    => $ninetyDaysAgo->format('d'),
                    'performed_at_hour'   => $ninetyDaysAgo->format('g'),
                    'performed_at_minute' => $ninetyDaysAgo->format('i'),
                    'performed_at_am_pm'  => $ninetyDaysAgo->format('a'),
                ], false, CommonContingencyTestValidator::MESSAGE_MUST_BE_IN_THE_LAST_30_DAYS,
            ],
            // FAIL: Date entered is tomorrow
            [
                [
                    'performed_at_year'   => $tomorrow->format('Y'),
                    'performed_at_month'  => $tomorrow->format('m'),
                    'performed_at_day'    => $tomorrow->format('d'),
                    'performed_at_hour'   => $tomorrow->format('g'),
                    'performed_at_minute' => $tomorrow->format('i'),
                    'performed_at_am_pm'  => $tomorrow->format('a'),
                ], false, CommonContingencyTestValidator::MESSAGE_DATE_NOT_IN_THE_FUTURE,
            ],
            // PASS: Date entered was one hour ago
            [
                [
                    'performed_at_year'   => $oneHourAgo->format('Y'),
                    'performed_at_month'  => $oneHourAgo->format('m'),
                    'performed_at_day'    => $oneHourAgo->format('d'),
                    'performed_at_hour'   => $oneHourAgo->format('g'),
                    'performed_at_minute' => $oneHourAgo->format('i'),
                    'performed_at_am_pm'  => $oneHourAgo->format('a'),
                ], true,
            ],
            // PASS: Date entered is valid but time not provided
            [
                [
                    'performed_at_year'   => $now->format('Y'),
                    'performed_at_month'  => $now->format('m'),
                    'performed_at_day'    => $now->format('d'),
                ], true,
            ],
            // PASS: Date entered is valid but time not valid (part 1)
            [
                [
                    'performed_at_year'   => $now->format('Y'),
                    'performed_at_month'  => $now->format('m'),
                    'performed_at_day'    => $now->format('d'),
                    'performed_at_hour'   => 'A',
                    'performed_at_minute' => 'B',
                    'performed_at_am_pm'  => 'C',
                ], true,
            ],
            // PASS: Date entered is valid but time not valid (part 2)
            [
                [
                    'performed_at_year'   => $now->format('Y'),
                    'performed_at_month'  => $now->format('m'),
                    'performed_at_day'    => $now->format('d'),
                    'performed_at_hour'   => '23',
                    'performed_at_minute' => '01',
                    'performed_at_am_pm'  => 'am',
                ], true,
            ],
            // PASS: Date entered is now
            [
                [
                    'performed_at_year'   => $now->format('Y'),
                    'performed_at_month'  => $now->format('m'),
                    'performed_at_day'    => $now->format('d'),
                    'performed_at_hour'   => $now->format('g'),
                    'performed_at_minute' => $now->format('i'),
                    'performed_at_am_pm'  => $now->format('a'),
                ], true,
            ],
        ]);
    }

    /**
     * @return array
     */
    public function timeDataProvider()
    {
        $now = new DateTime();

        return $this->prependFieldsetToDataProvider(CommonContingencyTestValidator::FIELDSET_TIME, [
            // FAIL: Time not provided
            [
                [], false, CommonContingencyTestValidator::MESSAGE_MUST_ENTER_A_TIME,
            ],
            // FAIL: Time fields are null
            [
                [
                    'performed_at_year'  => null,
                    'performed_at_month' => null,
                    'performed_at_day'   => null,
                ], false, CommonContingencyTestValidator::MESSAGE_MUST_ENTER_A_TIME,
            ],
            // FAIL: Time fields are empty
            [
                [
                    'performed_at_hour'   => '',
                    'performed_at_minute' => '',
                    'performed_at_am_pm'  => '',
                ], false, CommonContingencyTestValidator::MESSAGE_MUST_ENTER_A_TIME,
            ],
            // FAIL: Time fields don't match format g:ia (part 1)
            [
                [
                    'performed_at_hour'   => '17',
                    'performed_at_minute' => '57',
                    'performed_at_am_pm'  => 'pm',
                ], false, CommonContingencyTestValidator::MESSAGE_MUST_BE_VALID_TIME,
            ],
            // FAIL: Time fields don't match format g:ia (part 2)
            [
                [
                    'performed_at_hour'   => '00',
                    'performed_at_minute' => '01',
                    'performed_at_am_pm'  => 'pm',
                ], false, CommonContingencyTestValidator::MESSAGE_MUST_BE_VALID_TIME,
            ],
            // FAIL: Time fields don't match format g:ia (part 3)
            [
                [
                    'performed_at_hour'   => '00',
                    'performed_at_minute' => '01',
                    'performed_at_am_pm'  => 'am',
                ], false, CommonContingencyTestValidator::MESSAGE_MUST_BE_VALID_TIME,
            ],
            // PASS
            [
                [
                    'performed_at_year'   => $now->format('Y'),
                    'performed_at_month'  => $now->format('m'),
                    'performed_at_day'    => $now->format('d'),
                    'performed_at_hour'   => $now->format('g'),
                    'performed_at_minute' => $now->format('i'),
                    'performed_at_am_pm'  => $now->format('a'),
                ], true,
            ],
        ]);
    }

    /**
     * @return array
     */
    public function reasonDataProvider()
    {
        return $this->prependFieldsetToDataProvider(CommonContingencyTestValidator::FIELDSET_REASON, [
            // FAIL: Reason is missing
            [
                [], false, CommonContingencyTestValidator::MESSAGE_MUST_CHOOSE_A_REASON,
            ],
            // FAIL: Reason is null
            [
                ['reason_code' => null], false, CommonContingencyTestValidator::MESSAGE_MUST_CHOOSE_A_REASON,
            ],
            // FAIL: Reason is empty
            [
                ['reason_code' => ''], false, CommonContingencyTestValidator::MESSAGE_MUST_CHOOSE_A_REASON,
            ],
            // FAIL: Reason not a valid code
            [
                ['reason_code' => 'XX'], false, CommonContingencyTestValidator::MESSAGE_MUST_CHOOSE_A_REASON,
            ],
            // PASS
            [
                ['reason_code' => EmergencyReasonCode::COMMUNICATION_PROBLEM], true, ],
            // PASS
            [
                ['reason_code' => EmergencyReasonCode::SYSTEM_OUTAGE], true,
            ],
            // PASS
            [
                ['reason_code' => EmergencyReasonCode::OTHER], true,
            ],
        ]);
    }

    /**
     * @return array
     */
    public function otherReasonDataProvider()
    {
        return $this->prependFieldsetToDataProvider(CommonContingencyTestValidator::FIELDSET_OTHER_REASON_TEXT, [
            // FAIL: Other reason text is empty (and reason code is OT)
            [
                [
                    'reason_code'       => EmergencyReasonCode::OTHER,
                    'other_reason_text' => null,
                ], false, 'you must enter a reason',
            ],
            // FAIL: Other reason text is empty (and reason code is OT)
            [
                [
                    'reason_code'       => EmergencyReasonCode::OTHER,
                    'other_reason_text' => '',
                ], false, 'you must enter a reason',
            ],
            // FAIL: Other reason text is less than 6 characters (and reason code is OT)
            [
                [
                    'reason_code'       => EmergencyReasonCode::OTHER,
                    'other_reason_text' => '12345',
                ], false, 'must be longer than 5 characters',
            ],
            // PASS: Other reason text is more than 5 characters (and reason code is OT)
            [
                [
                    'reason_code'       => EmergencyReasonCode::OTHER,
                    'other_reason_text' => '123456',
                ], true,
            ],
            // PASS: Other reason text missing (and reason code not OT)
            [
                [
                    'reason_code'       => EmergencyReasonCode::COMMUNICATION_PROBLEM,
                ], true,
            ],
            // PASS: Other reason text null (and reason code not OT)
            [
                [
                    'reason_code'       => EmergencyReasonCode::COMMUNICATION_PROBLEM,
                    'other_reason_text' => null,
                ], true,
            ],
            // PASS: Other reason text empty (and reason code not OT)
            [
                [
                    'reason_code'       => EmergencyReasonCode::COMMUNICATION_PROBLEM,
                    'other_reason_text' => '',
                ], true,
            ],
        ]);
    }

    /**
     * @return array
     */
    public function contingencyCodeDataProvider()
    {
        return $this->prependFieldsetToDataProvider(CommonContingencyTestValidator::FIELDSET_CONTINGENCY_CODE, [
            // FAIL: contingency code is missing
            [
                ['contingency_code' => null], false, CommonContingencyTestValidator::MESSAGE_MUST_ENTER_CONTINGENCY_CODE,
            ],
            // FAIL: contingency code is empty
            [
                ['contingency_code' => ''], false, CommonContingencyTestValidator::MESSAGE_MUST_ENTER_CONTINGENCY_CODE,
            ],
            // PASS
            [
                ['contingency_code' => '12345A'], true,
            ],
        ]);
    }

    /**
     * @param string $fieldset
     * @param array  $dataset
     *
     * @return array
     */
    private function prependFieldsetToDataProvider($fieldset, array $dataset)
    {
        foreach (array_keys($dataset) as $k) {
            array_unshift($dataset[$k], $fieldset);
        }

        return $dataset;
    }

    /**
     * @return CommonContingencyTestValidator
     */
    private function createCommonContingencyTestValidator()
    {
        return new CommonContingencyTestValidator(false, $this->authorisationService);
    }
}


text:
using System;
using System.Collections.Generic;
using System.Linq.Expressions;
using System.Web;
using System.Web.Caching;
using Punch.Core;
using Eqip.Metadata.Contracts;
using Eqip.Metadata;
using Punch.Contracts;

namespace Punch.Metadata
{
    public class Provider : IKnockoutMetadataProvider
    {

        #region props and constrs
        private Cache Cache { get; set; }
        private IMetadataFactory MetadataFactory { get; set; }

        public Provider(Cache cache, IMetadataFactory metadataFactory)
        {
            this.Cache = cache;
            this.MetadataFactory = metadataFactory;
        }
        #endregion
        public IMetadataDescriptor GetMetadata(Type type)
        {
            IMetadataDescriptor descriptor = Cache[type.Name] as IMetadataDescriptor;

            if (descriptor == null)
            {
                var metadata = MetadataFactory.GetMetadataFor(type);
                if (metadata != null)
                {
                    descriptor = metadata.CreateDescriptor();
                    Cache[type.Name] = descriptor;
                }
            }
            return descriptor;
        }

        public IMetadataDescriptor GetMetadata<TType>() where TType : class
        {
            return GetMetadata(typeof(TType));
        }

        #region general
        public bool Contains<TModel, TProperty, TMetadata>(Expression<Func<TModel, TProperty>> binding)
            where TMetadata : IPropertyMetadata
        {
            Guard.NotNull(() => binding, binding);
            var metadata = GetMetadata(typeof(TModel));
            var propertyName = GetPropertyName(binding);
            if (metadata == null || !metadata.Properties.ContainsKey(propertyName))
            {
                return false;
            }
            return metadata.Properties[propertyName].Contains<TMetadata>();
        }

        public TMetadata FirstOrDefault<TModel, TProperty, TMetadata>(Expression<Func<TModel, TProperty>> binding)
            where TMetadata : IPropertyMetadata
        {
            Guard.NotNull(() => binding, binding);
            var metadata = GetMetadata(typeof(TModel));
            var propertyName = GetPropertyName(binding);
            if (metadata == null || !metadata.Properties.ContainsKey(propertyName))
            {
                return default(TMetadata);
            }
            return metadata.Properties[propertyName].FirstOrDefault<TMetadata>();
        }

        public IEnumerable<TMetadata> Where<TModel, TProperty, TMetadata>(Expression<Func<TModel, TProperty>> binding)
            where TMetadata : IPropertyMetadata
        {
            Guard.NotNull(() => binding, binding);
            var metadata = GetMetadata(typeof(TModel));
            var propertyName = GetPropertyName(binding);
            if (metadata == null || !metadata.Properties.ContainsKey(propertyName))
            {
                return new List<TMetadata>();
            }
            return metadata.Properties[propertyName].Where<TMetadata>();
        }
        #endregion

        #region bindings
        public bool ContainsBindingMetadata<TModel, TProperty>(Expression<Func<TModel, TProperty>> binding)
        {
            return Contains<TModel, TProperty, IKnockoutBindingMetadata>(binding);
        }

        public IEnumerable<IKnockoutBindingMetadata> WhereBindingMetadata<TModel, TProperty>(Expression<Func<TModel, TProperty>> binding)
        {
            return Where<TModel, TProperty, IKnockoutBindingMetadata>(binding);
        }
        #endregion

        #region extends
        public bool ContainsExtendedObservableMetadata<TModel, TProperty>(Expression<Func<TModel, TProperty>> binding)
        {
            return Contains<TModel, TProperty, IKnockoutExtendedObservableMetadata>(binding);
        }

        public IKnockoutExtendedObservableMetadata FirstOrDefaultExtendedObservableMetadata<TModel, TProperty>(Expression<Func<TModel, TProperty>> binding)
        {
            return FirstOrDefault<TModel, TProperty, IKnockoutExtendedObservableMetadata>(binding);
        }
        #endregion

        #region private
        private string GetPropertyName<TModel, TProperty>(Expression<Func<TModel, TProperty>> binding)
        {
            return KnockoutExpressionConverter.Convert(binding, null, false);
        }
        #endregion

    }
}


text:
outfile=$1
tmpfile="$(dirname "$outfile")/.tmp.${outfile##*/}.tmp"

cat > "$tmpfile" || exit $?
if cmp -s "$tmpfile" "$outfile"; then
	rm -f "$tmpfile" || :
else
	# It's a little bit tempting to try to merge this "-e
	# $outfile" check with the one for "docker image rm".  Don't.
	# We do the CI check early, before any destructive changes
	# have been made.  We do the rm check late, so that that any
	# image IDs pointed to by tag names that haven't changed are
	# un-pinned by then, and we don't leak orphaned images.
	if [[ -n "$CI" && -e "$outfile" ]]; then
		echo "error: This should not happen in CI: ${outfile} should not change" >&2
		diff -u "$outfile" "$tmpfile" >&2
		exit 1
	fi
	set -e
	IFS=''
	{
		read -r iid
		while read -r tag; do
			docker image tag -- "$iid" "$tag"
		done
	} < "$tmpfile"
	if [[ -e "$outfile" ]]; then
		args="$(grep -vFx -f "$tmpfile" -- "$outfile")"
		if [[ -n "$args" ]]; then
			docker image rm -- $args || :
		fi
	fi
	mv -f "$tmpfile" "$outfile"
fi


text:
namespace {

// Semi-copy of similarly named struct from ata.h in WinDDK.
struct IDENTIFY_DEVICE_DATA {
  USHORT UnusedWords[217];
  USHORT NominalMediaRotationRate;
  USHORT MoreUnusedWords[38];
};
COMPILE_ASSERT(sizeof(IDENTIFY_DEVICE_DATA) == 512, IdentifyDeviceDataSize);

struct AtaRequest {
  ATA_PASS_THROUGH_EX query;
  IDENTIFY_DEVICE_DATA result;
};

}  // namespace

// static
bool DriveMetricsProvider::HasSeekPenalty(const base::FilePath& path,
                                          bool* has_seek_penalty) {
  std::vector<base::FilePath::StringType> components;
  path.GetComponents(&components);

  int flags = base::File::FLAG_OPEN;
  bool win7_or_higher = base::win::GetVersion() >= base::win::VERSION_WIN7;
  if (!win7_or_higher)
    flags |= base::File::FLAG_READ | base::File::FLAG_WRITE;

  base::File volume(base::FilePath(L"\\\\.\\" + components[0]), flags);
  if (!volume.IsValid())
    return false;

  if (win7_or_higher) {
    STORAGE_PROPERTY_QUERY query = {};
    query.QueryType = PropertyStandardQuery;
    query.PropertyId = StorageDeviceSeekPenaltyProperty;

    DEVICE_SEEK_PENALTY_DESCRIPTOR result;
    DWORD bytes_returned;
    BOOL success = DeviceIoControl(volume.GetPlatformFile(),
                                   IOCTL_STORAGE_QUERY_PROPERTY,
                                   &query, sizeof(query),
                                   &result, sizeof(result),
                                   &bytes_returned, NULL);
    if (success == FALSE || bytes_returned < sizeof(result))
      return false;

    *has_seek_penalty = result.IncursSeekPenalty != FALSE;
  } else {
    AtaRequest request = {};
    request.query.AtaFlags = ATA_FLAGS_DATA_IN;
    request.query.CurrentTaskFile[6] = ID_CMD;
    request.query.DataBufferOffset = sizeof(request.query);
    request.query.DataTransferLength = sizeof(request.result);
    request.query.Length = sizeof(request.query);
    request.query.TimeOutValue = 10;

    DWORD bytes_returned;
    BOOL success = DeviceIoControl(volume.GetPlatformFile(),
                                   IOCTL_ATA_PASS_THROUGH,
                                   &request, sizeof(request),
                                   &request, sizeof(request),
                                   &bytes_returned, NULL);
    if (success == FALSE || bytes_returned < sizeof(request) ||
        request.query.CurrentTaskFile[0]) {
      return false;
    }

    *has_seek_penalty = request.result.NominalMediaRotationRate != 1;
  }

  return true;
}


text: package "nfs-common"


text:
pub struct RegisterBlock {
    #[doc = "0x00 - Module Identification Register"]
    pub id: crate::Reg<id::ID_SPEC>,
}
#[doc = "ID register accessor: an alias for `Reg<ID_SPEC>`"]
pub type ID = crate::Reg<id::ID_SPEC>;
#[doc = "Module Identification Register"]
pub mod id;


text:
<!DOCTYPE html>

  <meta charset="UTF-8">

  <title>CodePen - Carousel w/ jQuery</title>

    <link rel="stylesheet" href="css/style.css">

    <link href='http://fonts.googleapis.com/css?family=Oswald:400,300' rel='stylesheet'>
    <link href="http://s3.amazonaws.com/codecademy-content/courses/ltp2/css/bootstrap.min.css" rel="stylesheet">
    <link href="style.css" rel="stylesheet">

          Student Profiles (demo)

Alex Paley

Former: Deloitte Consulting Strategy & Operations in NYC. Mechanical engineer by training. Show me a good barbacoa taco and I'll be your friend forever.

Mouse Over For Student Details

  Github

  LinkedIn

 Personal Site

Joey Yang

Former IT professional learns from mysterious rebels at HRHQ about the true nature of Javascript and his role in the tech industry.

Mouse Over For Student Details

  Github

  LinkedIn

 Personal Site

Stephen Portanova

Previously a high school math teacher and musician in China; interests: pandas, language, philosophy, pesto

Mouse Over For Student Details

  Github

  LinkedIn

 Personal Site

Kara Erickson

Mechanical Engineer turned Software Engineer. Deals with C++, Objective C, Java, HTML/CSS, Javascript, Python, Ruby, and ActionScript on a daily basis

Mouse Over For Student Details

  Github

  LinkedIn

 Personal Site

•

•

•

•


text:
<?xml version="1.0" encoding="utf-8" ?>
<Recipe xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xmlns:xsd="http://www.w3.org/2001/XMLSchema"
  Name="PageLayout"
  xmlns="http://schemas.microsoft.com/pag/gax-core"
  Bound="false">
  <DocumentationLinks>
    <Link Url="http://msdn.microsoft.com/en-us/library/ms543497.aspx" Caption="MSDN: Page Layouts and Master Pages" Kind="Documentation"/>
    <Link Url="http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.publishing.pagelayout.aspx" Caption="MSDN: Page Layout Class"  Kind="Documentation"/>
    <Link Url="http://www.heathersolomon.com/blog/articles/MOSS07DesignComponents.aspx" Caption="Heather Solomon: MOSS 2007 Design Component Relationships and Diagrams"  Kind="Documentation"/>
  </DocumentationLinks>
  <xi:include href="../../../TypeAlias.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
  <Caption>Page Layout</Caption>
  <Description>Adds a page layout to the current selected project.</Description>
  <HostData Priority="300">
    <Icon File="Help/Icons/icon_PageLayout.ico" />
    <CommandBar Menu="SPSFProjectPublishing"/>
    <CommandBar Menu="SPSFSolutionPublishing"/>
    <spsf:MetaData
      Visible="true"
      BindingType="CustomizationReference"
      BindingTypeTemplate="CustomizationReferenceTemplate"
      TestType="BaseSiteFeatureRecipeRunner"
      Enabled="true"
      CreateVSTemplate="true"
      FeatureScopes="Site"
      Category="Publishing" xmlns:spsf="http://spsf.codeplex.com">
      <spsf:Authors>
        <spsf:Author>Torsten Mandelkow</spsf:Author>
        <spsf:Author>Matthias Einig</spsf:Author>
      </spsf:Authors>
      <spsf:VersionHistory>
        <spsf:VersionHistoryEntry>1.1 Updated Documentation</spsf:VersionHistoryEntry>
        <spsf:VersionHistoryEntry>1.0 Initial Recipe</spsf:VersionHistoryEntry>
      </spsf:VersionHistory>
      <spsf:WebPageContent>
        <![CDATA[The recipe creates a page layout, which can be made available in a publising site for a specific content type (i.e. news).
Page layouts dictate, along with master pages, the overall look and feel of your SharePoint Publishing site.
Master pages contain controls that are shared across multiple page layouts, such as navigation, search, or language-preference for multilingual sites.
Page layouts contain field controls and Web Parts.]]>
      </spsf:WebPageContent>
      <spsf:Test>
        <spsf:TestCases>
          <spsf:TestCase Name="DefaultPageLayout" Type="SolutionTestCase">
            <spsf:TestCaseArguments>
              <spsf:TestCaseArgument Name="PageLayoutName">DefaultPageLayout</spsf:TestCaseArgument>
            </spsf:TestCaseArguments>
          </spsf:TestCase>
        </spsf:TestCases>
      </spsf:Test>
    </spsf:MetaData>
  </HostData>
  <Arguments>

    <Argument Name="AllowedScopes" Type="System.String">
      <ValueProvider Type="Evaluator" Expression="Site" />
    </Argument>

    <xi:include href="../../BaseArguments.include" parse="xml" xpointer="xmlns(p=http://schemas.microsoft.com/pag/gax-core) xpointer(/p:Arguments/*)" xmlns:xi="http://www.w3.org/2001/XInclude" />

    <xi:include href="../BaseFeatureArguments.include" parse="xml" xpointer="xmlns(p=http://schemas.microsoft.com/pag/gax-core) xpointer(/p:Arguments/*)" xmlns:xi="http://www.w3.org/2001/XInclude" />

    <Argument Name="ElementsCategory">
      <ValueProvider Type="Evaluator" Expression="PageLayouts" />
    </Argument>

    <Argument Name="ResourceKeyPrefix" Required="true">
      <!-- provides the unique key with removed special chars -->
      <ValueProvider Stage="OnBeforeActions" RecipeArgument="PageLayoutName" Type="ConvertedStringProvider" />
    </Argument>

    <Argument Name="PageLayoutContentType" Type="NameValueItem" Required="true" >
      <ValueProvider Type="DefaultNameValueItemProvider" Name="Welcome Page" Value="0x010100C568DB52D9D0A14D9B2FDCC96666E9F2007948130EC3DB064584E219954237AF390064DEA0F50FC8C147B0B6EA0636C4A7D4" />
    </Argument>
    <Argument Name="PageLayoutName" Required="true" Type="System.String" >
      <Converter Type="NamespaceStringConverter" />
      <ValueProvider Type="VisualStudioCreateItemName" MakeSafe="True" DefaultValue="PageLayout1" />
    </Argument>
    <Argument Name="PageLayoutTitle" Required="true" Type="System.String" >
      <ValueProvider Type="Evaluator" Expression="$(PageLayoutName) Title" />
    </Argument>
    <Argument Name="PageLayoutDescription" Required="true" Type="System.String" >
      <ValueProvider Type="Evaluator" Expression="$(PageLayoutName) Description" />
    </Argument>
    <Argument Name="PageLayoutFileName" Required="true" Type="System.String" >
      <ValueProvider Stage="OnBeforeActions" Type="Evaluator" Expression="$(PageLayoutName).aspx" />
    </Argument>
    <Argument Name="PageLayoutNameImage" Required="true" Type="System.String" >
      <ValueProvider Stage="OnBeforeActions" Type="Evaluator" Expression="$(PageLayoutName).png" />
    </Argument>

    <Argument Name="PageLayoutPreviewImageFolder">
      <ValueProvider Stage="OnBeforeActions" Type="Evaluator" Expression="$(SharePointVersion)\Template\Features\$(ParentFeatureName)\en-us" />
    </Argument>

    <Argument Name="PageLayoutFileFolder">
      <ValueProvider Stage="OnBeforeActions" Type="Evaluator" Expression="$(SharePointVersion)\Template\Features\$(ParentFeatureName)\PageLayouts" />
    </Argument>

  </Arguments>
  <GatheringServiceData>
    <Wizard xmlns="http://schemas.microsoft.com/pag/gax-wizards" SchemaVersion="1.0">
      <Pages>
        <Page Type="SPALM.SPSF.Library.CustomWizardPages.FeatureSelectionPage, SPALM.SPSF.Library" />
        <Page Width="600" Height="400">
          <Title>Page Layout Settings</Title>
          <Fields>
            <Field PanelType="SPALM.SPSF.Library.NameValueItemPanel, SPALM.SPSF.Library" ValueName="PageLayoutContentType" Label="Page Layout Content Type" >
              <Help>Required Content Type. Content Type of this Page Layout.</Help>
              <Editor Type="SPALM.SPSF.Library.ContentTypeEditor, SPALM.SPSF.Library" />
            </Field>
            <Field ValueName="PageLayoutName" Label="Name">
              <Help>Required Text. Name of the Page Layout class file. Limited to 255 characters. The name has to be unique within the project of this solution. It should not contain whitespaces or special characters.</Help>
            </Field>
            <Field ValueName="PageLayoutTitle" Label="Title">
              <Help>Required Text. Title (friendly name) of the Page Layout. Limited to 255 characters.</Help>
            </Field>
            <Field ValueName="PageLayoutDescription" Label="Description">
              <Help>Optional Text. Description of the Page Layout.</Help>
            </Field>
          </Fields>
        </Page>
      </Pages>
    </Wizard>
  </GatheringServiceData>
  <Actions CoordinatorServiceType="ConditionalCoordinator">

    <xi:include href="../../BaseStartingActions.include" parse="xml" xpointer="xmlns(p=http://schemas.microsoft.com/pag/gax-core) xpointer(/p:Actions/*)" xmlns:xi="http://www.w3.org/2001/XInclude" />

    <xi:include href="../BaseFeatureActions.include" parse="xml" xpointer="xmlns(p=http://schemas.microsoft.com/pag/gax-core) xpointer(/p:Actions/*)" xmlns:xi="http://www.w3.org/2001/XInclude" />

	  <!-- elements.xml-->
	  <Action
		Name="CreateElementsXml"
		Type="AddElementsDefinitionAction"
		ParentFeatureName="$(ParentFeatureName)"
		ElementsName="$(PageLayoutName)"
		ElementsCategory="$(ElementsCategory)"
		TemplateFileName="Text\PageLayout\elements.xml.t4"
		SPDataTemplate="Text\PageLayout\SharePointProjectItem.spdata.t4"
		Open="true">
		  <Output Name="CreatedElementFolder" />
		  <Output Name="CreatedElementFile" />
	  </Action>

	  <!-- add the master page file into the feature-->
	  <Action
		Name="AddPageLayoutFile"
		Type="AddTemplateToItemAction"
		DeploymentType="ElementFile"
		DeploymentPath="$(PageLayoutName)"
		TemplateFileName="Text\PageLayout\template.aspx.$(SharePointVersion).t4"
		TargetFileName="$(PageLayoutFileName)">
		  <Input Name="ParentProjectFolder" ActionOutput="CreateElementsXml.CreatedElementFolder" />
	  </Action>

	  <!-- add master page preview image -->
	  <Action
		  Name="AddListIcon"
		  Type="AddFileToItemAction"
		  DeploymentType="ElementFile"
		  DeploymentPath="$(PageLayoutName)"
		  SourceFileName="Text\PageLayout\template.png"
		  TargetFileName="$(PageLayoutName).png">
		  <Input Name="ParentProjectFolder" ActionOutput="CreateElementsXml.CreatedElementFolder" />
	  </Action>

	  <!-- Resources -->
	  <Action
		Condition="$(AutoCreateResxFiles)"
		Name="AddResources"
		Type="AddTemlateToResourcesFileAction"
		TemplateFileName="Text\PageLayout\Resources.resx.t4"
      FeatureResources="True" >
      <Input Name="FeatureName" RecipeArgument="ParentFeatureName" />
    </Action>

    <xi:include href="../../BaseFinalActions.include" parse="xml" xpointer="xmlns(p=http://schemas.microsoft.com/pag/gax-core) xpointer(/p:Actions/*)" xmlns:xi="http://www.w3.org/2001/XInclude" />

  </Actions>
</Recipe>