text:
import {
  SELECT_PRODUCT,
  SELECT_PROMOTION_SET,
  INIT_TCP_CLIENT,
  RECEIVED_SENSOR_INFORMATION,
  RECEIVED_CASH,
  RECEIVED_CASH_COMPLETELY,
  PRODUCT_DROP_SUCCESS,
  PRODUCT_DROP_PROCESS_COMPLETELY,
  RESET_PAYMENT_REDUCER,
  CLEAR_PAYMENT_AMOUNT,
  SELECT_MOBILE_TOPUP_PROVIDER,
  CONFIRM_MOBILE_TOPUP_MSISDN,
  RECEIVED_CASH_REMAINING,
  SHOW_MODAL,
  HIDE_MODAL,
  HIDE_ALL_MODAL,
  READY_TO_DROP_PRODUCT,
  NOT_READY_TO_DROP_PRODUCT,
  CLEAR_ORDER,
  DROPPING_PRODUCT,
  SELECT_MOBILE_TOPUP_VALUE,
  SUBMIT_MOBILE_TOPUP_VALUE,
  CLEAR_MOBILE_TOPUP_VALUE,
  SET_CASH_CHANGE_AMOUNT,
  CLEAR_MOBILE_TOPUP_MSISDN,
  SELECT_EVENT,
  ADD_DISCOUNT,
  SET_CAN_CHANGE_CASH,
  RECEIVED_MASTERDATA,
  EVENT_UPDATE_INPUT_VALUE,
  SET_LIMIT_BANKNOTE,
  HARDWARE_READY,
  OPEN_ALERT_MESSAGE,
  CLOSE_ALERT_MESSAGE,
  ACTIVE_MONEY_BOX,
  DEACTIVE_MONEY_BOX,
  SHOW_LOADING,
  HIDE_LOADING,
  SET_FOOTER_ADS,
  RESET_FOOTER_ADS,
  USE_DISCOUNT_INSTANTLY,
  CLEAR_INSTANTLY_DISCOUNT,
  SET_BASE_ADS,
  SET_ACTIVITY_FREE_RULE,
  SWITCH_LANGUAGE_TO,
  EVENT_UPDATE_REWARD_DISCOUNT,
  ORDER_PRODUCT_REMOVE,
  HARDWARE_START_PROCESS,
  HARDWARE_FINISH_PROCESS,
  SETTING_SET_RESET_TIME,
  SETTING_SET_AUTOPLAY_TIME,
  AUDIO_STARTED,
  AUDIO_ENDED,
  AUDIO_STOP_PLAY,
  AUDIO_START_PLAY,
  SET_APPLICATION_MODE,
  SET_MACHINE_ID,
  FETCH_DATA_COMPLETED,
  VERIFIED_SALES_MAN,
  CLEAR_VERIFY_SALES_MAN,
  RECEIVED_PAID_IN_FULL,
  CLEAR_RECEIVED_PAID_IN_FULL,
  REMEMBER_BASE_AD_PLAYING_INDEX,
  SET_DROP_PRODUCT_INTERVAL,
  GENERATE_LOG_ID,
  RESET_APPLICATION,
  SET_REQUEST_ORDER_ID,
  ADD_PLAY_RECORD,
  CLEAR_PLAY_RECORD,
  CLEAR_DROPPING_PRODUCT
} from './actionTypes';

export const receivedSensorInformation = data => ({
  type: RECEIVED_SENSOR_INFORMATION,
  data,
});

export const receivedCash = data => ({
  type: RECEIVED_CASH,
  data,
});

export const receivedCashCompletely = () => ({
  type: RECEIVED_CASH_COMPLETELY,
});

export const productDropSuccess = droppedProduct => ({
  type: PRODUCT_DROP_SUCCESS,
  product: droppedProduct,
});

export const productDropProcessCompletely = () => ({
  type: PRODUCT_DROP_PROCESS_COMPLETELY,
});

export const selectProduct = item => ({
  type: SELECT_PRODUCT,
  item,
});

export const selectPromotionSet = item => ({
  type: SELECT_PROMOTION_SET,
  item,
});

export const initTcpClient = tcpClient => ({
  type: INIT_TCP_CLIENT,
  tcpClient,
});

export const resetPaymentReducer = () => ({
  type: RESET_PAYMENT_REDUCER,
});

export const clearPaymentAmount = () => ({
  type: CLEAR_PAYMENT_AMOUNT,
});

export const selectTopupProvider = topupProvider => ({
  type: SELECT_MOBILE_TOPUP_PROVIDER,
  topupProvider,
});

export const confirmMobileTopupMSISDN = MSISDN => ({
  type: CONFIRM_MOBILE_TOPUP_MSISDN,
  MSISDN,
});

export const receivedCashRemaining = data => ({
  type: RECEIVED_CASH_REMAINING,
  data,
});

export const showModal = (modalName, data) => ({
  type: SHOW_MODAL,
  name: modalName,
  data,
});

export const hideModal = modalName => ({
  type: HIDE_MODAL,
  name: modalName,
});

export const hideAllModal = () => ({
  type: HIDE_ALL_MODAL,
});

export const readyToDropProduct = () => ({
  type: READY_TO_DROP_PRODUCT,
});

export const notReadyToDropProduct = () => ({
  type: NOT_READY_TO_DROP_PRODUCT,
});

export const clearOrder = () => ({
  type: CLEAR_ORDER,
});

export const droppingProduct = product => ({
  type: DROPPING_PRODUCT,
  product,
});

export const selectMobileTopupValue = item => ({
  type: SELECT_MOBILE_TOPUP_VALUE,
  item,
});

export const submitMobileTopupValue = item => ({
  type: SUBMIT_MOBILE_TOPUP_VALUE,
  item,
});

export const clearMobileTopupValue = () => ({
  type: CLEAR_MOBILE_TOPUP_VALUE,
});

export const setCashChangeAmount = cashChangeAmount => ({
  type: SET_CASH_CHANGE_AMOUNT,
  cashChangeAmount,
});

export const clearMobileTopupMSISDN = () => ({
  type: CLEAR_MOBILE_TOPUP_MSISDN,
});

export const selectEvent = item => ({
  type: SELECT_EVENT,
  event: item,
});

export const addDiscount = discount => ({
  type: ADD_DISCOUNT,
  discount,
});

export const setCanChangeCash = canChangeCash => ({
  type: SET_CAN_CHANGE_CASH,
  canChangeCash,
});

export const receivedMasterdata = (key, items) => ({
  type: RECEIVED_MASTERDATA,
  key,
  value: items,
});

export const updateEventInput = (key, items) => ({
  type: EVENT_UPDATE_INPUT_VALUE,
  key,
  value: items,
});

export const setLimitBanknote = banknoteValue => ({
  type: SET_LIMIT_BANKNOTE,
  banknoteValue,
});

export const hardwareReady = () => ({
  type: HARDWARE_READY,
});

export const openAlertMessage = data => ({
  type: OPEN_ALERT_MESSAGE,
  data,
});

export const closeAlertMessage = () => ({
  type: CLOSE_ALERT_MESSAGE,
});

export const activateMoneyBox = () => ({
  type: ACTIVE_MONEY_BOX,
});

export const deactivateMoneyBox = () => ({
  type: DEACTIVE_MONEY_BOX,
});

export const showLoading = message => ({
  type: SHOW_LOADING,
  message,
});

export const hideLoading = () => ({
  type: HIDE_LOADING,
});

export const setFooterAds = ads => ({
  type: SET_FOOTER_ADS,
  ads,
  footerAdType: 'product'
});

export const resetFooterAds = () => ({
  type: RESET_FOOTER_ADS,
});

export const setFlagUseDiscountInstantly = () => ({
  type: USE_DISCOUNT_INSTANTLY,
});

export const clearInstantlyDiscount = () => ({
  type: CLEAR_INSTANTLY_DISCOUNT,
});

export const setBaseAds = ads => ({
  type: SET_BASE_ADS,
  ads,
});

export const setActivityFreeRule = (rule) => ({
  type: SET_ACTIVITY_FREE_RULE,
  rule,
});

export const switchLanguageTo = lang => ({
  type: SWITCH_LANGUAGE_TO,
  lang,
});

export const updateEventReward = ({ cuid }, discount) => ({
  type: EVENT_UPDATE_REWARD_DISCOUNT,
  cuid,
  discount,
});

export const removeProductFromOrder = product => ({
  type: ORDER_PRODUCT_REMOVE,
  product,
});

export const hardwareStartProcess = key => ({
  type: HARDWARE_START_PROCESS,
  key,
});

export const hardwareFinishProcess = (processNameToFinish) => ({
  type: HARDWARE_FINISH_PROCESS,
  processNameToFinish
});

export const setResetTime = (second) => ({
  type: SETTING_SET_RESET_TIME,
  resetTime: second
});

export const autoplayTime = (second) => ({
  type: SETTING_SET_AUTOPLAY_TIME,
  autoplayTime: second
});

export const startedAudio = () => ({
  type: AUDIO_STARTED,
});

export const endedAudio = () => ({
  type: AUDIO_ENDED,
});

export const startPlayAudio = () => ({
  type: AUDIO_START_PLAY,
});

export const stopPlayAudio = () => ({
  type: AUDIO_STOP_PLAY,
});

export const setApplicationMode = (mode) => ({
  type: SET_APPLICATION_MODE,
  mode
});

export const setMachineId = (machineId) => ({
  type: SET_MACHINE_ID,
  machineId
});

export const dataFetchedCompletely = () => ({
  type: FETCH_DATA_COMPLETED
});

export const verifySalesmanPass = ({ salesman }) => ({
  type: VERIFIED_SALES_MAN,
  salesman
});

export const clearVerifySalesman = () => ({
  type: CLEAR_VERIFY_SALES_MAN
});

export const receivedPaidInFull = () => ({
  type: RECEIVED_PAID_IN_FULL
});

export const clearReceivedPaidInFull = () => ({
  type: CLEAR_RECEIVED_PAID_IN_FULL
});

export const rememberBaseAdPlayingIndex = (baseAdPlayingIndex) => ({
  type: REMEMBER_BASE_AD_PLAYING_INDEX,
  baseAdPlayingIndex
});

export const setDropProductInterval = (dropProductInterval) => ({
  type: SET_DROP_PRODUCT_INTERVAL,
  dropProductInterval,
});

export const generateLogId = () => ({
  type: GENERATE_LOG_ID
});

export const resetApplication = () => ({
  type: RESET_APPLICATION
});

export const setRequestOrderId = ({ requestOrderId }) => ({
  type: SET_REQUEST_ORDER_ID,
  requestOrderId
});

export const addPlayRecord = ({ id }) => ({
  type: ADD_PLAY_RECORD,
  id
});

export const clearPlayRecords = () => ({
  type: CLEAR_PLAY_RECORD,
});

export const clearDroppingProduct = () => ({
  type: CLEAR_DROPPING_PRODUCT,
});


text:
研究 pod lib create 是如果完成创建 cocoaPods 工程的。

## 相关工程

