text:
/**
 * Renders the raw CSS code, with syntax highlighting and line numbers,
 * and then injects it into the DOM, so the injected CSS can be available for live styling).
 *

 * The tag attributes are read from the lk-css-example element, as shown in the examples below:
 *
 *

 * <lk-css-example width="750px">
 *   <codeComment>A comment rendered beneath the CSS header, above the CSS code example.</codeComment>
 *   <resultComment>A comment rendered beneath the Result header.</resultComment>
 *
 *   <script type="multiline-template">
 *     .foo {color: red;}
 *   </script>
 * </lk-css-example>
 *

 *
 *

 *
Tag Attributes:

 *

 *

Name	Description

 *
width	Width of the rendered example

 *

 *

 *
 * @module lkCssExampleTag
 */
var lkCssExampleTag = (function(tzGeneralUtils, tzDomHelper, tzCustomTagHelper, tzCodeHighlighter) {
  "use strict";

  var codeCommentExpression = new RegExp("<codeComment>((.|\n)*)<\/codeComment>", "ig");
  var resultCommentExpression = new RegExp("<resultComment>((.|\n)*)<\/resultComment>", "ig");

  return {
    /**
     * Return the name of this tag.
     *
     * @returns {string}
     */
    getTagName: function() {
      return "lk-css-example";
    },

    /**
     * Render all <lk-css-example> tags on the page.
     */
    renderAll: function() {
      tzCustomTagHelper.renderAll(this);
    },

    /**
     * Render the <lk-css-example> tag identified by the given tagId.
     *
     * @param tagId ID of the tag to render.
     */
    renderTagById: function(tagId) {
      tzCustomTagHelper.renderTagById(this, tagId);
    },

    /**
     * Render the given lkCssExampleTagNode.
     *
     * @param lkCssExampleTagNode the node to retrieve the attributes from and then render the result to.
     */
    renderTag: function(lkCssExampleTagNode) {
      var cssError = "";
      var codeComment = tzCustomTagHelper.getFirstMatchedGroup(lkCssExampleTagNode, codeCommentExpression);

      // get the raw css from the script tag
      var rawCss = tzDomHelper.getFirstElementFromNodeByTagName(lkCssExampleTagNode, "script");

      // replace the leading newline and trailing white-space.
      rawCss = rawCss.replace(/^[\n]|[\s]+$/g, "");

      // error if empty
      if (tzGeneralUtils.isEmpty(rawCss)) {
        cssError = "CSS Template was not found";
      }

      // build the context
      var context = {
        "codeComment": codeComment,
        "rawCss": rawCss,
        "resultComment": tzCustomTagHelper.getFirstMatchedGroup(lkCssExampleTagNode, resultCommentExpression),
        "width": lkCssExampleTagNode.getAttribute("width"),
        "height": lkCssExampleTagNode.getAttribute("height"),

        "injectCode": lkCssExampleTagNode.getAttribute("injectCode") || true
      };

      // remove child nodes (e.g., optional comment nodes)
      tzDomHelper.removeAllChildNodes(lkCssExampleTagNode);

      // check for error
      if (tzGeneralUtils.isEmpty(cssError)) {
        this.render(lkCssExampleTagNode, context);
      } else {
        tzDomHelper.createElementWithAdjacentHtml(lkCssExampleTagNode, "p", '{"style.color":"red"}', cssError);
      }
    },

    /**
     * Render the code examples and live code block, into the given containerNode.
     *
     * @param containerNode where to render the result.
     * @param context object containing the values needed to render the result:
     *

     *
codeComment: optional comment to render above the CSS example code block.
     *
rawCss: the CSS code to insert.
     *
resultComment: optional comment to render above the live result.
     *
width: optional width (hack) to force the zebra stripes to fill the entire code area when scrolling is required.
     *
height: optional height.
     *
     *
injectCode: if true (default), then inject the raw CSS into the DOM; otherwise, the code is not injected.
     *                You may want to set this to false, if you want the code to be displayed, but don't want it to be injected.
     *

     */
    render: function(containerNode, context) {
      // render the CSS code with syntax highlighting
      tzCodeHighlighter.render(containerNode, {
        "heading": "CSS",
        "codeBlockComment": context.codeComment,
        "lang": "css",
        "width": context.width,
        "height": context.height,
        "rawCode": context.rawCss});

      // inject the live CSS code, if requested
      if (context.injectCode) {
        // render the live CSS
        if (tzGeneralUtils.isEmpty(context.rawCss)) {
          tzDomHelper.createElementWithAdjacentHtml(containerNode, "p", '{"style.color":"red"}', "Raw CSS is missing");
        } else {
          tzDomHelper.createElementWithAdjacentHtml(containerNode, "style", null, context.rawCss);
        }
      }

    }

  }

}(tzGeneralUtilsModule, tzDomHelperModule, tzCustomTagHelperModule, tzCodeHighlighterModule));


text:
class Api::StartController < Api::BaseController
  authorize_resource class: false

  def index
    @pinned = News.for_feed.pinned
    @unpinned = News.for_feed.unpinned.page(1).per(5)
    @events = Event.includes(:translations).stream

    render json: { pinned: serialize(@pinned),
                   unpinned: serialize(@unpinned, meta: pagination_meta(@unpinned)),
                   events: serialize(@events, namespace: '') }
  end

  private

  def serialize(collection, namespace: :Api, meta: nil)
    options = { meta: meta, namespace: namespace }
    ActiveModelSerializers::SerializableResource.new(collection, options)
  end
end

redpajama_set_name: RedPajamaGithub


text:
package main

import (
	"bufio"
	"errors"
	"fmt"
	"github.com/garyburd/redigo/redis"
	"io"
	"os"
	"os/exec"
	"regexp"
	"strconv"
	"strings"
)

var (
	rsyncOutputLine = regexp.MustCompile(`^.+\s+([0-9,]+)\s+([0-9/]+)+\s+([0-9:]+)\s+(.*)$`)
)

type RsyncScanner struct {
	scan *scan
}

func (r *RsyncScanner) Scan(url, identifier string, conn redis.Conn, stop chan bool) error {
	if !strings.HasPrefix(url, "rsync://") {
		return fmt.Errorf("%s does not start with rsync://", url)
	}

	// Always ensures there's a trailing slash
	if url[len(url)-1] != '/' {
		url = url + "/"
	}

	cmd := exec.Command("rsync", "-r", "--no-motd", "--timeout=30", "--contimeout=30", url)
	stdout, err := cmd.StdoutPipe()

	if err != nil {
		return err
	}

	// Pipe stdout
	reader := bufio.NewReader(stdout)

	if isStopped(stop) {
		return scanAborted
	}

	// Start the process
	if err := cmd.Start(); err != nil {
		return err
	}

	log.Info("[%s] Requesting file list via rsync...", identifier)

	// Get the list of all source files (we do not want to
	// index files than are not provided by the source)
	//sourceFiles, err := redis.Values(conn.Do("SMEMBERS", "FILES"))
	//if err != nil {
	//  log.Error("[%s] Cannot get the list of source files", identifier)
	//  return err
	//}

	count := 0

	line, err := readln(reader)
	for err == nil {
		var size int64
		var f filedata

		if isStopped(stop) {
			return scanAborted
		}

		// Parse one line returned by rsync
		ret := rsyncOutputLine.FindStringSubmatch(line)
		if ret[0][0] == 'd' || ret[0][0] == 'l' {
			// Skip directories and links
			goto cont
		}

		// Add the leading slash
		if ret[4][0] != '/' {
			ret[4] = "/" + ret[4]
		}

		// Remove the commas in the file size
		ret[1] = strings.Replace(ret[1], ",", "", -1)
		// Convert the size to int
		size, err = strconv.ParseInt(ret[1], 10, 64)
		if err != nil {
			log.Error("[%s] ScanRsync: Invalid size: %s", identifier, ret[1])
			goto cont
		}

		// Fill the struct
		f.size = size
		f.path = ret[4]

		if os.Getenv("DEBUG") != "" {
			//fmt.Printf("[%s] %s", identifier, f.path)
		}

		r.scan.ScannerAddFile(f)

		count++
	cont:
		line, err = readln(reader)
	}

	if err1 := cmd.Wait(); err1 != nil {
		switch err1.Error() {
		case "exit status 5":
			err1 = errors.New("rsync: Error starting client-server protocol")
			break
		case "exit status 10":
			err1 = errors.New("rsync: Error in socket I/O")
			break
		case "exit status 11":
			err1 = errors.New("rsync: Error in file I/O")
			break
		case "exit status 30":
			err1 = errors.New("rsync: Timeout in data send/receive")
			break
		default:
			err1 = errors.New("rsync: " + err1.Error())
		}
		return err1
	}

	if err != io.EOF {
		return err
	}

	return nil
}

func readln(r *bufio.Reader) (string, error) {
	var (
		isPrefix bool = true
		err      error
		line, ln []byte
	)
	for isPrefix && err == nil {
		line, isPrefix, err = r.ReadLine()
		ln = append(ln, line...)
	}
	return string(ln), err
}


text:
from model.user import User
from sys import maxsize

def test_add_user(app):
    old_users=app.user.get_user_list()
    user=User(fname="Jana", lname="Geddis", title="Manager", company="KPMG", address="Moscow, Smolenskaya emb.", phoneh="9876612",
                         email="jana.geddis@kpmg.com", byear= "1988")
    app.user.create(user)
    assert len(old_users) + 1 == app.user.count()
    new_users=app.user.get_user_list()
    old_users.append(user)
    assert sorted(old_users,key=User.id_or_max) == sorted(new_users,key=User.id_or_max)


