text:
(function (global, factory) {
  typeof exports === 'object' && typeof module !== 'undefined' ? factory(require('froala-editor')) :
  typeof define === 'function' && define.amd ? define(['froala-editor'], factory) :
  (factory(global.FroalaEditor));
}(this, (function (FE) { 'use strict';

  FE = FE && FE.hasOwnProperty('default') ? FE['default'] : FE;

  /**
   * Slovenian
   */
  FE.LANGUAGE['sl'] = {
    translation: {
      // Place holder
      'Type something': 'Nekaj vtipkajte',
      // Basic formatting
      'Bold': 'Krepko',
      'Italic': 'Italik',
      //'Poševno',
      'Underline': 'Podčrta',
      //'Podčrtano',
      'Strikethrough': 'Prečrtano',
      // Main buttons
      'Insert': 'Vstavi',
      'Delete': 'Izbriši',
      'Cancel': 'Prekliči',
      'OK': 'OK',
      'Back': 'Nazaj',
      'Remove': 'Odstrani',
      'More': 'Več',
      'Update': 'Posodobi',
      'Style': 'Slog',
      // Font
      'Font Family': 'Oblika pisave',
      'Font Size': 'Velikost pisave',
      // Colors
      'Colors': 'Barve',
      'Background': 'Ozadje',
      'Text': 'Besedilo',
      'HEX Color': 'HEX Barva',
      // Paragraphs
      'Paragraph Format': 'Oblika odstavka',
      'Normal': 'Normalno',
      'Code': 'Koda',
      'Heading 1': 'Naslov 1',
      'Heading 2': 'Naslov 2',
      'Heading 3': 'Naslov 3',
      'Heading 4': 'Naslov 4',
      // Style
      'Paragraph Style': 'Slog odstavka',
      'Inline Style': 'Vrstični slog',
      // Alignment
      'Align': 'Poravnajte',
      'Align Left': 'Leva poravnava',
      'Align Center': 'Sredinska poravnava',
      'Align Right': 'Desna poravnava',
      'Align Justify': 'Poravnajte utemeljite',
      'None': 'Noben',
      // Lists
      'Ordered List': 'Številčni seznam',
      'Unordered List': 'Neštevilčni seznam',
      // Indent
      'Decrease Indent': 'Zmanjšaj zamik',
      'Increase Indent': 'Povečaj zamik',
      // Links
      'Insert Link': 'Vstavi povezavo',
      'Open in new tab': 'Odpri v novem zavihku',
      'Open Link': 'Odpri povezavo',
      'Edit Link': 'Uredi povezavo',
      'Unlink': 'Odstrani povezavo',
      'Choose Link': 'Izberi povezavo',
      // Images
      'Insert Image': 'Vstavi sliko',
      'Upload Image': 'Naloži sliko',
      'By URL': 'Po URL-ju',
      'Browse': 'Prebrskaj',
      'Drop image': 'Spusti sliko',
      'or click': 'ali kliknite',
      'Manage Images': 'Urejanje slik',
      'Loading': 'Nalaganje',
      'Deleting': 'Brisanje',
      'Tags': 'Značke',
      'Are you sure? Image will be deleted.': 'Ali ste prepričani? Slika bo izbrisana.',
      'Replace': 'Zamenjaj',
      'Uploading': 'Nalaganje',
      'Loading image': 'Nalagam sliko',
      'Display': 'Prikaži',
      'Inline': 'Vrstično',
      'Break Text': 'Prelomi besedilo',
      'Alternative Text': 'Nadomestno besedilo',
      'Change Size': 'Spremeni velikost',
      'Width': 'Širina',
      'Height': 'Višina',
      'Something went wrong. Please try again.': 'Nekaj je šlo narobe. Prosimo, poskusite ponovno.',
      'Image Caption': 'Opis slike',
      'Advanced Edit': 'Napredno urejanje',
      // Video
      'Insert Video': 'Vstavi video posnetek',
      'Embedded Code': 'Vdelana koda',
      'Paste in a video URL': 'Prilepite URL video posnetka',
      'Drop video': 'Spustite video posnetek sem',
      'Your browser does not support HTML5 video.': 'Vaš brskalnik ne podpira HTML5 video funkcionalnosti.',
      'Upload Video': 'Naloži video posnetek',
      // Tables
      'Insert Table': 'Vstavi tabelo',
      'Table Header': 'Glava tabele',
      'Remove Table': 'Odstrani tabelo',
      'Table Style': 'Slog tabele',
      'Horizontal Align': 'Horizontalna poravnava',
      'Row': 'Vrstica',
      'Insert row above': 'Vstavi vrstico nad',
      'Insert row below': 'Vstavi vrstico pod',
      'Delete row': 'Izbriši vrstico',
      'Column': 'Stolpec',
      'Insert column before': 'Vstavi stolpec pred',
      'Insert column after': 'Vstavi stolpec po',
      'Delete column': 'Izbriši stolpec',
      'Cell': 'Celica',
      'Merge cells': 'Združi celice',
      'Horizontal split': 'Horizontalni razcep',
      'Vertical split': 'Vertikalni razcep',
      'Cell Background': 'Ozadje celice',
      'Vertical Align': 'Vertikalna poravnava',
      'Top': 'Vrh',
      'Middle': 'Sredina',
      'Bottom': 'Dno',
      'Align Top': 'Vrhnja poravnava',
      'Align Middle': 'Sredinska poravnava',
      'Align Bottom': 'Spodnja poravnava',
      'Cell Style': 'Slog celice',
      // Files
      'Upload File': 'Naloži datoteko',
      'Drop file': 'Spustite datoteko sem',
      // Emoticons
      'Emoticons': 'Emotikoni',
      // Line breaker
      'Break': 'Zlom',
      // Math
      'Subscript': 'Podpisano',
      'Superscript': 'Nadpisano',
      // Full screen
      'Fullscreen': 'Celozaslonski način',
      // Horizontal line
      'Insert Horizontal Line': 'Vstavi vodoravno črto',
      // Clear formatting
      'Clear Formatting': 'Počisti oblikovanje',
      // Save
      'Save': 'Shrani',
      // Undo, redo
      'Undo': 'Razveljavi',
      'Redo': 'Ponovno uveljavi',
      // Select all
      'Select All': 'Izberi vse',
      // Code view
      'Code View': 'Prikaži kodo',
      // Quote
      'Quote': 'Citat',
      'Increase': 'Povečaj',
      'Decrease': 'Zmanjšaj',
      // Quick Insert
      'Quick Insert': 'Hitro vstavljanje',
      // Spcial Characters
      'Special Characters': 'Posebni znaki',
      'Latin': 'Latinica',
      'Greek': 'Grščina',
      'Cyrillic': 'Cirilica',
      'Punctuation': 'Ločila',
      'Currency': 'Valute',
      'Arrows': 'Puščice',
      'Math': 'Matematika',
      'Misc': 'Razno',
      // Print.
      'Print': 'Natisni',
      // Spell Checker.
      'Spell Checker': 'Črkovalnik',
      // Help
      'Help': 'Pomoč',
      'Shortcuts': 'Bližnjice',
      'Inline Editor': 'Vdelani urejevalnik',
      'Show the editor': 'Pokaži urejevalnik',
      'Common actions': 'Skupna dejanja',
      'Copy': 'Kopiraj',
      'Cut': 'Izreži',
      'Paste': 'Prilepi',
      'Basic Formatting': 'Osnovno oblikovanje',
      'Increase quote level': 'Povečaj raven citata',
      'Decrease quote level': 'Zmanjšaj raven citata',
      'Image / Video': 'Slika / Video',
      'Resize larger': 'Povečaj',
      'Resize smaller': 'Pomanjšaj',
      'Table': 'Tabela',
      'Select table cell': 'Izberi celico tabele',
      'Extend selection one cell': 'Razširi izbor za eno celico',
      'Extend selection one row': 'Razširi izbor za eno vrstico',
      'Navigation': 'Navigacija',
      'Focus popup / toolbar': 'Fokusiraj pojavno okno / orodno vrstico',
      'Return focus to previous position': 'Vrni fokus v prejšnji položaj',
      // Embed.ly
      'Embed URL': 'Vdelani URL',
      'Paste in a URL to embed': 'Prilepite URL za vdelavo',
      // Word Paste.
      'The pasted content is coming from a Microsoft Word document. Do you want to keep the format or clean it up?': 'Prilepljena vsebina prihaja iz dokumenta Microsoft Word. Ali želite obliko obdržati ali jo želite očistiti?',
      'Keep': 'Obdrži',
      'Clean': 'Počisti',
      'Word Paste Detected': 'Zaznano je lepljenje s programa Word',
      // Character Counter
      'Characters': 'Število znakov',
      // More Buttons
      'More Text': 'Možnosti besedila',
      'More Paragraph': 'Možnosti odstavka',
      'More Rich': 'Več možnosti vstavljanja',
      'More Misc': 'Več možnosti'
    },
    direction: 'ltr'
  };

})));
//# sourceMappingURL=sl.js.map


text:
/*
 * @author Eugene Zhuravlev
 */
package com.intellij.compiler;

import com.intellij.openapi.components.*;
import com.intellij.openapi.diagnostic.Logger;
import com.intellij.openapi.project.Project;
import com.intellij.openapi.util.registry.Registry;
import com.intellij.util.xmlb.XmlSerializerUtil;

@State(
  name = "CompilerWorkspaceConfiguration",
  storages = {
    @Storage(
      file = StoragePathMacros.WORKSPACE_FILE
    )}
)
public class CompilerWorkspaceConfiguration implements PersistentStateComponent<CompilerWorkspaceConfiguration> {
  private static final Logger LOG = Logger.getInstance("#com.intellij.compiler.CompilerWorkspaceConfiguration");

  static {
    LOG.info("Available processors: " + Runtime.getRuntime().availableProcessors());
  }

  public boolean AUTO_SHOW_ERRORS_IN_EDITOR = true;
  public boolean DISPLAY_NOTIFICATION_POPUP = true;
  @Deprecated public boolean CLOSE_MESSAGE_VIEW_IF_SUCCESS = true;
  public boolean CLEAR_OUTPUT_DIRECTORY = true;
  public boolean MAKE_PROJECT_ON_SAVE = false; // until we fix problems with several open projects (IDEA-104064), daemon slowness (IDEA-104666)
  public boolean PARALLEL_COMPILATION = false;
  public String COMPILER_PROCESS_ADDITIONAL_VM_OPTIONS = "";
  public boolean REBUILD_ON_DEPENDENCY_CHANGE = true;

  public static CompilerWorkspaceConfiguration getInstance(Project project) {
    return ServiceManager.getService(project, CompilerWorkspaceConfiguration.class);
  }

  public CompilerWorkspaceConfiguration getState() {
    return this;
  }

  public void loadState(CompilerWorkspaceConfiguration state) {
    XmlSerializerUtil.copyBean(state, this);
  }

  public boolean allowAutoMakeWhileRunningApplication() {
    return Registry.is("compiler.automake.allow.when.app.running", false);/*ALLOW_AUTOMAKE_WHILE_RUNNING_APPLICATION*/
  }
}

redpajama_set_name: RedPajamaGithub