* [CocoaPods](https://github.com/CocoaPods/CocoaPods)
* [pod-template](https://github.com/CocoaPods/pod-template)

## CocoaPods

Example:

```shell
$ pod lib create WFT-social --template-url=/Users/Bell/Documents/Gitlab/pod-template/.git
```

`bundle install` 安装所有依赖

### lib.rb

`lib.rb`的完整路径`lib/cocoapods/command/lib.rb`。是实现`pod lib create` 的文件目录.会执行下面命令。

#### clone_template

clone `--template-url` 对应的 repo 到本地

#### configure_template

调用 `pod-template/configure`

#### print_info

打印结果

## pod-template

核心文件

```
├── configure
├── setup
│   ├── ConfigureSwift.rb
│   ├── ConfigureiOS.rb
│   ├── MessageBank.rb
│   ├── ProjectManipulator.rb
│   ├── TemplateConfigurator.rb
```

## configure

```ruby
Pod::TemplateConfigurator.new(pod_name).run
```

调用 `pod-template/setup/TemplateConfigurator.rb` 的 `run` 方法

## TemplateConfigurator

配置工程

### run 方法

run 方法定义了配置工程的所有步骤

```ruby
def run
  @message_bank.welcome_message

  framework = self.ask_with_answers("What language do you want to use?", ["ObjC", "Swift"]).to_sym
  case framework
    when :swift
      ConfigureSwift.perform(configurator: self)

    when :objc
      ConfigureIOS.perform(configurator: self)
  end

  replace_variables_in_files
  clean_template_files
  rename_template_files
  add_pods_to_podfile
  customise_prefix
  ensure_carthage_compatibility
  reinitialize_git_repo
  run_pod_install

  @message_bank.farewell_message
end
```

#### replace_variables_in_files

修改文件里的变量

#### clean_template_files

删除临时文件

#### rename_template_files

修改文件名

#### add_pods_to_podfile

修改`Podfile`

#### customise_prefix

修改 `.pch` 文件

#### ensure_carthage_compatibility

创建软链接

#### reinitialize_git_repo

重新初始化`git`

#### run_pod_install

运行 `pod install`

### ConfigureIOS

配置 objc 工程

```ruby
Pod::ProjectManipulator.new({
  :configurator => @configurator,
  :xcodeproj_path => "templates/ios/Example/PROJECT.xcodeproj",
  :platform => :ios,
  :remove_demo_project => (keep_demo == :no),
  :prefix => prefix,
  :pod_organization => organization
}).run
```

### ProjectManipulator

修改工程文件里的变量

```ruby
def run
  @string_replacements = {
    "PROJECT_OWNER" => @configurator.user_name,
    "TODAYS_DATE" => @configurator.date,
    "TODAYS_YEAR" => @configurator.year,
    "PROJECT" => @configurator.pod_name,
    "CPD" => @prefix,
    "POD_ORGANIZATION" => @pod_organization,
  }
  replace_internal_project_settings

  @project = Xcodeproj::Project.open(@xcodeproj_path)
  add_podspec_metadata
  remove_demo_project if @remove_demo_target
  @project.save

  rename_files
  rename_project_folder
end
```

### replace_internal_project_settings

修改工程文件里的变量

redpajama_set_name: RedPajamaGithub


text:
module Sidekiq
  module Middleware
    module Server
      class Logging

        def call(worker, item, queue)
          begin
            start = Time.now
            logger.info("start".freeze)
            yield
            logger.info("done: #{elapsed(start)} sec")
          rescue Exception
            logger.info("fail: #{elapsed(start)} sec")
            raise
          end
        end

        private

        def elapsed(start)
          (Time.now - start).round(3)
        end

        def logger
          Sidekiq.logger
        end
      end
    end
  end
end


text:
#ifndef TENSORFLOW_PLATFORM_TEST_H_
#define TENSORFLOW_PLATFORM_TEST_H_

#include "tensorflow/core/platform/platform.h"
#include "tensorflow/core/platform/types.h"

#if defined(PLATFORM_GOOGLE) || defined(PLATFORM_GOOGLE_ANDROID)
#include "tensorflow/core/platform/google/build_config/gunit.h"
#else
#include <gtest/gtest.h>
#endif

namespace tensorflow {
namespace testing {

// Return a temporary directory suitable for temporary testing files.
string TmpDir();

// Return a random number generator seed to use in randomized tests.
// Returns the same value for the lifetime of the process.
int RandomSeed();

}  // namespace testing
}  // namespace tensorflow

#endif  // TENSORFLOW_PLATFORM_TEST_H_


text:
package scala.collection
package mutable

import scala.reflect.ClassTag
import scala.runtime.BoxedUnit

import scala.scalajs.js

/** A builder class for arrays.
 *
 *  @since 2.8
 *
 *  @tparam T    the type of the elements for the builder.
 */
@SerialVersionUID(3L)
sealed abstract class ArrayBuilder[T]
  extends ReusableBuilder[T, Array[T]]
    with Serializable {
  protected[this] var capacity: Int = 0
  protected[this] def elems: Array[T]
  protected var size: Int = 0

  def length: Int = size

  override def knownSize: Int = size

  protected[this] final def ensureSize(size: Int): Unit = {
    if (capacity < size || capacity == 0) {
      var newsize = if (capacity == 0) 16 else capacity * 2
      while (newsize < size) newsize *= 2
      resize(newsize)
    }
  }

  override final def sizeHint(size: Int): Unit =
    if (capacity < size) resize(size)

  def clear(): Unit = size = 0

  protected[this] def resize(size: Int): Unit

  /** Add all elements of an array */
  def addAll(xs: Array[_ <: T]): this.type = addAll(xs, 0, xs.length)

  /** Add a slice of an array */
  def addAll(xs: Array[_ <: T], offset: Int, length: Int): this.type = {
    ensureSize(this.size + length)
    Array.copy(xs, offset, elems, this.size, length)
    size += length
    this
  }

  override def addAll(xs: IterableOnce[T]): this.type = {
    val k = xs.knownSize
    if(k > 0) {
      ensureSize(this.size + k)
      xs match {
        case xs: Iterable[T] => xs.copyToArray(elems, this.size)
        case _ => xs.iterator.copyToArray(elems, this.size)
      }
      size += k
    } else if(k < 0) super.addAll(xs)
    this
  }
}

/** A companion object for array builders.
 *
 *  @since 2.8
 */
object ArrayBuilder {

  /** Creates a new arraybuilder of type `T`.
   *
   *  @tparam T     type of the elements for the array builder, with a `ClassTag` context bound.
   *  @return       a new empty array builder.
   */
  @inline
  def make[T: ClassTag]: ArrayBuilder[T] =
    new ArrayBuilder.generic[T](implicitly[ClassTag[T]].runtimeClass)

  /** A generic ArrayBuilder optimized for Scala.js.
   *
   *  @tparam T              type of elements for the array builder.
   *  @param  elementClass   runtime class of the elements in the array.
   */
  @inline
  private final class generic[T](elementClass: Class[_]) extends ArrayBuilder[T] {

    private val isCharArrayBuilder = classOf[Char] == elementClass
    protected[this] def elems: Array[T] = throw new Error("unreachable")
    private var jsElems: js.Array[Any] = js.Array()

    def addOne(elem: T): this.type = {
      val unboxedElem =
        if (isCharArrayBuilder) elem.asInstanceOf[Char].toInt
        else if (elem == null) zeroOf(elementClass)
        else elem
      jsElems.push(unboxedElem)
      this
    }

    /** Add a slice of an array */
    override def addAll(xs: Array[_ <: T], offset: Int, length: Int): this.type = {
      ensureSize(this.size + length)
      addAll(xs.view.slice(offset, length))
      this
    }

    override def addAll(xs: IterableOnce[T]): this.type = {
      val it = xs.iterator
      while (it.hasNext) {
        this += it.next()
      }
      this
    }

    override def clear(): Unit =
      jsElems = js.Array()

    protected[this] def resize(size: Int): Unit = ()

    def result(): Array[T] = {
      val elemRuntimeClass =
        if (classOf[Unit] == elementClass) classOf[BoxedUnit]
        else if (classOf[Null] == elementClass || classOf[Nothing] == elementClass) classOf[Object]
        else elementClass
      genericArrayBuilderResult(elemRuntimeClass, jsElems)
    }

    override def toString(): String = "ArrayBuilder.generic"
  }

  // Intrinsic
  private def zeroOf(runtimeClass: Class[_]): Any = runtimeClass match {
    case java.lang.Byte.TYPE      => 0.toByte
    case java.lang.Short.TYPE     => 0.toShort
    case java.lang.Character.TYPE => 0 // yes, as an Int
    case java.lang.Integer.TYPE   => 0
    case java.lang.Long.TYPE      => 0L
    case java.lang.Float.TYPE     => 0.0f
    case java.lang.Double.TYPE    => 0.0
    case java.lang.Boolean.TYPE   => false
    case java.lang.Void.TYPE      => ()
    case _                        => null
  }

  // Intrinsic
  private def genericArrayBuilderResult[T](runtimeClass: Class[_],
      a: js.Array[Any]): Array[T] = {
    val len = a.length

    if (classOf[Char] == runtimeClass) {
      val result = new Array[Char](len)
      var i = 0
      while (i != len) {
        result(i) = a(i).asInstanceOf[Int].toChar
        i += 1
      }
      result.asInstanceOf[Array[T]]
    } else {
      val result: Array[T] = java.lang.reflect.Array.newInstance(
          runtimeClass, len).asInstanceOf[Array[T]]
      var i = 0
      while (i != len) {
        result(i) = a(i).asInstanceOf[T]
        i += 1
      }
      result
    }
  }

  /** A class for array builders for arrays of reference types.
   *
   *  This builder can be reused.
   *
   *  @tparam T     type of elements for the array builder, subtype of `AnyRef` with a `ClassTag` context bound.
   */
  @SerialVersionUID(3L)
  final class ofRef[T <: AnyRef](implicit ct: ClassTag[T]) extends ArrayBuilder[T] {

    protected var elems: Array[T] = _

    private def mkArray(size: Int): Array[T] = {
      if (capacity == size && capacity > 0) elems
      else if (elems eq null) new Array[T](size)
      else java.util.Arrays.copyOf[T](elems, size)
    }

    protected[this] def resize(size: Int): Unit = {
      elems = mkArray(size)
      capacity = size
    }

    def addOne(elem: T): this.type = {
      ensureSize(size + 1)
      elems(size) = elem
      size += 1
      this
    }

    def result() = {
      if (capacity != 0 && capacity == size) {
        capacity = 0
        val res = elems
        elems = null
        res
      }
      else mkArray(size)
    }

    override def clear(): Unit = {
      super.clear()
      if(elems ne null) java.util.Arrays.fill(elems.asInstanceOf[Array[AnyRef]], null)
    }

    override def equals(other: Any): Boolean = other match {
      case x: ofRef[_] => (size == x.size) && (elems == x.elems)
      case _ => false
    }

    override def toString = "ArrayBuilder.ofRef"
  }

  /** A class for array builders for arrays of `byte`s. It can be reused. */
  @SerialVersionUID(3L)
  final class ofByte extends ArrayBuilder[Byte] {

    protected var elems: Array[Byte] = _

    private def mkArray(size: Int): Array[Byte] = {
      val newelems = new Array[Byte](size)
      if (this.size > 0) Array.copy(elems, 0, newelems, 0, this.size)
      newelems
    }

    protected[this] def resize(size: Int): Unit = {
      elems = mkArray(size)
      capacity = size
    }

    def addOne(elem: Byte): this.type = {
      ensureSize(size + 1)
      elems(size) = elem
      size += 1
      this
    }

    def result() = {
      if (capacity != 0 && capacity == size) {
        capacity = 0
        val res = elems
        elems = null
        res
      }
      else mkArray(size)
    }

    override def equals(other: Any): Boolean = other match {
      case x: ofByte => (size == x.size) && (elems == x.elems)
      case _ => false
    }

    override def toString = "ArrayBuilder.ofByte"
  }

  /** A class for array builders for arrays of `short`s. It can be reused. */
  @SerialVersionUID(3L)
  final class ofShort extends ArrayBuilder[Short] {

    protected var elems: Array[Short] = _

    private def mkArray(size: Int): Array[Short] = {
      val newelems = new Array[Short](size)
      if (this.size > 0) Array.copy(elems, 0, newelems, 0, this.size)
      newelems
    }

    protected[this] def resize(size: Int): Unit = {
      elems = mkArray(size)
      capacity = size
    }

    def addOne(elem: Short): this.type = {
      ensureSize(size + 1)
      elems(size) = elem
      size += 1
      this
    }

    def result() = {
      if (capacity != 0 && capacity == size) {
        capacity = 0
        val res = elems
        elems = null
        res
      }
      else mkArray(size)
    }

    override def equals(other: Any): Boolean = other match {
      case x: ofShort => (size == x.size) && (elems == x.elems)
      case _ => false
    }

    override def toString = "ArrayBuilder.ofShort"
  }

  /** A class for array builders for arrays of `char`s. It can be reused. */
  @SerialVersionUID(3L)
  final class ofChar extends ArrayBuilder[Char] {

    protected var elems: Array[Char] = _

    private def mkArray(size: Int): Array[Char] = {
      val newelems = new Array[Char](size)
      if (this.size > 0) Array.copy(elems, 0, newelems, 0, this.size)
      newelems
    }

    protected[this] def resize(size: Int): Unit = {
      elems = mkArray(size)
      capacity = size
    }

    def addOne(elem: Char): this.type = {
      ensureSize(size + 1)
      elems(size) = elem
      size += 1
      this
    }

    def result() = {
      if (capacity != 0 && capacity == size) {
        capacity = 0
        val res = elems
        elems = null
        res
      }
      else mkArray(size)
    }

    override def equals(other: Any): Boolean = other match {
      case x: ofChar => (size == x.size) && (elems == x.elems)
      case _ => false
    }

    override def toString = "ArrayBuilder.ofChar"
  }

  /** A class for array builders for arrays of `int`s. It can be reused. */
  @SerialVersionUID(3L)
  final class ofInt extends ArrayBuilder[Int] {

    protected var elems: Array[Int] = _

    private def mkArray(size: Int): Array[Int] = {
      val newelems = new Array[Int](size)
      if (this.size > 0) Array.copy(elems, 0, newelems, 0, this.size)
      newelems
    }

    protected[this] def resize(size: Int): Unit = {
      elems = mkArray(size)
      capacity = size
    }

    def addOne(elem: Int): this.type = {
      ensureSize(size + 1)
      elems(size) = elem
      size += 1
      this
    }

    def result() = {
      if (capacity != 0 && capacity == size) {
        capacity = 0
        val res = elems
        elems = null
        res
      }
      else mkArray(size)
    }

    override def equals(other: Any): Boolean = other match {
      case x: ofInt => (size == x.size) && (elems == x.elems)
      case _ => false
    }

    override def toString = "ArrayBuilder.ofInt"
  }

  /** A class for array builders for arrays of `long`s. It can be reused. */
  @SerialVersionUID(3L)
  final class ofLong extends ArrayBuilder[Long] {

    protected var elems: Array[Long] = _

    private def mkArray(size: Int): Array[Long] = {
      val newelems = new Array[Long](size)
      if (this.size > 0) Array.copy(elems, 0, newelems, 0, this.size)
      newelems
    }

    protected[this] def resize(size: Int): Unit = {
      elems = mkArray(size)
      capacity = size
    }

    def addOne(elem: Long): this.type = {
      ensureSize(size + 1)
      elems(size) = elem
      size += 1
      this
    }

    def result() = {
      if (capacity != 0 && capacity == size) {
        capacity = 0
        val res = elems
        elems = null
        res
      }
      else mkArray(size)
    }

    override def equals(other: Any): Boolean = other match {
      case x: ofLong => (size == x.size) && (elems == x.elems)
      case _ => false
    }

    override def toString = "ArrayBuilder.ofLong"
  }

  /** A class for array builders for arrays of `float`s. It can be reused. */
  @SerialVersionUID(3L)
  final class ofFloat extends ArrayBuilder[Float] {

    protected var elems: Array[Float] = _

    private def mkArray(size: Int): Array[Float] = {
      val newelems = new Array[Float](size)
      if (this.size > 0) Array.copy(elems, 0, newelems, 0, this.size)
      newelems
    }

    protected[this] def resize(size: Int): Unit = {
      elems = mkArray(size)
      capacity = size
    }

    def addOne(elem: Float): this.type = {
      ensureSize(size + 1)
      elems(size) = elem
      size += 1
      this
    }

    def result() = {
      if (capacity != 0 && capacity == size) {
        capacity = 0
        val res = elems
        elems = null
        res
      }
      else mkArray(size)
    }

    override def equals(other: Any): Boolean = other match {
      case x: ofFloat => (size == x.size) && (elems == x.elems)
      case _ => false
    }

    override def toString = "ArrayBuilder.ofFloat"
  }

  /** A class for array builders for arrays of `double`s. It can be reused. */
  @SerialVersionUID(3L)
  final class ofDouble extends ArrayBuilder[Double] {

    protected var elems: Array[Double] = _

    private def mkArray(size: Int): Array[Double] = {
      val newelems = new Array[Double](size)
      if (this.size > 0) Array.copy(elems, 0, newelems, 0, this.size)
      newelems
    }

    protected[this] def resize(size: Int): Unit = {
      elems = mkArray(size)
      capacity = size
    }

    def addOne(elem: Double): this.type = {
      ensureSize(size + 1)
      elems(size) = elem
      size += 1
      this
    }

    def result() = {
      if (capacity != 0 && capacity == size) {
        capacity = 0
        val res = elems
        elems = null
        res
      }
      else mkArray(size)
    }

    override def equals(other: Any): Boolean = other match {
      case x: ofDouble => (size == x.size) && (elems == x.elems)
      case _ => false
    }

    override def toString = "ArrayBuilder.ofDouble"
  }

  /** A class for array builders for arrays of `boolean`s. It can be reused. */
  @SerialVersionUID(3L)
  class ofBoolean extends ArrayBuilder[Boolean] {

    protected var elems: Array[Boolean] = _

    private def mkArray(size: Int): Array[Boolean] = {
      val newelems = new Array[Boolean](size)
      if (this.size > 0) Array.copy(elems, 0, newelems, 0, this.size)
      newelems
    }

    protected[this] def resize(size: Int): Unit = {
      elems = mkArray(size)
      capacity = size
    }

    def addOne(elem: Boolean): this.type = {
      ensureSize(size + 1)
      elems(size) = elem
      size += 1
      this
    }

    def result() = {
      if (capacity != 0 && capacity == size) {
        capacity = 0
        val res = elems
        elems = null
        res
      }
      else mkArray(size)
    }

    override def equals(other: Any): Boolean = other match {
      case x: ofBoolean => (size == x.size) && (elems == x.elems)
      case _ => false
    }

    override def toString = "ArrayBuilder.ofBoolean"
  }

  /** A class for array builders for arrays of `Unit` type. It can be reused. */
  @SerialVersionUID(3L)
  final class ofUnit extends ArrayBuilder[Unit] {

    protected def elems: Array[Unit] = throw new UnsupportedOperationException()

    def addOne(elem: Unit): this.type = {
      size += 1
      this
    }

    override def addAll(xs: IterableOnce[Unit]): this.type = {
      size += xs.iterator.size
      this
    }

    override def addAll(xs: Array[_ <: Unit], offset: Int, length: Int): this.type = {
      size += length
      this
    }

    def result() = {
      val ans = new Array[Unit](size)
      var i = 0
      while (i < size) { ans(i) = (); i += 1 }
      ans
    }

    override def equals(other: Any): Boolean = other match {
      case x: ofUnit => (size == x.size)
      case _ => false
    }

    protected[this] def resize(size: Int): Unit = ()

    override def toString = "ArrayBuilder.ofUnit"
  }
}


text:
/**

*/
package com.amazonaws.blox.model;

import java.io.Serializable;
import javax.annotation.Generated;

/**
 *
 * @see AWS API Documentation
 */
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class DescribeEnvironmentRevisionResult extends com.amazonaws.opensdk.BaseResult implements Serializable, Cloneable {

    private EnvironmentRevision environmentRevision;

    /**
     * @param environmentRevision
     */

    public void setEnvironmentRevision(EnvironmentRevision environmentRevision) {
        this.environmentRevision = environmentRevision;
    }

    /**
     * @return
     */

    public EnvironmentRevision getEnvironmentRevision() {
        return this.environmentRevision;
    }

    /**
     * @param environmentRevision
     * @return Returns a reference to this object so that method calls can be chained together.
     */

    public DescribeEnvironmentRevisionResult environmentRevision(EnvironmentRevision environmentRevision) {
        setEnvironmentRevision(environmentRevision);
        return this;
    }

    /**
     * Returns a string representation of this object; useful for testing and debugging.
     *
     * @return A string representation of this object.
     *
     * @see java.lang.Object#toString()
     */
    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append("{");
        if (getEnvironmentRevision() != null)
            sb.append("EnvironmentRevision: ").append(getEnvironmentRevision());
        sb.append("}");
        return sb.toString();
    }

    @Override
    public boolean equals(Object obj) {
        if (this == obj)
            return true;
        if (obj == null)
            return false;

        if (obj instanceof DescribeEnvironmentRevisionResult == false)
            return false;
        DescribeEnvironmentRevisionResult other = (DescribeEnvironmentRevisionResult) obj;
        if (other.getEnvironmentRevision() == null ^ this.getEnvironmentRevision() == null)
            return false;
        if (other.getEnvironmentRevision() != null && other.getEnvironmentRevision().equals(this.getEnvironmentRevision()) == false)
            return false;
        return true;
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int hashCode = 1;

        hashCode = prime * hashCode + ((getEnvironmentRevision() == null) ? 0 : getEnvironmentRevision().hashCode());
        return hashCode;
    }

    @Override
    public DescribeEnvironmentRevisionResult clone() {
        try {
            return (DescribeEnvironmentRevisionResult) super.clone();
        } catch (CloneNotSupportedException e) {
            throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e);
        }
    }

}