text:
(function () {

/**
 * RemoteCommand のテスト
 */

var modules = {};
Components.utils.import("resource://hatenabookmark/modules/82-RemoteCommand.js", modules);

QUnit.module("RemoteCommand");

// autoload の代わり
// 必要なのか?
hBookmark.loadModules();
hBookmark.load("chrome://hatenabookmark/content/common/");
//hBookmark.load("chrome://hatenabookmark/content/browser/");

var lastOpendURI = null;
var createXHRMock = (function (options) {
    if (!options) options = {};
    /*
     * options のプロパティとしては以下のものがありえる (全てオプション)
     *   errors: 配列; エラーを記録するためのもの
     *   responseGenerator: レスポンスを生成する関数;
     *      引数として URL をとり, 返り値は { status: 200, responseText: "" } 形式のオブジェクト
     */

    var defaultResponseGenerator = function (uri) {
        return {
            status: 200,
            responseText: "",
        };
    };
    var responseGenerator = options.responseGenerator || defaultResponseGenerator;

    var XHRMock = function () {
        this._errors = options.errors || [];
        this._typeListenersMapOnBubbling = {};
        this._typeListenersMapOnCapturing = {};
    };
    XHRMock.prototype.open = function (method, uri, doAsync) {
        this._uri = uri;
        this._doAsync = doAsync;
        lastOpendURI = uri;
    };
    XHRMock.prototype.send = function () {
        var that = this;
        var proc = function () {
            // response を用意
            var res = responseGenerator(that._uri);
            that.readyState = 4;
            that.status = res.status;
            that.responseText = res.responseText;
            // ん?
            if (that.onreadystatechange) {
                that.onreadystatechange();
            }
            that.__dispatchEvent("load", that);
        };
        if (this._doAsync) {
            setTimeout(function () { proc() }, 10);
        } else {
            proc();
        }
    };
    XHRMock.prototype.__dispatchEvent = function (type, evtDetail) {
        var evt = { type: type };
        var that = this;
        var listeners = [];
        if (this._typeListenersMapOnCapturing[type]) {
            listeners = listeners.concat(this._typeListenersMapOnCapturing[type]);
        }
        if (this._typeListenersMapOnBubbling[type]) {
            listeners = listeners.concat(this._typeListenersMapOnBubbling[type]);
        }
        listeners.forEach(function (listener) {
            try {
                if (typeof listener === "function") {
                    listener(evt);
                } else if (listener.handleEvent) {
                    listener.handleEvent(evt);
                }
            } catch (err) {
                that._errors.push(err);
            }
        });
    };
    XHRMock.prototype.__addEventListener = function (type, listener, map) {
        var alreadyContained = false;
        if (!map[type]) {
            map[type] = [];
        } else {
            var fl = map[type].filter(function (l) { return l === listener });
            alreadyContained = (fl.length > 0);
        }
        if (!alreadyContained) map[type].push(listener);
    };
    XHRMock.prototype.addEventListener = function (type, listener, useCapture) {
        var map = (useCapture ? this._typeListenersMapOnBubbling
                              : this._typeListenersMapOnCapturing);
        this.__addEventListener(type, listener, map);
    };
    XHRMock.prototype.setRequestHeader = function () {
    };
    return XHRMock;
});

QUnit.asyncTest("通信が正常に完了する場合 (edit コマンド; onComplete あり)", 5, function () {
    var pOrder = [];

    let cmd = new modules.RemoteCommand("edit", {
        user: { name: "foo", rks: "bar" },
        onComplete: function () {
            ok(true, "オプションで `onComplete` を渡した場合, 通信成功時にはそれが呼ばれる");
            pOrder.push(1);
        },
        onError: function () {
            ok(false, "オプションで `onError` を渡した場合, 通信成功時にはそれは呼ばれない");
            pOrder.push("NG");
        },
    });

    cmd.createListener("complete", function (evt) {
        ok(true, "complete イベントのリスナを登録していた場合, 通信成功時にはそれが呼ばれる");
        pOrder.push(2);
    });
    cmd.createListener("error", function (evt) {
        ok(false, "error イベントのリスナを登録していた場合, 通信成功時にはそれは呼ばれない");
        pOrder.push("NG");
    });

    var callbackErrors = [];
    cmd._MyXMLHttpRequest = createXHRMock({ errors: callbackErrors });
    cmd.execute();

    setTimeout(function () {
        // editer=fxaddon がクエリパラメータとして追加される
        equal(lastOpendURI, "http://b.hatena.ne.jp/foo/add.edit.json" + "?editer=fxaddon");
        equal(callbackErrors.length, 0);

        deepEqual(pOrder, [1,2]);

        QUnit.start();
    }, 100);
});

QUnit.asyncTest("通信が正常に完了する場合 (edit コマンド; onComplete なし)", 4, function () {
    var pOrder = [];

    let cmd = new modules.RemoteCommand("edit", {
        user: { name: "foo", rks: "bar" },
        onError: function () {
            ok(false, "オプションで `onError` を渡した場合, 通信成功時にはそれは呼ばれない");
            pOrder.push("NG");
        },
    });

    cmd.createListener("complete", function (evt) {
        ok(true, "complete イベントのリスナを登録していた場合, 通信成功時にはそれが呼ばれる");
        pOrder.push(1);
    });
    cmd.createListener("error", function (evt) {
        ok(false, "error イベントのリスナを登録していた場合, 通信成功時にはそれは呼ばれない");
        pOrder.push("NG");
    });

    var callbackErrors = [];
    cmd._MyXMLHttpRequest = createXHRMock({ errors: callbackErrors });
    cmd.execute();

    setTimeout(function () {
        // editer=fxaddon がクエリパラメータとして追加される
        equal(lastOpendURI, "http://b.hatena.ne.jp/foo/add.edit.json" + "?editer=fxaddon");
        equal(callbackErrors.length, 0);

        deepEqual(pOrder, [1]);

        QUnit.start();
    }, 100);
});

QUnit.asyncTest("通信が正常に完了しない場合 (edit コマンド; onError あり)", 5, function () {
    var pOrder = [];

    let cmd = new modules.RemoteCommand("edit", {
        user: { name: "foo", rks: "bar" },
        timeout: 0.040,
        onComplete: function () {
            ok(false, "オプションで `onComplete` を渡した場合, 通信失敗時にはそれは呼ばれない");
            pOrder.push("NG");
        },
        onError: function () {
            ok(true, "オプションで `onError` を渡した場合, 通信失敗時にはそれが呼ばれる");
            pOrder.push(1);
        },
    });

    cmd.createListener("complete", function (evt) {
        ok(false, "complete イベントのリスナを登録していた場合, 通信失敗時にはそれは呼ばれない");
        pOrder.push("NG");
    });
    cmd.createListener("error", function (evt) {
        ok(true, "error イベントのリスナを登録していた場合, 通信失敗時にはそれが呼ばれる");
        pOrder.push(2);
    });

    var callbackErrors = [];
    cmd._MyXMLHttpRequest = createXHRMock({
        errors: callbackErrors,
        responseGenerator: function (uri) {
            return {
                status: 500,
                responseText: "Server Error",
            };
        },
    });
    cmd.execute();

    setTimeout(function () {
        // editer=fxaddon がクエリパラメータとして追加される
        equal(lastOpendURI, "http://b.hatena.ne.jp/foo/add.edit.json" + "?editer=fxaddon");
        equal(callbackErrors.length, 0);

        deepEqual(pOrder, [1,2]);

        QUnit.start();
    }, 400); // 40 ms のタイムアウトで 3 回リトライするので長めに待つ必要がある
});

QUnit.asyncTest("通信が正常に完了しない場合 (edit コマンド; onError なし)", 4, function () {
    var pOrder = [];

    let cmd = new modules.RemoteCommand("edit", {
        user: { name: "foo", rks: "bar" },
        timeout: 0.040,
        onComplete: function () {
            ok(false, "オプションで `onComplete` を渡した場合, 通信失敗時にはそれは呼ばれない");
            pOrder.push("NG");
        },
    });

    cmd.createListener("complete", function (evt) {
        ok(false, "complete イベントのリスナを登録していた場合, 通信失敗時にはそれは呼ばれない");
        pOrder.push("NG");
    });
    cmd.createListener("error", function (evt) {
        ok(true, "error イベントのリスナを登録していた場合, 通信失敗時にはそれが呼ばれる");
        pOrder.push(1);
    });

    var callbackErrors = [];
    cmd._MyXMLHttpRequest = createXHRMock({
        errors: callbackErrors,
        responseGenerator: function (uri) {
            return {
                status: 500,
                responseText: "Server Error",
            };
        },
    });
    cmd.execute();

    setTimeout(function () {
        // editer=fxaddon がクエリパラメータとして追加される
        equal(lastOpendURI, "http://b.hatena.ne.jp/foo/add.edit.json" + "?editer=fxaddon");
        equal(callbackErrors.length, 0);

        deepEqual(pOrder, [1]);

        QUnit.start();
    }, 400); // 40 ms のタイムアウトで 3 回リトライするので長めに待つ必要がある
});

}).call(this);


text:
FOUNDATION_EXPORT double DLLocalNotificationsVersionNumber;

//! Project version string for DLLocalNotifications.
FOUNDATION_EXPORT const unsigned char DLLocalNotificationsVersionString[];

// In this header, you should import all the public headers of your framework using statements like #import <DLLocalNotifications/PublicHeader.h>


text:
package opentsdb

const (
	// DefaultBindAddress is the default address that the service binds to.
	DefaultBindAddress = ":4242"

	// DefaultDatabase is the default database used for writes.
	DefaultDatabase = "opentsdb"

	// DefaultRetentionPolicy is the default retention policy used for writes.
	DefaultRetentionPolicy = ""

	// DefaultConsistencyLevel is the default write consistency level.
	DefaultConsistencyLevel = "one"
)

type Config struct {
	Enabled          bool   `toml:"enabled"`
	BindAddress      string `toml:"bind-address"`
	Database         string `toml:"database"`
	RetentionPolicy  string `toml:"retention-policy"`
	ConsistencyLevel string `toml:"consistency-level"`
}

func NewConfig() Config {
	return Config{
		BindAddress:      DefaultBindAddress,
		Database:         DefaultDatabase,
		RetentionPolicy:  DefaultRetentionPolicy,
		ConsistencyLevel: DefaultConsistencyLevel,
	}
}

// WithDefaults takes the given config and returns a new config with any required
// default values set.
func (c *Config) WithDefaults() *Config {
	d := *c
	if d.BindAddress == "" {
		d.BindAddress = DefaultBindAddress
	}
	if d.Database == "" {
		d.Database = DefaultDatabase
	}
	if d.RetentionPolicy == "" {
		d.RetentionPolicy = DefaultRetentionPolicy
	}
	if d.ConsistencyLevel == "" {
		d.ConsistencyLevel = DefaultConsistencyLevel
	}
	return &d
}


text:
struct VGA_gfx
{
  enum modes_t {
    MODE_320_200_256,
    MODE_640_480_16,
  };
  static void set_mode(modes_t mode);

  static int width() { return m_width; }
  static int height() { return m_height; }
  static int bits()  { return m_bits; }

  static void set_palette(const uint32_t colors[256]);
  static void apply_default_palette();

  // clears screen fast with given color
  static void clear(uint8_t color = 0);
  // blits to screen from SSE-aligned backbuffer
  static void blit_from(const void*);

  static inline void* address() noexcept
  {
    return VGA_gfx::m_address;
  }
  static inline size_t size() noexcept
  {
    return width() * height() * bits() / 8;
  }

private:
  static void write_regs(uint8_t[]);

  static int m_width;
  static int m_height;
  static int m_bits;
  static void* m_address;
};


text:
package me.bayes.sitemap.vertx;

import org.vertx.java.busmods.BusModBase;
import org.vertx.java.core.eventbus.Message;
import org.vertx.java.core.json.JsonObject;
import org.vertx.java.core.logging.Logger;
import org.vertx.java.platform.Container;

/**
 * Created by kevinbayes on 2014/12/01.
 */
public class SitemapMod extends BusModBase {

    public void start() {
        super.start();

        Context.container = container;

        String prefix = config != null ? config.getString("prefix", "") : "";

        eb.registerHandler(prefix + "sitemap.append", new AppendHandler());

    }

    public static class Context {

        public static Container container;

        public static final JsonObject config() {
            return container.config();
        }

        public static final Logger log() {
            return container.logger();
        }

    }
}


text:
from __future__ import unicode_literals

from django.db import models, migrations

