text:
{% extends "vault/base.html" %}
{% load i18n static %}

{% block title %}{% trans 'Delete Project' %}{% endblock %}
{% block content_title %}{% trans 'Delete Project' %}{% endblock %}

{% block css %}
  <link rel="stylesheet" type="text/css" href="{% static 'identity/css/project.css' %}" />
{% endblock %}

{% block content %}

{% trans 'Warning!' %}

    {% blocktrans %}All objects will be deleted. This action is irreversible!{% endblocktrans %}

  <form action="" class="form-box project-form" method="POST">
    <input type='hidden' name='csrfmiddlewaretoken' value='{{ csrf_token }}' />
    {{ form.id }}

    <fieldset class="content">

            {{ form.user.label_tag }}
            {{ form.user }}
            {{ form.user.errors }}

            {{ form.password.label_tag }}
            {{ form.password }}
            {{ form.password.errors }}

    </fieldset>

    <fieldset class="base">

        <button class="btn btn-danger" type="submit">{% trans 'Delete Project' %}</button>

    </fieldset>
  </form>
{% endblock %}
{% block js_bottom %}
{{ block.super }}

{% endblock %}


text:
Aggregate - Returns multiple records

--SKIPIF--
<?php include('skip_zts.inc'); ?>
--FILE--
<?php
include dirname(__FILE__)."/../../astestframework/astest-phpt-loader.inc";
aerospike_phpt_runtest("Aggregate", "testAggregateReturnMultipleRecords");
--EXPECT--
OK

redpajama_set_name: RedPajamaGithub


text:
package command

import (
	"os"
	"testing"

	"github.com/JeffChien/kvctl/lib"
	"github.com/JeffChien/kvctl/lib/storage"
	"github.com/JeffChien/kvctl/lib/storage/etcd"
	"github.com/docker/libkv/store"
	"github.com/stretchr/testify/assert"
	"github.com/stretchr/testify/suite"
)

type RmSuite struct {
	suite.Suite
	kv store.Store
}

func (m *RmSuite) SetupTest() {
	var err error
	m.kv.Put("testroot", nil, &store.WriteOptions{IsDir: true})
	assert.NoError(m.T(), err)
	err = m.kv.Put("testroot/validKey", []byte("hello world"), nil)
	assert.NoError(m.T(), err)
	m.kv.Put("testroot/adir", nil, &store.WriteOptions{IsDir: true})
	assert.NoError(m.T(), err)
}

func (m *RmSuite) TearDownTest() {
	var err error
	err = m.kv.DeleteTree("testroot")
	assert.NoError(m.T(), err)
}

func (m *RmSuite) TestRmKey() {
	var err error
	cmd, _ := m.kv.(lib.Command)
	err = cmd.Rm("testroot/validKey", false)
	assert.NoError(m.T(), err)
}

func (m *RmSuite) TestRmDirWithoutRecursive() {
	var err error
	cmd, _ := m.kv.(lib.Command)
	err = cmd.Rm("testroot/adir", false)
	switch m.kv.(type) {
	case *etcd.EtcdStorage:
		assert.Error(m.T(), err)
	default:
		assert.NoError(m.T(), err)
	}
}

func (m *RmSuite) TestRmDirWithRecursive() {
	var err error
	cmd, _ := m.kv.(lib.Command)
	err = cmd.Rm("testroot/adir", true)
	assert.NoError(m.T(), err)
}

func (m *RmSuite) TestRmRootRecursive() {
	var err error
	cmd, _ := m.kv.(lib.Command)
	err = cmd.Rm("", true)
	assert.NoError(m.T(), err)
	err = m.kv.Put("testroot", nil, &store.WriteOptions{IsDir: true})
	assert.NoError(m.T(), err)
}

func TestRunRmSuite(t *testing.T) {
	var err error
	var url string
	if url = os.Getenv("KVCTL_BACKEND"); url == "" {
		url = "consul://127.0.0.1:8500"
	}
	s := new(RmSuite)
	s.kv, err = storage.New(url)
	assert.NoError(t, err)
	suite.Run(t, s)
}


text:
{{site.name}}

                <md-button class="md-accent md-raised" ng-click="goToDashboard()"></md-button>
                <md-button class="md-accent md-raised" ng-click="goToEdit()"></md-button>

                                    Id

                                    {{anomaly.id}}
                                    {{anomaly.area}}

                                        {{tag}}


text:
/*global $*/
var chart = $(".example-container svg");
$(window).on("resize", function() {
    var targetWidth = chart.parent().width();
    chart.each(function(e){
        this.attr("width", targetWidth);
        this.attr("height", targetWidth / chart.data('aspect'));
    });
});


text:
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:card_view="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_height="match_parent"
    android:layout_width="match_parent">

    <android.support.v7.widget.CardView
        android:id="@+id/cvRestaurant"
        android:layout_width="match_parent"
        android:layout_height="wrap_content">

        <TextView
            android:id="@+id/restaurantName"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_weight="0"
            android:textAppearance="?android:attr/textAppearanceLarge"
            tools:text="Name" />

    </android.support.v7.widget.CardView>

</LinearLayout>


text:
</html>
<script src="<?=base_url();?>static/js/vendor/jquery.min.js"></script>


text:
namespace LoginNavigationExample
{
	public class Constants
	{
		#region Live Auth Settings

		public static string AppId = "XXXXXXXXXXXXXXXXX";
		public static string AppSecretId = "XXXXXXXXXXXXXXXXXXXXX";
		public static string ExtendedPermissions = "wl.basic"; // help: https://msdn.microsoft.com/en-us/library/office/dn631845.aspx
		public static string AuthorizeUrl = "https://login.live.com/oauth20_authorize.srf";
		public static string RedirectUrl = "https://login.live.com/oauth20_desktop.srf";
		public static string TokenUrl = "https://login.live.com/oauth20_token.srf";

		#endregion
	}
}


text:
<rsc-about>

1 Lorem Ipsum is simply dummy text of the printing

1 Lorem Ipsum is simply dummy text of the printing

2 Lorem Ipsum is simply dummy text of the printing

2 Lorem Ipsum is simply dummy text of the printing

</rsc-about>


text:
EAPI Evas_Object *e_layout_add               (Evas *evas);
EAPI int          e_layout_freeze            (Evas_Object *obj);
EAPI int          e_layout_thaw              (Evas_Object *obj);
EAPI void         e_layout_virtual_size_set  (Evas_Object *obj, Evas_Coord w, Evas_Coord h);
EAPI void         e_layout_virtual_size_get  (Evas_Object *obj, Evas_Coord *w, Evas_Coord *h);

EAPI void e_layout_coord_canvas_to_virtual (Evas_Object *obj, Evas_Coord cx, Evas_Coord cy, Evas_Coord *vx, Evas_Coord *vy);
EAPI void e_layout_coord_virtual_to_canvas (Evas_Object *obj, Evas_Coord vx, Evas_Coord vy, Evas_Coord *cx, Evas_Coord *cy);

EAPI void         e_layout_pack              (Evas_Object *obj, Evas_Object *child);
EAPI void         e_layout_child_move        (Evas_Object *obj, Evas_Coord x, Evas_Coord y);
EAPI void         e_layout_child_resize      (Evas_Object *obj, Evas_Coord w, Evas_Coord h);
EAPI void         e_layout_child_raise       (Evas_Object *obj);
EAPI void         e_layout_child_lower       (Evas_Object *obj);
EAPI void         e_layout_child_raise_above (Evas_Object *obj, Evas_Object *above);
EAPI void         e_layout_child_lower_below (Evas_Object *obj, Evas_Object *below);
EAPI void         e_layout_child_geometry_get(Evas_Object *obj, Evas_Coord *x, Evas_Coord *y, Evas_Coord *w, Evas_Coord *h);
EAPI void         e_layout_unpack            (Evas_Object *obj);

#endif
#endif


text:
<?php