text:
"""
PEP 0484 ( https://www.python.org/dev/peps/pep-0484/ ) describes type hints
through function annotations. There is a strong suggestion in this document
that only the type of type hinting defined in PEP0484 should be allowed
as annotations in future python versions.

The (initial / probably incomplete) implementation todo list for pep-0484:
v Function parameter annotations with builtin/custom type classes
v Function returntype annotations with builtin/custom type classes
v Function parameter annotations with strings (forward reference)
v Function return type annotations with strings (forward reference)
v Local variable type hints
v Assigned types: `Url = str\ndef get(url:Url) -> str:`
v Type hints in `with` statements
x Stub files support
x support `@no_type_check` and `@no_type_check_decorator`
x support for typing.cast() operator
x support for type hint comments for functions, `# type: (int, str) -> int`.
    See comment from Guido https://github.com/davidhalter/jedi/issues/662
"""

import os
import re

from parso import ParserSyntaxError, parse, split_lines
from parso.python import tree

from jedi._compatibility import unicode, force_unicode
from jedi.evaluate.cache import evaluator_method_cache
from jedi.evaluate import compiled
from jedi.evaluate.base_context import NO_CONTEXTS, ContextSet
from jedi.evaluate.lazy_context import LazyTreeContext
from jedi.evaluate.context import ModuleContext
from jedi.evaluate.helpers import is_string
from jedi import debug
from jedi import parser_utils