class Migration(migrations.Migration):

    dependencies = [
        ('zotero', '0003_auto_20160218_1614'),
    ]

    operations = [
        migrations.AlterModelOptions(
            name='draftauthority',
            options={'verbose_name': 'draft authority record', 'verbose_name_plural': 'draft authority records'},
        ),
        migrations.AlterField(
            model_name='draftacrelation',
            name='type_controlled',
            field=models.CharField(max_length=2, choices=[('AU', 'Author'), ('ED', 'Editor'), ('AD', 'Advisor'), ('CO', 'Contributor'), ('TR', 'Translator'), ('SU', 'Subject'), ('CA', 'Category'), ('PU', 'Publisher'), ('SC', 'School'), ('IN', 'Institution'), ('ME', 'Meeting'), ('PE', 'Periodical'), ('BS', 'Book Series')]),
        ),
        migrations.AlterField(
            model_name='draftauthority',
            name='type_controlled',
            field=models.CharField(blank=True, max_length=2, null=True, choices=[('PE', 'Person'), ('IN', 'Institution'), ('TI', 'Time Period'), ('GE', 'Geographic Term'), ('SE', 'Serial Publication'), ('CT', 'Classification Term'), ('CO', 'Concept'), ('CW', 'Creative Work'), ('EV', 'Event'), ('CR', 'Cross-reference'), ('PU', 'Publisher')]),
        ),
        migrations.AlterField(
            model_name='draftcitation',
            name='type_controlled',
            field=models.CharField(blank=True, max_length=2, null=True, choices=[('BO', 'Book'), ('AR', 'Article'), ('CH', 'Chapter'), ('RE', 'Review'), ('ES', 'Essay Review'), ('TH', 'Thesis'), ('EV', 'Event'), ('PR', 'Presentation'), ('IN', 'Interactive Resource'), ('WE', 'Website'), ('AP', 'Application')]),
        ),
    ]


text:
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent" xmlns:tools="http://schemas.android.com/tools">

  <TextView
      android:id="@+id/text_view_api_key_label"
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      android:layout_marginBottom="@dimen/activity_vertical_margin"
      android:layout_marginLeft="@dimen/activity_horizontal_margin"
      android:layout_marginRight="@dimen/activity_horizontal_margin"
      android:layout_marginTop="@dimen/activity_vertical_margin"
      android:text="@string/api_key_label"/>
  <EditText
      android:id="@+id/edit_text_api_key_value"
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      android:inputType="none"
      android:text="Name"
      android:ems="10"
      android:layout_alignParentTop="true"
      android:layout_alignParentEnd="true"
      android:layout_toEndOf="@id/text_view_api_key_label"/>
  <android.support.v7.widget.RecyclerView
      android:id="@+id/recycler_hosts"
      android:layout_width="match_parent"
      android:layout_height="match_parent"
      android:layout_below="@id/text_view_api_key_label"
      android:layout_above="@+id/reset_button"
      tools:listitem="@layout/host_view"/>
  <Button
      android:id="@+id/reset_button"
      android:text="@string/reset"
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      android:layout_alignParentBottom="true"
      android:layout_alignParentLeft="true"/>
  <Button
      android:id="@+id/save_button"
      android:text="@string/save"
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      android:layout_alignParentBottom="true"
      android:layout_alignParentEnd="true"
      android:layout_marginEnd="13dp"
      android:layout_toEndOf="@id/reset_button"/>

</RelativeLayout>


text:
<stix:STIX_Package
	xmlns:cyboxCommon="http://cybox.mitre.org/common-2"
	xmlns:cybox="http://cybox.mitre.org/cybox-2"
	xmlns:cyboxVocabs="http://cybox.mitre.org/default_vocabularies-2"
	xmlns:example="http://example.com"
	xmlns:incident="http://stix.mitre.org/Incident-1"
	xmlns:ta="http://stix.mitre.org/ThreatActor-1"
	xmlns:stixCommon="http://stix.mitre.org/common-1"
	xmlns:stixVocabs="http://stix.mitre.org/default_vocabularies-1"
	xmlns:stix-ciqidentity="http://stix.mitre.org/extensions/Identity#CIQIdentity3.0-1"
	xmlns:stix="http://stix.mitre.org/stix-1"
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xmlns:xal="urn:oasis:names:tc:ciq:xal:3"
	xmlns:xnl="urn:oasis:names:tc:ciq:xnl:3"
	xmlns:xpil="urn:oasis:names:tc:ciq:xpil:3"
	xsi:schemaLocation="
	http://cybox.mitre.org/common-2 http://cybox.mitre.org/XMLSchema/common/2.1/cybox_common.xsd
	http://cybox.mitre.org/cybox-2 http://cybox.mitre.org/XMLSchema/core/2.1/cybox_core.xsd
	http://cybox.mitre.org/default_vocabularies-2 http://cybox.mitre.org/XMLSchema/default_vocabularies/2.1/cybox_default_vocabularies.xsd
	http://stix.mitre.org/Incident-1 http://stix.mitre.org/XMLSchema/incident/1.1.1/incident.xsd
	http://stix.mitre.org/ThreatActor-1 http://stix.mitre.org/XMLSchema/threat_actor/1.1.1/threat_actor.xsd
	http://stix.mitre.org/common-1 http://stix.mitre.org/XMLSchema/common/1.1.1/stix_common.xsd
	http://stix.mitre.org/default_vocabularies-1 http://stix.mitre.org/XMLSchema/default_vocabularies/1.1.1/stix_default_vocabularies.xsd
	http://stix.mitre.org/extensions/Identity#CIQIdentity3.0-1 http://stix.mitre.org/XMLSchema/extensions/identity/ciq_3.0/1.1.1/ciq_3.0_identity.xsd
	http://stix.mitre.org/stix-1 http://stix.mitre.org/XMLSchema/core/1.1.1/stix_core.xsd
	urn:oasis:names:tc:ciq:xal:3 http://stix.mitre.org/XMLSchema/external/oasis_ciq_3.0/xAL.xsd
	urn:oasis:names:tc:ciq:xnl:3 http://stix.mitre.org/XMLSchema/external/oasis_ciq_3.0/xNL.xsd
	urn:oasis:names:tc:ciq:xpil:3 http://stix.mitre.org/XMLSchema/external/oasis_ciq_3.0/xPIL.xsd" id="example:Package-0c251475-c1f8-41fb-94c6-2bb9fc669f97" version="1.1.1" timestamp="2013-04-12T22:29:56+00:00">
    <stix:Incidents>
        <stix:Incident id="example:incident-a63e8a89-09d4-4b63-9f6b-6a65e56ae283" timestamp="2014-04-27T19:37:02+00:00" xsi:type='incident:IncidentType'>
            <incident:External_ID source="VERIS">734E58A7-BC86-4979-9E54-3BD354EA1223</incident:External_ID>
            <incident:Time>
                <incident:Initial_Compromise precision="day">2010-09-10T00:00:00</incident:Initial_Compromise>
                <incident:Incident_Discovery precision="month">2010-12-31T00:00:00</incident:Incident_Discovery>
            </incident:Time>
            <incident:Victim xsi:type='stix-ciqidentity:CIQIdentity3.0InstanceType'>
                <ExtSch:Specification xmlns:ExtSch="http://stix.mitre.org/extensions/Identity#CIQIdentity3.0-1">
  <xpil:PartyName xmlns:xpil="urn:oasis:names:tc:ciq:xpil:3">
    <xnl:NameLine xmlns:xnl="urn:oasis:names:tc:ciq:xnl:3">Saint Barnabas Medical Center</xnl:NameLine>
  </xpil:PartyName>
  <xpil:Addresses xmlns:xpil="urn:oasis:names:tc:ciq:xpil:3">
    <xpil:Address>
      <xal:Country xmlns:xal="urn:oasis:names:tc:ciq:xal:3">
        <xal:NameElement>US</xal:NameElement>
      </xal:Country>
      <xal:AdministrativeArea xmlns:xal="urn:oasis:names:tc:ciq:xal:3">
        <xal:NameElement>NJ</xal:NameElement>
      </xal:AdministrativeArea>
    </xpil:Address>
  </xpil:Addresses>
</ExtSch:Specification>
            </incident:Victim>
            <incident:Affected_Assets>
                <incident:Affected_Asset>
                    <incident:Type>Flash drive</incident:Type>
                    <incident:Nature_Of_Security_Effect>
                        <incident:Property_Affected>
                            <incident:Property xsi:type="stixVocabs:LossPropertyVocab-1.0">Confidentiality</incident:Property>
                            <incident:Description_Of_Effect>Medical: 3630</incident:Description_Of_Effect>
                        </incident:Property_Affected>
                        <incident:Property_Affected>
                            <incident:Property xsi:type="stixVocabs:LossPropertyVocab-1.0">Availability</incident:Property>
                            <incident:Type_Of_Availability_Loss xsi:type="stixVocabs:AvailabilityLossTypeVocab-1.1.1">Loss</incident:Type_Of_Availability_Loss>
                        </incident:Property_Affected>
                    </incident:Nature_Of_Security_Effect>
                </incident:Affected_Asset>
            </incident:Affected_Assets>
            <incident:Impact_Assessment>
                <incident:Impact_Qualification xsi:type="stixVocabs:ImpactQualificationVocab-1.0">Unknown</incident:Impact_Qualification>
            </incident:Impact_Assessment>
            <incident:Attributed_Threat_Actors>
                <incident:Threat_Actor>
                    <stixCommon:Threat_Actor idref="example:threatactor-626460fe-d183-424a-928a-b525116d0077" xsi:type='ta:ThreatActorType'/>
                </incident:Threat_Actor>
            </incident:Attributed_Threat_Actors>
            <incident:Security_Compromise xsi:type="stixVocabs:SecurityCompromiseVocab-1.0">Yes</incident:Security_Compromise>
            <incident:Discovery_Method xsi:type="stixVocabs:DiscoveryMethodVocab-1.0">Unknown</incident:Discovery_Method>
            <incident:Information_Source>
                <stixCommon:Identity>
                    <stixCommon:Name>vcdb</stixCommon:Name>
                </stixCommon:Identity>
                <stixCommon:Tools>
                    <cyboxCommon:Tool>
                        <cyboxCommon:Name>veris2stix</cyboxCommon:Name>
                        <cyboxCommon:Vendor>MITRE</cyboxCommon:Vendor>
                        <cyboxCommon:Version>0.1</cyboxCommon:Version>
                    </cyboxCommon:Tool>
                    <cyboxCommon:Tool>
                        <cyboxCommon:Name>VERIS schema</cyboxCommon:Name>
                        <cyboxCommon:Vendor>Verizon</cyboxCommon:Vendor>
                        <cyboxCommon:Version>1.3.0</cyboxCommon:Version>
                    </cyboxCommon:Tool>
                </stixCommon:Tools>
            </incident:Information_Source>
        </stix:Incident>
    </stix:Incidents>
    <stix:Threat_Actors>
        <stix:Threat_Actor id="example:threatactor-626460fe-d183-424a-928a-b525116d0077" timestamp="2014-12-22T16:29:37.804000+00:00" xsi:type='ta:ThreatActorType'>
            <ta:Identity xsi:type='stix-ciqidentity:CIQIdentity3.0InstanceType'>
                <ExtSch:Specification xmlns:ExtSch="http://stix.mitre.org/extensions/Identity#CIQIdentity3.0-1">
  <xpil:Addresses xmlns:xpil="urn:oasis:names:tc:ciq:xpil:3">
    <xpil:Address>
      <xal:Country xmlns:xal="urn:oasis:names:tc:ciq:xal:3">
        <xal:NameElement>Unknown</xal:NameElement>
      </xal:Country>
    </xpil:Address>
  </xpil:Addresses>
</ExtSch:Specification>
            </ta:Identity>
            <ta:Motivation timestamp="2014-12-22T16:29:37.804000+00:00">
                <stixCommon:Value>NA</stixCommon:Value>
            </ta:Motivation>
        </stix:Threat_Actor>
    </stix:Threat_Actors>
</stix:STIX_Package>


text:
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using TestStack.BDDfy.Reporters.Readers;
using TestStack.BDDfy.Reporters.Writers;

