text:
package com.opengamma.master.historicaltimeseries.impl;

import java.util.concurrent.ConcurrentHashMap;

import org.threeten.bp.LocalDate;

import com.opengamma.id.ExternalIdBundle;
import com.opengamma.id.ExternalIdBundleWithDates;
import com.opengamma.id.ObjectIdSupplier;
import com.opengamma.id.UniqueId;
import com.opengamma.id.UniqueIdSupplier;
import com.opengamma.master.historicaltimeseries.HistoricalTimeSeriesMaster;
import com.opengamma.master.historicaltimeseries.HistoricalTimeSeriesResolutionResult;
import com.opengamma.master.historicaltimeseries.HistoricalTimeSeriesResolver;
import com.opengamma.master.historicaltimeseries.HistoricalTimeSeriesResolverWithBasicChangeManager;
import com.opengamma.master.historicaltimeseries.HistoricalTimeSeriesSelector;
import com.opengamma.master.historicaltimeseries.ManageableHistoricalTimeSeriesInfo;

/**
 * A time series resolver that will always be able to resolve a time series for the identifiers. If
 * the series is available from the underlying historical time series master, the resolution result contains
 * this information. Otherwise, a unique id for the identifiers is generated and the meta-data of
 * the requested time series (e.g. data source, data provider) is stored internally.
 * <p>
 * This class should only be used for testing (e.g. determining which time series are required to complete
 * a calculation).
 */
public class AlwaysAvailableHistoricalTimeSeriesResolver extends HistoricalTimeSeriesResolverWithBasicChangeManager {
  /**
   * The scheme for time series that are not available from the master.
   */
  public static final String SCHEME = "AlwaysAvailableHts";
  /** The underlying resolver */
  private final HistoricalTimeSeriesResolver _underlyingResolver;
  /** A unique id supplier */
  private final UniqueIdSupplier _uidSupplier = new UniqueIdSupplier(SCHEME);
  /** An object id supplier */
  private final ObjectIdSupplier _oidSupplier = new ObjectIdSupplier(SCHEME);
  /** A map of id bundle to time series info */
  private final ConcurrentHashMap<UniqueId, ManageableHistoricalTimeSeriesInfo> _idBundleMap = new ConcurrentHashMap<>();

  /**
   * Creates a resolver.
   * @param selector  a time series selector, not null
   * @param master  a time series master, not null
   */
  public AlwaysAvailableHistoricalTimeSeriesResolver(final HistoricalTimeSeriesSelector selector, final HistoricalTimeSeriesMaster master) {
    _underlyingResolver = new DefaultHistoricalTimeSeriesResolver(selector, master);
  }

  @Override
  public HistoricalTimeSeriesResolutionResult resolve(final ExternalIdBundle identifierBundle, final LocalDate identifierValidityDate,
      final String dataSource, final String dataProvider,
      final String dataField, final String resolutionKey) {
    final HistoricalTimeSeriesResolutionResult resultFromUnderlying = _underlyingResolver.resolve(identifierBundle, identifierValidityDate,
        dataSource, dataProvider, dataField, resolutionKey);
    if (resultFromUnderlying != null) {
      return resultFromUnderlying;
    }
    final ManageableHistoricalTimeSeriesInfo info = new ManageableHistoricalTimeSeriesInfo();
    final UniqueId uniqueId = _uidSupplier.get();
    info.setDataField(dataField);
    info.setDataProvider(dataProvider);
    info.setDataSource(dataSource);
    info.setExternalIdBundle(ExternalIdBundleWithDates.of(identifierBundle));
    info.setUniqueId(uniqueId);
    info.setTimeSeriesObjectId(_oidSupplier.get());
    _idBundleMap.put(uniqueId, info);
    return new HistoricalTimeSeriesResolutionResult(info);
  }

  /**
   * Gets the time series info (data field, data provider, data source and external ids) for a time series that
   * could not be resolved by the underlying resolver using the unique id that is generated by this resolver.
   * This method returns null if the scheme of the unique id does not match that used for dummy identifiers or
   * if the time series is available from the underlying master.
   * @param uniqueId  the unique id
   * @return  the time series info or null
   */
  public ManageableHistoricalTimeSeriesInfo getMissingTimeSeriesInfoForUniqueId(final UniqueId uniqueId) {
    return _idBundleMap.get(uniqueId);
  }
}


text:
require 'rails/generators'
require 'rails/generators/active_record'

module AutomaticForeignKey
  module Generators
    class MigrationGenerator < ::ActiveRecord::Generators::Base
      argument :name, :default => 'create_foreign_keys'

      def self.source_root
        File.expand_path(File.join(File.dirname(__FILE__), 'templates'))
      end

      def create_migration_file
        set_local_assigns!
        migration_template 'migration.rb', "db/migrate/#{file_name}"
      end

      protected
      attr_reader :foreign_keys

      def set_local_assigns!
        @foreign_keys = determine_foreign_keys
      end

      def determine_foreign_keys
        foreign_keys = []
        connection = ::ActiveRecord::Base.connection
        connection.tables.each do |table_name|
          connection.columns(table_name).each do |column|
            references = ::ActiveRecord::Base.references(table_name, column.name)
            foreign_keys << ::RedhillonrailsCore::ActiveRecord::ConnectionAdapters::ForeignKeyDefinition.new(nil, table_name, column.name, references.first, references.last) if references
          end
        end
        foreign_keys
      end
    end
  end
end

redpajama_set_name: RedPajamaGithub


