/***
 * ASM: a very small and fast Java bytecode manipulation framework
 * Copyright (c) 2000-2011 INRIA, France Telecom
 * All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 * 1. Redistributions of source code must retain the above copyright
 *    notice, this list of conditions and the following disclaimer.
 * 2. Redistributions in binary form must reproduce the above copyright
 *    notice, this list of conditions and the following disclaimer in the
 *    documentation and/or other materials provided with the distribution.
 * 3. Neither the name of the copyright holders nor the names of its
 *    contributors may be used to endorse or promote products derived from
 *    this software without specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
 * THE POSSIBILITY OF SUCH DAMAGE.
 */
package org.objectweb.asm.tree;

import java.util.ArrayList;
import java.util.List;

import org.objectweb.asm.AnnotationVisitor;
import org.objectweb.asm.Attribute;
import org.objectweb.asm.ClassVisitor;
import org.objectweb.asm.FieldVisitor;
import org.objectweb.asm.Opcodes;
import org.objectweb.asm.TypePath;

/**
 * A node that represents a field.
 *
 * @author Eric Bruneton
 */
public class FieldNode extends FieldVisitor {

  /**
   * The field's access flags (see {@link org.objectweb.asm.Opcodes}). This
   * field also indicates if the field is synthetic and/or deprecated.
   */
  public int access;

  /**
   * The field's name.
   */
  public String name;

  /**
   * The field's descriptor (see {@link org.objectweb.asm.Type}).
   */
  public String desc;

  /**
   * The field's signature. May be <tt>null</tt>.
   */
  public String signature;

  /**
   * The field's initial value. This field, which may be <tt>null</tt> if the
   * field does not have an initial value, must be an {@link Integer}, a
   * {@link Float}, a {@link Long}, a {@link Double} or a {@link String}.
   */
  public Object value;

  /**
   * The runtime visible annotations of this field. This list is a list of
   * {@link AnnotationNode} objects. May be <tt>null</tt>.
   *
   * @associates org.objectweb.asm.tree.AnnotationNode
   * @label visible
   */
  public List<AnnotationNode> visibleAnnotations;

  /**
   * The runtime invisible annotations of this field. This list is a list of
   * {@link AnnotationNode} objects. May be <tt>null</tt>.
   *
   * @associates org.objectweb.asm.tree.AnnotationNode
   * @label invisible
   */
  public List<AnnotationNode> invisibleAnnotations;

  /**
   * The runtime visible type annotations of this field. This list is a list of
   * {@link TypeAnnotationNode} objects. May be <tt>null</tt>.
   *
   * @associates org.objectweb.asm.tree.TypeAnnotationNode
   * @label visible
   */
  public List<TypeAnnotationNode> visibleTypeAnnotations;

  /**
   * The runtime invisible type annotations of this field. This list is a list
   * of {@link TypeAnnotationNode} objects. May be <tt>null</tt>.
   *
   * @associates org.objectweb.asm.tree.TypeAnnotationNode
   * @label invisible
   */
  public List<TypeAnnotationNode> invisibleTypeAnnotations;

  /**
   * The non standard attributes of this field. This list is a list of
   * {@link Attribute} objects. May be <tt>null</tt>.
   *
   * @associates org.objectweb.asm.Attribute
   */
  public List<Attribute> attrs;

  /**
   * Constructs a new {@link FieldNode}. Subclasses must not use this
   * constructor. Instead, they must use the
   * {@link #FieldNode(int, int, String, String, String, Object)} version.
   *
   * @param access
   *          the field's access flags (see {@link org.objectweb.asm.Opcodes}).
   *          This parameter also indicates if the field is synthetic and/or
   *          deprecated.
   * @param name
   *          the field's name.
   * @param desc
   *          the field's descriptor (see {@link org.objectweb.asm.Type Type}).
   * @param signature
   *          the field's signature.
   * @param value
   *          the field's initial value. This parameter, which may be
   *          <tt>null</tt> if the field does not have an initial value, must be
   *          an {@link Integer}, a {@link Float}, a {@link Long}, a
   *          {@link Double} or a {@link String}.
   * @throws IllegalStateException
   *           If a subclass calls this constructor.
   */
  public FieldNode(final int access, final String name, final String desc, final String signature, final Object value) {
    this(Opcodes.ASM6, access, name, desc, signature, value);
    if (getClass() != FieldNode.class) {
      throw new IllegalStateException();
    }
  }

  /**
   * Constructs a new {@link FieldNode}. Subclasses must not use this
   * constructor.
   *
   * @param api
   *          the ASM API version implemented by this visitor. Must be one of
   *          {@link Opcodes#ASM4} or {@link Opcodes#ASM5}.
   * @param access
   *          the field's access flags (see {@link org.objectweb.asm.Opcodes}).
   *          This parameter also indicates if the field is synthetic and/or
   *          deprecated.
   * @param name
   *          the field's name.
   * @param desc
   *          the field's descriptor (see {@link org.objectweb.asm.Type Type}).
   * @param signature
   *          the field's signature.
   * @param value
   *          the field's initial value. This parameter, which may be
   *          <tt>null</tt> if the field does not have an initial value, must be
   *          an {@link Integer}, a {@link Float}, a {@link Long}, a
   *          {@link Double} or a {@link String}.
   */
  public FieldNode(final int api, final int access, final String name, final String desc, final String signature, final Object value) {
    super(api);
    this.access = access;
    this.name = name;
    this.desc = desc;
    this.signature = signature;
    this.value = value;
  }

  // ------------------------------------------------------------------------
  // Implementation of the FieldVisitor abstract class
  // ------------------------------------------------------------------------

  @Override
  public AnnotationVisitor visitAnnotation(final String desc, final boolean visible) {
    AnnotationNode an = new AnnotationNode(desc);
    if (visible) {
      if (visibleAnnotations == null) {
        visibleAnnotations = new ArrayList<AnnotationNode>(1);
      }
      visibleAnnotations.add(an);
    } else {
      if (invisibleAnnotations == null) {
        invisibleAnnotations = new ArrayList<AnnotationNode>(1);
      }
      invisibleAnnotations.add(an);
    }
    return an;
  }

  @Override
  public AnnotationVisitor visitTypeAnnotation(int typeRef, TypePath typePath, String desc, boolean visible) {
    TypeAnnotationNode an = new TypeAnnotationNode(typeRef, typePath, desc);
    if (visible) {
      if (visibleTypeAnnotations == null) {
        visibleTypeAnnotations = new ArrayList<TypeAnnotationNode>(1);
      }
      visibleTypeAnnotations.add(an);
    } else {
      if (invisibleTypeAnnotations == null) {
        invisibleTypeAnnotations = new ArrayList<TypeAnnotationNode>(1);
      }
      invisibleTypeAnnotations.add(an);
    }
    return an;
  }

  @Override
  public void visitAttribute(final Attribute attr) {
    if (attrs == null) {
      attrs = new ArrayList<Attribute>(1);
    }
    attrs.add(attr);
  }

  @Override
  public void visitEnd() {
  }

  // ------------------------------------------------------------------------
  // Accept methods
  // ------------------------------------------------------------------------

  /**
   * Checks that this field node is compatible with the given ASM API version.
   * This methods checks that this node, and all its nodes recursively, do not
   * contain elements that were introduced in more recent versions of the ASM
   * API than the given version.
   *
   * @param api
   *          an ASM API version. Must be one of {@link Opcodes#ASM4},
   *          {@link Opcodes#ASM5} or {@link Opcodes#ASM6}.
   */
  public void check(final int api) {
    if (api == Opcodes.ASM4) {
      if (visibleTypeAnnotations != null && visibleTypeAnnotations.size() > 0) {
        throw new RuntimeException();
      }
      if (invisibleTypeAnnotations != null && invisibleTypeAnnotations.size() > 0) {
        throw new RuntimeException();
      }
    }
  }