namespace TestStack.BDDfy.Reporters.Html
{
    public class HtmlReporter : IBatchProcessor
    {
        public IReportBuilder ReportBuilder { get; set; }
        private readonly IReportWriter _writer;
        private readonly IFileReader _fileReader;
        readonly IHtmlReportConfiguration _configuration;
        public HtmlReportModel Model { get; private set; }

        public HtmlReporter(IHtmlReportConfiguration configuration)
            : this(configuration, new ClassicReportBuilder())
        {
        }

        public HtmlReporter(IReportBuilder reportBuilder)
            : this(new DefaultHtmlReportConfiguration(), reportBuilder)
        {
        }

        public HtmlReporter(IHtmlReportConfiguration configuration, IReportBuilder htmlReportBuilder)
            : this(configuration, htmlReportBuilder, new FileWriter(), new FileReader())
        {
        }

        public HtmlReporter(
            IHtmlReportConfiguration configuration,
            IReportBuilder reportBuilder,
            IReportWriter writer,
            IFileReader reader)
        {
            _configuration = configuration;
            ReportBuilder = reportBuilder;
            _writer = writer;
            _fileReader = reader;
        }

        public void Process(IEnumerable<Story> stories)
        {
            var allowedStories = stories.Where(s => _configuration.RunsOn(s)).ToList();
            WriteOutHtmlReport(allowedStories.ToReportModel());
        }

        void WriteOutHtmlReport(ReportModel reportModel)
        {
            Model = new HtmlReportModel(_configuration, reportModel);
            LoadCustomScripts();
            string report;

            try
            {
                report = ReportBuilder.CreateReport(Model);
            }
            catch (Exception ex)
            {
                report = ex.Message + ex.StackTrace;
            }

            _writer.OutputReport(report, _configuration.OutputFileName, _configuration.OutputPath);
        }

        private void LoadCustomScripts()
        {
            var customStylesheet = Path.Combine(_configuration.OutputPath, "BDDfyCustom.css");
            if (_fileReader.Exists(customStylesheet))
                Model.CustomStylesheet = _fileReader.Read(customStylesheet);

            var customJavascript = Path.Combine(_configuration.OutputPath, "BDDfyCustom.js");
            if (_fileReader.Exists(customJavascript))
                Model.CustomJavascript = _fileReader.Read(customJavascript);
        }
    }
}


text:
package ru.stqa.course.rest.appmanager;

import com.jayway.restassured.RestAssured;

/**
 * Created by Оля on 01.10.2016.
 */
public class ApplicationManager {

  public void init() {
    RestAssured.authentication = RestAssured.basic("LSGjeU4yP1X493ud1hNniA==", "");
  }

}


text:
const int MAX_BONES = 26;

//--------------------------------------------------------------------------------------
// Name: struct D3DXFRAME_DERIVED
// Desc: Structure derived from D3DXFRAME so we can add some app-specific
//       info that will be stored with each frame
//--------------------------------------------------------------------------------------
struct D3DXFRAME_DERIVED : public D3DXFRAME
{
    D3DXMATRIXA16 CombinedTransformationMatrix;
};

//--------------------------------------------------------------------------------------
// Name: struct D3DXMESHCONTAINER_DERIVED
// Desc: Structure derived from D3DXMESHCONTAINER so we can add some app-specific
//       info that will be stored with each mesh
//--------------------------------------------------------------------------------------
struct D3DXMESHCONTAINER_DERIVED : public D3DXMESHCONTAINER
{
    // SkinMesh info
    LPD3DXATTRIBUTERANGE pAttributeTable;
    DWORD NumAttributeGroups;
    DWORD NumInfl;
    LPD3DXBUFFER pBoneCombinationBuf;
    D3DXMATRIX** ppBoneMatrixPtrs;
    D3DXMATRIX* pBoneOffsetMatrices;
    DWORD NumPaletteEntries;
};

//--------------------------------------------------------------------------------------
// Name: class CAllocateHierarchy
// Desc: Custom version of ID3DXAllocateHierarchy with custom methods to create
//       frames and meshcontainers.
//--------------------------------------------------------------------------------------
class CAllocateHierarchy : public ID3DXAllocateHierarchy
{
public:
    STDMETHOD( CreateFrame )( THIS_ LPCSTR Name, LPD3DXFRAME *ppNewFrame );
    STDMETHOD( CreateMeshContainer )( THIS_
        LPCSTR Name,
        CONST D3DXMESHDATA *pMeshData,
        CONST D3DXMATERIAL *pMaterials,
        CONST D3DXEFFECTINSTANCE *pEffectInstances,
        DWORD NumMaterials,
        CONST DWORD *pAdjacency,
        LPD3DXSKININFO pSkinInfo,
        LPD3DXMESHCONTAINER *ppNewMeshContainer );
    STDMETHOD( DestroyFrame )( THIS_ LPD3DXFRAME pFrameToFree );
    STDMETHOD( DestroyMeshContainer )( THIS_ LPD3DXMESHCONTAINER pMeshContainerBase );

            CAllocateHierarchy()
            {
            }
    HRESULT FilterMesh( IDirect3DDevice9* pd3dDevice, ID3DXMesh* pMeshIn, ID3DXMesh** ppMeshOut );
};

// Public functions
HRESULT SetupBoneMatrixPointersOnMesh( LPD3DXMESHCONTAINER pMeshContainer, D3DXFRAME* pFrameRoot );
HRESULT SetupBoneMatrixPointers( LPD3DXFRAME pFrame, D3DXFRAME* pFrameRoot );
void UpdateFrameMatrices( LPD3DXFRAME pFrameBase, const D3DXMATRIX* pParentMatrix );
void UpdateSkinningMethod( LPD3DXFRAME pFrameBase );
HRESULT GenerateSkinnedMesh( IDirect3DDevice9* pd3dDevice, D3DXMESHCONTAINER_DERIVED* pMeshContainer );

#endif //_SKINMESH_H


text:
<form name="ajax_frm_msg_del" id="ajax_frm_msg_del" method="post" action="<?php echo base_url().'private_message/delete_message'?>">

<?php echo t('Are you sure you want to delete the message?')?>

		  		<input type="hidden" name="h_msg_id" id="h_msg_id" value="<?php echo $i_msg_id?>" />
				<input name="btn_sub"  class="pink_button01" type="submit" value="Yes" />

				<input name="btn_sub"  class="pink_button01" type="submit" value="No" />

</form>


text:
package fakes

import (
	"sync"

	"github.com/concourse/atc/db"
	"github.com/concourse/atc/pipelines"
)

type FakePipelinesDB struct {
	GetAllActivePipelinesStub        func() ([]db.SavedPipeline, error)
	getAllActivePipelinesMutex       sync.RWMutex
	getAllActivePipelinesArgsForCall []struct{}
	getAllActivePipelinesReturns     struct {
		result1 []db.SavedPipeline
		result2 error
	}
}

func (fake *FakePipelinesDB) GetAllActivePipelines() ([]db.SavedPipeline, error) {
	fake.getAllActivePipelinesMutex.Lock()
	fake.getAllActivePipelinesArgsForCall = append(fake.getAllActivePipelinesArgsForCall, struct{}{})
	fake.getAllActivePipelinesMutex.Unlock()
	if fake.GetAllActivePipelinesStub != nil {
		return fake.GetAllActivePipelinesStub()
	} else {
		return fake.getAllActivePipelinesReturns.result1, fake.getAllActivePipelinesReturns.result2
	}
}

func (fake *FakePipelinesDB) GetAllActivePipelinesCallCount() int {
	fake.getAllActivePipelinesMutex.RLock()
	defer fake.getAllActivePipelinesMutex.RUnlock()
	return len(fake.getAllActivePipelinesArgsForCall)
}

func (fake *FakePipelinesDB) GetAllActivePipelinesReturns(result1 []db.SavedPipeline, result2 error) {
	fake.GetAllActivePipelinesStub = nil
	fake.getAllActivePipelinesReturns = struct {
		result1 []db.SavedPipeline
		result2 error
	}{result1, result2}
}

var _ pipelines.PipelinesDB = new(FakePipelinesDB)


text:
namespace boost { namespace geometry { namespace concepts {

template <typename Geometry>
class Quaternion
{
#ifndef DOXYGEN_NO_CONCEPT_MEMBERS

    //typedef typename coordinate_type<Geometry>::type ctype;
    //typedef typename coordinate_system<Geometry>::type csystem;

    template <typename G, std::size_t I, std::size_t N>
    struct dimension_checker
    {
        static void apply()
        {
            G* g = 0;
            geometry::set<I>(*g, geometry::get<I>(*g));
            dimension_checker<G, I+1, N>::apply();
        }
    };

    template <typename G, std::size_t N>
    struct dimension_checker<G, N, N>
    {
        static void apply() {}
    };

public:

    /// BCCL macro to apply the Vector concept
    BOOST_CONCEPT_USAGE(Quaternion)
    {
        //static const bool dim_check = dimension<Geometry>::value == 4;
        //BOOST_GEOMETRY_STATIC_ASSERT(dim_check, "INVALID_DIMENSION", RotationQuaternion);
        //static const bool cs_check = std::is_same<csystem, cs::cartesian>::value;
        //BOOST_GEOMETRY_STATIC_ASSERT(cs_check, "NOT_IMPLEMENTED_FOR_THIS_CS", csystem);

        dimension_checker<Geometry, 0, 4>::apply();
    }
#endif
};

template <typename Geometry>
class ConstQuaternion
{
#ifndef DOXYGEN_NO_CONCEPT_MEMBERS

    //typedef typename coordinate_type<Geometry>::type ctype;
    //typedef typename coordinate_system<Geometry>::type csystem;

    template <typename G, std::size_t I, std::size_t N>
    struct dimension_checker
    {
        static void apply()
        {
            const G* g = 0;
            typename coordinate_type<Geometry>::type coord(geometry::get<I>(*g));
            boost::ignore_unused(coord);
            dimension_checker<G, I+1, N>::apply();
        }
    };

    template <typename G, std::size_t N>
    struct dimension_checker<G, N, N>
    {
        static void apply() {}
    };

public:

    /// BCCL macro to apply the ConstVector concept
    BOOST_CONCEPT_USAGE(ConstQuaternion)
    {
        //static const bool dim_check = dimension<Geometry>::value == 4;
        //BOOST_GEOMETRY_STATIC_ASSERT(dim_check, "INVALID_DIMENSION", ConstRotationQuaternion);
        //static const bool cs_check = std::is_same<csystem, cs::cartesian>::value;
        //BOOST_GEOMETRY_STATIC_ASSERT(cs_check, "NOT_IMPLEMENTED_FOR_THIS_CS", csystem);

        dimension_checker<Geometry, 0, 4>::apply();
    }
#endif
};

}}} // namespace boost::geometry::concepts

#endif // BOOST_GEOMETRY_EXTENSIONS_ALGEBRA_GEOMETRIES_CONCEPTS_QUATERNION_CONCEPT_HPP


text:
"""Sync pipeline for testing."""

from tfx.dsl.compiler import compiler
from tfx.dsl.component.experimental.annotations import InputArtifact
from tfx.dsl.component.experimental.annotations import OutputArtifact
from tfx.dsl.component.experimental.decorators import component
from tfx.dsl.experimental.conditionals import conditional
from tfx.orchestration import pipeline as pipeline_lib
from tfx.proto.orchestration import pipeline_pb2
from tfx.types import standard_artifacts

@component
def _example_gen(examples: OutputArtifact[standard_artifacts.Examples]):
  del examples