text:
/** @constructor */
ScalaJS.c.scala_collection_immutable_Stream = (function() {
  ScalaJS.c.scala_collection_AbstractSeq.call(this)
});
ScalaJS.c.scala_collection_immutable_Stream.prototype = new ScalaJS.inheritable.scala_collection_AbstractSeq();
ScalaJS.c.scala_collection_immutable_Stream.prototype.constructor = ScalaJS.c.scala_collection_immutable_Stream;
ScalaJS.c.scala_collection_immutable_Stream.prototype.scala$collection$LinearSeqOptimized$$super$sameElements__Lscala_collection_GenIterable__Z = (function(that) {
  return ScalaJS.impls.scala_collection_IterableLike$class__sameElements__Lscala_collection_IterableLike__Lscala_collection_GenIterable__Z(this, that)
});
ScalaJS.c.scala_collection_immutable_Stream.prototype.apply__I__O = (function(n) {
  return ScalaJS.impls.scala_collection_LinearSeqOptimized$class__apply__Lscala_collection_LinearSeqOptimized__I__O(this, n)
});
ScalaJS.c.scala_collection_immutable_Stream.prototype.forall__Lscala_Function1__Z = (function(p) {
  return ScalaJS.impls.scala_collection_LinearSeqOptimized$class__forall__Lscala_collection_LinearSeqOptimized__Lscala_Function1__Z(this, p)
});
ScalaJS.c.scala_collection_immutable_Stream.prototype.exists__Lscala_Function1__Z = (function(p) {
  return ScalaJS.impls.scala_collection_LinearSeqOptimized$class__exists__Lscala_collection_LinearSeqOptimized__Lscala_Function1__Z(this, p)
});
ScalaJS.c.scala_collection_immutable_Stream.prototype.contains__O__Z = (function(elem) {
  return ScalaJS.impls.scala_collection_LinearSeqOptimized$class__contains__Lscala_collection_LinearSeqOptimized__O__Z(this, elem)
});
ScalaJS.c.scala_collection_immutable_Stream.prototype.find__Lscala_Function1__Lscala_Option = (function(p) {
  return ScalaJS.impls.scala_collection_LinearSeqOptimized$class__find__Lscala_collection_LinearSeqOptimized__Lscala_Function1__Lscala_Option(this, p)
});
ScalaJS.c.scala_collection_immutable_Stream.prototype.foldRight__O__Lscala_Function2__O = (function(z, f) {
  return ScalaJS.impls.scala_collection_LinearSeqOptimized$class__foldRight__Lscala_collection_LinearSeqOptimized__O__Lscala_Function2__O(this, z, f)
});
ScalaJS.c.scala_collection_immutable_Stream.prototype.reduceRight__Lscala_Function2__O = (function(op) {
  return ScalaJS.impls.scala_collection_LinearSeqOptimized$class__reduceRight__Lscala_collection_LinearSeqOptimized__Lscala_Function2__O(this, op)
});
ScalaJS.c.scala_collection_immutable_Stream.prototype.last__O = (function() {
  return ScalaJS.impls.scala_collection_LinearSeqOptimized$class__last__Lscala_collection_LinearSeqOptimized__O(this)
});
ScalaJS.c.scala_collection_immutable_Stream.prototype.dropRight__I__Lscala_collection_LinearSeqOptimized = (function(n) {
  return ScalaJS.impls.scala_collection_LinearSeqOptimized$class__dropRight__Lscala_collection_LinearSeqOptimized__I__Lscala_collection_LinearSeqOptimized(this, n)
});
ScalaJS.c.scala_collection_immutable_Stream.prototype.span__Lscala_Function1__Lscala_Tuple2 = (function(p) {
  return ScalaJS.impls.scala_collection_LinearSeqOptimized$class__span__Lscala_collection_LinearSeqOptimized__Lscala_Function1__Lscala_Tuple2(this, p)
});
ScalaJS.c.scala_collection_immutable_Stream.prototype.sameElements__Lscala_collection_GenIterable__Z = (function(that) {
  return ScalaJS.impls.scala_collection_LinearSeqOptimized$class__sameElements__Lscala_collection_LinearSeqOptimized__Lscala_collection_GenIterable__Z(this, that)
});
ScalaJS.c.scala_collection_immutable_Stream.prototype.lengthCompare__I__I = (function(len) {
  return ScalaJS.impls.scala_collection_LinearSeqOptimized$class__lengthCompare__Lscala_collection_LinearSeqOptimized__I__I(this, len)
});
ScalaJS.c.scala_collection_immutable_Stream.prototype.isDefinedAt__I__Z = (function(x) {
  return ScalaJS.impls.scala_collection_LinearSeqOptimized$class__isDefinedAt__Lscala_collection_LinearSeqOptimized__I__Z(this, x)
});
ScalaJS.c.scala_collection_immutable_Stream.prototype.segmentLength__Lscala_Function1__I__I = (function(p, from) {
  return ScalaJS.impls.scala_collection_LinearSeqOptimized$class__segmentLength__Lscala_collection_LinearSeqOptimized__Lscala_Function1__I__I(this, p, from)
});
ScalaJS.c.scala_collection_immutable_Stream.prototype.indexWhere__Lscala_Function1__I__I = (function(p, from) {
  return ScalaJS.impls.scala_collection_LinearSeqOptimized$class__indexWhere__Lscala_collection_LinearSeqOptimized__Lscala_Function1__I__I(this, p, from)
});
ScalaJS.c.scala_collection_immutable_Stream.prototype.lastIndexWhere__Lscala_Function1__I__I = (function(p, end) {
  return ScalaJS.impls.scala_collection_LinearSeqOptimized$class__lastIndexWhere__Lscala_collection_LinearSeqOptimized__Lscala_Function1__I__I(this, p, end)
});
ScalaJS.c.scala_collection_immutable_Stream.prototype.seq__Lscala_collection_immutable_LinearSeq = (function() {
  return ScalaJS.impls.scala_collection_immutable_LinearSeq$class__seq__Lscala_collection_immutable_LinearSeq__Lscala_collection_immutable_LinearSeq(this)
});
ScalaJS.c.scala_collection_immutable_Stream.prototype.thisCollection__Lscala_collection_LinearSeq = (function() {
  return ScalaJS.impls.scala_collection_LinearSeqLike$class__thisCollection__Lscala_collection_LinearSeqLike__Lscala_collection_LinearSeq(this)
});
ScalaJS.c.scala_collection_immutable_Stream.prototype.toCollection__Lscala_collection_LinearSeqLike__Lscala_collection_LinearSeq = (function(repr) {
  return ScalaJS.impls.scala_collection_LinearSeqLike$class__toCollection__Lscala_collection_LinearSeqLike__Lscala_collection_LinearSeqLike__Lscala_collection_LinearSeq(this, repr)
});
ScalaJS.c.scala_collection_immutable_Stream.prototype.hashCode__I = (function() {
  return ScalaJS.impls.scala_collection_LinearSeqLike$class__hashCode__Lscala_collection_LinearSeqLike__I(this)
});
ScalaJS.c.scala_collection_immutable_Stream.prototype.corresponds__Lscala_collection_GenSeq__Lscala_Function2__Z = (function(that, p) {
  return ScalaJS.impls.scala_collection_LinearSeqLike$class__corresponds__Lscala_collection_LinearSeqLike__Lscala_collection_GenSeq__Lscala_Function2__Z(this, that, p)
});
ScalaJS.c.scala_collection_immutable_Stream.prototype.toSeq__Lscala_collection_immutable_Seq = (function() {
  return ScalaJS.impls.scala_collection_immutable_Seq$class__toSeq__Lscala_collection_immutable_Seq__Lscala_collection_immutable_Seq(this)
});
ScalaJS.c.scala_collection_immutable_Stream.prototype.parCombiner__Lscala_collection_parallel_Combiner = (function() {
  return ScalaJS.impls.scala_collection_immutable_Seq$class__parCombiner__Lscala_collection_immutable_Seq__Lscala_collection_parallel_Combiner(this)
});
ScalaJS.c.scala_collection_immutable_Stream.prototype.companion__Lscala_collection_generic_GenericCompanion = (function() {
  return ScalaJS.modules.scala_collection_immutable_Stream()
});
ScalaJS.c.scala_collection_immutable_Stream.prototype.append__Lscala_Function0__Lscala_collection_immutable_Stream = (function(rest) {
  if (this.isEmpty__Z()) {
    return ScalaJS.as.scala_collection_GenTraversableOnce(rest.apply__O()).toStream__Lscala_collection_immutable_Stream()
  } else {
    return ScalaJS.modules.scala_collection_immutable_Stream$cons().apply__O__Lscala_Function0__Lscala_collection_immutable_Stream$Cons(this.head__O(), new ScalaJS.c.scala_scalajs_runtime_AnonFunction0().init___Lscala_scalajs_js_Function0((function(arg$outer, rest$1) {
      return (function() {
        return ScalaJS.as.scala_collection_immutable_Stream(arg$outer.tail__O()).append__Lscala_Function0__Lscala_collection_immutable_Stream(rest$1)
      })
    })(this, rest)))
  }
});
ScalaJS.c.scala_collection_immutable_Stream.prototype.force__Lscala_collection_immutable_Stream = (function() {
  var these = this;
  while ((!these.isEmpty__Z())) {
    these = ScalaJS.as.scala_collection_immutable_Stream(these.tail__O())
  };
  return this
});
ScalaJS.c.scala_collection_immutable_Stream.prototype.print__V = (function() {
  this.print__T__V(", ")
});
ScalaJS.c.scala_collection_immutable_Stream.prototype.print__T__V = (function(sep) {
  this.loop$1__p4__Lscala_collection_immutable_Stream__T__T__V(this, "", sep)
});
ScalaJS.c.scala_collection_immutable_Stream.prototype.length__I = (function() {
  var len = 0;
  var left = this;
  while ((!left.isEmpty__Z())) {
    len = (len + 1);
    left = ScalaJS.as.scala_collection_immutable_Stream(left.tail__O())
  };
  return len
});
ScalaJS.c.scala_collection_immutable_Stream.prototype.scala$collection$immutable$Stream$$asThat__O__O = (function(x) {
  return x
});
ScalaJS.c.scala_collection_immutable_Stream.prototype.scala$collection$immutable$Stream$$asStream__O__Lscala_collection_immutable_Stream = (function(x) {
  return ScalaJS.as.scala_collection_immutable_Stream(x)
});
ScalaJS.c.scala_collection_immutable_Stream.prototype.scala$collection$immutable$Stream$$isStreamBuilder__Lscala_collection_generic_CanBuildFrom__Z = (function(bf) {
  return ScalaJS.is.scala_collection_immutable_Stream$StreamBuilder(bf.apply__O__Lscala_collection_mutable_Builder(this.repr__O()))
});
ScalaJS.c.scala_collection_immutable_Stream.prototype.toStream__Lscala_collection_immutable_Stream = (function() {
  return this
});
ScalaJS.c.scala_collection_immutable_Stream.prototype.hasDefiniteSize__Z = (function() {
  return this.loop$2__p4__Lscala_collection_immutable_Stream__Z(this)
});
ScalaJS.c.scala_collection_immutable_Stream.prototype.$$plus$plus__Lscala_collection_GenTraversableOnce__Lscala_collection_generic_CanBuildFrom__O = (function(that, bf) {
  if (this.scala$collection$immutable$Stream$$isStreamBuilder__Lscala_collection_generic_CanBuildFrom__Z(bf)) {
    if (this.isEmpty__Z()) {
      var jsx$1 = that.toStream__Lscala_collection_immutable_Stream()
    } else {
      var jsx$1 = ScalaJS.modules.scala_collection_immutable_Stream$cons().apply__O__Lscala_Function0__Lscala_collection_immutable_Stream$Cons(this.head__O(), new ScalaJS.c.scala_scalajs_runtime_AnonFunction0().init___Lscala_scalajs_js_Function0((function(arg$outer, that$1) {
        return (function() {
          return arg$outer.scala$collection$immutable$Stream$$asStream__O__Lscala_collection_immutable_Stream(ScalaJS.as.scala_collection_immutable_Stream(arg$outer.tail__O()).$$plus$plus__Lscala_collection_GenTraversableOnce__Lscala_collection_generic_CanBuildFrom__O(that$1, ScalaJS.modules.scala_collection_immutable_Stream().canBuildFrom__Lscala_collection_generic_CanBuildFrom()))
        })
      })(this, that)))
    };
    return this.scala$collection$immutable$Stream$$asThat__O__O(jsx$1)
  } else {
    return ScalaJS.impls.scala_collection_TraversableLike$class__$plus$plus__Lscala_collection_TraversableLike__Lscala_collection_GenTraversableOnce__Lscala_collection_generic_CanBuildFrom__O(this, that, bf)
  }
});
ScalaJS.c.scala_collection_immutable_Stream.prototype.$$plus$colon__O__Lscala_collection_generic_CanBuildFrom__O = (function(elem, bf) {
  if (this.scala$collection$immutable$Stream$$isStreamBuilder__Lscala_collection_generic_CanBuildFrom__Z(bf)) {
    return this.scala$collection$immutable$Stream$$asThat__O__O(ScalaJS.modules.scala_collection_immutable_Stream$cons().apply__O__Lscala_Function0__Lscala_collection_immutable_Stream$Cons(elem, new ScalaJS.c.scala_scalajs_runtime_AnonFunction0().init___Lscala_scalajs_js_Function0((function(arg$outer) {
      return (function() {
        return arg$outer
      })
    })(this))))
  } else {
    return ScalaJS.impls.scala_collection_SeqLike$class__$plus$colon__Lscala_collection_SeqLike__O__Lscala_collection_generic_CanBuildFrom__O(this, elem, bf)
  }
});
ScalaJS.c.scala_collection_immutable_Stream.prototype.scanLeft__O__Lscala_Function2__Lscala_collection_generic_CanBuildFrom__O = (function(z, op, bf) {
  if (this.scala$collection$immutable$Stream$$isStreamBuilder__Lscala_collection_generic_CanBuildFrom__Z(bf)) {
    if (this.isEmpty__Z()) {
      var jsx$2 = ScalaJS.modules.scala_collection_immutable_Stream().apply__Lscala_collection_Seq__Lscala_collection_immutable_Stream(ScalaJS.modules.scala_Predef().genericWrapArray__O__Lscala_collection_mutable_WrappedArray(ScalaJS.makeNativeArrayWrapper(ScalaJS.data.java_lang_Object.getArrayOf(), [z])))
    } else {
      var jsx$2 = ScalaJS.modules.scala_collection_immutable_Stream$cons().apply__O__Lscala_Function0__Lscala_collection_immutable_Stream$Cons(z, new ScalaJS.c.scala_scalajs_runtime_AnonFunction0().init___Lscala_scalajs_js_Function0((function(arg$outer, z$1, op$1) {
        return (function() {
          return arg$outer.scala$collection$immutable$Stream$$asStream__O__Lscala_collection_immutable_Stream(ScalaJS.as.scala_collection_immutable_Stream(arg$outer.tail__O()).scanLeft__O__Lscala_Function2__Lscala_collection_generic_CanBuildFrom__O(op$1.apply__O__O__O(z$1, arg$outer.head__O()), op$1, ScalaJS.modules.scala_collection_immutable_Stream().canBuildFrom__Lscala_collection_generic_CanBuildFrom()))
        })
      })(this, z, op)))
    };
    return this.scala$collection$immutable$Stream$$asThat__O__O(jsx$2)
  } else {
    return ScalaJS.impls.scala_collection_TraversableLike$class__scanLeft__Lscala_collection_TraversableLike__O__Lscala_Function2__Lscala_collection_generic_CanBuildFrom__O(this, z, op, bf)
  }
});
ScalaJS.c.scala_collection_immutable_Stream.prototype.map__Lscala_Function1__Lscala_collection_generic_CanBuildFrom__O = (function(f, bf) {
  if (this.scala$collection$immutable$Stream$$isStreamBuilder__Lscala_collection_generic_CanBuildFrom__Z(bf)) {
    if (this.isEmpty__Z()) {
      var jsx$3 = ScalaJS.modules.scala_collection_immutable_Stream$Empty()
    } else {
      var jsx$3 = ScalaJS.modules.scala_collection_immutable_Stream$cons().apply__O__Lscala_Function0__Lscala_collection_immutable_Stream$Cons(f.apply__O__O(this.head__O()), new ScalaJS.c.scala_scalajs_runtime_AnonFunction0().init___Lscala_scalajs_js_Function0((function(arg$outer, f$1) {
        return (function() {
          return arg$outer.scala$collection$immutable$Stream$$asStream__O__Lscala_collection_immutable_Stream(ScalaJS.as.scala_collection_immutable_Stream(arg$outer.tail__O()).map__Lscala_Function1__Lscala_collection_generic_CanBuildFrom__O(f$1, ScalaJS.modules.scala_collection_immutable_Stream().canBuildFrom__Lscala_collection_generic_CanBuildFrom()))
        })
      })(this, f)))
    };
    return this.scala$collection$immutable$Stream$$asThat__O__O(jsx$3)
  } else {
    return ScalaJS.impls.scala_collection_TraversableLike$class__map__Lscala_collection_TraversableLike__Lscala_Function1__Lscala_collection_generic_CanBuildFrom__O(this, f, bf)
  }
});
ScalaJS.c.scala_collection_immutable_Stream.prototype.collect__Lscala_PartialFunction__Lscala_collection_generic_CanBuildFrom__O = (function(pf, bf) {
  if ((!this.scala$collection$immutable$Stream$$isStreamBuilder__Lscala_collection_generic_CanBuildFrom__Z(bf))) {
    return ScalaJS.impls.scala_collection_TraversableLike$class__collect__Lscala_collection_TraversableLike__Lscala_PartialFunction__Lscala_collection_generic_CanBuildFrom__O(this, pf, bf)
  } else {
    var rest = this;
    while ((rest.nonEmpty__Z() && (!pf.isDefinedAt__O__Z(rest.head__O())))) {
      rest = ScalaJS.as.scala_collection_immutable_Stream(rest.tail__O())
    };
    if (rest.isEmpty__Z()) {
      return ScalaJS.modules.scala_collection_immutable_Stream$Empty()
    } else {
      return ScalaJS.modules.scala_collection_immutable_Stream().collectedTail__Lscala_collection_immutable_Stream__Lscala_PartialFunction__Lscala_collection_generic_CanBuildFrom__Lscala_collection_immutable_Stream$Cons(rest, pf, bf)
    }
  }
});
ScalaJS.c.scala_collection_immutable_Stream.prototype.flatMap__Lscala_Function1__Lscala_collection_generic_CanBuildFrom__O = (function(f, bf) {
  if (this.scala$collection$immutable$Stream$$isStreamBuilder__Lscala_collection_generic_CanBuildFrom__Z(bf)) {
    if (this.isEmpty__Z()) {
      var jsx$4 = ScalaJS.modules.scala_collection_immutable_Stream$Empty()
    } else {
      var temp1 = this;
      var nonEmptyPrefix = new ScalaJS.c.scala_runtime_ObjectRef().init___O(temp1);
      var prefix = ScalaJS.as.scala_collection_GenTraversableOnce(f.apply__O__O(ScalaJS.as.scala_collection_immutable_Stream(nonEmptyPrefix.elem$1).head__O())).toStream__Lscala_collection_immutable_Stream();
      while (((!ScalaJS.as.scala_collection_immutable_Stream(nonEmptyPrefix.elem$1).isEmpty__Z()) && prefix.isEmpty__Z())) {
        nonEmptyPrefix.elem$1 = ScalaJS.as.scala_collection_immutable_Stream(ScalaJS.as.scala_collection_immutable_Stream(nonEmptyPrefix.elem$1).tail__O());
        if ((!ScalaJS.as.scala_collection_immutable_Stream(nonEmptyPrefix.elem$1).isEmpty__Z())) {
          prefix = ScalaJS.as.scala_collection_GenTraversableOnce(f.apply__O__O(ScalaJS.as.scala_collection_immutable_Stream(nonEmptyPrefix.elem$1).head__O())).toStream__Lscala_collection_immutable_Stream()
        }
      };
      if (ScalaJS.as.scala_collection_immutable_Stream(nonEmptyPrefix.elem$1).isEmpty__Z()) {
        var jsx$4 = ScalaJS.modules.scala_collection_immutable_Stream().empty__Lscala_collection_immutable_Stream()
      } else {
        var jsx$4 = prefix.append__Lscala_Function0__Lscala_collection_immutable_Stream(new ScalaJS.c.scala_scalajs_runtime_AnonFunction0().init___Lscala_scalajs_js_Function0((function(arg$outer, f$2, nonEmptyPrefix$1) {
          return (function() {
            return arg$outer.scala$collection$immutable$Stream$$asStream__O__Lscala_collection_immutable_Stream(ScalaJS.as.scala_collection_immutable_Stream(ScalaJS.as.scala_collection_immutable_Stream(nonEmptyPrefix$1.elem$1).tail__O()).flatMap__Lscala_Function1__Lscala_collection_generic_CanBuildFrom__O(f$2, ScalaJS.modules.scala_collection_immutable_Stream().canBuildFrom__Lscala_collection_generic_CanBuildFrom()))
          })
        })(this, f, nonEmptyPrefix)))
      }
    };
    return this.scala$collection$immutable$Stream$$asThat__O__O(jsx$4)
  } else {
    return ScalaJS.impls.scala_collection_TraversableLike$class__flatMap__Lscala_collection_TraversableLike__Lscala_Function1__Lscala_collection_generic_CanBuildFrom__O(this, f, bf)
  }
});
ScalaJS.c.scala_collection_immutable_Stream.prototype.filter__Lscala_Function1__Lscala_collection_immutable_Stream = (function(p) {
  var rest = this;
  while (((!rest.isEmpty__Z()) && (!ScalaJS.uZ(p.apply__O__O(rest.head__O()))))) {
    rest = ScalaJS.as.scala_collection_immutable_Stream(rest.tail__O())
  };
  if (rest.nonEmpty__Z()) {
    return ScalaJS.modules.scala_collection_immutable_Stream().filteredTail__Lscala_collection_immutable_Stream__Lscala_Function1__Lscala_collection_immutable_Stream$Cons(rest, p)
  } else {
    return ScalaJS.modules.scala_collection_immutable_Stream$Empty()
  }
});
ScalaJS.c.scala_collection_immutable_Stream.prototype.withFilter__Lscala_Function1__Lscala_collection_immutable_Stream$StreamWithFilter = (function(p) {
  return new ScalaJS.c.scala_collection_immutable_Stream$StreamWithFilter().init___Lscala_collection_immutable_Stream__Lscala_Function1(this, p)
});
ScalaJS.c.scala_collection_immutable_Stream.prototype.iterator__Lscala_collection_Iterator = (function() {
  return new ScalaJS.c.scala_collection_immutable_StreamIterator().init___Lscala_collection_immutable_Stream(this)
});
ScalaJS.c.scala_collection_immutable_Stream.prototype.foreach__Lscala_Function1__V = (function(f) {
  var _$this = this;
  tailCallLoop: while (true) {
    if ((!_$this.isEmpty__Z())) {
      f.apply__O__O(_$this.head__O());
      _$this = ScalaJS.as.scala_collection_immutable_Stream(_$this.tail__O());
      continue tailCallLoop;
      ScalaJS.modules.scala_runtime_BoxedUnit().UNIT__Lscala_runtime_BoxedUnit()
    } else {
      ScalaJS.modules.scala_runtime_BoxedUnit().UNIT__Lscala_runtime_BoxedUnit()
    };
    return undefined
  }
});
ScalaJS.c.scala_collection_immutable_Stream.prototype.foldLeft__O__Lscala_Function2__O = (function(z, op) {
  var _$this = this;
  tailCallLoop: while (true) {
    if (_$this.isEmpty__Z()) {
      return z
    } else {
      var temp$_$this = ScalaJS.as.scala_collection_immutable_Stream(_$this.tail__O());
      var temp$z = op.apply__O__O__O(z, _$this.head__O());
      _$this = temp$_$this;
      z = temp$z;
      continue tailCallLoop
    }
  }
});
ScalaJS.c.scala_collection_immutable_Stream.prototype.reduceLeft__Lscala_Function2__O = (function(f) {
  if (this.isEmpty__Z()) {
    throw new ScalaJS.c.java_lang_UnsupportedOperationException().init___T("empty.reduceLeft")
  } else {
    var reducedRes = this.head__O();
    var left = ScalaJS.as.scala_collection_immutable_Stream(this.tail__O());
    while ((!left.isEmpty__Z())) {
      reducedRes = f.apply__O__O__O(reducedRes, left.head__O());
      left = ScalaJS.as.scala_collection_immutable_Stream(left.tail__O())
    };
    return reducedRes
  }
});
ScalaJS.c.scala_collection_immutable_Stream.prototype.partition__Lscala_Function1__Lscala_Tuple2 = (function(p) {
  return new ScalaJS.c.scala_Tuple2().init___O__O(this.filter__Lscala_Function1__Lscala_collection_immutable_Stream(new ScalaJS.c.scala_scalajs_runtime_AnonFunction1().init___Lscala_scalajs_js_Function1((function(p$2) {
    return (function(x$1) {
      return ScalaJS.bZ(ScalaJS.uZ(p$2.apply__O__O(x$1)))
    })
  })(p))), this.filterNot__Lscala_Function1__O(new ScalaJS.c.scala_scalajs_runtime_AnonFunction1().init___Lscala_scalajs_js_Function1((function(p$2) {
    return (function(x$2) {
      return ScalaJS.bZ(ScalaJS.uZ(p$2.apply__O__O(x$2)))
    })
  })(p))))
});
ScalaJS.c.scala_collection_immutable_Stream.prototype.zip__Lscala_collection_GenIterable__Lscala_collection_generic_CanBuildFrom__O = (function(that, bf) {
  if (this.scala$collection$immutable$Stream$$isStreamBuilder__Lscala_collection_generic_CanBuildFrom__Z(bf)) {
    if ((this.isEmpty__Z() || that.isEmpty__Z())) {
      var jsx$5 = ScalaJS.modules.scala_collection_immutable_Stream$Empty()
    } else {
      var jsx$5 = ScalaJS.modules.scala_collection_immutable_Stream$cons().apply__O__Lscala_Function0__Lscala_collection_immutable_Stream$Cons(new ScalaJS.c.scala_Tuple2().init___O__O(this.head__O(), that.head__O()), new ScalaJS.c.scala_scalajs_runtime_AnonFunction0().init___Lscala_scalajs_js_Function0((function(arg$outer, that$2) {
        return (function() {
          return arg$outer.scala$collection$immutable$Stream$$asStream__O__Lscala_collection_immutable_Stream(ScalaJS.as.scala_collection_immutable_Stream(arg$outer.tail__O()).zip__Lscala_collection_GenIterable__Lscala_collection_generic_CanBuildFrom__O(ScalaJS.as.scala_collection_GenIterable(that$2.tail__O()), ScalaJS.modules.scala_collection_immutable_Stream().canBuildFrom__Lscala_collection_generic_CanBuildFrom()))
        })
      })(this, that)))
    };
    return this.scala$collection$immutable$Stream$$asThat__O__O(jsx$5)
  } else {
    return ScalaJS.impls.scala_collection_IterableLike$class__zip__Lscala_collection_IterableLike__Lscala_collection_GenIterable__Lscala_collection_generic_CanBuildFrom__O(this, that, bf)
  }
});
ScalaJS.c.scala_collection_immutable_Stream.prototype.zipWithIndex__Lscala_collection_generic_CanBuildFrom__O = (function(bf) {
  return this.zip__Lscala_collection_GenIterable__Lscala_collection_generic_CanBuildFrom__O(ScalaJS.modules.scala_collection_immutable_Stream().from__I__Lscala_collection_immutable_Stream(0), bf)
});
ScalaJS.c.scala_collection_immutable_Stream.prototype.addString__Lscala_collection_mutable_StringBuilder__T__T__T__Lscala_collection_mutable_StringBuilder = (function(b, start, sep, end) {
  b.append__T__Lscala_collection_mutable_StringBuilder(start);
  this.loop$3__p4__T__Lscala_collection_immutable_Stream__Lscala_collection_mutable_StringBuilder__T__T__V("", this, b, sep, end);
  return b
});
ScalaJS.c.scala_collection_immutable_Stream.prototype.mkString__T__T = (function(sep) {
  return this.mkString__T__T__T__T("", sep, "")
});
ScalaJS.c.scala_collection_immutable_Stream.prototype.mkString__T = (function() {
  return this.mkString__T__T("")
});
ScalaJS.c.scala_collection_immutable_Stream.prototype.mkString__T__T__T__T = (function(start, sep, end) {
  this.force__Lscala_collection_immutable_Stream();
  return ScalaJS.impls.scala_collection_TraversableOnce$class__mkString__Lscala_collection_TraversableOnce__T__T__T__T(this, start, sep, end)
});
ScalaJS.c.scala_collection_immutable_Stream.prototype.toString__T = (function() {
  return ScalaJS.impls.scala_collection_TraversableOnce$class__mkString__Lscala_collection_TraversableOnce__T__T__T__T(this, (("" + this.stringPrefix__T()) + "("), ", ", ")")
});
ScalaJS.c.scala_collection_immutable_Stream.prototype.splitAt__I__Lscala_Tuple2 = (function(n) {
  return new ScalaJS.c.scala_Tuple2().init___O__O(this.take__I__Lscala_collection_immutable_Stream(n), this.drop__I__Lscala_collection_immutable_Stream(n))
});
ScalaJS.c.scala_collection_immutable_Stream.prototype.take__I__Lscala_collection_immutable_Stream = (function(n) {
  if (((n <= 0) || this.isEmpty__Z())) {
    return ScalaJS.modules.scala_collection_immutable_Stream().empty__Lscala_collection_immutable_Stream()
  } else {
    if ((n === 1)) {
      return ScalaJS.modules.scala_collection_immutable_Stream$cons().apply__O__Lscala_Function0__Lscala_collection_immutable_Stream$Cons(this.head__O(), new ScalaJS.c.scala_scalajs_runtime_AnonFunction0().init___Lscala_scalajs_js_Function0((function() {
        return (function() {
          return ScalaJS.modules.scala_collection_immutable_Stream().empty__Lscala_collection_immutable_Stream()
        })
      })()))
    } else {
      return ScalaJS.modules.scala_collection_immutable_Stream$cons().apply__O__Lscala_Function0__Lscala_collection_immutable_Stream$Cons(this.head__O(), new ScalaJS.c.scala_scalajs_runtime_AnonFunction0().init___Lscala_scalajs_js_Function0((function(arg$outer, n$1) {
        return (function() {
          return ScalaJS.as.scala_collection_immutable_Stream(arg$outer.tail__O()).take__I__Lscala_collection_immutable_Stream((n$1 - 1))
        })
      })(this, n)))
    }
  }
});
ScalaJS.c.scala_collection_immutable_Stream.prototype.drop__I__Lscala_collection_immutable_Stream = (function(n) {
  var _$this = this;
  tailCallLoop: while (true) {
    if (((n <= 0) || _$this.isEmpty__Z())) {
      return _$this
    } else {
      var temp$_$this = ScalaJS.as.scala_collection_immutable_Stream(_$this.tail__O());
      var temp$n = (n - 1);
      _$this = temp$_$this;
      n = temp$n;
      continue tailCallLoop
    }
  }
});
ScalaJS.c.scala_collection_immutable_Stream.prototype.slice__I__I__Lscala_collection_immutable_Stream = (function(from, until) {
  var lo = ScalaJS.modules.scala_runtime_RichInt().max$extension__I__I__I(ScalaJS.modules.scala_Predef().intWrapper__I__I(from), 0);
  if (((until <= lo) || this.isEmpty__Z())) {
    return ScalaJS.modules.scala_collection_immutable_Stream().empty__Lscala_collection_immutable_Stream()
  } else {
    return this.drop__I__Lscala_collection_immutable_Stream(lo).take__I__Lscala_collection_immutable_Stream((until - lo))
  }
});
ScalaJS.c.scala_collection_immutable_Stream.prototype.init__Lscala_collection_immutable_Stream = (function() {
  if (this.isEmpty__Z()) {
    return ScalaJS.as.scala_collection_immutable_Stream(ScalaJS.impls.scala_collection_TraversableLike$class__init__Lscala_collection_TraversableLike__O(this))
  } else {
    if (ScalaJS.as.scala_collection_SeqLike(this.tail__O()).isEmpty__Z()) {
      return ScalaJS.modules.scala_collection_immutable_Stream$Empty()
    } else {
      return ScalaJS.modules.scala_collection_immutable_Stream$cons().apply__O__Lscala_Function0__Lscala_collection_immutable_Stream$Cons(this.head__O(), new ScalaJS.c.scala_scalajs_runtime_AnonFunction0().init___Lscala_scalajs_js_Function0((function(arg$outer) {
        return (function() {
          return ScalaJS.as.scala_collection_immutable_Stream(arg$outer.tail__O()).init__Lscala_collection_immutable_Stream()
        })
      })(this)))
    }
  }
});
ScalaJS.c.scala_collection_immutable_Stream.prototype.takeRight__I__Lscala_collection_immutable_Stream = (function(n) {
  var these = this;
  var lead = this.drop__I__Lscala_collection_immutable_Stream(n);
  while ((!lead.isEmpty__Z())) {
    these = ScalaJS.as.scala_collection_immutable_Stream(these.tail__O());
    lead = ScalaJS.as.scala_collection_immutable_Stream(lead.tail__O())
  };
  return these
});
ScalaJS.c.scala_collection_immutable_Stream.prototype.takeWhile__Lscala_Function1__Lscala_collection_immutable_Stream = (function(p) {
  if (((!this.isEmpty__Z()) && ScalaJS.uZ(p.apply__O__O(this.head__O())))) {
    return ScalaJS.modules.scala_collection_immutable_Stream$cons().apply__O__Lscala_Function0__Lscala_collection_immutable_Stream$Cons(this.head__O(), new ScalaJS.c.scala_scalajs_runtime_AnonFunction0().init___Lscala_scalajs_js_Function0((function(arg$outer, p$3) {
      return (function() {
        return ScalaJS.as.scala_collection_immutable_Stream(arg$outer.tail__O()).takeWhile__Lscala_Function1__Lscala_collection_immutable_Stream(p$3)
      })
    })(this, p)))
  } else {
    return ScalaJS.modules.scala_collection_immutable_Stream$Empty()
  }
});
ScalaJS.c.scala_collection_immutable_Stream.prototype.dropWhile__Lscala_Function1__Lscala_collection_immutable_Stream = (function(p) {
  var these = this;
  while (((!these.isEmpty__Z()) && ScalaJS.uZ(p.apply__O__O(these.head__O())))) {
    these = ScalaJS.as.scala_collection_immutable_Stream(these.tail__O())
  };
  return these
});
ScalaJS.c.scala_collection_immutable_Stream.prototype.distinct__Lscala_collection_immutable_Stream = (function() {
  return this.scala$collection$immutable$Stream$$loop$4__Lscala_collection_immutable_Set__Lscala_collection_immutable_Stream__Lscala_collection_immutable_Stream(ScalaJS.as.scala_collection_immutable_Set(ScalaJS.modules.scala_collection_immutable_Set().apply__Lscala_collection_Seq__Lscala_collection_GenTraversable(ScalaJS.modules.scala_collection_immutable_Nil())), this)
});
ScalaJS.c.scala_collection_immutable_Stream.prototype.padTo__I__O__Lscala_collection_generic_CanBuildFrom__O = (function(len, elem, bf) {
  if (this.scala$collection$immutable$Stream$$isStreamBuilder__Lscala_collection_generic_CanBuildFrom__Z(bf)) {
    return this.scala$collection$immutable$Stream$$asThat__O__O(this.scala$collection$immutable$Stream$$loop$5__I__Lscala_collection_immutable_Stream__O__Lscala_collection_immutable_Stream(len, this, elem))
  } else {
    return ScalaJS.impls.scala_collection_SeqLike$class__padTo__Lscala_collection_SeqLike__I__O__Lscala_collection_generic_CanBuildFrom__O(this, len, elem, bf)
  }
});
ScalaJS.c.scala_collection_immutable_Stream.prototype.reverse__Lscala_collection_immutable_Stream = (function() {
  var result = new ScalaJS.c.scala_runtime_ObjectRef().init___O(ScalaJS.modules.scala_collection_immutable_Stream$Empty());
  var these = this;
  while ((!these.isEmpty__Z())) {
    var r = ScalaJS.modules.scala_collection_immutable_Stream().consWrapper__Lscala_Function0__Lscala_collection_immutable_Stream$ConsWrapper(new ScalaJS.c.scala_scalajs_runtime_AnonFunction0().init___Lscala_scalajs_js_Function0((function(result$1) {
      return (function() {
        return ScalaJS.as.scala_collection_immutable_Stream(result$1.elem$1)
      })
    })(result))).$$hash$colon$colon__O__Lscala_collection_immutable_Stream(these.head__O());
    r.tail__O();
    result.elem$1 = r;
    these = ScalaJS.as.scala_collection_immutable_Stream(these.tail__O())
  };
  return ScalaJS.as.scala_collection_immutable_Stream(result.elem$1)
});
ScalaJS.c.scala_collection_immutable_Stream.prototype.flatten__Lscala_Function1__Lscala_collection_immutable_Stream = (function(asTraversable) {
  if (this.isEmpty__Z()) {
    return ScalaJS.modules.scala_collection_immutable_Stream().empty__Lscala_collection_immutable_Stream()
  } else {
    return this.scala$collection$immutable$Stream$$flatten1$1__Lscala_collection_Traversable__Lscala_Function1__Lscala_collection_immutable_Stream(ScalaJS.as.scala_collection_GenTraversableOnce(asTraversable.apply__O__O(this.head__O())).seq__Lscala_collection_TraversableOnce().toTraversable__Lscala_collection_Traversable(), asTraversable)
  }
});
ScalaJS.c.scala_collection_immutable_Stream.prototype.view__Lscala_collection_immutable_StreamView = (function() {
  return new ScalaJS.c.scala_collection_immutable_Stream$$anon$1().init___Lscala_collection_immutable_Stream(this)
});
ScalaJS.c.scala_collection_immutable_Stream.prototype.stringPrefix__T = (function() {
  return "Stream"
});
ScalaJS.c.scala_collection_immutable_Stream.prototype.toTraversable__Lscala_collection_GenTraversable = (function() {
  return this.toTraversable__Lscala_collection_Traversable()
});
ScalaJS.c.scala_collection_immutable_Stream.prototype.tail__Lscala_collection_LinearSeqOptimized = (function() {
  return ScalaJS.as.scala_collection_LinearSeqOptimized(this.tail__O())
});
ScalaJS.c.scala_collection_immutable_Stream.prototype.tail__Lscala_collection_immutable_Stream = (function() {
  return ScalaJS.as.scala_collection_immutable_Stream(this.tail__O())
});
ScalaJS.c.scala_collection_immutable_Stream.prototype.groupBy__Lscala_Function1__Lscala_collection_GenMap = (function(f) {
  return this.groupBy__Lscala_Function1__Lscala_collection_immutable_Map(f)
});
ScalaJS.c.scala_collection_immutable_Stream.prototype.toIterable__Lscala_collection_GenIterable = (function() {
  return this.toIterable__Lscala_collection_Iterable()
});
ScalaJS.c.scala_collection_immutable_Stream.prototype.view__I__I__Lscala_collection_TraversableView = (function(from, until) {
  return this.view__I__I__Lscala_collection_SeqView(from, until)
});
ScalaJS.c.scala_collection_immutable_Stream.prototype.view__I__I__Lscala_collection_IterableView = (function(from, until) {
  return this.view__I__I__Lscala_collection_SeqView(from, until)
});
ScalaJS.c.scala_collection_immutable_Stream.prototype.toSeq__Lscala_collection_GenSeq = (function() {
  return this.toSeq__Lscala_collection_immutable_Seq()
});
ScalaJS.c.scala_collection_immutable_Stream.prototype.toSeq__Lscala_collection_Seq = (function() {
  return this.toSeq__Lscala_collection_immutable_Seq()
});
ScalaJS.c.scala_collection_immutable_Stream.prototype.toCollection__O__Lscala_collection_Traversable = (function(repr) {
  return this.toCollection__Lscala_collection_LinearSeqLike__Lscala_collection_LinearSeq(ScalaJS.as.scala_collection_LinearSeqLike(repr))
});
ScalaJS.c.scala_collection_immutable_Stream.prototype.toCollection__O__Lscala_collection_Iterable = (function(repr) {
  return this.toCollection__Lscala_collection_LinearSeqLike__Lscala_collection_LinearSeq(ScalaJS.as.scala_collection_LinearSeqLike(repr))
});
ScalaJS.c.scala_collection_immutable_Stream.prototype.toCollection__O__Lscala_collection_Seq = (function(repr) {
  return this.toCollection__Lscala_collection_LinearSeqLike__Lscala_collection_LinearSeq(ScalaJS.as.scala_collection_LinearSeqLike(repr))
});
ScalaJS.c.scala_collection_immutable_Stream.prototype.thisCollection__Lscala_collection_Traversable = (function() {
  return this.thisCollection__Lscala_collection_LinearSeq()
});
ScalaJS.c.scala_collection_immutable_Stream.prototype.thisCollection__Lscala_collection_Iterable = (function() {
  return this.thisCollection__Lscala_collection_LinearSeq()
});
ScalaJS.c.scala_collection_immutable_Stream.prototype.thisCollection__Lscala_collection_Seq = (function() {
  return this.thisCollection__Lscala_collection_LinearSeq()
});
ScalaJS.c.scala_collection_immutable_Stream.prototype.seq__Lscala_collection_TraversableOnce = (function() {
  return this.seq__Lscala_collection_immutable_LinearSeq()
});
ScalaJS.c.scala_collection_immutable_Stream.prototype.seq__Lscala_collection_Traversable = (function() {
  return this.seq__Lscala_collection_immutable_LinearSeq()
});
ScalaJS.c.scala_collection_immutable_Stream.prototype.seq__Lscala_collection_Iterable = (function() {
  return this.seq__Lscala_collection_immutable_LinearSeq()
});
ScalaJS.c.scala_collection_immutable_Stream.prototype.seq__Lscala_collection_Seq = (function() {
  return this.seq__Lscala_collection_immutable_LinearSeq()
});
ScalaJS.c.scala_collection_immutable_Stream.prototype.seq__Lscala_collection_immutable_Traversable = (function() {
  return this.seq__Lscala_collection_immutable_LinearSeq()
});
ScalaJS.c.scala_collection_immutable_Stream.prototype.seq__Lscala_collection_immutable_Iterable = (function() {
  return this.seq__Lscala_collection_immutable_LinearSeq()
});
ScalaJS.c.scala_collection_immutable_Stream.prototype.seq__Lscala_collection_immutable_Seq = (function() {
  return this.seq__Lscala_collection_immutable_LinearSeq()
});
ScalaJS.c.scala_collection_immutable_Stream.prototype.seq__Lscala_collection_LinearSeq = (function() {
  return this.seq__Lscala_collection_immutable_LinearSeq()
});
ScalaJS.c.scala_collection_immutable_Stream.prototype.isDefinedAt__O__Z = (function(x) {
  return this.isDefinedAt__I__Z(ScalaJS.uI(x))
});
ScalaJS.c.scala_collection_immutable_Stream.prototype.dropRight__I__O = (function(n) {
  return this.dropRight__I__Lscala_collection_LinearSeqOptimized(n)
});
ScalaJS.c.scala_collection_immutable_Stream.prototype.apply__O__O = (function(v1) {
  return this.apply__I__O(ScalaJS.uI(v1))
});
ScalaJS.c.scala_collection_immutable_Stream.prototype.view__Lscala_collection_TraversableView = (function() {
  return this.view__Lscala_collection_immutable_StreamView()
});
ScalaJS.c.scala_collection_immutable_Stream.prototype.view__Lscala_collection_IterableView = (function() {
  return this.view__Lscala_collection_immutable_StreamView()
});
ScalaJS.c.scala_collection_immutable_Stream.prototype.view__Lscala_collection_SeqView = (function() {
  return this.view__Lscala_collection_immutable_StreamView()
});
ScalaJS.c.scala_collection_immutable_Stream.prototype.flatten__Lscala_Function1__Lscala_collection_GenTraversable = (function(asTraversable) {
  return this.flatten__Lscala_Function1__Lscala_collection_immutable_Stream(asTraversable)
});
ScalaJS.c.scala_collection_immutable_Stream.prototype.reverse__O = (function() {
  return this.reverse__Lscala_collection_immutable_Stream()
});
ScalaJS.c.scala_collection_immutable_Stream.prototype.distinct__O = (function() {
  return this.distinct__Lscala_collection_immutable_Stream()
});
ScalaJS.c.scala_collection_immutable_Stream.prototype.dropWhile__Lscala_Function1__O = (function(p) {
  return this.dropWhile__Lscala_Function1__Lscala_collection_immutable_Stream(p)
});
ScalaJS.c.scala_collection_immutable_Stream.prototype.takeWhile__Lscala_Function1__O = (function(p) {
  return this.takeWhile__Lscala_Function1__Lscala_collection_immutable_Stream(p)
});
ScalaJS.c.scala_collection_immutable_Stream.prototype.takeWhile__Lscala_Function1__Lscala_collection_LinearSeqOptimized = (function(p) {
  return this.takeWhile__Lscala_Function1__Lscala_collection_immutable_Stream(p)
});
ScalaJS.c.scala_collection_immutable_Stream.prototype.takeRight__I__O = (function(n) {
  return this.takeRight__I__Lscala_collection_immutable_Stream(n)
});
ScalaJS.c.scala_collection_immutable_Stream.prototype.init__O = (function() {
  return this.init__Lscala_collection_immutable_Stream()
});
ScalaJS.c.scala_collection_immutable_Stream.prototype.slice__I__I__O = (function(from, until) {
  return this.slice__I__I__Lscala_collection_immutable_Stream(from, until)
});
ScalaJS.c.scala_collection_immutable_Stream.prototype.slice__I__I__Lscala_collection_LinearSeqOptimized = (function(from, until) {
  return this.slice__I__I__Lscala_collection_immutable_Stream(from, until)
});
ScalaJS.c.scala_collection_immutable_Stream.prototype.drop__I__O = (function(n) {
  return this.drop__I__Lscala_collection_immutable_Stream(n)
});
ScalaJS.c.scala_collection_immutable_Stream.prototype.drop__I__Lscala_collection_LinearSeqOptimized = (function(n) {
  return this.drop__I__Lscala_collection_immutable_Stream(n)
});
ScalaJS.c.scala_collection_immutable_Stream.prototype.take__I__O = (function(n) {
  return this.take__I__Lscala_collection_immutable_Stream(n)
});
ScalaJS.c.scala_collection_immutable_Stream.prototype.take__I__Lscala_collection_LinearSeqOptimized = (function(n) {
  return this.take__I__Lscala_collection_immutable_Stream(n)
});
ScalaJS.c.scala_collection_immutable_Stream.prototype.withFilter__Lscala_Function1__Lscala_collection_generic_FilterMonadic = (function(p) {
  return this.withFilter__Lscala_Function1__Lscala_collection_immutable_Stream$StreamWithFilter(p)
});
ScalaJS.c.scala_collection_immutable_Stream.prototype.filter__Lscala_Function1__O = (function(p) {
  return this.filter__Lscala_Function1__Lscala_collection_immutable_Stream(p)
});
ScalaJS.c.scala_collection_immutable_Stream.prototype.loop$1__p4__Lscala_collection_immutable_Stream__T__T__V = (function(these, start, sep$1) {
  var _$this = this;
  tailCallLoop: while (true) {
    ScalaJS.modules.scala_Console().print__O__V(start);
    if (these.isEmpty__Z()) {
      ScalaJS.modules.scala_Console().print__O__V("empty");
      ScalaJS.modules.scala_runtime_BoxedUnit().UNIT__Lscala_runtime_BoxedUnit()
    } else {
      ScalaJS.modules.scala_Console().print__O__V(these.head__O());
      var temp$these = ScalaJS.as.scala_collection_immutable_Stream(these.tail__O());
      var temp$start = sep$1;
      these = temp$these;
      start = temp$start;
      continue tailCallLoop;
      ScalaJS.modules.scala_runtime_BoxedUnit().UNIT__Lscala_runtime_BoxedUnit()
    };
    return undefined
  }
});
ScalaJS.c.scala_collection_immutable_Stream.prototype.loop$2__p4__Lscala_collection_immutable_Stream__Z = (function(s) {
  var _$this = this;
  tailCallLoop: while (true) {
    if (s.isEmpty__Z()) {
      return true
    } else {
      if (s.tailDefined__Z()) {
        s = ScalaJS.as.scala_collection_immutable_Stream(s.tail__O());
        continue tailCallLoop
      } else {
        return false
      }
    }
  }
});
ScalaJS.c.scala_collection_immutable_Stream.prototype.loop$3__p4__T__Lscala_collection_immutable_Stream__Lscala_collection_mutable_StringBuilder__T__T__V = (function(pre, these, b$1, sep$2, end$1) {
  var _$this = this;
  tailCallLoop: while (true) {
    if (these.isEmpty__Z()) {
      b$1.append__T__Lscala_collection_mutable_StringBuilder(end$1);
      ScalaJS.modules.scala_runtime_BoxedUnit().UNIT__Lscala_runtime_BoxedUnit()
    } else {
      b$1.append__T__Lscala_collection_mutable_StringBuilder(pre).append__O__Lscala_collection_mutable_StringBuilder(these.head__O());
      if (these.tailDefined__Z()) {
        var temp$pre = sep$2;
        var temp$these = ScalaJS.as.scala_collection_immutable_Stream(these.tail__O());
        pre = temp$pre;
        these = temp$these;
        continue tailCallLoop;
        ScalaJS.modules.scala_runtime_BoxedUnit().UNIT__Lscala_runtime_BoxedUnit()
      } else {
        b$1.append__T__Lscala_collection_mutable_StringBuilder(sep$2).append__T__Lscala_collection_mutable_StringBuilder("?").append__T__Lscala_collection_mutable_StringBuilder(end$1);
        ScalaJS.modules.scala_runtime_BoxedUnit().UNIT__Lscala_runtime_BoxedUnit()
      }
    };
    return undefined
  }
});
ScalaJS.c.scala_collection_immutable_Stream.prototype.scala$collection$immutable$Stream$$loop$4__Lscala_collection_immutable_Set__Lscala_collection_immutable_Stream__Lscala_collection_immutable_Stream = (function(seen, rest) {
  var _$this = this;
  tailCallLoop: while (true) {
    if (rest.isEmpty__Z()) {
      return rest
    } else {
      if (seen.apply__O__Z(rest.head__O())) {
        rest = ScalaJS.as.scala_collection_immutable_Stream(rest.tail__O());
        continue tailCallLoop
      } else {
        return ScalaJS.modules.scala_collection_immutable_Stream$cons().apply__O__Lscala_Function0__Lscala_collection_immutable_Stream$Cons(rest.head__O(), new ScalaJS.c.scala_scalajs_runtime_AnonFunction0().init___Lscala_scalajs_js_Function0((function(arg$outer, seen$1, rest$2) {
          return (function() {
            return arg$outer.scala$collection$immutable$Stream$$loop$4__Lscala_collection_immutable_Set__Lscala_collection_immutable_Stream__Lscala_collection_immutable_Stream(ScalaJS.as.scala_collection_immutable_Set(seen$1.$$plus__O__Lscala_collection_Set(rest$2.head__O())), ScalaJS.as.scala_collection_immutable_Stream(rest$2.tail__O()))
          })
        })(_$this, seen, rest)))
      }
    }
  }
});
ScalaJS.c.scala_collection_immutable_Stream.prototype.scala$collection$immutable$Stream$$loop$5__I__Lscala_collection_immutable_Stream__O__Lscala_collection_immutable_Stream = (function(len, these, elem$1) {
  if (these.isEmpty__Z()) {
    return ScalaJS.modules.scala_collection_immutable_Stream().fill__I__Lscala_Function0__Lscala_collection_immutable_Stream(len, new ScalaJS.c.scala_scalajs_runtime_AnonFunction0().init___Lscala_scalajs_js_Function0((function(elem$1) {
      return (function() {
        return elem$1
      })
    })(elem$1)))
  } else {
    return ScalaJS.modules.scala_collection_immutable_Stream$cons().apply__O__Lscala_Function0__Lscala_collection_immutable_Stream$Cons(these.head__O(), new ScalaJS.c.scala_scalajs_runtime_AnonFunction0().init___Lscala_scalajs_js_Function0((function(arg$outer, elem$1, len$1, these$1) {
      return (function() {
        return arg$outer.scala$collection$immutable$Stream$$loop$5__I__Lscala_collection_immutable_Stream__O__Lscala_collection_immutable_Stream((len$1 - 1), ScalaJS.as.scala_collection_immutable_Stream(these$1.tail__O()), elem$1)
      })
    })(this, elem$1, len, these)))
  }
});
ScalaJS.c.scala_collection_immutable_Stream.prototype.scala$collection$immutable$Stream$$flatten1$1__Lscala_collection_Traversable__Lscala_Function1__Lscala_collection_immutable_Stream = (function(t, asTraversable$1) {
  if ((!t.isEmpty__Z())) {
    return ScalaJS.modules.scala_collection_immutable_Stream$cons().apply__O__Lscala_Function0__Lscala_collection_immutable_Stream$Cons(t.head__O(), new ScalaJS.c.scala_scalajs_runtime_AnonFunction0().init___Lscala_scalajs_js_Function0((function(arg$outer, asTraversable$1, t$1) {
      return (function() {
        return arg$outer.scala$collection$immutable$Stream$$flatten1$1__Lscala_collection_Traversable__Lscala_Function1__Lscala_collection_immutable_Stream(ScalaJS.as.scala_collection_Traversable(t$1.tail__O()), asTraversable$1)
      })
    })(this, asTraversable$1, t)))
  } else {
    return ScalaJS.as.scala_collection_immutable_Stream(this.tail__O()).flatten__Lscala_Function1__Lscala_collection_immutable_Stream(asTraversable$1)
  }
});
ScalaJS.c.scala_collection_immutable_Stream.prototype.init___ = (function() {
  ScalaJS.c.scala_collection_AbstractSeq.prototype.init___.call(this);
  ScalaJS.impls.scala_collection_immutable_Traversable$class__$init$__Lscala_collection_immutable_Traversable__V(this);
  ScalaJS.impls.scala_collection_immutable_Iterable$class__$init$__Lscala_collection_immutable_Iterable__V(this);
  ScalaJS.impls.scala_collection_immutable_Seq$class__$init$__Lscala_collection_immutable_Seq__V(this);
  ScalaJS.impls.scala_collection_LinearSeqLike$class__$init$__Lscala_collection_LinearSeqLike__V(this);
  ScalaJS.impls.scala_collection_LinearSeq$class__$init$__Lscala_collection_LinearSeq__V(this);
  ScalaJS.impls.scala_collection_immutable_LinearSeq$class__$init$__Lscala_collection_immutable_LinearSeq__V(this);
  ScalaJS.impls.scala_collection_LinearSeqOptimized$class__$init$__Lscala_collection_LinearSeqOptimized__V(this);
  return this
});
ScalaJS.c.scala_collection_immutable_Stream.prototype.toCollection__Lscala_collection_LinearSeqLike__ = (function(repr) {
  return this.toCollection__Lscala_collection_LinearSeqLike__Lscala_collection_LinearSeq(repr)
});
ScalaJS.c.scala_collection_immutable_Stream.prototype.scala$collection$LinearSeqOptimized$$super$sameElements__Lscala_collection_GenIterable__ = (function(that) {
  return ScalaJS.bZ(this.scala$collection$LinearSeqOptimized$$super$sameElements__Lscala_collection_GenIterable__Z(that))
});
ScalaJS.c.scala_collection_immutable_Stream.prototype.scala$collection$immutable$Stream$$flatten1$1__Lscala_collection_Traversable__Lscala_Function1__ = (function(t, asTraversable$1) {
  return this.scala$collection$immutable$Stream$$flatten1$1__Lscala_collection_Traversable__Lscala_Function1__Lscala_collection_immutable_Stream(t, asTraversable$1)
});
ScalaJS.c.scala_collection_immutable_Stream.prototype.scala$collection$immutable$Stream$$loop$5__I__Lscala_collection_immutable_Stream__O__ = (function(len, these, elem$1) {
  return this.scala$collection$immutable$Stream$$loop$5__I__Lscala_collection_immutable_Stream__O__Lscala_collection_immutable_Stream(len, these, elem$1)
});
ScalaJS.c.scala_collection_immutable_Stream.prototype.scala$collection$immutable$Stream$$loop$4__Lscala_collection_immutable_Set__Lscala_collection_immutable_Stream__ = (function(seen, rest) {
  return this.scala$collection$immutable$Stream$$loop$4__Lscala_collection_immutable_Set__Lscala_collection_immutable_Stream__Lscala_collection_immutable_Stream(seen, rest)
});
ScalaJS.c.scala_collection_immutable_Stream.prototype.scala$collection$immutable$Stream$$isStreamBuilder__Lscala_collection_generic_CanBuildFrom__ = (function(bf) {
  return ScalaJS.bZ(this.scala$collection$immutable$Stream$$isStreamBuilder__Lscala_collection_generic_CanBuildFrom__Z(bf))
});
ScalaJS.c.scala_collection_immutable_Stream.prototype.scala$collection$immutable$Stream$$asStream__O__ = (function(x) {
  return this.scala$collection$immutable$Stream$$asStream__O__Lscala_collection_immutable_Stream(x)
});
ScalaJS.c.scala_collection_immutable_Stream.prototype.scala$collection$immutable$Stream$$asThat__O__ = (function(x$2) {
  return this.scala$collection$immutable$Stream$$asThat__O__O(x$2)
});
ScalaJS.c.scala_collection_immutable_Stream.prototype.print__T__ = (function(sep) {
  return ScalaJS.bV(this.print__T__V(sep))
});
ScalaJS.c.scala_collection_immutable_Stream.prototype.print__ = (function() {
  return ScalaJS.bV(this.print__V())
});
ScalaJS.c.scala_collection_immutable_Stream.prototype.force__ = (function() {
  return this.force__Lscala_collection_immutable_Stream()
});
ScalaJS.c.scala_collection_immutable_Stream.prototype.append__Lscala_Function0__ = (function(rest$2) {
  return this.append__Lscala_Function0__Lscala_collection_immutable_Stream(rest$2)
});
ScalaJS.c.scala_collection_immutable_Stream.prototype.tailDefined__ = (function() {
  return ScalaJS.bZ(this.tailDefined__Z())
});
/** @constructor */
ScalaJS.inheritable.scala_collection_immutable_Stream = (function() {
  /*<skip>*/
});
ScalaJS.inheritable.scala_collection_immutable_Stream.prototype = ScalaJS.c.scala_collection_immutable_Stream.prototype;
ScalaJS.is.scala_collection_immutable_Stream = (function(obj) {
  return (!(!((obj && obj.$classData) && obj.$classData.ancestors.scala_collection_immutable_Stream)))
});
ScalaJS.as.scala_collection_immutable_Stream = (function(obj) {
  if ((ScalaJS.is.scala_collection_immutable_Stream(obj) || (obj === null))) {
    return obj
  } else {
    ScalaJS.throwClassCastException(obj, "scala.collection.immutable.Stream")
  }
});
ScalaJS.isArrayOf.scala_collection_immutable_Stream = (function(obj, depth) {
  return (!(!(((obj && obj.$classData) && (obj.$classData.arrayDepth === depth)) && obj.$classData.arrayBase.ancestors.scala_collection_immutable_Stream)))
});
ScalaJS.asArrayOf.scala_collection_immutable_Stream = (function(obj, depth) {
  if ((ScalaJS.isArrayOf.scala_collection_immutable_Stream(obj, depth) || (obj === null))) {
    return obj
  } else {
    ScalaJS.throwArrayCastException(obj, "Lscala.collection.immutable.Stream;", depth)
  }
});
ScalaJS.data.scala_collection_immutable_Stream = new ScalaJS.ClassTypeData({
  scala_collection_immutable_Stream: 0
}, false, "scala.collection.immutable.Stream", ScalaJS.data.scala_collection_AbstractSeq, {
  scala_collection_immutable_Stream: 1,
  scala_collection_LinearSeqOptimized: 1,
  scala_collection_immutable_LinearSeq: 1,
  scala_collection_LinearSeq: 1,
  scala_collection_LinearSeqLike: 1,
  scala_collection_immutable_Seq: 1,
  scala_collection_immutable_Iterable: 1,
  scala_collection_immutable_Traversable: 1,
  scala_Immutable: 1,
  scala_collection_AbstractSeq: 1,
  scala_collection_Seq: 1,
  scala_collection_SeqLike: 1,
  scala_collection_GenSeq: 1,
  scala_collection_GenSeqLike: 1,
  scala_PartialFunction: 1,
  scala_Function1: 1,
  scala_collection_AbstractIterable: 1,
  scala_collection_Iterable: 1,
  scala_collection_IterableLike: 1,
  scala_Equals: 1,
  scala_collection_GenIterable: 1,
  scala_collection_GenIterableLike: 1,
  scala_collection_AbstractTraversable: 1,
  scala_collection_Traversable: 1,
  scala_collection_GenTraversable: 1,
  scala_collection_generic_GenericTraversableTemplate: 1,
  scala_collection_TraversableLike: 1,
  scala_collection_GenTraversableLike: 1,
  scala_collection_Parallelizable: 1,
  scala_collection_TraversableOnce: 1,
  scala_collection_GenTraversableOnce: 1,
  scala_collection_generic_FilterMonadic: 1,
  scala_collection_generic_HasNewBuilder: 1,
  java_lang_Object: 1
});
ScalaJS.c.scala_collection_immutable_Stream.prototype.$classData = ScalaJS.data.scala_collection_immutable_Stream;
//@ sourceMappingURL=Stream.js.map


