text:
import random

class Insult:
    def __init__(self, filename):
        self.insults = open(filename).read().splitlines()

    def get(self, victim_name):
        insult_format = random.choice(self.insults)
        return insult_format % victim_name if insult_format.count('%s') == 1 else insult_format

redpajama_set_name: RedPajamaGithub


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

using System.Collections.Immutable;
using System.Threading;
using System.Threading.Tasks;
using Microsoft.CodeAnalysis.Options;
using Microsoft.CodeAnalysis.Text;

namespace Microsoft.CodeAnalysis.Completion.Providers
{
    internal abstract class AbstractSuggestionModeCompletionProvider : LSPCompletionProvider
    {
        protected abstract Task<CompletionItem?> GetSuggestionModeItemAsync(Document document, int position, TextSpan span, CompletionTrigger triggerInfo, CancellationToken cancellationToken);

        public override async Task ProvideCompletionsAsync(CompletionContext context)
        {
            context.SuggestionModeItem = await GetSuggestionModeItemAsync(
                context.Document, context.Position, context.CompletionListSpan, context.Trigger, context.CancellationToken).ConfigureAwait(false);
        }

        protected static CompletionItem CreateEmptySuggestionModeItem()
            => CreateSuggestionModeItem(displayText: null, description: null);

        public override ImmutableHashSet<char> TriggerCharacters => ImmutableHashSet<char>.Empty;
    }
}