final class PhabricatorSettingsPanelAccount
  extends PhabricatorSettingsPanel {

  public function getPanelKey() {
    return 'account';
  }

  public function getPanelName() {
    return pht('Account');
  }

  public function getPanelGroup() {
    return pht('Account Information');
  }

  public function processRequest(AphrontRequest $request) {
    $user = $request->getUser();
    $errors = array();
    if ($request->isFormPost()) {
      $new_timezone = $request->getStr('timezone');
      if (in_array($new_timezone, DateTimeZone::listIdentifiers(), true)) {
        $user->setTimezoneIdentifier($new_timezone);
      } else {
        $errors[] = pht('The selected timezone is not a valid timezone.');
      }

      $sex = $request->getStr('sex');
      $sexes = array(PhutilPerson::SEX_MALE, PhutilPerson::SEX_FEMALE);
      if (in_array($sex, $sexes)) {
        $user->setSex($sex);
      } else {
        $user->setSex(null);
      }

      // Checked in runtime.
      $user->setTranslation($request->getStr('translation'));

      if (!$errors) {
        $user->save();
        return id(new AphrontRedirectResponse())
          ->setURI($this->getPanelURI('?saved=true'));
      }
    }

    $notice = null;
    if (!$errors) {
      if ($request->getStr('saved')) {
        $notice = new AphrontErrorView();
        $notice->setSeverity(AphrontErrorView::SEVERITY_NOTICE);
        $notice->setTitle(pht('Changes Saved'));
        $notice->appendChild(
          phutil_tag('p', array(), pht('Your changes have been saved.')));
        $notice = $notice->render();
      }
    } else {
      $notice = new AphrontErrorView();
      $notice->setErrors($errors);
    }

    $timezone_ids = DateTimeZone::listIdentifiers();
    $timezone_id_map = array_fuse($timezone_ids);

    $sexes = array(
      PhutilPerson::SEX_UNKNOWN => pht('Unspecified'),
      PhutilPerson::SEX_MALE => pht('Male'),
      PhutilPerson::SEX_FEMALE => pht('Female'),
    );

    $translations = array();
    $symbols = id(new PhutilSymbolLoader())
      ->setType('class')
      ->setAncestorClass('PhabricatorTranslation')
      ->setConcreteOnly(true)
      ->selectAndLoadSymbols();
    foreach ($symbols as $symbol) {
      $class = $symbol['name'];
      $translations[$class] = newv($class, array())->getName();
    }
    asort($translations);
    $default = PhabricatorEnv::newObjectFromConfig('translation.provider');
    $translations = array(
      '' => pht('Server Default (%s)', $default->getName()),
    ) + $translations;

    $form = new AphrontFormView();
    $form
      ->setUser($user)
      ->setFlexible(true)
      ->appendChild(
        id(new AphrontFormSelectControl())
          ->setLabel(pht('Timezone'))
          ->setName('timezone')
          ->setOptions($timezone_id_map)
          ->setValue($user->getTimezoneIdentifier()))
      ->appendChild(
        id(new AphrontFormSelectControl())
          ->setOptions($sexes)
          ->setLabel(pht('Sex'))
          ->setName('sex')
          ->setValue($user->getSex()))
      ->appendChild(
        id(new AphrontFormSelectControl())
          ->setOptions($translations)
          ->setLabel(pht('Translation'))
          ->setName('translation')
          ->setValue($user->getTranslation()))
      ->appendChild(
        id(new AphrontFormSubmitControl())
          ->setValue(pht('Save Account Settings')));

    $header = new PhabricatorHeaderView();
    $header->setHeader(pht('Account Settings'));

    return array(
      $notice,
      $header,
      $form,
    );
  }
}


text:
<?php
/* SVN FILE: $Id: Sass.php 64 2010-04-16 13:23:14Z chris.l.yates $ */
/**
 * Sass class file.
 * Parses {@link Sass http://sass-lang.com/} files.
 * Please see the {@link Sass documentation http://sass-lang.com/docs} for
 * details of Sass.
 *
 * @author			Chris Yates <chris.l.yates@gmail.com>
 * @copyright		Copyright © 2010 PBM Web Development
 * @license			http://phamlp.googlecode.com/files/license.txt
 * @package			PHamlP
 * @subpackage	Yii
 */

 // Do NOT use Yii::import. Doing so causes conflict with HamlSassFilter
require_once(Yii::getPathOfAlias('ext.phamlp.vendors.phamlp.sass').DIRECTORY_SEPARATOR.'SassParser.php');

/**
 * Sass class
 * @package			PHamlP
 * @subpackage	Yii
 */
class Sass {
	/**
	 * @var SassParser
	 */
	private $sass;

	/**
	 * Constructor
	 * @param array Sass options
	 * @return Sass
	 */
	public function __construct($options) {
	  $this->sass = new SassParser($options);
	}

	/**
	 * Parse a Sass file to CSS
	 * @param string path to file
	 * @return string CSS
	 */
	public function parse($file) {
	  return $this->sass->toCss($file);
	}
}


text:
/**
 * Created by david on 2/18/17.
 */

// import
import React from 'react';
import { Text, View } from 'react-native';

// make component
const Header = (props) => {
  const {textStyle, viewStyle} = styles;

  return (
    <View style={viewStyle}>
      <Text style={textStyle}>{props.headerText}</Text>
    </View>
  );
};

const styles = {
  viewStyle: {
    backgroundColor: '#fffbf7',
    justifyContent: 'center',
    alignItems: 'center',
    height: 60,
    paddingTop: 15,
    shadowColor: '#000',
    shadowOffset: {width: 0, height: 2},
    shadowOpacity: 0.5,
    elevation: 5,
    position: 'relative'
  },
  textStyle: {
    fontSize: 20,

  }
};

// make available for index file
export { Header };


text:
<!DOCTYPE html>
<html>

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <title>Your Application Title</title>

  <link rel="stylesheet" href="css/vendor.css">
  <link rel="stylesheet" href="css/app.css">
</head>

<body>
  <script src="js/vendor.js"></script>
  <script src="js/app.js"></script>
</body>

</html>


text:
const noop = function () {};

exports.make_event_store = (selector) => {
    /*

       This function returns an event_store object that
       simulates the behavior of .on and .off from jQuery.

       It also has methods to retrieve handlers that have
       been set via .on (or similar methods), which can
       be useful for tests that want to test the actual
       handlers.

    */
    const on_functions = new Map();
    const child_on_functions = new Map();

    function generic_event(event_name, arg) {
        if (typeof arg === 'function') {
            on_functions.set(event_name, arg);
        } else {
            const handler = on_functions.get(event_name);
            if (!handler) {
                const error = 'Cannot find ' + event_name + ' handler for ' + selector;
                throw Error(error);
            }
            handler(arg);
        }
    }

    const self = {
        generic_event: generic_event,

        get_on_handler: function (name, child_selector) {
            let handler;

            if (child_selector === undefined) {
                handler = on_functions.get(name);
                if (!handler) {
                    throw Error('no ' + name + ' handler for ' + selector);
                }
                return handler;
            }

            const child_on = child_on_functions.get(child_selector);
            if (child_on) {
                handler = child_on.get(name);
            }

            if (!handler) {
                throw Error('no ' + name + ' handler for ' + selector + ' ' + child_selector);
            }

            return handler;
        },

        off: function (event_name, ...args) {
            if (args.length === 0) {
                on_functions.delete(event_name);
                return;
            }

            // In the Zulip codebase we never use this form of
            // .off in code that we test: $(...).off('click', child_sel);
            //
            // So we don't support this for now.
            throw Error('zjquery does not support this call sequence');
        },

        on: function (event_name, ...args) {
            // parameters will either be
            //    (event_name, handler) or
            //    (event_name, sel, handler)
            if (args.length === 1) {
                const [handler] = args;
                if (on_functions.has(event_name)) {
                    console.info('\nEither the app or the test can be at fault here..');
                    console.info('(sometimes you just want to call $.clear_all_elements();)\n');
                    throw Error('dup ' + event_name + ' handler for ' + selector);
                }

                on_functions.set(event_name, handler);
                return;
            }

            if (args.length !== 2) {
                throw Error('wrong number of arguments passed in');
            }

            const [sel, handler] = args;
            assert.equal(typeof sel, 'string', 'String selectors expected here.');
            assert.equal(typeof handler, 'function', 'An handler function expected here.');

            if (!child_on_functions.has(sel)) {
                child_on_functions.set(sel, new Map());
            }

            const child_on = child_on_functions.get(sel);

            if (child_on.has(event_name)) {
                throw Error('dup ' + event_name + ' handler for ' + selector + ' ' + sel);
            }

            child_on.set(event_name, handler);
        },

        trigger: function (ev) {
            const ev_name = typeof ev === 'string' ? ev : ev.name;
            const func = on_functions.get(ev_name);

            if (!func) {
                // It's possible that test code will trigger events
                // that haven't been set up yet, but we are trying to
                // eventually deprecate trigger in our codebase, so for
                // now we just let calls to trigger silently do nothing.
                // (And I think actual jQuery would do the same thing.)
                return;
            }

            func(ev.data);
        },
    };

    return self;
};