text:
<project xmlns="http://maven.apache.org/POM/4.0.0"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <prerequisites>
        <maven>3.6.3</maven>
    </prerequisites>
    <parent>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-parent</artifactId>
        <version>2.3.0.RELEASE</version>
        <relativePath/> <!-- lookup parent from repository -->
    </parent>
    <groupId>ai.verta.common</groupId>
    <artifactId>common</artifactId>
    <packaging>jar</packaging>
    <version>1.0-SNAPSHOT</version>
    <name>common</name>
    <url>http://maven.apache.org</url>

    <properties>
        <hibernate.version>5.4.24.Final</hibernate.version>
        <log4j.version>2.13.2</log4j.version>
        <grpc.version>1.40.1</grpc.version>
        <postgres.version>42.2.13</postgres.version>
        <liquibase.version>3.8.1</liquibase.version>
        <protobuf.version>3.17.3</protobuf.version>
    </properties>

    <dependencies>
        <dependency>
            <groupId>org.yaml</groupId>
            <artifactId>snakeyaml</artifactId>
            <version>1.26</version>
        </dependency>

        <!-- The main transport implementation based on Netty, for both the client
            and the server (https://grpc.io/grpc-java/javadoc/io/grpc/netty/package-summary.html) -->
        <dependency>
            <groupId>io.grpc</groupId>
            <artifactId>grpc-netty-shaded</artifactId>
            <version>${grpc.version}</version>
        </dependency>
        <!-- API for gRPC over Protocol Buffers, including tools for serializing
            and de-serializing protobuf messages (https://grpc.io/grpc-java/javadoc/io/grpc/protobuf/package-summary.html) -->
        <dependency>
            <groupId>io.grpc</groupId>
            <artifactId>grpc-protobuf</artifactId>
            <version>${grpc.version}</version>
        </dependency>
        <!-- API for the Stub layer (https://grpc.io/grpc-java/javadoc/io/grpc/stub/package-summary.html) -->
        <dependency>
            <groupId>io.grpc</groupId>
            <artifactId>grpc-stub</artifactId>
            <version>${grpc.version}</version>
        </dependency>
        <dependency> <!-- necessary for Java 9+ -->
            <groupId>org.apache.tomcat</groupId>
            <artifactId>annotations-api</artifactId>
            <version>6.0.53</version>
            <scope>provided</scope>
        </dependency>
        <!-- https://mvnrepository.com/artifact/io.grpc/grpc-services -->
        <dependency>
            <groupId>io.grpc</groupId>
            <artifactId>grpc-services</artifactId>
            <version>${grpc.version}</version>
        </dependency>
        <!-- Provide Utils for grpc like using jsonFormat this utils you can convert
            json to protobuf object. (https://mvnrepository.com/artifact/com.google.protobuf/protobuf-java-util) -->
        <dependency>
            <groupId>com.google.protobuf</groupId>
            <artifactId>protobuf-java-util</artifactId>
            <version>${protobuf.version}</version>
        </dependency>

        <!-- HibernateFinal 5.4.1 -->
        <dependency>
            <groupId>org.hibernate</groupId>
            <artifactId>hibernate-core</artifactId>
            <version>${hibernate.version}</version>
        </dependency>
        <!-- Hibernate hikari connection pool -->
        <dependency>
            <groupId>org.hibernate</groupId>
            <artifactId>hibernate-hikaricp</artifactId>
            <version>${hibernate.version}</version>
        </dependency>
        <dependency>
            <groupId>com.zaxxer</groupId>
            <artifactId>HikariCP</artifactId>
            <version>4.0.3</version>
        </dependency>
        <dependency>
            <groupId>org.jdbi</groupId>
            <artifactId>jdbi3-core</artifactId>
            <version>3.16.0</version>
        </dependency>
        <dependency>
            <groupId>io.opentracing.contrib</groupId>
            <artifactId>opentracing-jdbi3</artifactId>
            <version>0.6.2</version>
        </dependency>

        <!-- https://mvnrepository.com/artifact/org.postgresql/postgresql -->
        <dependency>
            <groupId>org.postgresql</groupId>
            <artifactId>postgresql</artifactId>
            <version>${postgres.version}</version>
        </dependency>

        <!-- https://mvnrepository.com/artifact/org.apache.logging.log4j/log4j-slf4j-impl -->
        <dependency>
            <groupId>org.apache.logging.log4j</groupId>
            <artifactId>log4j-slf4j-impl</artifactId>
            <version>2.13.2</version>
        </dependency>
        <!-- https://mvnrepository.com/artifact/org.liquibase/liquibase-core -->
        <dependency>
            <groupId>org.liquibase</groupId>
            <artifactId>liquibase-core</artifactId>
            <version>${liquibase.version}</version>
        </dependency>
        <!-- Mysql Connector -->
        <dependency>
            <groupId>mysql</groupId>
            <artifactId>mysql-connector-java</artifactId>
            <version>8.0.17</version>
        </dependency>
        <dependency>
            <groupId>io.jaegertracing</groupId>
            <artifactId>jaeger-core</artifactId>
            <version>1.2.0</version>
        </dependency>
        <dependency>
            <groupId>io.jaegertracing</groupId>
            <artifactId>jaeger-thrift</artifactId>
            <version>1.6.0</version>
        </dependency>
        <dependency>
            <groupId>io.opentracing.contrib</groupId>
            <artifactId>opentracing-grpc</artifactId>
            <version>0.2.1</version>
        </dependency>
        <dependency>
            <groupId>io.opentracing.contrib</groupId>
            <artifactId>opentracing-jdbc</artifactId>
            <version>0.2.10</version>
        </dependency>
        <!-- https://mvnrepository.com/artifact/com.microsoft.sqlserver/mssql-jdbc -->
        <dependency>
            <groupId>com.microsoft.sqlserver</groupId>
            <artifactId>mssql-jdbc</artifactId>
            <version>9.2.1.jre11</version>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-web</artifactId>
            <exclusions>
                <exclusion>
                    <groupId>org.springframework.boot</groupId>
                    <artifactId>spring-boot-starter-logging</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
    </dependencies>

    <build>
        <finalName>modeldb-${project.version}-common-module-build</finalName>
        <!-- follow gRPC git repo URL link for plugin (kr.motd.maven, protobuf-maven-plugin)
            https://github.com/grpc/grpc-java At the maven build time this plugin converted
            .proto implementation of service to java code. -->
        <extensions>
            <extension>
                <groupId>kr.motd.maven</groupId>
                <artifactId>os-maven-plugin</artifactId>
                <version>1.6.2</version>
            </extension>
        </extensions>
        <plugins>
            <plugin>
                <groupId>org.xolstice.maven.plugins</groupId>
                <artifactId>protobuf-maven-plugin</artifactId>
                <version>0.6.1</version>
                <configuration>
                    <protocArtifact>com.google.protobuf:protoc:${protobuf.version}:exe:${os.detected.classifier}</protocArtifact>
                    <pluginId>grpc-java</pluginId>
                    <pluginArtifact>io.grpc:protoc-gen-grpc-java:${grpc.version}:exe:${os.detected.classifier}</pluginArtifact>
                    <protoSourceRoot>../../protos/protos/public</protoSourceRoot>
                </configuration>
                <executions>
                    <execution>
                        <goals>
                            <goal>compile</goal>
                            <goal>compile-custom</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>com.theoryinpractise</groupId>
                <artifactId>googleformatter-maven-plugin</artifactId>
                <version>1.7.5</version>
                <executions>
                    <execution>
                        <id>reformat-sources</id>
                        <configuration>
                            <includeStale>false</includeStale>
                            <style>GOOGLE</style>
                            <filterModified>false</filterModified>
                            <skip>false</skip>
                            <fixImports>true</fixImports>
                        </configuration>
                        <goals>
                            <goal>format</goal>
                        </goals>
                        <phase>process-sources</phase>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.8.1</version>
                <configuration>
                    <source>11</source>
                    <target>11</target>
                    <release>11</release>
                </configuration>
            </plugin>
        </plugins>
    </build>
</project>


text:
<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet href="CoreNLP-to-HTML.xsl" type="text/xsl"?>
<root>
  <document>
    <sentences>
      <sentence id="1">
        <tokens>
          <token id="1">
            <word>the</word>
            <lemma>the</lemma>
            <CharacterOffsetBegin>0</CharacterOffsetBegin>
            <CharacterOffsetEnd>3</CharacterOffsetEnd>
            <POS>DT</POS>
          </token>
          <token id="2">
            <word>process</word>
            <lemma>process</lemma>
            <CharacterOffsetBegin>4</CharacterOffsetBegin>
            <CharacterOffsetEnd>11</CharacterOffsetEnd>
            <POS>NN</POS>
          </token>
          <token id="3">
            <word>of</word>
            <lemma>of</lemma>
            <CharacterOffsetBegin>12</CharacterOffsetBegin>
            <CharacterOffsetEnd>14</CharacterOffsetEnd>
            <POS>IN</POS>
          </token>
          <token id="4">
            <word>attaining</word>
            <lemma>attain</lemma>
            <CharacterOffsetBegin>15</CharacterOffsetBegin>
            <CharacterOffsetEnd>24</CharacterOffsetEnd>
            <POS>VBG</POS>
          </token>
          <token id="5">
            <word>awareness</word>
            <lemma>awareness</lemma>
            <CharacterOffsetBegin>25</CharacterOffsetBegin>
            <CharacterOffsetEnd>34</CharacterOffsetEnd>
            <POS>NN</POS>
          </token>
          <token id="6">
            <word>or</word>
            <lemma>or</lemma>
            <CharacterOffsetBegin>35</CharacterOffsetBegin>
            <CharacterOffsetEnd>37</CharacterOffsetEnd>
            <POS>CC</POS>
          </token>
          <token id="7">
            <word>understanding</word>
            <lemma>understanding</lemma>
            <CharacterOffsetBegin>38</CharacterOffsetBegin>
            <CharacterOffsetEnd>51</CharacterOffsetEnd>
            <POS>NN</POS>
          </token>
          <token id="8">
            <word>of</word>
            <lemma>of</lemma>
            <CharacterOffsetBegin>52</CharacterOffsetBegin>
            <CharacterOffsetEnd>54</CharacterOffsetEnd>
            <POS>IN</POS>
          </token>
          <token id="9">
            <word>sensory</word>
            <lemma>sensory</lemma>
            <CharacterOffsetBegin>55</CharacterOffsetBegin>
            <CharacterOffsetEnd>62</CharacterOffsetEnd>
            <POS>JJ</POS>
          </token>
          <token id="10">
            <word>information</word>
            <lemma>information</lemma>
            <CharacterOffsetBegin>63</CharacterOffsetBegin>
            <CharacterOffsetEnd>74</CharacterOffsetEnd>
            <POS>NN</POS>
          </token>
          <token id="11">
            <word>skeleton</word>
            <lemma>skeleton</lemma>
            <CharacterOffsetBegin>75</CharacterOffsetBegin>
            <CharacterOffsetEnd>83</CharacterOffsetEnd>
            <POS>NN</POS>
          </token>
        </tokens>
        <parse>(ROOT (NP (NP (DT the) (NN process)) (PP (IN of) (S (VP (VBG attaining) (NP (NP (NN awareness) (CC or) (NN understanding)) (PP (IN of) (NP (JJ sensory) (NN information) (NN skeleton))))))))) </parse>
        <dependencies type="basic-dependencies">
          <dep type="root">
            <governor idx="0">ROOT</governor>
            <dependent idx="2">process</dependent>
          </dep>
          <dep type="det">
            <governor idx="2">process</governor>
            <dependent idx="1">the</dependent>
          </dep>
          <dep type="prep">
            <governor idx="2">process</governor>
            <dependent idx="3">of</dependent>
          </dep>
          <dep type="pcomp">
            <governor idx="3">of</governor>
            <dependent idx="4">attaining</dependent>
          </dep>
          <dep type="dobj">
            <governor idx="4">attaining</governor>
            <dependent idx="5">awareness</dependent>
          </dep>
          <dep type="cc">
            <governor idx="5">awareness</governor>
            <dependent idx="6">or</dependent>
          </dep>
          <dep type="conj">
            <governor idx="5">awareness</governor>
            <dependent idx="7">understanding</dependent>
          </dep>
          <dep type="prep">
            <governor idx="5">awareness</governor>
            <dependent idx="8">of</dependent>
          </dep>
          <dep type="amod">
            <governor idx="11">skeleton</governor>
            <dependent idx="9">sensory</dependent>
          </dep>
          <dep type="nn">
            <governor idx="11">skeleton</governor>
            <dependent idx="10">information</dependent>
          </dep>
          <dep type="pobj">
            <governor idx="8">of</governor>
            <dependent idx="11">skeleton</dependent>
          </dep>
        </dependencies>
        <dependencies type="collapsed-dependencies">
          <dep type="root">
            <governor idx="0">ROOT</governor>
            <dependent idx="2">process</dependent>
          </dep>
          <dep type="det">
            <governor idx="2">process</governor>
            <dependent idx="1">the</dependent>
          </dep>
          <dep type="prepc_of">
            <governor idx="2">process</governor>
            <dependent idx="4">attaining</dependent>
          </dep>
          <dep type="dobj">
            <governor idx="4">attaining</governor>
            <dependent idx="5">awareness</dependent>
          </dep>
          <dep type="conj_or">
            <governor idx="5">awareness</governor>
            <dependent idx="7">understanding</dependent>
          </dep>
          <dep type="amod">
            <governor idx="11">skeleton</governor>
            <dependent idx="9">sensory</dependent>
          </dep>
          <dep type="nn">
            <governor idx="11">skeleton</governor>
            <dependent idx="10">information</dependent>
          </dep>
          <dep type="prep_of">
            <governor idx="5">awareness</governor>
            <dependent idx="11">skeleton</dependent>
          </dep>
        </dependencies>
        <dependencies type="collapsed-ccprocessed-dependencies">
          <dep type="root">
            <governor idx="0">ROOT</governor>
            <dependent idx="2">process</dependent>
          </dep>
          <dep type="det">
            <governor idx="2">process</governor>
            <dependent idx="1">the</dependent>
          </dep>
          <dep type="prepc_of">
            <governor idx="2">process</governor>
            <dependent idx="4">attaining</dependent>
          </dep>
          <dep type="dobj">
            <governor idx="4">attaining</governor>
            <dependent idx="5">awareness</dependent>
          </dep>
          <dep type="dobj">
            <governor idx="4">attaining</governor>
            <dependent idx="7">understanding</dependent>
          </dep>
          <dep type="conj_or">
            <governor idx="5">awareness</governor>
            <dependent idx="7">understanding</dependent>
          </dep>
          <dep type="amod">
            <governor idx="11">skeleton</governor>
            <dependent idx="9">sensory</dependent>
          </dep>
          <dep type="nn">
            <governor idx="11">skeleton</governor>
            <dependent idx="10">information</dependent>
          </dep>
          <dep type="prep_of">
            <governor idx="5">awareness</governor>
            <dependent idx="11">skeleton</dependent>
          </dep>
        </dependencies>
      </sentence>
    </sentences>
  </document>
</root>


text:
/*---------------------------------------------------------------------------*/
/**
* \file
*			Clock for STM32W.
* \author
*			Salvatore Pitrulli <salvopitru@users.sourceforge.net>
*/
/*---------------------------------------------------------------------------*/

/*
 * File customized for mbxxx platform. It uses systick timer to control button
 * status without interrupts, as well as for system clock.
 */

#include PLATFORM_HEADER
#include "hal/error.h"
#include "hal/hal.h"
#include "dev/stm32w_systick.h"

#include "sys/clock.h"
#include "sys/etimer.h"
#include "dev/button-sensor.h"
#include "uart1.h"
#include "dev/leds.h"
#include "dev/stm32w-radio.h"

#define DEBUG DEBUG_NONE
#include "net/uip-debug.h"

// The value that will be load in the SysTick value register.
#define RELOAD_VALUE 24000-1   // 1 ms with a 24 MHz clock

static volatile clock_time_t count;
static volatile unsigned long current_seconds = 0;
static unsigned int second_countdown = CLOCK_SECOND;

/*---------------------------------------------------------------------------*/
void SysTick_Handler(void)
{

  count++;

  if(button_sensor.status(SENSORS_READY)){
    button_sensor.value(0); // sensors_changed is called inside this function.
  }

  if(etimer_pending()) {
    etimer_request_poll();
  }

  if (--second_countdown == 0) {
    current_seconds++;
    second_countdown = CLOCK_SECOND;
  }

}

/*---------------------------------------------------------------------------*/

void clock_init(void)
{

  ATOMIC(

  //Counts the number of ticks.
  count = 0;

  SysTick_CLKSourceConfig(SysTick_CLKSource_HCLK);
  SysTick_SetReload(RELOAD_VALUE);
  SysTick_ITConfig(ENABLE);
  SysTick_CounterCmd(SysTick_Counter_Enable);

  )
}

/*---------------------------------------------------------------------------*/

clock_time_t clock_time(void)
{
  return count;
}

/*---------------------------------------------------------------------------*/
/**
 * Delay the CPU for a multiple of TODO
 */
void clock_delay(unsigned int i)
{
  for (; i > 0; i--) {		/* Needs fixing XXX */
    unsigned j;
    for (j = 50; j > 0; j--)
      asm ("nop");
  }
}

/*---------------------------------------------------------------------------*/
/**
 * Wait for a multiple of 1 ms.
 *
 */
void clock_wait(clock_time_t i)
{
  clock_time_t start;

  start = clock_time();
  while(clock_time() - start < (clock_time_t)i);
}
/*---------------------------------------------------------------------------*/

unsigned long clock_seconds(void)
{
  return current_seconds;
}

void sleep_seconds(int seconds)
{
  int32u quarter_seconds = seconds * 4;
  uint8_t radio_on;

  halPowerDown();
  radio_on = stm32w_radio_is_on();
  stm32w_radio_driver.off();

  halSleepForQsWithOptions(&quarter_seconds, 0);

  ATOMIC(

  halPowerUp();

  // Update OS system ticks.
  current_seconds += seconds - quarter_seconds / 4 ; // Passed seconds
  count += seconds * CLOCK_SECOND - quarter_seconds * CLOCK_SECOND / 4 ;

  if(etimer_pending()) {
    etimer_request_poll();
  }

  SysTick_CLKSourceConfig(SysTick_CLKSource_HCLK);
  SysTick_SetReload(RELOAD_VALUE);
  SysTick_ITConfig(ENABLE);
  SysTick_CounterCmd(SysTick_Counter_Enable);

  )

  stm32w_radio_driver.init();
  if(radio_on){
	  stm32w_radio_driver.on();
  }

  uart1_init(115200);
  leds_init();
  rtimer_init();

  PRINTF("WakeInfo: %04x\r\n", halGetWakeInfo());

}


text:
import * as e from "express";

export as namespace NodeSpriteGenerator;
export = NodeSpriteGenerator;

declare function NodeSpriteGenerator(option: NodeSpriteGenerator.Option, callback?: (err: Error) => void): void;

declare namespace NodeSpriteGenerator {
    type BuiltinStylesheetFormats = "stylus" | "less" | "sass" | "scss" | "css" | "prefixed-css" | "javascript";
    type BuiltinLayouts = "packed" | "vertical" | "horizontal" | "diagonal";
    type BuiltinCompositors = "canvas" | "gm" | "jimp";

    interface StylesheetOption {
        prefix?: string;
        nameMapping?(): string;
        spritePath?: string;
        pixelRatio?: number;
    }

    interface LayoutOption {
        padding?: number;
        scaling?: number;
    }

    type CompositorFilters = "all" | "none" | "sub" | "up" | "average" | "paeth";
    interface CompositorOption {
        compressionLevel?: number;
        filter?: CompositorFilters;
    }

    interface Image {
        width: number;
        height: number;
        data: any;
    }
    interface Compositor {
        readImages(files: string[], callback: (error: Error, images: Image[]) => void): void;
        render(layout: Layout, spritePath: string, options: CompositorOption, callback: (error: Error) => void): void;
    }
    interface Layout {
        width: number;
        height: number;
        images: Array<{
            x: number;
            y: number;
        } & Image>;
    }
    type LayoutFunc = (images: Image[], options: LayoutOption, callback: (error: Error, layout: Layout) => void) => void;

    type StylesheetFunc = (layout: Layout, stylesheetPath: string, spritePath: string, options: StylesheetOption, callback: (error: Error) => void) => void;

    interface Option {
        src?: string[];
        spritePath?: string;
        stylesheetPath?: string;
        stylesheet?: BuiltinStylesheetFormats | StylesheetFunc | string;
        stylesheetOptions?: StylesheetOption;
        layout?: BuiltinLayouts | LayoutFunc;
        layoutOptions?: LayoutOption;
        compositor?: BuiltinCompositors | Compositor;
        compositorOptions?: CompositorOption;
    }

    function middleware(option: Option): e.RequestHandler;
}


text:
	var   Class 		= require('ee-class')
		, log 			= require('ee-log')
		, assert 		= require('assert')
		, fs 			= require('fs');

	var project = require('../');

	describe('The Project library', function(){

		it('Should be able to return the project path', function(){
			assert.ok(project.root);
		});

		it('Should be able to return the config.js contents', function(){
			assert.deepEqual(project.config,  {
				  test:   	true
				, passing: 	'test'
			});
		});

		it('Should be able to return the GIT revision', function(done){
			project.git.revision(done);
		});

		it('Should be able to return the GIT remote', function(done){
			project.git.remote(done);
		});

		it('Should be able to return the GIT remote repository', function(done){
			project.git.remoteRepository(done);
		});
	});


text:
package org.apache.hadoop.hbase.wal;

import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.NavigableMap;
import java.util.TreeMap;
import java.util.UUID;
import org.apache.hadoop.hbase.HBaseInterfaceAudience;
import org.apache.hadoop.hbase.HConstants;
import org.apache.hadoop.hbase.TableName;
import org.apache.hadoop.hbase.regionserver.MultiVersionConcurrencyControl;
import org.apache.hadoop.hbase.regionserver.SequenceId;
import org.apache.hadoop.hbase.regionserver.wal.CompressionContext;
import org.apache.hadoop.hbase.regionserver.wal.WALCellCodec;
import org.apache.hadoop.hbase.util.Bytes;
import org.apache.hadoop.hbase.util.EnvironmentEdgeManager;
import org.apache.yetus.audience.InterfaceAudience;

import org.apache.hbase.thirdparty.com.google.common.annotations.VisibleForTesting;
import org.apache.hbase.thirdparty.com.google.protobuf.ByteString;

import org.apache.hadoop.hbase.shaded.protobuf.generated.HBaseProtos;
import org.apache.hadoop.hbase.shaded.protobuf.generated.WALProtos;
import org.apache.hadoop.hbase.shaded.protobuf.generated.WALProtos.FamilyScope;
import org.apache.hadoop.hbase.shaded.protobuf.generated.WALProtos.ScopeType;

/**
 * Default implementation of Key for an Entry in the WAL.
 * For internal use only though Replication needs to have access.
 *
 * The log intermingles edits to many tables and rows, so each log entry
 * identifies the appropriate table and row.  Within a table and row, they're
 * also sorted.
 *
 *
Some Transactional edits (START, COMMIT, ABORT) will not have an associated row.
 *
 */
// TODO: Key and WALEdit are never used separately, or in one-to-many relation, for practical
//       purposes. They need to be merged into WALEntry.
@InterfaceAudience.LimitedPrivate({HBaseInterfaceAudience.REPLICATION})
public class WALKeyImpl implements WALKey {
  public static final WALKeyImpl EMPTY_WALKEYIMPL = new WALKeyImpl();

  public MultiVersionConcurrencyControl getMvcc() {
    return mvcc;
  }

  /**
   * Use it to complete mvcc transaction. This WALKeyImpl was part of
   * (the transaction is started when you call append; see the comment on FSHLog#append). To
   * complete call
   * {@link MultiVersionConcurrencyControl#complete(MultiVersionConcurrencyControl.WriteEntry)}
   * or {@link MultiVersionConcurrencyControl#complete(MultiVersionConcurrencyControl.WriteEntry)}
   * @return A WriteEntry gotten from local WAL subsystem.
   * @see #setWriteEntry(MultiVersionConcurrencyControl.WriteEntry)
   */
  public MultiVersionConcurrencyControl.WriteEntry getWriteEntry() {
    return this.writeEntry;
  }

  public void setWriteEntry(MultiVersionConcurrencyControl.WriteEntry writeEntry) {
    assert this.writeEntry == null;
    this.writeEntry = writeEntry;
    // Set our sequenceid now using WriteEntry.
    this.sequenceId = writeEntry.getWriteNumber();
  }

  private byte [] encodedRegionName;

  private TableName tablename;

  /**
   * SequenceId for this edit. Set post-construction at write-to-WAL time. Until then it is
   * NO_SEQUENCE_ID. Change it so multiple threads can read it -- e.g. access is synchronized.
   */
  private long sequenceId;

  /**
   * Used during WAL replay; the sequenceId of the edit when it came into the system.
   */
  private long origLogSeqNum = 0;

  /** Time at which this edit was written. */
  private long writeTime;

  /** The first element in the list is the cluster id on which the change has originated */
  private List<UUID> clusterIds;

  private NavigableMap<byte[], Integer> replicationScope;

  private long nonceGroup = HConstants.NO_NONCE;
  private long nonce = HConstants.NO_NONCE;
  private MultiVersionConcurrencyControl mvcc;

  /**
   * Set in a way visible to multiple threads; e.g. synchronized getter/setters.
   */
  private MultiVersionConcurrencyControl.WriteEntry writeEntry;

  public WALKeyImpl() {
    init(null, null, 0L, HConstants.LATEST_TIMESTAMP,
        new ArrayList<>(), HConstants.NO_NONCE, HConstants.NO_NONCE, null, null);
  }

  public WALKeyImpl(final NavigableMap<byte[], Integer> replicationScope) {
    init(null, null, 0L, HConstants.LATEST_TIMESTAMP,
        new ArrayList<>(), HConstants.NO_NONCE, HConstants.NO_NONCE, null, replicationScope);
  }

  @VisibleForTesting
  public WALKeyImpl(final byte[] encodedRegionName, final TableName tablename, long logSeqNum,
      final long now, UUID clusterId) {
    List<UUID> clusterIds = new ArrayList<>(1);
    clusterIds.add(clusterId);
    init(encodedRegionName, tablename, logSeqNum, now, clusterIds, HConstants.NO_NONCE,
      HConstants.NO_NONCE, null, null);
  }

  @VisibleForTesting
  public WALKeyImpl(final byte[] encodedRegionName, final TableName tablename, long logSeqNum,
      final long now, UUID clusterId, MultiVersionConcurrencyControl mvcc) {
    List<UUID> clusterIds = new ArrayList<>(1);
    clusterIds.add(clusterId);
    init(encodedRegionName, tablename, logSeqNum, now, clusterIds, HConstants.NO_NONCE,
      HConstants.NO_NONCE, mvcc, null);
  }

  // TODO: Fix being able to pass in sequenceid.
  public WALKeyImpl(final byte[] encodedRegionName, final TableName tablename, final long now) {
    init(encodedRegionName,
        tablename,
        NO_SEQUENCE_ID,
        now,
        EMPTY_UUIDS,
        HConstants.NO_NONCE,
        HConstants.NO_NONCE,
        null, null);
  }

  // TODO: Fix being able to pass in sequenceid.
  public WALKeyImpl(final byte[] encodedRegionName, final TableName tablename, final long now,
      final NavigableMap<byte[], Integer> replicationScope) {
    init(encodedRegionName, tablename, NO_SEQUENCE_ID, now, EMPTY_UUIDS, HConstants.NO_NONCE,
        HConstants.NO_NONCE, null, replicationScope);
  }

  public WALKeyImpl(final byte[] encodedRegionName, final TableName tablename, final long now,
      MultiVersionConcurrencyControl mvcc, final NavigableMap<byte[], Integer> replicationScope) {
    init(encodedRegionName, tablename, NO_SEQUENCE_ID, now, EMPTY_UUIDS, HConstants.NO_NONCE,
        HConstants.NO_NONCE, mvcc, replicationScope);
  }

  public WALKeyImpl(final byte[] encodedRegionName,
                final TableName tablename,
                final long now,
                MultiVersionConcurrencyControl mvcc) {
    init(encodedRegionName,
        tablename,
        NO_SEQUENCE_ID,
        now,
        EMPTY_UUIDS,
        HConstants.NO_NONCE,
        HConstants.NO_NONCE,
        mvcc, null);
  }

  /**
   * Create the log key for writing to somewhere.
   * We maintain the tablename mainly for debugging purposes.
   * A regionName is always a sub-table object.
   *
Used by log splitting and snapshots.
   *
   * @param encodedRegionName Encoded name of the region as returned by
   *                         HRegionInfo#getEncodedNameAsBytes().
   * @param tablename         - name of table
   * @param logSeqNum         - log sequence number
   * @param now               Time at which this edit was written.
   * @param clusterIds        the clusters that have consumed the change(used in Replication)
   * @param nonceGroup        the nonceGroup
   * @param nonce             the nonce
   * @param mvcc              the mvcc associate the WALKeyImpl
   * @param replicationScope  the non-default replication scope
   *                          associated with the region's column families
   */
  // TODO: Fix being able to pass in sequenceid.
  public WALKeyImpl(final byte[] encodedRegionName, final TableName tablename, long logSeqNum,
      final long now, List<UUID> clusterIds, long nonceGroup, long nonce,
      MultiVersionConcurrencyControl mvcc, final NavigableMap<byte[], Integer> replicationScope) {
    init(encodedRegionName, tablename, logSeqNum, now, clusterIds, nonceGroup, nonce, mvcc,
        replicationScope);
  }

  /**
   * Create the log key for writing to somewhere.
   * We maintain the tablename mainly for debugging purposes.
   * A regionName is always a sub-table object.
   *
Used by log splitting and snapshots.
   *
   * @param encodedRegionName Encoded name of the region as returned by
   *                          HRegionInfo#getEncodedNameAsBytes().
   * @param tablename         - name of table
   * @param logSeqNum         - log sequence number
   * @param now               Time at which this edit was written.
   * @param clusterIds        the clusters that have consumed the change(used in Replication)
   */
  // TODO: Fix being able to pass in sequenceid.
  public WALKeyImpl(final byte[] encodedRegionName,
                final TableName tablename,
                long logSeqNum,
                final long now,
                List<UUID> clusterIds,
                long nonceGroup,
                long nonce,
                MultiVersionConcurrencyControl mvcc) {
    init(encodedRegionName, tablename, logSeqNum, now, clusterIds, nonceGroup, nonce, mvcc, null);
  }

  /**
   * Create the log key for writing to somewhere.
   * We maintain the tablename mainly for debugging purposes.
   * A regionName is always a sub-table object.
   *
   * @param encodedRegionName Encoded name of the region as returned by
   *                          HRegionInfo#getEncodedNameAsBytes().
   * @param tablename         the tablename
   * @param now               Time at which this edit was written.
   * @param clusterIds        the clusters that have consumed the change(used in Replication)
   * @param nonceGroup
   * @param nonce
   * @param mvcc mvcc control used to generate sequence numbers and control read/write points
   */
  public WALKeyImpl(final byte[] encodedRegionName, final TableName tablename,
                final long now, List<UUID> clusterIds, long nonceGroup,
                final long nonce, final MultiVersionConcurrencyControl mvcc) {
    init(encodedRegionName, tablename, NO_SEQUENCE_ID, now, clusterIds, nonceGroup, nonce, mvcc,
        null);
  }

  /**
   * Create the log key for writing to somewhere.
   * We maintain the tablename mainly for debugging purposes.
   * A regionName is always a sub-table object.
   *
   * @param encodedRegionName Encoded name of the region as returned by
   *                          HRegionInfo#getEncodedNameAsBytes().
   * @param tablename
   * @param now               Time at which this edit was written.
   * @param clusterIds        the clusters that have consumed the change(used in Replication)
   * @param nonceGroup        the nonceGroup
   * @param nonce             the nonce
   * @param mvcc mvcc control used to generate sequence numbers and control read/write points
   * @param replicationScope  the non-default replication scope of the column families
   */
  public WALKeyImpl(final byte[] encodedRegionName, final TableName tablename,
                final long now, List<UUID> clusterIds, long nonceGroup,
                final long nonce, final MultiVersionConcurrencyControl mvcc,
                NavigableMap<byte[], Integer> replicationScope) {
    init(encodedRegionName, tablename, NO_SEQUENCE_ID, now, clusterIds, nonceGroup, nonce, mvcc,
        replicationScope);
  }

  /**
   * Create the log key for writing to somewhere.
   * We maintain the tablename mainly for debugging purposes.
   * A regionName is always a sub-table object.
   *
   * @param encodedRegionName Encoded name of the region as returned by
   *                          HRegionInfo#getEncodedNameAsBytes().
   * @param tablename
   * @param logSeqNum
   * @param nonceGroup
   * @param nonce
   */
  // TODO: Fix being able to pass in sequenceid.
  public WALKeyImpl(final byte[] encodedRegionName,
                final TableName tablename,
                long logSeqNum,
                long nonceGroup,
                long nonce,
                final MultiVersionConcurrencyControl mvcc) {
    init(encodedRegionName,
        tablename,
        logSeqNum,
        EnvironmentEdgeManager.currentTime(),
        EMPTY_UUIDS,
        nonceGroup,
        nonce,
        mvcc, null);
  }

  @InterfaceAudience.Private
  protected void init(final byte[] encodedRegionName,
                      final TableName tablename,
                      long logSeqNum,
                      final long now,
                      List<UUID> clusterIds,
                      long nonceGroup,
                      long nonce,
                      MultiVersionConcurrencyControl mvcc,
                      NavigableMap<byte[], Integer> replicationScope) {
    this.sequenceId = logSeqNum;
    this.writeTime = now;
    this.clusterIds = clusterIds;
    this.encodedRegionName = encodedRegionName;
    this.tablename = tablename;
    this.nonceGroup = nonceGroup;
    this.nonce = nonce;
    this.mvcc = mvcc;
    if (logSeqNum != NO_SEQUENCE_ID) {
      setSequenceId(logSeqNum);
    }
    this.replicationScope = replicationScope;
  }

  // For deserialization. DO NOT USE. See setWriteEntry below.
  @InterfaceAudience.Private
  protected void setSequenceId(long sequenceId) {
    this.sequenceId = sequenceId;
  }

  /** @return encoded region name */
  @Override
  public byte [] getEncodedRegionName() {
    return encodedRegionName;
  }

  /** @return table name */
  @Override
  public TableName getTableName() {
    return tablename;
  }

  /**
   * Used to set original sequenceId for WALKeyImpl during WAL replay
   */
  public void setOrigLogSeqNum(final long sequenceId) {
    this.origLogSeqNum = sequenceId;
  }

  /**
   * Return a positive long if current WALKeyImpl is created from a replay edit; a replay edit is an
   * edit that came in when replaying WALs of a crashed server.
   * @return original sequence number of the WALEdit
   */
  @Override
  public long getOrigLogSeqNum() {
    return this.origLogSeqNum;
  }

  /**
   * SequenceId is only available post WAL-assign. Calls before this will get you a
   * {@link SequenceId#NO_SEQUENCE_ID}. See the comment on FSHLog#append and #getWriteNumber in this
   * method for more on when this sequenceId comes available.
   * @return long the new assigned sequence number
   */
  @Override
  public long getSequenceId() {
    return this.sequenceId;
  }

  /**
   * @return the write time
   */
  @Override
  public long getWriteTime() {
    return this.writeTime;
  }

  public NavigableMap<byte[], Integer> getReplicationScopes() {
    return replicationScope;
  }

  /** @return The nonce group */
  @Override
  public long getNonceGroup() {
    return nonceGroup;
  }

  /** @return The nonce */
  @Override
  public long getNonce() {
    return nonce;
  }

  private void setReplicationScope(NavigableMap<byte[], Integer> replicationScope) {
    this.replicationScope = replicationScope;
  }

  public void clearReplicationScope() {
    setReplicationScope(null);
  }

  /**
   * Marks that the cluster with the given clusterId has consumed the change
   */
  public void addClusterId(UUID clusterId) {
    if (!clusterIds.contains(clusterId)) {
      clusterIds.add(clusterId);
    }
  }

  /**
   * @return the set of cluster Ids that have consumed the change
   */
  public List<UUID> getClusterIds() {
    return clusterIds;
  }

  /**
   * @return the cluster id on which the change has originated. It there is no such cluster, it
   *         returns DEFAULT_CLUSTER_ID (cases where replication is not enabled)
   */
  @Override
  public UUID getOriginatingClusterId(){
    return clusterIds.isEmpty()? HConstants.DEFAULT_CLUSTER_ID: clusterIds.get(0);
  }

  @Override
  public String toString() {
    return tablename + "/" + Bytes.toString(encodedRegionName) + "/" + sequenceId;
  }

  @Override
  public boolean equals(Object obj) {
    if (this == obj) {
      return true;
    }
    if (obj == null || getClass() != obj.getClass()) {
      return false;
    }
    return compareTo((WALKey)obj) == 0;
  }

  @Override
  public int hashCode() {
    int result = Bytes.hashCode(this.encodedRegionName);
    result = (int) (result ^ getSequenceId());
    result = (int) (result ^ this.writeTime);
    return result;
  }

  @Override
  public int compareTo(WALKey o) {
    int result = Bytes.compareTo(this.encodedRegionName, o.getEncodedRegionName());
    if (result == 0) {
      long sid = getSequenceId();
      long otherSid = o.getSequenceId();
      if (sid < otherSid) {
        result = -1;
      } else if (sid  > otherSid) {
        result = 1;
      }
      if (result == 0) {
        if (this.writeTime < o.getWriteTime()) {
          result = -1;
        } else if (this.writeTime > o.getWriteTime()) {
          return 1;
        }
      }
    }
    // why isn't cluster id accounted for?
    return result;
  }

  /**
   * Drop this instance's tablename byte array and instead
   * hold a reference to the provided tablename. This is not
   * meant to be a general purpose setter - it's only used
   * to collapse references to conserve memory.
   */
  void internTableName(TableName tablename) {
    // We should not use this as a setter - only to swap
    // in a new reference to the same table name.
    assert tablename.equals(this.tablename);
    this.tablename = tablename;
  }

  /**
   * Drop this instance's region name byte array and instead
   * hold a reference to the provided region name. This is not
   * meant to be a general purpose setter - it's only used
   * to collapse references to conserve memory.
   */
  void internEncodedRegionName(byte []encodedRegionName) {
    // We should not use this as a setter - only to swap
    // in a new reference to the same table name.
    assert Bytes.equals(this.encodedRegionName, encodedRegionName);
    this.encodedRegionName = encodedRegionName;
  }

  public WALProtos.WALKey.Builder getBuilder(WALCellCodec.ByteStringCompressor compressor)
      throws IOException {
    WALProtos.WALKey.Builder builder = WALProtos.WALKey.newBuilder();
    builder.setEncodedRegionName(
      compressor.compress(this.encodedRegionName, CompressionContext.DictionaryIndex.REGION));
    builder.setTableName(
      compressor.compress(this.tablename.getName(), CompressionContext.DictionaryIndex.TABLE));
    builder.setLogSequenceNumber(getSequenceId());
    builder.setWriteTime(writeTime);
    if (this.origLogSeqNum > 0) {
      builder.setOrigSequenceNumber(this.origLogSeqNum);
    }
    if (this.nonce != HConstants.NO_NONCE) {
      builder.setNonce(nonce);
    }
    if (this.nonceGroup != HConstants.NO_NONCE) {
      builder.setNonceGroup(nonceGroup);
    }
    HBaseProtos.UUID.Builder uuidBuilder = HBaseProtos.UUID.newBuilder();
    for (UUID clusterId : clusterIds) {
      uuidBuilder.setLeastSigBits(clusterId.getLeastSignificantBits());
      uuidBuilder.setMostSigBits(clusterId.getMostSignificantBits());
      builder.addClusterIds(uuidBuilder.build());
    }
    if (replicationScope != null) {
      for (Map.Entry<byte[], Integer> e : replicationScope.entrySet()) {
        ByteString family =
            compressor.compress(e.getKey(), CompressionContext.DictionaryIndex.FAMILY);
        builder.addScopes(FamilyScope.newBuilder().setFamily(family)
            .setScopeType(ScopeType.forNumber(e.getValue())));
      }
    }
    return builder;
  }

  public void readFieldsFromPb(WALProtos.WALKey walKey,
      WALCellCodec.ByteStringUncompressor uncompressor) throws IOException {
    this.encodedRegionName = uncompressor.uncompress(walKey.getEncodedRegionName(),
      CompressionContext.DictionaryIndex.REGION);
    byte[] tablenameBytes =
        uncompressor.uncompress(walKey.getTableName(), CompressionContext.DictionaryIndex.TABLE);
    this.tablename = TableName.valueOf(tablenameBytes);
    clusterIds.clear();
    for (HBaseProtos.UUID clusterId : walKey.getClusterIdsList()) {
      clusterIds.add(new UUID(clusterId.getMostSigBits(), clusterId.getLeastSigBits()));
    }
    if (walKey.hasNonceGroup()) {
      this.nonceGroup = walKey.getNonceGroup();
    }
    if (walKey.hasNonce()) {
      this.nonce = walKey.getNonce();
    }
    this.replicationScope = null;
    if (walKey.getScopesCount() > 0) {
      this.replicationScope = new TreeMap<>(Bytes.BYTES_COMPARATOR);
      for (FamilyScope scope : walKey.getScopesList()) {
        byte[] family =
            uncompressor.uncompress(scope.getFamily(), CompressionContext.DictionaryIndex.FAMILY);
        this.replicationScope.put(family, scope.getScopeType().getNumber());
      }
    }
    setSequenceId(walKey.getLogSequenceNumber());
    this.writeTime = walKey.getWriteTime();
    if (walKey.hasOrigSequenceNumber()) {
      this.origLogSeqNum = walKey.getOrigSequenceNumber();
    }
  }

  @Override
  public long estimatedSerializedSizeOf() {
    long size = encodedRegionName != null ? encodedRegionName.length : 0;
    size += tablename != null ? tablename.toBytes().length : 0;
    if (clusterIds != null) {
      size += 16 * clusterIds.size();
    }
    if (nonceGroup != HConstants.NO_NONCE) {
      size += Bytes.SIZEOF_LONG; // nonce group
    }
    if (nonce != HConstants.NO_NONCE) {
      size += Bytes.SIZEOF_LONG; // nonce
    }
    if (replicationScope != null) {
      for (Map.Entry<byte[], Integer> scope: replicationScope.entrySet()) {
        size += scope.getKey().length;
        size += Bytes.SIZEOF_INT;
      }
    }
    size += Bytes.SIZEOF_LONG; // sequence number
    size += Bytes.SIZEOF_LONG; // write time
    if (origLogSeqNum > 0) {
      size += Bytes.SIZEOF_LONG; // original sequence number
    }
    return size;
  }
}


text:
<?php

/**
 * The "grouplicenseusers" collection of methods.
 * Typical usage is:
 *  <code>
 *   $androidenterpriseService = new Google_Service_AndroidEnterprise(...);
 *   $grouplicenseusers = $androidenterpriseService->grouplicenseusers;
 *  </code>
 */
class Google_Service_AndroidEnterprise_Resource_Grouplicenseusers extends Google_Service_Resource
{
  /**
   * Retrieves the IDs of the users who have been granted entitlements under the
   * license. (grouplicenseusers.listGrouplicenseusers)
   *
   * @param string $enterpriseId The ID of the enterprise.
   * @param string $groupLicenseId The ID of the product the group license is for,
   * e.g. "app:com.google.android.gm".
   * @param array $optParams Optional parameters.
   * @return Google_Service_AndroidEnterprise_GroupLicenseUsersListResponse
   */
  public function listGrouplicenseusers($enterpriseId, $groupLicenseId, $optParams = array())
  {
    $params = array('enterpriseId' => $enterpriseId, 'groupLicenseId' => $groupLicenseId);
    $params = array_merge($params, $optParams);
    return $this->call('list', array($params), "Google_Service_AndroidEnterprise_GroupLicenseUsersListResponse");
  }
}


text:
export function randomIntFromInterval(min, max) {
  return Math.floor((Math.random() * ((max - min) + 1)) + min);
}


text:
@interface NWSecTools : NSObject

+ (NWError)identityWithPKCS12Data:(NSData *)pkcs12 password:(NSString *)password identity:(NWIdentityRef *)identity;
+ (NWError)identitiesWithPKCS12Data:(NSData *)pkcs12 password:(NSString *)password identities:(NSArray **)identities;
+ (NWError)keychainCertificates:(NSArray **)certificates;
+ (NWError)certificateWithIdentity:(NWIdentityRef)identity certificate:(NWCertificateRef *)certificate;
+ (NWError)keyWithIdentity:(NWIdentityRef)identity key:(NWKeyRef *)key;

+ (NWCertificateRef)certificateWithData:(NSData *)data;
+ (NSString *)summaryWithCertificate:(NWCertificateRef)certificate;
+ (BOOL)isSandboxIdentity:(NWIdentityRef)identity;
+ (BOOL)isSandboxCertificate:(NWCertificateRef)certificate;
+ (BOOL)isPushCertificate:(NWCertificateRef)certificate;

+ (NSDictionary *)inspectIdentity:(NWIdentityRef)identity;

#if !TARGET_OS_IPHONE
+ (NWError)keychainIdentityWithCertificate:(NWCertificateRef)certificate identity:(NWIdentityRef *)identity;
#endif

// deprecated
#if !TARGET_OS_IPHONE
+ (NWError)identityWithCertificateRef:(SecCertificateRef)certificate identity:(SecIdentityRef *)identity __attribute__((deprecated));
+ (NWError)identityWithCertificateData:(NSData *)certificate identity:(SecIdentityRef *)identity __attribute__((deprecated));
#endif
+ (NSArray *)keychainCertificates __attribute__((deprecated));
+ (NSString *)identifierForCertificate:(SecCertificateRef)certificate __attribute__((deprecated));
+ (SecCertificateRef)certificateForIdentity:(SecIdentityRef)identity __attribute__((deprecated));
+ (BOOL)isSandboxCertificateRef:(SecCertificateRef)certificate __attribute__((deprecated));

@end


text:
using System.Linq;
using Orchard.Queries.Sql;
using Xunit;
using YesSql;
using YesSql.Provider.SqlServer;

namespace Orchard.Tests.Orchard.Queries
{
    public class SqlParserTests
    {
        private ISqlDialect _defaultDialect = new SqlServerDialect();
        private string _defaultTablePrefix = "tp_";

        private string FormatSql(string sql)
        {
            return sql.Replace("\r\n", " ").Replace("\n", " ");
        }

        [Theory]
        [InlineData("select a", "SELECT [a];")]
        [InlineData("select *", "SELECT *;")]
        [InlineData("SELECT a", "SELECT [a];")]
        [InlineData("SELECT a, b", "SELECT [a], [b];")]
        [InlineData("SELECT a.b", "SELECT [tp_a].[b];")]
        [InlineData("SELECT a.b, c.d", "SELECT [tp_a].[b], [tp_c].[d];")]
        [InlineData("SELECT a as a1", "SELECT [a] AS a1;")]
        [InlineData("SELECT a as a1, b as b1", "SELECT [a] AS a1, [b] AS b1;")]
        [InlineData("select Avg(a)", "SELECT Avg([a]);")]
        [InlineData("select Min(*)", "SELECT Min(*);")]
        [InlineData("select distinct a", "SELECT DISTINCT [a];")]
        public void ShouldParseSelectClause(string sql, string expectedSql)
        {
            var result = SqlParser.TryParse(sql, _defaultDialect, _defaultTablePrefix, out var rawQuery, out var rawParameters, out var messages);
            Assert.True(result);
            Assert.Equal(expectedSql, FormatSql(rawQuery));
        }

        [Theory]
        [InlineData("select a from t", "SELECT [a] FROM [tp_t];")]
        [InlineData("SELECT a FROM t", "SELECT [a] FROM [tp_t];")]
        [InlineData("SELECT a FROM t as t1", "SELECT [a] FROM [tp_t] AS t1;")]
        [InlineData("SELECT a FROM t1, t2", "SELECT [a] FROM [tp_t1], [tp_t2];")]
        public void ShouldParseFromClause(string sql, string expectedSql)
        {
            var result = SqlParser.TryParse(sql, _defaultDialect, _defaultTablePrefix, out var rawQuery, out var rawParameters, out var messages);
            Assert.True(result);
            Assert.Equal(expectedSql, FormatSql(rawQuery));
        }

        [Theory]
        [InlineData("select a where b", "SELECT [a] WHERE [b];")]
        [InlineData("select a where b.b1", "SELECT [a] WHERE [tp_b].[b1];")]
        [InlineData("select a where b = c", "SELECT [a] WHERE [b] = [c];")]
        [InlineData("select a where b = c and d", "SELECT [a] WHERE [b] = [c] AND [d];")]
        public void ShouldParseWhereClause(string sql, string expectedSql)
        {
            var result = SqlParser.TryParse(sql, _defaultDialect, _defaultTablePrefix, out var rawQuery, out var rawParameters, out var messages);
            Assert.True(result);
            Assert.Equal(expectedSql, FormatSql(rawQuery));
        }

        [Theory]
        [InlineData("select a where a", "SELECT [a] WHERE [a];", new object[0])]
        [InlineData("select a where ~a", "SELECT [a] WHERE ~[a];", new object[0])]
        [InlineData("select a where a = b", "SELECT [a] WHERE [a] = [b];", new object[0])]
        [InlineData("select a where a = true", "SELECT [a] WHERE [a] = @p0;", new object[] { true })]
        [InlineData("select a where a = false", "SELECT [a] WHERE [a] = @p0;", new object[] { false })]
        [InlineData("select a where a = 1", "SELECT [a] WHERE [a] = @p0;", new object[] { 1 })]
        [InlineData("select a where a = 1.234", "SELECT [a] WHERE [a] = @p0;", new object[] { 1.234 })]
        [InlineData("select a where a = 'foo'", "SELECT [a] WHERE [a] = @p0;", new object[] { "foo" })]
        [InlineData("select a where a between b and c", "SELECT [a] WHERE [a] BETWEEN [b] AND [c];", new object[0])]
        [InlineData("select a where a not between b and c", "SELECT [a] WHERE [a] NOT BETWEEN [b] AND [c];", new object[0])]
        [InlineData("select a where a = b or c = d", "SELECT [a] WHERE [a] = [b] OR [c] = [d];", new object[0])]
        [InlineData("select a where (a = b) or (c = d)", "SELECT [a] WHERE ([a] = [b]) OR ([c] = [d]);", new object[0])]
        [InlineData("select a where (a = b) or (c = d) and e", "SELECT [a] WHERE ([a] = [b]) OR ([c] = [d]) AND [e];", new object[0])]
        [InlineData("select a where test(arg)", "SELECT [a] WHERE test([arg]);", new object[0])]
        [InlineData("select a where b in (1,2,3)", "SELECT [a] WHERE [b] IN (@p0, @p1, @p2);", new object[] { 1, 2, 3 })]
        [InlineData("select a where b = (select Avg(c) from d)", "SELECT [a] WHERE [b] = (SELECT Avg([c]) FROM [tp_d]);", new object[0])]
        public void ShouldParseExpression(string sql, string expectedSql, object[] expectedParameters = null)
        {
            var result = SqlParser.TryParse(sql, _defaultDialect, _defaultTablePrefix, out var rawQuery, out var rawParameters, out var messages);
            Assert.True(result);
            Assert.Equal(expectedSql, FormatSql(rawQuery));

            if (expectedParameters != null)
            {
                for(var i=0; i<expectedParameters.Length; i++)
                {
                    Assert.Equal(expectedParameters[i], rawParameters["@p" + i]);
                }
            }
        }

        [Theory]
        [InlineData("select a from b inner join c on b.b1 = c.c1", "SELECT [a] FROM [tp_b] INNER JOIN [tp_c] ON [tp_b].[b1] = [tp_c].[c1];", new object[0])]
        [InlineData("select a from b as ba inner join c as ca on ba.b1 = ca.c1", "SELECT [a] FROM [tp_b] AS ba INNER JOIN [tp_c] AS ca ON ba.[b1] = ca.[c1];", new object[0])]
        public void ShouldParseJoinClause(string sql, string expectedSql, object[] expectedParameters = null)
        {
            var result = SqlParser.TryParse(sql, _defaultDialect, _defaultTablePrefix, out var rawQuery, out var rawParameters, out var messages);
            Assert.True(result);
            Assert.Equal(expectedSql, FormatSql(rawQuery));
        }

        [Theory]
        [InlineData("select a order by b", "SELECT [a] ORDER BY [b];", new object[0])]
        [InlineData("select a order by b, c", "SELECT [a] ORDER BY [b], [c];", new object[0])]
        [InlineData("select a order by b.c", "SELECT [a] ORDER BY [tp_b].[c];", new object[0])]
        [InlineData("select a from b as b1 order by b1.c", "SELECT [a] FROM [tp_b] AS b1 ORDER BY b1.[c];", new object[0])]
        [InlineData("select a order by b asc", "SELECT [a] ORDER BY [b] ASC;", new object[0])]
        [InlineData("select a order by b desc", "SELECT [a] ORDER BY [b] DESC;", new object[0])]
        public void ShouldParseOrderByClause(string sql, string expectedSql, object[] expectedParameters = null)
        {
            var result = SqlParser.TryParse(sql, _defaultDialect, _defaultTablePrefix, out var rawQuery, out var rawParameters, out var messages);
            Assert.True(result);
            Assert.Equal(expectedSql, FormatSql(rawQuery));
        }

        [Theory]
        [InlineData("select count(a) group by b", "SELECT count([a]) GROUP BY [b];", new object[0])]
        [InlineData("select count(a) group by b, c", "SELECT count([a]) GROUP BY [b], [c];", new object[0])]
        [InlineData("select count(a) group by b.c", "SELECT count([a]) GROUP BY [tp_b].[c];", new object[0])]
        [InlineData("select count(a) from b as b1 group by b1.c", "SELECT count([a]) FROM [tp_b] AS b1 GROUP BY b1.[c];", new object[0])]
        [InlineData("select Month(a) as m group by Month(a)", "SELECT Month([a]) AS m GROUP BY Month([a]);", new object[0])]
        public void ShouldParseGroupByClause(string sql, string expectedSql, object[] expectedParameters = null)
        {
            var result = SqlParser.TryParse(sql, _defaultDialect, _defaultTablePrefix, out var rawQuery, out var rawParameters, out var messages);
            Assert.True(result);
            Assert.Equal(expectedSql, FormatSql(rawQuery));
        }

        [Theory]
        [InlineData("SELECT COUNT(CustomerID) GROUP BY Country HAVING COUNT(CustomerID) > 5", "SELECT COUNT([CustomerID]) GROUP BY [Country] HAVING COUNT([CustomerID]) > @p0;", new object[0])]
        public void ShouldParseHavingClause(string sql, string expectedSql, object[] expectedParameters = null)
        {
            var result = SqlParser.TryParse(sql, _defaultDialect, _defaultTablePrefix, out var rawQuery, out var rawParameters, out var messages);
            Assert.True(result);
            Assert.Equal(expectedSql, FormatSql(rawQuery));
        }

        [Fact]
        public void ShouldReturnErrorMessage()
        {
            var result = SqlParser.TryParse("SEL a", _defaultDialect, _defaultTablePrefix, out var rawQuery, out var rawParameters, out var messages);

            Assert.False(result);
            Assert.Equal(1, messages.Count());
            Assert.Contains("at line:0, col:0", messages.First());
        }

        [Theory]
        [InlineData("SELECT a; -- this is a comment", "SELECT [a];", new object[0])]
        [InlineData("SELECT a; \n-- this is a comment", "SELECT [a];", new object[0])]
        [InlineData("SELECT /* comment */ a;", "SELECT [a];", new object[0])]
        [InlineData("SELECT /* comment \n comment */ a;", "SELECT [a];", new object[0])]
        public void ShouldParseComments(string sql, string expectedSql, object[] expectedParameters = null)
        {
            var result = SqlParser.TryParse(sql, _defaultDialect, _defaultTablePrefix, out var rawQuery, out var rawParameters, out var messages);
            Assert.True(result);
            Assert.Equal(expectedSql, FormatSql(rawQuery));
        }
    }
}


text:
- [For Reference Only](https://github.com/jeysonmc/python-google-speech-scripts)
- [LED Speech Edison](https://github.com/drejkim/led-speech-edison)
- [Speech Recognition On Raspberry Pi](http://www.rmnd.net/speech-recognition-on-raspberry-pi-with-sphinx-racket-and-arduino/)
- [Microwave controlled via Raspberry Pi](https://github.com/ndbroadbent/raspberry_picrowave)
- https://snips.ai/


text:
PRAGMA locking_mode = exclusive;
PRAGMA journal_mode = persist;
CREATE TABLE one(two, three);
INSERT INTO one VALUES('a', 'b');


text: verify.rangeAfterCodeFix("arg0: number");


text:
``` md
# About Us

We are a team based in the [School of Computing, National University of Singapore](http://www.comp.nus.edu.sg).

## Project Team
<!--- A0126240W --->
#### [Verbena Ong](http://github.com/Verbena)
<img src="images/Verbena.jpg" width="150"><br>
**Role**: Team Leader<br>
Responsibilities: Project coordination, Integration<br>
Components in charge of: Logic<br>
Features implemented:<br>
*[Add command](https://github.com/CS2103AUG2016-W15-C4/main/blob/master/docs/UserGuide.md#adding-a-task-add)
*[Update command](https://github.com/CS2103AUG2016-W15-C4/main/blob/master/docs/UserGuide.md#updating-a-task-update)<br>
Code written: [[functional code](A0126240W.md)][[test code](A0126240W.md)][[docs](A0126240W.md)]<br>
Other major contributions:<br>
* Set up Travis and Coveralls
-----
<!--- A0139128A --->
#### [Lim Wei Jie](http://github.com/1o0p3r)
<img src="images/Weijie.jpg" width="150"><br>
**Role**: Developer<br>
Responsibilities: Testing of codes, Deliverables and deadlines<br>
Components in charge of: Model<br>
Features implemented:<br>
*[Add command](https://github.com/CS2103AUG2016-W15-C4/main/blob/master/docs/UserGuide.md#adding-a-task-add)
*[Redo command](https://github.com/CS2103AUG2016-W15-C4/main/blob/master/docs/UserGuide.md#redoing-the-previous-action-redo)
*[Undo command](https://github.com/CS2103AUG2016-W15-C4/main/blob/master/docs/UserGuide.md#undoing-the-previous-action-undo)<br>
Code written: [[functional code](A0139128A.md)][[test code](A0139128A.md)][[docs](A0139128A.md)]<br>
Other major contributions:<br>
*Documentation review

-----
<!--- A0141021H --->
#### [Patel Drashti](http://github.com/Drashti96)
<img src="images/Drashti.jpg" width="150"><br>
**Role**: Developer<br>
Responsibilities: Documentation, Scheduling and tracking<br>
Components in charge of: Storage<br>
Features implemented:<br>
*[Change data file location](https://github.com/CS2103AUG2016-W15-C4/main/blob/master/docs/UserGuide.md#saving-the-data)
*[Help command](https://github.com/CS2103AUG2016-W15-C4/main/blob/master/docs/UserGuide.md#viewing-help-help)
*[Undone command]<br>
Code written: [[functional code](A0141021H.md)][[test code](A0141021H.md)][[docs](A0141021H.md)]<br>
Other major contributions:<br>
*JUnit tests
-----
<!--- A0139772U -->
#### [Zachary Lim](http://github.com/zachylimwl)
<img src="images/Zachary2.jpg" width="150"><br>
**Role**: Developer<br>
Responsibilities: Coding lead<br>
Components in charge of: UI<br>
Features implemented:<br>
*[Delete command](https://github.com/CS2103AUG2016-W15-C4/main/blob/master/docs/UserGuide.md#deleting-a-task-delete)
*[Done command](https://github.com/CS2103AUG2016-W15-C4/main/blob/master/docs/UserGuide.md#marking-a-task-as-completed-done)
*[Find command](https://github.com/CS2103AUG2016-W15-C4/main/blob/master/docs/UserGuide.md#finding-tasks-containing-any-keyword-in-their-description-find)
*[List command](https://github.com/CS2103AUG2016-W15-C4/main/blob/master/docs/UserGuide.md#listing-all-tasks-list)<br>
Code written: [[functional code](A0139772U.md)][[test code](A0139772U.md)][[docs](A0139772U.md)]<br>
Other major contributions:<br>
* Did the initial refactoring from AddressBook to WhatNow
-----
<!---A0141021H --->
## Project Mentor

#### [Akshay Narayan](https://github.com/okkhoy)
<img src="images/AkshayNarayan.jpg" width="150"><br>

-----

# Contributors

We welcome contributions. See [Contact Us](ContactUs.md) page for more info.
* [Damith C. Rajapakse](http://www.comp.nus.edu.sg/~damithch/)
* [Joshua Lee](https://github.com/lejolly)
* [Leow Yijin](https://github.com/yijinl)
* [Martin Choo](https://github.com/m133225)
* [Thien Nguyen](https://github.com/ndt93)
* [You Liang](https://github.com/yl-coder)
* [Akshay Narayan](https://github.com/se-edu/whatnow-level4/pulls?q=is%3Apr+author%3Aokkhoy)
* [Sam Yong](https://github.com/se-edu/whatnow-level4/pulls?q=is%3Apr+author%3Amauris)
```
###### \UserGuide.md
``` md
### Adding a task: `add`
Adds everyday tasks, deadlines and events to WhatNow. Any task without date or time is considered a Todo task, otherwise it is considered a Schedule task.

#### Adds a todo task to WhatNow
Format: `add "DESCRIPTION" [t/TAG]...`
> * All description should be written within double quotation marks.
> * Except for the double quotation marks, you can add any special character in the description.

Example:
* `add "Buy chocolate milk"`
Adds a Todo task "Buy chocolate milk".

<p align="center">

<img src="images/UI_Actual_Final/addFloating.PNG" width="600"><br>

Figure 3: A task without date and time specified added under Todo

</p>

#### Adds a deadline to WhatNow
Format: `add "DESCRIPTION" [DATE] [TIME] [every day/week/month/year till DATE][t/TAG]...`
> * All description should be written within double quotation marks.
> * Except for the double quotation marks, you can add any special character in the description.
> * Refer to the Date Format and Time Format at the end of the User Guide below for the various date and time formats.
> * The order for date and time is reversible. You can add an event with time followed by the date too.

Examples:
* `add "register for salsa class!" by 20-11-2016 6pm`
Adds a Schedule task "register for salsa class" by 20 November 2016 6pm.
* `add "CS2103 Project" by 20.11.2016 t/low`
Adds a Schedule task "CS2103 Project" of low priority on 20 November 2016.
* `add "Pay School Fees" by 11am t/medium`
Adds a Schedule task "Pay School Fees" of high priority on today 11am.
* `add "Submit CS2101 User Guide" by 9:30pm 12/12/2016 t/high`
Adds a Schedule task "Submit CS2101 User Guide" of high priority by 12 December 2016 9.30pm.

<p align="center">

<img src="images/UI_Actual_Final/addDeadline.PNG" width="600"><br>

Figure 4: A deadline task with date, time and priority specified added under Schedule tasks

</p>

#### Adds a one-day event to WhatNow
Format: `add "DESCRIPTION" [DATE] [TIME] [TIME] [every day/week/month/year till DATE] [t/TAG]...`
> * All description should be written within double quotation marks.
> * Except for the double quotation marks, you can add any special character in the description.
> * Refer to the Date Format and Time Format at the end of the User Guide below for the various date and time formats.

Examples:
* `add "CS2016 Tutorial" every Tuesday from 12pm to 2.30pm t/medium`
Adds a Schedule task "CS2106 Tutorial" of medium priority on every Tuesday from 12pm to 2.30pm.
* `add "Drashti's Birthday" every 30 Aug t/high`
Adds a Schedule task "Drashti's Birthday" of high priority every 30 Aug for the entire day.
* `add "Java Workshop" from 8am to 5pm t/high`
Adds a Schedule task "Java Workshop" of high priority from 8am to 5pm.

<p align="center">

<img src="images/UI_Actual_Final/addEvent.PNG" width="600"><br>

Figure 5: An event task with period and priority added under Schedule tasks

</p>

#### Adds a multiple-day event to WhatNow
Format: `add "DESCRIPTION" [DATE] [TIME] [DATE] [TIME] [every day/week/month/year till DATE] [t/TAG]...`
> * All description should be written within double quotation marks.
> * Except for the double quotation marks, you can add any special character in the description.
> * Refer to the Date Format and Time Format at the end of the User Guide below for the various date and time formats.

Examples:
* `add "NUS Freshmen Computing Camp" from 12/8/2016 10am to 16/8/2016 8pm t/high`
Adds a Schedule task "NUS Freshmen Computing Camp" of high priority from 12/8/2016 10am to 16/8/2016 8pm.
* `add "Cousin sister's wedding in Spain!" from 20.12.2016 to 26.12.2016 t/high`
Adds a Schedule task "Cousin sister's wedding in Spain!" of high priority from 20/12/2016 to 26/12/2016.
* `add "French Beginner's Workshop" from 6-4-2017 to 8-4-2017 9pm`
Adds a Schedule task "French Beginner's Workshop" from 6-4-2017 to 8-4-2017 9pm.

<p align="center">

<img src="images/UI_Actual_Final/twodatetwotimeTwo.PNG" width="600"><br>

Figure 6: An event task with period and priority added under Schedule tasks

</p>

> You can add a recurring task for a deadline, one-day event or multiple-day event as shown above.

```


text:
package com.weghst.setaria.client;

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

import com.fasterxml.jackson.annotation.JsonProperty;

/**
 * SetariaConfig 配置参数 Bean 对象定论.
 *
 * @author Kevin Zou (kevinz@weghst.com)
 */
public class SetariaBean {

    @JsonProperty("setaria.config.resources")
    private List<Resource> resources = new ArrayList<>();
    @JsonProperty("setaria.config.zookeeper.connectString")
    private String zkConnectString;
    @JsonProperty("setaria.config.zookeeper.sessionTimeout")
    private int zkSessionTimeout;
    @JsonProperty("setaria.config.zookeeper.basePath")
    private String zkBasePath;
    @JsonProperty("setaria.config.zookeeper.app")
    private String zkApp;
    @JsonProperty("setaria.config.zookeeper.env")
    private String zkEnv;

    /**
     * 返回配置文件资源集合.
     *
     * @return 配置文件资源集合
     */
    public List<Resource> getResources() {
        return new ArrayList<>(resources);
    }

    /**
     * 设置配置文件资源集合.
     *
     * @param resources 配置文件资源集合
     */
    public void setResources(List<Resource> resources) {
        this.resources.clear();
        this.resources.addAll(resources);
    }

    /**
     * 添加配置文件资源.
     *
     * @param resource 配置文件
     * @return true/false
     */
    public boolean addResource(Resource resource) {
        return resources.add(resource);
    }

    /**
     * 根据配置文件路径添加配置资源.
     *
     * @param location 配置文件路径
     * @return true/false
     */
    public boolean addResource(String location) {
        Resource resource = new Resource();
        resource.setLocation(location);
        return addResource(resource);
    }

    /**
     * 根据配置文件路径添加配置资源.
     *
     * @param location       配置文件路径
     * @param ignoreNotFound 如果资源不存在是否忽略
     * @return true/false
     */
    public boolean addResource(String location, boolean ignoreNotFound) {
        Resource resource = new Resource();
        resource.setLocation(location);
        resource.setIgnoreNotFound(ignoreNotFound);
        return addResource(resource);
    }

    /**
     * 返回 ZooKeeper 连接字符串.
     *
     * @return ZooKeeper 连接字符串
     */
    public String getZkConnectString() {
        return zkConnectString;
    }

    /**
     * 设置 ZooKeeper 连接字符串.
     *
     * @param zkConnectString ZooKeeper 连接字符串
     */
    public void setZkConnectString(String zkConnectString) {
        this.zkConnectString = zkConnectString;
    }

    /**
     * 返回 ZooKeeper Session 超时时间.
     *
     * @return ZooKeeper Session 超时时间
     */
    public int getZkSessionTimeout() {
        return zkSessionTimeout;
    }

    /**
     * 设置 ZooKeeper Session 超时时间.
     *
     * @param zkSessionTimeout ZooKeeper Session 超时时间
     */
    public void setZkSessionTimeout(int zkSessionTimeout) {
        this.zkSessionTimeout = zkSessionTimeout;
    }

    /**
     * 返回 Setaria 在 ZooKeeper 中的根目录名称.
     *
     * @return 根目录名称
     */
    public String getZkBasePath() {
        return zkBasePath;
    }

    /**
     * 设置 Setaria 在 ZooKeeper 中的根目录名称.
     *
     * @param zkBasePath 根目录名称
     */
    public void setZkBasePath(String zkBasePath) {
        this.zkBasePath = zkBasePath;
    }

    /**
     * 返回分布式配置的应用名称.
     *
     * @return 应用名称
     */
    public String getZkApp() {
        return zkApp;
    }

    /**
     * 设置分布式配置的应用名称.
     *
     * @param zkApp 应用名称
     */
    public void setZkApp(String zkApp) {
        this.zkApp = zkApp;
    }

    /**
     * 返回分布式配置的应用环境.
     *
     * @return 应用环境
     */
    public String getZkEnv() {
        return zkEnv;
    }

    /**
     * 设置分布式配置的应用环境.
     *
     * @param zkEnv 应用环境
     */
    public void setZkEnv(String zkEnv) {
        this.zkEnv = zkEnv;
    }

    /**
     * Setaria 文件配置的资源类型.
     */
    public static class Resource {

        private String location;
        private boolean ignoreNotFound;

        /**
         * 返回资源路径表达式.
         *
         * @return 资源路径表达式
         */
        public String getLocation() {
            return location;
        }

        /**
         * 设置资源路径表达式.
         *
         * @param location 资源路径表达式
         */
        public void setLocation(String location) {
            this.location = location;
        }

        /**
         * 如果资源不存在是否忽略.
         *
         * @return true/false
         */
        public boolean isIgnoreNotFound() {
            return ignoreNotFound;
        }

        /**
         * 如果资源不存在是否忽略
         *
         * @param ignoreNotFound true/false
         */
        public void setIgnoreNotFound(boolean ignoreNotFound) {
            this.ignoreNotFound = ignoreNotFound;
        }

        @Override
        public String toString() {
            return "Resource{" +
                    "location='" + location + '\'' +
                    ", ignoreNotFound=" + ignoreNotFound +
                    '}';
        }
    }

    @Override
    public String toString() {
        return "SetariaBean{" +
                "resources=" + resources +
                ", zkConnectString='" + zkConnectString + '\'' +
                ", zkSessionTimeout=" + zkSessionTimeout +
                ", zkBasePath='" + zkBasePath + '\'' +
                ", zkApp='" + zkApp + '\'' +
                ", zkEnv='" + zkEnv + '\'' +
                '}';
    }
}


text:
SYNONYM

#### According to
The Catalogue of Life, 3rd January 2011

#### Published in
Fl. nov. -zel. 205 (1855)

#### Original name
Sphaeria pullulans Berk., 1855

### Remarks
null


text:
import type { InitOptions, Widget } from 'instantsearch.js';
import type { IndexWidget } from 'instantsearch.js/es/widgets/index/index';
import { getWidgetAttribute } from 'instantsearch.js/es/lib/utils';
import { createInitOptions } from 'instantsearch.js/test/createWidget';

function getAttribute(widget: Widget | IndexWidget) {
  try {
    // casted to harmonize between src and es types of the same
    return getWidgetAttribute(widget, createInitOptions() as InitOptions);
  } catch {
    return undefined;
  }
}

/**
 * Jest serializer for an InstantSearch widget.
 *
 * It looks like this:
 *
 * Widget($$type)
 * Widget($$type) {
 *  $$widgetType: string
 *  attribute: string
 * }
 */
export const widgetSnapshotSerializer: jest.SnapshotSerializerPlugin = {
  serialize(widget: Widget | IndexWidget, { indent }, indentation) {
    const keys = {
      $$widgetType: widget.$$widgetType,
      attribute: getAttribute(widget),
    };

    const widgetName = `Widget(${widget.$$type || 'unknown'})`;

    const content = Object.entries(keys)
      .filter(([_key, value]) => value)
      .map(([key, value]) => `${indentation}${indent}${key}: ${value}`)
      .join('\n');

    if (content) {
      return `${widgetName} {
${content}
${indentation}}`;
    }

    return widgetName;
  },
  test(value) {
    return Boolean(value?.$$type);
  },
};


text:
<?php

namespace App\Http\Controllers;

use App\Page;
use App\Post;
use App\Project;
use App\Setting;
use App\User;

class PageController extends Controller
{
    /**
     * Display a listing of the resource.
     *
     * @return Response
     */
    public function index()
    {
        $users = User::all();
        if ($users->count() == 0) {
            return view('admin.user.create');
        }

        if (Setting::first()->show_on_front == 'projects') {
            $projects = Project::wherePublished(true)->orderBy('date', 'DESC')->get();

            return view('project.index')
                ->with('projects', $projects);
        }

        $posts = Post::whereStatus('published')->orderBy('created_at', 'desc')->paginate(15);

        return view('post.index')
            ->with('posts', $posts);
    }

    /**
     * Show the form for creating a new resource.
     *
     * @return Response
     */
    public function create()
    {
        //
    }

    /**
     * Store a newly created resource in storage.
     *
     * @return Response
     */
    public function store()
    {
        //
    }

    /**
     * Display the specified resource.
     *
     * @param int $id
     *
     * @return Response
     */
    public function show($slug)
    {
        $page = Page::whereSlug($slug)->first();

        return view('page.show')
            ->with('page', $page);
    }

    /**
     * Show the form for editing the specified resource.
     *
     * @param int $id
     *
     * @return Response
     */
    public function edit($id)
    {
        //
    }

    /**
     * Update the specified resource in storage.
     *
     * @param int $id
     *
     * @return Response
     */
    public function update($id)
    {
        //
    }

    /**
     * Remove the specified resource from storage.
     *
     * @param int $id
     *
     * @return Response
     */
    public function destroy($id)
    {
        //
    }
}


text:
/*
Title: Cunt
Description: This description will go in the meta description tag
Author: Joe Bloggs
Date: 2013/12/03
Robots: noindex,nofollow
Template: index
Type: article
*/

## Welcome to Pico

Congratulations, you have successfully installed [Pico](http://pico.dev7studios.com). Pico is a stupidly simple, blazing fast, flat file CMS.


text:
require File.expand_path(File.dirname(__FILE__) + '/../lib/dynamo/loader')

RSpec.configure do |config|
  config.treat_symbols_as_metadata_keys_with_true_values = true
  config.run_all_when_everything_filtered = true
  config.filter_run :focus
  config.order = 'random'
end


text:
package gerald1248.hollows;

import android.content.Context;
import android.content.res.Resources;
import android.graphics.Bitmap;
import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.Paint;
import android.graphics.Path;
import android.graphics.Point;
import android.graphics.PorterDuff;
import android.graphics.Rect;
import android.graphics.Typeface;

import java.util.LinkedList;

import org.magnos.impulse.Body;
import org.magnos.impulse.Circle;
import org.magnos.impulse.Polygon;
import org.magnos.impulse.Shape;
import org.magnos.impulse.Vec2;
import org.magnos.impulse.ImpulseScene;

import static android.graphics.Bitmap.createBitmap;

/**
 * LevelMap manages the static shapes/bodies that make up a level
 * it also holds linked lists of shapes and towers
 */

public class LevelMap {
    private static final String TAG = LevelMap.class.getSimpleName();

    LinkedList<QualifiedShape> shapes = new LinkedList<QualifiedShape>();
    LinkedList<QualifiedShape> towers = new LinkedList<QualifiedShape>();
    private char[][] charMap = new char[Constants.CHARMAP_LENGTH][Constants.CHARMAP_LENGTH];

    private Canvas offscreenCanvas = null;
    private Bitmap offscreenBitmap = null;
    private Typeface typeface = null;

    private Context context;

    private Point startPoint, endPoint;

    private Vec2[] collisionVertices = null;
    private int vertexCount = 4;

    private int levelIndex = 0;

    private Rect rectMap, rectScreen;

    private Paint paint;
    private Path path;

    public LevelMap(Context context, Typeface typeface, int levelIndex) {
        this.context = context;
        this.typeface = typeface;
        this.levelIndex = levelIndex;

        rectMap = new Rect(0, 0, (int) Constants.MAX_MAP, (int) Constants.MAX_MAP);
        rectScreen = new Rect(0, 0, 0, 0);
        paint = new Paint();
        path = new Path();

        offscreenBitmap = createBitmap((int) Constants.MAX_MAP, (int) Constants.MAX_MAP, Bitmap.Config.ALPHA_8);
        offscreenCanvas = new Canvas(offscreenBitmap);
        startPoint = new Point((int) Constants.MAX_MAP / 2, (int) Constants.MAX_MAP / 2); //sane default
        endPoint = new Point((int) Constants.MAX_MAP, (int) Constants.MAX_MAP);

        clearLevelMap();

        collisionVertices = new Vec2[vertexCount];
        for (int i = 0; i < vertexCount; i++) {
            collisionVertices[i] = new Vec2(0.0f, 0.0f);
        }
    }

    public void clearTowers() {
        towers.clear();
    }

    public void setLevelIndex(int levelIndex) {
        this.levelIndex = levelIndex;
        shapes.clear();
        towers.clear();
        clearLevelMap();
        offscreenCanvas.drawColor(Color.TRANSPARENT, PorterDuff.Mode.CLEAR);
    }

    public void drawGrid(Canvas canvas, int limit) {
        paint.reset();
        paint.setStyle(Paint.Style.STROKE);
        float r = (float) limit / 2;
        for (int i = 0; i < limit / 2; i += limit / 20) {
            canvas.drawCircle(r, r, i, paint);
        }

        path.reset();
        float f = (float) limit;
        for (int i = 0; i < limit; i += limit / 10) {
            path.moveTo((float) i, 0.0f);
            path.lineTo((float) i, 2.0f * f);
            path.moveTo(0.0f, (float) i);
            path.lineTo(2.0f * f, (float) i);
        }
        canvas.drawPath(path, paint);
    }

    public void drawOffscreen() {
        paint.reset();
        paint.setColor(Color.WHITE);

        if (Constants.DRAW_GRID) {
            drawGrid(offscreenCanvas, (int) Constants.MAX_MAP);
        }

        Resources resources = context.getResources();
        String[] levels = resources.getStringArray(R.array.levels);
        if (levelIndex >= levels.length) {
            levelIndex = 0;
        }
        int row = 0, col = 0;
        String level = levels[levelIndex].trim();
        int len = level.length();
        float half = Constants.TILE_LENGTH / 2;
        for (int i = 0; i < len; i++) {
            char c = level.charAt(i);
            if (Character.isWhitespace(c)) {
                row++;
                col = 0;
                continue;
            } else if (Character.isDigit(c)) {
                int d = Character.getNumericValue(c);
                addOrb(Constants.TILE_LENGTH / 2.0f * (float) d, Math.round(col * Constants.TILE_LENGTH + half), Math.round((float) row * Constants.TILE_LENGTH + half));
                if (row < Constants.CHARMAP_LENGTH && col < Constants.CHARMAP_LENGTH) {
                    charMap[row][col] = '.';
                }
            } else if (c == 't') {
                addTitleOrb(Constants.TILE_LENGTH, Math.round(col * Constants.TILE_LENGTH + half), Math.round((float) row * Constants.TILE_LENGTH + half));
                if (row < Constants.CHARMAP_LENGTH && col < Constants.CHARMAP_LENGTH) {
                    charMap[row][col] = '.';
                }
            } else if (c == 'a') {
                addAudioOrb(Constants.TILE_LENGTH, Math.round(col * Constants.TILE_LENGTH + half), Math.round((float) row * Constants.TILE_LENGTH + half));
                if (row < Constants.CHARMAP_LENGTH && col < Constants.CHARMAP_LENGTH) {
                    charMap[row][col] = '.';
                }
            } else if (c == 'n') {
                addNextLevelOrb(Constants.TILE_LENGTH / 2, Math.round(col * Constants.TILE_LENGTH + half), Math.round((float) row * Constants.TILE_LENGTH + half));
                if (row < Constants.CHARMAP_LENGTH && col < Constants.CHARMAP_LENGTH) {
                    charMap[row][col] = '.';
                }
            } else if (c == 'p') {
                addPreviousLevelOrb(Constants.TILE_LENGTH / 2, Math.round(col * Constants.TILE_LENGTH + half), Math.round((float) row * Constants.TILE_LENGTH + half));
                if (row < Constants.CHARMAP_LENGTH && col < Constants.CHARMAP_LENGTH) {
                    charMap[row][col] = '.';
                }
            } else if (c == 'r') {
                addRedshiftOrb(Constants.TILE_LENGTH / 2, Math.round(col * Constants.TILE_LENGTH + half), Math.round((float) row * Constants.TILE_LENGTH + half));
                if (row < Constants.CHARMAP_LENGTH && col < Constants.CHARMAP_LENGTH) {
                    charMap[row][col] = '.';
                }
            } else if (c == 's') {
                startPoint = new Point(col * (int) Constants.TILE_LENGTH + (int) half, row * (int) Constants.TILE_LENGTH + (int) half);
                // no need to update charMap - '.' is fine
            } else if (c == 'e') {
                endPoint = new Point(col * (int) Constants.TILE_LENGTH + (int) half, row * (int) Constants.TILE_LENGTH + (int) half);
                addBaseOrb(Constants.TILE_LENGTH, endPoint.x, endPoint.y);
                if (row < Constants.CHARMAP_LENGTH && col < Constants.CHARMAP_LENGTH) {
                    charMap[row][col] = c;
                }
            } else if (c == 'w') {
                addTowerS((float) col * Constants.TILE_LENGTH + half, (float) row * Constants.TILE_LENGTH);
                if (row < Constants.CHARMAP_LENGTH && col < Constants.CHARMAP_LENGTH) {
                    charMap[row][col] = '.';
                }
            } else if (c == 'm') {
                addTowerN((float) col * Constants.TILE_LENGTH + half, (float) row * Constants.TILE_LENGTH + Constants.TILE_LENGTH);
                if (row < Constants.CHARMAP_LENGTH && col < Constants.CHARMAP_LENGTH) {
                    charMap[row][col] = '.';
                }
            } else {
                Tile tile = new Tile(c, row, col);
                tile.draw(offscreenCanvas, paint);
                if (row < Constants.CHARMAP_LENGTH && col < Constants.CHARMAP_LENGTH) {
                    charMap[row][col] = c;
                }
            }
            col++;
        }

        paint.setStyle(Paint.Style.FILL);
        int shapesLen = shapes.size();
        for (int i = 0; i < shapesLen; i++) {
            QualifiedShape qs = shapes.get(i);
            if (qs instanceof Orb) {
                Orb o = (Orb) qs;
                o.draw(offscreenCanvas, paint);
            }
        }
    }

    public LinkedList<QualifiedShape> getShapes() {
        return shapes;
    }

    public LinkedList<QualifiedShape> getTowers() {
        return towers;
    }

    public void addPolygon(Vec2[] v, int x, int y, float orient) {
        shapes.add(new QualifiedShape(new Polygon(v), x, y, orient));
    }

    public void addRect(float w, float h, int x, int y, float orient) {
        shapes.add(new QualifiedShape(new Polygon(w, h), x, y, orient));
    }

    public void addOrb(float r, int cx, int cy) {
        shapes.add(new GenericOrb(r, cx, cy));
    }

    public void addTitleOrb(float r, int cx, int cy) {
        shapes.add(new TitleOrb(context, r, cx, cy));
    }

    public void addAudioOrb(float r, int cx, int cy) {
        shapes.add(new AudioOrb(context, r, cx, cy, typeface));
    }

    public void addNextLevelOrb(float r, int cx, int cy) {
        shapes.add(new NextLevelOrb(context, r, cx, cy, typeface));
    }

    public void addPreviousLevelOrb(float r, int cx, int cy) {
        shapes.add(new PreviousLevelOrb(context, r, cx, cy, typeface));
    }

    public void addBaseOrb(float r, int cx, int cy) {
        shapes.add(new BaseOrb(context, r, cx, cy, typeface));
    }

    public void addRedshiftOrb(float r, int cx, int cy) {
        shapes.add(new RedshiftOrb(context, r, cx, cy, typeface));
    }

    public void addTowerS(float cx, float cy) {
        towers.add(new Tower(new Circle(Constants.TILE_LENGTH / 1.5f), (int) cx, (int) cy, (float) Math.PI / 2)); // 6 o'clock
    }

    public void addTowerN(float cx, float cy) {
        towers.add(new Tower(new Circle(Constants.TILE_LENGTH / 1.5f), (int) cx, (int) cy, -(float) Math.PI / 2)); // 12 o'clock
    }

    public void draw(Canvas canvas, float cx, float cy, int color) {
        paint.reset();
        paint.setColor(color);

        int x = (int) cx;
        int y = (int) cy;
        int w = Constants.SCREEN_WIDTH;
        int h = Constants.SCREEN_HEIGHT;

        rectScreen.set(x - w/2, y - h/2, x + w/2, y + h/2);

        /*
        // this excerpt draws only the required rect,
        // but strangely performance degrades significantly
        // it recovers when color depth 8888 is used, but
        // that in turn uses too much memory given the large
        // 5000x5000 game map
        Rect rDest = new Rect(0, 0, w, h);
        canvas.drawBitmap(offscreenBitmap, rectScreen, rDest, paint);
        */

        canvas.save();
        canvas.translate(-x + w/2, -y + h/2);
        canvas.drawBitmap(offscreenBitmap, null, rectMap, paint);
        canvas.restore();

        canvas.save();
        // now draw towers - these aren't physical objects in the game
        for (QualifiedShape qs : towers) {
            Tower t = (Tower) qs;
            if (Collision.circleRect(t.x, t.y, (int) t.shape.radius, rectScreen)) {
                int adjX = t.x - x + w/2;
                int adjY = t.y - y + h/2;
                canvas.drawCircle(adjX, adjY, t.shape.radius, paint);
            }
        }
        canvas.restore();

    }

    public void initStaticShapes(ImpulseScene impulse) {
        drawOffscreen();

        // now create corresponding physics objects
        for (int i = 0; i < shapes.size(); i++) {
            QualifiedShape s = shapes.get(i);
            Body b = impulse.add(s.shape, s.x, s.y);
            b.setOrient(s.orient);
            b.restitution = 0.2f;
            b.dynamicFriction = 0.2f;
            b.staticFriction = 0.4f;
            b.setStatic();
        }
    }

    public boolean detectCollision(float cx, float cy, float r, float orient) {
        //nose
        collisionVertices[0].x = cx + r * (float) Math.cos(orient);
        collisionVertices[0].y = cy + r * (float) Math.sin(orient);

        //bottom right corner
        collisionVertices[1].x = cx + r * (float) Math.cos(orient + Math.PI * 0.75);
        collisionVertices[1].y = cy + r * (float) Math.sin(orient + Math.PI * 0.75);

        //bottom left corner
        collisionVertices[2].x = cx + r * (float) Math.cos(orient + Math.PI * 1.25);
        collisionVertices[2].y = cy + r * (float) Math.sin(orient + Math.PI * 1.25);

        //center
        collisionVertices[3].x = cx;
        collisionVertices[3].y = cy;

        for (int i = 0; i < vertexCount; i++) {
            float x = collisionVertices[i].x;
            float y = collisionVertices[i].y;

            int row = (int) Math.floor(y / Constants.TILE_LENGTH);
            int col = (int) Math.floor(x / Constants.TILE_LENGTH);

            if (row < 0 || row >= 50 || col < 0 || col >= 50) {
                continue;
            }

            char type = charMap[row][col];
            if (type == '.') {
                continue;
            }

            float xOffset = x % Constants.TILE_LENGTH;
            float yOffset = y % Constants.TILE_LENGTH;
            if (Tile.detectCollision(type, xOffset, yOffset)) {
                return true;
            }
        }
        return false;
    }

    public QualifiedShape detectShapeCollision(float cx, float cy, float r) {
        // all towers are (half-)circles
        for (QualifiedShape qs : towers) {
            Tower t = (Tower) qs;
            float r2 = t.shape.radius;
            float x2 = t.x;
            float y2 = t.y;

            if (Collision.circleCircle(cx, cy, x2, y2, r, r2)) {
                return qs;
            }
        }

        for (QualifiedShape qs : shapes) {
            Shape s = qs.shape;
            if (s instanceof Circle) {
                float r2 = s.radius;
                float x2 = qs.x;
                float y2 = qs.y;

                if (Collision.circleCircle(cx, cy, x2, y2, r, r2)) {
                    return qs;
                }
            }
        }

        return null;
    }

    public void removeTower(Tower t) {
        towers.remove(t);
    }

    public Point getEndPoint() {
        return endPoint;
    }

    public Point getStartPoint() {
        return startPoint;
    }

    private void clearLevelMap() {
        //initialize charMap: '.' represents a blank tile
        for (int i = 0; i < Constants.CHARMAP_LENGTH; i++) {
            for (int j = 0; j < Constants.CHARMAP_LENGTH; j++) {
                charMap[i][j] = '.';
            }
        }
    }
}