text:
Shoot the pig

In het spel "Shoot the pig" speel je als sun wukong die de evil pig tegemoet komt. De evil pig blokkert sun wukong, waardoor sun wukong een spreuk doet om een haar naar een cannon te veranderen, zodat u de evil pig weg kunt shieten.

bediening
 Door middel met de muis kan je de kanon bewegen. De snelheid van de kanon wordt bepaald door de afstand van de kanon tot de muis klik

Speel

Darten

Gooi pijlen naar een dartbord, speel hier het spel darten

Bediening

Door middel van de muis kun je de dart bewegen. De snelheid wordt bepaalt, hoelang de muis ingedrukt is. waneer je de muis los laat schiet de dart.

Speel dart

    <button type="button" class="close" data-dismiss="modal" aria-hidden="true" style="color: white;">×</button>

    <canvas id="canvas" width="600" height="400" ></canvas>


text:
#import <Foundation/Foundation.h>

@interface AWSMachineLearningResources : NSObject

+ (instancetype)sharedInstance;

- (NSDictionary *)JSONObject;

@end

redpajama_set_name: RedPajamaGithub


text:
import AddressbarColor from './plugins/AddressbarColor.js'
import AppFullscreen from './plugins/AppFullscreen.js'
import AppVisibility from './plugins/AppVisibility.js'
import BottomSheet from './plugins/BottomSheet.js'
import Cookies from './plugins/Cookies.js'
import Dark from './plugins/Dark.js'
import Dialog from './plugins/Dialog.js'
import Interaction from './plugins/Interaction.js'
import LoadingBar from './plugins/LoadingBar.js'
import Loading from './plugins/Loading.js'
import Meta from './plugins/Meta.js'
import Notify from './plugins/Notify.js'
import Platform from './plugins/Platform.js'
import Screen from './plugins/Screen.js'
import LocalStorage from './plugins/LocalStorage.js'
import SessionStorage from './plugins/SessionStorage.js'

export {
  AddressbarColor,
  AppFullscreen,
  AppVisibility,
  BottomSheet,
  Cookies,
  Dark,
  Dialog,
  Interaction,
  LoadingBar,
  Loading,
  Meta,
  Notify,
  Platform,
  Screen,
  LocalStorage,
  SessionStorage
}


text:
using System;

namespace RemoteControl
{
    public class OperationsClient
    {
        public void On<TResult, TParameter>(string operationName, Func<TParameter, TResult> operation)
        {
            FrameworkHelper.AddOperationHandler(operationName,
                (Object parameter) =>
                {
                    return (Object) operation((TParameter) parameter);
                });
        }
    }
}


text:
package org.apache.jackrabbit.oak.plugins.index;

import com.google.common.collect.ImmutableList;
import org.apache.jackrabbit.oak.api.PropertyState;
import org.apache.jackrabbit.oak.api.Tree;
import org.apache.jackrabbit.oak.api.Type;
import org.apache.jackrabbit.oak.plugins.index.search.FulltextIndexConstants;
import org.apache.jackrabbit.oak.query.AbstractQueryTest;
import org.junit.Assert;
import org.junit.Ignore;
import org.junit.Test;

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

import static com.google.common.collect.ImmutableList.of;
import static java.util.Arrays.asList;
import static org.apache.jackrabbit.JcrConstants.JCR_PRIMARYTYPE;
import static org.apache.jackrabbit.JcrConstants.NT_UNSTRUCTURED;
import static org.apache.jackrabbit.oak.api.Type.STRING;
import static org.apache.jackrabbit.oak.api.Type.STRINGS;
import static org.apache.jackrabbit.oak.plugins.index.IndexConstants.REINDEX_PROPERTY_NAME;
import static org.apache.jackrabbit.oak.plugins.index.search.FulltextIndexConstants.PROP_VALUE_REGEX;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;

/**
 * Tests the query engine using the default index implementation: the
 * IndexProvider
 */
public abstract class IndexQueryCommonTest extends AbstractQueryTest {

    private Tree indexDefn;
    protected IndexOptions indexOptions;
    protected TestRepository repositoryOptionsUtil;

    @Override
    protected void createTestIndexNode() throws Exception {
        setTraversalEnabled(false);
        Tree index = root.getTree("/");
        indexDefn = createTestIndexNode(index, indexOptions.getIndexType());
        TestUtil.useV2(indexDefn);
        indexDefn.setProperty(FulltextIndexConstants.EVALUATE_PATH_RESTRICTION, true);

        Tree props = TestUtil.newRulePropTree(indexDefn, "nt:base");
        props.getParent().setProperty(FulltextIndexConstants.INDEX_NODE_NAME, true);
        TestUtil.enablePropertyIndex(props, "c1/p", false);
        TestUtil.enableForFullText(props, FulltextIndexConstants.REGEX_ALL_PROPS, true);
        TestUtil.enablePropertyIndex(props, "a/name", false);
        TestUtil.enablePropertyIndex(props, "b/name", false);
        TestUtil.enableFunctionIndex(props, "length([name])");
        TestUtil.enableFunctionIndex(props, "lower([name])");
        TestUtil.enableFunctionIndex(props, "upper([name])");

        root.commit();
    }

    @Ignore
    //TODO ES failing
    @Test
    public void sql1() throws Exception {
        test("sql1.txt");
    }

    @Ignore
    //TODO ES Failing
    @Test
    public void sql2() throws Exception {
        test("sql2.txt");
    }

    //TODO ES test failing
    @Ignore
    @Test
    public void sql2FullText() throws Exception {
        test("sql2-fulltext.txt");
    }

    @Ignore
    @Test
    public void testValueRegex() throws Exception {
        Tree test = root.getTree("/").addChild("test");
        Tree a = test.addChild("a");
        Tree b = test.addChild("b");
        a.setProperty("name", "hello");
        b.setProperty("name", "hello pattern");
        root.commit();

        final String query = "select [jcr:path] from [nt:base] where isdescendantnode('/test') and contains(*, 'hello')";

        assertEventually(() -> {
            Iterator<String> result = executeQuery(query, "JCR-SQL2").iterator();
            List<String> paths = new ArrayList<>();
            result.forEachRemaining(paths::add);
            assertEquals(2, paths.size());
            assertEquals(paths.get(0), a.getPath());
            assertEquals(paths.get(1), b.getPath());
        });

        indexDefn.setProperty(PROP_VALUE_REGEX, "pat*");
        indexDefn.setProperty(REINDEX_PROPERTY_NAME, true);
        root.commit();

        assertEventually(() -> {
            Iterator<String> result = executeQuery(query, "JCR-SQL2").iterator();
            List<String> paths = new ArrayList<>();
            ;
            result.forEachRemaining(paths::add);
            assertEquals(1, paths.size());
            assertEquals(paths.get(0), b.getPath());
        });

    }

    @Test
    public void descendantTest() throws Exception {
        Tree test = root.getTree("/").addChild("test");
        test.addChild("a");
        test.addChild("b");
        root.commit();

        assertEventually(() -> {
            Iterator<String> result = executeQuery(
                    "select [jcr:path] from [nt:base] where isdescendantnode('/test')",
                    "JCR-SQL2").iterator();
            assertTrue(result.hasNext());
            assertEquals("/test/a", result.next());
            assertEquals("/test/b", result.next());
            assertFalse(result.hasNext());
        });
    }

    //TODO ES failing
    @Ignore
    @Test
    public void descendantTest2() throws Exception {
        Tree test = root.getTree("/").addChild("test");
        test.addChild("a").setProperty("name", asList("Hello", "World"), STRINGS);
        test.addChild("b").setProperty("name", "Hello");
        root.commit();

        assertEventually(() -> {
            Iterator<String> result = executeQuery(
                    "select [jcr:path] from [nt:base] where isdescendantnode('/test') and name='World'",
                    "JCR-SQL2").iterator();
            assertTrue(result.hasNext());
            assertEquals("/test/a", result.next());
            assertFalse(result.hasNext());
        });
    }

    //TODO ES Failing
    @Ignore
    @Test
    public void ischildnodeTest() throws Exception {
        Tree tree = root.getTree("/");
        Tree parents = tree.addChild("parents");
        parents.addChild("p0").setProperty("id", "0");
        parents.addChild("p1").setProperty("id", "1");
        parents.addChild("p2").setProperty("id", "2");
        Tree children = tree.addChild("children");
        children.addChild("c1").setProperty("p", "1");
        children.addChild("c2").setProperty("p", "2");
        children.addChild("c3").setProperty("p", "3");
        children.addChild("c4").setProperty("p", "4");
        root.commit();

        assertEventually(() -> {
            Iterator<String> result = executeQuery(
                    "select p.[jcr:path], p2.[jcr:path] from [nt:base] as p inner join [nt:base] as p2 on ischildnode(p2, p) where p.[jcr:path] = '/'",
                    "JCR-SQL2").iterator();
            assertTrue(result.hasNext());
            assertEquals("/, /children", result.next());
            assertEquals("/, /jcr:system", result.next());
            assertEquals("/, /oak:index", result.next());
            assertEquals("/, /parents", result.next());
            assertFalse(result.hasNext());
        });
    }

    @Ignore
    @Test
    public void contains() throws Exception {
        String h = "Hello" + System.currentTimeMillis();
        String w = "World" + System.currentTimeMillis();

        Tree test = root.getTree("/").addChild("test");
        test.addChild("a").setProperty("name", asList(h, w), STRINGS);
        test.addChild("b").setProperty("name", h);
        root.commit();

        // query 'hello'
        final StringBuffer stmt = new StringBuffer();
        stmt.append("/jcr:root//*[jcr:contains(., '").append(h);
        stmt.append("')]");
        assertEventually(() -> {
            assertQuery(stmt.toString(), "xpath",
                    ImmutableList.of("/test/a", "/test/b"));
        });

        // query 'world'
        final StringBuffer stmt1 = new StringBuffer();
        stmt1.append("/jcr:root//*[jcr:contains(., '").append(w);
        stmt1.append("')]");
        assertEventually(() -> {
            assertQuery(stmt1.toString(), "xpath", ImmutableList.of("/test/a"));
        });

    }

    //TODO ES failing
    @Ignore
    @Test
    public void containsNot() throws Exception {

        // see also OAK-3371
        // "if we have only NOT CLAUSES we have to add a match all docs (*.*) for the
        // query to work"

        executeQuery("/jcr:root//*[jcr:contains(@a,'-test*')]", "xpath", false);

        String planPrefix = "[nt:base] as [a] /* lucene:test-index(/oak:index/test-index) ";

        assertXPathPlan("/jcr:root//*[@a]",
                planPrefix + "a:[* TO *]");

        assertXPathPlan("/jcr:root//*[jcr:contains(., '*')]",
                planPrefix + ":fulltext:* ft:(\"*\")");

        assertXPathPlan("/jcr:root//*[jcr:contains(@a,'*')]",
                planPrefix + "full:a:* ft:(a:\"*\")");

        assertXPathPlan("/jcr:root//*[jcr:contains(@a,'hello -world')]",
                planPrefix + "+full:a:hello -full:a:world ft:(a:\"hello\" -a:\"world\")");

        assertXPathPlan("/jcr:root//*[jcr:contains(@a,'test*')]",
                planPrefix + "full:a:test* ft:(a:\"test*\")");

        assertXPathPlan("/jcr:root//*[jcr:contains(@a,'-test')]",
                planPrefix + "-full:a:test *:* ft:(-a:\"test\")");

        assertXPathPlan("/jcr:root//*[jcr:contains(@a,'-test*')]",
                planPrefix + "-full:a:test* *:* ft:(-a:\"test*\")");

        assertXPathPlan("/jcr:root//*[jcr:contains(., '-*')]",
                planPrefix + "-:fulltext:* *:* ft:(-\"*\")");

        assertXPathPlan("/jcr:root//*[jcr:contains(., 'apple - pear')]",
                planPrefix + "+:fulltext:apple -:fulltext:pear ft:(\"apple\" \"-\" \"pear\")");

        assertXPathPlan("/jcr:root/content//*[jcr:contains(., 'apple - pear')]",
                planPrefix + "-:fulltext:pear +:fulltext:apple +:ancestors:/content ft:(\"apple\" \"-\" \"pear\")");

    }

    private void assertXPathPlan(String xpathQuery, String expectedPlan) {
        List<String> result = executeQuery("explain " + xpathQuery, "xpath", false);
        String plan = result.get(0);
        int newline = plan.indexOf('\n');
        if (newline >= 0) {
            plan = plan.substring(0, newline);
        }
        Assert.assertEquals(expectedPlan, plan);
    }