@component
def _statistics_gen(
    examples: InputArtifact[standard_artifacts.Examples],
    statistics: OutputArtifact[standard_artifacts.ExampleStatistics]):
  del examples, statistics

@component
def _schema_gen(statistics: InputArtifact[standard_artifacts.ExampleStatistics],
                schema: OutputArtifact[standard_artifacts.Schema]):
  del statistics, schema

@component
def _example_validator(
    statistics: InputArtifact[standard_artifacts.ExampleStatistics],
    schema: InputArtifact[standard_artifacts.Schema],
    anomalies: OutputArtifact[standard_artifacts.ExampleAnomalies]):
  del statistics, schema, anomalies

@component
def _transform(
    examples: InputArtifact[standard_artifacts.Examples],
    schema: InputArtifact[standard_artifacts.Schema],
    transform_graph: OutputArtifact[standard_artifacts.TransformGraph]):
  del examples, schema, transform_graph

@component
def _trainer(examples: InputArtifact[standard_artifacts.Examples],
             schema: InputArtifact[standard_artifacts.Schema],
             transform_graph: InputArtifact[standard_artifacts.TransformGraph],
             model: OutputArtifact[standard_artifacts.Model]):
  del examples, schema, transform_graph, model

@component
def _evaluator(model: InputArtifact[standard_artifacts.Model],
               evals: OutputArtifact[standard_artifacts.ModelEvaluation]):
  del model, evals

@component
def _chore():
  pass

def create_pipeline() -> pipeline_pb2.Pipeline:
  """Builds a test pipeline."""
  # pylint: disable=no-value-for-parameter
  example_gen = _example_gen().with_id('my_example_gen')
  stats_gen = _statistics_gen(
      examples=example_gen.outputs['examples']).with_id('my_statistics_gen')
  schema_gen = _schema_gen(
      statistics=stats_gen.outputs['statistics']).with_id('my_schema_gen')
  example_validator = _example_validator(
      statistics=stats_gen.outputs['statistics'],
      schema=schema_gen.outputs['schema']).with_id('my_example_validator')
  transform = _transform(
      examples=example_gen.outputs['examples'],
      schema=schema_gen.outputs['schema']).with_id('my_transform')
  trainer = _trainer(
      examples=example_gen.outputs['examples'],
      schema=schema_gen.outputs['schema'],
      transform_graph=transform.outputs['transform_graph']).with_id(
          'my_trainer')

  # Nodes with no input or output specs for testing task only dependencies.
  chore_a = _chore().with_id('chore_a')
  chore_a.add_upstream_node(trainer)
  chore_b = _chore().with_id('chore_b')
  chore_b.add_upstream_node(chore_a)

  with conditional.Cond(
      trainer.outputs['model'].future()[0].custom_property('evaluate') == 1):
    evaluator = _evaluator(
        model=trainer.outputs['model']).with_id('my_evaluator')
  # pylint: enable=no-value-for-parameter

  pipeline = pipeline_lib.Pipeline(
      pipeline_name='my_pipeline',
      pipeline_root='/path/to/root',
      components=[
          example_gen,
          stats_gen,
          schema_gen,
          example_validator,
          transform,
          trainer,
          evaluator,
          chore_a,
          chore_b,
      ],
      enable_cache=True)
  dsl_compiler = compiler.Compiler()
  return dsl_compiler.compile(pipeline)


text:
<?php namespace AdammBalogh\Box\Wrapper\Response;

class Entry
{
    /**
     * @var string
     */
    public $identity;
}


text:
/**
 * Returns a log scale for the specified domain. The arguments to this
 * constructor are optional, and equivalent to calling {@link #domain}.
 * The default domain is [1,10] and the default range is [0,1].
 *
 * @class Represents a log scale.  Most commonly, a log scale
 * represents a 1-dimensional log transformation from a numeric domain of input
 * data [d0, d1] to a numeric range of
 * pixels [r0, r1]. The equation for such a
 * scale is:
 *
 *
f(x) = (log(x) - log(d0)) / (log(d1) -
 * log(d0)) * (r1 - r0) +
 * r0

 *
 * where log(x) represents the zero-symmetric logarthim of x using
 * the scale's associated base (default: 10, see {@link pv.logSymmetric}). For
 * example, a log scale from the domain [1, 100] to range [0, 640]:
 *
 *
f(x) = (log(x) - log(1)) / (log(100) - log(1)) * (640 - 0) + 0

 * f(x) = log(x) / 2 * 640

 * f(x) = log(x) * 320

 *

 *
 * Thus, saying
 *
 *
    .height(function(d) Math.log(d) * 138.974)

 *
 * is equivalent to
 *
 *
    .height(pv.Scale.log(1, 100).range(0, 640))

 *
 * Note that the scale is itself a function, and thus can be used as a property
 * directly, assuming that the data associated with a mark is a number. While
 * this is convenient for single-use scales, frequently it is desirable to
 * define scales globally:
 *
 *
var y = pv.Scale.log(1, 100).range(0, 640);

 *
 * The <tt>y</tt> scale can now be equivalently referenced within a property:
 *
 *
    .height(function(d) y(d))

 *
 * Alternatively, if the data are not simple numbers, the appropriate value can
 * be passed to the <tt>y</tt> scale (e.g., <tt>d.foo</tt>). The {@link #by}
 * method similarly allows the data to be mapped to a numeric value before
 * performing the log transformation.
 *
 * @param {number...} domain... optional domain values.
 * @extends pv.Scale.quantitative
 */
pv.Scale.log = function() {
  var scale = pv.Scale.quantitative(1, 10),
      b, // logarithm base
      p, // cached Math.log(b)
      /** @ignore */ log = function(x) { return Math.log(x) / p; },
      /** @ignore */ pow = function(y) { return Math.pow(b, y); };

  /**
   * Returns an array of evenly-spaced, suitably-rounded values in the input
   * domain. These values are frequently used in conjunction with
   * {@link pv.Rule} to display tick marks or grid lines.
   *
   * @function
   * @name pv.Scale.log.prototype.ticks
   * @returns {number[]} an array input domain values to use as ticks.
   */
  scale.ticks = function() {
    // TODO support non-uniform domains
    var d = scale.domain(),
        n = d[0] < 0,
        i = Math.floor(n ? -log(-d[0]) : log(d[0])),
        j = Math.ceil(n ? -log(-d[1]) : log(d[1])),
        ticks = [];
    if (n) {
      ticks.push(-pow(-i));
      for (; i++ < j;) for (var k = b - 1; k > 0; k--) ticks.push(-pow(-i) * k);
    } else {
      for (; i < j; i++) for (var k = 1; k < b; k++) ticks.push(pow(i) * k);
      ticks.push(pow(i));
    }
    for (i = 0; ticks[i] < d[0]; i++); // strip small values
    for (j = ticks.length; ticks[j - 1] > d[1]; j--); // strip big values
    return ticks.slice(i, j);
  };

  /**
   * Formats the specified tick value using the appropriate precision, assuming
   * base 10.
   *
   * @function
   * @name pv.Scale.log.prototype.tickFormat
   * @param {number} t a tick value.
   * @returns {string} a formatted tick value.
   */
  scale.tickFormat = function(t) {
    return t.toPrecision(1);
  };

  /**
   * "Nices" this scale, extending the bounds of the input domain to
   * evenly-rounded values. This method uses {@link pv.logFloor} and
   * {@link pv.logCeil}. Nicing is useful if the domain is computed dynamically
   * from data, and may be irregular. For example, given a domain of
   * [0.20147987687960267, 0.996679553296417], a call to <tt>nice()</tt> might
   * extend the domain to [0.1, 1].
   *
   *
This method must be invoked each time after setting the domain (and
   * base).
   *
   * @function
   * @name pv.Scale.log.prototype.nice
   * @returns {pv.Scale.log} <tt>this</tt>.
   */
  scale.nice = function() {
    // TODO support non-uniform domains
    var d = scale.domain();
    return scale.domain(pv.logFloor(d[0], b), pv.logCeil(d[1], b));
  };

  /**
   * Sets or gets the logarithm base. Defaults to 10.
   *
   * @function
   * @name pv.Scale.log.prototype.base
   * @param {number} [v] the new base.
   * @returns {pv.Scale.log} <tt>this</tt>, or the current base.
   */
  scale.base = function(v) {
    if (arguments.length) {
      b = Number(v);
      p = Math.log(b);
      scale.transform(log, pow); // update transformed domain
      return this;
    }
    return b;
  };

  scale.domain.apply(scale, arguments);
  return scale.base(10);
};


text:
package com.opengamma.analytics.financial.provider.calculator.blackswaption;

import com.opengamma.analytics.financial.interestrate.InstrumentDerivativeVisitorAdapter;
import com.opengamma.analytics.financial.interestrate.swaption.derivative.SwaptionCashFixedCompoundedONCompounded;
import com.opengamma.analytics.financial.interestrate.swaption.derivative.SwaptionCashFixedIbor;
import com.opengamma.analytics.financial.interestrate.swaption.derivative.SwaptionPhysicalFixedCompoundedONCompounded;
import com.opengamma.analytics.financial.interestrate.swaption.derivative.SwaptionPhysicalFixedIbor;
import com.opengamma.analytics.financial.interestrate.swaption.provider.SwaptionCashFixedCompoundedONCompoundedBlackMethod;
import com.opengamma.analytics.financial.interestrate.swaption.provider.SwaptionCashFixedIborBlackMethod;
import com.opengamma.analytics.financial.interestrate.swaption.provider.SwaptionPhysicalFixedCompoundedONCompoundedBlackMethod;
import com.opengamma.analytics.financial.interestrate.swaption.provider.SwaptionPhysicalFixedIborBlackMethod;
import com.opengamma.analytics.financial.provider.description.interestrate.BlackSwaptionFlatProviderInterface;
import com.opengamma.analytics.financial.provider.sensitivity.multicurve.MultipleCurrencyMulticurveSensitivity;

/**
 * Calculator of the present value as a multiple currency amount.
 */
public final class PresentValueCurveSensitivityBlackSwaptionCalculator
    extends InstrumentDerivativeVisitorAdapter<BlackSwaptionFlatProviderInterface, MultipleCurrencyMulticurveSensitivity> {

  /**
   * The unique instance of the calculator.
   */
  private static final PresentValueCurveSensitivityBlackSwaptionCalculator INSTANCE = new PresentValueCurveSensitivityBlackSwaptionCalculator();

  /**
   * Gets the calculator instance.
   *
   * @return The calculator.
   */
  public static PresentValueCurveSensitivityBlackSwaptionCalculator getInstance() {
    return INSTANCE;
  }

  /**
   * Constructor.
   */
  private PresentValueCurveSensitivityBlackSwaptionCalculator() {
  }

  /** Pricing method for physically-settled swaptions */
  private static final SwaptionPhysicalFixedIborBlackMethod METHOD_SWT_PHYS = SwaptionPhysicalFixedIborBlackMethod.getInstance();
  /** Pricing method for cash-settled swaptions */
  private static final SwaptionCashFixedIborBlackMethod METHOD_SWT_CASH = SwaptionCashFixedIborBlackMethod.getInstance();

  @Override
  public MultipleCurrencyMulticurveSensitivity visitSwaptionPhysicalFixedIbor(final SwaptionPhysicalFixedIbor swaption,
      final BlackSwaptionFlatProviderInterface black) {
    return METHOD_SWT_PHYS.presentValueCurveSensitivity(swaption, black);
  }

  @Override
  public MultipleCurrencyMulticurveSensitivity visitSwaptionCashFixedIbor(final SwaptionCashFixedIbor swaption,
      final BlackSwaptionFlatProviderInterface black) {
    return METHOD_SWT_CASH.presentValueCurveSensitivity(swaption, black);
  }

  @Override
  public MultipleCurrencyMulticurveSensitivity visitSwaptionPhysicalFixedCompoundedONCompounded(
      final SwaptionPhysicalFixedCompoundedONCompounded swaption,
      final BlackSwaptionFlatProviderInterface curves) {
    return SwaptionPhysicalFixedCompoundedONCompoundedBlackMethod.getInstance().presentValueCurveSensitivity(swaption, curves);
  }

  @Override
  public MultipleCurrencyMulticurveSensitivity visitSwaptionCashFixedCompoundedONCompounded(
      final SwaptionCashFixedCompoundedONCompounded swaption,
      final BlackSwaptionFlatProviderInterface curves) {
    return SwaptionCashFixedCompoundedONCompoundedBlackMethod.getInstance().presentValueCurveSensitivity(swaption, curves);
  }

}