  /**
   * Makes the given class visitor visit this field.
   *
   * @param cv
   *          a class visitor.
   */
  public void accept(final ClassVisitor cv) {
    FieldVisitor fv = cv.visitField(access, name, desc, signature, value);
    if (fv == null) {
      return;
    }
    int i, n;
    n = visibleAnnotations == null ? 0 : visibleAnnotations.size();
    for (i = 0; i < n; ++i) {
      AnnotationNode an = visibleAnnotations.get(i);
      an.accept(fv.visitAnnotation(an.desc, true));
    }
    n = invisibleAnnotations == null ? 0 : invisibleAnnotations.size();
    for (i = 0; i < n; ++i) {
      AnnotationNode an = invisibleAnnotations.get(i);
      an.accept(fv.visitAnnotation(an.desc, false));
    }
    n = visibleTypeAnnotations == null ? 0 : visibleTypeAnnotations.size();
    for (i = 0; i < n; ++i) {
      TypeAnnotationNode an = visibleTypeAnnotations.get(i);
      an.accept(fv.visitTypeAnnotation(an.typeRef, an.typePath, an.desc, true));
    }
    n = invisibleTypeAnnotations == null ? 0 : invisibleTypeAnnotations.size();
    for (i = 0; i < n; ++i) {
      TypeAnnotationNode an = invisibleTypeAnnotations.get(i);
      an.accept(fv.visitTypeAnnotation(an.typeRef, an.typePath, an.desc, false));
    }
    n = attrs == null ? 0 : attrs.size();
    for (i = 0; i < n; ++i) {
      fv.visitAttribute(attrs.get(i));
    }
    fv.visitEnd();
  }
}

{'repo_name': 'GraxCode/JByteMod-Beta', 'stars': '520', 'repo_language': 'Java', 'file_name': 'IMatchable.java', 'mime_type': 'text/plain', 'hash': -337752363711843931, 'source_dataset': 'data'}


Clazz.declarePackage ("javajs.swing");
Clazz.load (["javajs.swing.JMenuItem"], "javajs.swing.JCheckBoxMenuItem", null, function () {
c$ = Clazz.declareType (javajs.swing, "JCheckBoxMenuItem", javajs.swing.JMenuItem);
Clazz.makeConstructor (c$,
function () {
Clazz.superConstructor (this, javajs.swing.JCheckBoxMenuItem, ["chk", 2]);
});
});

{'repo_name': '3dmol/3Dmol.js', 'stars': '393', 'repo_language': 'Jupyter Notebook', 'file_name': 'org.eclipse.core.resources.prefs', 'mime_type': 'text/plain', 'hash': -8780026225983949477, 'source_dataset': 'data'}


<?php
// Define path to application directory
define('ROOT_PATH',        dirname(dirname(dirname(__FILE__))));
define('APPLICATION_PATH', ROOT_PATH . DIRECTORY_SEPARATOR .
                           'admin' . DIRECTORY_SEPARATOR.'application');

// Define application environment
define('APPLICATION_ENV', (getenv('APPLICATION_ENV') ? getenv('APPLICATION_ENV') : 'production'));

set_include_path('.' . PATH_SEPARATOR . ROOT_PATH . DIRECTORY_SEPARATOR . 'library' . PATH_SEPARATOR . ROOT_PATH . DIRECTORY_SEPARATOR . 'library' . DIRECTORY_SEPARATOR . 'PEAR' . PATH_SEPARATOR . get_include_path());

// Create application, bootstrap, and run
require_once 'Zend/Application.php';

require_once ROOT_PATH . DIRECTORY_SEPARATOR . 'library' .
          DIRECTORY_SEPARATOR . 'Frapi' . DIRECTORY_SEPARATOR . 'AllFiles.php';

$app = new Zend_Application(
    APPLICATION_ENV, APPLICATION_PATH . DIRECTORY_SEPARATOR . 'config' .
    DIRECTORY_SEPARATOR.'application.ini'
);

$app->bootstrap()->run();

{'repo_name': 'frapi/frapi', 'stars': '634', 'repo_language': 'PHP', 'file_name': 'index.php', 'mime_type': 'text/x-php', 'hash': 8782923847316604013, 'source_dataset': 'data'}


backports.shutil-get-terminal-size==1.0.0
cvxopt==1.1.8
cvxpy==1.0.11
Cython==0.29.2
decorator==4.3.0
dill==0.2.8.2
ecos==2.0.7.post1
enum34==1.1.6
fastcache==1.0.2
future==0.17.1
ipython==5.8.0
ipython-genutils==0.2.0
multiprocess==0.70.6.1
numpy==1.15.4
osqp==0.5.0
pathlib2==2.3.3
pexpect==4.6.0
pickleshare==0.7.5
prompt-toolkit==1.0.15
ptyprocess==0.6.0
Pygments==2.3.1
qpsolvers==1.0.4
quadprog==0.1.6
scandir==1.9.0
scipy==1.2.0
scs==2.0.2
simplegeneric==0.8.1
six==1.12.0
spicy==0.16.0
traitlets==4.3.2
wcwidth==0.1.7

{'repo_name': 'stephane-caron/qpsolvers', 'stars': '129', 'repo_language': 'Python', 'file_name': 'getting-started.rst', 'mime_type': 'text/plain', 'hash': 4792275221354886585, 'source_dataset': 'data'}


/*
 * Licensed to Elasticsearch under one or more contributor
 * license agreements. See the NOTICE file distributed with
 * this work for additional information regarding copyright
 * ownership. Elasticsearch licenses this file to you 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
 *
 *         http://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.
 */

package org.elasticsearch.gradle;

public enum Architecture {

    X64,
    AARCH64;

    public static Architecture current() {
        final String architecture = System.getProperty("os.arch", "");
        switch (architecture) {
            case "amd64":
            case "x86_64":
                return X64;
            case "aarch64":
                return AARCH64;
            default:
                throw new IllegalArgumentException("can not determine architecture from [" + architecture + "]");
        }
    }

}

{'repo_name': 'elastic/elasticsearch', 'stars': '49964', 'repo_language': 'Java', 'file_name': 'UnassignedInfo.java', 'mime_type': 'text/x-java', 'hash': -6677091608992649805, 'source_dataset': 'data'}


*{margin: 0;padding: 0;list-style: none;}
/*
KISSY CSS Reset
理念：1. reset 的目的不是清除浏览器的默认样式，这仅是部分工作。清除和重置是紧密不可分的。
2. reset 的目的不是让默认样式在所有浏览器下一致，而是减少默认样式有可能带来的问题。
3. reset 期望提供一套普适通用的基础样式。但没有银弹，推荐根据具体需求，裁剪和修改后再使用。
特色：1. 适应中文；2. 基于最新主流浏览器。
维护：玉伯<lifesinger@gmail.com>, 正淳<ragecarrier@gmail.com>
 */

/** 清除内外边距 **/
body, h1, h2, h3, h4, h5, h6, hr, p, blockquote, /* structural elements 结构元素 */
dl, dt, dd, ul, ol, li, /* list elements 列表元素 */
pre, /* text formatting elements 文本格式元素 */
form, fieldset, legend, button, input, textarea, /* form elements 表单元素 */
th, td /* table elements 表格元素 */ {
  margin: 0;
  padding: 0;
}