    @Ignore("OAK-2424")
    @Test
    public void containsDash() throws Exception {
        Tree test = root.getTree("/").addChild("test");
        test.addChild("a").setProperty("name", "hello-wor");
        test.addChild("b").setProperty("name", "hello-world");
        test.addChild("c").setProperty("name", "hello");
        root.commit();

        assertQuery("/jcr:root//*[jcr:contains(., 'hello-wor*')]", "xpath",
                ImmutableList.of("/test/a", "/test/b"));
        assertQuery("/jcr:root//*[jcr:contains(., '*hello-wor*')]", "xpath",
                ImmutableList.of("/test/a", "/test/b"));

    }

    @Ignore("OAK-2424")
    @Test
    public void multiPhraseQuery() throws Exception {
        Tree test = root.getTree("/").addChild("test");
        test.addChild("a").setProperty("dc:format", "type:application/pdf");
        test.addChild("b").setProperty("dc:format", "progress");
        root.commit();

        assertQuery(
                "/jcr:root//*[jcr:contains(@dc:format, 'pro*')]",
                "xpath", ImmutableList.of("/test/b"));

        assertQuery(
                "/jcr:root//*[jcr:contains(@dc:format, 'type:appli*')]",
                "xpath", ImmutableList.of("/test/a"));

    }

    @Ignore
    @Test
    public void containsPath() throws Exception {

        Tree test = root.getTree("/").addChild("test");
        test.addChild("a").setProperty("name", "/parent/child/node");
        root.commit();

        StringBuffer stmt = new StringBuffer();
        stmt.append("//*[jcr:contains(., '/parent/child')]");
        assertEventually(() -> {
            assertQuery(stmt.toString(), "xpath", ImmutableList.of("/test/a"));
        });

    }

    @Ignore
    @Test
    public void containsPathNum() throws Exception {

        Tree test = root.getTree("/").addChild("test");
        Tree a = test.addChild("a");
        a.setProperty("name", "/segment1/segment2/segment3");
        root.commit();

        StringBuffer stmt = new StringBuffer();
        stmt.append("//*[jcr:contains(., '/segment1/segment2')]");
        assertEventually(() -> {
            assertQuery(stmt.toString(), "xpath", ImmutableList.of("/test/a"));
        });

    }

    @Test
    public void containsPathStrict() throws Exception {
        root.getTree("/").addChild("matchOnPath");
        root.getTree("/").addChild("match_on_path");
        root.commit();

        StringBuffer stmt = new StringBuffer();
        stmt.append("//*[jcr:contains(., 'match')]");
        assertEventually(() -> {
            assertQuery(stmt.toString(), "xpath",
                    ImmutableList.of("/match_on_path"));
        });

    }

    @Test
    public void containsPathStrictNum() throws Exception {
        root.getTree("/").addChild("matchOnPath1234");
        root.getTree("/").addChild("match_on_path1234");
        root.commit();

        StringBuffer stmt = new StringBuffer();
        stmt.append("//*[jcr:contains(., 'match')]");
        assertEventually(() -> {
            assertQuery(stmt.toString(), "xpath",
                    ImmutableList.of("/match_on_path1234"));
        });

    }

    /**
     * OAK-1208 property existence constraints break queries
     */
    //TODO ES failing
    @Ignore
    @Test
    public void testOAK1208() throws Exception {
        Tree t = root.getTree("/").addChild("containsWithMultipleOr");
        Tree one = t.addChild("one");
        one.setProperty("p", "dam/smartcollection");
        one.setProperty("t", "media");

        Tree two = t.addChild("two");
        two.setProperty("p", "dam/collection");
        two.setProperty("t", "media");

        Tree three = t.addChild("three");
        three.setProperty("p", "dam/hits");
        three.setProperty("t", "media");

        root.commit();

        StringBuffer stmt = new StringBuffer();
        stmt.append("//*[jcr:contains(., 'media') and (@p = 'dam/smartcollection' or @p = 'dam/collection') ]");
        assertEventually(() -> {
            assertQuery(stmt.toString(), "xpath",
                    ImmutableList.of(one.getPath(), two.getPath()));
        });
    }

    @Test
    public void testNativeLuceneQuery() throws Exception {
        String nativeQueryString = "select [jcr:path] from [nt:base] where native('lucene', 'title:foo -title:bar')";
        Tree test = root.getTree("/").addChild("test");
        test.addChild("a").setProperty("title", "foo");
        test.addChild("b").setProperty("title", "bar");
        root.commit();

        assertEventually(() -> {
            Iterator<String> result = executeQuery(nativeQueryString, "JCR-SQL2").iterator();
            assertTrue(result.hasNext());
            assertEquals("/test/a", result.next());
            assertFalse(result.hasNext());
        });
    }

    //TODO ES Failing
    @Ignore
    @Test
    public void testRepSimilarAsNativeQuery() throws Exception {
        String nativeQueryString = "select [jcr:path] from [nt:base] where " +
                "native('lucene', 'mlt?stream.body=/test/a&mlt.fl=:path&mlt.mindf=0&mlt.mintf=0')";
        Tree test = root.getTree("/").addChild("test");
        test.addChild("a").setProperty("text", "Hello World");
        test.addChild("b").setProperty("text", "He said Hello and then the world said Hello as well.");
        test.addChild("c").setProperty("text", "He said Hi.");
        root.commit();
        assertEventually(() -> {
            Iterator<String> result = executeQuery(nativeQueryString, "JCR-SQL2").iterator();
            assertTrue(result.hasNext());
            assertEquals("/test/a", result.next());
            assertTrue(result.hasNext());
            assertEquals("/test/b", result.next());
            assertFalse(result.hasNext());
        });
    }

    //TODO ES Failing
    @Ignore
    @Test
    public void testRepSimilarQuery() throws Exception {
        String query = "select [jcr:path] from [nt:base] where similar(., '/test/a')";
        Tree test = root.getTree("/").addChild("test");
        test.addChild("a").setProperty("text", "Hello World Hello World");
        test.addChild("b").setProperty("text", "Hello World");
        test.addChild("c").setProperty("text", "World");
        test.addChild("d").setProperty("text", "Hello");
        test.addChild("e").setProperty("text", "World");
        test.addChild("f").setProperty("text", "Hello");
        test.addChild("g").setProperty("text", "World");
        test.addChild("h").setProperty("text", "Hello");
        root.commit();
        assertEventually(() -> {
            Iterator<String> result = executeQuery(query, "JCR-SQL2").iterator();
            assertTrue(result.hasNext());
            assertEquals("/test/a", result.next());
            assertTrue(result.hasNext());
            assertEquals("/test/b", result.next());
            assertTrue(result.hasNext());
        });
    }

    //TODO ES failing
    @Ignore
    @Test
    public void testRepSimilarXPathQuery() throws Exception {
        String query = "//element(*, nt:base)[rep:similar(., '/test/a')]";
        Tree test = root.getTree("/").addChild("test");
        test.addChild("a").setProperty("text", "Hello World Hello World");
        test.addChild("b").setProperty("text", "Hello World");
        test.addChild("c").setProperty("text", "World");
        test.addChild("d").setProperty("text", "Hello");
        test.addChild("e").setProperty("text", "World");
        test.addChild("f").setProperty("text", "Hello");
        test.addChild("g").setProperty("text", "World");
        test.addChild("h").setProperty("text", "Hello");
        root.commit();
        assertEventually(() -> {
            Iterator<String> result = executeQuery(query, "xpath").iterator();
            assertTrue(result.hasNext());
            assertEquals("/test/a", result.next());
            assertTrue(result.hasNext());
            assertEquals("/test/b", result.next());
        });
    }

    @Ignore
    @Test
    public void testTokenizeCN() throws Exception {
        Tree t = root.getTree("/").addChild("containsCN");
        Tree one = t.addChild("one");
        one.setProperty("t", "美女衬衫");
        root.commit();
        assertEventually(() -> {
            assertQuery("//*[jcr:contains(., '美女')]", "xpath",
                    ImmutableList.of(one.getPath()));
        });
    }

    //TODO ES Failing
    @Ignore
    @Test
    public void testMultiValuedPropUpdate() throws Exception {
        Tree test = root.getTree("/").addChild("test");
        String child = "child";
        String mulValuedProp = "prop";
        test.addChild(child).setProperty(mulValuedProp, of("foo", "bar"), Type.STRINGS);
        root.commit();
        assertEventually(() -> {
            assertQuery(
                    "/jcr:root//*[jcr:contains(@" + mulValuedProp + ", 'foo')]",
                    "xpath", of("/test/" + child));
        });
        test.getChild(child).setProperty(mulValuedProp, new ArrayList<String>(), Type.STRINGS);
        root.commit();
        assertEventually(() -> {
            assertQuery("/jcr:root//*[jcr:contains(@" + mulValuedProp + ", 'foo')]", "xpath", new ArrayList<String>());
        });
        test.getChild(child).setProperty(mulValuedProp, of("bar"), Type.STRINGS);
        root.commit();
        assertEventually(() -> {
            assertQuery(
                    "/jcr:root//*[jcr:contains(@" + mulValuedProp + ", 'foo')]",
                    "xpath", new ArrayList<String>());
        });
        test.getChild(child).removeProperty(mulValuedProp);
        root.commit();
        assertEventually(() -> {
            assertQuery(
                    "/jcr:root//*[jcr:contains(@" + mulValuedProp + ", 'foo')]",
                    "xpath", new ArrayList<String>());
        });
    }

    @SuppressWarnings("unused")
    private static void walktree(final Tree t) {
        System.out.println("+ " + t.getPath());
        for (PropertyState p : t.getProperties()) {
            System.out.println("  -" + p.getName() + "=" + p.getValue(STRING));
        }
        for (Tree t1 : t.getChildren()) {
            walktree(t1);
        }
    }

    private static Tree child(Tree t, String n, String type) {
        Tree t1 = t.addChild(n);
        t1.setProperty(JCR_PRIMARYTYPE, type, Type.NAME);
        return t1;
    }

    //TODO ES TEST Failing
    @Ignore
    @Test
    public void oak3371() throws Exception {
        setTraversalEnabled(false);
        Tree t, t1;

        t = root.getTree("/");
        t = child(t, "test", NT_UNSTRUCTURED);
        t1 = child(t, "a", NT_UNSTRUCTURED);
        t1.setProperty("foo", "bar");
        t1 = child(t, "b", NT_UNSTRUCTURED);
        t1.setProperty("foo", "cat");
        t1 = child(t, "c", NT_UNSTRUCTURED);
        t1 = child(t, "d", NT_UNSTRUCTURED);
        t1.setProperty("foo", "bar cat");

        root.commit();

        assertEventually(() -> {
            assertQuery(
                    "SELECT * FROM [nt:unstructured] WHERE ISDESCENDANTNODE('/test') AND CONTAINS(foo, 'bar')",
                    of("/test/a", "/test/d"));

            assertQuery(
                    "SELECT * FROM [nt:unstructured] WHERE ISDESCENDANTNODE('/test') AND NOT CONTAINS(foo, 'bar')",
                    of("/test/b", "/test/c"));

            assertQuery(
                    "SELECT * FROM [nt:unstructured] WHERE ISDESCENDANTNODE('/test') AND CONTAINS(foo, 'bar cat')",
                    of("/test/d"));

            assertQuery(
                    "SELECT * FROM [nt:unstructured] WHERE ISDESCENDANTNODE('/test') AND NOT CONTAINS(foo, 'bar cat')",
                    of("/test/c"));
        });
        setTraversalEnabled(true);
    }

    private static void assertEventually(Runnable r) {
        TestUtils.assertEventually(r, 3000 * 3);
    }
}


text:
using Ical.Net.Collections;

namespace Ical.Net
{
    /// <summary>
    /// A collection of calendar objects.
    /// </summary>
    public class CalendarObjectList : GroupedList<string, ICalendarObject>, ICalendarObjectList<ICalendarObject>
    {
        public CalendarObjectList(ICalendarObject parent) {}
    }
}


text:
class CreateIceCreams < ActiveRecord::Migration
  def change
    create_table :ice_creams do |t|
      t.string :type
      t.references :shop
      t.timestamps null: false
    end
  end
end


text:
#pragma once

enum DataType { DATRAW_NONE, DATRAW_UCHAR, DATRAW_USHORT, DATRAW_FLOAT };

int getDataTypeSize(DataType t);

class DatFile
{
public:

    DatFile(void);
    ~DatFile(void);

    bool parseDatFile(char *datFileName);

    void* readRawData(int timeStep=0);

    const char* getDatFileName(void) { return _datFileName; }
    const char* getRawFileName(void) { return _rawFileName; }