text:
/** @constructor */
ScalaJS.c.scala_collection_immutable_VectorBuilder = (function() {
  ScalaJS.c.java_lang_Object.call(this);
  this.blockIndex$1 = 0;
  this.lo$1 = 0;
  this.depth$1 = 0;
  this.display0$1 = null;
  this.display1$1 = null;
  this.display2$1 = null;
  this.display3$1 = null;
  this.display4$1 = null;
  this.display5$1 = null
});
ScalaJS.c.scala_collection_immutable_VectorBuilder.prototype = new ScalaJS.inheritable.java_lang_Object();
ScalaJS.c.scala_collection_immutable_VectorBuilder.prototype.constructor = ScalaJS.c.scala_collection_immutable_VectorBuilder;
ScalaJS.c.scala_collection_immutable_VectorBuilder.prototype.depth__I = (function() {
  return this.depth$1
});
ScalaJS.c.scala_collection_immutable_VectorBuilder.prototype.depth$und$eq__I__V = (function(x$1) {
  this.depth$1 = x$1
});
ScalaJS.c.scala_collection_immutable_VectorBuilder.prototype.display0__AO = (function() {
  return this.display0$1
});
ScalaJS.c.scala_collection_immutable_VectorBuilder.prototype.display0$und$eq__AO__V = (function(x$1) {
  this.display0$1 = x$1
});
ScalaJS.c.scala_collection_immutable_VectorBuilder.prototype.display1__AO = (function() {
  return this.display1$1
});
ScalaJS.c.scala_collection_immutable_VectorBuilder.prototype.display1$und$eq__AO__V = (function(x$1) {
  this.display1$1 = x$1
});
ScalaJS.c.scala_collection_immutable_VectorBuilder.prototype.display2__AO = (function() {
  return this.display2$1
});
ScalaJS.c.scala_collection_immutable_VectorBuilder.prototype.display2$und$eq__AO__V = (function(x$1) {
  this.display2$1 = x$1
});
ScalaJS.c.scala_collection_immutable_VectorBuilder.prototype.display3__AO = (function() {
  return this.display3$1
});
ScalaJS.c.scala_collection_immutable_VectorBuilder.prototype.display3$und$eq__AO__V = (function(x$1) {
  this.display3$1 = x$1
});
ScalaJS.c.scala_collection_immutable_VectorBuilder.prototype.display4__AO = (function() {
  return this.display4$1
});
ScalaJS.c.scala_collection_immutable_VectorBuilder.prototype.display4$und$eq__AO__V = (function(x$1) {
  this.display4$1 = x$1
});
ScalaJS.c.scala_collection_immutable_VectorBuilder.prototype.display5__AO = (function() {
  return this.display5$1
});
ScalaJS.c.scala_collection_immutable_VectorBuilder.prototype.display5$und$eq__AO__V = (function(x$1) {
  this.display5$1 = x$1
});
ScalaJS.c.scala_collection_immutable_VectorBuilder.prototype.initFrom__Lscala_collection_immutable_VectorPointer__V = (function(that) {
  ScalaJS.impls.scala_collection_immutable_VectorPointer$class__initFrom__Lscala_collection_immutable_VectorPointer__Lscala_collection_immutable_VectorPointer__V(this, that)
});
ScalaJS.c.scala_collection_immutable_VectorBuilder.prototype.initFrom__Lscala_collection_immutable_VectorPointer__I__V = (function(that, depth) {
  ScalaJS.impls.scala_collection_immutable_VectorPointer$class__initFrom__Lscala_collection_immutable_VectorPointer__Lscala_collection_immutable_VectorPointer__I__V(this, that, depth)
});
ScalaJS.c.scala_collection_immutable_VectorBuilder.prototype.getElem__I__I__O = (function(index, xor) {
  return ScalaJS.impls.scala_collection_immutable_VectorPointer$class__getElem__Lscala_collection_immutable_VectorPointer__I__I__O(this, index, xor)
});
ScalaJS.c.scala_collection_immutable_VectorBuilder.prototype.gotoPos__I__I__V = (function(index, xor) {
  ScalaJS.impls.scala_collection_immutable_VectorPointer$class__gotoPos__Lscala_collection_immutable_VectorPointer__I__I__V(this, index, xor)
});
ScalaJS.c.scala_collection_immutable_VectorBuilder.prototype.gotoNextBlockStart__I__I__V = (function(index, xor) {
  ScalaJS.impls.scala_collection_immutable_VectorPointer$class__gotoNextBlockStart__Lscala_collection_immutable_VectorPointer__I__I__V(this, index, xor)
});
ScalaJS.c.scala_collection_immutable_VectorBuilder.prototype.gotoNextBlockStartWritable__I__I__V = (function(index, xor) {
  ScalaJS.impls.scala_collection_immutable_VectorPointer$class__gotoNextBlockStartWritable__Lscala_collection_immutable_VectorPointer__I__I__V(this, index, xor)
});
ScalaJS.c.scala_collection_immutable_VectorBuilder.prototype.copyOf__AO__AO = (function(a) {
  return ScalaJS.impls.scala_collection_immutable_VectorPointer$class__copyOf__Lscala_collection_immutable_VectorPointer__AO__AO(this, a)
});
ScalaJS.c.scala_collection_immutable_VectorBuilder.prototype.nullSlotAndCopy__AO__I__AO = (function(array, index) {
  return ScalaJS.impls.scala_collection_immutable_VectorPointer$class__nullSlotAndCopy__Lscala_collection_immutable_VectorPointer__AO__I__AO(this, array, index)
});
ScalaJS.c.scala_collection_immutable_VectorBuilder.prototype.stabilize__I__V = (function(index) {
  ScalaJS.impls.scala_collection_immutable_VectorPointer$class__stabilize__Lscala_collection_immutable_VectorPointer__I__V(this, index)
});
ScalaJS.c.scala_collection_immutable_VectorBuilder.prototype.gotoPosWritable0__I__I__V = (function(newIndex, xor) {
  ScalaJS.impls.scala_collection_immutable_VectorPointer$class__gotoPosWritable0__Lscala_collection_immutable_VectorPointer__I__I__V(this, newIndex, xor)
});
ScalaJS.c.scala_collection_immutable_VectorBuilder.prototype.gotoPosWritable1__I__I__I__V = (function(oldIndex, newIndex, xor) {
  ScalaJS.impls.scala_collection_immutable_VectorPointer$class__gotoPosWritable1__Lscala_collection_immutable_VectorPointer__I__I__I__V(this, oldIndex, newIndex, xor)
});
ScalaJS.c.scala_collection_immutable_VectorBuilder.prototype.copyRange__AO__I__I__AO = (function(array, oldLeft, newLeft) {
  return ScalaJS.impls.scala_collection_immutable_VectorPointer$class__copyRange__Lscala_collection_immutable_VectorPointer__AO__I__I__AO(this, array, oldLeft, newLeft)
});
ScalaJS.c.scala_collection_immutable_VectorBuilder.prototype.gotoFreshPosWritable0__I__I__I__V = (function(oldIndex, newIndex, xor) {
  ScalaJS.impls.scala_collection_immutable_VectorPointer$class__gotoFreshPosWritable0__Lscala_collection_immutable_VectorPointer__I__I__I__V(this, oldIndex, newIndex, xor)
});
ScalaJS.c.scala_collection_immutable_VectorBuilder.prototype.gotoFreshPosWritable1__I__I__I__V = (function(oldIndex, newIndex, xor) {
  ScalaJS.impls.scala_collection_immutable_VectorPointer$class__gotoFreshPosWritable1__Lscala_collection_immutable_VectorPointer__I__I__I__V(this, oldIndex, newIndex, xor)
});
ScalaJS.c.scala_collection_immutable_VectorBuilder.prototype.debug__V = (function() {
  ScalaJS.impls.scala_collection_immutable_VectorPointer$class__debug__Lscala_collection_immutable_VectorPointer__V(this)
});
ScalaJS.c.scala_collection_immutable_VectorBuilder.prototype.sizeHint__I__V = (function(size) {
  ScalaJS.impls.scala_collection_mutable_Builder$class__sizeHint__Lscala_collection_mutable_Builder__I__V(this, size)
});
ScalaJS.c.scala_collection_immutable_VectorBuilder.prototype.sizeHint__Lscala_collection_TraversableLike__V = (function(coll) {
  ScalaJS.impls.scala_collection_mutable_Builder$class__sizeHint__Lscala_collection_mutable_Builder__Lscala_collection_TraversableLike__V(this, coll)
});
ScalaJS.c.scala_collection_immutable_VectorBuilder.prototype.sizeHint__Lscala_collection_TraversableLike__I__V = (function(coll, delta) {
  ScalaJS.impls.scala_collection_mutable_Builder$class__sizeHint__Lscala_collection_mutable_Builder__Lscala_collection_TraversableLike__I__V(this, coll, delta)
});
ScalaJS.c.scala_collection_immutable_VectorBuilder.prototype.sizeHintBounded__I__Lscala_collection_TraversableLike__V = (function(size, boundingColl) {
  ScalaJS.impls.scala_collection_mutable_Builder$class__sizeHintBounded__Lscala_collection_mutable_Builder__I__Lscala_collection_TraversableLike__V(this, size, boundingColl)
});
ScalaJS.c.scala_collection_immutable_VectorBuilder.prototype.mapResult__Lscala_Function1__Lscala_collection_mutable_Builder = (function(f) {
  return ScalaJS.impls.scala_collection_mutable_Builder$class__mapResult__Lscala_collection_mutable_Builder__Lscala_Function1__Lscala_collection_mutable_Builder(this, f)
});
ScalaJS.c.scala_collection_immutable_VectorBuilder.prototype.$$plus$eq__O__O__Lscala_collection_Seq__Lscala_collection_generic_Growable = (function(elem1, elem2, elems) {
  return ScalaJS.impls.scala_collection_generic_Growable$class__$plus$eq__Lscala_collection_generic_Growable__O__O__Lscala_collection_Seq__Lscala_collection_generic_Growable(this, elem1, elem2, elems)
});
ScalaJS.c.scala_collection_immutable_VectorBuilder.prototype.blockIndex__p1__I = (function() {
  return this.blockIndex$1
});
ScalaJS.c.scala_collection_immutable_VectorBuilder.prototype.blockIndex$und$eq__p1__I__V = (function(x$1) {
  this.blockIndex$1 = x$1
});
ScalaJS.c.scala_collection_immutable_VectorBuilder.prototype.lo__p1__I = (function() {
  return this.lo$1
});
ScalaJS.c.scala_collection_immutable_VectorBuilder.prototype.lo$und$eq__p1__I__V = (function(x$1) {
  this.lo$1 = x$1
});
ScalaJS.c.scala_collection_immutable_VectorBuilder.prototype.$$plus$eq__O__Lscala_collection_immutable_VectorBuilder = (function(elem) {
  if ((this.lo__p1__I() >= this.display0__AO().underlying.length)) {
    var newBlockIndex = (this.blockIndex__p1__I() + 32);
    this.gotoNextBlockStartWritable__I__I__V(newBlockIndex, (this.blockIndex__p1__I() ^ newBlockIndex));
    this.blockIndex$und$eq__p1__I__V(newBlockIndex);
    this.lo$und$eq__p1__I__V(0)
  };
  this.display0__AO().underlying[this.lo__p1__I()] = elem;
  this.lo$und$eq__p1__I__V((this.lo__p1__I() + 1));
  return this
});
ScalaJS.c.scala_collection_immutable_VectorBuilder.prototype.$$plus$plus$eq__Lscala_collection_TraversableOnce__Lscala_collection_immutable_VectorBuilder = (function(xs) {
  return ScalaJS.as.scala_collection_immutable_VectorBuilder(ScalaJS.impls.scala_collection_generic_Growable$class__$plus$plus$eq__Lscala_collection_generic_Growable__Lscala_collection_TraversableOnce__Lscala_collection_generic_Growable(this, xs))
});
ScalaJS.c.scala_collection_immutable_VectorBuilder.prototype.result__Lscala_collection_immutable_Vector = (function() {
  var size = (this.blockIndex__p1__I() + this.lo__p1__I());
  if ((size === 0)) {
    return ScalaJS.modules.scala_collection_immutable_Vector().empty__Lscala_collection_immutable_Vector()
  };
  var s = new ScalaJS.c.scala_collection_immutable_Vector().init___I__I__I(0, size, 0);
  s.initFrom__Lscala_collection_immutable_VectorPointer__V(this);
  if ((this.depth__I() > 1)) {
    s.gotoPos__I__I__V(0, (size - 1))
  };
  return s
});
ScalaJS.c.scala_collection_immutable_VectorBuilder.prototype.clear__V = (function() {
  this.display0$und$eq__AO__V(ScalaJS.newArrayObject(ScalaJS.data.java_lang_Object.getArrayOf(), [32]));
  this.depth$und$eq__I__V(1);
  this.blockIndex$und$eq__p1__I__V(0);
  this.lo$und$eq__p1__I__V(0)
});
ScalaJS.c.scala_collection_immutable_VectorBuilder.prototype.result__O = (function() {
  return this.result__Lscala_collection_immutable_Vector()
});
ScalaJS.c.scala_collection_immutable_VectorBuilder.prototype.$$plus$plus$eq__Lscala_collection_TraversableOnce__Lscala_collection_generic_Growable = (function(xs) {
  return this.$$plus$plus$eq__Lscala_collection_TraversableOnce__Lscala_collection_immutable_VectorBuilder(xs)
});
ScalaJS.c.scala_collection_immutable_VectorBuilder.prototype.$$plus$eq__O__Lscala_collection_generic_Growable = (function(elem) {
  return this.$$plus$eq__O__Lscala_collection_immutable_VectorBuilder(elem)
});
ScalaJS.c.scala_collection_immutable_VectorBuilder.prototype.$$plus$eq__O__Lscala_collection_mutable_Builder = (function(elem) {
  return this.$$plus$eq__O__Lscala_collection_immutable_VectorBuilder(elem)
});
ScalaJS.c.scala_collection_immutable_VectorBuilder.prototype.init___ = (function() {
  ScalaJS.c.java_lang_Object.prototype.init___.call(this);
  ScalaJS.impls.scala_collection_generic_Growable$class__$init$__Lscala_collection_generic_Growable__V(this);
  ScalaJS.impls.scala_collection_mutable_Builder$class__$init$__Lscala_collection_mutable_Builder__V(this);
  ScalaJS.impls.scala_collection_immutable_VectorPointer$class__$init$__Lscala_collection_immutable_VectorPointer__V(this);
  this.display0$und$eq__AO__V(ScalaJS.newArrayObject(ScalaJS.data.java_lang_Object.getArrayOf(), [32]));
  this.depth$und$eq__I__V(1);
  this.blockIndex$1 = 0;
  this.lo$1 = 0;
  return this
});
ScalaJS.c.scala_collection_immutable_VectorBuilder.prototype.$$plus$eq__O__O__Lscala_collection_Seq__ = (function(elem1, elem2, elems) {
  return this.$$plus$eq__O__O__Lscala_collection_Seq__Lscala_collection_generic_Growable(elem1, elem2, elems)
});
ScalaJS.c.scala_collection_immutable_VectorBuilder.prototype.mapResult__Lscala_Function1__ = (function(f) {
  return this.mapResult__Lscala_Function1__Lscala_collection_mutable_Builder(f)
});
ScalaJS.c.scala_collection_immutable_VectorBuilder.prototype.sizeHintBounded__I__Lscala_collection_TraversableLike__ = (function(size, boundingColl) {
  return ScalaJS.bV(this.sizeHintBounded__I__Lscala_collection_TraversableLike__V(size, boundingColl))
});
ScalaJS.c.scala_collection_immutable_VectorBuilder.prototype.sizeHint__Lscala_collection_TraversableLike__I__ = (function(coll, delta) {
  return ScalaJS.bV(this.sizeHint__Lscala_collection_TraversableLike__I__V(coll, delta))
});
ScalaJS.c.scala_collection_immutable_VectorBuilder.prototype.sizeHint__Lscala_collection_TraversableLike__ = (function(coll$2) {
  return ScalaJS.bV(this.sizeHint__Lscala_collection_TraversableLike__V(coll$2))
});
ScalaJS.c.scala_collection_immutable_VectorBuilder.prototype.sizeHint__I__ = (function(size$2) {
  return ScalaJS.bV(this.sizeHint__I__V(size$2))
});
ScalaJS.c.scala_collection_immutable_VectorBuilder.prototype.debug__ = (function() {
  return ScalaJS.bV(this.debug__V())
});
ScalaJS.c.scala_collection_immutable_VectorBuilder.prototype.gotoFreshPosWritable1__I__I__I__ = (function(oldIndex, newIndex, xor) {
  return ScalaJS.bV(this.gotoFreshPosWritable1__I__I__I__V(oldIndex, newIndex, xor))
});
ScalaJS.c.scala_collection_immutable_VectorBuilder.prototype.gotoFreshPosWritable0__I__I__I__ = (function(oldIndex$2, newIndex$2, xor$2) {
  return ScalaJS.bV(this.gotoFreshPosWritable0__I__I__I__V(oldIndex$2, newIndex$2, xor$2))
});
ScalaJS.c.scala_collection_immutable_VectorBuilder.prototype.copyRange__AO__I__I__ = (function(array, oldLeft, newLeft) {
  return this.copyRange__AO__I__I__AO(array, oldLeft, newLeft)
});
ScalaJS.c.scala_collection_immutable_VectorBuilder.prototype.gotoPosWritable1__I__I__I__ = (function(oldIndex$3, newIndex$3, xor$3) {
  return ScalaJS.bV(this.gotoPosWritable1__I__I__I__V(oldIndex$3, newIndex$3, xor$3))
});
ScalaJS.c.scala_collection_immutable_VectorBuilder.prototype.gotoPosWritable0__I__I__ = (function(newIndex$4, xor$4) {
  return ScalaJS.bV(this.gotoPosWritable0__I__I__V(newIndex$4, xor$4))
});
ScalaJS.c.scala_collection_immutable_VectorBuilder.prototype.stabilize__I__ = (function(index) {
  return ScalaJS.bV(this.stabilize__I__V(index))
});
ScalaJS.c.scala_collection_immutable_VectorBuilder.prototype.nullSlotAndCopy__AO__I__ = (function(array$2, index$2) {
  return this.nullSlotAndCopy__AO__I__AO(array$2, index$2)
});
ScalaJS.c.scala_collection_immutable_VectorBuilder.prototype.copyOf__AO__ = (function(a) {
  return this.copyOf__AO__AO(a)
});
ScalaJS.c.scala_collection_immutable_VectorBuilder.prototype.gotoNextBlockStartWritable__I__I__ = (function(index$3, xor$5) {
  return ScalaJS.bV(this.gotoNextBlockStartWritable__I__I__V(index$3, xor$5))
});
ScalaJS.c.scala_collection_immutable_VectorBuilder.prototype.gotoNextBlockStart__I__I__ = (function(index$4, xor$6) {
  return ScalaJS.bV(this.gotoNextBlockStart__I__I__V(index$4, xor$6))
});
ScalaJS.c.scala_collection_immutable_VectorBuilder.prototype.gotoPos__I__I__ = (function(index$5, xor$7) {
  return ScalaJS.bV(this.gotoPos__I__I__V(index$5, xor$7))
});
ScalaJS.c.scala_collection_immutable_VectorBuilder.prototype.getElem__I__I__ = (function(index$6, xor$8) {
  return this.getElem__I__I__O(index$6, xor$8)
});
ScalaJS.c.scala_collection_immutable_VectorBuilder.prototype.initFrom__Lscala_collection_immutable_VectorPointer__I__ = (function(that, depth) {
  return this.initFrom__Lscala_collection_immutable_VectorPointer__I__V(that, depth)
});
ScalaJS.c.scala_collection_immutable_VectorBuilder.prototype.initFrom__Lscala_collection_immutable_VectorPointer__ = (function(that$2) {
  return this.initFrom__Lscala_collection_immutable_VectorPointer__V(that$2)
});
ScalaJS.c.scala_collection_immutable_VectorBuilder.prototype.display5$und$eq__AO__ = (function(x$1) {
  return ScalaJS.bV(this.display5$und$eq__AO__V(x$1))
});
ScalaJS.c.scala_collection_immutable_VectorBuilder.prototype.display5__ = (function() {
  return this.display5__AO()
});
ScalaJS.c.scala_collection_immutable_VectorBuilder.prototype.display4$und$eq__AO__ = (function(x$1$2) {
  return ScalaJS.bV(this.display4$und$eq__AO__V(x$1$2))
});
ScalaJS.c.scala_collection_immutable_VectorBuilder.prototype.display4__ = (function() {
  return this.display4__AO()
});
ScalaJS.c.scala_collection_immutable_VectorBuilder.prototype.display3$und$eq__AO__ = (function(x$1$3) {
  return ScalaJS.bV(this.display3$und$eq__AO__V(x$1$3))
});
ScalaJS.c.scala_collection_immutable_VectorBuilder.prototype.display3__ = (function() {
  return this.display3__AO()
});
ScalaJS.c.scala_collection_immutable_VectorBuilder.prototype.display2$und$eq__AO__ = (function(x$1$4) {
  return ScalaJS.bV(this.display2$und$eq__AO__V(x$1$4))
});
ScalaJS.c.scala_collection_immutable_VectorBuilder.prototype.display2__ = (function() {
  return this.display2__AO()
});
ScalaJS.c.scala_collection_immutable_VectorBuilder.prototype.display1$und$eq__AO__ = (function(x$1$5) {
  return ScalaJS.bV(this.display1$und$eq__AO__V(x$1$5))
});
ScalaJS.c.scala_collection_immutable_VectorBuilder.prototype.display1__ = (function() {
  return this.display1__AO()
});
ScalaJS.c.scala_collection_immutable_VectorBuilder.prototype.display0$und$eq__AO__ = (function(x$1$6) {
  return ScalaJS.bV(this.display0$und$eq__AO__V(x$1$6))
});
ScalaJS.c.scala_collection_immutable_VectorBuilder.prototype.display0__ = (function() {
  return this.display0__AO()
});
ScalaJS.c.scala_collection_immutable_VectorBuilder.prototype.depth$und$eq__I__ = (function(x$1$7) {
  return ScalaJS.bV(this.depth$und$eq__I__V(x$1$7))
});
ScalaJS.c.scala_collection_immutable_VectorBuilder.prototype.depth__ = (function() {
  return ScalaJS.bI(this.depth__I())
});
ScalaJS.c.scala_collection_immutable_VectorBuilder.prototype.clear__ = (function() {
  return ScalaJS.bV(this.clear__V())
});
ScalaJS.c.scala_collection_immutable_VectorBuilder.prototype.result__ = (function() {
  return this.result__Lscala_collection_immutable_Vector()
});
ScalaJS.c.scala_collection_immutable_VectorBuilder.prototype.$$plus$plus$eq__Lscala_collection_TraversableOnce__ = (function(xs) {
  return this.$$plus$plus$eq__Lscala_collection_TraversableOnce__Lscala_collection_immutable_VectorBuilder(xs)
});
ScalaJS.c.scala_collection_immutable_VectorBuilder.prototype.$$plus$eq__O__ = (function(elem) {
  return this.$$plus$eq__O__Lscala_collection_immutable_VectorBuilder(elem)
});
/** @constructor */
ScalaJS.inheritable.scala_collection_immutable_VectorBuilder = (function() {
  /*<skip>*/
});
ScalaJS.inheritable.scala_collection_immutable_VectorBuilder.prototype = ScalaJS.c.scala_collection_immutable_VectorBuilder.prototype;
ScalaJS.is.scala_collection_immutable_VectorBuilder = (function(obj) {
  return (!(!((obj && obj.$classData) && obj.$classData.ancestors.scala_collection_immutable_VectorBuilder)))
});
ScalaJS.as.scala_collection_immutable_VectorBuilder = (function(obj) {
  if ((ScalaJS.is.scala_collection_immutable_VectorBuilder(obj) || (obj === null))) {
    return obj
  } else {
    ScalaJS.throwClassCastException(obj, "scala.collection.immutable.VectorBuilder")
  }
});
ScalaJS.isArrayOf.scala_collection_immutable_VectorBuilder = (function(obj, depth) {
  return (!(!(((obj && obj.$classData) && (obj.$classData.arrayDepth === depth)) && obj.$classData.arrayBase.ancestors.scala_collection_immutable_VectorBuilder)))
});
ScalaJS.asArrayOf.scala_collection_immutable_VectorBuilder = (function(obj, depth) {
  if ((ScalaJS.isArrayOf.scala_collection_immutable_VectorBuilder(obj, depth) || (obj === null))) {
    return obj
  } else {
    ScalaJS.throwArrayCastException(obj, "Lscala.collection.immutable.VectorBuilder;", depth)
  }
});
ScalaJS.data.scala_collection_immutable_VectorBuilder = new ScalaJS.ClassTypeData({
  scala_collection_immutable_VectorBuilder: 0
}, false, "scala.collection.immutable.VectorBuilder", ScalaJS.data.java_lang_Object, {
  scala_collection_immutable_VectorBuilder: 1,
  scala_collection_immutable_VectorPointer: 1,
  scala_collection_mutable_Builder: 1,
  scala_collection_generic_Growable: 1,
  scala_collection_generic_Clearable: 1,
  java_lang_Object: 1
});
ScalaJS.c.scala_collection_immutable_VectorBuilder.prototype.$classData = ScalaJS.data.scala_collection_immutable_VectorBuilder;
//@ sourceMappingURL=VectorBuilder.js.map