def _evaluate_for_annotation(context, annotation, index=None):
    """
    Evaluates a string-node, looking for an annotation
    If index is not None, the annotation is expected to be a tuple
    and we're interested in that index
    """
    context_set = context.eval_node(_fix_forward_reference(context, annotation))
    return context_set.execute_evaluated()

def _evaluate_annotation_string(context, string, index=None):
    node = _get_forward_reference_node(context, string)
    if node is None:
        return NO_CONTEXTS

    context_set = context.eval_node(node)
    if index is not None:
        context_set = context_set.filter(
            lambda context: context.array_type == u'tuple'
                            and len(list(context.py__iter__())) >= index
        ).py__getitem__(index)
    return context_set.execute_evaluated()

def _fix_forward_reference(context, node):
    evaled_nodes = context.eval_node(node)
    if len(evaled_nodes) != 1:
        debug.warning("Eval'ed typing index %s should lead to 1 object, "
                      " not %s" % (node, evaled_nodes))
        return node

    evaled_context = list(evaled_nodes)[0]
    if is_string(evaled_context):
        result = _get_forward_reference_node(context, evaled_context.get_safe_value())
        if result is not None:
            return result

    return node

def _get_forward_reference_node(context, string):
    try:
        new_node = context.evaluator.grammar.parse(
            force_unicode(string),
            start_symbol='eval_input',
            error_recovery=False
        )
    except ParserSyntaxError:
        debug.warning('Annotation not parsed: %s' % string)
        return None
    else:
        module = context.tree_node.get_root_node()
        parser_utils.move(new_node, module.end_pos[0])
        new_node.parent = context.tree_node
        return new_node

def _split_comment_param_declaration(decl_text):
    """
    Split decl_text on commas, but group generic expressions
    together.

    For example, given "foo, Bar[baz, biz]" we return
    ['foo', 'Bar[baz, biz]'].

    """
    try:
        node = parse(decl_text, error_recovery=False).children[0]
    except ParserSyntaxError:
        debug.warning('Comment annotation is not valid Python: %s' % decl_text)
        return []

    if node.type == 'name':
        return [node.get_code().strip()]

    params = []
    try:
        children = node.children
    except AttributeError:
        return []
    else:
        for child in children:
            if child.type in ['name', 'atom_expr', 'power']:
                params.append(child.get_code().strip())

    return params

@evaluator_method_cache()
def infer_param(execution_context, param):
    """
    Infers the type of a function parameter, using type annotations.
    """
    annotation = param.annotation
    if annotation is None:
        # If no Python 3-style annotation, look for a Python 2-style comment
        # annotation.
        # Identify parameters to function in the same sequence as they would
        # appear in a type comment.
        all_params = [child for child in param.parent.children
                      if child.type == 'param']

        node = param.parent.parent
        comment = parser_utils.get_following_comment_same_line(node)
        if comment is None:
            return NO_CONTEXTS

        match = re.match(r"^#\s*type:\s*\(([^#]*)\)\s*->", comment)
        if not match:
            return NO_CONTEXTS
        params_comments = _split_comment_param_declaration(match.group(1))

        # Find the specific param being investigated
        index = all_params.index(param)
        # If the number of parameters doesn't match length of type comment,
        # ignore first parameter (assume it's self).
        if len(params_comments) != len(all_params):
            debug.warning(
                "Comments length != Params length %s %s",
                params_comments, all_params
            )
        from jedi.evaluate.context.instance import InstanceArguments
        if isinstance(execution_context.var_args, InstanceArguments):
            if index == 0:
                # Assume it's self, which is already handled
                return NO_CONTEXTS
            index -= 1
        if index >= len(params_comments):
            return NO_CONTEXTS

        param_comment = params_comments[index]
        return _evaluate_annotation_string(
            execution_context.get_root_context(),
            param_comment
        )
    module_context = execution_context.get_root_context()
    return _evaluate_for_annotation(module_context, annotation)

def py__annotations__(funcdef):
    return_annotation = funcdef.annotation
    if return_annotation:
        dct = {'return': return_annotation}
    else:
        dct = {}
    for function_param in funcdef.get_params():
        param_annotation = function_param.annotation
        if param_annotation is not None:
            dct[function_param.name.value] = param_annotation
    return dct

@evaluator_method_cache()
def infer_return_types(function_context):
    """
    Infers the type of a function's return value,
    according to type annotations.
    """
    annotation = py__annotations__(function_context.tree_node).get("return", None)
    if annotation is None:
        # If there is no Python 3-type annotation, look for a Python 2-type annotation
        node = function_context.tree_node
        comment = parser_utils.get_following_comment_same_line(node)
        if comment is None:
            return NO_CONTEXTS

        match = re.match(r"^#\s*type:\s*\([^#]*\)\s*->\s*([^#]*)", comment)
        if not match:
            return NO_CONTEXTS

        return _evaluate_annotation_string(
            function_context.get_root_context(),
            match.group(1).strip()
        )

    module_context = function_context.get_root_context()
    return _evaluate_for_annotation(module_context, annotation)

_typing_module = None
_typing_module_code_lines = None

def _get_typing_replacement_module(grammar):
    """
    The idea is to return our jedi replacement for the PEP-0484 typing module
    as discussed at https://github.com/davidhalter/jedi/issues/663
    """
    global _typing_module, _typing_module_code_lines
    if _typing_module is None:
        typing_path = \
            os.path.abspath(os.path.join(__file__, "../jedi_typing.py"))
        with open(typing_path) as f:
            code = unicode(f.read())
        _typing_module = grammar.parse(code)
        _typing_module_code_lines = split_lines(code, keepends=True)
    return _typing_module, _typing_module_code_lines

def py__getitem__(context, typ, node):
    if not typ.get_root_context().name.string_name == "typing":
        return None
    # we assume that any class using [] in a module called
    # "typing" with a name for which we have a replacement
    # should be replaced by that class. This is not 100%
    # airtight but I don't have a better idea to check that it's
    # actually the PEP-0484 typing module and not some other
    if node.type == "subscriptlist":
        nodes = node.children[::2]  # skip the commas
    else:
        nodes = [node]
    del node

    nodes = [_fix_forward_reference(context, node) for node in nodes]
    type_name = typ.name.string_name

    # hacked in Union and Optional, since it's hard to do nicely in parsed code
    if type_name in ("Union", '_Union'):
        # In Python 3.6 it's still called typing.Union but it's an instance
        # called _Union.
        return ContextSet.from_sets(context.eval_node(node) for node in nodes)
    if type_name in ("Optional", '_Optional'):
        # Here we have the same issue like in Union. Therefore we also need to
        # check for the instance typing._Optional (Python 3.6).
        return context.eval_node(nodes[0])

    module_node, code_lines = _get_typing_replacement_module(context.evaluator.latest_grammar)
    typing = ModuleContext(
        context.evaluator,
        module_node=module_node,
        path=None,
        code_lines=code_lines,
    )
    factories = typing.py__getattribute__("factory")
    assert len(factories) == 1
    factory = list(factories)[0]
    assert factory
    function_body_nodes = factory.tree_node.children[4].children
    valid_classnames = set(child.name.value
                           for child in function_body_nodes
                           if isinstance(child, tree.Class))
    if type_name not in valid_classnames:
        return None
    compiled_classname = compiled.create_simple_object(context.evaluator, type_name)

    from jedi.evaluate.context.iterable import FakeSequence
    args = FakeSequence(
        context.evaluator,
        u'tuple',
        [LazyTreeContext(context, n) for n in nodes]
    )

    result = factory.execute_evaluated(compiled_classname, args)
    return result

def find_type_from_comment_hint_for(context, node, name):
    return _find_type_from_comment_hint(context, node, node.children[1], name)

def find_type_from_comment_hint_with(context, node, name):
    assert len(node.children[1].children) == 3, \
        "Can only be here when children[1] is 'foo() as f'"
    varlist = node.children[1].children[2]
    return _find_type_from_comment_hint(context, node, varlist, name)

def find_type_from_comment_hint_assign(context, node, name):
    return _find_type_from_comment_hint(context, node, node.children[0], name)

def _find_type_from_comment_hint(context, node, varlist, name):
    index = None
    if varlist.type in ("testlist_star_expr", "exprlist", "testlist"):
        # something like "a, b = 1, 2"
        index = 0
        for child in varlist.children:
            if child == name:
                break
            if child.type == "operator":
                continue
            index += 1
        else:
            return []

    comment = parser_utils.get_following_comment_same_line(node)
    if comment is None:
        return []
    match = re.match(r"^#\s*type:\s*([^#]*)", comment)
    if match is None:
        return []
    return _evaluate_annotation_string(context, match.group(1).strip(), index)