    DataType getDataType(void) { return _dataType; }
    const int* getDataSizes(void) { return _sizes; }
    const float* getDataDists(void) { return _dists; }
    const int getDataDimension(void) { return _dataDim; }
    const int getTimeStepBegin(void) { return _timeStepBeg; }
    const int getTimeStepEnd(void) { return _timeStepEnd; }

protected:
    void parseDataDim(char *line);

private:

    char *_datFileName;
    char *_rawFileName;

    DataType _dataType;
    int _sizes[3];
    float _dists[3];
    int _dataDim;
    int _timeStepBeg;
    int _timeStepEnd; // == timeStepBeg if only single timestep
};


text:
module BootstrapFarsi
  class Engine < ::Rails::Engine
    initializer 'bootstrap_farsi.add_less_path' do |app|
      app.config.less.paths << File.join(config.root, 'app', 'frameworks')
    end
  end
end


text:
namespace('Dash.OAuth');

(function() {
  'use strict';

  var __bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; };

  Dash.OAuth.AutoRefresh = (function() {
    function AutoRefresh(appId, urlGenerator, shouldShowCallback) {
      this.appId = appId;
      this.urlGenerator = urlGenerator;
      this.shouldShowCallback = shouldShowCallback;
      this.refreshLocation = __bind(this.refreshLocation, this);
    }

    AutoRefresh.prototype.modalDataId = 'refresh-modal';

    AutoRefresh.prototype.checkForTokenInterval = 200;
    AutoRefresh.prototype.maxWaitForToken = 6000;

    AutoRefresh.prototype.register = function() {
      var timeInSeconds, timeoutInMilliseconds,
        _this = this;
      timeInSeconds = Dash.OAuth.TokenAccessor.getExpiresIn(this.appId);
      timeoutInMilliseconds = timeInSeconds * 1000;
      this.timeoutId = Dash.Browser.setTimeout((function() {
        return _this.trigger();
      }), timeoutInMilliseconds);

      return this.timeoutId;
    };

    AutoRefresh.prototype.trigger = function() {
      if (this.shouldShowModal()) {
        this.cleanUp();
        return this.renderModal();
      }
    };

    AutoRefresh.prototype.renderModal = function() {
      var _this = this;
      Dash.OAuth.TokenAccessor.expire(this.appId);
      Dash.OAuth.Storage.set('isAutoRefresh', 'true');
      var urlAndState = this.urlGenerator.generate();
      (new Dash.OAuth.AccessRequester()).storeState(urlAndState.state);
      this.modal = this.createModal(urlAndState.url);
      this.modal.render();
      this.refreshPageTimeoutId = Dash.Browser.setTimeout(function(){_this.refreshLocation(urlAndState.url);}, this.maxWaitForToken);
      this.intervalId = Dash.Browser.setInterval((function() {
        return _this.closeModal();
      }), this.checkForTokenInterval);

      return this.intervalId;
    };

    AutoRefresh.prototype.createModal = function(url) {
      return new Dash.OAuth.TokenRefreshIframe(url);
    };

    AutoRefresh.prototype.refreshLocation = function(url) {
      Dash.OAuth.AutoRefresh.expireFlag();
      return Dash.Browser.Location.change(url);
    };

    AutoRefresh.prototype.closeModal = function() {
      if (Dash.OAuth.TokenAccessor.get(this.appId) !== undefined) {
        this.cleanUp();
        return this.register();
      }
    };

    AutoRefresh.prototype.cleanUp = function() {
      var _ref;
      clearTimeout(this.timeoutId);
      clearTimeout(this.refreshPageTimeoutId);
      clearInterval(this.intervalId);
      return (_ref = this.modal) !== undefined ? _ref.remove() : void 0;
    };

    AutoRefresh.prototype.shouldShowModal = function() {
      if (this.shouldShowCallback !== undefined) {
        return this.shouldShowCallback();
      } else {
        return true;
      }
    };

    AutoRefresh.expireFlag = function() {
      return Dash.OAuth.Storage.expire('isAutoRefresh');
    };

    AutoRefresh.isFlagSet = function() {
      return (Dash.OAuth.Storage.get('isAutoRefresh') !== undefined);
    };

    return AutoRefresh;

  })();

}).call(this);


text:
package com.thecoderscorner.groovychart.dataset.series.xyz;

import java.util.Map;
import com.thecoderscorner.groovychart.dataset.BaseDatasetBuilder;
import org.jfree.data.general.Dataset;
import org.jfree.data.xy.MatrixSeriesCollection;

/**
 *
 * @author jclarke
 */
public class MatrixSeriesCollectionBuilder extends BaseDatasetBuilder {

    /** Creates a new instance of MatrixSeriesCollectionBuilder */
    public MatrixSeriesCollectionBuilder() {
    }

    public Dataset getDataset() {
        return getCollection();
    }

    /**
     * Holds value of property collection.
     */
    private MatrixSeriesCollection collection;

    /**
     * Getter for property collection.
     * @return Value of property collection.
     */
    public MatrixSeriesCollection getCollection() {
        return this.collection;
    }

    /**
     * Setter for property collection.
     * @param collection New value of property collection.
     */
    public void setCollection(MatrixSeriesCollection collection) {
        this.collection = collection;
    }

    public void processNode(Object name, Map map, Object value) throws Exception {
        if(value != null && value instanceof MatrixSeriesCollection) {
            this.collection = (MatrixSeriesCollection)value;
        }else {
            // TODO
        }
    }
}


text:
package org.web3j.utils;

import java.util.concurrent.Callable;
import java.util.concurrent.CompletableFuture;
import java.util.concurrent.Executor;
import java.util.concurrent.Executors;
import java.util.concurrent.ScheduledExecutorService;

/**
 * Async task facilitation.
 */
public class Async {

    private static final Executor executor = Executors.newCachedThreadPool();

    public static <T> CompletableFuture<T> run(Callable<T> callable) {
        CompletableFuture<T> result = new CompletableFuture<>();
        CompletableFuture.runAsync(() -> {
            // we need to explicityly catch any exceptions,
            // otherwise they will be silently discarded
            try {
                result.complete(callable.call());
            } catch (Throwable e) {
                result.completeExceptionally(e);
            }
        }, executor);
        return result;
    }

    private static int getCpuCount() {
        return Runtime.getRuntime().availableProcessors();
    }

    public static ScheduledExecutorService defaultExecutorService() {
        return Executors.newScheduledThreadPool(getCpuCount());
    }
}


text:
"""
Grey User database handler
"""
import grey.db

def find_user(userId, callback):
    grey.db.mongodb.user_db.find_one({"userId": userId }, callback = callback)

def create_user(user, callback):
    grey.db.mongodb.user_db.save(user, callback = callback)

def update_user(userId, update_dic, callback):
    update_dic = {"$set": update_dic}
    grey.db.mongodb.user_db.find_and_modify(
        query={ 'userId': userId },
        update=update_dic,
        new=True,
        callback = callback
    )


text:
package com.navercorp.pinpoint.profiler.modifier.arcus.interceptor;

import com.navercorp.pinpoint.bootstrap.interceptor.ParameterExtractor;

/**
 * @author emeroad
 */
public class IndexParameterExtractor implements ParameterExtractor {

    private final int index;

    public IndexParameterExtractor(int index) {
        this.index = index;
    }

    @Override
    public int getIndex() {
        return index;
    }

    @Override
    public Object extractObject(Object[] parameterList) {
        if (parameterList == null) {
            return NULL;
        }
        return parameterList[index];
    }

}


text:
HelpDialog::HelpDialog(QWidget *parent) :
    QDialog(parent),
    ui(new Ui::HelpDialog)
{
    ui->setupUi(this);
}

HelpDialog::~HelpDialog()
{
    delete ui;
}

void HelpDialog::resizeEvent(QResizeEvent *)
{
    QSize tabSize = ui->tabWidget->currentWidget()->size();

    ui->moveOneGameInstructions->resize(tabSize);
    ui->moveSomeGamesInstructions->resize(tabSize);
    ui->moveAllGamesInstructions->resize(tabSize);
}


text:
body { padding-top: 20px; }
/*div.article { padding-top: 20px; }*/
div.article h2 { padding-bottom: 10px; }

div.highlight pre {
    background-color: #fefbf3;
    margin: 0 0 10px;
}

.well.small {
    padding: 6px 6px 4px;
}

.btn.xsmall {
    padding: 1px 3px 1px;
    font-size: 11px;
}

.summary * { display: inline; }
.summary pre { display: none; }

a.social[href*='activestate.com']:before {content: url('./images/icons/activestate.png'); margin-right: 2px; vertical-align: -3px;}
a.social[href*='atom.xml']:before {content: url('./images/icons/rss.png'); margin-right: 2px; vertical-align: -3px;}
a.social[href*='bitbucket.org']:before {content: url('./images/icons/bitbucket.png'); margin-right: 2px; vertical-align: -3px;}
a.social[href*='code.google.com']:before {content: url('./images/icons/phosting.png'); margin-right: 2px; vertical-align: -3px;}
a.social[href*='delicious.com']:before {content: url('./images/icons/delicious.png'); margin-right: 2px; vertical-align: -3px;}
a.social[href*='digg.com']:before {content: url('./images/icons/digg.png'); margin-right: 2px; vertical-align: -3px;}
a.social[href*='facebook.com']:before {content: url('./images/icons/facebook.png'); margin-right: 2px; vertical-align: -3px;}
a.social[href*='github.com']:before {content: url('./images/icons/github.png'); margin-right: 2px; vertical-align: -3px;}
a.social[href*='google.com/reader']:before {content: url('./images/icons/reader.png'); margin-right: 2px; vertical-align: -3px;}
a.social[href*='jamendo.com']:before {content: url('./images/icons/jamendo.png'); margin-right: 2px; vertical-align: -3px;}
a.social[href*='last.fm']:before, .social a[href*='lastfm.']:before {content: url('./images/icons/lastfm.png'); margin-right: 2px; vertical-align: -3px;}
a.social[href*='linkedin.com']:before {content: url('./images/icons/linkedin.png'); margin-right: 2px; vertical-align: -3px;}
a.social[href*='rss.xml']:before {content: url('./images/icons/rss.png'); margin-right: 2px; vertical-align: -3px;}
a.social[href*='stackoverflow.com']:before {content: url('./images/icons/stackoverflow.png'); margin-right: 2px; vertical-align: -3px;}
a.social[href*='careers.stackoverflow.com']:before {content: url('./images/icons/careers.stackoverflow.png'); margin-right: 2px; vertical-align: -3px;}
a.social[href*='twitter.com']:before {content: url('./images/icons/twitter.png'); margin-right: 2px; vertical-align: -3px;}
a.social[href*='weibo.com']:before {content: url('./images/icons/weibo.png'); margin-right: 2px; vertical-align: -3px;}


text:
;(function () {
  'use strict';

  angular.module('jobber.users')

  .factory('UsersFactory', function ($http, $rootScope, $cookieStore, $location, JOBBER, AWS, PATHS) {

    var self = this;

    var cookie = function () {
      return $cookieStore.get('jobberUser');
    };

    var broadcast = function(action, obj) {
      $rootScope.$broadcast('user:' + action, obj);
    };

    var addFakeData = function (userObj) {

      userObj.user.resumes = [
        {
          resume_id: 2,
          name: 'My_resume_feb_2015',
          url: 'https://www.aws.amazon.com/8sdfssdf7j8sdf.pdf'
        },
        {
          resume_id: 3,
          name: 'My_resume_mar_2015',
          url: 'https://www.aws.amazon.com/asdkljh3rwjhsd.pdf'
        }
      ];

      userObj.user.addr1 = '123 Main St.';
      userObj.user.city = 'Atlanta';
      userObj.user.state = 'GA';

      console.log('Updated userObj: ', userObj);

      return userObj;
    };

    return {

      setCookie: function (val) {
        $cookieStore.put('jobberUser', val);
      },

      getCookie: function () {
        return cookie();
        // return $cookieStore.get('jobberUser');
      },

      // tokenizeHeader: function () {
      //   var c = this.getCookie();
      //   if (c) return PARSE.CONFIG.headers['X-PARSE-Session-Token'] = c.sessionToken;
      // },

      signup: function (userObj) {
        var self = this;
        $http.post(JOBBER.URL + 'users', {user: userObj})
          .success(function (res) {
            self.setCookie(res);
            $location.path(PATHS.HOME);
            broadcast('signup');
          })
          .error(function (res) {
            broadcast('signupError', res.messages[0]);
          });
      },

      signin: function (userObj) {
        var self = this;
        $http.post(JOBBER.URL + 'users/sign_in', {user: userObj})
          .success(function (res) {
            // console.log('signin success res: ', res);

            res = addFakeData(res);

            self.setCookie(res);
            $location.path(PATHS.HOME);
          })
          .error(function (res) {
            // console.log('signin error res: ', res);
            broadcast('signinError', res.messages[0]);
          });
      },

      signout: function () {
        $cookieStore.remove('jobberUser');
        $location.path('/signin');
      },

      config: function () {
        var token = cookie().user.authentication_token;
        return {headers: {authentication_token: token}};
      },

      update: function (userObj) {
        $http.post(JOBBER.URL + 'user_profile', {user: userObj}, this.config())
          .success(function (res) {
            console.log('update success res: ', res);
            broadcast('update');
          })
          .error(function (res) {
            console.log('update error res: ', res);
            broadcast('updateError', res.messages[0]);
          });
      },

      deleteResume: function (id) {
        $http.delete(JOBBER.URL + 'user_resume/' + id, this.config());
      }

    };

  });

}());