/** 设置默认字体 **/
body,
button, input, select, textarea /* for ie */ {
  font: 12px/1.5 tahoma, arial, \5b8b\4f53, sans-serif;
}
h1, h2, h3, h4, h5, h6 { font-size: 100%; }
address, cite, dfn, em, var { font-style: normal; } /* 将斜体扶正 */
code, kbd, pre, samp { font-family: courier new, courier, monospace; } /* 统一等宽字体 */
small { font-size: 12px; } /* 小于 12px 的中文很难阅读，让 small 正常化 */

/** 重置列表元素 **/
ul, ol { list-style: none; }

/** 重置文本格式元素 **/
a { text-decoration: none; }
a:hover { text-decoration: underline; }

/** 重置表单元素 **/
legend { color: #000; } /* for ie6 */
fieldset, img { border: 0; } /* img 搭车：让链接里的 img 无边框 */
button, input, select, textarea { font-size: 100%; } /* 使得表单元素在 ie 下能继承字体大小 */
/* 注：optgroup 无法扶正 */

/** 重置表格元素 **/
table { border-collapse: collapse; border-spacing: 0; }

/* 清除浮动 */
.ks-clear:after, .clear:after {
  content: '\20';
  display: block;
  height: 0;
  clear: both;
}
.ks-clear, .clear {
  *zoom: 1;
}

.main {
  padding: 30px 100px;
width: 960px;
margin: 0 auto;
}
.main h1{font-size:36px; color:#333; text-align:left;margin-bottom:30px; border-bottom: 1px solid #eee;}

.helps{margin-top:40px;}
.helps pre{
  padding:20px;
  margin:10px 0;
  border:solid 1px #e7e1cd;
  background-color: #fffdef;
  overflow: auto;
}

.icon_lists{
  width: 100% !important;

}

.icon_lists li{
  float:left;
  width: 100px;
  height:180px;
  text-align: center;
  list-style: none !important;
}
.icon_lists .icon{
  font-size: 42px;
  line-height: 100px;
  margin: 10px 0;
  color:#333;
  -webkit-transition: font-size 0.25s ease-out 0s;
  -moz-transition: font-size 0.25s ease-out 0s;
  transition: font-size 0.25s ease-out 0s;

}
.icon_lists .icon:hover{
  font-size: 100px;
}

.markdown {
  color: #666;
  font-size: 14px;
  line-height: 1.8;
}

.highlight {
  line-height: 1.5;
}

.markdown img {
  vertical-align: middle;
  max-width: 100%;
}

.markdown h1 {
  color: #404040;
  font-weight: 500;
  line-height: 40px;
  margin-bottom: 24px;
}

.markdown h2,
.markdown h3,
.markdown h4,
.markdown h5,
.markdown h6 {
  color: #404040;
  margin: 1.6em 0 0.6em 0;
  font-weight: 500;
  clear: both;
}

.markdown h1 {
  font-size: 28px;
}

.markdown h2 {
  font-size: 22px;
}

.markdown h3 {
  font-size: 16px;
}

.markdown h4 {
  font-size: 14px;
}

.markdown h5 {
  font-size: 12px;
}

.markdown h6 {
  font-size: 12px;
}

.markdown hr {
  height: 1px;
  border: 0;
  background: #e9e9e9;
  margin: 16px 0;
  clear: both;
}

.markdown p,
.markdown pre {
  margin: 1em 0;
}

.markdown > p,
.markdown > blockquote,
.markdown > .highlight,
.markdown > ol,
.markdown > ul {
  width: 80%;
}

.markdown ul > li {
  list-style: circle;
}

.markdown > ul li,
.markdown blockquote ul > li {
  margin-left: 20px;
  padding-left: 4px;
}

.markdown > ul li p,
.markdown > ol li p {
  margin: 0.6em 0;
}

.markdown ol > li {
  list-style: decimal;
}

.markdown > ol li,
.markdown blockquote ol > li {
  margin-left: 20px;
  padding-left: 4px;
}

.markdown code {
  margin: 0 3px;
  padding: 0 5px;
  background: #eee;
  border-radius: 3px;
}

.markdown pre {
  border-radius: 6px;
  background: #f7f7f7;
  padding: 20px;
}

.markdown pre code {
  border: none;
  background: #f7f7f7;
  margin: 0;
}

.markdown strong,
.markdown b {
  font-weight: 600;
}

.markdown > table {
  border-collapse: collapse;
  border-spacing: 0px;
  empty-cells: show;
  border: 1px solid #e9e9e9;
  width: 95%;
  margin-bottom: 24px;
}

.markdown > table th {
  white-space: nowrap;
  color: #333;
  font-weight: 600;

}

.markdown > table th,
.markdown > table td {
  border: 1px solid #e9e9e9;
  padding: 8px 16px;
  text-align: left;
}

.markdown > table th {
  background: #F7F7F7;
}

.markdown blockquote {
  font-size: 90%;
  color: #999;
  border-left: 4px solid #e9e9e9;
  padding-left: 0.8em;
  margin: 1em 0;
  font-style: italic;
}

.markdown blockquote p {
  margin: 0;
}

.markdown .anchor {
  opacity: 0;
  transition: opacity 0.3s ease;
  margin-left: 8px;
}

.markdown .waiting {
  color: #ccc;
}

.markdown h1:hover .anchor,
.markdown h2:hover .anchor,
.markdown h3:hover .anchor,
.markdown h4:hover .anchor,
.markdown h5:hover .anchor,
.markdown h6:hover .anchor {
  opacity: 1;
  display: inline-block;
}

.markdown > br,
.markdown > p > br {
  clear: both;
}

.hljs {
  display: block;
  background: white;
  padding: 0.5em;
  color: #333333;
  overflow-x: auto;
}

.hljs-comment,
.hljs-meta {
  color: #969896;
}

.hljs-string,
.hljs-variable,
.hljs-template-variable,
.hljs-strong,
.hljs-emphasis,
.hljs-quote {
  color: #df5000;
}

.hljs-keyword,
.hljs-selector-tag,
.hljs-type {
  color: #a71d5d;
}

.hljs-literal,
.hljs-symbol,
.hljs-bullet,
.hljs-attribute {
  color: #0086b3;
}

.hljs-section,
.hljs-name {
  color: #63a35c;
}

.hljs-tag {
  color: #333333;
}

.hljs-title,
.hljs-attr,
.hljs-selector-id,
.hljs-selector-class,
.hljs-selector-attr,
.hljs-selector-pseudo {
  color: #795da3;
}

.hljs-addition {
  color: #55a532;
  background-color: #eaffea;
}

.hljs-deletion {
  color: #bd2c00;
  background-color: #ffecec;
}

.hljs-link {
  text-decoration: underline;
}

pre{
  background: #fff;
}

{'repo_name': 'helijun/documents', 'stars': '216', 'repo_language': 'JavaScript', 'file_name': 'axios.js', 'mime_type': 'text/plain', 'hash': -3961261640760380343, 'source_dataset': 'data'}


// src/test/scala/progscala3/fp/curry/TupledFuncSuite.scala
package progscala3.fp.curry

import munit._

class TupledFuncSuite extends FunSuite:

	def mult(d1: Double, d2: Double, d3: Double) = d1 * d2 * d3
	val multTupled = Function.tupled(mult)
	// multTupled: ((Double, Double, Double)) => Double = <function1>

	val d3 = (2.2, 3.3, 4.4)
	val expected = "31.9440" // use strings to avoid comparing doubles!

	test("Tuple values can be extracted and passed as arguments to functions") {
		assert(expected == toStr(mult(d3._1, d3._2, d3._3)))
	}

	test("A func of N params is convertable to a funct of 1 N-valued tuple param") {
		val result = multTupled(d3)
		assert(expected == toStr(result))
	}

	test("A func of 1 N-valued tuple param is convertable to a funct of N params") {
		val multUntupled = Function.untupled(multTupled)

		val result = multUntupled(d3._1, d3._2, d3._3)
		assert(expected == toStr(result))
	}

	def toStr(d: Double): String = "%7.4f".format(d) // helper

{'repo_name': 'deanwampler/programming-scala-book-code-examples', 'stars': '435', 'repo_language': 'Scala', 'file_name': 'run-akka-input.txt', 'mime_type': 'text/plain', 'hash': -5465239132784682210, 'source_dataset': 'data'}


package helloworld;

import helloworld.behavioral.chain_of_responsibility.HelloWorldObjectHandler;
import helloworld.behavioral.chain_of_responsibility.HelloWorldInterjectionHandler;
import helloworld.behavioral.chain_of_responsibility.HelloWorldHandler;
import helloworld.behavioral.command.Command;
import helloworld.behavioral.command.HelloWorldPrintCommand;
import helloworld.behavioral.interpreter.HelloWorldInterpreter;
import helloworld.behavioral.iterator.HelloWorldCharacterIterator;
import helloworld.behavioral.mediator.HelloWorldInterjection;
import helloworld.behavioral.mediator.HelloWorldMediator;
import helloworld.behavioral.mediator.HelloWorldObject;
import helloworld.behavioral.memento.HelloWorldMementoOriginator;
import helloworld.behavioral.observer.HelloWorldObserver;
import helloworld.behavioral.observer.Subject;
import helloworld.behavioral.state.HelloWorldStateContext;
import helloworld.behavioral.strategy.DesignPatternHelloWorldStrategy;
import helloworld.behavioral.strategy.HelloWorldStrategyContext;
import helloworld.behavioral.template_method.TemplateMethodHelloWorld;
import helloworld.behavioral.visitor.HelloWorldCharacterElements;
import helloworld.behavioral.visitor.HelloWorldCharacterVisitor;
import helloworld.behavioral.visitor.HelloWorldVisitor;
import helloworld.creational.abstract_factory.AbstractFactory;
import helloworld.creational.abstract_factory.SplitHelloWorldFactory;
import helloworld.creational.builder.HelloWorldBuilder;
import helloworld.creational.factory_method.FactoryMethodHelloWorldFactory;
import helloworld.creational.prototype.HelloWorldPrototype;
import helloworld.creational.singleton.HelloWorldSingleton;
import helloworld.structural.adapter.HelloAdapterDesignPattern;
import helloworld.structural.adapter.HelloWorldAdapter;
import helloworld.structural.bridge.DesignPatternWorldImpl;
import helloworld.structural.bridge.HelloWorldBridge;
import helloworld.structural.composite.CompositeHelloWorld;
import helloworld.structural.decorator.HelloWorldDecorator;
import helloworld.structural.facade.HelloWorldFacade;
import helloworld.structural.flyweight.HelloWorldFlyWeightFactory;
import helloworld.structural.proxy.HelloWorldProxy;

/**
 * @author yihua.huang@dianping.com
 */
public class Main {

    public static void main(String[] args) throws InstantiationException, IllegalAccessException {

        System.out.println("We are creational patterns!");

        System.out.println("1. Abstract Factory: ");

        SplitHelloWorldFactory abstractFactory = AbstractFactory.select(AbstractFactory.Type.DesignPattern);
        HelloWorld abstractFactoryHelloWorld = new SplitHelloWorld(abstractFactory.createHelloWorldInterjection(),
                abstractFactory.createHelloWorldObject());
        System.out.println(abstractFactoryHelloWorld.helloWorld());

        System.out.println("2. Builder: ");
        HelloWorld builderHelloWorld = HelloWorldBuilder.builder()
                .interjection("Hello")
                .object("Builder").getHelloWorld();
        System.out.println(builderHelloWorld.helloWorld());

        System.out.println("3. Factory Method: ");
        /**
         * Difference between "abstract factory" and "factory method" is the abstracting point:
         *  1. Abstracting point of abstract factory is factory.
         *  2. Abstracting point of factory method is generated object.
         */
        FactoryMethodHelloWorldFactory factoryMethodHelloWorldFactory = new FactoryMethodHelloWorldFactory();
        HelloWorld factoryMethodHelloWorld = factoryMethodHelloWorldFactory.createHelloWorld();
        System.out.println(factoryMethodHelloWorld.helloWorld());

        System.out.println("4. Prototype: ");
        HelloWorld prototypeHelloWorld = HelloWorldPrototype.PROTOTYPE.clone();
        System.out.println(prototypeHelloWorld.helloWorld());

        System.out.println("5. Singleton: ");
        HelloWorld singletonHelloWorld = HelloWorldSingleton.instance();
        System.out.println(singletonHelloWorld.helloWorld());

        System.out.println("====================================");
        System.out.println("We are structural patterns!");

        System.out.println("6. Adapter: ");
        HelloWorld adapterHelloWorld = new HelloWorldAdapter(new HelloAdapterDesignPattern());
        System.out.println(adapterHelloWorld.helloWorld());

        System.out.println("7. Bridge: ");
        HelloWorld bridgeHelloWorld = new HelloWorldBridge(new DesignPatternWorldImpl());
        //leave bridgeHelloWorld' output to compositeHelloWorld

        System.out.println("8. Composite: ");
        HelloWorld compositeHelloWorld = new CompositeHelloWorld(bridgeHelloWorld, new CompositeHelloWorld.DefaultHelloWorld());
        System.out.println(compositeHelloWorld.helloWorld());

        System.out.println("9. Decorator: ");
        HelloWorldDecorator decoratorHelloWorld = new HelloWorldDecorator(new HelloWorldDecorator.DefaultHelloWorld());
        System.out.println(decoratorHelloWorld.helloDecorator());

        System.out.println("10. Facade: ");
        HelloWorld facadeHelloWorld = HelloWorldFacade.instance().facadeHelloWorld();
        System.out.println(facadeHelloWorld.helloWorld());

        System.out.println("11. Flyweight: ");
        HelloWorld flyWeightHelloWorld = HelloWorldFlyWeightFactory.instance().createHelloWorld("Hello Flyweight!");
        System.out.println(flyWeightHelloWorld.helloWorld());

        System.out.println("12. Proxy: ");
        HelloWorld proxyHelloWorld = new HelloWorldProxy(new HelloWorldProxy.DefaultHelloWorld());
        System.out.println(proxyHelloWorld.helloWorld());

        System.out.println("====================================");
        System.out.println("We are behavioral patterns!");

        System.out.println("13. Chain of Responsibility: ");
        HelloWorldHandler helloWorldChainOfResponsibility = new HelloWorldInterjectionHandler().setNext(new HelloWorldObjectHandler());
        System.out.println(helloWorldChainOfResponsibility.helloWorld());

        System.out.println("14. Command: ");
        Command helloWorldCommand = new HelloWorldPrintCommand();
        helloWorldCommand.execute();

        System.out.println("15. Interpreter: ");
        HelloWorldInterpreter helloWorldInterpreter = new HelloWorldInterpreter();
        helloWorldInterpreter.interpret("println('Hello Interpreter!')");

        System.out.println("16. Iterator: ");
        HelloWorldCharacterIterator helloWorldCharacterIterator = new HelloWorldCharacterIterator("Hello Iterator!".toCharArray());
        while (helloWorldCharacterIterator.hasNext()) {
            System.out.print(helloWorldCharacterIterator.next());
        }
        System.out.println();

        System.out.println("17. Mediator: ");
        HelloWorldInterjection helloWorldInterjection = new HelloWorldInterjection();
        HelloWorldObject helloWorldObject = new HelloWorldObject();
        HelloWorldMediator helloWorldMediator = new HelloWorldMediator(helloWorldInterjection, helloWorldObject);
        helloWorldInterjection.setHelloWorldMediator(helloWorldMediator);
        helloWorldObject.setHelloWorldMediator(helloWorldMediator);
        System.out.println(helloWorldObject.helloWorld());

        System.out.println("18. Memento: ");
        HelloWorldMementoOriginator helloWorldMementoOriginator = new HelloWorldMementoOriginator();
        HelloWorldMementoOriginator.Memento memento = helloWorldMementoOriginator.set("Hello Memento!").saveToMemento();
        helloWorldMementoOriginator.set("Hello Whatever!");
        helloWorldMementoOriginator.restoreFromMemento(memento);
        System.out.println(helloWorldMementoOriginator.helloWorld());

        System.out.println("19. Observer: ");
        Subject subject = new Subject().attach(new HelloWorldObserver());
        subject.notifyObservers();

        System.out.println("20. State: ");
        HelloWorldStateContext helloWorldStateContext = new HelloWorldStateContext();
        HelloWorld stateHelloWorld = helloWorldStateContext.appendWord("Hello").appendWord("State");
        System.out.println(stateHelloWorld.helloWorld());

        System.out.println("21. Strategy: ");
        HelloWorldStrategyContext helloWorldStrategyContext = new HelloWorldStrategyContext(new DesignPatternHelloWorldStrategy());
        System.out.println(helloWorldStrategyContext.helloWorld());

        System.out.println("22. Template Method: ");
        HelloWorld templateMethodHelloWorld = new TemplateMethodHelloWorld();
        System.out.println(templateMethodHelloWorld.helloWorld());

        System.out.println("23. Visitor: ");
        HelloWorldCharacterElements helloWorldCharacterElements = new HelloWorldCharacterElements("Hello Visitor!".toCharArray());
        HelloWorldCharacterVisitor helloWorldCharacterVisitor = new HelloWorldCharacterVisitor();
        helloWorldCharacterElements.accept(helloWorldCharacterVisitor);
        System.out.println(helloWorldCharacterVisitor.helloWorld());

    }
}

{'repo_name': 'code4craft/hello-design-pattern', 'stars': '327', 'repo_language': 'Java', 'file_name': 'HelloWorldPrototypeTest.java', 'mime_type': 'text/x-java', 'hash': -6231653755471558038, 'source_dataset': 'data'}


<!doctype html>

<title>CodeMirror: Search/Replace Demo</title>
<meta charset="utf-8"/>
<link rel=stylesheet href="../doc/docs.css">

<link rel="stylesheet" href="../lib/codemirror.css">
<link rel="stylesheet" href="../addon/dialog/dialog.css">
<link rel="stylesheet" href="../addon/search/matchesonscrollbar.css">

CodeMirror

Home

Manual

Code

Search/Replace

Search/Replace Demo

<form><textarea id="code" name="code">

indentWithTabs: boolean

Whether, when indenting, the first N*tabSize
  spaces should be replaced by N tabs. Default is false.

electricChars: boolean

Configures whether the editor should re-indent the current
  line when a character is typed that might change its proper
  indentation (only works if the mode supports indentation).
  Default is true.

specialChars: RegExp

A regular expression used to determine which characters
  should be replaced by a
  special placeholder.
  Mostly useful for non-printing special characters. The default
  is /[\u0000-\u0019\u00ad\u200b\u2028\u2029\ufeff]/.

specialCharPlaceholder: function(char) → Element

A function that, given a special character identified by
  the specialChars
  option, produces a DOM node that is used to represent the
  character. By default, a red dot (•)
  is shown, with a title tooltip to indicate the character code.

rtlMoveVisually: boolean

Determines whether horizontal cursor movement through
  right-to-left (Arabic, Hebrew) text is visual (pressing the left
  arrow moves the cursor left) or logical (pressing the left arrow
  moves to the next lower index in the string, which is visually
  right in right-to-left text). The default is false
  on Windows, and true on other platforms.

</textarea></form>

Demonstration of primitive search/replace functionality. The
    keybindings (which can be overridden by custom keymaps) are:

Ctrl-F / Cmd-F

Start searching

Ctrl-G / Cmd-G

Find next

Shift-Ctrl-G / Shift-Cmd-G

Find previous

Shift-Ctrl-F / Cmd-Option-F

Replace

Shift-Ctrl-R / Shift-Cmd-Option-F

Replace all

Searching is enabled by
    including addon/search/search.js
    and addon/search/searchcursor.js.
    For good-looking input dialogs, you also want to include
    addon/dialog/dialog.js
    and addon/dialog/dialog.css.

{'repo_name': 'allwefantasy/mlsql', 'stars': '1170', 'repo_language': 'JavaScript', 'file_name': 'DSLSQLLexer.java', 'mime_type': 'text/x-java', 'hash': -7162975761558094500, 'source_dataset': 'data'}


fileFormatVersion: 2
guid: c7aaa47f2514a5141970781d595e76a9
timeCreated: 1458283038
licenseType: Store
ModelImporter:
  serializedVersion: 19
  fileIDToRecycleName:
    100000: //RootNode
    100002: teleport_playarea_corner
    100004: teleport_playarea_edge
    400000: //RootNode
    400002: teleport_playarea_corner
    400004: teleport_playarea_edge
    2300000: //RootNode
    2300002: teleport_playarea_corner
    2300004: teleport_playarea_edge
    3300000: //RootNode
    3300002: teleport_playarea_corner
    3300004: teleport_playarea_edge
    4300000: teleport_playarea_corner
    4300002: teleport_playarea_edge
  materials:
    importMaterials: 0
    materialName: 1
    materialSearch: 1
  animations:
    legacyGenerateAnimations: 4
    bakeSimulation: 0
    resampleCurves: 1
    optimizeGameObjects: 0
    motionNodeName:
    animationImportErrors:
    animationImportWarnings:
    animationRetargetingWarnings:
    animationDoRetargetingWarnings: 0
    animationCompression: 1
    animationRotationError: 0.5
    animationPositionError: 0.5
    animationScaleError: 0.5
    animationWrapMode: 0
    extraExposedTransformPaths: []
    clipAnimations: []
    isReadable: 1
  meshes:
    lODScreenPercentages: []
    globalScale: 1
    meshCompression: 0
    addColliders: 0
    importBlendShapes: 1
    swapUVChannels: 0
    generateSecondaryUV: 0
    useFileUnits: 1
    optimizeMeshForGPU: 1
    keepQuads: 0
    weldVertices: 1
    secondaryUVAngleDistortion: 8
    secondaryUVAreaDistortion: 15.000001
    secondaryUVHardAngle: 88
    secondaryUVPackMargin: 4
    useFileScale: 1
  tangentSpace:
    normalSmoothAngle: 60
    normalImportMode: 0
    tangentImportMode: 3
  importAnimation: 0
  copyAvatar: 0
  humanDescription:
    human: []
    skeleton: []
    armTwist: 0.5
    foreArmTwist: 0.5
    upperLegTwist: 0.5
    legTwist: 0.5
    armStretch: 0.05
    legStretch: 0.05
    feetSpacing: 0
    rootMotionBoneName:
    hasTranslationDoF: 0
  lastHumanDescriptionAvatarSource: {instanceID: 0}
  animationType: 0
  humanoidOversampling: 1
  additionalBone: 0
  userData:
  assetBundleName:
  assetBundleVariant:

{'repo_name': 'Flafla2/Vive-Teleporter', 'stars': '397', 'repo_language': 'C#', 'file_name': 'AudioManager.asset', 'mime_type': 'text/plain', 'hash': -1498101662423299628, 'source_dataset': 'data'}


const fs = require('fs')
const path = require('path')
const inquirer = require('inquirer')
const rollup = require('rollup')
const chalk = require('chalk')
const zlib = require('zlib')
const rimraf = require('rimraf')
const typescript = require('rollup-plugin-typescript2')
const uglify = require('rollup-plugin-uglify').uglify
const execa = require('execa')
const ora = require('ora')
const spinner = ora({
  prefixText: `${chalk.green('\n[building tasks]')}`
})

function getPackagesName () {
  let ret
  let all = fs.readdirSync(resolve('packages'))
  // drop hidden file whose name is startWidth '.'
  // drop packages which would not be published(eg: examples and docs)
  ret = all
        .filter(name => {
          const isHiddenFile = /^\./g.test(name)
          return !isHiddenFile
        }).filter(name => {
          const isPrivatePackages = require(resolve(`packages/${name}/package.json`)).private
          return !isPrivatePackages
        })

  return ret
}

function cleanPackagesOldDist(packagesName) {
  packagesName.forEach(name => {
    const distPath = resolve(`packages/${name}/dist`)
    const typePath = resolve(`packages/${name}/dist/types`)

    if (fs.existsSync(distPath)) {
      rimraf.sync(distPath)
    }

    fs.mkdirSync(distPath)
    fs.mkdirSync(typePath)
  })
}

function resolve(p) {
  return path.resolve(__dirname, '../', p)
}

function PascalCase(str){
  const re=/-(\w)/g;
  const newStr = str.replace(re, function (match, group1){
      return group1.toUpperCase();
  })
  return newStr.charAt(0).toUpperCase() + newStr.slice(1);
}

const generateBanner = (packageName) => {
  let ret =
  '/*!\n' +
  ' * better-scroll / ' + packageName + '\n' +
  ' * (c) 2016-' + new Date().getFullYear() + ' ustbhuangyi\n' +
  ' * Released under the MIT License.\n' +
  ' */'
  return ret
}

const buildType = [
  {
    format: 'umd',
    ext: '.js'
  },
  {
    format: 'umd',
    ext: '.min.js'
  },
  {
    format: 'es',
    ext: '.esm.js'
  }
]

function generateBuildConfigs(packagesName) {
  const result = []
  packagesName.forEach(name => {
    buildType.forEach((type) => {
      let config = {
        input: resolve(`packages/${name}/src/index.ts`),
        output: {
          file: resolve(`packages/${name}/dist/${name}${type.ext}`),
          name: PascalCase(name),
          format: type.format,
          banner: generateBanner(name)
        },
        plugins: generateBuildPluginsConfigs(type.ext.indexOf('min')>-1, name)
      }
      // rename
      if (name === 'core' && config.output.format !== 'es') {
        config.output.name = 'BScroll'
        /** Disable warning for default imports */
        config.output.exports = 'named'
        // it seems the umd bundle can not satisfies our demand
        config.output.footer = 'if(typeof window !== "undefined" && window.BScroll) { \n' +
                              '  window.BScroll = window.BScroll.default;\n}'
      }
      // rollup will valiate config properties of config own and output a warning.
      // put packageName in prototype to ignore warning.
      Object.defineProperties(config, {
        'packageName': {
          value: name
        },
        'ext': {
          value: type.ext
        }
      })
      result.push(config)
    })
  })
  return result
}
function generateBuildPluginsConfigs(isMin) {
  const tsConfig = {
    verbosity: -1,
    tsconfig: path.resolve(__dirname, '../tsconfig.json'),
  }
  const plugins = []
    if (isMin) {
      plugins.push(uglify())
    }
  plugins.push(typescript(tsConfig))
  return plugins
}

function build(builds) {
  let built = 0
  const total = builds.length
  const next = () => {
    buildEntry(builds[built], built + 1, () => {
      builds[built-1] = null
      built++
      if (built < total) {
        next()
      }
    })
  }
  next()
}

function buildEntry(config, curIndex, next) {
  const isProd = /min\.js$/.test(config.output.file)

  spinner.start(`${config.packageName}${config.ext} is buiding now. \n`)

  rollup.rollup(config).then((bundle) => {
    bundle.write(config.output).then(({ output }) => {
      const code = output[0].code

      spinner.succeed(`${config.packageName}${config.ext} building has ended.`)

      function report(extra) {
        console.log(chalk.magenta(path.relative(process.cwd(), config.output.file)) + ' ' + getSize(code) + (extra || ''))
        next()
      }
      if (isProd) {
        zlib.gzip(code, (err, zipped) => {
          if (err) return reject(err)
          let words =  `(gzipped: ${chalk.magenta(getSize(zipped))})`
          report(words)
        })
      } else {
        report()
      }

      // since we need bundle code for three types
      // just generate .d.ts only once
      if (curIndex % 3 === 0) {
        copyDTSFiles(config.packageName)
      }
    })
  }).catch((e) => {
    spinner.fail('buiding is failed')
    console.log(e)
  })
}

function copyDTSFiles (packageName) {
  console.log(chalk.cyan('> start copying .d.ts file to dist dir of packages own.'))
  const sourceDir = resolve(`packages/${packageName}/dist/packages/${packageName}/src/*`)
  const targetDir = resolve(`packages/${packageName}/dist/types/`)
  execa.commandSync(`mv ${sourceDir} ${targetDir}`, { shell: true })
  console.log(chalk.cyan('> copy job is done.'))
  rimraf.sync(resolve(`packages/${packageName}/dist/packages`))
  rimraf.sync(resolve(`packages/${packageName}/dist/node_modules`))
}

function getSize(code) {
  return (code.length / 1024).toFixed(2) + 'kb'
}

const getAnswersFromInquirer = async (packagesName) => {
  const question = {
    type: 'checkbox',
    name: 'packages',
    scroll: false,
    message: 'Select build repo(Support Multiple selection)',
    choices: packagesName.map(name => ({
      value: name,
      name
    }))
  }
  let { packages } = await inquirer.prompt(question)
  // make no choice
  if (!packages.length) {
    console.log(chalk.yellow(`
      It seems that you did't make a choice.

      Please try it again.
    `))
    return
  }

  // chose 'all' option
  if (packages.some(package => package === 'all')) {
    packages = getPackagesName()
  }
  const { yes } = await inquirer.prompt([{
    name: 'yes',
    message: `Confirm build ${packages.join(' and ')} packages?`,
    type: 'list',
    choices: ['Y', 'N']
  }])

  if (yes === 'N') {
    console.log(chalk.yellow('[release] cancelled.'))
    return
  }

  return packages
}
const buildBootstrap = async () => {
  const packagesName = getPackagesName()
  // provide 'all' option
  packagesName.unshift('all')

  const answers = await getAnswersFromInquirer(packagesName)

  if (!answers) return

  cleanPackagesOldDist(answers)

  const buildConfigs = generateBuildConfigs(answers)

  build(buildConfigs)

}
buildBootstrap().catch(err => {
  console.error(err)
  process.exit(1)
})

{'repo_name': 'ustbhuangyi/better-scroll', 'stars': '12334', 'repo_language': 'TypeScript', 'file_name': 'textarea.e2e.ts', 'mime_type': 'text/plain', 'hash': 6498155921000226463, 'source_dataset': 'data'}


<?xml version='1.0' encoding='utf-8'?>
<document xmlns="https://code.dccouncil.us/schemas/dc-library" xmlns:codified="https://code.dccouncil.us/schemas/codified" xmlns:codify="https://code.dccouncil.us/schemas/codify" xmlns:xi="http://www.w3.org/2001/XInclude" id="D.C. Law 21-144">
  <num type="law">21-144</num>
  <num type="bill">21-712</num>
  <num type="act">21-429</num>
  <heading type="short">Fair Shot Minimum Wage Amendment Act of 2016</heading>
  <heading type="long">To amend the Minimum Wage Act Revision Act of 1992 to progressively increase the minimum wage to $15 an hour by 2020, beginning in 2021 to increase the minimum wage during each successive year pursuant to the Consumer Price Index, to progressively increase the minimum wage for an employee who receives gratuities to $5 an hour by 2020, beginning in 2021 to increase the minimum wage for an employee who receives gratuities during each successive year pursuant to the Consumer Price Index, and to require the Mayor to submit a biannual compliance report to the Council; and to amend the Living Wage Act of 2006 to provide that the minimum wage requirements of the Minimum Wage Act Revision Act of 1992 shall apply to contracts and agreements for government assistance if the minimum wage is higher than the living wage.</heading>
  <meta>
    <effective>2016-08-19</effective>
    <citations>
      <citation type="law" url="http://lims.dccouncil.us/Download/35660/B21-0712-SignedAct.pdf">D.C. Law 21-144</citation>
      <citation type="register">63 DCR 9275</citation>
    </citations>
    <history>
      <vote date="2016-06-07" reading="Amendment"/>
      <vote date="2016-06-07" reading="Amendment"/>
      <vote date="2016-06-07" reading="Amendment"/>
      <vote date="2016-06-07" reading="First"/>
      <vote date="2016-06-21" reading="Amendment"/>
      <vote date="2016-06-21" reading="Final"/>
      <enacted>2016-06-27</enacted>
      Law 21-144 increases the minimum wage to $15.00 an hour in 2020 and increase the minimum wage during each successive year starting in 2021 in proportion to the increase in the Consumer Price Index. It increases the minimum wage for employees who receive gratuities to $5.00 an hour by 2020. It also requires the Mayor to submit a biannual compliance report to the Council.
      <committee>Committee on Business, Consumer, and Regulatory Affairs</committee>
    </history>
  </meta>
  <text>BE IT ENACTED BY THE COUNCIL OF THE DISTRICT OF COLUMBIA, That this act may be cited as the "Fair Shot Minimum Wage Amendment Act of 2016".</text>

    <num>2</num>
    <text>The Minimum Wage Act Revision Act of 1992, effective March 25, 1993 (D.C. Law 9-248; D.C. Official Code § 32-1001
      et seq.), is amended as follows:
    </text>
    <para codify:path="§3|(3)">
      <num>(a)</num>
      <text>Section 3(3) (D.C. Official Code § 32-1002(3) is amended as follows:</text>
      <para>
        <num>(1)</num>
        <text>Strike the word "includes" and insert the phrase "includes the District of Columbia government," in its place.</text>
        <codify:find-replace find="includes" replace="includes the District of Columbia government," count="1"/>
      </para>
      <para>
        <num>(2)</num>
        <text>Strike the phrase "or the District of Columbia" and insert the word "government" in its place.</text>
        <codify:find-replace find="or the District of Columbia" replace="government" count="1"/>
      </para>
    </para>
    <para codify:path="§4">
      <num>(b)</num>
      <text>Section 4 (D.C. Official Code § 32-1003) is amended as follows:</text>
      <para codify:path="(a)">
        <num>(1)</num>
        <text>Subsection (a) is amended as follows:</text>
        <para codify:path="(5)">
          <num>(A)</num>
          <text>Paragraph (5) is amended to read as follows:</text>
          <include>
            <para>
              <codify:replace/>
              <num>(5)</num>
              <para>
                <num>(A)</num>
                <text>Except as provided in subsection (h) of this section and subparagraph (B) of this paragraph, the minimum hourly wage required to be paid to an employee by an employer shall be as of:</text>
                <para>
                  <num>(i)</num>
                  <text>July 1, 2016:  $11.50;</text>
                </para>
                <para>
                  <num>(ii)</num>
                  <text>July 1, 2017: $12.50;</text>
                </para>
                <para>
                  <num>(iii)</num>
                  <text>July 1, 2018: $13.25;</text>
                </para>
                <para>
                  <num>(iv)</num>
                  <text>July 1, 2019: $14.00; and</text>
                </para>
                <para>
                  <num>(v)</num>
                  <text>July 1, 2020: $15.00.</text>
                </para>
              </para>
              <para>
                <num>(B)</num>
                <text>If the minimum wage set by the United States government pursuant to the Fair Labor Standards Act ("U.S. minimum wage") is greater than the minimum hourly wage currently being paid pursuant to subparagraph (A) of this paragraph, the minimum hourly wage paid to an employee by an employer shall be the U.S. minimum wage plus $1.</text>
              </para>
            </para>
          </include>
          <aftertext>.</aftertext>
        </para>
        <para codify:path="(6)">
          <num>(B)</num>
          <text>Paragraph (6) is amended as follows:</text>
          <para>
            <num>(i)</num>
            <text>Subparagraph (A) is amended by striking the date "July 1, 2017" and inserting the date "July 1, 2021," in its place.</text>
            <codify:find-replace path="(A)" find="July 1, 2017" replace="July 1, 2021," count="1"/>
          </para>
          <para codify:path="(B)">
            <num>(ii)</num>
            <text>Subparagraph (B) is repealed.</text>
            <codify:repeal/>
          </para>
        </para>
      </para>
      <para codify:path="(f)">
        <num>(2)</num>
        <text>Subsection (f) is amended to read as follows:</text>
        <include>
          <para>
            <codify:replace/>
            <num>(f)</num>
            <para>
              <num>(1)</num>
              <text>The minimum hourly wage required to be paid by an employer to an employee who receives gratuities ("tipped minimum wage"), provided that the employee actually receives gratuities in an amount at least equal to the difference between the hourly wage paid and the minimum hourly wage as set by subsection (a) of this section, shall be as of:</text>
              <para>
                <num>(A)</num>
                <text>January 1, 2005: $2.77;</text>
              </para>
              <para>
                <num>(B)</num>
                <text>July 1, 2017: $3.33;</text>
              </para>
              <para>
                <num>(C)</num>
                <text>July 1, 2018: $3.89:</text>
              </para>
              <para>
                <num>(D)</num>
                <text>July 1, 2019: $ 4.45; and</text>
              </para>
              <para>
                <num>(E)</num>
                <text>July 1, 2020: $ 5.00.</text>
              </para>
            </para>
            <para>
              <num>(2)</num>
              <text>Beginning on July 1, 2021, and no later than July 1 of each successive year, the tipped minimum wage shall be increased in proportion to the annual average increase, if any, in the Consumer Price Index for All Urban Consumers in the Washington Metropolitan Statistical Area published by the Bureau of Labor Statistics of the United States Department of Labor for the previous calendar year. Any increase under this paragraph shall be adjusted to the nearest multiple of $.05.</text>
            </para>
          </para>
        </include>
        <aftertext>.</aftertext>
      </para>
      <para>
        <num>(3)</num>
        <text>A new subsection (f-1) is added to read as follows:</text>
        <include>
          <para>
            <codify:insert after="(f)"/>
            <num>(f-1)</num>
            <text>The Mayor shall publish in the District of Columbia Register, on the Department of Employment Services website, and make available to employers in a bulletin, the adjusted minimum hourly wage to be paid by an employer to an employee pursuant to subsections (a)(5) and (6) and (f) of this section at least 30 days before an increase is scheduled to go into effect.</text>
          </para>
        </include>
        <aftertext>.</aftertext>
      </para>
    </para>
    <para codify:path="§10a|(c)|(2)">
      <num>(c)</num>
      <text>Section 10a(c)(2) (D.C. Official Code § 32-1009.01(c)(2)) is amended by striking the phrase "an annual" and inserting the phrase "a quarterly" in its place.</text>
      <codify:find-replace find="an annual" replace="a quarterly" count="1"/>
    </para>
    <para>
      <num>(d)</num>
      <text>A new section 8a is added to read as follows:</text>
      <include>

          <codify:insert doc="D.C. Law 9-248" after="§8" history-prefix="as added"/>
          <codify:organic after="§32-1007" num-value="32-1007.01"/>
          <num>8a</num>
          <heading>Reporting.</heading>
          <text>The Mayor shall submit biannually a report to the Council regarding any audits or inspections conducted related to compliance with this act or any regulation issued pursuant to this act. Each report shall include:</text>
          <para>
            <num>(1)</num>
            <text>The number of employers inspected for compliance due to complaints received, categorized by size of the employer based on the number of employees;</text>
          </para>
          <para>
            <num>(2)</num>
            <text>The number of employers inspected for compliance as a result of a random audit, categorized by size of the employer based on the number of employees;</text>
          </para>
          <para>
            <num>(3)</num>
            <text>The number of violations, by type of violation; and</text>
          </para>
          <para>
            <num>(4)</num>
            <text>An explication of the actions the Mayor took pursuant to section 12 against each employer charged with violating this act or any regulation issued pursuant to this act, including a list of fines assessed against the employer.</text>
          </para>

      </include>
      <aftertext>.</aftertext>
      <codify:annotation doc="D.C. Code" path="§32-1007.01" type="Emergency Legislation" history="false">
          For temporary (90 days) creation of this section, see § 2(d) of the Fair Shot Minimum Wage Emergency Amendment Act of 2016 (D.C. Act 21-428, June 28, 2016, 63 DCR 9275).
        </codify:annotation>
    </para>

    <num>3</num>
    <text>The Living Wage Act of 2006, effective June 8, 2006 (D.C. Law 16-118; D.C. Official Code § 2-220.01 et seq.), is amended as follows:
    </text>
    <para>
      <num>(a)</num>
      <text>Section 103 (D.C. Official Code § 2-220.03) is amended by adding a new subsection (f) to read as follows:</text>
      <include>
        <para>
          <codify:insert path="§103"/>
          <num>(f)</num>
          <text>Notwithstanding the requirements of subsections (a), (b), and (c) of this section, at no time shall the living wage be less than the minimum wage established pursuant to section 4 of the Minimum Wage Act Revision Act of 1992, effective March 25, 1993 (D.C. Law 9-248; D.C. Official Code § 32-1003).</text>
        </para>
      </include>
      <aftertext>.</aftertext>
    </para>
    <para codify:path="§111">
      <num>(b)</num>
      <text>Section 111 (D.C. Official Code § 2-220.11) is amended as follows:</text>
      <para>
        <num>(1)</num>
        <text>Subsection (a) is amended by striking the phrase "The requirements of" and inserting the phrase "Except as provided in subsection (c) of this section, the requirements of" in its place.</text>
        <codify:find-replace path="(a)" find="The requirements of" replace="Except as provided in subsection (c) of this section, the requirements of" count="1"/>
      </para>
      <para>
        <num>(2)</num>
        <text>Subsection (b) is repealed.</text>
        <codify:repeal path="(b)"/>
      </para>
      <para>
        <num>(3)</num>
        <text>A new subsection (c) is added to read as follows:</text>
        <include>
          <para>
            <codify:insert/>
            <num>(c)</num>
            <text>The minimum wage required by section 4 of the Minimum Wage Act Revision Act of 1992, effective March 25, 1993 (D.C. Law 9-248; D.C. Official Code § 32-1003) ("Minimum Wage Act"), shall apply to an agreement entered into, renewed, or extended on or after the effective date of the Fair Shot Minimum Wage Amendment Act of 2016, passed on 2nd reading on June 21, 2016 (Enrolled version of Bill 21-712); provided, that the living wage is lower than the minimum wage required by section 4 of the Minimum Wage Act.</text>
          </para>
        </include>
        <aftertext>.</aftertext>
      </para>
    </para>

    <num>4</num>
    <heading>Fiscal impact statement.</heading>
    <text>The Council adopts the fiscal impact statement in the committee report as the fiscal impact statement required by section 4a of the General Legislative Procedures Act of 1975, approved October 16, 2006 (120 Stat. 2038; D.C. Official Code § 1-301.47a).</text>

    <num>5</num>
    <heading>Effective date.</heading>
    <text>This act shall take effect following approval by the Mayor (or in the event of veto by the Mayor, action by the Council to override the veto), a 30-day period of congressional review as provided in section 602(c)(1) of the District of Columbia Home Rule Act, approved December24, 1973 (87 Stat. 813; D.C. Official Code § 1-206.02(c)(1)), and publication in the District of Columbia Register.</text>

</document>

{'repo_name': 'DCCouncil/dc-law-xml', 'stars': '270', 'repo_language': 'None', 'file_name': 'codify_street_designation_anno.xml', 'mime_type': 'text/plain', 'hash': 7278189409627810826, 'source_dataset': 'data'}


// Copyright 2007 The Closure Library Authors. All Rights Reserved.
//
// 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
//
//      http://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.

/**
 * @fileoverview Callback object that counts matches.
 *
 * @author robbyw@google.com (Robby Walker)
 */

goog.provide('goog.dom.pattern.callback.Counter');

/**
 * Callback class for counting matches.
 * @constructor
 * @final
 */
goog.dom.pattern.callback.Counter = function() {
  /**
   * The count of objects matched so far.
   *
   * @type {number}
   */
  this.count = 0;

  /**
   * The callback function.  Suitable as a callback for
   * {@link goog.dom.pattern.Matcher}.
   * @private {Function}
   */
  this.callback_ = null;
};

/**
 * Get a bound callback function that is suitable as a callback for
 * {@link goog.dom.pattern.Matcher}.
 *
 * @return {!Function} A callback function.
 */
goog.dom.pattern.callback.Counter.prototype.getCallback = function() {
  if (!this.callback_) {
    this.callback_ = goog.bind(function() {
      this.count++;
      return false;
    }, this);
  }
  return this.callback_;
};

/**
 * Reset the counter.
 */
goog.dom.pattern.callback.Counter.prototype.reset = function() {
  this.count = 0;
};

{'repo_name': 'SeleniumHQ/htmlunit-driver', 'stars': '145', 'repo_language': 'JavaScript', 'file_name': 'ExternalDriverSupplier.java', 'mime_type': 'text/html', 'hash': 3678122470828074318, 'source_dataset': 'data'}