exports.make_new_elem = function (selector, opts) {
    let html = 'never-been-set';
    let text = 'never-been-set';
    let value;
    let css;
    let shown = false;
    let focused = false;
    const find_results = new Map();
    let my_parent;
    const parents_result = new Map();
    const properties = new Map();
    const attrs = new Map();
    const classes = new Map();
    const event_store = exports.make_event_store(selector);

    const self = {
        addClass: function (class_name) {
            classes.set(class_name, true);
            return self;
        },
        append: function (arg) {
            html = html + arg;
            return self;
        },
        attr: function (name, val) {
            if (val === undefined) {
                return attrs.get(name);
            }
            attrs.set(name, val);
            return self;
        },
        blur: function () {
            focused = false;
            return self;
        },
        click: function (arg) {
            event_store.generic_event('click', arg);
            return self;
        },
        data: function (name, val) {
            if (val === undefined) {
                const data_val = attrs.get('data-' + name);
                if (data_val === undefined) {
                    return;
                }
                return data_val;
            }
            attrs.set('data-' + name, val);
            return self;
        },
        delay: function () {
            return self;
        },
        debug: function () {
            return {
                value: value,
                shown: shown,
                selector: selector,
            };
        },
        empty: function (arg) {
            if (arg === undefined) {
                find_results.clear();
            }
            return self;
        },
        eq: function () {
            return self;
        },
        expectOne: function () {
            // silently do nothing
            return self;
        },
        fadeTo: noop,
        find: function (child_selector) {
            const child = find_results.get(child_selector);
            if (child) {
                return child;
            }
            if (child === false) {
                // This is deliberately set to simulate missing find results.
                // Return an empty array, the most common check is
                // if ($.find().length) { //success }
                return [];
            }
            if (opts.silent) {
                return self;
            }
            throw Error("Cannot find " + child_selector + " in " + selector);
        },
        focus: function () {
            focused = true;
            return self;
        },
        focusin: function () {
            focused = true;
            return self;
        },
        focusout: function () {
            focused = false;
            return self;
        },
        get: function (idx) {
            // We have some legacy code that does $('foo').get(0).
            assert.equal(idx, 0);
            return selector;
        },
        get_on_handler: function (name, child_selector) {
            return event_store.get_on_handler(name, child_selector);
        },
        hasClass: function (class_name) {
            return classes.has(class_name);
        },
        height: noop,
        hide: function () {
            shown = false;
            return self;
        },
        html: function (arg) {
            if (arg !== undefined) {
                html = arg;
                return self;
            }
            return html;
        },
        is: function (arg) {
            if (arg === ':visible') {
                return shown;
            }
            if (arg === ':focus') {
                return focused;
            }
            return self;
        },
        is_focused: function () {
            // is_focused is not a jQuery thing; this is
            // for our testing
            return focused;
        },
        keydown: function (arg) {
            event_store.generic_event('keydown', arg);
            return self;
        },
        keyup: function (arg) {
            event_store.generic_event('keyup', arg);
            return self;
        },
        off: function (...args) {
            event_store.off(...args);
            return self;
        },
        on: function (...args) {
            event_store.on(...args);
            return self;
        },
        parent: function () {
            return my_parent;
        },
        parents: function (parents_selector) {
            const result = parents_result.get(parents_selector);
            assert(result, 'You need to call set_parents_result for ' +
                            parents_selector + ' in ' + selector);
            return result;
        },
        prepend: function (arg) {
            html = arg + html;
            return self;
        },
        prop: function (name, val) {
            if (val === undefined) {
                return properties.get(name);
            }
            properties.set(name, val);
            return self;
        },
        removeAttr: function (name) {
            attrs.delete(name);
            return self;
        },
        removeClass: function (class_names) {
            class_names = class_names.split(' ');
            class_names.forEach(function (class_name) {
                classes.delete(class_name);
            });
            return self;
        },
        remove: function () {
            return self;
        },
        removeData: noop,
        replaceWith: function () {
            return self;
        },
        scrollTop: function () {
            return self;
        },
        select: function (arg) {
            event_store.generic_event('select', arg);
            return self;
        },
        set_find_results: function (find_selector, jquery_object) {
            find_results.set(find_selector, jquery_object);
        },
        show: function () {
            shown = true;
            return self;
        },
        serializeArray: function () {
            return self;
        },
        set_parent: function (parent_elem) {
            my_parent = parent_elem;
        },
        set_parents_result: function (selector, result) {
            parents_result.set(selector, result);
        },
        stop: function () {
            return self;
        },
        text: function (...args) {
            if (args.length !== 0) {
                if (args[0] !== undefined) {
                    text = args[0].toString();
                }
                return self;
            }
            return text;
        },
        trigger: function (ev) {
            event_store.trigger(ev);
            return self;
        },
        val: function (...args) {
            if (args.length === 0) {
                return value || '';
            }
            [value] = args;
            return self;
        },
        css: function (...args) {
            if (args.length === 0) {
                return css || {};
            }
            [css] = args;
            return self;
        },
        visible: function () {
            return shown;
        },
        slice: function () {
            return self;
        },
    };

    if (selector[0] === '<') {
        self.html(selector);
    }

    self[0] = 'you-must-set-the-child-yourself';

    self.selector = selector;

    self.length = 1;

    return self;
};

exports.make_zjquery = function (opts) {
    opts = opts || {};

    const elems = new Map();

    // Our fn structure helps us simulate extending jQuery.
    const fn = {};

    function new_elem(selector) {
        const elem = exports.make_new_elem(selector, {
            silent: opts.silent,
        });
        Object.assign(elem, fn);

        // Create a proxy handler to detect missing stubs.
        //
        // For context, zjquery doesn't implement every method/attribute
        // that you'd find on a "real" jQuery object.  Sometimes we
        // expects devs to create their own stubs.
        const handler = {
            get: (target, key) => {
                // Handle the special case of equality checks, which
                // we can infer by assert.equal trying to access the
                // "stack" key.
                if (key === 'stack') {
                    const error = '\nInstead of doing equality checks on a full object, ' +
                        'do `assert_equal(foo.selector, ".some_class")\n';
                    throw Error(error);
                }

                const val = target[key];

                if (val === undefined) {
                    // For undefined values, we'll throw errors to devs saying
                    // they need to create stubs.  We ignore certain keys that
                    // are used for simply printing out the object.
                    if (typeof key === 'symbol') {
                        return;
                    }
                    if (key === 'inspect') {
                        return;
                    }

                    throw Error('You must create a stub for $("' + selector + '").' + key);
                }

                return val;
            },
        };

        const proxy = new Proxy(elem, handler);

        return proxy;
    }

    const zjquery = function (arg, arg2) {
        if (typeof arg === "function") {
            // If somebody is passing us a function, we emulate
            // jQuery's behavior of running this function after
            // page load time.  But there are no pages to load,
            // so we just call it right away.
            arg();
            return;
        }

        // If somebody is passing us an element, we return
        // the element itself if it's been created with
        // zjquery.
        // This may happen in cases like $(this).
        if (arg.selector && elems.has(arg.selector)) {
            return arg;
        }

        // We occasionally create stub objects that know
        // they want to be wrapped by jQuery (so they can
        // in turn return stubs).  The convention is that
        // they provide a to_$ attribute.
        if (arg.to_$) {
            assert(typeof arg.to_$ === "function");
            return arg.to_$();
        }

        if (arg2 !== undefined) {
            throw Error("We only use one-argument variations of $(...) in Zulip code.");
        }

        const selector = arg;

        if (typeof selector !== "string") {
            console.info(arg);
            throw Error("zjquery does not know how to wrap this object yet");
        }

        const valid_selector =
            '<#.'.includes(selector[0]) ||
            selector === 'window-stub' ||
            selector === 'document-stub' ||
            selector === 'body' ||
            selector === 'html' ||
            selector.location ||
            selector.includes('#') ||
            selector.includes('.') ||
            selector.includes('[') && selector.indexOf(']') >= selector.indexOf('[');

        assert(valid_selector,
               'Invalid selector: ' + selector +
               ' Use $.create() maybe?');

        if (!elems.has(selector)) {
            const elem = new_elem(selector);
            elems.set(selector, elem);
        }
        return elems.get(selector);
    };

    zjquery.create = function (name)  {
        assert(!elems.has(name),
               'You already created an object with this name!!');
        const elem = new_elem(name);
        elems.set(name, elem);
        return elem;
    };

    zjquery.stub_selector = function (selector, stub) {
        elems.set(selector, stub);
    };

    zjquery.trim = function (s) { return s; };

    zjquery.state = function () {
        // useful for debugging
        let res = Array.from(elems.values(), v => v.debug());

        res = res.map(v => [v.selector, v.value, v.shown]);

        res.sort();

        return res;
    };

    zjquery.Event = function (name, data) {
        return {
            name: name,
            data: data,
        };
    };

    fn.after = function (s) {
        return s;
    };
    fn.before = function (s) {
        return s;
    };

    zjquery.fn = fn;

    zjquery.clear_all_elements = function () {
        elems.clear();
    };
    zjquery.escapeSelector = function (s) {
        return s;
    };

    return zjquery;
};


text:
mongoose-cache-queue
====================

A Mongoose Cache


text:
This is a library to generate and consume the source map format
[described here][format].

This library is written in the Asynchronous Module Definition format, and works
in the following environments:

* Modern Browsers supporting ECMAScript 5 (either after the build, or with an
  AMD loader such as RequireJS)

* Inside Firefox (as a JSM file, after the build)

* With NodeJS versions 0.8.X and higher

## Node

    $ npm install source-map

## Building from Source (for everywhere else)

Install Node and then run

    $ git clone https://fitzgen@github.com/mozilla/source-map.git
    $ cd source-map
    $ npm link .

Next, run

    $ node Makefile.dryice.js

This should spew a bunch of stuff to stdout, and create the following files:

* `dist/source-map.js` - The unminified browser version.

* `dist/source-map.min.js` - The minified browser version.

* `dist/SourceMap.jsm` - The JavaScript Module for inclusion in Firefox source.

## Examples

### Consuming a source map

    var rawSourceMap = {
      version: 3,
      file: 'min.js',
      names: ['bar', 'baz', 'n'],
      sources: ['one.js', 'two.js'],
      sourceRoot: 'http://example.com/www/js/',
      mappings: 'CAAC,IAAI,IAAM,SAAUA,GAClB,OAAOC,IAAID;CCDb,IAAI,IAAM,SAAUE,GAClB,OAAOA'
    };

    var smc = new SourceMapConsumer(rawSourceMap);

    console.log(smc.sources);
    // [ 'http://example.com/www/js/one.js',
    //   'http://example.com/www/js/two.js' ]

    console.log(smc.originalPositionFor({
      line: 2,
      column: 28
    }));
    // { source: 'http://example.com/www/js/two.js',
    //   line: 2,
    //   column: 10,
    //   name: 'n' }

    console.log(smc.generatedPositionFor({
      source: 'http://example.com/www/js/two.js',
      line: 2,
      column: 10
    }));
    // { line: 2, column: 28 }

    smc.eachMapping(function (m) {
      // ...
    });

### Generating a source map