text:
This represents the logical continuation of the myhadoop project by Sriram
Krishnan (http://sourceforge.net/projects/myhadoop/).

myhadoop provides a framework for launching Hadoop clusters within traditional
high-performance compute clusters and supercomputers.  It allows users to
provision and deploy Hadoop clusters within the batch scheduling environment of
such systems with minimal expertise required.

## Quick Install

Assuming you unpacked myHadoop in /usr/local/myhadoop and your Hadoop binary
distribution is located in /usr/local/hadoop-1.2.1:

    cd /usr/local/hadoop-1.2.1/conf
    patch < /usr/local/myhadoop/myhadoop-1.2.1.patch

That's it.  See USERGUIDE.md for a more detailed installation guide and a brief
introduction to using myHadoop.

## About myHadoop
This framework comes with three principal runtimes:

* bin/myhadoop-configure.sh - creates a Hadoop configuration set based on the
  information presented by a system's batch scheduler.  At present, myhadoop
  interfaces with Torque, SLURM, and Sun Grid Engine.
* bin/myhadoop-cleanup.sh - cleans up after the Hadoop cluster has been torn
  down.
* bin/myhadoop-bootstrap.sh - When run from either within a job submission
  script or an interactive job, it provides a one-command configuration and
  spinup of a Hadoop cluster and instructions for the user on how to connect
  to his or her personal cluster.

### myhadoop-configure.sh

This script takes a series of template configuration XML files, applies the
necessary patches based on the job runtime environment provided by the batch
scheduler, and (optionally) formats HDFS.  The general syntax is

myhadoop-configure.sh -c /your/new/config/dir -s /path/to/node/local/storage

where
  * /your/new/config/dir is where you would like your Hadoop cluster's config
    directory to reside.  This is a relatively arbitrary choice, but it will
    then serve as your Hadoop cluster's $HADOOP_CONF_DIR
  * /path/to/node/local/storage is the location of a non-shared filesystem on
    each node that can be used to store each node's configuration, state, and
    HDFS data.

The examples/ directory contains torque.qsub which illustrates how this
would look in practice.

Before calling myhadoop-configure.sh, you MUST have JAVA_HOME defined in your
environment and HADOOP_HOME defined in either your environment or your
myhadoop/etc/myhadoop.conf file.  myhadoop-configure.sh will look in
$HADOOP_HOME/conf for the configuration templates it will use for your personal
Hadoop cluster.

### myhadoop-cleanup.sh

This is a courtesy script that simply deletes all of the data created by a
Hadoop cluster on all of the cluster's nodes.  A proper batch system should do
this automatically.

To run myhadoop-cleanup.sh, you must have HADOOP_HOME and HADOOP_CONF_DIR
defined in your environment.

### myhadoop-bootstrap.sh

This is another courtesy script that wraps myhadoop-configure.sh to simplify
the process of creating Hadoop clusters for users.  When run from within a
batch environment (e.g., a batch job or an interactive job), it will gather
the necessary information from the batch system to run myhadoop-configure.sh,
run it, and create a file called "setenv.sourceme" that contains all of the
instructions a user will need to connect to his or her newly spawned Hadoop
cluster and begin using it.

The examples/ directory contains bootstrap.qsub that illustrates how a user may
use myhadoop-boostrap.sh in all supported batch environments.  He or she simply
has to submit this script and wait for "setenv.sourceme" to appear in his or
her directory.  Once it appears, he or she can "cat" the file and follow the
instructions contained within to get to an environment where he or she can
begin interacting with his or her cluster using the "hadoop" command.


text:
#region Using

using PPWCode.Kit.Tasks.API_I;
using PPWCode.Kit.Tasks.Server.API_I;
using PPWCode.Vernacular.Persistence.I.Dao.Wcf.Helpers.Hosting;

#endregion

namespace PPWCode.Kit.Tasks.Server
{
    public class InProcHostingFactory
    {
        public static ITasksDao CreateTasksInstance()
        {
            return InProcFactory.CreateInstance<TasksDao, ITasksDao>();
        }
    }
}


text:
<?php

use yii\helpers\Html;
//use yii\grid\GridView;
use kartik\grid\GridView;

/* @var $this yii\web\View */
/* @var $searchModel frontend\models\StatusSearch */
/* @var $dataProvider yii\data\ActiveDataProvider */

$this->title = 'Statuses';
$this->params['breadcrumbs'][] = $this->title;
?>

<?php
$gridColumns = [
[
    'class'=>'kartik\grid\SerialColumn',
    'width' => '10%',
    'contentOptions'=>['class'=>'kartik-sheet-style'],
    'header'=>'',
    'headerOptions'=>['class'=>'kartik-sheet-style']
],

    [
        'class'=>'kartik\grid\ExpandRowColumn',
        'width'=>'10%',
        'value'=>function ($model, $key, $index, $column) {
            return GridView::ROW_COLLAPSED;
        },
        'detail'=>function ($model, $key, $index, $column) {
            return Yii::$app->controller->renderPartial('view', ['model'=>$model]);
        },
        'headerOptions'=>['class'=>'kartik-sheet-style'],
        'expandOneOnly'=>true
    ],
    [
    'attribute' => 'status',
    'label' => 'Status',
    'width' => '70%',
    'filterType'=>GridView::FILTER_TYPEAHEAD,
    'filter' => \frontend\models\Status::getStatuses(),
    'filterWidgetOptions'=>[
        'pluginOptions'=>[
            'allowClear'=>true,
            'scrollable' => true,
            'highlight'=>true,
        ],
         'dataset' => [
            [
                'local' => array_merge(\frontend\models\Status::getStatuses()) ,
                'limit' => 10
            ]
        ]
    ],
    'filterInputOptions'=>['placeholder'=>'Any Status'],
    'format'=>'raw'
 ],
[
    'class'=>'kartik\grid\ActionColumn',
    'template' => '{update}{delete}',
    'width' => '10%',
    'dropdownOptions'=>['class'=>'pull-right'],
    'headerOptions'=>['class'=>'kartik-sheet-style'],
]
];
?>

<?php
    echo GridView::widget([
        'dataProvider' => $dataProvider,
        'filterModel' => $searchModel,
        'columns' => $gridColumns,
        'containerOptions'=>['style'=>'overflow: auto'], // only set when $responsive = false
        'headerRowOptions'=>['class'=>'kartik-sheet-style'],
        'filterRowOptions'=>['class'=>'kartik-sheet-style'],
        'toolbar' =>  [
             [
                'content'=>
                    Html::a('', ['create'], [
                        'class' => 'btn btn-default',
                    'title' => Yii::t('yii', 'Add Status')
                    ]) . ' '.
                     Html::a('', ['index'], [
                        'class' => 'btn btn-default',
                        'title' => Yii::t('yii', 'Reset Grid')
                    ]),
            ],
            '{export}',
        ],
        'pjax' => true,
        'pjaxSettings' => [
            'options' => [
                'enablePushState' => false,
            ],
        ],
        'bordered' => true,
        'striped' => false,
        'condensed' => false,
        'responsive' => false,
        'hover' => true,
        'panel'=>[
            'type'=>GridView::TYPE_PRIMARY,
            'heading'=> '
 '. Yii::t('app', 'Statuses'). '
',
            'before'=> 'This page display all of the available '. Yii::t('app', 'Statuses'). '.',
        ],
    ]);

$this->title = 'Statuses';
$this->params['breadcrumbs'] = ["Status"];
?>


text:
'use strict';

var dispatch = require('dispatch-recursive');
var unmarshalingCommands = require('./lib/unmarshalingCommands');

module.exports = dispatch.apply(undefined, unmarshalingCommands);


text:
local M = {}

local servers = {
  -- gopls = {},
  html = {},
  jsonls = {},
  pyright = {},
  rust_analyzer = {},
  sumneko_lua = {
		settings = {
			Lua = {
				runtime = {
					version = "LuaJIT",
					path = vim.split(package.path, ";"),
				},
				diagnostics = {
					globals = { "vim"},
				},
				workspace = {
					library = {
            [vim.fn.expand "$VIMRUNTIME/lua"] = true,
            [vim.fn.expand "$VIMRUNTIME/lua/vim/lsp"] = true,
					},
				},
			},
		},
	},
  tsserver = {},
  vimls = {},
}

local lsp_signature = require "lsp_signature"
lsp_signature.setup {
  bind = true,
  handler_opts = {
    border = "rounded",
  },
}

local function on_attach(client, bufnr)
  -- Enable completion triggered by <C-X><C-O>
  -- See `:help omnifunc` and `:help ins-completion` for more information.
  vim.api.nvim_buf_set_option(bufnr, "omnifunc", "v:lua.vim.lsp.omnifunc")

  -- Use LSP as the handler for formatexpr.
  -- See `:help formatexpr` for more information.
  vim.api.nvim_buf_set_option(0, "formatexpr", "v:lua.vim.lsp.formatexpr()")

  -- Configure key mappings
  require("config.lsp.keymaps").setup(client, bufnr)
end

local capabilities = require("cmp_nvim_lsp").default_capabilities(vim.lsp.protocol.make_client_capabilities())

local opts = {
  on_attach = on_attach,
	capabilities = capabilities,
  flags = {
    debounce_text_changes = 150,
  },
}

function M.setup()
  require("config.lsp.installer").setup(servers, opts)
end

return M


text:
import Ember from 'ember';
import MagicArrayMixin from '../mixins/magic-array';
import OcclusionCollectionMixin from '../mixins/occlusion-collection';
import layout from '../templates/components/vm-collection';

const {
  get: get,
  Component
  } = Ember;

export default Component.extend(MagicArrayMixin, OcclusionCollectionMixin, {

  layout: layout,

  //–––––––––––––– Required Settings

  /**!
   * This height is used to give the `OcclusionItem`s height prior to their content being rendered.
   * This height is replaced with the actual rendered height once content is rendered for the first time.
   *
   * If your content will always have the height specified by `defaultHeight`, you can improve performance
   * by specifying `alwaysUseDefaultHeight: true`.
   */
  defaultHeight: "75px",

  /**!
   * Cached value used once default height is
   * calculated firmly
   */
  _defaultHeight: null,

  //–––––––––––––– Optional Settings

  /**!
   * Set this if you need to dynamically change the height of the container
   * (useful for viewport resizing on mobile apps when the keyboard is open).
   *
   * Changes to this property's value are observed and trigger new view boundary
   * calculations.
   */
    // TODO how to deal with this horizontally vs vertically
  containerHeight: null,

  /**!
   * Defaults to `div`.
   *
   * If itemTagName is blank or null, the `vertical-collection` will [tag match](../addon/utils/get-tag-descendant.js)
   * with the `vertical-item`.
   */
  tagName: 'vertical-collection',

  /**!
   * Used if you want to explicitly set the tagName of `OcclusionItem`s
   */
  itemTagName: '',

  //–––––––––––––– Performance Tuning

  /**!
   * If true, dynamic height calculations are skipped and
   * `defaultHeight` is always used as the height of each
   * `OccludedView`.
   */
    // TODO alwaysUseDefaultWidth
  alwaysUseDefaultHeight: false,

  _getChildren: function() {
    var eachList = Ember.A(this._childViews[0]);
    var childViews = [];
    eachList.forEach(function(virtualView){
      childViews.push(virtualView._childViews[0]);
    });
    return childViews;
  },

  // on scroll, determine component states
  /**!
   *
   * The big question is can we render from the bottom
   * without the bottom most item being taken off screen?
   *
   * @returns {boolean}
   * @private
   */
    // TODO this is nearly in line with the mixin version
  _updateChildStates: function () {

    if (this.get('__isPrepending') || !this.get('shouldRenderList')) {
      return false;
    }

    var edges = this.get('_edges');
    var childComponents = this._getChildren();

    var currentViewportBound = edges.viewportTop + this.$().position().top;
    var currentUpperBound = edges.invisibleTop;

    if (currentUpperBound < currentViewportBound) {
      currentUpperBound = currentViewportBound;
    }

    var topComponentIndex = this._findFirstRenderedComponent(currentUpperBound, edges.viewportTop);
    var bottomComponentIndex = topComponentIndex;
    var lastIndex = get(childComponents, 'length') - 1;
    var topVisibleSpotted = false;

    while (bottomComponentIndex <= lastIndex) {

      var component = childComponents[bottomComponentIndex];

      var componentTop = component.$().position().top;
      var componentBottom = componentTop + component.get('_height');

      // end the loop if we've reached the end of components we care about
      if (componentTop > edges.invisibleBottom) { break; }

      //above the upper invisible boundary
      if (componentBottom < edges.invisibleTop) {
        component.cull();

        //above the upper reveal boundary
      } else if (componentBottom < edges.visibleTop) {
        component.hide();

        //above the upper screen boundary
      } else if (componentBottom < edges.viewportTop) {
        component.show();
        if (bottomComponentIndex === 0) {
          this.sendActionOnce('firstReached', {
            item: component.get('content.content'),
            index: bottomComponentIndex
          });
        }

        //above the lower screen boundary
      } else if(componentTop < edges.viewportBottom) {
        component.show();
        if (bottomComponentIndex === 0) {
          this.sendActionOnce('firstReached', {
            item: component.get('content.content'),
            index: bottomComponentIndex
          });
        }
        if (bottomComponentIndex === lastIndex) {
          this.sendActionOnce('lastReached', {
            item: component.get('content.content'),
            index: bottomComponentIndex
          });
        }

        if (!topVisibleSpotted) {
          topVisibleSpotted = true;
          this.set('_firstVisible', component);
          this.set('_firstVisibleIndex', bottomComponentIndex);
          this.sendActionOnce('firstVisibleChanged', {
            item: component.get('content.content'),
            index: bottomComponentIndex
          });
        }
        this.set('_lastVisible', component);
        this.sendActionOnce('lastVisibleChanged', {
          item: component.get('content.content'),
          index: bottomComponentIndex
        });

        //above the lower reveal boundary
      } else if (componentTop < edges.visibleBottom) {
        component.show();
        if (bottomComponentIndex === lastIndex) {
          this.sendActionOnce('lastReached', {
            item: component.get('content.content'),
            index: bottomComponentIndex
          });
        }

        //above the lower invisible boundary
      } else { // (componentTop <= edges.invisibleBottom) {
        component.hide();
      }

      bottomComponentIndex++;
    }

    var toCull = (childComponents.slice(0, topComponentIndex))
      .concat(childComponents.slice(bottomComponentIndex));

    //cull views
    toCull.forEach(function (v) { v.cull(); });

    //set scroll
    if (this.get('__isInitializingFromLast')) {
      this._taskrunner.schedule('afterRender', this, function () {
        var last = this.$().get(0).lastElementChild;
        this.set('__isInitializingFromLast', false);
        if (last) {
          last.scrollIntoView(false);
        }
      });
    }

  },

  //–––––––––––––– Setup/Teardown

  _reflectContentChanges: function() {

    var content = this.get('__content');
    var self = this;

    content.contentArrayDidChange = function handleArrayChange(items, offset, removeCount, addCount) {

      if (offset <= self.get('_firstVisibleIndex')) {
        self.__performViewPrepention(addCount);
      } else {
        self._taskrunner.schedule('render', self, self._updateChildStates);
      }

    };

  },

  init: function() {
    this._super();
    this._reflectContentChanges();
  }

});


text:
.class public Lcom/htc/view/ViewWrapper;
.super Ljava/lang/Object;
.source "ViewWrapper.java"

# direct methods
.method public constructor <init>()V
    .locals 0

    .prologue
    .line 5
    invoke-direct/range {p0 .. p0}, Ljava/lang/Object;-><init>()V

    return-void
.end method

.method public static getCornerRadius(Landroid/view/View;)I
    .locals 1
    .parameter "view"

    .prologue
    .line 84
    invoke-virtual {p0}, Landroid/view/View;->getCornerRadius()I

    move-result v0

    return v0
.end method

.method public static isBottomCornerRounded(Landroid/view/View;)Z
    .locals 1
    .parameter "view"

    .prologue
    .line 62
    invoke-virtual {p0}, Landroid/view/View;->isBottomCornerRounded()Z

    move-result v0

    return v0
.end method

.method public static isRoundedCornerEnabled(Landroid/view/View;)Z
    .locals 1
    .parameter "view"

    .prologue
    .line 36
    invoke-virtual {p0}, Landroid/view/View;->isRoundedCornerEnabled()Z

    move-result v0

    return v0
.end method

.method public static isTopCornerRounded(Landroid/view/View;)Z
    .locals 1
    .parameter "view"

    .prologue
    .line 49
    invoke-virtual {p0}, Landroid/view/View;->isTopCornerRounded()Z

    move-result v0

    return v0
.end method

.method public static setCornerAntiAliased(Landroid/view/View;Z)V
    .locals 0
    .parameter "view"
    .parameter "aa"

    .prologue
    .line 119
    invoke-virtual {p0, p1}, Landroid/view/View;->setCornerAntiAliased(Z)V

    .line 120
    return-void
.end method

.method public static setCornerRadius(Landroid/view/View;I)V
    .locals 0
    .parameter "view"
    .parameter "radius"

    .prologue
    .line 71
    invoke-virtual {p0, p1}, Landroid/view/View;->setCornerRadius(I)V

    .line 72
    return-void
.end method

.method public static setCornerStrokeColor(Landroid/view/View;I)V
    .locals 0
    .parameter "view"
    .parameter "color"

    .prologue
    .line 106
    invoke-virtual {p0, p1}, Landroid/view/View;->setCornerStrokeColor(I)V

    .line 107
    return-void
.end method

.method public static setCornerStrokeWidth(Landroid/view/View;I)V
    .locals 0
    .parameter "view"
    .parameter "width"

    .prologue
    .line 93
    invoke-virtual {p0, p1}, Landroid/view/View;->setCornerStrokeWidth(I)V

    .line 94
    return-void
.end method

.method public static setRoundedCornerEnabled(Landroid/view/View;Z)V
    .locals 0
    .parameter "view"
    .parameter "roundCorner"

    .prologue
    .line 13
    invoke-virtual {p0, p1}, Landroid/view/View;->setRoundedCornerEnabled(Z)V

    .line 14
    return-void
.end method

.method public static setRoundedCornerEnabled(Landroid/view/View;ZZ)V
    .locals 0
    .parameter "view"
    .parameter "topRoundCorners"
    .parameter "bottomRoundCorners"

    .prologue
    .line 23
    invoke-virtual {p0, p1, p2}, Landroid/view/View;->setRoundedCornerEnabled(ZZ)V

    .line 24
    return-void
.end method


text:
module Jetpants

  #--
  # Import, export, and data set methods #######################################
  #++

  class DB
    # Exports the DROP TABLE + CREATE TABLE statements for the given tables via mysqldump
    def export_schemata(tables)
      output 'Exporting table definitions'
      supply_root_pw = (Jetpants.mysql_root_password ? "-p#{Jetpants.mysql_root_password}" : '')
      supply_port = (@port == 3306 ? '' : "-h 127.0.0.1 -P #{@port}")
      cmd = "mysqldump #{supply_root_pw} #{supply_port} -d #{app_schema} " + tables.join(' ') + " >#{Jetpants.export_location}/create_tables_#{@port}.sql"
      cmd.untaint
      result = ssh_cmd(cmd)
      output result
    end

    # Executes a .sql file previously created via export_schemata.
    # Warning: this will DESTROY AND RECREATE any tables contained in the file.
    # DO NOT USE ON A DATABASE THAT CONTAINS REAL DATA!!! This method doesn't
    # check first! The statements will replicate to any slaves! PROCEED WITH
    # CAUTION IF RUNNING THIS MANUALLY!
    def import_schemata!
      output 'Dropping and re-creating table definitions'
      result = mysql_root_cmd "source #{Jetpants.export_location}/create_tables_#{@port}.sql", terminator: '', schema: true
      output result
    end

    # Has no built-in effect. Plugins can override this and/or use before_alter_schemata
    # and after_alter_schemata callbacks to provide an implementation.
    # Also sometimes useful to override this as a singleton method on specific DB objects
    # in a migration script.
    def alter_schemata
    end

    # Exports data for the supplied tables. If min/max ID supplied, only exports
    # data where at least one of the table's sharding keys falls within this range.
    # Creates a 'jetpants' db user with FILE permissions for the duration of the
    # export.
    def export_data(tables, min_id=false, max_id=false)
      pause_replication if @master && ! @repl_paused
      import_export_user = 'jetpants'
      create_user(import_export_user)
      grant_privileges(import_export_user)               # standard privs
      grant_privileges(import_export_user, '*', 'FILE')  # FILE global privs
      reconnect(user: import_export_user)
      @counts ||= {}
      tables.each {|t| @counts[t.name] = export_table_data t, min_id, max_id}
    ensure
      reconnect(user: app_credentials[:user])
      drop_user import_export_user
    end

    # Exports data for a table. Only includes the data subset that falls
    # within min_id and max_id. The export files will be located according
    # to the export_location configuration setting.
    # Returns the number of rows exported.
    def export_table_data(table, min_id=false, max_id=false)
      unless min_id && max_id && table.chunks > 0
        output "Exporting all data", table
        rows_exported = query(table.sql_export_all)
        output "#{rows_exported} rows exported", table
        return rows_exported
      end

      output "Exporting data for ID range #{min_id}..#{max_id}", table
      lock = Mutex.new
      rows_exported = 0
      chunks_completed = 0

      (min_id..max_id).in_chunks(table.chunks) do |min, max|
        attempts = 0
        begin
          sql = table.sql_export_range(min, max)
          result = query sql
          lock.synchronize do
            rows_exported += result
            chunks_completed += 1
            percent_finished = 100 * chunks_completed / table.chunks
            output("Export #{percent_finished}% complete.", table) if table.chunks >= 40 && chunks_completed % 20 == 0
          end
        rescue => ex
          if attempts >= 10
            output "EXPORT ERROR: #{ex.message}, chunk #{min}-#{max}, giving up", table
            raise
          end
          attempts += 1
          output "EXPORT ERROR: #{ex.message}, chunk #{min}-#{max}, attempt #{attempts}, re-trying after delay", table
          ssh_cmd("rm -f " + table.export_file_path(min, max))
          sleep(1.0 * attempts)
          retry
        end
      end
      output "#{rows_exported} rows exported", table
      rows_exported
    end

    # Imports data for a table that was previously exported using export_data.
    # Only includes the data subset that falls within min_id and max_id.  If
    # run after export_data (in the same process), import_data will
    # automatically confirm that the import counts match the previous export
    # counts.
    #
    # Creates a 'jetpants' db user with FILE permissions for the duration of the
    # import.
    #
    # Note: import will be substantially faster if you disable binary logging
    # before the import, and re-enable it after the import. You also must set
    # InnoDB's autoinc lock mode to 2 in order to do a chunked import with
    # auto-increment tables.  You can achieve all this by calling
    # DB#restart_mysql '--skip-log-bin', '--skip-log-slave-updates', '--innodb-autoinc-lock-mode=2'
    # prior to importing data, and then clear those settings by calling
    # DB#restart_mysql with no params after done importing data.
    def import_data(tables, min_id=false, max_id=false)
      disable_read_only!
      import_export_user = 'jetpants'
      create_user(import_export_user)
      grant_privileges(import_export_user)               # standard privs
      grant_privileges(import_export_user, '*', 'FILE')  # FILE global privs

      # Disable unique checks upon connecting. This has to be done at the :after_connect level in Sequel
      # to guarantee it's being run on every connection in the conn pool. This is mysql2-specific.
      disable_unique_checks_proc = Proc.new {|mysql2_client| mysql2_client.query 'SET unique_checks = 0'}

      reconnect(user: import_export_user, after_connect: disable_unique_checks_proc)

      import_counts = {}
      tables.each {|t| import_counts[t.name] = import_table_data t, min_id, max_id}

      # Verify counts
      @counts ||= {}
      @counts.each do |name, exported|
        if exported == import_counts[name]
          output "Verified import count matches export count for table #{name}"
        else
          raise "Import count (#{import_counts[name]}) does not match export count (#{exported}) for table #{name}"
        end
      end

    ensure
      reconnect(user: app_credentials[:user])
      drop_user(import_export_user)
    end

    # Imports the data subset previously dumped thorugh export_data.
    # Returns number of rows imported.
    def import_table_data(table, min_id=false, max_id=false)
      unless min_id && max_id && table.chunks > 0
        output "Importing all data", table
        rows_imported = query(table.sql_import_all)
        output "#{rows_imported} rows imported", table
        return rows_imported
      end

      output "Importing data for ID range #{min_id}..#{max_id}", table
      lock = Mutex.new
      rows_imported = 0
      chunks_completed = 0

      (min_id..max_id).in_chunks(table.chunks) do |min, max|
        attempts = 0
        begin
          sql = table.sql_import_range(min, max)
          result = query sql
          lock.synchronize do
            rows_imported += result
            chunks_completed += 1
            percent_finished = 100 * chunks_completed / table.chunks
            output("Import #{percent_finished}% complete.", table) if table.chunks >= 40 && chunks_completed % 20 == 0
            chunk_file_name = table.export_file_path(min, max)
            ssh_cmd "rm -f #{chunk_file_name}"
          end
        rescue => ex
          if attempts >= 10
            output "IMPORT ERROR: #{ex.message}, chunk #{min}-#{max}, giving up", table
            raise
          end
          attempts += 1
          output "IMPORT ERROR: #{ex.message}, chunk #{min}-#{max}, attempt #{attempts}, re-trying after delay", table
          sleep(3.0 * attempts)
          retry
        end
      end
      output "#{rows_imported} rows imported", table
      rows_imported
    end

    # Counts rows falling between min_id and max_id for the supplied tables.
    # Returns a hash mapping table names to counts.
    # Note: runs 10 concurrent queries to perform the count quickly. This is
    # MUCH faster than doing a single count, but far more I/O intensive, so
    # don't use this on a master or active slave.
    def row_counts(tables, min_id, max_id)
      lock = Mutex.new
      row_count = {}
      tables.each do |t|
        row_count[t.name] = 0
        (min_id..max_id).in_chunks(t.chunks, 10) do |min, max|
          result = query_return_first_value(t.sql_count_rows(min, max))
          lock.synchronize {row_count[t.name] += result}
        end
        output "#{row_count[t.name]} rows counted", t
      end
      row_count
    end

    # Cleans up all rows that should no longer be on this db.
    # Supply the ID range (in terms of the table's sharding key)
    # of rows to KEEP.
    def prune_data_to_range(tables, keep_min_id, keep_max_id)
      reconnect(user: app_credentials[:user])
      tables.each do |t|
        output "Cleaning up data, pruning to only keep range #{keep_min_id}-#{keep_max_id}", t
        rows_deleted = 0
        [:asc, :desc].each {|direction| rows_deleted += delete_table_data_outside_range(t, keep_min_id, keep_max_id, direction)}
        output "Done cleanup; #{rows_deleted} rows deleted", t
      end
    end

    # Helper method used by prune_data_to_range. Deletes data for the given table that falls
    # either below the supplied keep_min_id (if direction is :desc) or falls above the
    # supplied keep_max_id (if direction is :asc).
    def delete_table_data_outside_range(table, keep_min_id, keep_max_id, direction)
      rows_deleted = 0

      if direction == :asc
        dir_english = "Ascending"
        boundary = keep_max_id
        output "Removing rows with ID > #{boundary}", table
      elsif direction == :desc
        dir_english = "Descending"
        boundary = keep_min_id
        output "Removing rows with ID < #{boundary}", table
      else
        raise "Unknown order parameter #{order}"
      end

      table.sharding_keys.each do |col|
        deleter_sql = table.sql_cleanup_delete(col, keep_min_id, keep_max_id)

        id = boundary
        iter = 0
        while id do
          finder_sql = table.sql_cleanup_next_id(col, id, direction)
          id = query_return_first_value(finder_sql)
          break unless id
          rows_deleted += query(deleter_sql, id)

          # Slow down on multi-col sharding key tables, due to queries being far more expensive
          sleep(0.0001) if table.sharding_keys.size > 1

          iter += 1
          output("#{dir_english} deletion progress: through #{col} #{id}, deleted #{rows_deleted} rows so far", table) if iter % 50000 == 0
        end
      end
      rows_deleted
    end

    # Exports and re-imports data for the specified tables, optionally bounded by the
    # given range. Useful for defragmenting a node. Also useful for doing fast schema
    # alterations, if alter_schemata (or its callbacks) has been implemented.
    #
    # You can omit all params for a shard, in which case the method will use the list
    # of sharded tables in the Jetpants config file, and will use the shard's min and
    # max ID.
    def rebuild!(tables=false, min_id=false, max_id=false)
      raise "Cannot rebuild an active node" unless is_standby? || for_backups?

      p = pool
      if p.is_a?(Shard)
        tables ||= Table.from_config 'sharded_tables'
        min_id ||= p.min_id
        max_id ||= p.max_id if p.max_id != 'INFINITY'
      end
      raise "No tables supplied" unless tables && tables.count > 0

      disable_monitoring
      stop_query_killer
      restart_mysql '--skip-log-bin', '--skip-log-slave-updates', '--innodb-autoinc-lock-mode=2', '--skip-slave-start'

      # Automatically detect missing min/max. Assumes that all tables' primary keys
      # are on the same scale, so this may be non-ideal, but better than just erroring.
      unless min_id
        tables.each do |t|
          my_min = query_return_first_value "SELECT MIN(#{t.sharding_keys[0]}) FROM #{t.name}"
          min_id = my_min if !min_id || my_min < min_id
        end
      end
      unless max_id
        @found_max_ids = {} # we store the detected maxes in case DB#alter_schemata needs them later
        tables.each do |t|
          my_max = @found_max_ids[t.name] = query_return_first_value("SELECT MAX(#{t.sharding_keys[0]}) FROM #{t.name}")
          max_id = my_max if !max_id || my_max > max_id
        end
      end

      export_schemata tables
      export_data tables, min_id, max_id
      import_schemata!
      alter_schemata if respond_to? :alter_schemata
      import_data tables, min_id, max_id

      restart_mysql
      catch_up_to_master if is_slave?
      start_query_killer
      enable_monitoring
    end

    # Copies mysql db files from self to one or more additional DBs.
    # WARNING: temporarily shuts down mysql on self, and WILL OVERWRITE CONTENTS
    # OF MYSQL DIRECTORY ON TARGETS.  Confirms first that none of the targets
    # have over 100MB of data in the schema directory or in ibdata1.
    # MySQL is restarted on source and targets afterwards.
    def clone_to!(*targets)
      targets.flatten!
      raise "Cannot clone an instance onto its master" if master && targets.include?(master)
      destinations = {}
      targets.each do |t|
        destinations[t] = t.mysql_directory
        raise "Over 100 MB of existing MySQL data on target #{t}, aborting copy!" if t.data_set_size > 100000000
      end
      [self, targets].flatten.concurrent_each {|t| t.stop_query_killer; t.stop_mysql}
      targets.concurrent_each {|t| t.ssh_cmd "rm -rf #{t.mysql_directory}/ib_logfile*"}

      # Construct the list of files and dirs to copy. We include ib_lru_dump if present
      # (ie, if using Percona Server with innodb_buffer_pool_restore_at_startup enabled)
      # since this will greatly improve warm-up time of the cloned nodes
      files = ['ibdata1', 'mysql', 'test', app_schema]
      files << 'ib_lru_dump' if ssh_cmd("test -f #{mysql_directory}/ib_lru_dump 2>/dev/null; echo $?").chomp.to_i == 0

      fast_copy_chain(mysql_directory,
                      destinations,
                      port: 3306,
                      files: files,
                      overwrite: true)
      [self, targets].flatten.concurrent_each {|t| t.start_mysql; t.start_query_killer}
    end

  end
end


text:
'use strict';

module.exports = function (config) {
	config.set({
		basePath: '',
		frameworks: ['jasmine'],
		logLevel: config.LOG_INFO,
		browsers: ['PhantomJS'],
		autoWatch: true,
		reporters: ['dots', 'coverage'],
		files: [
			'components/angular/angular.js',
			'components/angular-mocks/angular-mocks.js',
			'components/moment/moment.js',
			'angular-moment.js',
			'tests.js'
		],
		preprocessors: {
			'components/moment/moment.js': 'coverage',
			'angular-moment.js': 'coverage'
		}
	});
};


text:
#include "config.h"
#include "genlib.h"
#include "stddefs.h"
#include "tfs.h"
#include "tfsprivate.h"
#include "ether.h"
#include "cli.h"
#include <ctype.h>

#if INCLUDE_TFSSCRIPT

/* Subroutine variables:
 * The definition of MAXGOSUBDEPTH (15) determines the maximum number
 * of subroutines that can be nested within any one script invocation.
 * ReturnToTellTbl[]
 *  Used by script runner to keep track of the location in the file that
 *  the subroutine is supposed to return to.
 * ReturnToDepth
 *  The current subroutine nesting depth of the script runner.
 */
#define MAXGOSUBDEPTH   15
static int  ReturnToDepth;
static long ReturnToTellTbl[MAXGOSUBDEPTH+1];
static int  CurrentScriptfdTbl[TFS_MAXOPEN+1];

/* ScriptIsRunning:
 * Non-zero if a script is active, else zero.
 */
static int  ScriptIsRunning;

/* ScriptGotoTag:
 * Points to the string that is the most recent target of
 * a goto or gosub command.
 */
static char *ScriptGotoTag;

/* ScriptExitFlag:
 * If non-zero, then the script must exit.
 * The 'exit' command sets this flag based on options provided to exit.
 */
int ScriptExitFlag;

/* ExecuteAfterNext:
 * If the ScriptExitFlag has the EXECUTE_AFTER_EXIT flag set, then the content
 * of this array is assumed to be the file that is to be executed
 * automatically after the exit of the current script.
 */
char    ExecuteAfterExit[TFSNAMESIZE+1];

/*****************************************************************************/

/* If:
 *  A simple test/action statement.
 *  Currently, the only action supported is "goto tag".
 *  Syntax:
 *      if ARG1 compar ARG2 {action} [else action]
 *      if -t TEST {action} [else action]
 */
char *IfHelp[] = {
    "Conditional branching",
    "-[t:v] [{arg1} {compar} {arg2}] {action} [else action]",
#if INCLUDE_VERBOSEHELP
    " Options:",
    " -t{test} see below",
    " -v       verbose mode (print TRUE or FALSE result)",
    " Notes:",
    " * Numerical/logical/string compare:",
    "   seq sec sne sin gt lt le ge eq ne and or xor",
    " * Action:",
    "   goto tag | gosub tag | exit | return",
    " * Other tests (-t args):",
    "   gc, ngc, iscmp {filename}",
#endif
    0,
};

int
If(int argc, char *argv[])
{
    int     opt, arg, true, if_else, offset, verbose;
    void (*iffunc)(char *), (*elsefunc)(char *);
    long    var1, var2;
    char    *testtype, *arg1, *arg2, *iftag, *elsetag;

    verbose = 0;
    testtype = 0;
    while((opt=getopt(argc,argv,"vt:")) != -1) {
        switch(opt) {
        case 'v':
            verbose = 1;
            break;
        case 't':
            testtype = optarg;
            break;
        default:
            return(CMD_PARAM_ERROR);
        }
    }

    elsetag = 0;
    elsefunc = 0;
    offset = true = if_else = 0;

    /* First see if there is an 'else' present... */
    for(arg=optind; arg<argc; arg++) {
        if(!strcmp(argv[arg],"else")) {
            if_else = 1;
            break;
        }
    }

    if(if_else) {
        elsetag = argv[argc-1];
        if(!strcmp(argv[argc-1],"exit")) {
            offset = 2;
            elsefunc = exitscript;
        } else if(!strcmp(argv[argc-1],"return")) {
            offset = 2;
            elsefunc = gosubret;
        } else if(!strcmp(argv[argc-2],"goto")) {
            offset = 3;
            elsefunc = gototag;
        } else if(!strcmp(argv[argc-2],"gosub")) {
            offset = 3;
            elsefunc = gosubtag;
        } else {
            return(CMD_PARAM_ERROR);
        }
    }

    iftag = argv[argc-offset-1];
    if(!strcmp(argv[argc-offset-1],"exit")) {
        iffunc = exitscript;
    } else if(!strcmp(argv[argc-offset-1],"return")) {
        iffunc = gosubret;
    } else if(!strcmp(argv[argc-offset-2],"goto")) {
        iffunc = gototag;
    } else if(!strcmp(argv[argc-offset-2],"gosub")) {
        iffunc = gosubtag;
    } else {
        return(CMD_PARAM_ERROR);
    }

    if(testtype) {
        if(!strcmp(testtype,"gc")) {
            if(gotachar()) {
                true=1;
            }
        } else if(!strcmp(testtype,"ngc")) {
            if(!gotachar()) {
                true=1;
            }
        } else {
            return(CMD_PARAM_ERROR);
        }
    } else {
        arg1 = argv[optind];
        testtype = argv[optind+1];
        arg2 = argv[optind+2];

        var1 = strtoul(arg1,(char **)0,0);
        var2 = strtoul(arg2,(char **)0,0);

        if(!strcmp(testtype,"gt")) {
            if(var1 > var2) {
                true = 1;
            }
        } else if(!strcmp(testtype,"lt")) {
            if(var1 < var2) {
                true = 1;
            }
        } else if(!strcmp(testtype,"le")) {
            if(var1 <= var2) {
                true = 1;
            }
        } else if(!strcmp(testtype,"ge")) {
            if(var1 >= var2) {
                true = 1;
            }
        } else if(!strcmp(testtype,"eq")) {
            if(var1 == var2) {
                true = 1;
            }
        } else if(!strcmp(testtype,"ne")) {
            if(var1 != var2) {
                true = 1;
            }
        } else if(!strcmp(testtype,"and")) {
            if(var1 & var2) {
                true = 1;
            }
        } else if(!strcmp(testtype,"xor")) {
            if(var1 ^ var2) {
                true = 1;
            }
        } else if(!strcmp(testtype,"or")) {
            if(var1 | var2) {
                true = 1;
            }
        } else if(!strcmp(testtype,"sec")) {
            if(!strcasecmp(arg1,arg2)) {
                true = 1;
            }
        } else if(!strcmp(testtype,"seq")) {
            if(!strcmp(arg1,arg2)) {
                true = 1;
            }
        } else if(!strcmp(testtype,"sin")) {
            if(strstr(arg2,arg1)) {
                true = 1;
            }
        } else if(!strcmp(testtype,"sne")) {
            if(strcmp(arg1,arg2)) {
                true = 1;
            }
        } else {
            return(CMD_PARAM_ERROR);
        }
    }

    /* If the true flag is set, call the 'if' function.
     * If the true flag is clear, and "else" was found on the command
     * line, then call the 'else' function...
     */
    if(true) {
        if(verbose) {
            printf("TRUE\n");
        }
        iffunc(iftag);
    } else {
        if(verbose) {
            printf("FALSE\n");
        }
        if(if_else) {
            elsefunc(elsetag);
        }
    }

    return(CMD_SUCCESS);
}

int
InAScript(void)
{
    if(ScriptIsRunning) {
        return(1);
    } else {
        printf("Invalid from outside a script\n");
        return(0);
    }
}

void
exitscript(char *ignored)
{
    if(InAScript()) {
        ScriptExitFlag = EXIT_SCRIPT;
    }
}

char *ExitHelp[] = {
    "Exit currently running script",
    "-[ae:r]",
#if INCLUDE_VERBOSEHELP
    "Options:",
    " -a       exit all scripts (if nested)",
    " -e {exe} automatically execute 'exe' after exit",
    " -r       remove script after exit",
#endif
    0,
};

int
Exit(int argc, char *argv[])
{
    int opt;
    ScriptExitFlag = EXIT_SCRIPT;

    while((opt=getopt(argc,argv,"ae:r")) != -1) {
        switch(opt) {
        case 'a':
            ScriptExitFlag |= EXIT_ALL_SCRIPTS;
            break;
        case 'e':
            if(strlen(optarg) >= sizeof(ExecuteAfterExit)) {
                return(CMD_PARAM_ERROR);
            }
            ScriptExitFlag |= EXECUTE_AFTER_EXIT;
            strcpy(ExecuteAfterExit,optarg);
            break;
        case 'r':
            ScriptExitFlag |= REMOVE_SCRIPT;
            break;
        }
    }
    return(CMD_SUCCESS);
}

char *GotoHelp[] = {
    "Branch to file tag",
    "{tagname}",
    0,
};

int
Goto(int argc, char *argv[])
{
    if(argc != 2) {
        return(CMD_PARAM_ERROR);
    }
    gototag(argv[1]);
    return(CMD_SUCCESS);
}

char *GosubHelp[] = {
    "Call a subroutine",
    "{tagname}",
    0,
};

int
Gosub(int argc, char *argv[])
{
    if(argc != 2) {
        return(CMD_PARAM_ERROR);
    }
    gosubtag(argv[1]);
    return(CMD_SUCCESS);
}

char *ReturnHelp[] = {
    "Return from subroutine",
    "",
    0,
};

int
Return(int argc, char *argv[])
{
    if(argc != 1) {
        return(CMD_PARAM_ERROR);
    }
    gosubret(0);
    return(CMD_SUCCESS);
}

/* Item:
 *  This is a simple replacement for the KSH "for" construct...
 *  It allows the user to build a list of strings and retrieve one at a time.
 *  Basically, the items can be thought of as a table.  The value of idx
 *  (starting with 1) is used to index into the list of items and place
 *  that item in the shell variable "var".
 *  Syntax:
 *      item {idx} {var} {item1} {item2} {item3} ....
 */
char *ItemHelp[] = {
    "Extract an item from a list",
    "{idx} {stor_var} [item1] [item2] ...",
#if INCLUDE_VERBOSEHELP
    "Note: idx=1 retrieves item1",
#endif
    0,
};

int
Item(int argc, char *argv[])
{
    int idx;
    char *varname;

    if(argc < 3) {
        return(CMD_PARAM_ERROR);
    }

    idx = atoi(argv[1]);
    varname = argv[2];

    if((idx < 1) || (idx > (argc-3))) {
        setenv(varname,0);
        return(CMD_SUCCESS);
    }

    idx += 2;
    setenv(varname,argv[idx]);
    return(CMD_SUCCESS);
}

/* Read():
 *  Simple interactive shell variable entry.
 *  Syntax:
 *  read [options] [var1] [var2] [...]
 *  Options:
 *      -twww   timeout after 'www' milliseconds (approximate) of
 *              waiting for input.
 *
 */

char *ReadHelp[] = {
    "Interactive shellvar entry",
#if INCLUDE_VERBOSEHELP
    "-[fnp:t:T:] [var1] [var2] ... ",
    " -f      flush console input",
    " -n      no echo during read",
    " -p ***  prefill string",
    " -t ###  msec timeout per char",
    " -T ###  msec timeout cumulative",
    "Notes:",
    "  This command waits for console input terminated by ENTER.",
    "  Input tokens are whitespace delimited.",
    "Examples:",
    " * read name                    # wait forever",
    "   If user responds with ENTER, shell var 'name' is cleared;",
    "   else it is loaded with the first input token.",
    " * read -t2000 name             # timeout after 2 seconds",
    "   If timeout, shell var 'name' is untouched; else if timeout",
    "   doesn't occur, but user only types ENTER 'var' is cleared;",
    "   else 'var' will contain token.",
#endif
    0,
};

int
Read(int argc,char *argv[])
{
    int     i, reached_eol, opt, waitfor, noecho;
    char    *prefill, buf[64], *space, *bp;

    prefill = 0;
    waitfor = noecho = 0;
    while((opt=getopt(argc,argv,"fnp:t:T:")) != -1) {
        switch(opt) {
        case 'f':
            flush_console_in();
            return(CMD_SUCCESS);
        case 'n':
            noecho = 1;
            break;
        case 'p':
            prefill = optarg;
            break;
        case 't':
            waitfor = strtol(optarg,(char **)0,0);
            break;
        case 'T':
            waitfor = strtol(optarg,(char **)0,0);
            waitfor = -waitfor;
            break;
        default:
            return(CMD_PARAM_ERROR);
        }
    }

#if INCLUDE_MONCMD
    /* Since this command blocks waiting for user input on the console,
     * check to see if we are running under the context of MONCMD, and,
     * if yes, return CMD_FAILURE to avoid a lockup...
     */
    if(IPMonCmdActive) {
        printf("Invalid under moncmd context.\n");
        return(CMD_FAILURE);
    }
#endif

    /* If -t, then restart the timeout for each character.
     * If -T, then the timeout accumulates over all characters.
     * If a timeout does occur, then do nothing to the shell variables
     * that may be specified as arguments.  This allows the script
     * writer to distinguish between a timeout, and an empty line...
     * Timeout has no affect, empty line will NULL out the variable.
     */
    if(getfullline(buf,sizeof(buf)-1,0,waitfor,prefill,noecho?0:1) == -1) {
        return(CMD_SUCCESS);
    }

    /* If there were no args after the option, then there is no need to
     * consider populating a shell variable, so just return here.
     */
    if(argc == optind) {
        return(CMD_SUCCESS);
    }

    bp = buf;
    reached_eol = 0;
    for(i=optind; i<argc; i++) {
        space=strpbrk(bp," \t");
        if(space) {
            *space = 0;
            setenv(argv[i],bp);
            bp = space+1;
        } else {
            if((reached_eol) || (*bp == 0)) {
                setenv(argv[i],0);
            } else {
                setenv(argv[i],bp);
                reached_eol = 1;
            }
        }
    }
    return(CMD_SUCCESS);
}

int
currentScriptfd(void)
{
    return(CurrentScriptfdTbl[ScriptIsRunning]);
}

/* gototag():
 *  Used with tfsscript to allow a command to adjust the pointer into the
 *  script that is currently being executed.  It simply populates the
 *  "ScriptGotoTag" pointer with the tag that should be branched to next.
 */
void
gototag(char *tag)
{
    if(InAScript()) {
        if(ScriptGotoTag) {
            free(ScriptGotoTag);
        }
        ScriptGotoTag = malloc(strlen(tag)+8);
        sprintf(ScriptGotoTag,"# %s",tag);
    }
}

/* gosubtag():
 *  Similar in basic use to gototag(), except that we keep a copy of the
 *  current position in the active script file so that it can be returned
 *  to later.
 */
void
gosubtag(char *tag)
{
    if(InAScript()) {
        if(ReturnToDepth >= MAXGOSUBDEPTH) {
            printf("Max return-to depth reached\n");
            return;
        }
        ReturnToTellTbl[ReturnToDepth++] = tfstell(currentScriptfd());
        gototag(tag);
    }
}

void
gosubret(char *ignored)
{
    int offset, err;

    if(InAScript()) {
        err = 0;

        if(ReturnToDepth <= 0) {
            printf("Nothing to return to\n");
            err = 1;
        } else {
            ReturnToDepth--;
            offset = tfsseek(currentScriptfd(),
                             ReturnToTellTbl[ReturnToDepth],TFS_BEGIN);
            if(offset <= 0) {
                err = 1;
                printf("return error: %s\n",tfserrmsg(offset));
            }
        }
        if(err) {
            printf("Possible gosub/return imbalance.\n");
        }
    }
}

/* tfsscript():
 *  Treat the file as a list of commands that should be executed
 *  as monitor commands.  Step through each line and execute it.
 *  The tfsDocommand() function pointer is used so that the application
 *  can assign a different command interpreter to the script capbilities
 *  of the monitor.  To really take advantage of this, the command interpreter
 *  that is reassigned, should allow monitor commands to run if the command
 *  does not exist in the application's command list.
 *
 *  Scripts can call other scripts that call other scripts (etc...) and
 *  that works fine because tfsscript() will just use more stack space but
 *  it eventually returns through the same function call tree.  A script can
 *  also call a COFF, ELF or AOUT file and expect it to return as long as
 *  the executable returns through the same point into which it was started
 *  (the entrypoint).  If the executable uses mon_appexit() to terminate,
 *  then the calling script will not regain control.
 */

int
tfsscript(TFILE *fp,int verbose)
{
    char    lcpy[CMDLINESIZE], *sv;
    int     tfd, lnsize, lno, verbosity, ignoreerror, cmdstat;

    tfd = tfsopen(fp->name,TFS_RDONLY,0);
    if(tfd < 0) {
        return(tfd);
    }

    lno = 0;

    /* If ScriptIsRunning is zero, then we know that this is the top-level
     * script, so we can initialize state here...
     */
    if(ScriptIsRunning == 0) {
        ReturnToDepth = 0;
    }

    CurrentScriptfdTbl[++ScriptIsRunning] = tfd;

    while(1) {
        lno++;
        lnsize = tfsgetline(tfd,lcpy,CMDLINESIZE);
        if(lnsize == 0) {   /* end of file? */
            break;
        }
        if(lnsize < 0) {
            printf("tfsscript(): %s\n",tfserrmsg(lnsize));
            break;
        }
        if((lcpy[0] == '\r') || (lcpy[0] == '\n')) { /* empty line? */
            continue;
        }

        lcpy[lnsize-1] = 0;         /* Remove the newline */

        /* Just in case the goto tag was set outside a script, */
        /* clear it now. */
        if(ScriptGotoTag) {
            free(ScriptGotoTag);
            ScriptGotoTag = (char *)0;
        }

        ScriptExitFlag = 0;

        /* Execute the command line.
         * If the shell variable "SCRIPTVERBOSE" is set, then enable
         * verbosity for this command; else use what was passed in
         * the parameter list of the function.  Note that the variable
         * is tested for each command so that verbosity can be enabled
         * or disabled within a script.
         * If the command returns a status that indicates that there was
         * some parameter error, then exit the script.
         */
        sv = getenv("SCRIPTVERBOSE");
        if(sv) {
            verbosity = atoi(sv);
        } else {
            verbosity = verbose;
        }

        if((lcpy[0] == '-') || (getenv("SCRIPT_IGNORE_ERROR"))) {
            ignoreerror = 1;
        } else {
            ignoreerror = 0;
        }

        if(verbosity) {
            printf("[%02d]: %s\n",lno,lcpy);
        }

        cmdstat = tfsDocommand(lcpy[0] == '-' ? lcpy+1 : lcpy, 0);

        if(cmdstat != CMD_SUCCESS) {
            setenv("CMDSTAT","FAIL");
            if(ignoreerror == 0) {
                printf("Terminating script '%s' at line %d\n",
                       TFS_NAME(fp),lno);
                ScriptExitFlag = EXIT_SCRIPT;
                break;
            }
        } else {
            setenv("CMDSTAT","PASS");
        }

        /* Check for exit flag.  If set, then in addition to terminating the
         * script, clear the return depth here so that the "missing return"
         * warning  is not printed.  This is done because there is likely
         * to be a subroutine with an exit in it and this should not
         * cause a warning.
         */
        if(ScriptExitFlag) {
            ReturnToDepth = 0;
            break;
        }

        /* If ScriptGotoTag is set, then attempt to reposition the line
         * pointer to the line that contains the tag.
         */
        if(ScriptGotoTag) {
            int     tlen;

            tlen = strlen(ScriptGotoTag);
            lno = 0;
            tfsseek(tfd,0,TFS_BEGIN);
            while(1) {
                lnsize = tfsgetline(tfd,lcpy,CMDLINESIZE);
                if(lnsize == 0) {
                    printf("Tag '%s' not found\n",ScriptGotoTag+2);
                    free(ScriptGotoTag);
                    ScriptGotoTag = (char *)0;
                    tfsclose(tfd,0);
                    return(TFS_OKAY);
                }
                lno++;
                if(!strncmp(lcpy,ScriptGotoTag,tlen) &&
                        (isspace(lcpy[tlen]) || (lcpy[tlen] == ':'))) {
                    free(ScriptGotoTag);
                    ScriptGotoTag = (char *)0;
                    break;
                }
            }
        }
        /* After each line, poll ethernet interface. */
        pollethernet();
    }
    tfsclose(tfd,0);
    if(ScriptExitFlag & REMOVE_SCRIPT) {
        tfsunlink(fp->name);
    }
    if(ScriptIsRunning > 0) {
        ScriptIsRunning--;
        if((ScriptIsRunning == 0) && (ReturnToDepth != 0)) {
            printf("Error: script is done, but return-to-depth != 0\n");
            printf("(possible gosub/return imbalance)\n");
        }
    } else  {
        printf("Script run-depth error\n");
    }

    /* If the EXECUTE_AFTER_EXIT flag is set (by exit -e), then automatically
     * start up the file specified in ExecuteAfterExit[]...
     */
    if(ScriptExitFlag & EXECUTE_AFTER_EXIT) {
        char    *argv[2];

        argv[0] = ExecuteAfterExit;
        argv[1] = 0;
        ScriptExitFlag = 0;
        tfsrun(argv,0);
    }

    /* Upon completion of a script, clear the ScriptExitFlag variable so
     * that it is not accidentally applied to another script that may have
     * called this script.
     */
    if((ScriptExitFlag & EXIT_ALL_SCRIPTS) != EXIT_ALL_SCRIPTS) {
        ScriptExitFlag = 0;
    }
    return(TFS_OKAY);
}

/* tfsscriptname():
 * Return the currently running script name; else return an empty string.
 */
char *
tfsscriptname(void)
{
    struct  tfsdat *slot;

    if(ScriptIsRunning) {
        slot = &tfsSlots[CurrentScriptfdTbl[ScriptIsRunning]];
        if(slot->offset != (ulong)-1) {
            return(slot->hdr.name);
        }
    }
    return("");
}

#else   /* INCLUDE_TFSSCRIPT */

int
tfsscript(TFILE *fp,int verbose)
{
    return(TFSERR_NOTAVAILABLE);
}

char *
tfsscriptname(void)
{
    return(0);
}

#endif


text:
namespace heads {

  // heads::syntactic() returns the static syntactic_data object.
  // This function exists to avoid the static initialization bug.
  //
  const syntactic_data& syntactic() {
    static syntactic_data data;
    return data;
  }  // heads::syntactic_heads()

  // heads::semantic() returns the static semantic_data object.
  // This function exists to avoid the static initialization bug.
  //
  const semantic_data& semantic() {
    static semantic_data data;
    return data;
  }  // heads::semantic_heads()

  //! initializer for syntactic_data{}
  //
  syntactic_data::syntactic_data()
    : adjective(2), conjunction(1), interjection(1),
      noun(8), preposition(5), unknown(0), verb(4)
  {
    adjective[0].set("CARD ORD ADJA ADJD ADV PAV PROAV");
    adjective[1].set("AA AP AVP");
    conjunction[0].set("KOUI KOUS KON KOKOM");
    interjection[0].set("ITJ");
    noun[0].set("ART");
    noun[1].set("CARD ORD FM");
    noun[2].set("NN NE");
    noun[3].set("PDS PDAT PIS PIAT PIDAT PPER PPOSS PPOSAT");
    noun[4].set("PRELS PRELAT PRF");
    noun[5].set("PWS PWAT PWAV");
    noun[6].set("XY SGML SPELL TRUNC --");
    noun[7].set("NP");
    preposition[0].set("APPR APPRART");
    preposition[1].set("APPO");
    preposition[2].set("APZR");
    preposition[3].set("PTKZU PTKNEG PTKVZ PTKANT PTKA");
    preposition[4].set("PP");
    verb[0].set("VAFIN VAIMP VAINF VAPP VMFIN VMINF VMPP");
    verb[1].set("VVFIN VVIMP VVINF VVIZU VVPP");
    verb[2].set("VP");
    verb[3].set("S S1 VZ");

    head_type[symbol("--")] = &noun;
    head_type[symbol("AA")] = &adjective;
    head_type[symbol("AP")] = &adjective;
    head_type[symbol("AVP")] = &adjective;
    head_type[symbol("CAC")] = &conjunction;
    head_type[symbol("CAP")] = &conjunction;
    head_type[symbol("CAVP")] = &conjunction;
    head_type[symbol("CCP")] = &conjunction;
    head_type[symbol("CH")] = &verb;
    head_type[symbol("CNP")] = &conjunction;
    head_type[symbol("CO")] = &conjunction;
    head_type[symbol("CPP")] = &conjunction;
    head_type[symbol("CS")] = &conjunction;
    head_type[symbol("CVP")] = &conjunction;
    head_type[symbol("CVZ")] = &conjunction;
    head_type[symbol("DL")] = &unknown;
    head_type[symbol("ISU")] = &unknown;
    head_type[symbol("MPN")] = &noun;
    head_type[symbol("MTA")] = &adjective;
    head_type[symbol("NM")] = &noun;
    head_type[symbol("NP")] = &noun;
    head_type[symbol("PP")] = &preposition;
    head_type[symbol("QL")] = &noun;
    head_type[symbol("S")] = &verb;
    head_type[symbol("S1")] = &verb;
    head_type[symbol("VP")] = &verb;
    head_type[symbol("VZ")] = &verb;

  }  // heads::syntactic_data::syntactic_data()

  //! initializer for semantic_data
  //
  semantic_data::semantic_data()
    : adjective(2), conjunction(1), interjection(1),
      noun(8), preposition(5), unknown(0), verb(4)
  {
    adjective[0].set("CARD ORD ADJA ADJD ADV PAV PROAV");
    adjective[1].set("AA AP AVP");
    conjunction[0].set("KOUI KOUS KON KOKOM");
    interjection[0].set("ITJ");
    noun[0].set("ART");
    noun[1].set("CARD ORD FM");
    noun[2].set("NN NE");
    noun[3].set("PDS PDAT PIS PIAT PIDAT PPER PPOSS PPOSAT");
    noun[4].set("PRELS PRELAT PRF");
    noun[5].set("PWS PWAT PWAV");
    noun[6].set("XY SGML SPELL TRUNC --");
    noun[7].set("NP");
    preposition[0].set("APPR APPRART");
    preposition[1].set("APPO");
    preposition[2].set("APZR");
    preposition[3].set("PTKZU PTKNEG PTKVZ PTKANT PTKA");
    preposition[4].set("PP");
    verb[0].set("VAFIN VAIMP VAINF VAPP VMFIN VMINF VMPP");
    verb[1].set("VVFIN VVIMP VVINF VVIZU VVPP");
    verb[2].set("VP");
    verb[3].set("S S1 VZ");

    head_type[symbol("--")] = &noun;
    head_type[symbol("AA")] = &adjective;
    head_type[symbol("AP")] = &adjective;
    head_type[symbol("AVP")] = &adjective;
    head_type[symbol("CAC")] = &conjunction;
    head_type[symbol("CAP")] = &conjunction;
    head_type[symbol("CAVP")] = &conjunction;
    head_type[symbol("CCP")] = &conjunction;
    head_type[symbol("CH")] = &verb;
    head_type[symbol("CNP")] = &conjunction;
    head_type[symbol("CO")] = &conjunction;
    head_type[symbol("CPP")] = &conjunction;
    head_type[symbol("CS")] = &conjunction;
    head_type[symbol("CVP")] = &conjunction;
    head_type[symbol("CVZ")] = &conjunction;
    head_type[symbol("DL")] = &unknown;
    head_type[symbol("ISU")] = &unknown;
    head_type[symbol("MPN")] = &noun;
    head_type[symbol("MTA")] = &adjective;
    head_type[symbol("NM")] = &noun;
    head_type[symbol("NP")] = &noun;
    head_type[symbol("PP")] = &preposition;
    head_type[symbol("QL")] = &noun;
    head_type[symbol("S")] = &verb;
    head_type[symbol("S1")] = &verb;
    head_type[symbol("VP")] = &verb;
    head_type[symbol("VZ")] = &verb;

  }  // heads::semantic_data::semantic_data()

}  // namespace heads


text:
<?php

/**
 * 入金消し込みを行う。
 *
 * @package VizualizerTrade
 * @author Naohisa Minagawa <info@vizualizer.jp>
 */
class VizualizerTrade_Module_Payment_Reconcile extends Vizualizer_Plugin_Module_Save
{

    function execute($params)
    {
        $post = Vizualizer::request();
        if ($post["reconcile"]) {
            // トランザクションの開始
            $connection = Vizualizer_Database_Factory::begin("trade");

            try {
                // 取引データを取得し、保存する。
                $loader = new Vizualizer_Plugin("Trade");
                $reconcile = $loader->loadModel("Reconcile");
                $bill = $loader->loadModel("Bill");
                $bill->findByPrimaryKey($post["bill_id"]);
                $payment = $loader->loadModel("Payment");
                $payment->findByPrimaryKey($post["payment_id"]);
                $reconcile->reconcile($bill, $payment);

                // エラーが無かった場合、処理をコミットする。
                Vizualizer_Database_Factory::commit($connection);

            } catch (Exception $e) {
                Vizualizer_Database_Factory::rollback($connection);
                throw new Vizualizer_Exception_Database($e);
            }
        }
    }
}


text:
require 'talkable/api/base'

Dir[File.dirname(__FILE__) + '/api/*.rb'].each { |file| require file }

module Talkable
  module API
    VERSION = "v2".freeze
    class BadRequest < StandardError
    end
    class NetworkError < StandardError
    end
  end
end