text:
{-# LANGUAGE OverloadedStrings #-}
module Hakyll.Core.Routes.Tests
    ( tests
    ) where

--------------------------------------------------------------------------------
import           Test.Framework         (Test, testGroup)
import           Test.HUnit             (Assertion, (@=?))

--------------------------------------------------------------------------------
import           Hakyll.Core.Identifier
import           Hakyll.Core.Routes
import           TestSuite.Util

--------------------------------------------------------------------------------
tests :: Test
tests = testGroup "Hakyll.Core.Routes.Tests" $ fromAssertions "runRoutes"
    [ testRoutes "foo.html" (setExtension "html") "foo"
    , testRoutes "foo.html" (setExtension ".html") "foo"
    , testRoutes "foo.html" (setExtension "html") "foo.markdown"
    , testRoutes "foo.html" (setExtension ".html") "foo.markdown"

    , testRoutes "neve ro ddo reven"
        (customRoute (reverse . toFilePath  )) "never odd or even"

    , testRoutes "foo" (constRoute "foo") "bar"

    , testRoutes "tags/bar.xml" (gsubRoute "rss/" (const "")) "tags/rss/bar.xml"
    , testRoutes "tags/bar.xml"
        (gsubRoute "rss/" (const "") `composeRoutes` setExtension "xml")
        "tags/rss/bar"
    ]

--------------------------------------------------------------------------------
testRoutes :: FilePath -> Routes -> Identifier -> Assertion
testRoutes expected r id' = do
    (route, _) <- runRoutes r
        (error "Hakyll.Core.Routes.Tests: no provider") id'
    Just expected @=? route


text:
package com.example.becomebeacon.beaconlocker;

import android.app.Activity;
import android.content.Context;
import android.content.Intent;
import android.graphics.Bitmap;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.Button;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.TextView;

import com.beaconpop.pyeongchang.R;
import com.google.firebase.auth.FirebaseUser;
import com.google.firebase.database.DatabaseReference;
import com.google.firebase.database.FirebaseDatabase;
import com.google.firebase.storage.FirebaseStorage;

import java.util.ArrayList;
import java.util.HashMap;

/**
 * Created by 함상혁입니다 on 2017-04-27.
 */

public class MyBeaconsListAdapter extends BaseAdapter {
    private Context mContext;
    LayoutInflater mInflater;
    int mLayout;
    private boolean isScanning = false;
    private ArrayList<BleDeviceInfo> mBleDeviceInfoArrayList;
    private Bitmap mBitmap;
    public FirebaseDatabase mDatabase = FirebaseDatabase.getInstance();
    private DatabaseReference mUserAddressRef;
    private FirebaseUser mUser;
    private ImageView mImage;
    Bitmap bitmapImage;
    // 검색된 BLE 장치가 중복 추가되는 부분을 방지하기 위해 HashMap을 사용
    // String: Device Address(key값)
    private HashMap<String, BleDeviceInfo> mHashBleMap = new HashMap<String, BleDeviceInfo>();

    public MyBeaconsListAdapter(Context context, int layout, ArrayList<BleDeviceInfo> arBleList,
                                HashMap<String, BleDeviceInfo> hashBleMap)
    {
        mContext = context;
        mInflater = (LayoutInflater)context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);

        mBleDeviceInfoArrayList = arBleList;
        mLayout = layout;
        mHashBleMap = hashBleMap;
    }

    public synchronized void addOrUpdateItem(BleDeviceInfo info)
    {
        if(mHashBleMap.containsKey(info.getDevAddress()))
        {
            mHashBleMap.get(info.getDevAddress()).setRssi(info.getRssi());
        }
        else
        {
            mBleDeviceInfoArrayList.add(info);
            mHashBleMap.put(info.getDevAddress(), info);
        }

        notifyDataSetChanged();
    }

    @Override
    public long getItemId(int position) {
        return position;
    }

    @Override
    public int getCount() {
        return mBleDeviceInfoArrayList.size();
    }

    @Override
    public Object getItem(int position) {
        return mBleDeviceInfoArrayList.get(position);
    }

    public void addBleDeviceItem(BleDeviceInfo item)
    {
        if(!mBleDeviceInfoArrayList.contains(item))
            mBleDeviceInfoArrayList.add(item);
    }

    @Override
    public View getView(int position, View convertView, ViewGroup parent) {
        final int pos = position;
        FirebaseStorage storage = FirebaseStorage.getInstance();

        if(convertView == null)
        {
            convertView = mInflater.inflate(mLayout, parent, false);
        }

        //TextView txtUuid = (TextView)convertView.findViewById(R.id.text_uuid);
        //txtUuid.setText("UUID: " + mBleDeviceInfoArrayList.get(position).proximityUuid);
        if(PictureList.pictures.containsKey(mBleDeviceInfoArrayList.get(position).devAddress)) {
            ImageView image = (ImageView) convertView.findViewById(R.id.device_image);
            image.setImageBitmap(PictureList.pictures.get(mBleDeviceInfoArrayList.get(position).devAddress));

        }
        else
        {
            ImageView image = (ImageView) convertView.findViewById(R.id.device_image);
            image.setImageBitmap(PictureList.pictures.get(R.mipmap.ic_launcher_round));

        }

        TextView txtBdName = (TextView)convertView.findViewById(R.id.text_bd_name);
        txtBdName.setText(mBleDeviceInfoArrayList.get(position).nickname);

        TextView txtBdAddress = (TextView)convertView.findViewById(R.id.text_bd_address);
        //txtBdAddress.setText("MAC ID: " + mBleDeviceInfoArrayList.get(position).devAddress);
        txtBdAddress.setVisibility(View.GONE);

        /*TextView txtMajor = (TextView)convertView.findViewById(R.id.text_major);
        txtMajor.setText("Major: " + String.valueOf(mBleDeviceInfoArrayList.get(position).major));

        TextView txtMinor = (TextView)convertView.findViewById(R.id.text_minor);
        txtMinor.setText("Minor: " + String.valueOf(mBleDeviceInfoArrayList.get(position).minor));

        TextView txtRssi = (TextView)convertView.findViewById(R.id.text_rssi);
        txtRssi.setText("RSSI: " + String.valueOf(mBleDeviceInfoArrayList.get(position).rssi) + " dbm");

        TextView txtTxPower = (TextView)convertView.findViewById(R.id.text_txpower);
        //txtTxPower.setText("Tx Power: " + String.valueOf(mBleDeviceInfoArrayList.get(position).measuredPower) + " dbm");
        txtTxPower.setText("Tx Power: " + String.valueOf(mBleDeviceInfoArrayList.get(position).txPower) + " dbm");      // changsu
        */
        TextView txtDistance = (TextView)convertView.findViewById(R.id.text_distance);
        txtDistance.setText("떨어진 거리: "// + String.valueOf(mBleDeviceInfoArrayList.get(position).distance) + " m ("
                + String.format("%.2f", mBleDeviceInfoArrayList.get(position).distance2) + "m");

        //TextView txtTimeout = (TextView)convertView.findViewById(R.id.text_timeout);
        //txtTimeout.setText("Timeout: " + String.valueOf(mBleDeviceInfoArrayList.get(position).timeout));

        //편집중
        Button btnConnect = (Button)convertView.findViewById(R.id.button_connect);
        btnConnect.setVisibility(View.GONE);
        LinearLayout layoutConnect = (LinearLayout)convertView.findViewById(R.id.linearLayout);
        layoutConnect.setOnClickListener(new Button.OnClickListener() {
            public void onClick(View v)
            {

                Activity mActi=GetMainActivity.getMainActity();
                Intent intent = new Intent(mActi, BeaconDetailsActivity.class);
                intent.putExtra("MAC",mBleDeviceInfoArrayList.get(pos).devAddress);
                mActi.startActivity(intent);

            }
        });
//
//
        return convertView;
    }

}


text:
using Hydra.HydraCommon.Editor.Utils;
using UnityEditor;
using UnityEngine;

namespace Hydra.HydraCommon.Editor.Drawers.InputDrawers
{
	/// <summary>
	/// 	Abstract axes input drawer.
	/// </summary>
	public abstract class AbstractAxesInputDrawer : AbstractInputDrawer
	{
		private SerializedProperty m_InputProperty;

		#region Override Methods

		/// <summary>
		/// 	Finds the properties.
		/// </summary>
		/// <param name="prop">Property.</param>
		protected override void FindProperties(SerializedProperty prop)
		{
			base.FindProperties(prop);

			m_InputProperty = prop.FindPropertyRelative("m_Input");
		}

		/// <summary>
		/// 	Draws the content.
		/// </summary>
		/// <param name="position">Position.</param>
		protected override void DrawContent(Rect position)
		{
			HydraEditorUtils.DrawUnindented(
										    () =>
											HydraEditorUtils.AxisInputField(position, GUIContent.none, m_InputProperty, HydraEditorGUIStyles.enumStyle));
		}

		#endregion
	}
}


text:
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace angular.Models
{
    public class Test
    {
        public int TestId { get; set; }

        [Required, MaxLength(20)]
        public string Title { get; set; }

        [ForeignKey("Queue")]
        public int QueueId { get; set; }
        public virtual Queue Queue { get; set; }

        public virtual List<Step> Steps { get; set; }
    }
}


text:
<?php

/* AirBlogBundle:Pages:kontakt.html.twig */
class __TwigTemplate_ad4952267d11ff2e1371ce45b60c708433bd76c267bf7fefbcf60d630af4da0c extends Twig_Template
{
    public function __construct(Twig_Environment $env)
    {
        parent::__construct($env);

        // line 1
        try {
            $this->parent = $this->env->loadTemplate("AirBlogBundle::base.html.twig");
        } catch (Twig_Error_Loader $e) {
            $e->setTemplateFile($this->getTemplateName());
            $e->setTemplateLine(1);

            throw $e;
        }

        $this->blocks = array(
            'contentTitle' => array($this, 'block_contentTitle'),
            'content' => array($this, 'block_content'),
        );
    }

    protected function doGetParent(array $context)
    {
        return "AirBlogBundle::base.html.twig";
    }

    protected function doDisplay(array $context, array $blocks = array())
    {
        $this->parent->display($context, array_merge($this->blocks, $blocks));
    }

    // line 4
    public function block_contentTitle($context, array $blocks = array())
    {
        echo "Kontakt";
    }

    // line 6
    public function block_content($context, array $blocks = array())
    {
        // line 7
        echo "\t

\t\t
Kontakt niga

\t\t
Tu jest kontak

\t

";
    }

    public function getTemplateName()
    {
        return "AirBlogBundle:Pages:kontakt.html.twig";
    }

    public function isTraitable()
    {
        return false;
    }

    public function getDebugInfo()
    {
        return array (  46 => 7,  43 => 6,  37 => 4,  11 => 1,);
    }
}


text:
package uk.co.real_logic.sbe.generation.rust;

import uk.co.real_logic.sbe.ir.Ir;
import uk.co.real_logic.sbe.ir.Token;
import uk.co.real_logic.sbe.generation.rust.RustGenerator.CodecType;

import java.io.IOException;
import java.io.Writer;
import java.util.ArrayList;
import java.util.List;

import static uk.co.real_logic.sbe.generation.rust.RustGenerator.CodecType.Encoder;
import static uk.co.real_logic.sbe.generation.rust.RustGenerator.CodecType.Decoder;
import static uk.co.real_logic.sbe.generation.rust.RustGenerator.withLifetime;
import static uk.co.real_logic.sbe.generation.rust.RustUtil.*;

class MessageCoderDef implements RustGenerator.ParentDef
{
    private final StringBuilder sb = new StringBuilder();
    private final ArrayList<SubGroup> subGroups = new ArrayList<>();

    private final Ir ir;
    private final Token msgToken;
    final String name;
    final CodecType codecType;

    MessageCoderDef(final Ir ir, final Token msgToken, final CodecType codecType)
    {
        this.ir = ir;
        this.msgToken = msgToken;
        this.name = formatStructName(msgToken.name());
        this.codecType = codecType;
    }

    String blockLengthType()
    {
        return rustTypeName(ir.headerStructure().blockLengthType());
    }

    String schemaVersionType()
    {
        return rustTypeName(ir.headerStructure().schemaVersionType());
    }

    void generate(
        final List<Token> fields,
        final List<Token> groups,
        final List<Token> varData) throws IOException
    {
        indent(sb, 0, "pub mod %s {\n", codecType.toString().toLowerCase());
        indent(sb, 1, "use super::*;\n\n");

        // i.e. <name>Decoder or <name>Encoder
        final String msgTypeName = formatStructName(msgToken.name()) + codecType.name();
        appendMessageStruct(sb, msgTypeName);

        if (codecType == Encoder)
        {
            RustGenerator.appendImplEncoderTrait(sb, msgTypeName);
        }
        else
        {
            RustGenerator.appendImplDecoderTrait(sb, msgTypeName);
        }

        RustGenerator.appendImplWithLifetimeHeader(sb, msgTypeName); // impl start
        appendWrapFn(sb);

        indent(sb, 2, "#[inline]\n");
        indent(sb, 2, "pub fn encoded_length(&self) -> usize {\n");
        indent(sb, 3, "self.limit - self.offset\n");
        indent(sb, 2, "}\n\n");

        if (codecType == Decoder)
        {
            appendMessageHeaderDecoderFn(sb);

            RustGenerator.generateDecoderFields(sb, fields, 2);
            RustGenerator.generateDecoderGroups(sb, groups, 2, this);
            RustGenerator.generateDecoderVarData(sb, varData, 2, false);
        }
        else
        {
            appendMessageHeaderEncoderFn(sb);

            RustGenerator.generateEncoderFields(sb, fields, 2);
            RustGenerator.generateEncoderGroups(sb, groups, 2, this);
            RustGenerator.generateEncoderVarData(sb, varData, 2);
        }

        indent(sb, 1, "}\n\n"); // impl end

        // append all subGroup generated code
        for (final SubGroup subGroup : subGroups)
        {
            subGroup.appendTo(sb);
        }

        indent(sb, 0, "} // end %s\n\n", codecType.toString().toLowerCase()); // mod end
    }

    void appendTo(final Appendable dest) throws IOException
    {
        dest.append(sb);
    }