text:
module DslHelper

  class Proxy
    attr_accessor :options

    def initialize(options, valid_keys, source)
      @valid_keys = valid_keys
      @source = source

      @options = options
    end

    def method_missing(name, *args, &block)
      if @valid_keys.include?(name)
        options[name] = Array(options[name])
        options[name] << block if block
        options[name] += Array(args)
      else
        @source.send name, *args, &block
      end
    end
  end

  def add_options_from_dsl(options, valid_keys, &block)
    proxy = Proxy.new(options, valid_keys, self)
    proxy.instance_eval(&block)
    proxy.options
  end

end


text:
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using Spark.Compiler;
using Spark.Parser;
using Spark.Parser.Syntax;
using System.IO;
using System;
using Spark;
using System.Diagnostics;
using System.Reflection;
using SparkSense.Parser;

namespace SparkSense.Parsing
{
    public class ViewExplorer : IViewExplorer
    {
        private IProjectExplorer _projectExplorer;
        private ViewLoader _viewLoader;
        private readonly string _viewPath;
        private TypeNavigator _typeNavigator;

        public ViewExplorer(IProjectExplorer projectExplorer, string viewPath)
        {
            if (projectExplorer == null)
                throw new ArgumentNullException("projectExplorer", "Project Explorer is null. We need a hook into the VS Environment");

            _projectExplorer = projectExplorer;
            _viewPath = viewPath;
            _viewLoader = new ViewLoader
            {
                ViewFolder = _projectExplorer.GetViewFolder(),
                SyntaxProvider = new CompletionSyntaxProvider()
            };
            InitViewChunks();
        }

        public IList<string> GetRelatedPartials()
        {
            return _viewLoader.FindPartialFiles(_viewPath);
        }

        public IList<string> GetGlobalVariables()
        {
            var globalVariables = new List<string>();

            GetAllChunks<GlobalVariableChunk>()
                .ToList()
                .ForEach(globalVar => globalVariables.Add(globalVar.Name));

            return globalVariables;
        }

        public IList<string> GetLocalVariables()
        {
            var allLocalVariables = new List<string>();
            var locals = GetLocalVariableChunks();
            var assigned = GetAssignedVariableChunks();
            var viewData = GetViewDataVariableChunks();

            locals.ToList().ForEach(x => allLocalVariables.Add(x.Name));
            assigned.ToList().ForEach(x => allLocalVariables.Add(x.Name));
            viewData.ToList().ForEach(x => allLocalVariables.Add(x.Name));

            return allLocalVariables;
        }

        public IEnumerable<ViewDataChunk> GetViewDataVariableChunks()
        {
            return GetViewChunks<ViewDataChunk>();
        }

        public IEnumerable<AssignVariableChunk> GetAssignedVariableChunks()
        {
            return GetViewChunks<AssignVariableChunk>();
        }

        public IEnumerable<LocalVariableChunk> GetLocalVariableChunks()
        {
            return GetViewChunks<LocalVariableChunk>();
        }

        public IList<string> GetPossibleMasterLayouts()
        {
            var possibleMasters = new List<string>();
            possibleMasters.AddRange(GetPossibleMasterFiles("Layouts"));
            possibleMasters.AddRange(GetPossibleMasterFiles("Shared"));
            return possibleMasters;
        }

        public IList<string> GetPossiblePartialDefaults(string partialName)
        {
            var partialDefaults = new List<string>();
            var scopeChunks = GetViewChunks<ScopeChunk>();
            var renderPartialChunks = scopeChunks.SelectMany(sc => ((ScopeChunk)sc).Body).Where(c => c is RenderPartialChunk);
            var partialChunk = renderPartialChunks.Where(pc => ((RenderPartialChunk)pc).Name == String.Format("_{0}", partialName)).FirstOrDefault() as RenderPartialChunk;
            if (partialChunk == null) return partialDefaults;

            var paramenters = partialChunk.FileContext.Contents.Where(c => c is DefaultVariableChunk);
            paramenters.ToList().ForEach(p => partialDefaults.Add(((DefaultVariableChunk)p).Name));
            return partialDefaults;
        }

        public IList<string> GetContentNames()
        {
            var contentNames = new List<string>();
            var contentChunks = GetAllChunks<UseContentChunk>();
            contentChunks.ToList().ForEach(x => contentNames.Add((x.Name)));
            return contentNames;
        }

        public IList<string> GetLocalMacros()
        {
            var localMacros = new List<string>();
            var locals = GetViewChunks<MacroChunk>();
            locals.ToList().ForEach(x => localMacros.Add(x.Name));
            return localMacros;
        }

        public IList<string> GetMacroParameters(string macroName)
        {
            var macroParams = new List<string>();
            var macro = GetViewChunks<MacroChunk>().Where(chunk => chunk.Name == macroName).FirstOrDefault();
            if (macro == null) return macroParams;
            ((MacroChunk)macro).Parameters.ToList().ForEach(p => macroParams.Add(p.Name));
            return macroParams;
        }

        public TypeNavigator GetTypeNavigator()
        {
            if (_typeNavigator != null) return _typeNavigator;
            return _typeNavigator = new TypeNavigator(_projectExplorer.GetProjectReferencedTypes());
        }

        public IList<string> GetMembers()
        {

            return new List<string>() { "Testing", "123" };
        }

        public void InvalidateView(string newContent)
        {
            _projectExplorer.SetViewContent(_viewPath, newContent);
            _viewLoader.EvictEntry(_viewPath);
        }

        private IEnumerable<T> GetViewChunks<T>()
        {
            var chunks =
                LoadChunks(_viewPath)
                .Where(chunk => chunk is T).Cast<T>();
            return chunks;
        }

        private IList<Chunk> LoadChunks(string viewPath)
        {
            try
            {
                return _viewLoader.Load(viewPath) ?? new List<Chunk>();
            }
            catch (CompilerException)
            {
                return new List<Chunk>();
            }
        }

        private IEnumerable<T> GetAllChunks<T>()
        {
            LoadChunks(_viewPath);
            var allChunks =
                _viewLoader.GetEverythingLoaded()
                .SelectMany(list => list)
                .Where(chunk => chunk is T).Cast<T>();
            return allChunks;
        }

        private bool TryLoadMaster(string masterFile)
        {
            var locator = new DefaultTemplateLocator();
            var master = locator.LocateMasterFile(_viewLoader.ViewFolder, masterFile);

            if (master.ViewFile == null) return false;

            LoadChunks(master.Path);
            return true;
        }

        private void InitViewChunks()
        {
            if (_viewLoader == null) return;

            var useMaster = GetViewChunks<UseMasterChunk>().FirstOrDefault();
            if (useMaster != null && TryLoadMaster(useMaster.Name)) return;

            var controllerName = Path.GetDirectoryName(_viewPath);
            if (TryLoadMaster(controllerName)) return;

            TryLoadMaster("Application");

        }

        private IEnumerable<string> GetPossibleMasterFiles(string folder)
        {
            var possibleMasters = new List<string>();
            var masterFilePaths = _viewLoader.ViewFolder.ListViews(folder).Where(filePath => filePath.IsNonPartialSparkFile());
            masterFilePaths.ToList().ForEach(x => possibleMasters.Add(Path.GetFileNameWithoutExtension(x)));
            return possibleMasters;
        }

    }
}


text:
@implementation PFUpdateCommentCell