text:
* The easiest way to use infinite-loop-view
* 用法最简单的无限循环的图片轮播器

## Requirements

* iOS 7.0+
* Xcode 6.3.1

## Installation

### CocoaPods

CocoaPods 0.36 adds supports for Swift and embedded frameworks. You can install it with the following command:

```bash
$ gem install cocoapods
```

To integrate CycleView into your Xcode project using CocoaPods, specify it in your `Podfile`:

```
platform :ios, '8.0'
use_frameworks!

pod 'CycleView'
```

Then, run the following command:

```bash
$ pod install
```

You should open the `{Project}.xcworkspace` instead of the `{Project}.xcodeproj` after you installed anything from CocoaPods.

For more information about how to use CocoaPods, I suggest [this tutorial](http://www.raywenderlich.com/64546/introduction-to-cocoapods-2).

## 如何使用CycleView
* cocoapods导入:`pod 'CycleView'`
* 手动导入:
    * 将`CycleView/CycleView/Source`文件夹中的所有文件拽入项目中
    * 导入主头文件:`#import "CycleView.h"`

## Usage

### Swift
#### Regular

```swift
import CycleView

class className : PictureCycleController{

    //override loadView function
    //重写loadViewe方法
    override func loadView() {
        super.loadView()
    }

    var arrayM: [UIImage]?

    override func viewDidLoad() {
        super.viewDidLoad()
        //input an Array with UIImage
        //传入一个UIImage的图像数组
        CycleImageList = arrayM;
    }

}

```

#### Special
```swift
import CycleView

class AnimatorViewController: CycleAnimatorViewController {

    override func viewDidLoad() {
        super.viewDidLoad()

        var arrayM = [UIImage]()
        for var i = 0; i < 16; ++i {
            let imageName = String(format: "%02d.jpg", i + 1)
            arrayM.append(UIImage(named: imageName)!)
        }
        AnimatorImageList = arrayM;

        //you can modify the animation effect by enumeration type
        //可以通过枚举类型,修改动画效果
        AnimationType = SRTransitionAnimateType.CUBE.rawValue
        //you can change image's contentMode
        //可以设置图片填充模式
        AnimatorImageView!.contentMode = UIViewContentMode.ScaleAspectFit
    }
}
```

## Screenshot

```
常规图片轮播器
```
* ![image](https://github.com/SarielTang/ScreenShot/blob/master/CycleViewIntroduce1.gif)

```
立体旋转效果
```
* ![image](https://github.com/SarielTang/ScreenShot/blob/master/CycleViewIntroduce2.gif)

```
淡入淡出效果
```
* ![image](https://github.com/SarielTang/ScreenShot/blob/master/CycleViewIntroduce3.gif)

```
平面翻转效果
```
* ![image](https://github.com/SarielTang/ScreenShot/blob/master/CycleViewIntroduce4.gif)

```
翻页效果
```
* ![image](https://github.com/SarielTang/ScreenShot/blob/master/CycleViewIntroduce5.gif)

```
反向翻页效果
```
* ![image](https://github.com/SarielTang/ScreenShot/blob/master/CycleViewIntroduce6.gif)

```
横向推出效果
```
* ![image](https://github.com/SarielTang/ScreenShot/blob/master/CycleViewIntroduce7.gif)

```
从上层抽出效果
```
* ![image](https://github.com/SarielTang/ScreenShot/blob/master/CycleViewIntroduce8.gif)

```
水滴效果
```
* ![image](https://github.com/SarielTang/ScreenShot/blob/master/CycleViewIntroduce9.gif)

```
从角落收起效果
```
* ![image](https://github.com/SarielTang/ScreenShot/blob/master/CycleViewIntroduce10.gif)


text:
AdjacencyList::AdjacencyList(int num_vertices)
  : num_edges(0),
    num_vertices(num_vertices),
    vertices(),
    visited(),
    connectivity_dirty(false) {
  vertices.resize(num_vertices);
  visited.resize(num_vertices);
}

set<int> AdjacencyList::edges(int u) {
  set<int> result;
  if (!vertices[u].active) return result;
  for (int v : vertices[u].adjacency)
    if (vertices[v].active)
      result.emplace(v);
  return result;
}

bool AdjacencyList::has_edge(int u, int v, bool include_inactive) {
  return (include_inactive || (vertices[u].active && vertices[v].active)) &&
    vertices[u].adjacency.find(v) != vertices[u].adjacency.end();
}

bool AdjacencyList::is_connected(int u, int v) {
  if (!vertices[u].active || !vertices[v].active)
    return false;

  // Regenerate connectivity labels only when needed
  if (connectivity_dirty)
    regenerate_connectivity();

  return vertices[u].label == vertices[v].label;
}

int AdjacencyList::regenerate_connectivity() {
  // Exclude inactive vertices from search
  for (int i = 0; i < num_vertices; i++)
    visited[i] = !vertices[i].active;

  int label = 0;
  vector<int> stack;
  for (int i = 0; i < num_vertices; i++)
  {
    if (visited[i]) continue;
    stack.emplace_back(i);

    while (!stack.empty()) {
      int u = stack.back();
      stack.pop_back();

      vertices[u].label = label;
      visited[u] = true;

      for (int v : edges(u)) {
        if (visited[v]) continue;
        stack.emplace_back(v);
      }
    }
    label++;
  }
  connectivity_dirty = false;
  return label;
}

bool AdjacencyList::is_clique(set<int>& vertice_set) {
  for (int u : vertice_set) {
    if (!vertices[u].active)
      return false;

    for (int v : vertice_set)
      if (!has_edge(u, v) && u != v)
        return false;
  }
  return true;
}

vector<pair<int, int>> AdjacencyList::all_edges() {
  vector<pair<int, int>> result;
  result.reserve(num_edges);
  for (int u = 0; u < num_vertices; u++) {
    if (!vertices[u].active) continue;
    for (int v : edges(u)) {
      if (v < u || !vertices[v].active) continue;
      result.emplace_back(u, v);
    }
  }
  return result;
}

void AdjacencyList::add_edge(int u, int v) {
  if (has_edge(u, v, true)) return;
  vertices[u].adjacency.emplace(v);
  vertices[v].adjacency.emplace(u);
  num_edges++;
  connectivity_dirty = true;
}

void AdjacencyList::remove_edge(int u, int v) {
  if (!has_edge(u, v, true)) return;
  vertices[u].adjacency.erase(v);
  vertices[v].adjacency.erase(u);
  num_edges--;
  connectivity_dirty = true;
}

void AdjacencyList::make_clique(set<int>& vertices) {
  for (int u : vertices)
    for (int v : vertices)
      if (u != v)
        add_edge(u, v);
}

void AdjacencyList::add_vertex(int u) {
  vertices[u].active = true;
  connectivity_dirty = true;
}

void AdjacencyList::add_vertices(set<int> vertices) {
  for (int u : vertices)
    add_vertex(u);
}

void AdjacencyList::add_all_vertices() {
  for (int u = 0; u < num_vertices; u++)
    add_vertex(u);
}

void AdjacencyList::remove_vertex(int u) {
  vertices[u].active = false;
  connectivity_dirty = true;
}

void AdjacencyList::remove_vertices(set<int> vertices) {
  for (int u : vertices)
    remove_vertex(u);
}

void AdjacencyList::set_vertices(set<int> vertices) {
  int u = 0;
  for (int v : vertices) {
    while (u < v)
      remove_vertex(u++);
    add_vertex(v);
    u++;
  }
  for (; u < num_vertices; u++)
    remove_vertex(u);
}


text:
<?php

namespace wiosloCMS\PhotoBundle\Model;

use wiosloCMS\PhotoBundle\Model\om\BaseUserRate;

class UserRate extends BaseUserRate
{
}


text:
#if defined (FSL_RTOS_UCOSII)

#include <assert.h>
#include "fsl_os_abstraction.h"
#include "fsl_interrupt_manager.h"

extern uint32_t SystemCoreClock;

/*******************************************************************************
 * Definitions
 ******************************************************************************/

/*! @brief Converts milliseconds to ticks*/
#define MSEC_TO_TICK(msec)  (((INT32U)(msec)+500uL/OS_TICKS_PER_SEC)*OS_TICKS_PER_SEC/1000uL)
#define TICKS_TO_MSEC(tick) ((tick)*1000uL/OS_TICKS_PER_SEC)

/*******************************************************************************
 * Code
 ******************************************************************************/

/*FUNCTION**********************************************************************
 *
 * Function Name : OSA_TaskCreate
 * Description   : This function is used to create a task and make it ready.
 * Return kStatus_OSA_Success if register successfully, otherwise return
 * kStatus_OSA_Error.
 *
 *END**************************************************************************/
osa_status_t OSA_TaskCreate(task_t          task,
                         uint8_t        *name,
                         uint16_t        stackSize,
                         task_stack_t   *stackMem,
                         uint16_t        priority,
                         task_param_t    param,
                         bool            usesFloat,
                         task_handler_t *handler)
{
    INT8U err;

#if OS_CRITICAL_METHOD == 3U
    OS_CPU_SR   cpu_sr = 0U;
#endif

    uint32_t stackSizeLocal = stackSize/sizeof(task_stack_t);
    /*
     * To provide unified task piority for upper layer, OSA layer makes conversion.
     * uC/OS-II's highest 4 priorities are reserved for system, so add 4 here.
     */
    INT8U localPriority = PRIORITY_OSA_TO_RTOS(priority);

    err = OSTaskCreateExt(task,            /* Task pointer*/
                          param,           /* Task input parameter*/
                          &stackMem[stackSizeLocal - 1],   /* Pointer to top of stack*/
                          localPriority,   /* Task priority*/
                          localPriority,   /* Task id. should be the same as priority*/
                          stackMem,        /* Pointer to the bottom of the stack*/
                          stackSizeLocal,  /* Size of the stack*/
                          (void*)0,   /* TCB extension not supported by this abstraction*/
                          usesFloat ? OS_TASK_OPT_SAVE_FP : OS_TASK_OPT_NONE
                          );
    if (OS_ERR_NONE != err)
    {
        return kStatus_OSA_Error;
    }
#if OS_TASK_NAME_EN > 0u
    OSTaskNameSet(localPriority, name, &err);
    if (OS_ERR_NONE != err)
    {
        return kStatus_OSA_Error;
    }
#else
    name = name;
#endif
    OS_ENTER_CRITICAL();
    *handler = OSTCBPrioTbl[localPriority];
    OS_EXIT_CRITICAL();
    return kStatus_OSA_Success;
}

/*FUNCTION**********************************************************************
 *
 * Function Name : OSA_TaskDestroy
 * Description   : This function destroy a task. Return kStatus_OSA_Success if
 * the task is destroied, otherwise return kStatus_OSA_Error.
 *
 *END**************************************************************************/
osa_status_t OSA_TaskDestroy(task_handler_t handler)
{
    if (OS_ERR_NONE == OSTaskDel(handler->OSTCBPrio))
    {
        return kStatus_OSA_Success;
    }
    else
    {
        return kStatus_OSA_Error;
    }
}

/*FUNCTION**********************************************************************
 *
 * Function Name : OSA_TaskYield
 * Description   : This function is not implemented, because one task priority
 * can not be shared by multi-tasks on uC/OS-II.
 *
 *END**************************************************************************/
osa_status_t OSA_TaskYield(void)
{
    return kStatus_OSA_Success;
}

/*FUNCTION**********************************************************************
 *
 * Function Name : OSA_TaskGetHandler
 * Description   : This function is used to get current active task's handler.
 *
 *END**************************************************************************/
task_handler_t OSA_TaskGetHandler(void)
{
    return OSTCBCur;
}

/*FUNCTION**********************************************************************
 *
 * Function Name : OSA_TaskGetPriority
 * Description   : This function returns task's priority by task handler.
 *
 *END**************************************************************************/
uint16_t OSA_TaskGetPriority(task_handler_t handler)
{
    return (uint16_t)PRIORITY_RTOS_TO_OSA(handler->OSTCBPrio);
}

/*FUNCTION**********************************************************************
 *
 * Function Name : OSA_TaskSetPriority
 * Description   : This function sets task's priority by task handler.
 *
 *END**************************************************************************/
osa_status_t OSA_TaskSetPriority(task_handler_t handler, uint16_t priority)
{
    if (OS_ERR_NONE == OSTaskChangePrio(handler->OSTCBPrio, PRIORITY_OSA_TO_RTOS(priority)))
    {
        return kStatus_OSA_Success;
    }
    else
    {
        return kStatus_OSA_Error;
    }
}

/*FUNCTION**********************************************************************
 *
 * Function Name : wait_timeout_msec_to_tick
 * Description   : This function converts timeout from millisecond to tick for
 * wait functions.
 *
 *END**************************************************************************/
static uint32_t wait_timeout_msec_to_tick(uint32_t timeout)
{
    if (OSA_WAIT_FOREVER == timeout)   /* Wait forever. */
    {
        return 0U; /* Timeout 0 means wait forever for uC/OS-II. */
    }
    else
    {
        timeout = MSEC_TO_TICK(timeout); /* Change timeout to tick. */
        /*
         * If timeout is too short that changed to 0 tick, reset it to 1 tick
         * in case of infinitely wait.
         */
        if (!timeout)
        {
            timeout = 1U;
        }
        return timeout;
    }
}

/*FUNCTION**********************************************************************
 *
 * Function Name : OSA_SemaCreate
 * Description   : This function is used to create a semaphore. Return
 * kStatus_OSA_Success if create successfully, otherwise return kStatus_OSA_Error.
 *
 *END**************************************************************************/
osa_status_t OSA_SemaCreate(semaphore_t *pSem, uint8_t initValue)
{
    *pSem = OSSemCreate(initValue);

    if (*pSem)
    {
        return kStatus_OSA_Success;
    }
    else
    {
        return kStatus_OSA_Error;
    }
}

/*FUNCTION**********************************************************************
 *
 * Function Name : OSA_SemaWait
 * Description   : This function checks the semaphore's counting value, if it is
 * positive, decreases it and returns kStatus_OSA_Success, otherwise, timeout
 * will be used for wait. The parameter timeout indicates how long should wait
 * in milliseconds. Pass OSA_WAIT_FOREVER to wait indefinitely, pass 0 will
 * return kStatus_OSA_Timeout immediately if semaphore is not positive.
 * This function returns kStatus_OSA_Success if the semaphore is received, returns
 * kStatus_OSA_Timeout if the semaphore is not received within the specified
 * 'timeout', returns kStatus_OSA_Error if any errors occur during waiting.
 *
 *END**************************************************************************/
osa_status_t OSA_SemaWait(semaphore_t *pSem, uint32_t timeout)
{
    INT8U err;

    /* If timeout is 0, try to get the semaphore. */
    if (!timeout)
    {
        if (OSSemAccept(*pSem) > 0)
        {
            return kStatus_OSA_Success;
        }
        else
        {
            return kStatus_OSA_Timeout;
        }
    }

    /* If timeout is not 0, convert it to tickes. */
    timeout = wait_timeout_msec_to_tick(timeout);

    OSSemPend(*pSem, timeout, &err);

    if (OS_ERR_NONE == err)
    {
        return kStatus_OSA_Success;
    }
    else if (OS_ERR_TIMEOUT == err)
    {
        return kStatus_OSA_Timeout;
    }
    else
    {
        return kStatus_OSA_Error;
    }
}

/*FUNCTION**********************************************************************
 *
 * Function Name : OSA_SemaPost
 * Description   : This function is used to wake up one task that wating on the
 * semaphore. If no task is waiting, increase the semaphore. The function returns
 * kStatus_OSA_Success if the semaphre is post successfully, otherwise returns
 * kStatus_OSA_Error.
 *
 *END**************************************************************************/
osa_status_t OSA_SemaPost(semaphore_t *pSem)
{
    if (OS_ERR_NONE == OSSemPost(*pSem))
    {
        return kStatus_OSA_Success;
    }
    else
    {
        return kStatus_OSA_Error;
    }
}

/*FUNCTION**********************************************************************
 *
 * Function Name : OSA_SemaDestroy
 * Description   : This function is used to destroy a semaphore.
 * Return kStatus_OSA_Success if the semaphore is destroyed successfully, otherwise
 * return kStatus_OSA_Error.
 *
 *END**************************************************************************/
osa_status_t OSA_SemaDestroy(semaphore_t *pSem)
{
    INT8U err;

    OSSemDel(*pSem, OS_DEL_ALWAYS, &err);

    if (OS_ERR_NONE == err)
    {
        return kStatus_OSA_Success;
    }
    else
    {
        return kStatus_OSA_Error;
    }
}

/*FUNCTION**********************************************************************
 *
 * Function Name : OSA_MutexCreate
 * Description   : This function is used to create a mutex.
 * Return kStatus_OSA_Success if create successfully, otherwise return
 * kStatus_OSA_Error.
 *
 *END**************************************************************************/
osa_status_t OSA_MutexCreate(mutex_t *pMutex)
{
    INT8U err;

    /* NOTE: uC/OS-II does not support priority inherit but only priority protect */
    *pMutex = OSMutexCreate(OS_PRIO_MUTEX_CEIL_DIS, &err);

    if (OS_ERR_NONE == err)
    {
        return kStatus_OSA_Success;
    }
    else
    {
        return kStatus_OSA_Error;
    }
}

/*FUNCTION**********************************************************************
 *
 * Function Name : OSA_MutexLock
 * Description   : This function checks the mutex's status, if it is unlocked,
 * lock it and returns kStatus_OSA_Success, otherwise, timeout will be used for
 * wait. The parameter timeout indicates how long should wait in milliseconds.
 * Pass OSA_WAIT_FOREVER to wait indefinitely, pass 0 will return the value
 * kStatus_OSA_Timeout immediately if mutex is locked.
 * This function returns kStatus_OSA_Success if the mutex is obtained, returns
 * kStatus_OSA_Timeout if the mutex is not obtained within the specified
 * 'timeout', returns kStatus_OSA_Error if any errors occur during waiting.
 *
 *END**************************************************************************/
osa_status_t OSA_MutexLock(mutex_t *pMutex, uint32_t timeout)
{
    INT8U err;

    /* Avoid to get the mutex current task has already got. */
    if ((*pMutex)->OSEventPtr == (void *)OSTCBCur)
    {
        return kStatus_OSA_Error;
    }

    if (!timeout) /* If timeout is 0, try to lock the mutex. */
    {
        BOOLEAN pollResult = OSMutexAccept(*pMutex, &err);

        if (OS_ERR_NONE == err)
        {
            if (OS_TRUE == pollResult)
            {
                return kStatus_OSA_Success;
            }
            else
            {
                return kStatus_OSA_Timeout;
            }
        }
        else
        {
            return kStatus_OSA_Error;
        }
    }

    /* If timeout is not 0, convert it to tickes. */
    timeout = wait_timeout_msec_to_tick(timeout);

    OSMutexPend(*pMutex, timeout, &err);

    if (OS_ERR_NONE == err)
    {
        return kStatus_OSA_Success;
    }
    else if (OS_ERR_TIMEOUT == err)
    {
        return kStatus_OSA_Timeout;
    }
    else
    {
        return kStatus_OSA_Error;
    }
}

/*FUNCTION**********************************************************************
 *
 * Function Name : OSA_MutexUnlock
 * Description   : This function is used to unlock a mutex.
 *
 *END**************************************************************************/
osa_status_t OSA_MutexUnlock(mutex_t *pMutex)
{
    if (OS_ERR_NONE == OSMutexPost(*pMutex))
    {
        return kStatus_OSA_Success;
    }
    else
    {
        return kStatus_OSA_Error;
    }
}

/*FUNCTION**********************************************************************
 *
 * Function Name : OSA_MutexDestroy
 * Description   : This function is used to destroy a mutex.
 * Return kStatus_OSA_Success if the lock object is destroyed successfully,
 * otherwise return kStatus_OSA_Error.
 *
 *END**************************************************************************/
osa_status_t OSA_MutexDestroy(mutex_t *pMutex)
{
    INT8U err;

    OSMutexDel(*pMutex, OS_DEL_ALWAYS, &err);

    if (OS_ERR_NONE == err)
    {
        return kStatus_OSA_Success;
    }
    else
    {
        return kStatus_OSA_Error;
    }
}

/*FUNCTION**********************************************************************
 *
 * Function Name : OSA_EventCreate
 * Description   : This function is used to create a event object. Return
 * kStatus_OSA_Success if create successfully, otherwise return kStatus_OSA_Error.
 *
 *END**************************************************************************/
osa_status_t OSA_EventCreate(event_t *pEvent, osa_event_clear_mode_t clearMode)
{
    INT8U err;
    pEvent->pGroup = OSFlagCreate(0u, &err);
    if (OS_ERR_NONE == err)
    {
        pEvent->clearMode = clearMode;
        return kStatus_OSA_Success;
    }
    else
    {
        return kStatus_OSA_Error;
    }
}

/*FUNCTION**********************************************************************
 *
 * Function Name : OSA_EventWait
 * Description   : This function checks the event's status, if it meets the wait
 * condition, return kStatus_OSA_Success, otherwise, timeout will be used for
 * wait. The parameter timeout indicates how long should wait in milliseconds.
 * Pass OSA_WAIT_FOREVER to wait indefinitely, pass 0 will return the value
 * kStatus_OSA_Timeout immediately if wait condition is not met. The event flags
 * will be cleared if the event is auto clear mode. Flags that wakeup waiting
 * task could be obtained from the parameter setFlags.
 * This function returns kStatus_OSA_Success if wait condition is met, returns
 * kStatus_OSA_Timeout if wait condition is not met within the specified
 * 'timeout', returns kStatus_OSA_Error if any errors occur during waiting.
 *
 *END**************************************************************************/
osa_status_t OSA_EventWait(event_t       *pEvent,
                        event_flags_t  flagsToWait,
                        bool           waitAll,
                        uint32_t       timeout,
                        event_flags_t *setFlags)
{
    INT8U err, opt;

    /* Prepare wait options base on wait type and clear type. */
    if (waitAll)
    {
        opt = OS_FLAG_WAIT_SET_ALL;
    }
    else
    {
        opt = OS_FLAG_WAIT_SET_ANY;
    }

    if (kEventAutoClear == pEvent->clearMode)
    {
        opt |= OS_FLAG_CONSUME;
    }

    /* If timeout is 0, try to wait. */
    if (0U == timeout)
    {
        *setFlags = OSFlagAccept (pEvent->pGroup, flagsToWait, opt, &err);
    }
    else
    {
        /* If timeout is not 0, convert it to tickes. */
        timeout = wait_timeout_msec_to_tick(timeout);
        *setFlags = OSFlagPend(pEvent->pGroup, flagsToWait, opt, timeout, &err);
    }

    if (OS_ERR_NONE == err)
    {
        return kStatus_OSA_Success;
    }
    else if ((OS_ERR_TIMEOUT      == err) ||
             (OS_ERR_FLAG_NOT_RDY == err))
    {
        return kStatus_OSA_Timeout;
    }
    else
    {
        return kStatus_OSA_Error;
    }
}

/*FUNCTION**********************************************************************
 *
 * Function Name : OSA_EventSet
 * Description   : Set one or more event flags of an event object.
 * Return kStatus_OSA_Success if set successfully, kStatus_OSA_Error if failed.
 *
 *END**************************************************************************/
osa_status_t OSA_EventSet(event_t *pEvent, event_flags_t flagsToSet)
{
    INT8U err;

    OSFlagPost(pEvent->pGroup, flagsToSet, OS_FLAG_SET, &err);

    if (OS_ERR_NONE == err)
    {
        return kStatus_OSA_Success;
    }
    else
    {
        return kStatus_OSA_Error;
    }
}

/*FUNCTION**********************************************************************
 *
 * Function Name : OSA_EventClear
 * Description   : Clear one or more event flags of an event object.
 * Return kStatus_OSA_Success if clear successfully, kStatus_OSA_Error if failed.
 *
 *END**************************************************************************/
osa_status_t OSA_EventClear(event_t *pEvent, event_flags_t flagsToClear)
{
    INT8U err;

    OSFlagPost(pEvent->pGroup, flagsToClear, OS_FLAG_CLR, &err);

    if (OS_ERR_NONE == err)
    {
        return kStatus_OSA_Success;
    }
    else
    {
        return kStatus_OSA_Error;
    }
}

/*FUNCTION**********************************************************************
 *
 * Function Name : OSA_EventGetFlags
 * Description   : Get event flags status.
 * Return current event flags.
 *
 *END**************************************************************************/
event_flags_t OSA_EventGetFlags(event_t *pEvent)
{
    INT8U err;
    return OSFlagQuery(pEvent->pGroup, &err);
}

/*FUNCTION**********************************************************************
 *
 * Function Name : OSA_EventDestroy
 * Description   : This function is used to destroy a event object. Return
 * kStatus_OSA_Success if the event object is destroyed successfully, otherwise
 * return kStatus_OSA_Error.
 *
 *END**************************************************************************/
osa_status_t OSA_EventDestroy(event_t *pEvent)
{
    INT8U err;

    OSFlagDel(pEvent->pGroup, OS_DEL_ALWAYS, &err);

    if (OS_ERR_NONE == err)
    {
        pEvent->pGroup = (OS_FLAG_GRP*)0;
        return kStatus_OSA_Success;
    }
    else
    {
        return kStatus_OSA_Error;
    }
}

/*FUNCTION**********************************************************************
 *
 * Function Name : OSA_MsgQCreate
 * Description   : This function is used to create a message queue.
 * Return the handle to the message queue if create successfully, otherwise
 * return 0.
 *
 *END**************************************************************************/
msg_queue_handler_t OSA_MsgQCreate(msg_queue_t *queue,
                                        uint16_t  message_number,
                                        uint16_t  message_size)
{
    INT8U  err;

    queue->pQueue = OSQCreate(queue->msgTbl, message_number);
    if (!queue->pQueue)
    {
        return (msg_queue_handler_t)0;
    }

    /* Use OS_MEM to manage the memory which is used to save messages*/
    queue->pMem = OSMemCreate(queue->msgs,
                              message_number,
                              message_size*sizeof(int32_t),
                              &err);
    if (!queue->pMem)
    {
        OSQDel(queue->pQueue, OS_DEL_ALWAYS, &err);
        return (msg_queue_handler_t)0;
    }

    queue->size = message_size;
    return (msg_queue_handler_t)queue;
}

/*FUNCTION**********************************************************************
 *
 * Function Name : OSA_MsgQPut
 * Description   : This function is used to put a message to a message queue.
 * Return kStatus_OSA_Success if the message is put successfully, otherwise
 * return kStatus_OSA_Error.
 *
 *END**************************************************************************/
osa_status_t OSA_MsgQPut(msg_queue_handler_t handler, void* pMessage)
{
    INT8U err;
    void  *localMsg;
    int32_t  *from_ptr, *to_ptr;
    uint32_t msg_size = handler->size;

    /* Get a memory to save the message. */
    localMsg = OSMemGet(handler->pMem, &err);
    if (!localMsg)
    {
        return kStatus_OSA_Error;
    }

    /* Copy msg to localMsg */
    from_ptr = (int32_t*)pMessage;
    to_ptr   = (int32_t*)localMsg;
    while (msg_size--)
    {
        *to_ptr++ = *from_ptr++;
    }

    if (OS_ERR_NONE != OSQPost(handler->pQueue, localMsg))
    {
        OSMemPut(handler->pMem, localMsg);
        return kStatus_OSA_Error;
    }

    return kStatus_OSA_Success;
}

/*FUNCTION**********************************************************************
 *
 * Function Name : OSA_MsgQGet
 * Description   : This function checks the queue's status, if it is not empty,
 * get message from it and return kStatus_OSA_Success, otherwise, timeout will
 * be used for wait. The parameter timeout indicates how long should wait in
 * milliseconds. Pass OSA_WAIT_FOREVER to wait indefinitely, pass 0 will return
 * kStatus_OSA_Timeout immediately if queue is empty.
 * This function returns kStatus_OSA_Success if message is got successfully,
 * returns kStatus_OSA_Timeout if message queue is empty within the specified
 * 'timeout', returns kStatus_OSA_Error if any errors occur during waiting.
 *
 *END**************************************************************************/
osa_status_t OSA_MsgQGet(msg_queue_handler_t handler,
                           void               *pMessage,
                           uint32_t            timeout)
{
    INT8U err;
    void* localMsg;
    int32_t  *from_ptr, *to_ptr;
    uint16_t msg_size = handler->size;

    if (0U != timeout)
    {
        /* If timeout is not 0, convert it to tickes. */
        timeout  = wait_timeout_msec_to_tick(timeout);
        localMsg = OSQPend(handler->pQueue, timeout, &err);
    }
    else
    {
        localMsg = OSQAccept(handler->pQueue, &err);
    }

    if (OS_ERR_NONE == err)
    {
        /* Copy localMsg to msg */
        to_ptr   = (int32_t*)(pMessage);
        from_ptr = (int32_t*)localMsg;
        while (msg_size--)
        {
            *to_ptr++ = *from_ptr++;
        }

        OSMemPut(handler->pMem, localMsg);

        return kStatus_OSA_Success;
    }
    else if ((OS_ERR_Q_EMPTY == err) ||
             (OS_ERR_TIMEOUT == err))
    {
        return kStatus_OSA_Timeout;
    }
    else
    {
        return kStatus_OSA_Error;
    }
}

/*FUNCTION**********************************************************************
 *
 * Function Name : OSA_MsgQDestroy
 * Description   : This function is used to destroy the message queue.
 * Return kStatus_OSA_Success if the message queue is destroyed successfully,
 * otherwise return kStatus_OSA_Error.
 *
 *END**************************************************************************/
osa_status_t OSA_MsgQDestroy(msg_queue_handler_t handler)
{
#if OS_CRITICAL_METHOD == 3u
    OS_CPU_SR  cpu_sr = 0u;
#endif
    INT8U err;
    OS_MEM* pMem;

    OSQDel(handler->pQueue, OS_DEL_ALWAYS, &err);

    if (OS_ERR_NONE != err)
    {
        return kStatus_OSA_Error;
    }

    /* return OS_MEM to OS */
    OS_ENTER_CRITICAL();
    pMem = handler->pMem;
    pMem->OSMemFreeList = OSMemFreeList;
    OSMemFreeList = pMem;
    OS_EXIT_CRITICAL();

    handler->pMem     = (OS_MEM   *)0;
    handler->pQueue   = (OS_EVENT *)0;

    return kStatus_OSA_Success;
}

/*FUNCTION**********************************************************************
 *
 * Function Name : OSA_MemAlloc
 * Description   : This function is used to allocate amount of memory in bytes.
 * Return the pointer to the memory if success, otherwise return NULL;
 *
 *END**************************************************************************/
void * OSA_MemAlloc(size_t size)
{
    void *pMem;

    OSSchedLock();
    pMem = malloc(size);
    OSSchedUnlock();

    return pMem;
}

/*FUNCTION**********************************************************************
 *
 * Function Name : OSA_MemAllocZero
 * Description   : This function is used to allocate amount of memory in bytes
 * and initializes it to 0.
 * Return the pointer to the memory if success, otherwise return NULL;
 *
 *END**************************************************************************/
void * OSA_MemAllocZero(size_t size)
{
    void *pMem;

    OSSchedLock();
    pMem = calloc(1, size);
    OSSchedUnlock();

    return pMem;
}

/*FUNCTION**********************************************************************
 *
 * Function Name : OSA_MemFree
 * Description   : This function is used to free the memory previously allocated.
 *
 *END**************************************************************************/
osa_status_t OSA_MemFree(void *ptr)
{
    OSSchedLock();
    free(ptr);
    OSSchedUnlock();
    return kStatus_OSA_Success;
}

/*FUNCTION**********************************************************************
 *
 * Function Name : OSA_TimeDelay
 * Description   : This function is used to delay for a number of milliseconds.
 *
 *END**************************************************************************/
void OSA_TimeDelay(uint32_t delay)
{
    delay = MSEC_TO_TICK(delay);
    /*
     * If delay is too short that changed to 0 tick, reset it to 1 tick
     * in case of no delay.
     */
    if (!delay)
    {
        delay = 1U;
    }
    OSTimeDly(delay);
}

/*FUNCTION**********************************************************************
 *
 * Function Name : OSA_TimeGetMsec
 * Description   : This function gets current time in milliseconds.
 *
 *END**************************************************************************/
uint32_t OSA_TimeGetMsec(void)
{
    INT32U timeTick = OSTimeGet();
    return TICKS_TO_MSEC(timeTick);
}

/*FUNCTION**********************************************************************
 *
 * Function Name : OSA_InstallIntHandler
 * Description   : This function is used to install interrupt handler.
 *
 *END**************************************************************************/
osa_status_t OSA_InstallIntHandler (int32_t IRQNumber,
                                                        void (*handler)(void))
{
    INT_SYS_InstallHandler((IRQn_Type)IRQNumber, handler);

    return kStatus_OSA_Success;
}

/*FUNCTION**********************************************************************
 *
 * Function Name : OSA_EnterCritical
 * Description   : This function is used to ensure some code will not be preempted.
 *
 *END**************************************************************************/
void OSA_EnterCritical(osa_critical_section_mode_t mode)
{
    if (kCriticalDisableInt == mode)
    {
        OS_ENTER_CRITICAL();
    }
    else
    {
        OSSchedLock();
    }
}

/*FUNCTION**********************************************************************
 *
 * Function Name : OSA_ExitCritical
 * Description   : This function is used to exit critical section.
 *
 *END**************************************************************************/
void OSA_ExitCritical(osa_critical_section_mode_t mode)
{
    if (kCriticalDisableInt == mode)
    {
        OS_EXIT_CRITICAL();
    }
    else
    {
        OSSchedUnlock();
    }
}

/*FUNCTION**********************************************************************
 *
 * Function Name : OSA_Init
 * Description   : This function is used to setup the basic services, it should
 * be called first in function main. Return kStatus_OSA_Success if services
 * are initialized successfully, otherwise return kStatus_OSA_Error.
 *
 *END**************************************************************************/
osa_status_t OSA_Init(void)
{
    OSInit();
    OS_CPU_SysTickInit(SystemCoreClock/(uint32_t)OS_TICKS_PER_SEC);
    return kStatus_OSA_Success;
}

/*FUNCTION**********************************************************************
 *
 * Function Name : OSA_Start
 * Description   : This function is used to start RTOS scheduler.
 *
 *END**************************************************************************/
osa_status_t OSA_Start(void)
{
    OSStart();
    return kStatus_OSA_Success;
}

#endif
/*******************************************************************************
 * EOF
 ******************************************************************************/


text:
'''tzinfo timezone information for Pacific/Guadalcanal.'''
from pytz.tzinfo import DstTzInfo
from pytz.tzinfo import memorized_datetime as d
from pytz.tzinfo import memorized_ttinfo as i

class Guadalcanal(DstTzInfo):
    '''Pacific/Guadalcanal timezone definition. See datetime.tzinfo for details'''

    zone = 'Pacific/Guadalcanal'

    _utc_transition_times = [
d(1,1,1,0,0,0),
d(1912,9,30,13,20,12),
        ]

    _transition_info = [
i(38400,0,'LMT'),
i(39600,0,'SBT'),
        ]

Guadalcanal = Guadalcanal()


text:
package com.plexobject.handler.ws.params;

public class MyClass {
    private Long id;
    private String name;
    private String description;

    public MyClass() {

    }

    public MyClass(Long id, String name, String description) {
        this.id = id;
        this.name = name;
        this.description = description;
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    @Override
    public String toString() {
        return "MyClass [id=" + id + ", name=" + name + ", description="
                + description + "]";
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }
}


text:
package com.amazonaws.services.workmail.model.transform;

import java.util.List;
import javax.annotation.Generated;

import com.amazonaws.SdkClientException;
import com.amazonaws.services.workmail.model.*;

import com.amazonaws.protocol.*;
import com.amazonaws.annotation.SdkInternalApi;

/**
 * PutAccessControlRuleRequestMarshaller
 */
@Generated("com.amazonaws:aws-java-sdk-code-generator")
@SdkInternalApi
public class PutAccessControlRuleRequestMarshaller {

    private static final MarshallingInfo<String> NAME_BINDING = MarshallingInfo.builder(MarshallingType.STRING).marshallLocation(MarshallLocation.PAYLOAD)
            .marshallLocationName("Name").build();
    private static final MarshallingInfo<String> EFFECT_BINDING = MarshallingInfo.builder(MarshallingType.STRING).marshallLocation(MarshallLocation.PAYLOAD)
            .marshallLocationName("Effect").build();
    private static final MarshallingInfo<String> DESCRIPTION_BINDING = MarshallingInfo.builder(MarshallingType.STRING)
            .marshallLocation(MarshallLocation.PAYLOAD).marshallLocationName("Description").build();
    private static final MarshallingInfo<List> IPRANGES_BINDING = MarshallingInfo.builder(MarshallingType.LIST).marshallLocation(MarshallLocation.PAYLOAD)
            .marshallLocationName("IpRanges").build();
    private static final MarshallingInfo<List> NOTIPRANGES_BINDING = MarshallingInfo.builder(MarshallingType.LIST).marshallLocation(MarshallLocation.PAYLOAD)
            .marshallLocationName("NotIpRanges").build();
    private static final MarshallingInfo<List> ACTIONS_BINDING = MarshallingInfo.builder(MarshallingType.LIST).marshallLocation(MarshallLocation.PAYLOAD)
            .marshallLocationName("Actions").build();
    private static final MarshallingInfo<List> NOTACTIONS_BINDING = MarshallingInfo.builder(MarshallingType.LIST).marshallLocation(MarshallLocation.PAYLOAD)
            .marshallLocationName("NotActions").build();
    private static final MarshallingInfo<List> USERIDS_BINDING = MarshallingInfo.builder(MarshallingType.LIST).marshallLocation(MarshallLocation.PAYLOAD)
            .marshallLocationName("UserIds").build();
    private static final MarshallingInfo<List> NOTUSERIDS_BINDING = MarshallingInfo.builder(MarshallingType.LIST).marshallLocation(MarshallLocation.PAYLOAD)
            .marshallLocationName("NotUserIds").build();
    private static final MarshallingInfo<String> ORGANIZATIONID_BINDING = MarshallingInfo.builder(MarshallingType.STRING)
            .marshallLocation(MarshallLocation.PAYLOAD).marshallLocationName("OrganizationId").build();
    private static final MarshallingInfo<List> IMPERSONATIONROLEIDS_BINDING = MarshallingInfo.builder(MarshallingType.LIST)
            .marshallLocation(MarshallLocation.PAYLOAD).marshallLocationName("ImpersonationRoleIds").build();
    private static final MarshallingInfo<List> NOTIMPERSONATIONROLEIDS_BINDING = MarshallingInfo.builder(MarshallingType.LIST)
            .marshallLocation(MarshallLocation.PAYLOAD).marshallLocationName("NotImpersonationRoleIds").build();

    private static final PutAccessControlRuleRequestMarshaller instance = new PutAccessControlRuleRequestMarshaller();

    public static PutAccessControlRuleRequestMarshaller getInstance() {
        return instance;
    }

    /**
     * Marshall the given parameter object.
     */
    public void marshall(PutAccessControlRuleRequest putAccessControlRuleRequest, ProtocolMarshaller protocolMarshaller) {

        if (putAccessControlRuleRequest == null) {
            throw new SdkClientException("Invalid argument passed to marshall(...)");
        }

        try {
            protocolMarshaller.marshall(putAccessControlRuleRequest.getName(), NAME_BINDING);
            protocolMarshaller.marshall(putAccessControlRuleRequest.getEffect(), EFFECT_BINDING);
            protocolMarshaller.marshall(putAccessControlRuleRequest.getDescription(), DESCRIPTION_BINDING);
            protocolMarshaller.marshall(putAccessControlRuleRequest.getIpRanges(), IPRANGES_BINDING);
            protocolMarshaller.marshall(putAccessControlRuleRequest.getNotIpRanges(), NOTIPRANGES_BINDING);
            protocolMarshaller.marshall(putAccessControlRuleRequest.getActions(), ACTIONS_BINDING);
            protocolMarshaller.marshall(putAccessControlRuleRequest.getNotActions(), NOTACTIONS_BINDING);
            protocolMarshaller.marshall(putAccessControlRuleRequest.getUserIds(), USERIDS_BINDING);
            protocolMarshaller.marshall(putAccessControlRuleRequest.getNotUserIds(), NOTUSERIDS_BINDING);
            protocolMarshaller.marshall(putAccessControlRuleRequest.getOrganizationId(), ORGANIZATIONID_BINDING);
            protocolMarshaller.marshall(putAccessControlRuleRequest.getImpersonationRoleIds(), IMPERSONATIONROLEIDS_BINDING);
            protocolMarshaller.marshall(putAccessControlRuleRequest.getNotImpersonationRoleIds(), NOTIMPERSONATIONROLEIDS_BINDING);
        } catch (Exception e) {
            throw new SdkClientException("Unable to marshall request to JSON: " + e.getMessage(), e);
        }
    }

}


text:
namespace Azure.ResourceManager.SecurityCenter.Models
{
    /// <summary> Represents the publisher information of a process/rule. </summary>
    public partial class SecurityCenterPublisherInfo
    {
        /// <summary> Initializes a new instance of SecurityCenterPublisherInfo. </summary>
        public SecurityCenterPublisherInfo()
        {
        }

        /// <summary> Initializes a new instance of SecurityCenterPublisherInfo. </summary>
        /// <param name="publisherName"> The Subject field of the x.509 certificate used to sign the code, using the following fields -  O = Organization, L = Locality, S = State or Province, and C = Country. </param>
        /// <param name="productName"> The product name taken from the file's version resource. </param>
        /// <param name="binaryName"> The "OriginalName" field taken from the file's version resource. </param>
        /// <param name="version"> The binary file version taken from the file's version resource. </param>
        internal SecurityCenterPublisherInfo(string publisherName, string productName, string binaryName, string version)
        {
            PublisherName = publisherName;
            ProductName = productName;
            BinaryName = binaryName;
            Version = version;
        }

        /// <summary> The Subject field of the x.509 certificate used to sign the code, using the following fields -  O = Organization, L = Locality, S = State or Province, and C = Country. </summary>
        public string PublisherName { get; set; }
        /// <summary> The product name taken from the file's version resource. </summary>
        public string ProductName { get; set; }
        /// <summary> The "OriginalName" field taken from the file's version resource. </summary>
        public string BinaryName { get; set; }
        /// <summary> The binary file version taken from the file's version resource. </summary>
        public string Version { get; set; }
    }
}


text:
<!--
  Copyright 2020 Google LLC

  Licensed under the Apache License, Version 2.0 (the "License");
  you may not use this file except in compliance with the License.
  You may obtain a copy of the License at

      https://www.apache.org/licenses/LICENSE-2.0

  Unless required by applicable law or agreed to in writing, software
  distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions and
  limitations under the License.
-->

<mat-button-toggle-group
  id="button-group"
  class="button-group"
  [disabled]="(isSubmissionSelected$ | async) || (disabled$ | async)"
  [(value)]="selectedValue"
>
  <mat-button-toggle
    *ngIf="!(jobs$ | async).isEmpty()"
    id="add-point-button"
    class="add-point-button"
    value="{{ pointValue }}"
    (click)="onButtonClick()"
  >
    <img id="add-point-icon" class="add-point-icon" [src]="addPointIcon" />
  </mat-button-toggle>
  <mat-button-toggle
    hidden
    value="{{ polygonValue }}"
    (click)="onButtonClick()"
  >
    add polygon
  </mat-button-toggle>
</mat-button-toggle-group>

<div
  *ngIf="selectedValue"
  id="job-selector-section"
  class="job-selector-section"
>
  <mat-form-field appearance="fill">
    <mat-label id="job-selector-label"
      >Adding {{ selectedValue }} for</mat-label
    >
    <mat-select
      id="job-selector"
      [(value)]="selectedJobId"
      (selectionChange)="onJobIdChange()"
    >
      <mat-option
        *ngFor="let job of jobs$ | async"
        id="job-selector-item-{{ job.id }}"
        [value]="job.id"
      >
        <img [src]="jobPinUrl(job)" /> {{ job?.name }}
      </mat-option>
    </mat-select>
  </mat-form-field>
  <button id="cancel-button" mat-button (click)="onCancel()">Cancel</button>
</div>


text:
#include "h2o.h"
#include "h2o/configurator.h"

typedef H2O_VECTOR(h2o_access_log_filehandle_t *) st_h2o_access_log_filehandle_vector_t;

struct st_h2o_access_log_configurator_t {
    h2o_configurator_t super;
    st_h2o_access_log_filehandle_vector_t *handles;
    st_h2o_access_log_filehandle_vector_t _handles_stack[H2O_CONFIGURATOR_NUM_LEVELS + 1];
};

static int on_config(h2o_configurator_command_t *cmd, h2o_configurator_context_t *ctx, yoml_t *node)
{
    struct st_h2o_access_log_configurator_t *self = (void *)cmd->configurator;
    const char *path, *fmt = NULL;
    h2o_access_log_filehandle_t *fh;

    switch (node->type) {
    case YOML_TYPE_SCALAR:
        path = node->data.scalar;
        break;
    case YOML_TYPE_MAPPING: {
        yoml_t *t;
        /* get path */
        if ((t = yoml_get(node, "path")) == NULL) {
            h2o_configurator_errprintf(cmd, node, "could not find mandatory key `path`");
            return -1;
        }
        if (t->type != YOML_TYPE_SCALAR) {
            h2o_configurator_errprintf(cmd, t, "`path` must be scalar");
            return -1;
        }
        path = t->data.scalar;
        /* get format */
        if ((t = yoml_get(node, "format")) != NULL) {
            if (t->type != YOML_TYPE_SCALAR) {
                h2o_configurator_errprintf(cmd, t, "`format` must be a scalar");
                return -1;
            }
            fmt = t->data.scalar;
        }
    } break;
    default:
        h2o_configurator_errprintf(cmd, node, "node must be a scalar or a mapping");
        return -1;
    }

    if ((fh = h2o_access_log_open_handle(path, fmt)) == NULL)
        return -1;

    h2o_vector_reserve(NULL, (h2o_vector_t *)self->handles, sizeof(self->handles->entries[0]), self->handles->size + 1);
    self->handles->entries[self->handles->size++] = fh;

    return 0;
}

static int on_config_enter(h2o_configurator_t *_self, h2o_configurator_context_t *ctx, yoml_t *node)
{
    struct st_h2o_access_log_configurator_t *self = (void *)_self;
    size_t i;

    /* push the stack pointer */
    ++self->handles;

    /* link the handles */
    memset(self->handles, 0, sizeof(*self->handles));
    h2o_vector_reserve(NULL, (void *)self->handles, sizeof(self->handles->entries[0]), self->handles[-1].size + 1);
    for (i = 0; i != self->handles[-1].size; ++i) {
        h2o_access_log_filehandle_t *fh = self->handles[-1].entries[i];
        self->handles[0].entries[self->handles[0].size++] = fh;
        h2o_mem_addref_shared(fh);
    }

    return 0;
}

static int on_config_exit(h2o_configurator_t *_self, h2o_configurator_context_t *ctx, yoml_t *node)
{
    struct st_h2o_access_log_configurator_t *self = (void *)_self;
    size_t i;

    /* register all handles, and decref them */
    for (i = 0; i != self->handles->size; ++i) {
        h2o_access_log_filehandle_t *fh = self->handles->entries[i];
        if (ctx->pathconf != NULL)
            h2o_access_log_register(ctx->pathconf, fh);
        h2o_mem_release_shared(fh);
    }
    /* free the vector */
    free(self->handles->entries);

    /* pop the stack pointer */
    --self->handles;

    return 0;
}

void h2o_access_log_register_configurator(h2o_globalconf_t *conf)
{
    struct st_h2o_access_log_configurator_t *self = (void *)h2o_configurator_create(conf, sizeof(*self));

    self->super.enter = on_config_enter;
    self->super.exit = on_config_exit;
    self->handles = self->_handles_stack;

    h2o_configurator_define_command(&self->super, "access-log", H2O_CONFIGURATOR_FLAG_ALL_LEVELS, on_config);
}


text:
'use strict';

const v = require('../../src/modules/view');
const vb = require('../../src/modules/view.build');
const vd = require('../../src/modules/view.dom');

describe('view', () => {
    beforeEach(() => {
        wrapper = document.createElement('div');
        document.body.appendChild(wrapper);
    });

    afterEach(() => {
        document.body.removeChild(wrapper);
        wrapper = null;
    });

    it('should add the builder function\'s output to the target', async () => {
        const app = o(v, vb, vd);
        app.send('state', {});
        app.send('blob.builder', () => ['span']);
        await sleep();
        expect(wrapper.children[0].tagName)
            .toBe('SPAN');
    });

    it('should not attempt to draw before it can', () => {
        const init = (e) => {
            const app = o(v);
            expect(() => e(app.send))
                .not.toThrow(Error);
        };
        // missing build
        init((send) => {
            send('blob.target', wrapper);
            send('blob.builder', () => 'test');
            send('blob.state', () => 'test');
        });
        // missing target
        init((send) => {
            send('blob.draw', () => 0);
            send('blob.build', () => 'test');
            send('blob.builder', () => 'test');
            send('blob.state', () => 'test');
        });
        // missing builder
        init((send) => {
            send('blob.build', () => 'test');
            send('blob.target', wrapper);
            send('blob.state', () => 'test');
        });
        // missing state
        init((send) => {
            send('blob.build', () => 'test');
            send('blob.target', wrapper);
            send('blob.builder', () => 'test');
        });
    });

    describe('blobs', () => {
        it('should not accept multiple items per key', () => {
            const app = o(v, vb, vd);
            expect(() => app.send('blob.builder', [() => 'test']))
                .toThrow(Error);
            expect(() => app.send('blob.draw', [() => {}]))
                .toThrow(Error);
            expect(() => app.send('blob.update', [() => {}]))
                .toThrow(Error);
            expect(() => app.send('blob.build', [() => ({text: 'test'})]))
                .toThrow(Error);
        });

        describe('target', () => {
            it('should reject malformed targets', () => {
                const app = o(v, vb, vd);
                app.send('state', {});
                app.send('blob.builder', () => 'test');
                expect(() => app.send('blob.target', null))
                    .toThrow(/target/g);
            });

            it('should change the render target', async () => {
                const app = o(v, vb, vd);
                app.send('state', {});
                app.send('blob.builder', () => 'test');
                await sleep();
                expect(wrapper.innerHTML)
                    .toBe('test');
                const newTarget = document.createElement('div');
                wrapper.innerHTML = '';
                wrapper.appendChild(newTarget);
                expect(wrapper.innerHTML)
                    .toBe('

');
                app.send('blob.target', newTarget);
                await sleep();
                expect(wrapper.innerHTML)
                    .toBe('
test
');
            });
        });

        describe('builder', () => {
            it('should reject malformed builders', () => {
                const app = o(v, vb, vd);
                expect(() => app.send('blob.builder', null))
                    .toThrow(/builder/g);
            });

            it('should change the builder function', async () => {
                const app = o(v, vb, vd);
                app.send('state', {});
                app.send('blob.builder', () => 'test');
                await sleep();
                expect(wrapper.innerHTML)
                    .toBe('test');
                app.send('blob.builder', () => 'content');
                await sleep();
                expect(wrapper.innerHTML)
                    .toBe('content');
            });
        });

        describe('state', () => {
            it('should reject undefined state', () => {
                const app = o(v, vb, vd);
                expect(() => app.send('state', undefined))
                    .toThrow(/state/gi);
            });

            it('should trigger an update', async () => {
                const app = o(v, vb, vd);
                app.send('state', 'initial');
                app.send('blob.builder', (s) => s);
                await sleep();
                expect(wrapper.innerHTML)
                    .toBe('initial');
                app.send('state', 'changed');
                await sleep();
                expect(wrapper.innerHTML)
                    .toBe('changed');
            });
        });

        describe('draw', () => {
            it('should reject malformed draw', () => {
                const app = o(v, vb, vd);
                expect(() => app.send('blob.draw', {}))
                    .toThrow(/draw/g);
            });

            it('should trigger a redraw', async () => {
                const app = o(v, vb, vd);
                const test = jest.fn();
                app.send('state', {});
                app.send('blob.builder', () => 'test');
                app.send('blob.draw', test);
                await sleep();
                expect(test)
                    .toHaveBeenCalled();
            });
        });

        describe('update', () => {
            it('should reject malformed update', () => {
                const app = o(v, vb, vd);
                expect(() => app.send('blob.update', {}))
                    .toThrow(/update/g);
            });
        });

        describe('build', () => {
            it('should reject malformed build', () => {
                const app = o(v, vb, vd);
                expect(() => app.send('blob.build', {}))
                    .toThrow(/build/g);
            });

            it('should trigger an update', async () => {
                const app = o(v, vb, vd);
                const test = jest.fn();
                app.send('state', {});
                app.send('blob.builder', () => 'test');
                app.send('blob.build', test);
                await sleep();
                expect(test)
                    .toHaveBeenCalled();
            });

            it('should receive the builder\'s output and be able to edit it', async () => {
                const app = o(v, vb, vd);
                app.send('state', {});
                app.send('blob.builder', () => 'test');
                app.send('blob.build', (element) => {
                    expect(element)
                        .toEqual('test');
                    return {text: 'changed'};
                });
                await sleep();
                expect(wrapper.innerHTML)
                    .toBe('changed');
            });
        });
    });

    describe('events', () => {
        describe('state', () => {
            it('should emit an update when state changes', () => {
                const test = jest.fn();
                const app = o(v);
                app.on('update', test);
                app.send('state', {});
                expect(test)
                    .toHaveBeenCalled();
            });

            it('should not accept undefined state', () => {
                const app = o(v);
                expect(() => app.send('state', undefined))
                    .toThrow(/undefined/g);
            });
        });

        describe('update', () => {
            it('should wait for target, builder and state', () => {
                const test = jest.fn();
                const app = o(v);
                app.send('blob.draw', test);
                app.send('blob.update', test);
                app.send('blob.build', test);
                app.send('blob.target', {});
                expect(test)
                    .not.toHaveBeenCalled();
                app.send('blob.builder', () => {});
                expect(test)
                    .not.toHaveBeenCalled();
                app.send('state', {});
                expect(test)
                    .toHaveBeenCalled();
            });

            it('should draw before updating', () => {
                const test1 = jest.fn();
                const test2 = jest.fn();
                const app = o(v);
                app.send('blob.draw', test1);
                app.send('blob.update', () => {
                    test2();
                    expect(test1)
                        .toHaveBeenCalled();
                });
                app.send('blob.build', () => {});
                app.send('blob.target', {});
                app.send('blob.builder', () => {});
                app.send('state', {});
                app.update();
                expect(test2)
                    .toHaveBeenCalled();
            });

            it('should allow for a forced redraw', () => {
                const test1 = jest.fn();
                const test2 = jest.fn();
                const app = o(v);
                app.send('blob.draw', test1);
                app.send('blob.update', test2);
                app.send('blob.build', () => {});
                app.send('blob.target', {});
                app.send('blob.builder', () => {});
                app.send('state', {});
                app.send('update', true);
                expect(test1)
                    .toHaveBeenCalledTimes(2);
                expect(test2)
                    .not.toHaveBeenCalled();
            });
        });
    });
});


text:
__attribute__((visibility("default"), always_inline, const))
inline size_t orle_encode_size_bound(size_t len) {
    return len + (len + INT8_MAX - 1) / INT8_MAX;
}

__attribute__((visibility("default"), warn_unused_result, nonnull(1,2)))
size_t orle_encode_bytes(unsigned char * const dst, size_t * const dstlen,
                        unsigned char const * const src, size_t srclen);

__attribute__((visibility("default"), warn_unused_result, nonnull(1,2)))
size_t orle_decode_bytes(unsigned char * const dst, size_t * const dstlen,
                        unsigned char const * const src, size_t srclen);

#endif // ORLE_ORLE_H


text:
#if _MSC_VER > 1000
#pragma once
#endif

/////////////////////////////////////////////////////////////////////////////
// customaw.h -- Header file to be included by all custom AppWizards.

// Link to the AppWizard import library
#pragma comment(lib, "mfcapwz.lib")

/////////////////////////////////////////////////////////////////////////////
// Class CAppWizStepDlg-- all custom AppWizard steps must derive from
//  this class

class CAppWizStepDlg : public CDialog
{
public:
	CAppWizStepDlg(UINT nIDTemplate);
	~CAppWizStepDlg();
	virtual BOOL OnDismiss();

	// You will probably not want to override or call this function.  It is
	//  overriden (for CAppWizStepDlg) in MFCAPWZ.DLL to handle tabbing from
	//  the dialog controls in CAppWizStepDlg to the outer AppWizard dialog's
	//  controls.
    virtual BOOL PreTranslateMessage(MSG* pMsg);

	// You will probably not want to override or call this function.  It is
	//  overriden (for CAppWizStepDlg) in MFCAPWZ.DLL to dynamically change
	//  the dialog template's font to match the rest of the IDE.
	virtual BOOL Create(UINT nIDTemplate, CWnd* pParentWnd = NULL);

	UINT m_nIDTemplate;
};

/////////////////////////////////////////////////////////////////////////////
// class OutputStream-- this abstract class is used to funnel output while
//  parsing templates.

class OutputStream
{
public:
    virtual void WriteLine(LPCTSTR lpsz) = 0;
    virtual void WriteBlock(LPCTSTR pBlock, DWORD dwSize) = 0;
};

/////////////////////////////////////////////////////////////////////////////
// Class CCustomAppWiz-- all custom AppWizards must have a class derived from
//  this.  MFCAPWZ.DLL talks to the custom AppWizard by calling these virtual
//  functions.

class CCustomAppWiz : public CObject
{
public:
	CMapStringToString m_Dictionary;

	virtual void GetPlatforms(CStringList& rPlatforms) {}

	virtual CAppWizStepDlg* Next(CAppWizStepDlg* pDlg) { return NULL; }
	virtual CAppWizStepDlg* Back(CAppWizStepDlg* pDlg) { return NULL; }

	virtual void InitCustomAppWiz() { m_Dictionary.RemoveAll(); }
	virtual void ExitCustomAppWiz() {}

	virtual LPCTSTR LoadTemplate(LPCTSTR lpszTemplateName,
		DWORD& rdwSize, HINSTANCE hInstance = NULL);

	virtual void CopyTemplate(LPCTSTR lpszInput, DWORD dwSize, OutputStream* pOutput);
	virtual void ProcessTemplate(LPCTSTR lpszInput, DWORD dwSize, OutputStream* pOutput);
	virtual void PostProcessTemplate(LPCTSTR szTemplate) {}
};

/////////////////////////////////////////////////////////////////////////////
// C API's exported by AppWizard.  The custom AppWizard talks to MFCAPWZ.DLL
//  by calling these functions.

// Values to be passed to GetDialog()
enum AppWizDlgID
{
	APWZDLG_APPTYPE = 1,
	APWZDLG_DATABASE,
	APWZDLG_OLE,
	APWZDLG_DOCAPPOPTIONS,
	APWZDLG_PROJOPTIONS,
	APWZDLG_CLASSES,
	APWZDLG_DLGAPPOPTIONS,
	APWZDLG_DLLPROJOPTIONS,
};

void SetCustomAppWizClass(CCustomAppWiz* pAW);
CAppWizStepDlg* GetDialog(AppWizDlgID nID);
void SetNumberOfSteps(int nSteps);
BOOL ScanForAvailableLanguages(CStringList& rLanguages);
void SetSupportedLanguages(LPCTSTR szSupportedLangs);

#endif //__CUSTOMAW_H__


text:
'''Classes to contain and manipulate DNA, RNA, and protein sequences.'''
from ._dna import DNA
from ._dna import ssDNA
from ._dna import RestrictionSite
from ._dna import Primer
from ._peptide import Peptide
from ._rna import RNA
from ._sequence import Feature


text:
import childProcess from 'child_process'
import debug from 'debug'

export function ensure(namespace, fullCommand, options = {}) {
  let procDebug = debug(`vcs-clone:${namespace}`), command, args
  [command, ...args] = fullCommand

  return new Promise((resolve, reject) => {
    procDebug(fullCommand.join(' '))

    let proc = childProcess.spawn(command, args, options)

    proc.stdout.on('data', data => { procDebug(String(data).trim()) })
    proc.stderr.on('data', data => { procDebug(String(data).trim()) })

    proc.on('exit', (code) => {
      if (code == 0) {
        procDebug('command finished as success')
        resolve()
      } else {
        procDebug('command finished as error')
        reject(`Command ${fullCommand.join(' ')} returned non-zero status`)
      }
    })
  })
}

export function silentlyVerify(namespace, fullCommand) {
  let procDebug = debug(`vcs-clone:${namespace}`), command, args
  [command, ...args] = fullCommand

  return new Promise((resolve, reject) => {
    procDebug(fullCommand.join(' '))

    let proc = childProcess.spawn(command, args)
    proc.on('exit', (code) => {
      if (code == 0) {
        procDebug('command finished as success')
        resolve(true)
      } else {
        procDebug('command finished as error')
        resolve(false)
      }
    })
  })
}


text:
<?php

namespace Application\Sonata\UserBundle\Repository;

use Doctrine\ORM\EntityRepository;

/**
 * SkillCategoryRepository
 *
 * This class was generated by the Doctrine ORM. Add your own custom
 * repository methods below.
 */
class SkillCategoryRepository extends EntityRepository
{
}


text:
package jsx3;

import jsx3.app.Server;

/**
 * A Factory class to allow access to GI components in the same way that the
 * global Javascript variable(s) do on the client.
 * @author Joe Walker [joe at getahead dot ltd dot uk]
 */
public class GI
{
    /**
     * Get access to a Server instance with the given name
     * @param name The name to get access to
     * @return A new Server proxy instance
     */
    public static Server getServer(String name)
    {
        return new Server(null, name + ".");
    }
}


text:
import {Component, AfterViewInit, ViewChild} from '@angular/core';
import {ActivatedRoute} from '@angular/router';
import {BsTableComponent} from '../common/bs-table.component';
import {ModalDemoComponent} from '../common/bs-modal.component';
import {UserService} from '../service/user.service';
declare var $:any;

/*
 * We're loading this component asynchronously
 * We are using some magic with es6-promise-loader that will wrap the module with a Promise
 * see https://github.com/gdi2290/es6-promise-loader for more info
 */

console.log('`User` component loaded asynchronously');

//bootstrap-table options
var columns = [{
  title: '用户名',
  field: 'name'

}, {
  title: '显示名',
  field: 'showName'

}, {
  title: '邮箱',
  field: 'email'

}, {
  title: '业务管理员',
  field: 'businessManager'

}, {
  title: '修改时间',
  field: 'modifyTime'
}, {
  field: 'pk',
  title: '操作',
  formatter: operationFormatter,
}];

// cell formatter -操作栏
function operationFormatter(value, row, index) {
  var html = '
' +
    '' +
    '' +
    '
'
  return html;
}
function getCellClass(oprationType, row) {
  var res;
  var editClass = "iconfont cell-operation cell-edit";
  var delClass = "iconfont cell-operation cell-del";
  if (row.isPreset == 1) {
    editClass += " ae-disabled";
    delClass += " ae-disabled";
  }
  switch (oprationType) {
    case 'edit':
      res = editClass;
      break;
    case 'del':
      res = delClass;
      break;
    default:
      res = "iconfont";
  }
  return res;
}

const bsOpts = {
  uniqueId: 'pk',
  columns: columns,
  striped: true,
  data: [],
  pageSize: 10,
  pagination: true,
  sortable: false,
  sidePagination: "client"
}
function addEvent() {
  $('.bs-table').on('click', '.fa-trash', function (e) {
    var pk = $(e.target).parent().data('pk');
    var rowData = $('#userList').bootstrapTable('getRowByUniqueId', pk);
    if (confirm('确定要删除用户<' + rowData.name + '>')) {
      $('#userList').bootstrapTable('remove', {field:'pk',values:[pk]});
    }
  })
}
@Component({
  selector: 'user',
  styles: [``],
  template: `

用户列表

    <modal-demo></modal-demo>
  `
})
export class UserComponent implements AfterViewInit {
  @ViewChild(BsTableComponent)
  private bsT1: BsTableComponent;
  @ViewChild(ModalDemoComponent)
  private bsModal1: ModalDemoComponent;

  localState: any;
  bsOpts = bsOpts;

  constructor(public userService: UserService) {

  }

  ngOnInit() {
    console.log('hello `User` component');
    var _ = require('underscore');
    console.log(_);

    // static data that is bundled
    // var mockData = require('assets/mock-data/mock-data.json');
    // console.log('mockData', mockData);
    // if you're working with mock data you can also use http.get('assets/mock-data/mock-data.json')

  }

  ngAfterViewInit() {
    // Redefine `seconds()` to get from the `CountdownTimerComponent.seconds` ...
    // but wait a tick first to avoid one-time devMode
    // unidirectional-data-flow-violation error
    // setTimeout(() => this.seconds = () => this.timerComponent.seconds, 0);
    this.asyncDataWithWebpack();
    // $('#modal1').modal('show');
  }

  asyncDataWithWebpack() {
    // you can also async load mock data with 'es6-promise-loader'
    // you would do this if you don't want the mock-data bundled
    // remember that 'es6-promise-loader' is a promise
    this.userService.listMockData().then(users=>this.bsT1.loadData(users))
      .then(()=> {
        addEvent();
      });
    // setTimeout(() => {
    //
    //   System.import('../../assets/mock-data/mock-data.json')
    //     .then(json => {
    //       console.log('async mockData', json);
    //       this.bsT1.loadData(json);
    //     });
    //
    // }, 2000);
  }

}