    public SubGroup addSubGroup(final String name, final int level, final Token groupToken)
    {
        final SubGroup subGroup = new SubGroup(name, level, groupToken);
        subGroups.add(subGroup);
        return subGroup;
    }

    void appendMessageHeaderEncoderFn(final Appendable out) throws IOException
    {
        indent(out, 2, "pub fn header(self, offset: usize) -> MessageHeaderEncoder<Self> {\n");
        indent(out, 3, "let mut header = MessageHeaderEncoder::default().wrap(self, offset);\n");
        indent(out, 3, "header.block_length(SBE_BLOCK_LENGTH);\n");
        indent(out, 3, "header.template_id(SBE_TEMPLATE_ID);\n");
        indent(out, 3, "header.schema_id(SBE_SCHEMA_ID);\n");
        indent(out, 3, "header.version(SBE_SCHEMA_VERSION);\n");
        indent(out, 3, "header\n");
        indent(out, 2, "}\n\n");
    }

    void appendMessageHeaderDecoderFn(final Appendable out) throws IOException
    {
        indent(out, 2, "pub fn header(self, mut header: MessageHeaderDecoder<ReadBuf<'a>>) -> Self {\n");
        indent(out, 3, "debug_assert_eq!(SBE_TEMPLATE_ID, header.template_id());\n");
        indent(out, 3, "let acting_block_length = header.block_length();\n");
        indent(out, 3, "let acting_version = header.version();\n\n");
        indent(out, 3, "self.wrap(\n");
        indent(out, 4, "header.parent().unwrap(),\n");
        indent(out, 4, "message_header_codec::ENCODED_LENGTH,\n");
        indent(out, 4, "acting_block_length,\n");
        indent(out, 4, "acting_version,\n");
        indent(out, 3, ")\n");
        indent(out, 2, "}\n\n");
    }

    void appendMessageStruct(final Appendable out, final String structName) throws IOException
    {
        indent(out, 1, "#[derive(Debug, Default)]\n");
        indent(out, 1, "pub struct %s {\n", withLifetime(structName));
        indent(out, 2, "buf: %s,\n", withLifetime(this.codecType.bufType()));
        indent(out, 2, "initial_offset: usize,\n");
        indent(out, 2, "offset: usize,\n");
        indent(out, 2, "limit: usize,\n");
        if (this.codecType == Decoder)
        {
            indent(out, 2, "pub acting_block_length: %s,\n", blockLengthType());
            indent(out, 2, "pub acting_version: %s,\n", schemaVersionType());
        }
        indent(out, 1, "}\n\n");
    }

    void appendWrapFn(final Appendable out) throws IOException
    {
        if (this.codecType == Decoder)
        {
            indent(out, 2, "pub fn wrap(\n");
            indent(out, 3, "mut self,\n");
            indent(out, 3, "buf: %s,\n", withLifetime(this.codecType.bufType()));
            indent(out, 3, "offset: usize,\n");
            indent(out, 3, "acting_block_length: %s,\n", blockLengthType());
            indent(out, 3, "acting_version: %s,\n", schemaVersionType());
            indent(out, 2, ") -> Self {\n");
            indent(out, 3, "let limit = offset + acting_block_length as usize;\n");
        }
        else
        {
            indent(out, 2, "pub fn wrap(mut self, buf: %s, offset: usize) -> Self {\n",
                withLifetime(this.codecType.bufType()));
            indent(out, 3, "let limit = offset + SBE_BLOCK_LENGTH as usize;\n");
        }

        indent(out, 3, "self.buf = buf;\n");
        indent(out, 3, "self.initial_offset = offset;\n");
        indent(out, 3, "self.offset = offset;\n");
        indent(out, 3, "self.limit = limit;\n");
        if (this.codecType == Decoder)
        {
            indent(out, 3, "self.acting_block_length = acting_block_length;\n");
            indent(out, 3, "self.acting_version = acting_version;\n");
        }
        indent(out, 3, "self\n");
        indent(out, 2, "}\n\n");
    }

    static void generateEncoder(
        final Ir ir,
        final Writer out,
        final Token msgToken,
        final List<Token> fields,
        final List<Token> groups,
        final List<Token> varData) throws IOException
    {
        final MessageCoderDef coderDef = new MessageCoderDef(ir, msgToken, Encoder);
        coderDef.generate(fields, groups, varData);
        coderDef.appendTo(out);
    }

    static void generateDecoder(
        final Ir ir,
        final Writer out,
        final Token msgToken,
        final List<Token> fields,
        final List<Token> groups,
        final List<Token> varData) throws IOException
    {
        final MessageCoderDef coderDef = new MessageCoderDef(ir, msgToken, Decoder);
        coderDef.generate(fields, groups, varData);
        coderDef.appendTo(out);
    }
}


text:
import * as angular from 'angular';
import { provide } from 'ng-metadata/core';

import { TitleHandlerComponent } from './title-handler.component';

export const TitleHandlerModule = angular
  .module( 'titleHandler', [] )
  .directive( ...provide( TitleHandlerComponent ) )
  .name;


text:
/* A Bison parser, made by GNU Bison 2.7.  */

/* Bison interface for Yacc-like parsers in C

      Copyright (C) 1984, 1989-1990, 2000-2012 Free Software Foundation, Inc.

   This program is free software: you can redistribute it and/or modify
   it under the terms of the GNU General Public License as published by
   the Free Software Foundation, either version 3 of the License, or
   (at your option) any later version.

   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   GNU General Public License for more details.

   You should have received a copy of the GNU General Public License
   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */

/* As a special exception, you may create a larger work that contains
   part or all of the Bison parser skeleton and distribute that work
   under terms of your choice, so long as that work isn't itself a
   parser generator using the skeleton or a modified version thereof
   as a parser skeleton.  Alternatively, if you modify or redistribute
   the parser skeleton itself, you may (at your option) remove this
   special exception, which will cause the skeleton and the resulting
   Bison output files to be licensed under the GNU General Public
   License without this special exception.

   This special exception was added by the Free Software Foundation in
   version 2.2 of Bison.  */

#ifndef YY_ZEND_ZEND_ZEND_LANGUAGE_PARSER_H_INCLUDED
# define YY_ZEND_ZEND_ZEND_LANGUAGE_PARSER_H_INCLUDED
/* Enabling traces.  */
#ifndef YYDEBUG
# define YYDEBUG 0
#endif
#if YYDEBUG
extern int zenddebug;
#endif
/* "%code requires" blocks.  */

#ifdef ZTS
# define YYPARSE_PARAM tsrm_ls
# define YYLEX_PARAM tsrm_ls
#endif

/* Tokens.  */
#ifndef YYTOKENTYPE
# define YYTOKENTYPE
   /* Put the tokens into the symbol table, so that GDB and other debuggers
      know about them.  */
   enum yytokentype {
     END = 0,
     T_REQUIRE_ONCE = 258,
     T_REQUIRE = 259,
     T_EVAL = 260,
     T_INCLUDE_ONCE = 261,
     T_INCLUDE = 262,
     T_LOGICAL_OR = 263,
     T_LOGICAL_XOR = 264,
     T_LOGICAL_AND = 265,
     T_PRINT = 266,
     T_SR_EQUAL = 267,
     T_SL_EQUAL = 268,
     T_XOR_EQUAL = 269,
     T_OR_EQUAL = 270,
     T_AND_EQUAL = 271,
     T_MOD_EQUAL = 272,
     T_CONCAT_EQUAL = 273,
     T_DIV_EQUAL = 274,
     T_MUL_EQUAL = 275,
     T_MINUS_EQUAL = 276,
     T_PLUS_EQUAL = 277,
     T_BOOLEAN_OR = 278,
     T_BOOLEAN_AND = 279,
     T_IS_NOT_IDENTICAL = 280,
     T_IS_IDENTICAL = 281,
     T_IS_NOT_EQUAL = 282,
     T_IS_EQUAL = 283,
     T_IS_GREATER_OR_EQUAL = 284,
     T_IS_SMALLER_OR_EQUAL = 285,
     T_SR = 286,
     T_SL = 287,
     T_INSTANCEOF = 288,
     T_UNSET_CAST = 289,
     T_BOOL_CAST = 290,
     T_OBJECT_CAST = 291,
     T_ARRAY_CAST = 292,
     T_STRING_CAST = 293,
     T_DOUBLE_CAST = 294,
     T_INT_CAST = 295,
     T_DEC = 296,
     T_INC = 297,
     T_CLONE = 298,
     T_NEW = 299,
     T_EXIT = 300,
     T_IF = 301,
     T_ELSEIF = 302,
     T_ELSE = 303,
     T_ENDIF = 304,
     T_LNUMBER = 305,
     T_DNUMBER = 306,
     T_STRING = 307,
     T_STRING_VARNAME = 308,
     T_VARIABLE = 309,
     T_NUM_STRING = 310,
     T_INLINE_HTML = 311,
     T_CHARACTER = 312,
     T_BAD_CHARACTER = 313,
     T_ENCAPSED_AND_WHITESPACE = 314,
     T_CONSTANT_ENCAPSED_STRING = 315,
     T_ECHO = 316,
     T_DO = 317,
     T_WHILE = 318,
     T_ENDWHILE = 319,
     T_FOR = 320,
     T_ENDFOR = 321,
     T_FOREACH = 322,
     T_ENDFOREACH = 323,
     T_DECLARE = 324,
     T_ENDDECLARE = 325,
     T_AS = 326,
     T_SWITCH = 327,
     T_ENDSWITCH = 328,
     T_CASE = 329,
     T_DEFAULT = 330,
     T_BREAK = 331,
     T_CONTINUE = 332,
     T_GOTO = 333,
     T_FUNCTION = 334,
     T_CONST = 335,
     T_RETURN = 336,
     T_TRY = 337,
     T_CATCH = 338,
     T_THROW = 339,
     T_USE = 340,
     T_INSTEADOF = 341,
     T_GLOBAL = 342,
     T_PUBLIC = 343,
     T_PROTECTED = 344,
     T_PRIVATE = 345,
     T_FINAL = 346,
     T_ABSTRACT = 347,
     T_STATIC = 348,
     T_VAR = 349,
     T_UNSET = 350,
     T_ISSET = 351,
     T_EMPTY = 352,
     T_HALT_COMPILER = 353,
     T_CLASS = 354,
     T_TRAIT = 355,
     T_INTERFACE = 356,
     T_EXTENDS = 357,
     T_IMPLEMENTS = 358,
     T_OBJECT_OPERATOR = 359,
     T_DOUBLE_ARROW = 360,
     T_LIST = 361,
     T_ARRAY = 362,
     T_CALLABLE = 363,
     T_CLASS_C = 364,
     T_TRAIT_C = 365,
     T_METHOD_C = 366,
     T_FUNC_C = 367,
     T_LINE = 368,
     T_FILE = 369,
     T_COMMENT = 370,
     T_DOC_COMMENT = 371,
     T_OPEN_TAG = 372,
     T_OPEN_TAG_WITH_ECHO = 373,
     T_CLOSE_TAG = 374,
     T_WHITESPACE = 375,
     T_START_HEREDOC = 376,
     T_END_HEREDOC = 377,
     T_DOLLAR_OPEN_CURLY_BRACES = 378,
     T_CURLY_OPEN = 379,
     T_PAAMAYIM_NEKUDOTAYIM = 380,
     T_NAMESPACE = 381,
     T_NS_C = 382,
     T_DIR = 383,
     T_NS_SEPARATOR = 384
   };