In depth guide:
[**Compiling to JavaScript, and Debugging with Source Maps**](https://hacks.mozilla.org/2013/05/compiling-to-javascript-and-debugging-with-source-maps/)

#### With SourceNode (high level API)

    function compile(ast) {
      switch (ast.type) {
      case 'BinaryExpression':
        return new SourceNode(
          ast.location.line,
          ast.location.column,
          ast.location.source,
          [compile(ast.left), " + ", compile(ast.right)]
        );
      case 'Literal':
        return new SourceNode(
          ast.location.line,
          ast.location.column,
          ast.location.source,
          String(ast.value)
        );
      // ...
      default:
        throw new Error("Bad AST");
      }
    }

    var ast = parse("40 + 2", "add.js");
    console.log(compile(ast).toStringWithSourceMap({
      file: 'add.js'
    }));
    // { code: '40 + 2',
    //   map: [object SourceMapGenerator] }

#### With SourceMapGenerator (low level API)

    var map = new SourceMapGenerator({
      file: "source-mapped.js"
    });

    map.addMapping({
      generated: {
        line: 10,
        column: 35
      },
      source: "foo.js",
      original: {
        line: 33,
        column: 2
      },
      name: "christopher"
    });

    console.log(map.toString());
    // '{"version":3,"file":"source-mapped.js","sources":["foo.js"],"names":["christopher"],"mappings":";;;;;;;;;mCAgCEA"}'

## API

Get a reference to the module:

    // NodeJS
    var sourceMap = require('source-map');

    // Browser builds
    var sourceMap = window.sourceMap;

    // Inside Firefox
    let sourceMap = {};
    Components.utils.import('resource:///modules/devtools/SourceMap.jsm', sourceMap);

### SourceMapConsumer

A SourceMapConsumer instance represents a parsed source map which we can query
for information about the original file positions by giving it a file position
in the generated source.

#### new SourceMapConsumer(rawSourceMap)

The only parameter is the raw source map (either as a string which can be
`JSON.parse`'d, or an object). According to the spec, source maps have the
following attributes:

* `version`: Which version of the source map spec this map is following.

* `sources`: An array of URLs to the original source files.

* `names`: An array of identifiers which can be referrenced by individual
  mappings.

* `sourceRoot`: Optional. The URL root from which all sources are relative.

* `sourcesContent`: Optional. An array of contents of the original source files.

* `mappings`: A string of base64 VLQs which contain the actual mappings.

* `file`: Optional. The generated filename this source map is associated with.

#### SourceMapConsumer.prototype.computeColumnSpans()

Compute the last column for each generated mapping. The last column is
inclusive.

#### SourceMapConsumer.prototype.originalPositionFor(generatedPosition)

Returns the original source, line, and column information for the generated
source's line and column positions provided. The only argument is an object with
the following properties:

* `line`: The line number in the generated source.

* `column`: The column number in the generated source.

and an object is returned with the following properties:

* `source`: The original source file, or null if this information is not
  available.

* `line`: The line number in the original source, or null if this information is
  not available.

* `column`: The column number in the original source, or null or null if this
  information is not available.

* `name`: The original identifier, or null if this information is not available.

#### SourceMapConsumer.prototype.generatedPositionFor(originalPosition)

Returns the generated line and column information for the original source,
line, and column positions provided. The only argument is an object with
the following properties:

* `source`: The filename of the original source.

* `line`: The line number in the original source.

* `column`: The column number in the original source.

and an object is returned with the following properties:

* `line`: The line number in the generated source, or null.

* `column`: The column number in the generated source, or null.

#### SourceMapConsumer.prototype.allGeneratedPositionsFor(originalPosition)

Returns all generated line and column information for the original source
and line provided. The only argument is an object with the following
properties:

* `source`: The filename of the original source.

* `line`: The line number in the original source.

and an array of objects is returned, each with the following properties:

* `line`: The line number in the generated source, or null.

* `column`: The column number in the generated source, or null.

#### SourceMapConsumer.prototype.sourceContentFor(source)

Returns the original source content for the source provided. The only
argument is the URL of the original source file.

#### SourceMapConsumer.prototype.eachMapping(callback, context, order)

Iterate over each mapping between an original source/line/column and a
generated line/column in this source map.

* `callback`: The function that is called with each mapping. Mappings have the
  form `{ source, generatedLine, generatedColumn, originalLine, originalColumn,
  name }`

* `context`: Optional. If specified, this object will be the value of `this`
  every time that `callback` is called.

* `order`: Either `SourceMapConsumer.GENERATED_ORDER` or
  `SourceMapConsumer.ORIGINAL_ORDER`. Specifies whether you want to iterate over
  the mappings sorted by the generated file's line/column order or the
  original's source/line/column order, respectively. Defaults to
  `SourceMapConsumer.GENERATED_ORDER`.

### SourceMapGenerator

An instance of the SourceMapGenerator represents a source map which is being
built incrementally.

#### new SourceMapGenerator([startOfSourceMap])

You may pass an object with the following properties:

* `file`: The filename of the generated source that this source map is
  associated with.

* `sourceRoot`: A root for all relative URLs in this source map.

#### SourceMapGenerator.fromSourceMap(sourceMapConsumer)

Creates a new SourceMapGenerator based on a SourceMapConsumer

* `sourceMapConsumer` The SourceMap.

#### SourceMapGenerator.prototype.addMapping(mapping)

Add a single mapping from original source line and column to the generated
source's line and column for this source map being created. The mapping object
should have the following properties:

* `generated`: An object with the generated line and column positions.

* `original`: An object with the original line and column positions.

* `source`: The original source file (relative to the sourceRoot).

* `name`: An optional original token name for this mapping.

#### SourceMapGenerator.prototype.setSourceContent(sourceFile, sourceContent)

Set the source content for an original source file.

* `sourceFile` the URL of the original source file.

* `sourceContent` the content of the source file.

#### SourceMapGenerator.prototype.applySourceMap(sourceMapConsumer[, sourceFile[, sourceMapPath]])

Applies a SourceMap for a source file to the SourceMap.
Each mapping to the supplied source file is rewritten using the
supplied SourceMap. Note: The resolution for the resulting mappings
is the minimium of this map and the supplied map.

* `sourceMapConsumer`: The SourceMap to be applied.

* `sourceFile`: Optional. The filename of the source file.
  If omitted, sourceMapConsumer.file will be used, if it exists.
  Otherwise an error will be thrown.

* `sourceMapPath`: Optional. The dirname of the path to the SourceMap
  to be applied. If relative, it is relative to the SourceMap.

  This parameter is needed when the two SourceMaps aren't in the same
  directory, and the SourceMap to be applied contains relative source
  paths. If so, those relative source paths need to be rewritten
  relative to the SourceMap.

  If omitted, it is assumed that both SourceMaps are in the same directory,
  thus not needing any rewriting. (Supplying `'.'` has the same effect.)

#### SourceMapGenerator.prototype.toString()

Renders the source map being generated to a string.

### SourceNode

SourceNodes provide a way to abstract over interpolating and/or concatenating
snippets of generated JavaScript source code, while maintaining the line and
column information associated between those snippets and the original source
code. This is useful as the final intermediate representation a compiler might
use before outputting the generated JS and source map.

#### new SourceNode([line, column, source[, chunk[, name]]])

* `line`: The original line number associated with this source node, or null if
  it isn't associated with an original line.

* `column`: The original column number associated with this source node, or null
  if it isn't associated with an original column.

* `source`: The original source's filename; null if no filename is provided.

* `chunk`: Optional. Is immediately passed to `SourceNode.prototype.add`, see
  below.

* `name`: Optional. The original identifier.

#### SourceNode.fromStringWithSourceMap(code, sourceMapConsumer[, relativePath])

Creates a SourceNode from generated code and a SourceMapConsumer.

* `code`: The generated code

* `sourceMapConsumer` The SourceMap for the generated code

* `relativePath` The optional path that relative sources in `sourceMapConsumer`
  should be relative to.

#### SourceNode.prototype.add(chunk)

Add a chunk of generated JS to this source node.

* `chunk`: A string snippet of generated JS code, another instance of
   `SourceNode`, or an array where each member is one of those things.

#### SourceNode.prototype.prepend(chunk)

Prepend a chunk of generated JS to this source node.

* `chunk`: A string snippet of generated JS code, another instance of
   `SourceNode`, or an array where each member is one of those things.

#### SourceNode.prototype.setSourceContent(sourceFile, sourceContent)

Set the source content for a source file. This will be added to the
`SourceMap` in the `sourcesContent` field.

* `sourceFile`: The filename of the source file

* `sourceContent`: The content of the source file

#### SourceNode.prototype.walk(fn)

Walk over the tree of JS snippets in this node and its children. The walking
function is called once for each snippet of JS and is passed that snippet and
the its original associated source's line/column location.

* `fn`: The traversal function.

#### SourceNode.prototype.walkSourceContents(fn)

Walk over the tree of SourceNodes. The walking function is called for each
source file content and is passed the filename and source content.

* `fn`: The traversal function.

#### SourceNode.prototype.join(sep)

Like `Array.prototype.join` except for SourceNodes. Inserts the separator
between each of this source node's children.

* `sep`: The separator.

#### SourceNode.prototype.replaceRight(pattern, replacement)

Call `String.prototype.replace` on the very right-most source snippet. Useful
for trimming whitespace from the end of a source node, etc.

* `pattern`: The pattern to replace.

* `replacement`: The thing to replace the pattern with.

#### SourceNode.prototype.toString()

Return the string representation of this source node. Walks over the tree and
concatenates all the various snippets together to one string.

#### SourceNode.prototype.toStringWithSourceMap([startOfSourceMap])

Returns the string representation of this tree of source nodes, plus a
SourceMapGenerator which contains all the mappings between the generated and
original sources.

The arguments are the same as those to `new SourceMapGenerator`.

## Tests

[![Build Status](https://travis-ci.org/mozilla/source-map.png?branch=master)](https://travis-ci.org/mozilla/source-map)

Install NodeJS version 0.8.0 or greater, then run `node test/run-tests.js`.

To add new tests, create a new file named `test/test-<your new test name>.js`
and export your test functions with names that start with "test", for example

    exports["test doing the foo bar"] = function (assert, util) {
      ...
    };

The new test will be located automatically when you run the suite.

The `util` argument is the test utility module located at `test/source-map/util`.

The `assert` argument is a cut down version of node's assert module. You have
access to the following assertion functions:

* `doesNotThrow`

* `equal`

* `ok`

* `strictEqual`

* `throws`

(The reason for the restricted set of test functions is because we need the
tests to run inside Firefox's test suite as well and so the assert module is
shimmed in that environment. See `build/assert-shim.js`.)

[format]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit
[feature]: https://wiki.mozilla.org/DevTools/Features/SourceMap
[Dryice]: https://github.com/mozilla/dryice


text:
package org.lirazs.robolayout.core.widget.layout.relative;

import org.lirazs.robolayout.core.util.UIViewLayoutUtil;
import org.robovm.apple.uikit.UIView;

import java.util.*;

/**
 * Created on 8/5/2015.
 */
public class DependencyGraph {

    private Map<String, DependencyGraphNode> keyNodes;
    private List<DependencyGraphNode> nodes;
    private List<DependencyGraphNode> roots;

    public DependencyGraph() {
        keyNodes = new HashMap<>();
        nodes = new ArrayList<>();
        roots = new ArrayList<>();
    }

    public Map<String, DependencyGraphNode> getKeyNodes() {
        return keyNodes;
    }

    public void clear() {
        for (DependencyGraphNode node : nodes) {
            node.releaseNode();
        }

        nodes.clear();
        keyNodes.clear();
        roots.clear();
    }

    public void addView(UIView view) {
        String identifier = UIViewLayoutUtil.getIdentifier(view);
        DependencyGraphNode node = DependencyGraphNode.acquireView(view);

        if(identifier != null) {
            keyNodes.put(identifier, node);
        }

        nodes.add(node);
    }

    public List<DependencyGraphNode> findRootsWithRules(int[] rulesFilter) {
        Map<String, DependencyGraphNode> keyNodes = this.keyNodes;
        List<DependencyGraphNode> nodes = this.nodes;

        // Find roots can be invoked several times, so make sure to clear
        // all dependents and dependencies before running the algorithm
        for (DependencyGraphNode node : nodes) {
            node.getDependents().clear();
            node.getDependencies().clear();
        }

        // Builds up the dependents and dependencies for each node of the graph
        for (DependencyGraphNode node : nodes) {
            RelativeLayoutLayoutParams layoutParams = (RelativeLayoutLayoutParams) UIViewLayoutUtil.getLayoutParams(node.getView());
            String[] rules = layoutParams.getRules();

            // Look only the the rules passed in parameter, this way we build only the
            // dependencies for a specific set of rules
            for (int ruleId : rulesFilter) {
                String rule = rules[ruleId];
                if(rule != null) {
                    // The node this node depends on
                    DependencyGraphNode dependency = keyNodes.get(rule);
                    // Skip unknowns and self dependencies
                    if (dependency == null || dependency == node) {
                        continue;
                    }
                    // Add the current node as a dependent
                    dependency.getDependents().add(node);
                    // Add a dependency to the current node
                    node.getDependencies().put(rule, dependency);
                }
            }
        }

        List<DependencyGraphNode> roots = this.roots;
        roots.clear();

        // Finds all the roots in the graph: all nodes with no dependencies
        for (DependencyGraphNode node : nodes) {
            if(node.getDependencies().size() == 0) {
                roots.add(node);
            }
        }
        return roots;
    }

    /**
     * Builds a sorted list of views. The sorting order depends on the dependencies
     * between the view. For instance, if view C needs view A to be processed first
     * and view A needs view B to be processed first, the dependency graph
     * is: B -> A -> C. The sorted array will contain views B, A and C in this order.
     *
     * @param sorted The sorted list of views. The length of this array must
     *        be equal to getChildCount().
     * @param rulesIndexes The list of rules to take into account.
     */
    public void getSortedViews(List<UIView> sorted, int[] rulesIndexes) {
        List<DependencyGraphNode> roots = findRootsWithRules(rulesIndexes);
        int index = 0;

        while(roots.size() > 0) {
            DependencyGraphNode node = roots.get(0);
            roots.remove(0);

            UIView view = node.getView();
            String key = UIViewLayoutUtil.getIdentifier(view);

            sorted.add(index++, view);

            Set<DependencyGraphNode> dependents = node.getDependents();
            for (DependencyGraphNode dependent : dependents) {
                Map<String, DependencyGraphNode> dependencies = dependent.getDependencies();

                dependencies.remove(key);
                if(dependencies.size() == 0) {
                    roots.add(dependent);
                }
            }
        }

        if(index < sorted.size()) {
            throw new IllegalStateException("Circular dependencies cannot exist in RelativeLayout");
        }
    }
}


text:
using GalaSoft.MvvmLight;
using GalaSoft.MvvmLight.Ioc;
using GalaSoft.MvvmLight.Views;
using Microsoft.Practices.ServiceLocation;
using Rimshot.Design;
using Rimshot.Services;

namespace Rimshot.ViewModels
{
    public class ViewModelLocator
    {
        static ViewModelLocator()
        {
            ServiceLocator.SetLocatorProvider(() => SimpleIoc.Default);

            var nav = new NavigationService();
            SimpleIoc.Default.Register<INavigationService>(() => nav);

            if (ViewModelBase.IsInDesignModeStatic)
            {
                SimpleIoc.Default.Register<IDataService, DesignDataService>();
            }
            else
            {
                SimpleIoc.Default.Register<IDataService, DataService>();
            }

            SimpleIoc.Default.Register<MainViewModel>();
            SimpleIoc.Default.Register<ArtistViewModel>();
        }

        [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Performance", "CA1822:MarkMembersAsStatic", Justification = "This non-static member is needed for data binding purposes.")]
        public MainViewModel Main => ServiceLocator.Current.GetInstance<MainViewModel>();

        [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Performance", "CA1822:MarkMembersAsStatic", Justification = "This non-static member is needed for data binding purposes.")]
        public ArtistViewModel Artist => ServiceLocator.Current.GetInstance<ArtistViewModel>();
    }
}


text:
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
              xmlns:tools="http://schemas.android.com/tools"
              android:layout_width="match_parent"
              android:layout_height="match_parent"
              android:background="#ebebeb"
              android:orientation="vertical">

    <RelativeLayout
            android:id="@+id/topLayout"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:background="@drawable/found_detail_title_bg">

        <ImageButton
                android:id="@+id/backBtn"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_alignParentLeft="true"
                android:layout_centerVertical="true"
                android:background="@drawable/found_detail_back"/>

        <TextView
                android:id="@+id/dividerView"
                android:layout_width="1dp"
                android:layout_height="35dp"
                android:layout_centerVertical="true"
                android:layout_toRightOf="@+id/backBtn"
                android:background="#000000"/>

        <TextView
                android:id="@+id/titleNameTV"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_centerVertical="true"
                android:layout_gravity="center_vertical"
                android:layout_marginLeft="10dp"
                android:layout_toRightOf="@+id/dividerView"
                android:text="@string/found_detail_title"
                android:textColor="#ffffff"
                android:textSize="20sp"/>

        <ImageButton
                android:id="@+id/menuBtn"
                android:visibility="gone"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_alignParentRight="true"
                android:layout_centerVertical="true"
                android:layout_marginRight="10dp"
                android:background="@drawable/found_detail_menu"/>
    </RelativeLayout>

    <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:gravity="center_vertical"
            android:orientation="horizontal"
            android:padding="15dp"
            android:weightSum="10">

        <LinearLayout
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:layout_weight="2"
                android:gravity="center_horizontal|center_vertical"
                android:orientation="vertical">

            <com.bct.gpstracker.view.CircleImageView
                    android:id="@+id/photoIV"
                    android:layout_width="60dp"
                    android:layout_height="60dp"
                    android:scaleType="centerCrop"
                    android:src="@drawable/user_no_photo"/>
        </LinearLayout>

        <LinearLayout
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:layout_weight="8"
                android:gravity="center_vertical"
                android:orientation="vertical"
                android:paddingLeft="5dp">

            <LinearLayout
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:gravity="center_vertical"
                    android:orientation="horizontal">

                <TextView
                        android:id="@+id/nameTV"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:text="Large Text"
                        android:textColor="#000c44"
                        android:textSize="20sp"/>

                <ImageView
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:layout_marginLeft="5dp"
                        android:src="@drawable/found_icon_user"/>
            </LinearLayout>

            <LinearLayout
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:gravity="center_vertical"
                    android:orientation="horizontal">

                <TextView
                        android:id="@+id/distanceTV"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:text="Large Text"
                        android:textColor="#bcbcbc"
                        android:textSize="18sp"/>
            </LinearLayout>
        </LinearLayout>
    </LinearLayout>

    <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:background="#ffffff"
            android:orientation="vertical"
            android:padding="10dp">

        <LinearLayout
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:gravity="center_vertical"
                android:visibility="gone"
                android:padding="5dp"
                android:weightSum="4">

            <TextView
                    android:layout_width="0dp"
                    android:layout_height="wrap_content"
                    android:layout_weight="1"
                    android:text="地区"
                    android:textColor="#343434"
                    android:textSize="16sp"/>

            <TextView
                    android:id="@+id/found_detail_area"
                    android:layout_width="0dp"
                    android:layout_height="wrap_content"
                    android:layout_weight="3"
                    android:text="湖南 湖北"
                    android:textColor="#494949"
                    android:textSize="15sp"/>
        </LinearLayout>

        <TextView
                android:layout_width="match_parent"
                android:layout_height="1dp"
                android:background="#f9f9f9"/>

        <LinearLayout
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:gravity="center_vertical"
                android:padding="5dp"
                android:weightSum="4">

            <TextView
                    android:layout_width="0dp"
                    android:layout_height="wrap_content"
                    android:layout_weight="1"
                    android:text="个性签名"
                    android:textColor="#343434"
                    android:textSize="16sp"/>

            <TextView
                    android:id="@+id/found_detail_content"
                    android:layout_width="0dp"
                    android:layout_height="wrap_content"
                    android:layout_weight="3"
                    android:text="湖南 湖北"
                    android:textColor="#494949"
                    android:textSize="15sp"/>
        </LinearLayout>
    </LinearLayout>

    <Button
            android:id="@+id/button1"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_gravity="center_horizontal"
            android:layout_marginTop="30dp"
            android:background="@drawable/found_detail_add"
            android:text="@string/found_detail_add"
            android:textColor="@color/white"
            android:textSize="16sp"/>

    <Button
            android:id="@+id/button2"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_gravity="center_horizontal"
            android:layout_marginTop="10dp"
            android:background="@drawable/found_detail_tousu"
            android:text="@string/found_detail_tousu"
            android:textColor="#343434"
            android:textSize="16sp"/>

</LinearLayout>


text:
#include "CLucene/StdHeader.h"
#include "WildcardQuery.h"
#include "CLucene/util/BitSet.h"

CL_NS_USE(index)
CL_NS_USE(util)
CL_NS_DEF(search)

  WildcardQuery::WildcardQuery(Term* term):
	MultiTermQuery( term ){
  //Func - Constructor
  //Pre  - term != NULL
  //Post - Instance has been created

  }

  WildcardQuery::~WildcardQuery(){
  //Func - Destructor
  //Pre  - true
  //Post - true

  }

  const TCHAR* WildcardQuery::getQueryName() const{
  //Func - Returns the string "WildcardQuery"
  //Pre  - true
  //Post - The string "WildcardQuery" has been returned
	return getClassName();
  }

  const TCHAR* WildcardQuery::getClassName(){
      return _T("WildcardQuery");
  }

  FilteredTermEnum* WildcardQuery::getEnum(IndexReader* reader) {
    return _CLNEW WildcardTermEnum(reader, getTerm(false));
  }

	WildcardQuery::WildcardQuery(const WildcardQuery& clone):
		MultiTermQuery(clone)
	{
	}

	Query* WildcardQuery::clone() const{
		return _CLNEW WildcardQuery(*this);
	}
	size_t WildcardQuery::hashCode() const{
		//todo: we should give the query a seeding value... but
		//need to do it for all hascode functions
		return Similarity::floatToByte(getBoost()) ^ getTerm()->hashCode();
	}
	bool WildcardQuery::equals(Query* other) const{
		if (!(other->instanceOf(WildcardQuery::getClassName())))
			return false;

		WildcardQuery* tq = (WildcardQuery*)other;
		return (this->getBoost() == tq->getBoost())
			&& getTerm()->equals(tq->getTerm());
	}

WildcardFilter::WildcardFilter( Term* term )
{
	this->term = _CL_POINTER(term);
}

WildcardFilter::~WildcardFilter()
{
	_CLDECDELETE(term);
}

WildcardFilter::WildcardFilter( const WildcardFilter& copy ) :
	term( _CL_POINTER(copy.term) )
{
}

Filter* WildcardFilter::clone() const {
	return _CLNEW WildcardFilter(*this );
}

TCHAR* WildcardFilter::toString()
{
	//Instantiate a stringbuffer buffer to store the readable version temporarily
    CL_NS(util)::StringBuffer buffer;
    //check if field equal to the field of prefix
    if( term->field() != NULL ) {
	  //Append the field of prefix to the buffer
      buffer.append(term->field());
	  //Append a colon
      buffer.append(_T(":") );
    }
    //Append the text of the prefix
    buffer.append(term->text());

	//Convert StringBuffer buffer to TCHAR block and return it
    return buffer.toString();
}

/** Returns a BitSet with true for documents which should be permitted in
search results, and false for those that should not. */
BitSet* WildcardFilter::bits( IndexReader* reader )
{
	BitSet* bts = _CLNEW BitSet( reader->maxDoc() );

	WildcardTermEnum termEnum (reader, term);
    if (termEnum.term(false) == NULL)
      return bts;

	TermDocs* termDocs = reader->termDocs();
	try{
		do{
			termDocs->seek(&termEnum);

			while (termDocs->next()) {
			  bts->set(termDocs->doc());
			}
		}while(termEnum.next());
	} _CLFINALLY(
      termDocs->close();
      _CLDELETE(termDocs);
      termEnum.close();
    )

	return bts;
}

CL_NS_END


text:
@interface SCRFeedListViewController : UIViewController<UISearchBarDelegate, SWTableViewCellDelegate, SCRFeedSearchTableDelegateDelegate>
@property (weak, nonatomic) IBOutlet UITableView *tableView;
@property (weak, nonatomic) IBOutlet UISegmentedControl *segmentedControl;
@property (weak, nonatomic) IBOutlet NSLayoutConstraint *segmentedControlHeightConstraint;
@property (weak, nonatomic) IBOutlet UISearchBar *searchBar;
@property (weak, nonatomic) IBOutlet NSLayoutConstraint *searchBarHeightConstraint;
@property (weak, nonatomic) IBOutlet NSLayoutConstraint *trendingViewHeightConstraint;
@end


text:
<!DOCTYPE html>

  <title>Vimeo Player Unit Test Suite</title>
  <link rel="stylesheet" href="../../test/qunit/qunit.css" type="text/css" media="screen">

Popcorn Vimeo Player Unit Tests


text:
/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package DAO;

import Entidades.Auditoria;
import Entidades.Usuario;
import Util.HibernateUtil;
import Visoes.Login;
import java.sql.CallableStatement;
import java.sql.Connection;
import java.sql.SQLException;
import java.util.ArrayList;
import java.util.List;
import org.hibernate.HibernateException;
import org.hibernate.Query;
import org.hibernate.SQLQuery;
import org.hibernate.Session;
import org.hibernate.jdbc.Work;

/**
 *
 * @author Murilo
 */
public class AuditoriaDao {

    static Session sessao;

    public void InsertAuditoria(Auditoria auditoria) {
        try {
            Session sessao = HibernateUtil.getSessionFactory().openSession();
            sessao.beginTransaction();

            sessao.doWork(new Work() {
                @Override
                public void execute(Connection connection) throws SQLException {
                    CallableStatement call = connection.prepareCall("{ call InsAuditoria(?,?,?,?) }");
                    call.setString(1, auditoria.getAcao());
                    call.setString(2, auditoria.getValorAnterior());
                    call.setString(3, auditoria.getValorPosterior());
                    call.setInt(4, auditoria.getUsuario().getCodigo());
                    call.execute();
                }
            });

            sessao.getTransaction().commit();
        } catch (Exception e) {
            Login.log.info("Erro ao inserir auditoria: " + e);
        }
    }

    public List<Auditoria> encontrarTudo() {
        //Cliente cliente = new Cliente();
        List<Auditoria> listaAuditoria = new ArrayList();

        List resultado = null;

        try {
            Session sessao = HibernateUtil.getSessionFactory().openSession();
            sessao.beginTransaction();

            org.hibernate.Query q = sessao.createQuery("FROM Auditoria");
            resultado = q.list();

            for (Object o : resultado) {
                Auditoria auditoria = (Auditoria) o;
                listaAuditoria.add(auditoria);
            }

            return listaAuditoria;

        } catch (HibernateException he) {
            he.printStackTrace();
            Login.log.info("Erro ao pesquisar auditoria(encontrarTudo): " + he);
            return listaAuditoria;
        }
    }

    public List<Auditoria> pesqView() {
        List<Auditoria> listaAuditoria = new ArrayList();
        try {
            Session sessao = HibernateUtil.getSessionFactory().openSession();
            sessao.beginTransaction();

            SQLQuery q = sessao.createSQLQuery("Select * from ConsAuditoria");
            q.addEntity(Auditoria.class);
            List<Auditoria> resultado = q.list();
            for (Auditoria a : resultado) {
               Auditoria auditoria = (Auditoria) a;
               listaAuditoria.add(auditoria);
            }
            sessao.getTransaction().commit();
            return listaAuditoria;

        } catch (Exception e) {
            System.out.println("erro ao chamar view: " + e);
            Login.log.info("Erro ao pesquisar auditoria(pesqView): " + e);
            return null;
        }
    }

    public List findAll() throws Exception {
        List objects = null;
        try {
            sessao = HibernateUtil.getSessionFactory().openSession();
            sessao.beginTransaction();

            Query query = sessao.createQuery("from auditoria");
            objects = query.list();
        } catch (HibernateException he) {
            System.out.println("erro ao chamar view: " + he);
            Login.log.info("Erro ao pesquisar auditoria(findAll): " + he);
        } finally {
            sessao.close();
        }
        return objects;
    }

}


text:
<!DOCTYPE html>
<html>
<head>
    <base href="/ng-semantic-ui/">
    <title>ng-semantic-ui</title>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/semantic-ui/2.2.6/semantic.min.css">
</head>
<body>
    <app></app>
</body>
</html>


text:
from toee import *

def OnBeginSpellCast( spell ):
	print "Sleep OnBeginSpellCast"
	print "spell.target_list=", spell.target_list
	print "spell.caster=", spell.caster, " caster.level= ", spell.caster_level
	game.particles( "sp-enchantment-conjure", spell.caster )

	# HTN - sort the list by hitdice
	spell.spell_target_list_sort( SORT_TARGET_LIST_BY_HIT_DICE_THEN_DIST, SORT_TARGET_LIST_ORDER_ASCENDING )
	print "target_list sorted by hitdice and dist from target_Loc (least to greatest): ", spell.target_list

def OnSpellEffect( spell ):
	print "Sleep OnSpellEffect"

	remove_list = []

	spell.duration = 10 * spell.caster_level
	hit_dice_max = 4
	#hit_dice_roll = dice_new( '2d4' )
	#hit_dice_max = hit_dice_roll.roll()

	#print "sleep, can affect a total of (", hit_dice_max, ") HD"

	game.particles( 'sp-Sleep', spell.target_loc )

	# get all targets in a 15ft radius
	for target_item in spell.target_list:

		# check critter_hit_dice
		obj_hit_dice = target_item.obj.hit_dice_num

		if (obj_hit_dice < 5) and (hit_dice_max >= obj_hit_dice):

			# subtract the obj.hit_dice from the max
			hit_dice_max = hit_dice_max - obj_hit_dice

			# allow Will saving throw to negate
			if target_item.obj.saving_throw_spell( spell.dc, D20_Save_Will, D20STD_F_NONE, spell.caster, spell.id ):

				# saving throw successful
				target_item.obj.float_mesfile_line( 'mes\\spell.mes', 30001 )

				game.particles( 'Fizzle', target_item.obj )
				remove_list.append( target_item.obj )

			else:

				# saving throw unsuccessful
				# if game.leader.map == 5005 and target_item.obj.name in range(14074, 14078):
					# a123 = target_item.obj.item_worn_at(3).obj_get_int(obj_f_weapon_type)
					# if a123 in [14, 17, 46,  48, 68]: # (Is archer)
						# snorer = target_item.obj
						# pad3 = snorer.obj_get_int(obj_f_npc_pad_i_3)
						# pad3 |= 2**9
						# snorer.obj_set_int(obj_f_npc_pad_i_3, pad3)
						# snorer.obj_set_int(obj_f_pad_i_0, snorer.obj_get_int(obj_f_critter_strategy) ) # Record original strategy
						# snorer.obj_set_int(obj_f_critter_strategy, 88) # "Archer stay put" strat

				target_item.obj.float_mesfile_line( 'mes\\spell.mes', 30002 )
				target_item.obj.condition_add_with_args( 'sp-Sleep', spell.id, spell.duration, 0 )

				#################################################################
				# Added by Sitra Achara - Moathouse "Wakey Wakey" scripting	#
				# obj_f_npc_pad_i_3 - bit "7" (2**7)				#
				#################################################################

				# if game.leader.map == 5005 and target_item.obj.name in range(14074, 14078):
					# snorer = target_item.obj
					# pad3 = snorer.obj_get_int(obj_f_npc_pad_i_3)
					# pad3 |= 2**7
					# snorer.obj_set_int(obj_f_npc_pad_i_3, pad3)

					# no longer necessary with TemplePLus

		else:

			game.particles( 'Fizzle', target_item.obj )
			remove_list.append( target_item.obj )

	spell.target_list.remove_list( remove_list )
	spell.spell_end( spell.id) # changed back force_spell_end to 0 despite there being no per-round effects. it caused problems - sp-Sleep would get pruned when saving...

def OnBeginRound( spell ):
	print "Sleep OnBeginRound"

def OnEndSpellCast( spell ):
	print "Sleep OnEndSpellCast"


text:
date: 2015-08-26T22:33:00Z
description: "NoDesk | All Things Digital Nomad"
sitelink: http://nodesk.co/
tags:
- digital nomad
- web
thumbnail: /img/nodesk-tn.png
title: nodesk.co
---


text:
package com.facebook.drawee.drawable;

import static org.mockito.Mockito.*;

import android.graphics.Canvas;
import android.graphics.ColorFilter;
import android.graphics.Rect;
import android.graphics.drawable.Drawable;
import org.junit.Assert;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.robolectric.RobolectricTestRunner;

/**
 * Tests for {@link ForwardingDrawable}
 */
@RunWith(RobolectricTestRunner.class)
public class ForwardingDrawableTest {
  private Drawable mInnerDrawable;
  private ForwardingDrawable mDrawable;

  @Before
  public void setup() {
    mInnerDrawable = mock(Drawable.class);
    mDrawable = new ForwardingDrawable(mInnerDrawable);
    // ForwardingDrawable will call mInnerDrawable.setCallback
    reset(mInnerDrawable);
  }

  @Test
  public void testIntrinsicDimensions() {
    when(mInnerDrawable.getIntrinsicWidth()).thenReturn(100);
    when(mInnerDrawable.getIntrinsicHeight()).thenReturn(200);
    Drawable drawable1 = new ForwardingDrawable(mInnerDrawable);
    Assert.assertEquals(100, drawable1.getIntrinsicWidth());
    Assert.assertEquals(200, drawable1.getIntrinsicHeight());
  }

  @Test
  public void testGetCurrent() {
    Assert.assertEquals(mInnerDrawable, mDrawable.getCurrent());
  }

  @Test
  public void testSettersAndGetters() {
    ColorFilter colorFilterMock = mock(ColorFilter.class);
    Rect rectMock = mock(Rect.class);
    int alpha = 77;
    boolean dither = true;
    boolean filterBitmap = false;
    boolean visible = false;
    boolean restart = false;

    //when(mInnerDrawable.setVisible(visible, restart)).thenReturn(true);
    when(mInnerDrawable.getOpacity()).thenReturn(11);
    Assert.assertEquals(11, mDrawable.getOpacity());

    mDrawable.getPadding(rectMock);
    mDrawable.setAlpha(alpha);
    mDrawable.setDither(dither);
    mDrawable.setFilterBitmap(filterBitmap);
    mDrawable.setColorFilter(colorFilterMock);
    mDrawable.onBoundsChange(rectMock);
    mDrawable.setVisible(visible, restart);

    verify(mInnerDrawable).getPadding(rectMock);
    verify(mInnerDrawable).setAlpha(alpha);
    verify(mInnerDrawable).setDither(dither);
    verify(mInnerDrawable).setFilterBitmap(filterBitmap);
    verify(mInnerDrawable).setColorFilter(colorFilterMock);
    verify(mInnerDrawable).setBounds(rectMock);
    verify(mInnerDrawable).setVisible(visible, restart);
  }

  @Test
  public void testDraw() {
    Canvas mockCanvas = mock(Canvas.class);
    mDrawable.draw(mockCanvas);
    verify(mInnerDrawable).draw(mockCanvas);
  }

  @Test
  public void testCopyProperties() {
    Rect rect = new Rect(10, 20, 30, 40);
    int config = 11;
    int level = 100;
    boolean visible = true;
    int[] stateSet = new int[]{1, 2};

    mDrawable.setBounds(rect);
    mDrawable.setChangingConfigurations(config);
    mDrawable.setLevel(level);
    mDrawable.setVisible(visible, false);
    mDrawable.setState(stateSet);

    Drawable newDrawable = mock(Drawable.class);
    mDrawable.setCurrent(newDrawable);

    verify(newDrawable).setBounds(rect);
    verify(newDrawable).setChangingConfigurations(config);
    verify(newDrawable).setLevel(level);
    verify(newDrawable).setVisible(visible, false);
    verify(newDrawable).setState(stateSet);
  }
}


text:
package net.imagej.ops.morphology.blackTopHat;

import static org.junit.Assert.assertEquals;

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

import net.imagej.ops.AbstractOpTest;
import net.imglib2.Cursor;
import net.imglib2.IterableInterval;
import net.imglib2.algorithm.morphology.BlackTopHat;
import net.imglib2.algorithm.neighborhood.DiamondShape;
import net.imglib2.algorithm.neighborhood.HorizontalLineShape;
import net.imglib2.algorithm.neighborhood.RectangleShape;
import net.imglib2.algorithm.neighborhood.Shape;
import net.imglib2.img.Img;
import net.imglib2.type.numeric.integer.ByteType;

import org.junit.Before;
import org.junit.Test;

/**
 * Tests for {@link net.imagej.ops.Ops.Morphology.BlackTopHat}
 *
 * @author Leon Yang
 */
public class BlackTopHatTest extends AbstractOpTest {

	private Img<ByteType> in;

	@Before
	public void initialize() {
		in = generateByteArrayTestImg(true, 10, 10);
	}

	@Test
	public void testSingleBlackTopHat() {
		final Shape shape = new DiamondShape(1);
		@SuppressWarnings("unchecked")
		final Img<ByteType> out1 = (Img<ByteType>) ops.run(ListBlackTopHat.class,
			Img.class, in, shape);
		final Img<ByteType> out2 = BlackTopHat.blackTopHat(in, shape, 1);
		final Cursor<ByteType> c1 = out1.cursor();
		final Cursor<ByteType> c2 = out2.cursor();
		while (c1.hasNext())
			assertEquals(c1.next().get(), c2.next().get());
	}

	@Test
	public void testListBlackTopHat() {
		final List<Shape> shapes = new ArrayList<Shape>();
		shapes.add(new DiamondShape(1));
		shapes.add(new DiamondShape(1));
		shapes.add(new RectangleShape(1, false));
		shapes.add(new HorizontalLineShape(2, 1, false));
		@SuppressWarnings("unchecked")
		final IterableInterval<ByteType> out1 = (IterableInterval<ByteType>) ops
			.run(ListBlackTopHat.class, IterableInterval.class, in, shapes);
		final Img<ByteType> out2 = BlackTopHat.blackTopHat(in, shapes, 1);
		final Cursor<ByteType> c1 = out1.cursor();
		final Cursor<ByteType> c2 = out2.cursor();
		while (c1.hasNext())
			assertEquals(c1.next().get(), c2.next().get());
	}
}


text:
@class NSView;
@protocol JVInspection;

@protocol JVInspector <NSObject>
- (NSView *) view;
- (NSSize) minSize;
- (NSString *) title;
- (NSString *) type;
@end

@interface NSObject (JVInspectorOptional)
- (void) willLoad;
- (void) didLoad;

- (BOOL) shouldUnload;
- (void) didUnload;
@end

@protocol JVInspection <NSObject>
- (id <JVInspector>) inspector;
@end

@interface NSObject (JVInspectionOptional)
- (void) willBeInspected;
@end

@protocol JVInspectionDelegator <NSObject>
- (id <JVInspection>) objectToInspect;
- (IBAction) getInfo:(id) sender;
@end

@interface JVInspectorController : NSWindowController {
	BOOL _locked;
	id <JVInspection> _object;
	id <JVInspector> _inspector;
}
+ (JVInspectorController *) sharedInspector;
+ (IBAction) showInspector:(id) sender;
+ (JVInspectorController *) inspectorOfObject:(id <JVInspection>) object;

- (id) initWithObject:(id <JVInspection>) object lockedOn:(BOOL) locked;

- (IBAction) show:(id) sender;
- (BOOL) locked;

- (void) inspectObject:(id <JVInspection>) object;

- (id <JVInspection>) inspectedObject;
- (id <JVInspector>) inspector;
@end


text:
"use strict";
const mongoose = require('mongoose'),
      Schema = mongoose.Schema,
      User = require('../models/User'),
      Tag = require('../models/Tag'),
      Comment = require('../models/Comment'),
      moment = require('moment');

// create a schema
//The allowed SchemaTypes are:
// String
// Number
// Date
// Buffer
// Boolean
// Mixed
// ObjectId
// Array
var postSchema = new Schema({

          user_id: { type: String, required: true },
          tag_id: [String],
          author: { type: String, required: true },
          title: { type: String, required: true, min: 4 },
          category: { type: String, required: true },
          content: { type: String, required: true, min:100 },//,match: /[0-9a-zA-Z_-]/
          intro: {type: String, required: true, min: 20},
          //comments: [{ body: String, date: Date }],
          pv: {type: Number, default: 0},
          like: {type: Number, default: 0},
          hidden: {type: Boolean, default: 'false'},
          great:{type: Boolean, default: 'false'},
          meta: {
            votes: Number,
            favs:  Number
          },
          created_at: {type: Date, default: Date.now()},
          updated_at: {type: Date, default: Date.now()},

});

// on every save, add the date
postSchema.pre('save', function(next) {
  // get the current date
  const currentDate = new Date();

  // change the updated_at field to current date: do not leave .local
  this.updated_at = currentDate;

  // if created_at doesn't exist, add to that field
  if (!this.created_at){
    this.created_at = currentDate;
  }

  next();
});

postSchema.methods.time = time=> {
    return moment(time).format('L');
};

postSchema.methods.processPost = post=>{

    // let tags = post.tags;
    // let tagsArray = tags.split(',');

    let tag_idArray = post.tag_id;
    let tagsArray = [];
    tag_idArray.forEach(function(v,i,a){

          Tag.findById(v,function(err,tag){
               tagsArray.push(tag);

          });

    });
    return {
        _id:post._id,
        user_id: post.user_id,
        tag_id: post.tag_id,  //an array
        tags: tagsArray,//array with all post tags
        author: post.author,
        category: post.category,
        title: post.title,
        intro: post.intro,
        content: post.content,
        pv: post.pv,
        created_at: post.time(post.created_at),
        updated_at: post.time(post.updated_at),
    };

};

postSchema.methods.user = (user_id,fn)=>{

         User.findById(user_id).exec((err,user)=>{
                if(err){
                    console.log(`cannot catch user,error: ${err}`);
                    req.flash('error',`error in find user for ${user_id}`);
                    res.redirect('back');
                }else{
                    console.log(user);
                    let modifiedUser = user.processUser(user)
                    console.log(modifiedUser);
                    fn(modifiedUser);

              }
        });

};

postSchema.methods.comments = (post_id,fn)=>{
    Comment.find({'post_id':post_id},function(err,comments){
        comments =  comments.map(function(comment){
            return comment.processComment(comment);
        });
        fn(comments);
    });

};

// make this available to our users in our Node applications
module.exports = mongoose.model('Post', postSchema);


text:
from django.db import migrations

class Migration(migrations.Migration):

    dependencies = [
        ('wells', '0085_merge_20190514_0037'),
    ]

    operations = [
        migrations.RemoveField(
            model_name='linerperforation',
            name='activity_submission',
        ),
    ]


text:
from seleniumbase import MasterQA

class MasterQATests(MasterQA):
    def test_masterqa(self):
        self.open("https://seleniumbase.io/devices/")
        self.highlight("div.mockup-wrapper")
        self.verify("Do you see 4 computer devices?")
        self.open("https://seleniumbase.io/demo_page")
        self.highlight('table')
        self.verify("Do you see elements in a table?")
        self.open("https://xkcd.com/1700/")
        self.highlight("#comic")
        self.verify("Do you see a webcomic?")


text:
<!DOCTYPE html >

    <link rel="stylesheet" href="demos.css" type="text/css" media="screen" />

    <title>A Line and Pie chart with tooltips and click events</title>

    <meta name="robots" content="noindex,nofollow" />
    <meta name="description" content="A Line and Pie chart with tooltips and custom events" />

Two charts (on two canvas tags) with tooltips and click events

    <canvas id="cvs" width="600" height="250">[No canvas support]</canvas>
    <canvas id="cvs2" width="200" height="200">[No canvas support]</canvas>

        « Back


text:
#include "config.h"

#include "modules/filesystem/FileWriterBase.h"

#include "core/events/ProgressEvent.h"
#include "core/fileapi/Blob.h"
#include "core/fileapi/FileError.h"
#include "public/platform/WebFileWriter.h"

namespace WebCore {

FileWriterBase::~FileWriterBase()
{
}

void FileWriterBase::initialize(PassOwnPtr<blink::WebFileWriter> writer, long long length)
{
    ASSERT(!m_writer);
    ASSERT(length >= 0);
    m_writer = writer;
    m_length = length;
}

FileWriterBase::FileWriterBase()
    : m_position(0)
{
}

void FileWriterBase::seekInternal(long long position)
{
    if (position > m_length)
        position = m_length;
    else if (position < 0)
        position = m_length + position;
    if (position < 0)
        position = 0;
    m_position = position;
}

} // namespace WebCore


text:
@implementation MSThemeManager

#pragma mark - Singleton

+ (instancetype)sharedInstance
{
    static dispatch_once_t pred;
    static id sharedInstance = nil;
    dispatch_once(&pred, ^{
        sharedInstance = [[super alloc] initUniqueInstance];
    });

    return sharedInstance;
}

- (instancetype)initUniqueInstance
{
    self = [super init];

    if (self) {
    }

    return self;
}

- (instancetype)copy
{
    return self;
}

@end


text:
layout: relation
title: 'nmod'
shortdef: 'nominal modifier'
udver: '2'
---

A nominal modifier is a nominal phrase which modifies another nominal phrase.
The dependent must be a nominal phrase.

Guajajara lacks adjectives. Therefore, nominal modifiers in Guajajara may appear in genitive constructions or specify an attribute of the nominal phrase.
In genitive constructions, the dependent predeces the head.

~~~ sdparse
Oho Zuze ihɨ kope . \n  Jose's mother went to the field .
nmod(ihɨ, Zuze)
~~~

When the nominal modifier expresses an attribute, the head precedes the dependent.

~~~ sdparse
Wiko Zuàw awa zutɨkaʔi romo . \n John is a lonely man .
nmod(awa, zutɨkaʔi)
~~~

Most often, the nominal modifier expressing an attribute and its head are joined in a compund noun.

~~~ sdparse
Ur wirahu kaʔa wi . \n A hawk comes from the jungle .
U-zur wira-hu kaʔa wi
3-come bird-big field from
nmod(wira, hu)
~~~

<!-- Interlanguage links updated Po lis 14 15:35:30 CET 2022 -->


text:
@implementation SimpleModel

@end


text:
package org.camunda.bpm.engine.test.bpmn.callactivity;

import org.camunda.bpm.engine.delegate.BpmnError;
import org.camunda.bpm.engine.delegate.DelegateExecution;
import org.camunda.bpm.engine.delegate.JavaDelegate;

public class ServiceTaskThrowBpmnError implements JavaDelegate {

  @Override
  public void execute(DelegateExecution execution) throws Exception {
    throw new BpmnError("errorCode", "ouch!");
  }

}