text:
@extends('admin.auth._auth-actions')

@section('js-init')
{!! Theme::js('admin/dist/pages/login.js') !!}
@endsection

@section('content')

    <form class="login-form active" action="" method="post" accept-charset="utf-8">
        {!! csrf_field() !!}

Login

            Username
            <input class="form-control form-control-solid placeholder-no-fix" type="text" required autocomplete="off" placeholder="Username" name="username" />

            Password
            <input class="form-control form-control-solid placeholder-no-fix" type="password" required autocomplete="off" placeholder="Password" name="password" />

            <button type="submit" class="btn green uppercase">

                Confirm
            </button>

    </form>

@endsection


text:
- [http://lab.hakim.se/]() 很好的动画效果

- [http://opengameart.org/](): 游戏图标,资源

- [http://jankfree.org/](): 性能

- safari html5 audio and video guide
- tictactoe with html5 offline storage
- safari web inspector guide
- safari css visual effects guide
- safari css reference

### css3 the missing manual推荐资源

- http://bradfrostweb.com/blog/web/responsive-nav-patterns/
- http://bradfrost.com/blog/web/complex-navigation-patterns-for-responsive-design/
- www.lukew.com/ff/entry.asp?1514
- fluid images:http://adaptive-images.com

###  好的网站

- [http://24ways.org/]()
- [http://html5doctor.com/]()
- [http://diveintohtml5.info/]()

### 待翻译文章

- [http://www.html5rocks.com/en/mobile/responsivedesign/]()

## todo

- [http://tympanus.net/Development/CreativeGooeyEffects/menu.html]()
- [https://github.com/hammerjs/hammer.js]()
- [https://babeljs.io/]()
- [https://leanpub.com/exploring-es6/read]()
- [http://www.sitepoint.com/emerging-patterns-javascript-event-handling/]()
- css: user-select
- iframe标签的使用
- 页面嵌入视频
- apache服务器mod_gzip/mod_deflate
- javascript Automatic Semicolon Insertion
- Learning JavaScript Design Patterns
- scalable and modular architechture for css
- jsdoc
- git操作
- github操作
- Functional JavaScript: Introducing Functional Programming with Underscore.js
- JavaScript Enlightenment
- glob模式匹配
- sass
- less
- amd
- http://rmurphey.com/blog/2009/10/15/using-objects-to-organize-your-code/
- http://benalman.com/news/2010/11/immediately-invoked-function-expression/
- REST API
- http://cwbuecheler.com/web/tutorials/2013/node-express-mongo/
- http://cwbuecheler.com/web/tutorials/2014/restful-web-app-node-express-mongodb/

## done

- [博客更新: 响应式切换菜单](http://qiudeqing.com/mobile_web/2015/05/22/responsive-toggle-menu.html)
- [博客更新: [译]剪切和复制命令](http://qiudeqing.com/html5/2015/05/19/cut-and-copy-commands.html)
- [博客更新: drag and drop](http://qiudeqing.com/html5/2015/05/17/drag-and-drop.html)
- [淘宝账号退出插件](https://github.com/qiu-deqing/logout)
- [microformat](https://github.com/qiu-deqing/qiu-deqing.github.io/blob/master/blog/html/microformat.md)
- [maintainable javascript读书笔记](https://github.com/qiu-deqing/qiu-deqing.github.io/blob/master/blog/js/maintainable-javascript.md)
- [usemap generator本地化:image map可视化工具](https://github.com/qiu-deqing/imagemap-generator)


text:
require "spec_helper"

describe Geometry::Point do
  describe ".new" do
    it "should create new instance with given abscissa and ordinate" do
      point = Geometry::Point.new(0,0)
      expect(point.abscissa).to eq(0)
      expect(point.ordinate).to eq(0)
    end

    it "should raise ArgumentError when one or more arguments are absent" do
      expect {
        Geometry::Point.new(5)
      }.to raise_error(ArgumentError)

      expect {
        Geometry::Point.new
      }.to raise_error(ArgumentError)
    end
  end

  context "Equality" do
    describe "#==" do
      it "should not be equal to nil" do
        point = Geometry::Point.new(0, 0)
        expect(point).to_not eq(nil)
      end

      it "should not be equal to any object of different type" do
        point = Geometry::Point.new(0, 0)
        sample_object = Object.new
        expect(point == sample_object).to eq(false)
      end

      context "should possess reflexive property" do
        it "should be equal to itself" do
          point = Geometry::Point.new(0, 0)
          expect(point).to eq(point)
        end
      end

      context "should possess symmetric property" do
        let(:point) { Geometry::Point.new(1, 2) }
        let(:other_point) { Geometry::Point.new(1, 2) }

        it "should be equal to other point" do
          expect(point).to eq(other_point)
        end
        it "should respond with equality when ask from other point" do
          expect(other_point).to eq(point)
        end
      end

      context "should possess transitivity property" do
        let(:point) { Geometry::Point.new(1, 2) }
        let(:other_point) { Geometry::Point.new(1, 2) }
        let(:another_point) { Geometry::Point.new(1, 2) }

        it "should be equal to other point" do
          expect(point).to eq(other_point)
        end
        it "should be equal to another point" do
          expect(point).to eq(another_point)
        end
        it "should satisfy equality for other and another point" do
          expect(other_point).to eq(another_point)
        end
      end
    end

    describe "#eql?" do
      it "should satisfy equality for point and other point when equal" do
        point = Geometry::Point.new(0, 0)
        other_point = Geometry::Point.new(0, 0)
        expect(point.eql?(other_point)).to be_truthy
      end

      it "should NOT satisfy equality for point and other point when NOT equal" do
        point = Geometry::Point.new(0, 0)
        other_point = Geometry::Point.new(0, 1)
        expect(point.eql?(other_point)).to be_falsey
      end
    end

    describe "#hash" do
      it "should generate same hash for point and other point when equal" do
        point = Geometry::Point.new(0, 0)
        other_point = Geometry::Point.new(0, 0)
        expect(point.hash).to eq(other_point.hash)
      end

      it "should generate different hash for point and other point when NOT equal" do
        point = Geometry::Point.new(0, 0)
        other_point = Geometry::Point.new(0, 1)
        expect(point.hash).to_not eq(other_point.hash)
      end
    end
  end

  describe "#distance_between_2_points" do
    it "should return 0 when given 2 equal abscissas and ordinates" do
      point = Geometry::Point.new(0,0)
      another_point = Geometry::Point.new(0,0)
      expect(point.distance_between_2_points(another_point)).to eq(0)
    end

    it "should return 2 when given points are (0,2) and (0,0)" do
      point = Geometry::Point.new(0,2)
      another_point = Geometry::Point.new(0,0)
      expect(point.distance_between_2_points(another_point)).to eq(2)
    end

    it "should return 5 when given points are (1,0) and (5,3)" do
      point = Geometry::Point.new(1,0)
      another_point = Geometry::Point.new(5,3)
      expect(point.distance_between_2_points(another_point)).to eq(5)
    end

    it "should return square root of 2 when given points are (2,1) and (3,2)" do
      point = Geometry::Point.new(2,1)
      another_point = Geometry::Point.new(3,2)
      expect(point.distance_between_2_points(another_point)).to eq(Math.sqrt(2))
    end

    it "should return 5 when given points are (1,1) and (-2,-3)" do
      point = Geometry::Point.new(1,1)
      another_point = Geometry::Point.new(-2,-3)
      expect(point.distance_between_2_points(another_point)).to eq(5)
    end
  end
 end


text:
function onload(){

}

$(document).keypress(function(e) {
  if(e.which == 13) {
     console.log("Enter press");
        talk();
  }
});
function talk(){
	var ipF = document.getElementById("ipF").value;
	var portF = document.getElementById("portF").value;
	var ip = document.getElementById("ip").value;
	var port = document.getElementById("port").value;
	var text = document.getElementById("text").value;
	var url = ("http://"+ipF+":"+portF+"/"+ip+"/"+port+"/"+text+"");
	console.log(url);
	$.ajax({
  type: "POST",
  url: url
}).done(function( o ) {
   console.log(o);
});
}

// -------------------------------------------------------- PHP Kod
/* $.post( "php/php.php",   {
		value: "test",
		value2: "test2"
		},
	function( data ) {
		console.log(data);

	}); */


text:
#ifndef XENIA_BASE_ARENA_H_
#define XENIA_BASE_ARENA_H_

#include <cstddef>
#include <cstdint>
#include <vector>

namespace xe {

class Arena {
 public:
  Arena(size_t chunk_size = 4 * 1024 * 1024);
  ~Arena();

  void Reset();
  void DebugFill();

  void* Alloc(size_t size);
  template <typename T>
  T* Alloc() {
    return reinterpret_cast<T*>(Alloc(sizeof(T)));
  }
  void Rewind(size_t size);

  void* CloneContents();
  template <typename T>
  void CloneContents(std::vector<T>& buffer) {
    buffer.resize(CalculateSize() / sizeof(T));
    CloneContents(buffer.data(), buffer.size() * sizeof(T));
  }

 private:
  class Chunk {
   public:
    Chunk(size_t chunk_size);
    ~Chunk();

    Chunk* next;

    size_t capacity;
    uint8_t* buffer;
    size_t offset;
  };

  size_t CalculateSize();
  void CloneContents(void* buffer, size_t buffer_length);

  size_t chunk_size_;
  Chunk* head_chunk_;
  Chunk* active_chunk_;
};

}  // namespace xe

#endif  // XENIA_BASE_ARENA_H_


text:
Your job is to write a function which increments a string, to create a new string. If the string already ends with a number, the number should be incremented by 1. If the string does not end with a number the number 1 should be appended to the new string.

Examples:

```javascript
foo -> foo1
foobar23 -> foobar24
foo0042 -> foo0043
foo9 -> foo10
foo099 -> foo100
```

Attention: If the number has leading zeros the amount of digits should be considered.


text:
layout: default
title: titles.banners-for-supporters
permalink: banners-for-supporters/
color: "#F44336"
---

 {% include general/top-section.html %}

 {% include banners-for-supporters/banners-for-supporters.html %}


text:
@interface BIIncludeHandler : NSObject <BIBuilderHandler>
@end


text:
from swgpy.object import *

def create(kernel):
	result = Tangible()

	result.template = "object/tangible/terminal/shared_terminal_elevator_up.iff"
	result.attribute_template_id = -1
	result.stfName("terminal_name","terminal_elevator")

	#### BEGIN MODIFICATIONS ####
	result.setStringAttribute("radial_filename", "radials/elevator.py")
	result.setIntAttribute("elevator_can_go_up", 0)
	####  END MODIFICATIONS  ####

	return result


text:
extern unsigned int pmatch(const char *, const char *, unsigned int);

#endif


text:
using System;
using System.Collections.Generic;
using System.Text;

namespace CodingChick.UdemyUniversal.Models
{
    public class ReviewsListPage
    {
        public List<Review> Data { get; set; }
        public Pagination Pagination { get; set; }
    }
}


text:
var BigTextWizard = {
    LINE_HEIGHT_STYLE_ID: 'bigtext-wizard-lineheight-styleinjection',
    CUSTOM_STYLE_ID: 'bigtext-wizard-styleinjection',
    DEFAULT_TEXT: '',
    loadedFonts: {},
    fontUrls: {
        'LeagueGothicRegular': 'css/league-gothic/stylesheet.css',
        'Droid Sans': 'http://fonts.googleapis.com/css?family=Droid+Sans',
        'Yanone Kaffeesatz': 'http://fonts.googleapis.com/css?family=Yanone+Kaffeesatz',
        'Molengo': 'http://fonts.googleapis.com/css?family=Molengo',
        'Droid Sans Mono': 'http://fonts.googleapis.com/css?family=Droid+Sans+Mono',
        'Arvo': 'http://fonts.googleapis.com/css?family=Arvo:regular,bold',
        'Arimo': 'http://fonts.googleapis.com/css?family=Arimo',
        'Puritan': 'http://fonts.googleapis.com/css?family=Puritan',
        'IM Fell English': 'http://fonts.googleapis.com/css?family=IM+Fell+English'
    },
    clear: function(ignoreFocus)
    {
        var cleared = $('
').html(BigTextWizard.DEFAULT_TEXT);
        $('#bigtext').empty().append(cleared);
        BigTextWizard._init();
        cleared.trigger('focus');
    },
    _init: function()
    {
        var $bt = $('#bigtext');
        $bt.bigtext();

        BigTextWizard.initializeLineHeights();
        BigTextWizard.initEditable.call($bt.find('> div'));
    },
    init: function()
    {
        var fontFamily = $('#font').val();
        if(BigTextWizard.loadedFonts[fontFamily]) {
            BigTextWizard._init();
        } else {
            BigTextWizard.loadFont(fontFamily, BigTextWizard._init);
        }
    },
    initEditable: function()
    {
        return this.attr({
                contenteditable: true,
                spellcheck: false
            })
            .unbind('keypress keyup, blur')
            .bind('keypress', function(event)
            {
                var $t = $(this);
                if(event.which == 13) {
                    var element;

                    if(!event.shiftKey) {
                        element = $t.nextAll().eq(0);
                        if(!element.length) {
                            element = BigTextWizard.initEditable.call($('
')).appendTo($t.parent());
                        }
                    } else {
                        element = $t.prevAll().eq(0);
                    }

                    // IE8 wasn't letting focus here without a timeout.
                    if($.browser.msie && $.browser.version <= 8) {
                        window.setTimeout(function() {
                            element.trigger('focus');
                        }, 100);
                    } else {
                        element.trigger('focus');
                    }
                    return false;
                }
            }).bind('keyup', $.throttle(250, function()
            {
                var $t = $(this);
                if($t.text() && $t.text() != BigTextWizard.DEFAULT_TEXT) {
                    $t.parent().removeClass('blurred');
                }

                $t.parent().bigtext();
            })).bind('blur', function()
            {
                var $t = $(this);
                if(!$.trim($t.text()) && $t.siblings().length > 0) {
                    $t.remove();
                }

                BigTextWizard.initializeLineHeights();
            });
    },
    generateStyleTag: function(id, css)
    {
        return $('
').attr('id', id).html('');
    },
    transform3dEvent: function() {
        BigTextWizard.rotate3d.call($('#bigtext'), $('#3d-x-slider').is(':checked') ? 1 : 0, $('#3d-y-slider').is(':checked') ? 1 : 0, $('#3d-z-slider').is(':checked') ? 1 : 0, $('#3d-angle-slider').slider('value') + 'deg');
    },
    rotate3d: function(x, y, z, angle) {
        // front: -90 < x, y < 90
        this.css('-webkit-transform', 'rotate3d(' + x + ',' + y + ',' + z + ',' + angle + ')');
    },
    translate: function(x, y, z)
    {
        var existingTransform = this.css('-webkit-transform') || ''; //rotate3d(0, 0, 0, 0deg)';

        this.css('-webkit-transform', (existingTransform ? existingTransform + ' ' : '') +
                                        'translate3d(' + (x ? x + 'px' : '0') + ',' + (y ? y + 'px' : '0') + ',' + (z ? z + 'px' : '0') + ')');
    },
    resetTransform: function()
    {
        $('#bigtext').css('-webkit-transform', '');
    },
    loadFont: function(fontFamily, callback)
    {
         WebFont.load({
            custom: {
                families: [fontFamily],
                urls : [BigTextWizard.fontUrls[fontFamily]]
            },
            active: function() {
                BigTextWizard.loadedFonts[fontFamily] = true;
                callback();
            }
        });
    },
    setCustomStyle: function()
    {
        var fontFace = $('#font').val();
        $('#' + BigTextWizard.CUSTOM_STYLE_ID).remove();
        BigTextWizard.generateStyleTag(BigTextWizard.CUSTOM_STYLE_ID, [$('#customStyle').val(),
                                                                        (fontFace ? '\n.bigtext { font-family: \'' + fontFace + '\'; }' : '')])
                        .appendTo('head');
    },
    setHtml: function()
    {
        function clean(html)
        {
            return (html || '').replace(/</g, '<').replace(/>/g, '>');
        }

        var fontFace = $('#font').val();
        $('#code').html(clean([
                        '<!doctype html>',
                        '',
                        '',
                            '<meta charset="utf-8"/>',
                            (fontFace ? '<link type="text/css" rel="stylesheet" href="' + BigTextWizard.fontUrls[fontFace] + '"/>' : ''),
                            '',
                        '',
                        '',
                        '
',
                        $('#bigtext').html(),
                        '
',
                        '',
                        ''].join('\n')));
    },
    setLineHeightCss: function()
    {
        $('#' + BigTextWizard.LINE_HEIGHT_STYLE_ID).remove();

        BigTextWizard.generateStyleTag(BigTextWizard.LINE_HEIGHT_STYLE_ID, $.makeArray($('#lineHeightSliders').find('> div').map(function(n)
        {
            var lineHeight = $(this).slider('value');
            return lineHeight !== 1 ? '.bigtext > .' + BigText.LINE_CLASS_PREFIX + (n+1) + ' { line-height: ' + lineHeight + 'em; }' : null;
        }))).appendTo('head');
    },
    initializeLineHeights: function()
    {
        var $sliders = $('#lineHeightSliders'),
            $lines = $('#bigtext > div');

        if($lines.length < 2) {
            $sliders.html('Add another line!');
            return;
        } else if($lines.length == $sliders.find('> div.ui-slider').length - 1) {
            return;
        }

        $sliders.empty();

        $lines.each(function(lineNumber)
        {
            if(!lineNumber) {
                return;
            }

            $('
').appendTo($sliders).slider({
                min: 0,
                max: 2,
                step: .05,
                value: 1,
                orientation: 'vertical',
                range: 'min',
                animate: true
            }).bind('slidechange', function() {
                BigTextWizard.setLineHeightCss();
            });
        });
    }
};

$('#widthSlider').slider({
    min: 260,
    max: 1024,
    range: 'min',
    value: 430
}).bind('slidechange', function() {
    var value = $(this).slider('value');
    $('#posterWidth').html(value);
    $('#bigtext').width(value).find('div').each(function() {
        $(this).removeAttr('style').removeAttr('class');
    });

    BigTextWizard.init();
});

$('#customStyle').bind('change', function() {
    BigTextWizard.setCustomStyle();
    BigTextWizard.init();
});

$('#clear').button().bind('click', BigTextWizard.clear);

$('#refresh').button().bind('click', BigTextWizard.init);

$('#font').bind('change', function()
{
    BigTextWizard.setCustomStyle();
    BigTextWizard.init();
});

$('#tabs').tabs();

$('#3d-angle-slider').slider({
    min: -70,
    max: 70,
    range: 'min',
    value: 0,
    step: 1
}).bind('slidechange', function()
{
    var deg = $(this).slider('value') ;
    $('#3d-angle-value').html(deg + ' degree' + (deg != 1 ? 's' : ''));
    BigTextWizard.transform3dEvent();
});

$('#3d-animate-slider').bind('change', function()
{
    $('#bigtext').toggleClass('animate3d');
});
$('#tabs-3d .dimension-slider').bind('change', BigTextWizard.transform3dEvent);

$('#reset-3d').button().bind('click', function()
{
    $('#3d-angle-slider').slider('value', 0);
});

$('#random-3d').button().bind('click', function()
{
    if(Math.round(Math.random())) {
        $('#3d-x-slider').attr('checked', 'checked');
    } else {
        $('#3d-x-slider').removeAttr('checked');
    }

    if(Math.round(Math.random())) {
        $('#3d-y-slider').attr('checked', 'checked');
    } else {
        $('#3d-y-slider').removeAttr('checked');
    }

    if(Math.round(Math.random())) {
        $('#3d-z-slider').attr('checked', 'checked');
    } else {
        $('#3d-z-slider').removeAttr('checked');
    }

    // Setting the value triggers slidechange, which triggers transform3dEvent
    $('#3d-angle-slider').slider('value', Math.round(Math.random()*180) - 90);
});

$('#translate-buttons button').button().bind('click', function()
{
    var id = $(this).attr('id'),
        AMOUNT = 200,
        x = 0,
        y = 0,
        z = 0;

    switch(id) {
        case 'translate-x-minus':
            x = -1*AMOUNT;
            break;
        case 'translate-x-plus':
            x = AMOUNT;
            break;
        case 'translate-y-minus':
            y = -1*AMOUNT;
            break;
        case 'translate-y-plus':
            y = AMOUNT;
            break;
        case 'translate-z-minus':
            z = -1*AMOUNT;
            break;
        case 'translate-z-plus':
            z = AMOUNT;
            break;
    }

    BigTextWizard.translate.call($('#bigtext'), x, y, z);
});

$(window).bind('click', function(event)
{
    if(!$(event.target).closest('#toolbar').length) {
        $('#bigtext > div').eq(0).trigger('focus');
    }
}).bind('load', function()
{
    BigTextWizard.setCustomStyle();
    BigTextWizard.init();

    $('#3d-animate-slider').trigger('click').trigger('change');
}).bind('keydown', function(event)
{
    // Keyboard shortcuts
    if(event.ctrlKey && event.altKey) {
        var $bigtext = $('#bigtext');

        switch(event.which) {
            case 90: // z
                BigTextWizard.clear();
                return false;
            case 67: // c
                $('body').toggleClass('bigtextWizardWhite').toggleClass('bigtextWizardBlack');
                return false;
            case 88: // x
                $('#random-3d').trigger('click');
                return false;
            case 37: // left arrow
                BigTextWizard.rotate3d.call($bigtext, 0, 0, 1, '-90deg');
                return false;
            case 39: // right arrow
                BigTextWizard.rotate3d.call($bigtext, 0, 0, 1, '90deg');
                return false;
            case 82: // r
                $('#reset-3d').trigger('click');
                return false;
            case 32: // space
            case 13: // enter
                $bigtext.removeClass('fadeIn').addClass('fadeOut');
                    //.find('> div').eq(0).trigger('focus');

                window.setTimeout(function()
                {
                    if(event.which == 32) {
                        $('#random-3d').trigger('click');
                    }
                    BigTextWizard.clear();
                    $bigtext.removeClass('fadeOut').addClass('fadeIn');
                }, 200);

                return false;
        }
    }
});


text:
package org.broadinstitute.sting.gatk.walkers;

import java.lang.annotation.*;

/**
 * Allows the walker to indicate how to partition data it wants to consume.
 */
@Documented
@Inherited
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.TYPE)
public @interface PartitionBy {
    PartitionType value();
}


text:
package com.topview.fdedu.base.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * 视图控制器,返回jsp视图给前端
 *
 * @author StarZou
 * @since 2014年5月28日 下午4:00:49
 **/
@Controller
@RequestMapping("/page")
public class PageController {

    /**
     * 登录页
     */
    @RequestMapping("/login")
    public String login() {
        return "login";
    }

    /**
     * dashboard页
     */
    @RequestMapping("/dashboard")
    public String dashboard() {
        return "dashboard";
    }

    /**
     * 404页
     */
    @RequestMapping("/404")
    public String error404() {
        return "404";
    }

    /**
     * 401页
     */
    @RequestMapping("/401")
    public String error401() {
        return "401";
    }

    /**
     * 500页
     */
    @RequestMapping("/500")
    public String error500() {
        return "500";
    }

}


text:
// Copyright (c) 2012 Ecma International.  All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.

/*---
info: >
    15.5.5.2 defines [[GetOwnProperty]] for Strings. It supports using indexing
    notation to look up non numeric property names.
es5id: 15.5.5.5.2-7-1
description: >
    String object indexing returns undefined if the numeric index is
    less than 0
---*/

  var s = new String("hello world");

assert.sameValue(s[-1], undefined, 's[-1]');


text:
<?xml version="1.0" encoding="utf-8"?>
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android">
    <PreferenceCategory
        android:key="button_connection_settings"
        android:title="@string/connection_settings"
        android:persistent="false">
        <ListPreference
            android:key="pref_input_src"
            android:title="Input Source"
            android:entries="@array/InputSources"
            android:entryValues="@array/InputSources"
            android:defaultValue="@string/Demo" />

        <EditTextPreference
            android:key="pref_input_tcpio_ip"
            android:title="@string/input_tcpio_ip"
            android:defaultValue="192.168.43.1" />

        <ListPreference
            android:key="pref_input_src_device"
            android:title="@string/bluetooth_paired_device" />

        <EditTextPreference
            android:key="pref_usb_baudrate"
            android:title="@string/usb_baudrate"
            android:defaultValue="9600" />
        <ListPreference
            android:key="pref_usb_stopbits"
            android:title="@string/usb_stopbits"
            android:entries="@array/options_stopbits"
            android:entryValues="@array/options_stopbits"
            android:defaultValue="1" />
        <ListPreference
            android:key="pref_usb_databits"
            android:title="@string/usb_databits"
            android:entries="@array/options_databits"
            android:entryValues="@array/options_databits"
            android:defaultValue="8" />
        <ListPreference
            android:key="pref_usb_parity"
            android:title="@string/usb_parity"
            android:entries="@array/options_parity"
            android:entryValues="@array/options_parity"
            android:defaultValue="@string/none" />

        <ListPreference
            android:key="pref_ioio_rx"
            android:title="@string/ioio_rx"
            android:entries="@array/options_ioio_serial"
            android:entryValues="@array/options_ioio_serial"
            android:defaultValue="3" />

        <ListPreference
            android:key="pref_ioio_tx"
            android:title="@string/ioio_tx"
            android:entries="@array/options_ioio_serial"
            android:entryValues="@array/options_ioio_serial"
            android:defaultValue="4" />

        <EditTextPreference
            android:key="pref_baseAIP"
            android:title="@string/udp_baseAIP"
            android:defaultValue="" />

        <EditTextPreference
            android:key="pref_baseBIP"
            android:title="@string/udp_baseBIP"
            android:defaultValue="" />

        <Preference
            android:key="pref_btn_reset_to_default"
            android:title="@string/reset_to_defaults" />

    </PreferenceCategory>

    <PreferenceCategory
        android:key="button_audio"
        android:title="@string/audio"
        android:persistent="false">
        <CheckBoxPreference
            android:key="pref_voice"
            android:title="Voice Synthesis"
            android:summary="Use voice synthesis for CD calls"
            android:defaultValue="false" />

        <ListPreference
            android:key="pref_voice_lang"
            android:title="Language for Voice Synthesis"
            android:dependency="pref_voice"
            android:defaultValue="en_GB" />

        <CheckBoxPreference
            android:key="pref_full_volume"
            android:title="Set Volume Automatically"
            android:summary="Always keep volume at full"
            android:defaultValue="true" />

    </PreferenceCategory>

    <PreferenceCategory
        android:key="button_sound"
        android:title="@string/soft_buzz"
        android:persistent="false">
        <CheckBoxPreference
            android:key="pref_buzzer"
            android:title="Buzzer"
            android:summary="Play buzzer sound on the android device"
            android:defaultValue="false" />

        <ListPreference
            android:key="pref_buzz_off_course"
            android:title="@string/snd_off_course"
            android:dependency="pref_buzzer"
            android:entries="@array/sound_names"
            android:entryValues="@array/sound_values"
            android:defaultValue="whistle" />

        <ListPreference
            android:key="pref_buzz_on_course"
            android:title="@string/snd_on_course"
            android:dependency="pref_buzzer"
            android:entries="@array/sound_names"
            android:entryValues="@array/sound_values"
            android:defaultValue="whistle" />

        <ListPreference
            android:key="pref_buzz_turn"
            android:title="@string/snd_turn"
            android:dependency="pref_buzzer"
            android:entries="@array/sound_names"
            android:entryValues="@array/sound_values"
            android:defaultValue="whistle" />

        <ListPreference
            android:key="pref_buzz_turn9"
            android:title="@string/snd_turn9"
            android:dependency="pref_buzzer"
            android:entries="@array/sound_names"
            android:entryValues="@array/sound_values"
            android:defaultValue="whistle" />

        <ListPreference
            android:key="pref_buzz_penalty"
            android:title="@string/snd_penalty"
            android:dependency="pref_buzzer"
            android:entries="@array/sound_names"
            android:entryValues="@array/sound_values"
            android:defaultValue="beep" />

    </PreferenceCategory>

    <PreferenceCategory
        android:key="button_wind"
        android:title="@string/wind_meter_settings"
        android:persistent="false">
        <CheckBoxPreference
            android:id="@+id/wind_measurement"
            android:defaultValue="true"
            android:key="pref_wind_measurement"
            android:summary="Enable wind measurement"
            android:title="@string/wind_measurement" />

        <EditTextPreference
            android:id="@+id/wind_angle_offset"
            android:defaultValue="0"
            android:key="pref_wind_angle_offset"
            android:inputType="numberDecimal"
            android:singleLine="true"
            android:title="@string/wind_angle_offset" />

        <CheckBoxPreference
            android:id="@+id/audible_wind_warning"
            android:defaultValue="false"
            android:key="pref_audible_wind_warning"
            android:summary="Enable audible wind warning"
            android:title="@string/wind_warning_audible" />
    </PreferenceCategory>

    <PreferenceCategory
        android:key="button_other"
        android:title="@string/external_results_http"
        android:persistent="false">

        <CheckBoxPreference
            android:key="pref_results_server"
            android:title="Run Results Server"
            android:summary="Serve results over HTTP"
            android:defaultValue="false" />

        <CheckBoxPreference
            android:key="pref_wifi_hotspot"
            android:title="Start Wifi Hotspot"
            android:summary="Activate Wifi Hotspot to broadcast results"
            android:defaultValue="false" />

        <CheckBoxPreference
            android:key="pref_usb_tether"
            android:title="USB-Tethering"
            android:summary="Show Tethering menu before starting Driver"
            android:defaultValue="false" />
    </PreferenceCategory>

    <PreferenceCategory
        android:title="@string/external_results_BT"
        android:persistent="false">
        <CheckBoxPreference
            android:key="pref_results_display"
            android:title="Run External Results Display"
            android:summary="Broadcast results over Bluetooth"
            android:defaultValue="false" />

        <ListPreference
            android:key="pref_external_display"
            android:title="Paired Device to use as external display"
            android:entries="@array/empty_array"
            android:entryValues="@array/empty_array"
            android:dependency="pref_results_display" />

    </PreferenceCategory>

    <PreferenceCategory
        android:title="@string/app_theme"
        android:persistent="false">
        <ListPreference
            android:key="pref_app_theme"
            android:title="Application Theme"
            android:entries="@array/theme_names"
            android:entryValues="@array/theme_values"
            android:defaultValue="AppTheme"/>

    </PreferenceCategory>

    <PreferenceCategory
        android:title="@string/other_settings"
        android:persistent="false">

        <CheckBoxPreference
            android:key="pref_manual_entry"
            android:title="Manual Entry"
            android:summary="Allow times to be entered manually"
            android:defaultValue="false" />
        <CheckBoxPreference
            android:key="acra.enable"
            android:title="@string/pref_enable_acra"
            android:summaryOn="@string/pref_acra_enabled"
            android:summaryOff="@string/pref_acra_disabled"
            android:defaultValue="true" />
    </PreferenceCategory>
</PreferenceScreen>


text:
var curry = require('./curry');
var bind = require('./bind');
var id = require('./id');

var ret = curry(bind, 2)(id);

module.exports = ret;


text:
principal_language: Python
repo: https://github.com/pythonbrasil/associados
image: https://avatars2.githubusercontent.com/u/916137?s=88&v=4
description: Controle de associados a Associação PythonBrasil

---