#endif
/* Tokens.  */
#define END 0
#define T_REQUIRE_ONCE 258
#define T_REQUIRE 259
#define T_EVAL 260
#define T_INCLUDE_ONCE 261
#define T_INCLUDE 262
#define T_LOGICAL_OR 263
#define T_LOGICAL_XOR 264
#define T_LOGICAL_AND 265
#define T_PRINT 266
#define T_SR_EQUAL 267
#define T_SL_EQUAL 268
#define T_XOR_EQUAL 269
#define T_OR_EQUAL 270
#define T_AND_EQUAL 271
#define T_MOD_EQUAL 272
#define T_CONCAT_EQUAL 273
#define T_DIV_EQUAL 274
#define T_MUL_EQUAL 275
#define T_MINUS_EQUAL 276
#define T_PLUS_EQUAL 277
#define T_BOOLEAN_OR 278
#define T_BOOLEAN_AND 279
#define T_IS_NOT_IDENTICAL 280
#define T_IS_IDENTICAL 281
#define T_IS_NOT_EQUAL 282
#define T_IS_EQUAL 283
#define T_IS_GREATER_OR_EQUAL 284
#define T_IS_SMALLER_OR_EQUAL 285
#define T_SR 286
#define T_SL 287
#define T_INSTANCEOF 288
#define T_UNSET_CAST 289
#define T_BOOL_CAST 290
#define T_OBJECT_CAST 291
#define T_ARRAY_CAST 292
#define T_STRING_CAST 293
#define T_DOUBLE_CAST 294
#define T_INT_CAST 295
#define T_DEC 296
#define T_INC 297
#define T_CLONE 298
#define T_NEW 299
#define T_EXIT 300
#define T_IF 301
#define T_ELSEIF 302
#define T_ELSE 303
#define T_ENDIF 304
#define T_LNUMBER 305
#define T_DNUMBER 306
#define T_STRING 307
#define T_STRING_VARNAME 308
#define T_VARIABLE 309
#define T_NUM_STRING 310
#define T_INLINE_HTML 311
#define T_CHARACTER 312
#define T_BAD_CHARACTER 313
#define T_ENCAPSED_AND_WHITESPACE 314
#define T_CONSTANT_ENCAPSED_STRING 315
#define T_ECHO 316
#define T_DO 317
#define T_WHILE 318
#define T_ENDWHILE 319
#define T_FOR 320
#define T_ENDFOR 321
#define T_FOREACH 322
#define T_ENDFOREACH 323
#define T_DECLARE 324
#define T_ENDDECLARE 325
#define T_AS 326
#define T_SWITCH 327
#define T_ENDSWITCH 328
#define T_CASE 329
#define T_DEFAULT 330
#define T_BREAK 331
#define T_CONTINUE 332
#define T_GOTO 333
#define T_FUNCTION 334
#define T_CONST 335
#define T_RETURN 336
#define T_TRY 337
#define T_CATCH 338
#define T_THROW 339
#define T_USE 340
#define T_INSTEADOF 341
#define T_GLOBAL 342
#define T_PUBLIC 343
#define T_PROTECTED 344
#define T_PRIVATE 345
#define T_FINAL 346
#define T_ABSTRACT 347
#define T_STATIC 348
#define T_VAR 349
#define T_UNSET 350
#define T_ISSET 351
#define T_EMPTY 352
#define T_HALT_COMPILER 353
#define T_CLASS 354
#define T_TRAIT 355
#define T_INTERFACE 356
#define T_EXTENDS 357
#define T_IMPLEMENTS 358
#define T_OBJECT_OPERATOR 359
#define T_DOUBLE_ARROW 360
#define T_LIST 361
#define T_ARRAY 362
#define T_CALLABLE 363
#define T_CLASS_C 364
#define T_TRAIT_C 365
#define T_METHOD_C 366
#define T_FUNC_C 367
#define T_LINE 368
#define T_FILE 369
#define T_COMMENT 370
#define T_DOC_COMMENT 371
#define T_OPEN_TAG 372
#define T_OPEN_TAG_WITH_ECHO 373
#define T_CLOSE_TAG 374
#define T_WHITESPACE 375
#define T_START_HEREDOC 376
#define T_END_HEREDOC 377
#define T_DOLLAR_OPEN_CURLY_BRACES 378
#define T_CURLY_OPEN 379
#define T_PAAMAYIM_NEKUDOTAYIM 380
#define T_NAMESPACE 381
#define T_NS_C 382
#define T_DIR 383
#define T_NS_SEPARATOR 384

#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
typedef int YYSTYPE;
# define YYSTYPE_IS_TRIVIAL 1
# define yystype YYSTYPE /* obsolescent; will be withdrawn */
# define YYSTYPE_IS_DECLARED 1
#endif

#ifdef YYPARSE_PARAM
#if defined __STDC__ || defined __cplusplus
int zendparse (void *YYPARSE_PARAM);
#else
int zendparse ();
#endif
#else /* ! YYPARSE_PARAM */
#if defined __STDC__ || defined __cplusplus
int zendparse (void);
#else
int zendparse ();
#endif
#endif /* ! YYPARSE_PARAM */

#endif /* !YY_ZEND_ZEND_ZEND_LANGUAGE_PARSER_H_INCLUDED  */


text:
'use strict';

class UserCtrl {
	constructor(userSvc) {
		this.userSvc = userSvc;
		this.init();
    }

    init(){
    	this.userSvc.getUsers().then(users => {
            	this.users = users;
            	console.log(users);
            });
    }
}

UserCtrl.$inject = ['userSvc'];

export { UserCtrl }


text:
'use strict'

const app = require('./app')
const PORT = 8000

app.listen(PORT)
console.log(`Listening on port ${PORT}...`)


text:
// This is a generated file. Not intended for manual editing.
package com.intellij.plugins.haxe.lang.psi;

import java.util.List;
import org.jetbrains.annotations.*;
import com.intellij.psi.PsiElement;

public interface HaxeLocalFunctionDeclaration extends HaxeMethod {

  @Nullable
  HaxeBlockStatement getBlockStatement();

  @Nullable
  HaxeComponentName getComponentName();

  @Nullable
  HaxeDoWhileStatement getDoWhileStatement();

  @Nullable
  HaxeExpression getExpression();

  @Nullable
  HaxeForStatement getForStatement();

  @Nullable
  HaxeGenericParam getGenericParam();

  @Nullable
  HaxeIfStatement getIfStatement();

  @Nullable
  HaxeParameterList getParameterList();

  @Nullable
  HaxeReturnStatement getReturnStatement();

  @Nullable
  HaxeThrowStatement getThrowStatement();

  @Nullable
  HaxeTypeTag getTypeTag();

  @Nullable
  HaxeWhileStatement getWhileStatement();

}


text:
import styled from 'styled-components';

const stc = styled.input`
  width: ${props => props.width}em;
`;

export default stc;


text:
module Chapter5 where

  -- Functions
  -- not :: Bool -> Bool
  -- length :: [a] -> Int
  -- concat :: [[a]] -> [a]
  -- head :: [a] -> a
  -- (<) :: Ord a => a -> a -> Bool

  addStuff :: Integer -> Integer -> Integer
  addStuff a b = a + b + 5

  funcIgnoreArgs :: a -> a -> a -> String
  funcIgnoreArgs x y z = "Blah"

  nonsense :: Bool -> Integer
  nonsense True = 805
  nonsense False = 31337

  typicalCurriedFunctoin :: Integer
                         -> Bool
                         -> Integer
  typicalCurriedFunctoin i b = i + (nonsense b)

  uncurriedFunction :: (Integer, Bool)
                         -> Integer
  uncurriedFunction (i, b) = i + (nonsense b)

  anonymous :: Integer -> Bool -> Integer
  anonymous = \i b -> i + (nonsense b)

  anonymousAndManuallyNested :: Integer
                        -> Bool
                        -> Integer
  anonymousAndManuallyNested = \i -> \b -> i + (nonsense b)

  myConcat x = x ++ " yo"

  myMult x = (x / 3) * 5

  myTake x = take x

  myCom x = x > (length [1..10])

  myAlph x = x < 'z'


text:
require 'spec_helper'

describe 'transformation from a csv file to another' do
  it 'writes the correct csv contents to the output file' do
    with_temp_file do |output_file|
      invoke_runner fixture_path('mapping.rb'), fixture_path('input.csv'), output_file
      expect(output_file).to have_same_contents fixture_path('expected_output.csv')
    end
  end
end


text:
<?php
namespace Intuit\V1\Rpc\UpdateBankAccountType;

class UpdateBankAccountTypeControllerFactory
{
    public function __invoke($controllers)
    {
        return new UpdateBankAccountTypeController();
    }
}


text:
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.

using Cake.Common.Tests.Fixtures.Build;
using Xunit;

namespace Cake.Common.Tests.Unit.Build.Jenkins.Data
{
    public sealed class JenkinsNodeInfoTests
    {
        public sealed class TheNodeNameProperty
        {
            [Fact]
            public void Should_Return_Correct_Value()
            {
                // Given
                var info = new JenkinsInfoFixture().CreateNodeInfo();

                // When
                var result = info.NodeName;

                // Then
                Assert.Equal("master", result);
            }
        }

        public sealed class TheNodeLabelsProperty
        {
            [Fact]
            public void Should_Return_Correct_Value()
            {
                // Given
                var info = new JenkinsInfoFixture().CreateNodeInfo();

                // When
                var result = info.NodeLabels;

                // Then
                Assert.Equal("cake development build", result);
            }
        }
    }
}


text:
package net.floodlightcontroller.util;

import java.util.LinkedHashMap;
import java.util.Map;

public class LRUHashMap<K, V> extends LinkedHashMap<K, V> {

    private static final long serialVersionUID = 1L;

    private final int capacity;

    public LRUHashMap(int capacity) {
        super(capacity + 1, 0.75f, true);
        this.capacity = capacity;
    }

    protected boolean removeEldestEntry(Map.Entry<K, V> eldest) {
        return size() > capacity;
    }

}


text:
#define JPEG_INTERNALS
#include "jinclude.h"
#include "jpeglib.h"
#include "jdct.h"		/* Private declarations for DCT subsystem */

/* Private subobject for this module */

typedef struct my_idct_controller {
  struct jpeg_inverse_dct pub;	/* public fields */

  /* Record the IDCT method type actually selected for each component */
  J_DCT_METHOD real_method[MAX_COMPONENTS];
} my_idct_controller;

typedef my_idct_controller * my_idct_ptr;

#pragma ccured_extends("Smy_idct_controller", "Sjpeg_inverse_dct")

/* ZIG[i] is the zigzag-order position of the i'th element of a DCT block */
/* read in natural order (left to right, top to bottom). */
static const int ZIG[DCTSIZE2] = {
     0,  1,  5,  6, 14, 15, 27, 28,
     2,  4,  7, 13, 16, 26, 29, 42,
     3,  8, 12, 17, 25, 30, 41, 43,
     9, 11, 18, 24, 31, 40, 44, 53,
    10, 19, 23, 32, 39, 45, 52, 54,
    20, 22, 33, 38, 46, 51, 55, 60,
    21, 34, 37, 47, 50, 56, 59, 61,
    35, 36, 48, 49, 57, 58, 62, 63
};

/* The current scaled-IDCT routines require ISLOW-style multiplier tables,
 * so be sure to compile that code if either ISLOW or SCALING is requested.
 */
#ifdef DCT_ISLOW_SUPPORTED
#define PROVIDE_ISLOW_TABLES
#else
#ifdef IDCT_SCALING_SUPPORTED
#define PROVIDE_ISLOW_TABLES
#endif
#endif