- (void)awakeFromNib
{
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated
{
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state

    self.myImageView.layer.masksToBounds = YES;
    self.myImageView.contentMode = UIViewContentModeScaleAspectFill;
}

@end


text:
/**
 *
 */
package com.ibm.storage.storagemanager.interfaces;

import com.ibm.storage.storagemanager.implementations.monitor.StorageStats;

/**
 * @author ArunIyengar
 *
 */
public interface KeyValueMonitored<K,V> extends KeyValue<K,V> {

    /**
     * Reset the StorageStats object to the initial state
     *
     * */
    public void clearStorageStats();

   /**
     * get data structure returning storage stats
     *
     * @return data structure containing storage stats
     *
     * */
    public StorageStats getStorageStats();

    /**
     * input new StorageStats data structure with customized values
     *
     * @param stats
     *            data structure with customized values
     *
     * */
    public void setStorageStats(StorageStats newStats);

}


text:
<?php

namespace Struzik\ErrorHandler\Exception;

/**
 * Exception for errors with type E_USER_DEPRECATED.
 */
class UserDeprecatedException extends ErrorException
{
}


text:
define({
  "taskUrl": "Ülesande URL",
  "setTask": "Määra",
  "setTaskPopupTitle": "Määra ülesanne",
  "validate": "Määra",
  "inValidGPService": "Sisestage kehtiv geotöötlusteenus.",
  "GPFeatureRecordSetLayerERR": "Palun sisestage geotöötlusteenus, mille sisendid on ainult tüüpi GPFeatureRecordSetLayer.",
  "invalidInputParameters": "Sisendparameetrite arv on kas alla 1 või enam kui 3. Sisestage kehtiv geotöötlusteenus.",
  "projectSetting": {
    "title": "Projekti seaded",
    "note": "Märkus: projekti seaded on valikulised, kui konfigureeritud kasutaja saab projekti salvestada veebikaardi soovitud kihtides koos võrgukatkestuse alaga ja sisendparameetritega. Kasutaja saab salvestada muid väljundparameetreid grupis "Väljund" vahekaardil "Sisend/väljund".",
    "projectPolygonLayer": "Projekti polügoonikiht",
    "outputParameterName": "Väljundparameetri nimi",
    "projectPointLayer": "Projekti punktikiht",
    "selectLabel": "Vali",
    "polygonLayerHelp": "
Näidatakse polügoonikihti (-kihte) järgmiste tingimustega:

Kihil peavad olema muutmisfunktsioonid, nimelt "Loo", "Kustuta" ja "Värskenda"

Kihil peab olema 2 välja täpse nime- ja andmetüübiga:

nimi (stringitüüpi väli)

globalid (GlobalID tüüpi väli)

",
    "outputParameterHelp": "
Näidatakse väljundpolügooni kihti (kihte) ülesande URL-ilt
",
    "pointLayerHelp": "
Näidatakse punktkihti (-kihte) järgmiste tingimustega:

Kihil peavad olema muutmisfunktsioonid, nimelt "Loo", "Kustuta" ja "Värskenda"

Kihil peab olema 2 välja täpse nime- ja andmetüübiga:

sisendi tüüp (stringitüüpi väli)

globalid (GUID-tüüpi väli)

"
  },
  "inputOutputTab": {
    "flag": "Lipp",
    "barrier": "Tõke",
    "skip": "Jäta vahele",
    "title": "Sisend/väljund",
    "inputSettingsLabel": "Sisendi seaded",
    "outputSettingsLabel": "Väljundi seaded",
    "inputLabel": "Märgis",
    "inputTooltip": "Kohtspikker",
    "symbol": "Sümbol",
    "typeText": "Tüüp",
    "outputParametersText": "Väljundi parameetrid",
    "saveToLayerText": "Salvesta kihti (valikuline)",
    "skipText": "Vahelejäetav",
    "visibilityText": "Nähtav",
    "exportToCsvText": "Ekspordi CSV formaati",
    "exportToCsvDisplayText": "CSV",
    "settitngstext": "Sätted",
    "addFieldTitle": "Lisa väli",
    "enterDisplayText": "Sisestage kuvatekst",
    "setScale": "Määra mõõtkava",
    "outputDisplay": "Kuvamise tekst",
    "saveToLayerHelp": "
Näidatakse kihti järgmiste tingimustega:

Kihil peavad olema muutmisfunktsioonid, nimelt "Loo", "Kustuta" ja "Värskenda"

Kihil peab olema kaks välja nime- ja andmetüübiga:

parameetri nimi (stringitüüpi väli)

globalid (Guid-tüüpi väli)

"
  },
  "summaryTab": {
    "title": "Üldseaded",
    "summaryFieldsetText": "Kokkuvõtte seaded",
    "inputOutput": "Sisend/väljund",
    "field": "Väli",
    "operator": "Operaator",
    "inputOperatorCountOption": "Koguarv",
    "outputOperatorCountOption": "Koguarv",
    "outputOperatorSkipCountOption": "Vahelejätmiste arv",
    "fieldOperatorSumOption": "Summa",
    "fieldOperatorMinOption": "Min",
    "fieldOperatorMaxOption": "Max",
    "fieldOperatorMeanOption": "Keskmine",
    "expressionAddButtonText": "Lisa",
    "expressionVerifyButtonText": "Kinnita",
    "summaryEditorText": "Kokkuvõtte tekst",
    "autoZoomAfterTrace": "Täiendavad valikud",
    "zoomText": "Automaatne suumimine pärast jälitamist",
    "summarSettingTooltipText": "Lisa sisendi/väljundi arvestus"
  },
  "validationErrorMessage": {
    "webMapError": "Aluskaardil ei ole kihte. Palun valige kehtiv veebikaart.",
    "inputTypeFlagGreaterThanError": "Lipikutüüpi sisendeid ei tohi olla rohkem kui üks.",
    "inputTypeFlagLessThanError": "Nõutav on vähemalt üks lipikutüüpi sisend.",
    "inputTypeBarrierErr": "Tõkketüüpi sisendeid ei tohi olla rohkem kui üks.",
    "inputTypeSkipErr": "Vahelejätmistüüpi sisendeid ei tohi olla rohkem kui üks.",
    "displayTextForButtonError": "Nupu "Käivita" kuvatekst ei tohi olla tühi.",
    "UnableToLoadGeoprocessError": "Ei saanud laadida geotöötlusteenust.",
    "invalidSummaryExpression": "Kehtetu avaldis",
    "validSummaryExpression": "Tehtud!",
    "invalidProjectSettings": "Kehtetud projektiseaded.
 Palun valige kehtiv väärtus väljal '${projectSetting}'."
  },
  "hintText": {
    "labelTextHint": "Vihje: sisestage väljundparameetri tulemusplaani kuvatav silt",
    "displayTextHint": "Vihje: see kuvatakse selle väljundparameetri üksikasjade paneelil.",
    "inputTextHint": "Vihje: koostage ülaltoodud avaldis, valides sisendi, väljundi ja väljanimed",
    "expressionHint": "Vihje: avaldise koostamiseks valige üksused ja klõpsake nuppu Lisa."
  }
});


text:
namespace exegesis {

// Represents an opcode of an instruction set architecture. Based on the
// architectures we've encountered so far (x86, x86-64, ARM, Power), we're
// assuming that the opcode has at most 32 bits and that the first byte of the
// opcode is either non-zero, or the opcode has only one byte.
//
// This class is a thin wrapper over uint32_t that provides strong types and
// removes operations such as integer arithmetics that are not well defined for
// the opcodes.
class Opcode {
 public:
  // A hasher that allows using the Opcode in hash-tables (such as,
  // std::unordered_map, std::unordered_set, or absl::flat_hash_map).
  //
  // Example usage:
  // using OpcodeSet = std::unordered_set<Opcode, Opcode::Hasher>;
  struct Hasher {
    constexpr size_t operator()(const Opcode& opcode) const {
      return static_cast<size_t>(opcode.value());
    }
  };

  // An opcode with a value that does not correspond to any existing opcode in
  // the architectures supported by EXEgesis.
  static constexpr Opcode InvalidOpcode() {
    return Opcode(kInvalidOpcodeValue);
  }

  constexpr Opcode() : value_(kInvalidOpcodeValue) {}
  explicit constexpr Opcode(uint32_t value) : value_(value) {}
  constexpr Opcode(const Opcode& opcode) = default;
  constexpr Opcode(Opcode&& opcode) = default;

  // Defines the "natural" assignment and comparison operators to allow using
  // the Opcode class in maps, ...
  // There is no arithmetic, because using arithmetic operations on the opcode
  // is not a well defined operation.
  Opcode& operator=(const Opcode& opcode) = default;
  Opcode& operator=(Opcode&& opcode) = default;
  constexpr inline bool operator==(const Opcode& opcode) const {
    return value_ == opcode.value_;
  }
  constexpr inline bool operator!=(const Opcode& opcode) const {
    return value_ != opcode.value_;
  }
  constexpr inline bool operator<(const Opcode& opcode) const {
    return value_ < opcode.value_;
  }
  constexpr inline bool operator<=(const Opcode& opcode) const {
    return value_ <= opcode.value_;
  }
  constexpr inline bool operator>(const Opcode& opcode) const {
    return value_ > opcode.value_;
  }
  constexpr inline bool operator>=(const Opcode& opcode) const {
    return value_ >= opcode.value_;
  }

  // Returns the numerical value of the opcode.
  constexpr uint32_t value() const { return value_; }

  // Formats the opcode in the way used in the Intel manuals (uppercase
  // hexadecimal numbers, bytes are separated by spaces).
  std::string ToString() const;

 private:
  // An opcode value that is not used by any existing instruction. It is used to
  // initialize the Opcode objects using the default constructor.
  static constexpr uint32_t kInvalidOpcodeValue = 0xffffffff;

  uint32_t value_;
};

using OpcodeSet = absl::node_hash_set<Opcode, Opcode::Hasher>;

std::ostream& operator<<(std::ostream& os, const exegesis::Opcode& opcode);

}  // namespace exegesis

#endif  // EXEGESIS_BASE_OPCODE_H_


text: Time tracking API implemented with Django.


text:
package com.thinkaurelius.titan.graphdb.olap.computer;

import com.thinkaurelius.titan.core.TitanGraph;
import com.thinkaurelius.titan.core.TitanVertex;
import com.thinkaurelius.titan.diskstorage.EntryList;
import com.thinkaurelius.titan.diskstorage.configuration.Configuration;
import com.thinkaurelius.titan.diskstorage.keycolumnvalue.SliceQuery;
import com.thinkaurelius.titan.diskstorage.keycolumnvalue.scan.ScanMetrics;
import com.thinkaurelius.titan.graphdb.database.StandardTitanGraph;
import com.thinkaurelius.titan.graphdb.database.idhandling.IDHandler;
import com.thinkaurelius.titan.graphdb.idmanagement.IDManager;
import com.thinkaurelius.titan.graphdb.internal.RelationCategory;
import com.thinkaurelius.titan.graphdb.olap.QueryContainer;
import com.thinkaurelius.titan.graphdb.olap.VertexJobConverter;
import com.thinkaurelius.titan.graphdb.olap.VertexScanJob;
import com.thinkaurelius.titan.graphdb.tinkerpop.optimize.TitanVertexStep;
import com.thinkaurelius.titan.graphdb.vertices.PreloadedVertex;
import org.apache.tinkerpop.gremlin.process.computer.MessageCombiner;
import org.apache.tinkerpop.gremlin.process.computer.MessageScope;
import org.apache.tinkerpop.gremlin.process.computer.VertexProgram;
import org.apache.tinkerpop.gremlin.process.computer.traversal.TraversalVertexProgram;
import org.apache.tinkerpop.gremlin.structure.Direction;
import org.apache.tinkerpop.gremlin.structure.Vertex;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

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

/**
 * @author Matthias Broecheler (me@matthiasb.com)
 */
public class VertexProgramScanJob<M> implements VertexScanJob {

    private static final Logger log =
            LoggerFactory.getLogger(VertexProgramScanJob.class);

    private final IDManager idManager;
    private final FulgoraMemory memory;
    private final FulgoraVertexMemory<M> vertexMemory;
    private final VertexProgram<M> vertexProgram;

    private final MessageCombiner<M> combiner;

    private VertexProgramScanJob(IDManager idManager, FulgoraMemory memory,
                                FulgoraVertexMemory vertexMemory, VertexProgram<M> vertexProgram) {
        this.idManager = idManager;
        this.memory = memory;
        this.vertexMemory = vertexMemory;
        this.vertexProgram = vertexProgram;
        this.combiner = FulgoraUtil.getMessageCombiner(vertexProgram);
    }

    @Override
    public VertexProgramScanJob<M> clone() {
        return new VertexProgramScanJob<>(this.idManager, this.memory, this.vertexMemory, this.vertexProgram
                .clone());
    }

    @Override
    public void workerIterationStart(TitanGraph graph, Configuration config, ScanMetrics metrics) {
        vertexProgram.workerIterationStart(memory.asImmutable());
    }

    @Override
    public void workerIterationEnd(ScanMetrics metrics) {
        vertexProgram.workerIterationEnd(memory.asImmutable());
    }

    @Override
    public void process(TitanVertex vertex, ScanMetrics metrics) {
        PreloadedVertex v = (PreloadedVertex)vertex;
        long vertexId = v.longId();
        VertexMemoryHandler<M> vh = new VertexMemoryHandler(vertexMemory,v);
        v.setAccessCheck(PreloadedVertex.OPENSTAR_CHECK);
        if (idManager.isPartitionedVertex(vertexId)) {
            if (idManager.isCanonicalVertexId(vertexId)) {
                EntryList results = v.getFromCache(SYSTEM_PROPS_QUERY);
                if (results == null) results = EntryList.EMPTY_LIST;
                vertexMemory.setLoadedProperties(vertexId,results);
            }
            for (MessageScope scope : vertexMemory.getPreviousScopes()) {
                if (scope instanceof MessageScope.Local) {
                    M combinedMsg = null;
                    for (Iterator<M> msgIter = vh.receiveMessages(scope).iterator(); msgIter.hasNext(); ) {
                        M msg = msgIter.next();
                        if (combinedMsg==null) combinedMsg=msg;
                        else combinedMsg = combiner.combine(combinedMsg,msg);
                    }
                    if (combinedMsg!=null) vertexMemory.aggregateMessage(vertexId,combinedMsg,scope);
                }
            }
        } else {
            v.setPropertyMixing(vh);
            vertexProgram.execute(v, vh, memory);
        }
    }

    @Override
    public void getQueries(QueryContainer queries) {
        if (vertexProgram instanceof TraversalVertexProgram) {
            //TraversalVertexProgram currently makes the assumption that the entire star-graph around a vertex
            //is available (in-memory). Hence, this special treatment here.
            //TODO: After TraversalVertexProgram is adjusted, remove this
            queries.addQuery().direction(Direction.BOTH).edges();
            return;
        }

        for (MessageScope scope : vertexMemory.getPreviousScopes()) {
            if (scope instanceof MessageScope.Global) {
                queries.addQuery().direction(Direction.BOTH).edges();
            } else {
                assert scope instanceof MessageScope.Local;
                TitanVertexStep<Vertex> startStep = FulgoraUtil.getReverseTitanVertexStep((MessageScope.Local) scope,queries.getTransaction());
                QueryContainer.QueryBuilder qb = queries.addQuery();
                startStep.makeQuery(qb);
                qb.edges();
            }
        }
    }

    public static<M> Executor getVertexProgramScanJob(StandardTitanGraph graph, FulgoraMemory memory,
                                                  FulgoraVertexMemory vertexMemory, VertexProgram<M> vertexProgram) {
        VertexProgramScanJob<M> job = new VertexProgramScanJob<M>(graph.getIDManager(),memory,vertexMemory,vertexProgram);
        return new Executor(graph,job);
    }

    //Query for all system properties+edges and normal properties
    static final SliceQuery SYSTEM_PROPS_QUERY = new SliceQuery(
            IDHandler.getBounds(RelationCategory.PROPERTY, true)[0],
            IDHandler.getBounds(RelationCategory.PROPERTY,false)[1]);

    public static class Executor extends VertexJobConverter {

        private Executor(TitanGraph graph, VertexProgramScanJob job) {
            super(graph, job);
        }

        private Executor(final Executor copy) {
            super(copy);
        }

        @Override
        public List<SliceQuery> getQueries() {
            List<SliceQuery> queries = super.getQueries();
            queries.add(SYSTEM_PROPS_QUERY);
            return queries;
        }

        @Override
        public void workerIterationEnd(ScanMetrics metrics) {
            super.workerIterationEnd(metrics);
        }

        @Override
        public Executor clone() { return new Executor(this); }

    }

}


text:
repo="$1"

if [ -z "$repo" ]
then
    repo="pypi"
fi

make cleanall || exit 1

python2 setup.py sdist bdist_wheel || exit 1
python3 setup.py sdist bdist_wheel || exit 1

twine upload -r "$repo" dist/* || exit 1


text:
package com.polites.android;

public interface MoveAnimationListener {

	public void onMove(float x, float y);

}


text:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<title>M-Kernel: THREAD_CALL Struct Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>

<link href="search/search.css" rel="stylesheet" type="text/css"/>

<link href="doxygen.css" rel="stylesheet" type="text/css" />

M-Kernel

EmbeddedRTOS

Main Page

Related Pages

Modules

Data Structures

Files

          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)"
               onblur="searchBox.OnSearchFieldFocus(false)"
               onkeyup="searchBox.OnSearchFieldChange(event)"/>

Data Structures

Data Structure Index

Data Fields

 All Data Structures Functions Variables Typedefs Groups Pages

Data Fields

THREAD_CALL Struct Reference

Data Fields

const char * 	name

unsigned int 	stack_size

unsigned int 	priority

THREAD_FUNCTION 	fn

void * 	param

The documentation for this struct was generated from the following file:

core/thread.h

<address class="footer">
Generated on Wed Sep 12 2012 19:35:12 for M-Kernel by

 1.8.1.2
</address>


text:
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent">

    <com.handmark.pulltorefresh.library.PullToRefreshListView
        android:id="@+id/observations_list"
        android:layout_width="fill_parent"
        android:layout_height="fill_parent"
        android:orientation="vertical"/>

    <TextView
        android:id="@android:id/empty"
        android:layout_width="fill_parent"
        android:layout_height="fill_parent"
        android:padding="30dp"
        android:gravity="center"
        android:layout_centerInParent="true"
        style="@android:style/TextAppearance.Medium"
        android:text="@string/no_observations_yet" />

</RelativeLayout>


text:
<?php

require_once 'phing/util/DataStore.php';

use PHPMD\AbstractRenderer;
use PHPMD\Report;

/**
 * This class will remove files with violations from cache
 *
 * @category  PHP
 * @package   PHPMD
 * @author    Rui Filipe Da Cunha Alves <ruifil@ruifil.com>
 */
class PHPMDRendererRemoveFromCache extends AbstractRenderer
{
    /**
     * Cache data storage
     * @var DataStore
     */
    protected $cache;

    /**
     * Constructor
     *
     * @param DataStore $cache
     */
    public function __construct($cache)
    {
        $this->cache = $cache;
    }

    /**
     * This method will be called when the engine has finished the source
     * analysis phase. To remove file with violations from cache.
     *
     * @param Report $report
     * @return void
     */
    public function renderReport(Report $report)
    {
        foreach ($report->getRuleViolations() as $violation) {
            $fileName = $violation->getFileName();
            $this->cache->remove($fileName, null);
        }
    }
}


text:
var apiLogger = require('./logger');
var webSocketHelper = require('perspective-core-web-socket-helper');

function originIsAllowed(origin, config) {
  return origin === config.crossSiteRequest.allowedOrigin;
}

module.exports = function configure(wsServer, api, config) {

  wsServer.on('request', function(request){
    if (!originIsAllowed(request.origin, config)) {
      request.reject();
      apiLogger.info('Connection from origin ' + request.origin + ' rejected');
      return;
    }

    var connection = request.accept('perspective-protocol', request.origin);

    connection.on("message", function(message) {
      var errors = webSocketHelper.callCallbacksForMessage(message.utf8Data);

      if (errors) {
        apiLogger.info(errors);
        api('server').send("error", errors);
      }
    });

    apiLogger.info(connection.remoteAddress + " connected - Protocol Version " + connection.webSocketVersion);
    apiLogger.info(wsServer.connections.length + ' clients connected to WS');
  });

  wsServer.on('close', function(connection) {
    apiLogger.info(connection.remoteAddress + " disconnected");
    apiLogger.info(wsServer.connections.length + ' clients connected to WS');
  });
};


text:
    <input type="password"
       name="<?=esc_attr($this->getKey());?>"
       value="<?=esc_attr($this->getFieldValue());?>"
    />


text:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

    <meta http-equiv="content-type" content="text/html; charset=utf-8"/>
    <title>dislocated</title>
    <link rel="root" href=""/>
    <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.4.0/css/font-awesome.min.css">
    <link rel="stylesheet" type="text/css" href="../../css/jquery-ui-redmond.css"/>
    <link rel="stylesheet" type="text/css" href="../../css/style.css"/>
    <link rel="stylesheet" type="text/css" href="../../css/style-vis.css"/>
    <link rel="stylesheet" type="text/css" href="../../css/hint.css"/>

          home

          edit page
          issue tracker

          <gcse:search></gcse:search>

        This page pertains to UD version 2.

            It appears that you have Javascript disabled.
            Please consider enabling Javascript for this page to see the visualizations.

dislocated: dislocated elements

The dislocated relation is used for fronted or postposed elements
that do not fulfill the usual core grammatical relations of a
sentence. These elements often appear to be in the periphery of the sentence, and may be separated off with a comma intonation.

This is our office , me and Sam
dislocated(office, me)
cc(me, and)
conj(me, Sam)

The Mezza Luna : you should try it .
det(Luna-3, The-1)
compound(Luna-3, Mezza-2)
dislocated(try-7, Luna-3)
nsubj(try-7, you-5)
aux(try-7, should-6)
root(root-0, try-7)
obj(try-7, it-8)

The new Pakistani general , he 's just been elected .
dislocated(elected, general)
nsubj(elected, he)

dislocated in other languages:

[bej]

[bm]

[cop]

[de]

[el]

[en]

[fr]

[fro]

[ga]

[gsw]

[hy]

[it]

[ja]

[pcm]

[pt]

[ru]

[sl]

[sv]

[tr]

[u]

[vi]

[yue]

[zh]

© 2014–2021
            Universal Dependencies contributors.
            Site powered by Annodoc and brat
.


text:
package models

import (
    "gopkg.in/mgo.v2/bson"
)

type Subject struct {
    Id          bson.ObjectId `json:"id" bson:"_id"`
    Title       string        `form:"title" json:"title"`
    Description string        `form:"description" json:"description"`
    SubSubjects []Subject     `bson:",omitempty" json:"subsubjects"`
    Fields      []Field       `form:"fields" json:"fields"`
    Public      bool          `bson:",omitempty" json:"public"`
    Owner       string        `form:"owner" json:"owner"`
}


text:
#import "WXCallJSMethod.h"

@implementation WXCallJSMethod
{
    NSString *_moduleName;
}

- (instancetype)initWithModuleName:(NSString *)moduleName
                        methodName:(NSString *)methodName
                         arguments:(NSArray *)arguments
                          instance:(WXSDKInstance *)instance
{
    if (self = [super initWithMethodName:methodName arguments:arguments instance:instance]) {
        _moduleName = moduleName;
    }

    return self;
}

- (NSDictionary *)callJSTask
{
    return @{@"module":_moduleName ?: @"",
             @"method":self.methodName ?: @"",
             @"args":self.arguments ?: @[]};
}

@end


text:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="imagetoolbar" content="no" />
<title>{#edit_image.title}</title>

<link rel="stylesheet" type="text/css" href="../../css/index.php?type=im&theme=im&package=edit_css" />

	<form action="#action" method="get">

{#edit_image.save}

{#edit_image.revert}

{#edit_image.crop}

{#edit_image.resize}

{#edit_image.flip}

{#edit_image.rotate}

					{#edit_image.width}: <input type="text" id="resize_w" name="resize_w" class="text" size="4" />
					{#edit_image.height}: <input type="text" id="resize_h" name="resize_h" class="text" size="4" />
					<input id="resize_prop" name="resize_prop" type="checkbox" class="checkbox" value="true" checked="checked" />{#edit_image.constrain}

{#button.apply}

{#button.cancel}

					{#edit_image.top}: <input type="text" id="crop_y" name="crop_y" class="text" size="4" />
					{#edit_image.left}: <input type="text" id="crop_x" name="crop_x" class="text" size="4" />
					{#edit_image.width}: <input type="text" id="crop_w" name="crop_w" class="text" size="4" />
					{#edit_image.height}: <input type="text" id="crop_h" name="crop_h" class="text" size="4" />
					<input id="crop_prop" name="crop_prop" type="checkbox" class="checkbox" value="true" />{#edit_image.constrain}

{#button.apply}

{#button.cancel}

					<input id="flip_h" name="flip" type="radio" class="radio" value="h" />{#edit_image.horizontal}
					<input id="flip_v" name="flip" type="radio" class="radio" value="v" />{#edit_image.vertical}

{#button.apply}

{#button.cancel}

					<input id="rotate_90" name="rotate_angle" type="radio" class="radio" value="90" />90°
					<input id="rotate_180" name="rotate_angle" type="radio" class="radio" value="180" />180°
					<input id="rotate_270" name="rotate_angle" type="radio" class="radio" value="270" />270°

{#button.apply}

{#button.cancel}

					{#edit_image.save_as}: <input type="text" id="save_filename" name="save_filename" class="text" size="50" />

{#button.save}

{#button.cancel}

	</form>