/*
 * Initialize for an input scan.
 *
 * Verify that all referenced Q-tables are present, and set up
 * the multiplier table for each one.
 * With a multiple-scan JPEG file, this is called during each input scan,
 * NOT during the final output pass where the IDCT is actually done.
 * The purpose is to save away the current Q-table contents just in case
 * the encoder changes tables between scans.  This decoder will dequantize
 * any component using the Q-table which was current at the start of the
 * first scan using that component.
 */

METHODDEF void
start_input_pass (j_decompress_ptr cinfo)
{
  my_idct_ptr idct = (my_idct_ptr) cinfo->idct;
  int ci, qtblno, i;
  jpeg_component_info *compptr;
  JQUANT_TBL * qtbl;

  for (ci = 0; ci < cinfo->comps_in_scan; ci++) {
    compptr = cinfo->cur_comp_info[ci];
    qtblno = compptr->quant_tbl_no;
    /* Make sure specified quantization table is present */
    if (qtblno < 0 || qtblno >= NUM_QUANT_TBLS ||
	cinfo->quant_tbl_ptrs[qtblno] == NULL)
      ERREXIT1(cinfo, JERR_NO_QUANT_TABLE, qtblno);
    qtbl = cinfo->quant_tbl_ptrs[qtblno];
    /* Create multiplier table from quant table, unless we already did so. */
    if (compptr->dct_table != NULL)
      continue;
    switch (idct->real_method[compptr->component_index]) {
#ifdef PROVIDE_ISLOW_TABLES
    case JDCT_ISLOW:
      {
	/* For LL&M IDCT method, multipliers are equal to raw quantization
	 * coefficients, but are stored in natural order as ints.
	 */
	ISLOW_MULT_TYPE * ismtbl;
	compptr->dct_table =
	  alloc_small_wrapper ((j_common_ptr) cinfo, JPOOL_IMAGE,
                               DCTSIZE2 * SIZEOF(ISLOW_MULT_TYPE));
	ismtbl = (ISLOW_MULT_TYPE *) compptr->dct_table;
	for (i = 0; i < DCTSIZE2; i++) {
	  ismtbl[i] = (ISLOW_MULT_TYPE) qtbl->quantval[ZIG[i]];
	}
      }
      break;
#endif
#ifdef DCT_IFAST_SUPPORTED
    case JDCT_IFAST:
      {
	/* For AA&N IDCT method, multipliers are equal to quantization
	 * coefficients scaled by scalefactor[row]*scalefactor[col], where
	 *   scalefactor[0] = 1
	 *   scalefactor[k] = cos(k*PI/16) * sqrt(2)    for k=1..7
	 * For integer operation, the multiplier table is to be scaled by
	 * IFAST_SCALE_BITS.  The multipliers are stored in natural order.
	 */
	IFAST_MULT_TYPE * ifmtbl;
#define CONST_BITS 14
	static const INT16 aanscales[DCTSIZE2] = {
	  /* precomputed values scaled up by 14 bits */
	  16384, 22725, 21407, 19266, 16384, 12873,  8867,  4520,
	  22725, 31521, 29692, 26722, 22725, 17855, 12299,  6270,
	  21407, 29692, 27969, 25172, 21407, 16819, 11585,  5906,
	  19266, 26722, 25172, 22654, 19266, 15137, 10426,  5315,
	  16384, 22725, 21407, 19266, 16384, 12873,  8867,  4520,
	  12873, 17855, 16819, 15137, 12873, 10114,  6967,  3552,
	   8867, 12299, 11585, 10426,  8867,  6967,  4799,  2446,
	   4520,  6270,  5906,  5315,  4520,  3552,  2446,  1247
	};
	SHIFT_TEMPS

	compptr->dct_table =
	  alloc_small_wrapper ((j_common_ptr) cinfo, JPOOL_IMAGE,
                               DCTSIZE2 * SIZEOF(IFAST_MULT_TYPE));
	ifmtbl = (IFAST_MULT_TYPE *) compptr->dct_table;
	for (i = 0; i < DCTSIZE2; i++) {
	  ifmtbl[i] = (IFAST_MULT_TYPE)
	    DESCALE(MULTIPLY16V16((INT32) qtbl->quantval[ZIG[i]],
				  (INT32) aanscales[i]),
		    CONST_BITS-IFAST_SCALE_BITS);
	}
      }
      break;
#endif
#ifdef DCT_FLOAT_SUPPORTED
    case JDCT_FLOAT:
      {
	/* For float AA&N IDCT method, multipliers are equal to quantization
	 * coefficients scaled by scalefactor[row]*scalefactor[col], where
	 *   scalefactor[0] = 1
	 *   scalefactor[k] = cos(k*PI/16) * sqrt(2)    for k=1..7
	 * The multipliers are stored in natural order.
	 */
	FLOAT_MULT_TYPE * fmtbl;
	int row, col;
	static const double aanscalefactor[DCTSIZE] = {
	  1.0, 1.387039845, 1.306562965, 1.175875602,
	  1.0, 0.785694958, 0.541196100, 0.275899379
	};

	compptr->dct_table =
	  alloc_small_wrapper ((j_common_ptr) cinfo, JPOOL_IMAGE,
                               DCTSIZE2 * SIZEOF(FLOAT_MULT_TYPE));
	fmtbl = (FLOAT_MULT_TYPE *) compptr->dct_table;
	i = 0;
	for (row = 0; row < DCTSIZE; row++) {
	  for (col = 0; col < DCTSIZE; col++) {
	    fmtbl[i] = (FLOAT_MULT_TYPE)
	      ((double) qtbl->quantval[ZIG[i]] *
	       aanscalefactor[row] * aanscalefactor[col]);
	    i++;
	  }
	}
      }
      break;
#endif
    default:
      ERREXIT(cinfo, JERR_NOT_COMPILED);
      break;
    }
  }
}

/*
 * Prepare for an output pass that will actually perform IDCTs.
 *
 * start_input_pass should already have been done for all components
 * of interest; we need only verify that this is true.
 * Note that uninteresting components are not required to have loaded tables.
 * This allows the master controller to stop before reading the whole file
 * if it has obtained the data for the interesting component(s).
 */

METHODDEF void
start_output_pass (j_decompress_ptr cinfo)
{
  jpeg_component_info *compptr;
  int ci;

  for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components;
       ci++, compptr++) {
    if (! compptr->component_needed)
      continue;
    if (compptr->dct_table == NULL)
      ERREXIT1(cinfo, JERR_NO_QUANT_TABLE, compptr->quant_tbl_no);
  }
}

/*
 * Initialize IDCT manager.
 */

GLOBAL void
jinit_inverse_dct (j_decompress_ptr cinfo)
{
  my_idct_ptr idct;
  int ci;
  jpeg_component_info *compptr;

  idct =
    (my_idct_ptr)alloc_small_wrapper ((j_common_ptr) cinfo, JPOOL_IMAGE,
                                      SIZEOF(my_idct_controller));
  cinfo->idct = (struct jpeg_inverse_dct *) idct;
  idct->pub.start_input_pass = start_input_pass;
  idct->pub.start_output_pass = start_output_pass;

  for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components;
       ci++, compptr++) {
    compptr->dct_table = NULL;	/* initialize tables to "not prepared" */
    switch (compptr->DCT_scaled_size) {
#ifdef IDCT_SCALING_SUPPORTED
    case 1:
      idct->pub.inverse_DCT[ci] = jpeg_idct_1x1;
      idct->real_method[ci] = JDCT_ISLOW; /* jidctred uses islow-style table */
      break;
    case 2:
      idct->pub.inverse_DCT[ci] = jpeg_idct_2x2;
      idct->real_method[ci] = JDCT_ISLOW; /* jidctred uses islow-style table */
      break;
    case 4:
      idct->pub.inverse_DCT[ci] = jpeg_idct_4x4;
      idct->real_method[ci] = JDCT_ISLOW; /* jidctred uses islow-style table */
      break;
#endif
    case DCTSIZE:
      switch (cinfo->dct_method) {
#ifdef DCT_ISLOW_SUPPORTED
      case JDCT_ISLOW:
	idct->pub.inverse_DCT[ci] = jpeg_idct_islow;
	idct->real_method[ci] = JDCT_ISLOW;
	break;
#endif
#ifdef DCT_IFAST_SUPPORTED
      case JDCT_IFAST:
	idct->pub.inverse_DCT[ci] = jpeg_idct_ifast;
	idct->real_method[ci] = JDCT_IFAST;
	break;
#endif
#ifdef DCT_FLOAT_SUPPORTED
      case JDCT_FLOAT:
	idct->pub.inverse_DCT[ci] = jpeg_idct_float;
	idct->real_method[ci] = JDCT_FLOAT;
	break;
#endif
      default:
	ERREXIT(cinfo, JERR_NOT_COMPILED);
	break;
      }
      break;
    default:
      ERREXIT1(cinfo, JERR_BAD_DCTSIZE, compptr->DCT_scaled_size);
      break;
    }
  }
}


text:
[![Latest Version on Packagist][ico-version]][link-packagist]
[![Software License][ico-license]](LICENSE.md)
[![Build Status][ico-travis]][link-travis]
[![Coverage Status][ico-scrutinizer]][link-scrutinizer]
[![Quality Score][ico-code-quality]][link-code-quality]
[![StyleCI][ico-style-ci]][link-style-ci]
[![Total Downloads][ico-downloads]][link-downloads]

Abstract PHP class for representing data in a model.

## Install

Via Composer

``` bash
$ composer require heyhoo/model
```

## Usage
**Example 1: setting and getting attributes.**
``` php
class Document extends Model {

}

$document = new Document();
$document->foo = 'bar';

echo $document->foo; // bar
```

**Example 2: Instantiate a new Document object with an array of attributes and values.**
``` php
$document = new Document([
    'foo'=>'bar',
    'bar'=>'foo'
]);

echo $document->foo; // bar
echo $document->bar; // foo
```

## Change log

Please see [CHANGELOG](CHANGELOG.md) for more information what has changed recently.

## Testing

``` bash
$ composer test
```

## Contributing

Please see [CONTRIBUTING](CONTRIBUTING.md) and [CONDUCT](CONDUCT.md) for details.

## Security

If you discover any security related issues, please email mark@heyhoo.nl instead of using the issue tracker.

## Credits

- [Mark van den Broek][link-author]
- [All Contributors][link-contributors]

## License

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

[ico-version]: https://img.shields.io/packagist/v/heyhoo/model.svg?style=flat-square
[ico-license]: https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat-square
[ico-travis]: https://img.shields.io/travis/heyhoo/model/master.svg?style=flat-square
[ico-scrutinizer]: https://img.shields.io/scrutinizer/coverage/g/heyhoo/model.svg?style=flat-square
[ico-code-quality]: https://img.shields.io/scrutinizer/g/heyhoo/model.svg?style=flat-square
[ico-downloads]: https://img.shields.io/packagist/dt/heyhoo/model.svg?style=flat-square
[ico-style-ci]: https://styleci.io/repos/72763876/shield?branch=master

[link-packagist]: https://packagist.org/packages/heyhoo/model
[link-travis]: https://travis-ci.org/heyhoo/model
[link-scrutinizer]: https://scrutinizer-ci.com/g/heyhoo/model/code-structure
[link-code-quality]: https://scrutinizer-ci.com/g/heyhoo/model
[link-downloads]: https://packagist.org/packages/heyhoo/model
[link-author]: https://github.com/heyhoo
[link-contributors]: ../../contributors
[link-style-ci]: https://styleci.io/repos/72763876