text:
#ifndef __PTREE_UTILS_H
#define __PTREE_UTILS_H

// ---------------------------------------------------------------------------|
// Standard includes
// ---------------------------------------------------------------------------|
#include <string>

// ---------------------------------------------------------------------------|
// Boost includes
// ---------------------------------------------------------------------------|
#include <boost/property_tree/ptree.hpp>

// ---------------------------------------------------------------------------|
namespace YumaTest
{

// ---------------------------------------------------------------------------|
namespace PTreeUtils
{

/**
 * This file contains a number of utils to aid with accessing and
 * manipulating boost::property trees.
 */

/**
 * Display a property tree.
 * this isa  adebug utility thaht walks the entire property tree
 * printing out all entries.
 *
 * \param pt the property tree to walk.
 */
void Display( const boost::property_tree::ptree& pt );

/**
 * Populate from XML string.
 * Parse the xml formatted string into a property tree.
 *
 * \return A property tree;
 */
boost::property_tree::ptree ParseXMlString( const std::string& xmlString );

}} // namespace YumaTest::PTreeUtils

#endif // __PTREE_UTILS_H


text:
{% extends "base.html" %}
{% block head %}
    <link rel="stylesheet" type="text/css" href="/static/css/chat.css" />
    <link rel="stylesheet" type="text/css" href="/static/css/jquery.textcomplete.css" />
{% endblock %}
{% block body %}

                <form id="chat-form" action="/chat/message/stream" method="post">

                                <input id="chat-input" type="text" class="form-control"
                                name="content" autocomplete="off" required/>

                                    <button type="submit" class="btn btn-default">입력</button>

                </form>

몇 명?

{% endblock %}
{% block script %}

{% endblock %}

redpajama_set_name: RedPajamaGithub


text:
The command-line version of Spoon Studio is called XStudio.exe and can be found in the Spoon Studio installation directory. See below for a list of command-line arguments and options for the XStudio tool.

		Command
		Usage
		Description

        <path to XAPPL configuration file>
        /l <path to license file> [/o <path to output>] [/component] [/d] [/compressed] [/uncompressed] [/deletesandbox] [/v <version>] [/startupfile <virtual path to file>]

Builds the virtual application based on the application configuration file.

/l - Path the the license file. The license file needs to be stored in Unicode format.

/o - Path to the output file. This will override the setting in the XAPPL configuration file.

/component - Sets the Project Type to Component resulting in an SVM output rather than EXE output.

/d - Enables the Generate diagnostic-mode executable setting.

/compressed - Enables the Compress payload setting.

/uncompressed - Disables the Compress payload setting.

/deletesandbox - Enables the Delete sandbox on application shutdown setting.

/v - Sets the Version of the output exe.

/startupfile - Sets the Startup File of the virtual application.

/before

        /beforepath <path to where snapshot file is saved>

Performs a before snapshot and saves the snapshot to the specified folder.

/beforepath - Path to the where the snapshot file is saved.

/after

/beforepath <path to where snapshot is saved> /o <path to where XAPPL configuration file is saved>

Performs an after snapshot using the specified before snapshot path.

/beforepath - Path to the before snapshot file.

/o - Path to where the XAPPL configuration file is saved.

/import

        /i <path to the configuration file to be imported> /o <path to where XAPPL configuration file is saved>

Import MSI, AXT, or ThinApp configurations.

/i - Path to the configuration file to import.

/o - Path to where the XAPPL configuration file is saved.

**Note:** Configuration files that are generated from the command-line after using the **/after** flag do not have an output file specified in the **XAPPL** configuration file. When using scripting for snapshots, it may be necessary to apply changes to the generated **XAPPL** file, either manually or programmatically.

**Note:** If running XStudio displays the error, "<SandboxCollision> is missing from the string table", it is because the XStudio application cannot be run while Spoon Studio is also running. Spoon Studio must be closed before running XStudio via the command line.


text:
'use strict';
var React = require('react');
var url = require('url');
var _ = require('underscore');
var graph = require('./graph');
var globals = require('./globals');
var dbxref = require('./dbxref');
var search = require('./search');
var StatusLabel = require('./statuslabel').StatusLabel;
var Citation = require('./publication').Citation;
var audit = require('./audit');

var Graph = graph.Graph;
var JsonGraph = graph.JsonGraph;
var AuditIndicators = audit.AuditIndicators;
var AuditDetail = audit.AuditDetail;
var AuditMixin = audit.AuditMixin;

var DbxrefList = dbxref.DbxrefList;

var Panel = function (props) {
    // XXX not all panels have the same markup
    var context;
    if (props['@id']) {
        context = props;
        props = {context: context};
    }
    var PanelView = globals.panel_views.lookup(props.context);
    return <PanelView {...props} />;
};

var Pipeline = module.exports.Pipeline = React.createClass({
    mixins: [AuditMixin],

    getInitialState: function() {
        return {
            infoNodeId: '' // ID of node whose info panel is open
        };
    },

    assembleGraph: function() {
        var jsonGraph;
        var analysis_steps = this.props.context.analysis_steps;

        // Only produce a graph if there's at least one analysis step
        if (analysis_steps && analysis_steps.length) {
            // Make an object with all step UUIDs in the pipeline
            var allSteps = {};
            analysis_steps.forEach(function(step) {
                allSteps[step['@id']] = step;
            });

            // Create an empty graph architecture
            jsonGraph = new JsonGraph(this.props.context.accession);

            // Add files and their steps as nodes to the graph
            analysis_steps.forEach(step => {
                var stepId = step['@id'];
                var swVersionList = [];
                var label;

                // Make an array of step types
                var stepTypesList = step.analysis_step_types.map(function(type) {
                    return type;
                });

                // Collect software version titles
                if (step.current_version) {
                    var software_versions = step.current_version.software_versions;
                    swVersionList = software_versions.map(function(version) {
                        return version.software.title;
                    });
                }

                // Build the node label; both step types and sw version titles if available
                if (swVersionList.length) {
                    label = [step.analysis_step_types.join(', '), swVersionList.join(', ')];
                } else {
                    label = step.analysis_step_types.join(', ');
                }

                // Assemble a single analysis step node.
                jsonGraph.addNode(stepId, label,
                    {cssClass: 'pipeline-node-analysis-step' + (this.state.infoNodeId === stepId ? ' active' : ''), type: 'step', shape: 'rect', cornerRadius: 4, ref: step});

                // If the node has parents, render the edges to those parents
                if (step.parents && step.parents.length) {
                    step.parents.forEach(function(parent) {
                        if (allSteps[parent]) {
                            jsonGraph.addEdge(parent, stepId);
                        }
                    });
                }
            });

            // If any analysis step parents haven't been seen yet,
            // add them to the graph too
            analysis_steps.forEach(step => {
                if (step.parents && step.parents.length) {
                    step.parents.forEach(parent => {
                        if (parent.uuid in allSteps) {
                            var stepId = parent['@id'];
                            var swVersionList = [];
                            var label;

                            if (!jsonGraph.getNode(stepId)) {
                                // Collect software version titles
                                if (parent.software_versions && parent.software_versions.length) {
                                    swVersionList = parent.software_versions.map(function(version) {
                                        return version.software.title;
                                    });
                                }

                                // Build the node label; both step types and sw version titles if available
                                if (swVersionList.length) {
                                    label = [parent.analysis_step_types.join(', '), swVersionList.join(', ')];
                                } else {
                                    label = parent.analysis_step_types.join(', ');
                                }

                                // Assemble a single analysis step node.
                                jsonGraph.addNode(stepId, label,
                                    {cssClass: 'pipeline-node-analysis-step' + (this.state.infoNodeId === stepId ? ' active' : ''), type: 'step', shape: 'rect', cornerRadius: 4, ref: parent});
                            }
                        }
                    });
                }
            });

        }
        return jsonGraph;
    },

    detailNodes: function(jsonGraph, infoNodeId) {
        var meta;

        // Find data matching selected node, if any
        if (infoNodeId) {
            var node = jsonGraph.getNode(infoNodeId);
            if (node) {
                meta = globals.graph_detail.lookup(node)(node);
            }
        }

        return meta;
    },

    handleNodeClick: function(nodeId) {
        this.setState({infoNodeId: this.state.infoNodeId !== nodeId ? nodeId : ''});
    },

    render: function() {
        var context = this.props.context;
        var itemClass = globals.itemClass(context, 'view-item');

        var documents = {};
        if (context.documents) {
            context.documents.forEach(function(doc, i) {
                documents[doc['@id']] = Panel({context: doc, key: i + 1});
            });
        }

        // Build node graph of the files and analysis steps with this experiment
        this.jsonGraph = this.assembleGraph();

        // Find the selected step, if any
        var selectedStep, selectedNode;
        if (this.state.infoNodeId) {
            selectedNode = this.jsonGraph.getNode(this.state.infoNodeId);
            if (selectedNode) {
                selectedStep = selectedNode.metadata.ref;
            }
        }

        return (

{context.title}

                                <StatusLabel title="Status" status={context.status} />

                            <AuditIndicators audits={context.audit} id="biosample-audit" />

                <AuditDetail context={context} id="biosample-audit" />

Title

{context.source_url ? {context.title} : context.title}

                        {context.assay_term_name ?

Assay

{context.assay_term_name}

                        : null}

                        {context.description ?

Description

{context.description}

                        : null}

Lab

{context.lab.title}

                        {context.award.pi && context.award.pi.lab ?

Award PI

{context.award.pi.lab.title}

                        : null}

                {this.jsonGraph ?

Pipeline schematic

                        <Graph graph={this.jsonGraph} nodeClickHandler={this.handleNodeClick}>

                                {selectedStep ?

                                        <AnalysisStep step={selectedStep} node={selectedNode} />

                                : null}

                        </Graph>

                : null}
                {context.documents && context.documents.length ?

Documents

                            {context.documents.map(function(doc) {
                                return <Panel context={doc} />;
                            })}

                : null}

        );
    }
});
globals.content_views.register(Pipeline, 'Pipeline');

var AnalysisStep = module.exports.AnalysisStep = React.createClass({
    render: function() {
        var stepVersions, swVersions;
        var step = this.props.step;
        var node = this.props.node;
        var typesList = step.analysis_step_types.join(", ");

        // node.metadata.stepVersion is set by the experiment file graph. It's undefined for pipeline graphs.
        if (node.metadata && node.metadata.stepVersion) {
            // Get the analysis_step_version that this step came from.
            swVersions = node.metadata.stepVersion.software_versions;
        } else {
            // Get the analysis_step_version array from the step for pipeline graph display.
            stepVersions = step.versions && _(step.versions).sortBy(function(version) { return version.version; });
        }

        return (

                    {swVersions ?

Name

{step.title + '— Version ' + node.metadata.stepVersion.version}

                    :

Name

{step.title}

                    }

Step type

{step.analysis_step_types.join(', ')}

                    {step.aliases && step.aliases.length ?

Step aliases

{step.aliases.join(', ')}

                    : null}

                    {step.input_file_types && step.input_file_types.length ?

Input

{step.input_file_types.join(', ')}

                    : null}

                    {step.output_file_types && step.output_file_types.length ?

Output

{step.output_file_types.map(function(type, i) {
                                return (

                                        {i > 0 ? {','}
 : null}
                                        {type}

                                );
                            })}

                    : null}

                    {node && node.metadata.pipelines && node.metadata.pipelines.length ?

Pipeline

                                {node.metadata.pipelines.map(function(pipeline, i) {
                                    return (

                                            {i > 0 ? {','}
 : null}
                                            {pipeline.title}

                                    );
                                })}

                    : null}

                    {step.qa_stats_generated && step.qa_stats_generated.length ?

QA statistics

{step.qa_stats_generated.map(function(stat, i) {
                                return (

                                        {i > 0 ? {','}
 : null}
                                        {stat}

                                );
                            })}

                    : null}

                    {swVersions ?

Software

                                {swVersions.map(function(version, i) {
                                    return (

                                            {version.software.title}
                                            {version.version ?
                                                {version.version === 'unknown' ? 'version unknown' : version.version}
                                            : null}

                                    );
                                })}

                    :

                            {stepVersions && stepVersions.length ?

                                    {stepVersions.map(function(version) {
                                        if (version.software_versions && version.software_versions.length) {
                                            return (

Version {version.version} — software

                                                        {version.software_versions.map(function(version, i) {
                                                            var versionNum = version.version === 'unknown' ? 'version unknown' : version.version;
                                                            return (

                                                                    {version.software.title}
                                                                    {version.version ?
                                                                        {versionNum}
                                                                    : null}

                                                            );
                                                        })}

                                            );
                                        } else {
                                            return null;
                                        }
                                    })}

                            : null}

                    }

                    {step.documents && step.documents.length ?

Documents

                                {step.documents.map(function(document, i) {
                                    var docName = document.attachment ? document.attachment.download : document['@id'];
                                    return ({i > 0 ? ', ' : null}{docName});
                                })}

                    : null}

        );
    }
});

// Display the metadata of the selected analysis step in the graph
var StepDetailView = module.exports.StepDetailView = function(node) {
    // The node is for a step. It can be called with analysis_step_run (for file graphs) or analysis_step (for pipeline graphs) nodes.
    // This code detects which is the case, and adjusts accordingly.
    var selectedStep = node.metadata.ref;
    var meta;

    if (selectedStep) {
        return <AnalysisStep step={selectedStep} node={node} />;
    } else {
        return (
Missing step_run derivation information for {node.metadata.fileAccession}
);
    }
};

globals.graph_detail.register(StepDetailView, 'Step');

var Listing = React.createClass({
    mixins: [search.PickerActionsMixin, AuditMixin],
    render: function() {
        var result = this.props.context;
        var publishedBy = [];
        var swTitle = [];

        // Collect up an array of published-by and software titles for all steps in this pipeline
        if (result.analysis_steps && result.analysis_steps.length) {
            result.analysis_steps.forEach(function(step) {
                step.software_versions.forEach(function(version) {
                    swTitle.push(version.software.title);
                    if (version.software.references && version.software.references.length) {
                        version.software.references.forEach(function(reference) {
                            publishedBy.push.apply(publishedBy, reference.published_by); // add published_by array to publishedBy array
                        });
                    }
                });
            });
        }
        publishedBy = _.uniq(publishedBy);
        swTitle = _.uniq(swTitle);

        return (

                    {this.renderActions()}

Pipeline

{' ' + result['accession']}

                        {result.status ?
{' ' + result.status}
 : ''}
                        <AuditIndicators audits={result.audit} id={result['@id']} search />

                        {result['title']}

                        {result.assay_term_name ?

Assay: {result.assay_term_name}

                        : null}

                        {swTitle.length ?

Software: {swTitle.join(', ')}

                        : null}

                <AuditDetail context={result} id={this.props.context['@id']} forcedEditLink />

        );
    }
});
globals.listing_views.register(Listing, 'Pipeline');

var PipelineTable = module.exports.PipelineTable = React.createClass({
    render: function() {
        var pipelines;

        // If there's a limit on entries to display and the array is greater than that
        // limit, then clone the array with just that specified number of elements
        if (this.props.limit && (this.props.limit < this.props.items.length)) {
            // Limit the pipelines list by cloning first {limit} elements
            pipelines = this.props.items.slice(0, this.props.limit);
        } else {
            // No limiting; just reference the original array
            pipelines = this.props.items;
        }

        // Get the software version numbers for all matching software
        var softwareId = this.props.softwareId;
        var swVers = [];
        pipelines.forEach(function(pipeline, i) {
            return pipeline.analysis_steps.some(function(analysis_step) {
                // Get the software_version object for any with a software @id matching softwareId, and save to array
                var matchedSwVers = _(analysis_step.software_versions).find(function(software_version) {
                    return software_version.software['@id'] === softwareId;
                });
                if (matchedSwVers) {
                    swVers[i] = matchedSwVers;
                }
                return matchedSwVers;
            });
        });

        return (

                            Pipeline
                            Assay
                            Version
                            Download checksum

                    {pipelines.map(function (pipeline, i) {
                        // Ensure this can work with search result columns too
                        return (

                                {pipeline.accession}
                                {pipeline.assay_term_name}
                                {swVers[i].version}
                                {swVers[i].download_checksum}

                        );
                    })}

                                {this.props.limit && (this.props.limit < this.props.total) ?

                                        {'Displaying '}{this.props.limit}{' pipelines out of '}{this.props.total}{' total related pipelines'}

                                : ''}

        );
    }
});


text:
package cz.znj.kvr.sw.exp.java.benchmark.compress.support;

import org.apache.commons.lang3.RandomUtils;

import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.ExecutionException;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.concurrent.Future;
import java.util.function.Consumer;

/**
 * Small data supplier of key and value.
 */
public class CompressBenchmarkSupport
{
	public static byte[] generateInput(int length)
	{
		byte[] out = new byte[length];
		for (int i = 0; i < length; ++i) {
			out[i] = (byte)RandomUtils.nextInt(0, 256);
		}
		return out;
	}

	public static void runParallel(int threads, Consumer<Integer> runner)
	{
		List<Future<Void>> futures = new ArrayList<>();
		ExecutorService executor = Executors.newFixedThreadPool(threads);
		for (int i = 0; i < threads; ++i) {
			int ii = i;
			executor.submit(() -> runner.accept(ii));
		}
		executor.shutdown();
		for (Future<Void> future: futures) {
			try {
				future.get();
			}
			catch (InterruptedException e) {
				throw new RuntimeException(e);
			}
			catch (ExecutionException e) {
				throw new RuntimeException(e);
			}
		}
	}
}


text:
BVOX Keystone client extension
==============================

BVOX extension for Openstack Keystone client right now just implements
get_by_name for users tenants. This expects
`Keystone BVOX extension <https://github.com/bvox/keystone-bvox-extension>`_
to be installed on Keystone server.

Python API
----------

In order to use the client library a monkey patch is provided::

   >>> from keystoneclient_bvox_ext import monkey_patch
   >>> monkey_patch()
   >>> from keystoneclient.v2_0 imoprt client
   >>> cli = client.Client(username='admin', password='secrete', tenant_name='admin', auth_url='http://localhost:35357/v2.0')
   >>> cli.users.get_by_name('demo')
   <User {u'id': u'74439b8d264545a19f76a0c0d379457e', u'tenantId': u'', u'enabled': True, u'name': u'demo', u'email': u'demo@example.com'}>
   >>> cli.tenants.get_by_name('demo')
   <Tenant {u'id': u'98ecc4b79d044d76b5597f2d7aa0e3c7', u'enabled': True, u'name': u'demo'}>

Command line API
----------------

Installing this package gets you a shell command, *keystone-bvox*, that you can
use to interact with Keystone's Identity API. The shell command is a thin
wrapper over *keystone* shell, just applying the monkey patching, so you can
use it as usual with some extra arguments for ``user-get`` and ``tenant-get``
subcommands::

  $ keystone-bvox help user-get
  usage: keystone user-get [--by_name] <user-identifier>

  Display user details.

  Positional arguments:
    <user-identifier>  Identifies the user to display (user ID, by default).

  Optional arguments:
    --by_name          The user identifier is treated as a username.

  $ keystone-bvox help tenant-get
  usage: keystone tenant-get [--by_name] <tenant-identifier>

  Display tenant details

  Positional arguments:
    <tenant-identifier>  Identifies the tenant to display (tenant ID, by
                         default).

  Optional arguments:
    --by_name            The tenant identifier is treated as a tenant name.

Working with code
-----------------

See HACKING.rst for guidelines while working with this code. Please *do not
update HACKING.rst directly*, but edit
`HACKING.rst Gist <https://gist.github.com/3945275>`_ instead and then
re-import here.


text:
@implementation FoodEvent {

}
- (instancetype)initWithInternalTime:(NSDate *)internalTime userTime:(NSDate *)userTime userTimezone:(NSTimeZone *)userTimezone eventTime:(NSDate *)eventTime carbohydrates:(float)carbohydrates proteins:(float)proteins fat:(float)fat timestamp:(long long)timestamp {
    self = [super initWithInternalTime:internalTime userTime:userTime userTimezone:userTimezone eventTime:eventTime timestamp:timestamp];
    if (self) {
        _carbohydrates = carbohydrates;
        _proteins = proteins;
        _fat = fat;
    }
    return self;
}

- (NSString *)description {
    NSMutableString *description = [NSMutableString string];
    [description appendFormat:@"self.carbohydrates=%f", self.carbohydrates];
    [description appendFormat:@", self.proteins=%f", self.proteins];
    [description appendFormat:@", self.fat=%f", self.fat];

    NSMutableString *superDescription = [[super description] mutableCopy];
    NSUInteger length = [superDescription length];

    if (length > 0 && [superDescription characterAtIndex:length - 1] == '>') {
        [superDescription insertString:@", " atIndex:length - 1];
        [superDescription insertString:description atIndex:length + 1];
        return superDescription;
    }
    else {
        return [NSString stringWithFormat:@"<%@: %@>", NSStringFromClass([self class]), description];
    }
}

+ (instancetype)valueWithInternalTime:(NSDate *)internalTime userTime:(NSDate *)userTime userTimezone:(NSTimeZone *)userTimezone eventTime:(NSDate *)eventTime carbohydrates:(float)carbohydrates proteins:(float)proteins fat:(float)fat timestamp:(long long)timestamp {
    return [[self alloc] initWithInternalTime:internalTime userTime:userTime userTimezone:userTimezone eventTime:eventTime carbohydrates:carbohydrates proteins:proteins fat:fat timestamp:timestamp];
}

@end


text:
from piipod.utils.csp import *
import pytest

@pytest.fixture
def events():
    return [chr(97+i) for i in range(3)]

@pytest.fixture
def users():
    return list(map(str, range(10)))

def test_signupModel(users, events):
    """test that CSP accurately reflects signup relationships"""
    csp = SignupCSP(users, events)
    sol = csp.getSolution()
    counts = {}
    for user in users:
        for event in events:
            if sol['%s__%s' % (user, event)]:
                counts.setdefault(user, 0)
                counts.setdefault(event, 0)
                counts[user] += 1
                counts[event] += 1
    for k, v in counts.items():
        assert sol[k] == v

def test_userSignupMax(users, events):
    """test that signups per event are enforced"""
    limit = 1
    csp = SignupCSP(users, events)
    for user in users:
        csp.setUserSignupMax(user, limit)
    sol = csp.getSolution()
    for user in users:
        assert sol[user] <= limit
        assert sum(sol['%s__%s' % (user, event)] for event in events) <= limit

def test_eventSignupMax(users, events):
    """test that signups per event are enforced"""
    limit = 4
    csp = SignupCSP(users, events)
    csp.setEventSignupMax('b', limit)
    sol = csp.getSolution()
    assert sol['b'] <= limit
    assert sum(sol['%s__%s' % (user, 'b')] for user in users) <= limit

def test_userSignupMin(users, events):
    """test that signups per event are enforced"""
    limit = 2
    csp = SignupCSP(users, events)
    for user in users:
        csp.setUserSignupMin(user, limit)
    sol = csp.getSolution()
    for user in users:
        assert sol[user] >= limit
        assert sum(sol['%s__%s' % (user, event)] for event in events) >= limit

def test_eventSignupMin(users, events):
    """test that signups per event are enforced"""
    limit = 8
    csp = SignupCSP(users, events)
    csp.setEventSignupMin('b', limit)
    sol = csp.getSolution()
    assert sol['b'] >= limit
    assert sum(sol['%s__%s' % (user, 'b')] for user in users) >= limit


text:
<title>Annotation Property: audience</title>
<meta http-equiv='content-type' content='text/html;charset=utf8'>
<link rel='stylesheet' href='../default.css' type='text/css' />

Annotation Property: audience

http://usefulinc.com/ns/doap#audience


text:
/**
 * A simple plugin for Cordova to check access to the camera roll on iOS.
 *
 * Developed by berliner for markveys
 */

var PictureAccess = function() {

};

/*
*	success - success callback
*	fail - error callback
*/
PictureAccess.prototype.checkAccess = function(success, fail) {
  if (device.platform.toLowerCase() != 'ios') {
    success();
    return;
  }
  cordova.exec(success, fail, "PictureAccess", "checkAccess");
};
if(!window.plugins) {
    window.plugins = {};
}
if (!window.plugins.pictureAccess) {
    window.plugins.pictureAccess = new PictureAccess();
}

if (typeof module != 'undefined' && module.exports) {
  module.exports = PictureAccess;
}


text:
package com.beem.project.btf.ui.views;

import java.io.File;

import android.media.MediaRecorder;
import android.os.Bundle;
import android.os.Environment;
import android.os.Handler;
import android.os.Message;
import android.util.Log;

/**
 * 录音线程
 * @author zhenggen xie
 */
public class MediaRecordHandler implements Runnable {
	private String savePath = null;
	private MediaRecorder mRecorder = null;
	private long recordTime = 0;
	private long startTime = 0;
	private long endTime = 0;
	private long maxVolumeStart = 0;
	private long maxVolumeEnd = 0;
	private volatile boolean isRecording;
	private Handler mhandler;
	private String fileName;

	public MediaRecordHandler(String fileName, String savePath, Handler mHandler) {
		super();
		this.fileName = fileName;
		this.savePath = savePath;
		this.mhandler = mHandler;
	}
	@Override
	public void run() {
		// TODO Auto-generated method stub
		start(savePath);
		recordTime = 0;
		startTime = System.currentTimeMillis();
		maxVolumeStart = System.currentTimeMillis();
		while (this.isRecording) {
			endTime = System.currentTimeMillis();
			recordTime = ((endTime - startTime) / 1000);
			if (recordTime >= HandlerConstant.MAX_SOUND_RECORD_TIME) {
				// 释放资源
				stop();
				// 时间超时发送信息
				sendAudioMessage(HandlerConstant.RECORD_AUDIO_TOO_LONG);
				break;
			}
			maxVolumeEnd = System.currentTimeMillis();
			getAmplitude();
		}
	}
	// 开始录音函数
	private void start(String name) {
		if (!Environment.getExternalStorageState().equals(
				android.os.Environment.MEDIA_MOUNTED)
				&& !new File(name).exists()) {
			return;
		}
		if (mRecorder == null) {
			mRecorder = new MediaRecorder();
			mRecorder.setAudioSource(MediaRecorder.AudioSource.MIC);
			mRecorder.setOutputFormat(MediaRecorder.OutputFormat.THREE_GPP);
			mRecorder.setAudioEncoder(MediaRecorder.AudioEncoder.AMR_NB);
			mRecorder.setOutputFile(name);
			try {
				mRecorder.prepare();
				mRecorder.start();
			} catch (Exception e) {
				Log.i("MediaRecordHandler",
						e.getStackTrace() + "" + e.getMessage());
			}
		}
	}
	public void setRecording(boolean isRec) {
		this.isRecording = isRec;
	}
	// 停止录音
	public void stop() {
		if (mRecorder != null) {
			try {
				mRecorder.setOnErrorListener(null);
				mRecorder.setPreviewDisplay(null);
				mRecorder.stop();
			} catch (RuntimeException e) {
				File myRecAudioFile = new File(savePath);
				if (myRecAudioFile.exists()) {
					// you must delete the outputfile when the recorder stop
					// failed.
					myRecAudioFile.delete();
					//LogUtils.e("record failed,del the record file:" + savePath);
				}
				e.printStackTrace();
			} finally {
				if (mRecorder != null) {
					mRecorder.release();
				}
				mRecorder = null;
			}
		}
	}
	// 暂停录音
	public void pause() {
		if (mRecorder != null) {
			mRecorder.stop();
		}
	}
	public void start() {
		if (mRecorder != null) {
			mRecorder.start();
		}
	}
	// 获取录音时间
	public long getRecordTime() {
		return recordTime;
	}
	// 获取音量值
	public void getAmplitude() {
		if (mRecorder != null) {
			if (maxVolumeEnd - maxVolumeStart < 100) {
				return;
			}
			maxVolumeStart = maxVolumeEnd;
			float max = mRecorder.getMaxAmplitude() / 650.0f;// 分为50个区段getMaxAmplitude返回值最大为32767
			// Log.i("MediaRecordHandler", "max" + max + "");
			Message Msg = new Message();
			Msg.what = HandlerConstant.RECEIVE_MAX_VOLUME;
			float[] msg = { max, getRecordTime() };
			Msg.obj = msg;
			mhandler.sendMessage(Msg);
		}
	}
	public void sendAudioMessage(int sendType) {
		Message msg = mhandler.obtainMessage();
		msg.what = sendType;
		Bundle bundle = new Bundle();
		bundle.putString("savePath", savePath);
		bundle.putString("fileName", fileName);
		bundle.putInt("recordTime", (int) getRecordTime());
		msg.setData(bundle);
		mhandler.sendMessage(msg);
	}
}


text:
<?php

namespace frontend\controllers;

use Yii;
use yii\web\Controller;
use yii\mongodb\Query;
use yii\web\View;
use yii\data\ActiveDataProvider;
use yii\web\Response;
use yii\web\JqueryAsset;
/**
 * This command echoes the first argument that you have entered.
 *
 * This command is provided as an example for you to learn how to create console commands.
 *
 * @author Qiang Xue <qiang.xue@gmail.com>
 * @since 2.0
 */
class ArticleController extends Controller
{
    const MODULES_BUILD_PATH = '/static/';
    const VENDER_PATH = '/static/vender/';

    public function actionArt($page)
    {
        return $this->renderPage($page);
    }

    private function renderPage($page)
    {
        $actionName = $this->action->id;
        $pageJsFileName = empty($actionName) ? 'app' : $actionName;

        if (!empty($page)) {
            $pageJsFileName = $pageJsFileName . ucfirst($page);
        }

        //Inject page js & css files
        $this->registerCssFile(self::MODULES_BUILD_PATH . 'css/'.$pageJsFileName.'.css');
        $this->registerBodyJsFile(self::VENDER_PATH . "an.js");
        $this->registerBodyJsFile(self::MODULES_BUILD_PATH . "js/$pageJsFileName.js");

        return $this->render($actionName . '/' . $page);
    }

    private function registerBodyJsFile($file)
    {
        $this->view->registerJsFile($file, ['position' => View::POS_END,'depends' => [JqueryAsset::className()]]);
    }

        private function registerCssFile($file)
    {
          $this->view->registerCssFile($file);
    }
}


text:
package de.fau.cs.mad.kwikshop.android.view;

import android.content.Context;

import java.io.FileInputStream;
import java.io.FileNotFoundException;

import javax.inject.Inject;

import de.fau.cs.mad.kwikshop.common.ArgumentNullException;
import de.fau.cs.mad.kwikshop.android.viewmodel.common.IoService;

public class IoServiceImplementation implements IoService {

    private final Context context;

    @Inject
    public IoServiceImplementation(Context context) {

        if(context == null) {
            throw new ArgumentNullException("context");
        }

        this.context = context;
    }

    @Override
    public FileInputStream openFileInput(String name) throws FileNotFoundException{
        return context.openFileInput(name);
    }

    @Override
    public void deleteFile(String name) {
        context.deleteFile(name);
    }
}


text:
OrgVolApp.directive('changeLanguage', function($rootScope) {
    return {
     restrict: 'A',
     link: function (scope, element, attrs, ctrl) {
     	element.on('click', function(){
            $("ul.flag li ul li").removeClass('active');
            var source = $(this).children( "a" ).children( "img" ).attr("src");
            $(this).parents("li.pull-right").children("#icons-header-right").children( "img" ).prop("src", source);
            $(this).addClass('active');
     	});
     }
    };
});


text:
 var url = require('url')
   , http = require('http')
   , OAuth = require('oauth').OAuth
   , querystring = require('querystring')
   , memoize = {};

 module.exports = function (key, secret, callbackURI) {
   if (memoize[key + secret]) {
     return memoize[key + secret];
   }

   var CLIENT = {
     oauth: new OAuth(
       'http://www.tumblr.com/oauth/request_token'
     , 'http://www.tumblr.com/oauth/access_token'
     , key
     , secret
     , '1.0'
     , callbackURI
     , 'HMAC-SHA1'
     , null
     , {'Accept': '*/*', 'Connection': 'close'}
     )
   }

     , _rest_base = 'http://api.tumblr.com/v2';

   memoize[key + secret] = CLIENT;

   /* Does an API call to tumblr and callbacks
    * when the result is available.
    *
    * @param {String} method
    * @param {String} path
    * @param {Object} params
    * @param {Function} callback
    * @return {Request}
    */
   CLIENT.apiCall = function (method, path, params, callback) {
     var token = params.token;

     delete params.token;

     function requestCallback(callback) {
       return function (error, data, response) {
         if (error) {
           callback(error, null);
         } else {
           try {
             callback(null, JSON.parse(data));
           } catch (exc) {
             callback(exc, null);
           }
         }
       };
     }

     if (method.toUpperCase() === 'GET') {
       return CLIENT.oauth.get(
         _rest_base + path + '?' + querystring.stringify(params)
       , token.oauth_token
       , token.oauth_token_secret
       , requestCallback(callback)
       );
     } else if (method.toUpperCase() === 'POST') {
       return CLIENT.oauth.post(
         _rest_base + path
       , token.oauth_token
       , token.oauth_token_secret
       , params
       , 'application/json; charset=UTF-8'
       , requestCallback(callback)
       );
     }
   };

   /* Redirects to tumblr to retrieve the token
    * or callbacks with the proper token
    *
    * @param {Request} req
    * @param {Response} res
    * @param {Function} callback
    */
   CLIENT.getAccessToken = function (req, res, callback) {

     var parsed_url = url.parse(req.url, true)
       , protocol = req.socket.encrypted ? 'https' : 'http'
       , callback_url = protocol + '://' + req.headers.host + parsed_url.pathname
       , has_token = parsed_url.query && parsed_url.query.oauth_token
       , has_secret = req.session.auth && req.session.auth.tumblr_oauth_token_secret;

     // Acces token
     if (has_token &&  has_secret) {

       CLIENT.oauth.getOAuthAccessToken(
         parsed_url.query.oauth_token,
         req.session.auth.tumblr_oauth_token_secret,
         parsed_url.query.oauth_verifier,
         function (error, oauth_token, oauth_token_secret, additionalParameters) {
           if (error) {
             callback(error, null);
           } else {
             callback(null, {oauth_token: oauth_token, oauth_token_secret: oauth_token_secret});
           }
         }
       );

     // Request token
     } else {

       CLIENT.oauth.getOAuthRequestToken(
         { oauth_callback: callback_url },
         function (error, oauth_token, oauth_token_secret, oauth_authorize_url, additionalParameters) {
           if (!error) {
             req.session.tumblr_redirect_url = req.url;
             req.session.auth = req.session.auth || {};
             req.session.auth.tumblr_oauth_token_secret = oauth_token_secret;
             req.session.auth.tumblr_oauth_token = oauth_token;
             res.redirect('http://www.tumblr.com/oauth/authorize?oauth_token=' + oauth_token);
           } else {
             callback(error, null);
           }
         }
       );
     }
   };

   return CLIENT;
 };


text:
package org.apache.camel.component.jackson;

import java.util.HashMap;
import java.util.Map;

import org.apache.camel.component.mock.MockEndpoint;
import org.apache.camel.reifier.dataformat.DataFormatReifier;
import org.apache.camel.test.spring.junit5.CamelSpringTestSupport;
import org.junit.jupiter.api.Test;
import org.springframework.context.support.AbstractApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertNotNull;
import static org.junit.jupiter.api.Assertions.assertSame;

public class SpringJacksonObjectMapperRegistryTest extends CamelSpringTestSupport {

    @Override
    protected AbstractApplicationContext createApplicationContext() {
        return new ClassPathXmlApplicationContext(
                "org/apache/camel/component/jackson/SpringJacksonObjectMapperRegistryTest.xml");
    }

    @Test
    public void testMarshalAndUnmarshalMap() throws Exception {
        Map<String, Object> in = new HashMap<>();
        in.put("name", "Camel");

        MockEndpoint mock = getMockEndpoint("mock:reverse");
        mock.expectedMessageCount(1);
        mock.message(0).body().isInstanceOf(Map.class);
        mock.message(0).body().isEqualTo(in);

        Object marshalled = template.requestBody("direct:in", in);
        String marshalledAsString = context.getTypeConverter().convertTo(String.class, marshalled);
        assertEquals("{\"name\":\"Camel\"}", marshalledAsString);

        template.sendBody("direct:back", marshalled);

        mock.assertIsSatisfied();

        MyJsonObjectMapper mapper = (MyJsonObjectMapper) context.getRegistry().lookupByName("myJsonObjectMapper");
        assertNotNull(mapper);

        JacksonDataFormat df = (JacksonDataFormat) DataFormatReifier.getDataFormat(context, "jack");
        assertNotNull(df);
        assertSame(mapper, df.getObjectMapper());
    }

}


text:
{-# Language DeriveDataTypeable, DeriveGeneric, Safe #-}
{-|
Module      : Config.Number
Description : Scientific-notation numbers with explicit radix
Copyright   : (c) Eric Mertens, 2019
License     : ISC
Maintainer  : emertens@gmail.com

This module provides a representation of numbers in scientific
notation.
-}
module Config.Number
  ( Number(..)
  , Radix(..)
  , radixToInt
  , numberToRational
  , numberToInteger
  , integerToNumber
  , rationalToNumber
  ) where

import Data.Ratio (numerator, denominator)
import Data.Data (Data)
import GHC.Generics (Generic)

-- | Numbers are represented as base, coefficient, and exponent.
--
-- The most convenient way to get numbers into and out of this form
-- is to use one of: 'numberToRational', 'numberToInteger',
-- 'rationalToNumber', or 'integerToNumber'.
--
-- This representation is explicit about the radix and exponent
-- used to facilitate better pretty-printing. By using explicit
-- exponents extremely large numbers can be represented compactly.
-- Consider that it is easy to write `1e100000000` which would use
-- a significant amount of memory if realized as an 'Integer'. This
-- representation allows concerned programs to check bounds before
-- converting to a representation like 'Integer'.
data Number = MkNumber
  { numberRadix       :: !Radix
  , numberCoefficient :: !Rational
  }
  deriving (Eq, Ord, Read, Show, Data, Generic)

-- | Radix used for a number. Some radix modes support an
-- exponent.
data Radix
  = Radix2           -- ^ binary, base 2
  | Radix8           -- ^ octal, base 8
  | Radix10 !Integer -- ^ decimal, base 10, exponent base 10
  | Radix16 !Integer -- ^ hexdecimal, base 16, exponent base 2
  deriving (Eq, Ord, Read, Show, Data, Generic)

-- | Returns the radix as an integer ignoring any exponent.
radixToInt :: Radix -> Int
radixToInt r =
  case r of
    Radix2 {} ->  2
    Radix8 {} ->  8
    Radix10{} -> 10
    Radix16{} -> 16

-- | Convert a number to a 'Rational'. Warning: This can use a
-- lot of memory in the case of very large exponent parts.
numberToRational :: Number -> Rational
numberToRational (MkNumber r c) =
  case r of
    Radix2    -> c
    Radix8    -> c
    Radix10 e -> c * 10 ^^ e
    Radix16 e -> c *  2 ^^ e

-- | Convert a number to a 'Integer'. Warning: This can use a
-- lot of memory in the case of very large exponent parts.
numberToInteger :: Number -> Maybe Integer
numberToInteger n
  | denominator r == 1 = Just $! numerator r
  | otherwise          = Nothing
  where
    r = numberToRational n

-- | 'Integer' to a radix 10 'Number' with no exponent
integerToNumber :: Integer -> Number
integerToNumber = rationalToNumber . fromInteger

-- | 'Rational' to a radix 10 'Number' with no exponent
rationalToNumber :: Rational -> Number
rationalToNumber = MkNumber (Radix10 0)


text:
<!DOCTYPE html>
<html>
<head>

<meta name="viewport" content="width=800">
<style>
body { width: 800px; margin: 0; }
</style>
<script>
  if (window.testRunner)
    testRunner.waitUntilDone();

  function done() {
    if (window.testRunner) {
      requestAnimationFrame(()=> {
        requestAnimationFrame(()=> {
          testRunner.notifyDone();
        });
      });
    }
  }
</script>
</head>
<body>

<iframe onload="done()" style="width: 3200px; height: 50%; border: 0" src='http://localhost:8000/text-autosizing/resources/wide-iframe-expected.html'>

</body>
</html>


text:
namespace LocalMarkdownExplorer
{
    partial class Form1
    {
        /// <summary>
        /// 必要なデザイナー変数です。
        /// </summary>
        private System.ComponentModel.IContainer components = null;

        /// <summary>
        /// 使用中のリソースをすべてクリーンアップします。
        /// </summary>
        /// <param name="disposing">マネージ リソースが破棄される場合 true、破棄されない場合は false です。</param>
        protected override void Dispose(bool disposing)
        {
            if (disposing && (components != null))
            {
                components.Dispose();
            }
            base.Dispose(disposing);
        }

        #region Windows フォーム デザイナーで生成されたコード

        /// <summary>
        /// デザイナー サポートに必要なメソッドです。このメソッドの内容を
        /// コード エディターで変更しないでください。
        /// </summary>
        private void InitializeComponent()
        {
            System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Form1));
            this.tbSearch = new System.Windows.Forms.TextBox();
            this.linkBack = new System.Windows.Forms.LinkLabel();
            this.lbMdList = new System.Windows.Forms.ListBox();
            this.tabEditor = new System.Windows.Forms.TabControl();
            this.tabMd = new System.Windows.Forms.TabPage();
            this.webMd = new System.Windows.Forms.WebBrowser();
            this.tabText = new System.Windows.Forms.TabPage();
            this.btnTextAdd_LI2 = new System.Windows.Forms.Button();
            this.btnTextAdd_Li1 = new System.Windows.Forms.Button();
            this.btnTextAdd_H2 = new System.Windows.Forms.Button();
            this.btnTextAdd_H1 = new System.Windows.Forms.Button();
            this.btnTextAdd_Code = new System.Windows.Forms.Button();
            this.btnHighLight = new System.Windows.Forms.Button();
            this.rtbMd = new System.Windows.Forms.RichTextBox();
            this.tabHTML = new System.Windows.Forms.TabPage();
            this.tbHTML = new System.Windows.Forms.TextBox();
            this.tbTitle = new System.Windows.Forms.TextBox();
            this.lbCautionMessge = new System.Windows.Forms.Label();
            this.groupBoxFile = new System.Windows.Forms.GroupBox();
            this.btnCredit = new System.Windows.Forms.Button();
            this.btnDelete = new System.Windows.Forms.Button();
            this.btnSave = new System.Windows.Forms.Button();
            this.btnOpenFile = new System.Windows.Forms.Button();
            this.pictureBox1 = new System.Windows.Forms.PictureBox();
            this.btnOpenDir = new System.Windows.Forms.Button();
            this.btnAdd = new System.Windows.Forms.Button();
            this.cbRootDir = new System.Windows.Forms.ComboBox();
            this.btnAddRootDir = new System.Windows.Forms.Button();
            this.btnEditRootDir = new System.Windows.Forms.Button();
            this.lbAssist = new System.Windows.Forms.ListBox();
            this.btnAssistClose = new System.Windows.Forms.Button();
            this.tabEditor.SuspendLayout();
            this.tabMd.SuspendLayout();
            this.tabText.SuspendLayout();
            this.tabHTML.SuspendLayout();
            this.groupBoxFile.SuspendLayout();
            ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
            this.SuspendLayout();
            //
            // tbSearch
            //
            this.tbSearch.Font = new System.Drawing.Font("MS UI Gothic", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(128)));
            this.tbSearch.Location = new System.Drawing.Point(45, 71);
            this.tbSearch.Name = "tbSearch";
            this.tbSearch.Size = new System.Drawing.Size(242, 23);
            this.tbSearch.TabIndex = 20;
            this.tbSearch.TextChanged += new System.EventHandler(this.tbSearch_TextChanged);
            this.tbSearch.KeyDown += new System.Windows.Forms.KeyEventHandler(this.tbSearch_KeyDown);
            //
            // linkBack
            //
            this.linkBack.AutoSize = true;
            this.linkBack.Location = new System.Drawing.Point(5, 76);
            this.linkBack.Name = "linkBack";
            this.linkBack.Size = new System.Drawing.Size(38, 12);
            this.linkBack.TabIndex = 20;
            this.linkBack.TabStop = true;
            this.linkBack.Text = "<戻る";
            this.linkBack.Visible = false;
            this.linkBack.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.linkBack_LinkClicked);
            //
            // lbMdList
            //
            this.lbMdList.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
            | System.Windows.Forms.AnchorStyles.Left)));
            this.lbMdList.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed;
            this.lbMdList.Font = new System.Drawing.Font("MS UI Gothic", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(128)));
            this.lbMdList.FormattingEnabled = true;
            this.lbMdList.ItemHeight = 16;
            this.lbMdList.Location = new System.Drawing.Point(12, 102);
            this.lbMdList.Name = "lbMdList";
            this.lbMdList.Size = new System.Drawing.Size(287, 516);
            this.lbMdList.TabIndex = 25;
            this.lbMdList.DrawItem += new System.Windows.Forms.DrawItemEventHandler(this.lbMdList_DrawItem);
            this.lbMdList.SelectedIndexChanged += new System.EventHandler(this.lbMdList_SelectedIndexChanged);
            //
            // tabEditor
            //
            this.tabEditor.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
            | System.Windows.Forms.AnchorStyles.Left)
            | System.Windows.Forms.AnchorStyles.Right)));
            this.tabEditor.Controls.Add(this.tabMd);
            this.tabEditor.Controls.Add(this.tabText);
            this.tabEditor.Controls.Add(this.tabHTML);
            this.tabEditor.Location = new System.Drawing.Point(7, 56);
            this.tabEditor.Name = "tabEditor";
            this.tabEditor.SelectedIndex = 0;
            this.tabEditor.Size = new System.Drawing.Size(614, 555);
            this.tabEditor.TabIndex = 50;
            this.tabEditor.SelectedIndexChanged += new System.EventHandler(this.tabEditor_SelectedIndexChanged);
            //
            // tabMd
            //
            this.tabMd.BackColor = System.Drawing.Color.Gainsboro;
            this.tabMd.Controls.Add(this.webMd);
            this.tabMd.Location = new System.Drawing.Point(4, 22);
            this.tabMd.Name = "tabMd";
            this.tabMd.Padding = new System.Windows.Forms.Padding(3);
            this.tabMd.Size = new System.Drawing.Size(606, 529);
            this.tabMd.TabIndex = 1;
            this.tabMd.Text = "プレビュー";
            //
            // webMd
            //
            this.webMd.Dock = System.Windows.Forms.DockStyle.Fill;
            this.webMd.Location = new System.Drawing.Point(3, 3);
            this.webMd.MinimumSize = new System.Drawing.Size(20, 20);
            this.webMd.Name = "webMd";
            this.webMd.Size = new System.Drawing.Size(600, 523);
            this.webMd.TabIndex = 0;
            //
            // tabText
            //
            this.tabText.BackColor = System.Drawing.Color.LightGray;
            this.tabText.Controls.Add(this.btnTextAdd_LI2);
            this.tabText.Controls.Add(this.btnTextAdd_Li1);
            this.tabText.Controls.Add(this.btnTextAdd_H2);
            this.tabText.Controls.Add(this.btnTextAdd_H1);
            this.tabText.Controls.Add(this.btnTextAdd_Code);
            this.tabText.Controls.Add(this.btnHighLight);
            this.tabText.Controls.Add(this.rtbMd);
            this.tabText.Location = new System.Drawing.Point(4, 22);
            this.tabText.Name = "tabText";
            this.tabText.Padding = new System.Windows.Forms.Padding(3);
            this.tabText.Size = new System.Drawing.Size(606, 529);
            this.tabText.TabIndex = 0;
            this.tabText.Text = "  エディター  ";
            //
            // btnTextAdd_LI2
            //
            this.btnTextAdd_LI2.Location = new System.Drawing.Point(256, 4);
            this.btnTextAdd_LI2.Name = "btnTextAdd_LI2";
            this.btnTextAdd_LI2.Size = new System.Drawing.Size(33, 23);
            this.btnTextAdd_LI2.TabIndex = 37;
            this.btnTextAdd_LI2.Text = "   -";
            this.btnTextAdd_LI2.UseVisualStyleBackColor = true;
            this.btnTextAdd_LI2.Click += new System.EventHandler(this.btnTextAdd_LI2_Click);
            //
            // btnTextAdd_Li1
            //
            this.btnTextAdd_Li1.Location = new System.Drawing.Point(217, 4);
            this.btnTextAdd_Li1.Name = "btnTextAdd_Li1";
            this.btnTextAdd_Li1.Size = new System.Drawing.Size(33, 23);
            this.btnTextAdd_Li1.TabIndex = 36;
            this.btnTextAdd_Li1.Text = "-  ";
            this.btnTextAdd_Li1.UseVisualStyleBackColor = true;
            this.btnTextAdd_Li1.Click += new System.EventHandler(this.btnTextAdd_Li1_Click);
            //
            // btnTextAdd_H2
            //
            this.btnTextAdd_H2.Location = new System.Drawing.Point(139, 4);
            this.btnTextAdd_H2.Name = "btnTextAdd_H2";
            this.btnTextAdd_H2.Size = new System.Drawing.Size(33, 23);
            this.btnTextAdd_H2.TabIndex = 35;
            this.btnTextAdd_H2.Text = "##";
            this.btnTextAdd_H2.UseVisualStyleBackColor = true;
            this.btnTextAdd_H2.Click += new System.EventHandler(this.btnTextAdd_H2_Click);
            //
            // btnTextAdd_H1
            //
            this.btnTextAdd_H1.Location = new System.Drawing.Point(100, 4);
            this.btnTextAdd_H1.Name = "btnTextAdd_H1";
            this.btnTextAdd_H1.Size = new System.Drawing.Size(33, 23);
            this.btnTextAdd_H1.TabIndex = 34;
            this.btnTextAdd_H1.Text = "#";
            this.btnTextAdd_H1.UseVisualStyleBackColor = true;
            this.btnTextAdd_H1.Click += new System.EventHandler(this.btnTextAdd_H1_Click);
            //
            // btnTextAdd_Code
            //
            this.btnTextAdd_Code.Location = new System.Drawing.Point(178, 4);
            this.btnTextAdd_Code.Name = "btnTextAdd_Code";
            this.btnTextAdd_Code.Size = new System.Drawing.Size(33, 23);
            this.btnTextAdd_Code.TabIndex = 33;
            this.btnTextAdd_Code.Text = "~~~~";
            this.btnTextAdd_Code.UseVisualStyleBackColor = true;
            this.btnTextAdd_Code.Click += new System.EventHandler(this.btnTextAdd_Code_Click);
            //
            // btnHighLight
            //
            this.btnHighLight.Location = new System.Drawing.Point(7, 4);
            this.btnHighLight.Name = "btnHighLight";
            this.btnHighLight.Size = new System.Drawing.Size(87, 23);
            this.btnHighLight.TabIndex = 32;
            this.btnHighLight.Text = "ハイライト更新";
            this.btnHighLight.UseVisualStyleBackColor = true;
            this.btnHighLight.Click += new System.EventHandler(this.btnHighLight_Click);
            //
            // rtbMd
            //
            this.rtbMd.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
            | System.Windows.Forms.AnchorStyles.Left)
            | System.Windows.Forms.AnchorStyles.Right)));
            this.rtbMd.BorderStyle = System.Windows.Forms.BorderStyle.None;
            this.rtbMd.Font = new System.Drawing.Font("MS UI Gothic", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(128)));
            this.rtbMd.Location = new System.Drawing.Point(3, 29);
            this.rtbMd.Name = "rtbMd";
            this.rtbMd.Size = new System.Drawing.Size(600, 497);
            this.rtbMd.TabIndex = 31;
            this.rtbMd.Text = "";
            this.rtbMd.WordWrap = false;
            this.rtbMd.TextChanged += new System.EventHandler(this.rtbMd_TextChanged);
            //
            // tabHTML
            //
            this.tabHTML.BackColor = System.Drawing.Color.Gainsboro;
            this.tabHTML.Controls.Add(this.tbHTML);
            this.tabHTML.Location = new System.Drawing.Point(4, 22);
            this.tabHTML.Name = "tabHTML";
            this.tabHTML.Padding = new System.Windows.Forms.Padding(3);
            this.tabHTML.Size = new System.Drawing.Size(606, 529);
            this.tabHTML.TabIndex = 2;
            this.tabHTML.Text = "  HTMLデータ  ";
            //
            // tbHTML
            //
            this.tbHTML.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
            | System.Windows.Forms.AnchorStyles.Left)
            | System.Windows.Forms.AnchorStyles.Right)));
            this.tbHTML.BackColor = System.Drawing.Color.White;
            this.tbHTML.Font = new System.Drawing.Font("MS UI Gothic", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(128)));
            this.tbHTML.Location = new System.Drawing.Point(6, 6);
            this.tbHTML.Multiline = true;
            this.tbHTML.Name = "tbHTML";
            this.tbHTML.ReadOnly = true;
            this.tbHTML.ScrollBars = System.Windows.Forms.ScrollBars.Vertical;
            this.tbHTML.Size = new System.Drawing.Size(594, 517);
            this.tbHTML.TabIndex = 32;
            //
            // tbTitle
            //
            this.tbTitle.Font = new System.Drawing.Font("MS UI Gothic", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(128)));
            this.tbTitle.Location = new System.Drawing.Point(11, 23);
            this.tbTitle.Name = "tbTitle";
            this.tbTitle.Size = new System.Drawing.Size(324, 23);
            this.tbTitle.TabIndex = 30;
            this.tbTitle.TextChanged += new System.EventHandler(this.tbTitle_TextChanged);
            //
            // lbCautionMessge
            //
            this.lbCautionMessge.AutoSize = true;
            this.lbCautionMessge.ForeColor = System.Drawing.Color.Tomato;
            this.lbCautionMessge.Location = new System.Drawing.Point(42, 0);
            this.lbCautionMessge.Name = "lbCautionMessge";
            this.lbCautionMessge.Size = new System.Drawing.Size(92, 12);
            this.lbCautionMessge.TabIndex = 51;
            this.lbCautionMessge.Text = "lbCautionMessge";
            //
            // groupBoxFile
            //
            this.groupBoxFile.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
            | System.Windows.Forms.AnchorStyles.Left)
            | System.Windows.Forms.AnchorStyles.Right)));
            this.groupBoxFile.Controls.Add(this.btnDelete);
            this.groupBoxFile.Controls.Add(this.lbCautionMessge);
            this.groupBoxFile.Controls.Add(this.btnSave);
            this.groupBoxFile.Controls.Add(this.tbTitle);
            this.groupBoxFile.Controls.Add(this.btnOpenFile);
            this.groupBoxFile.Controls.Add(this.tabEditor);
            this.groupBoxFile.ForeColor = System.Drawing.SystemColors.ControlText;
            this.groupBoxFile.Location = new System.Drawing.Point(305, 5);
            this.groupBoxFile.Name = "groupBoxFile";
            this.groupBoxFile.Size = new System.Drawing.Size(629, 617);
            this.groupBoxFile.TabIndex = 53;
            this.groupBoxFile.TabStop = false;
            this.groupBoxFile.Text = "ファイル";
            //
            // btnCredit
            //
            this.btnCredit.Image = global::LocalMarkdownExplorer.Resource1.info;
            this.btnCredit.Location = new System.Drawing.Point(266, 37);
            this.btnCredit.Name = "btnCredit";
            this.btnCredit.Size = new System.Drawing.Size(31, 27);
            this.btnCredit.TabIndex = 61;
            this.btnCredit.UseVisualStyleBackColor = true;
            this.btnCredit.Click += new System.EventHandler(this.btnCredit_Click);
            //
            // btnDelete
            //
            this.btnDelete.Image = global::LocalMarkdownExplorer.Resource1.delete16;
            this.btnDelete.Location = new System.Drawing.Point(505, 21);
            this.btnDelete.Name = "btnDelete";
            this.btnDelete.Size = new System.Drawing.Size(56, 26);
            this.btnDelete.TabIndex = 45;
            this.btnDelete.Text = "削除";
            this.btnDelete.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageBeforeText;
            this.btnDelete.UseVisualStyleBackColor = true;
            this.btnDelete.Click += new System.EventHandler(this.btnDelete_Click);
            //
            // btnSave
            //
            this.btnSave.Image = global::LocalMarkdownExplorer.Resource1.saveHS;
            this.btnSave.Location = new System.Drawing.Point(341, 21);
            this.btnSave.Name = "btnSave";
            this.btnSave.Size = new System.Drawing.Size(59, 26);
            this.btnSave.TabIndex = 35;
            this.btnSave.Text = "保存";
            this.btnSave.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageBeforeText;
            this.btnSave.UseVisualStyleBackColor = true;
            this.btnSave.Click += new System.EventHandler(this.btnSave_Click);
            //
            // btnOpenFile
            //
            this.btnOpenFile.Image = global::LocalMarkdownExplorer.Resource1.RightToLeftDoucmentHS;
            this.btnOpenFile.Location = new System.Drawing.Point(406, 21);
            this.btnOpenFile.Name = "btnOpenFile";
            this.btnOpenFile.Size = new System.Drawing.Size(93, 26);
            this.btnOpenFile.TabIndex = 40;
            this.btnOpenFile.Text = "ファイルを開く";
            this.btnOpenFile.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageBeforeText;
            this.btnOpenFile.UseVisualStyleBackColor = true;
            this.btnOpenFile.Click += new System.EventHandler(this.btnOpenFile_Click);
            //
            // pictureBox1
            //
            this.pictureBox1.Image = global::LocalMarkdownExplorer.Resource1.search;
            this.pictureBox1.Location = new System.Drawing.Point(266, 74);
            this.pictureBox1.Name = "pictureBox1";
            this.pictureBox1.Size = new System.Drawing.Size(16, 16);
            this.pictureBox1.TabIndex = 56;
            this.pictureBox1.TabStop = false;
            this.pictureBox1.Click += new System.EventHandler(this.pictureBox1_Click);
            //
            // btnOpenDir
            //
            this.btnOpenDir.Image = global::LocalMarkdownExplorer.Resource1.FolderOpen_16x16_72;
            this.btnOpenDir.Location = new System.Drawing.Point(110, 38);
            this.btnOpenDir.Name = "btnOpenDir";
            this.btnOpenDir.Size = new System.Drawing.Size(98, 26);
            this.btnOpenDir.TabIndex = 15;
            this.btnOpenDir.Text = "フォルダを開く";
            this.btnOpenDir.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageBeforeText;
            this.btnOpenDir.UseVisualStyleBackColor = true;
            this.btnOpenDir.Click += new System.EventHandler(this.btnOpenDir_Click);
            //
            // btnAdd
            //
            this.btnAdd.Image = global::LocalMarkdownExplorer.Resource1.NewDocumentHS;
            this.btnAdd.Location = new System.Drawing.Point(17, 38);
            this.btnAdd.Name = "btnAdd";
            this.btnAdd.Size = new System.Drawing.Size(87, 26);
            this.btnAdd.TabIndex = 10;
            this.btnAdd.Text = "新規作成";
            this.btnAdd.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageBeforeText;
            this.btnAdd.UseVisualStyleBackColor = true;
            this.btnAdd.Click += new System.EventHandler(this.btnAdd_Click);
            //
            // cbRootDir
            //
            this.cbRootDir.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
            this.cbRootDir.Font = new System.Drawing.Font("MS UI Gothic", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(128)));
            this.cbRootDir.FormattingEnabled = true;
            this.cbRootDir.Location = new System.Drawing.Point(17, 9);
            this.cbRootDir.Name = "cbRootDir";
            this.cbRootDir.Size = new System.Drawing.Size(164, 24);
            this.cbRootDir.TabIndex = 57;
            this.cbRootDir.TextChanged += new System.EventHandler(this.cbRootDir_TextChanged);
            //
            // btnAddRootDir
            //
            this.btnAddRootDir.Image = global::LocalMarkdownExplorer.Resource1.addDir;
            this.btnAddRootDir.Location = new System.Drawing.Point(187, 6);
            this.btnAddRootDir.Name = "btnAddRootDir";
            this.btnAddRootDir.Size = new System.Drawing.Size(31, 27);
            this.btnAddRootDir.TabIndex = 58;
            this.btnAddRootDir.UseVisualStyleBackColor = true;
            this.btnAddRootDir.Click += new System.EventHandler(this.btnAddRootDir_Click);
            //
            // btnEditRootDir
            //
            this.btnEditRootDir.Image = global::LocalMarkdownExplorer.Resource1.editDir;
            this.btnEditRootDir.Location = new System.Drawing.Point(224, 6);
            this.btnEditRootDir.Name = "btnEditRootDir";
            this.btnEditRootDir.Size = new System.Drawing.Size(31, 27);
            this.btnEditRootDir.TabIndex = 59;
            this.btnEditRootDir.UseVisualStyleBackColor = true;
            this.btnEditRootDir.Click += new System.EventHandler(this.btnEditRootDir_Click);
            //
            // lbAssist
            //
            this.lbAssist.BackColor = System.Drawing.Color.Azure;
            this.lbAssist.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed;
            this.lbAssist.Font = new System.Drawing.Font("MS UI Gothic", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(128)));
            this.lbAssist.FormattingEnabled = true;
            this.lbAssist.ItemHeight = 16;
            this.lbAssist.Location = new System.Drawing.Point(45, 93);
            this.lbAssist.Name = "lbAssist";
            this.lbAssist.Size = new System.Drawing.Size(268, 20);
            this.lbAssist.TabIndex = 54;
            this.lbAssist.Visible = false;
            this.lbAssist.DrawItem += new System.Windows.Forms.DrawItemEventHandler(this.lbAssist_DrawItem);
            this.lbAssist.KeyDown += new System.Windows.Forms.KeyEventHandler(this.lbAssist_KeyDown);
            this.lbAssist.MouseUp += new System.Windows.Forms.MouseEventHandler(this.lbAssist_MouseUp);
            //
            // btnAssistClose
            //
            this.btnAssistClose.Location = new System.Drawing.Point(289, 93);
            this.btnAssistClose.Name = "btnAssistClose";
            this.btnAssistClose.Size = new System.Drawing.Size(24, 21);
            this.btnAssistClose.TabIndex = 60;
            this.btnAssistClose.Text = "×";
            this.btnAssistClose.UseVisualStyleBackColor = true;
            this.btnAssistClose.Visible = false;
            this.btnAssistClose.Click += new System.EventHandler(this.btnAssistClose_Click);
            //
            // Form1
            //
            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
            this.ClientSize = new System.Drawing.Size(946, 631);
            this.Controls.Add(this.btnCredit);
            this.Controls.Add(this.btnAssistClose);
            this.Controls.Add(this.btnEditRootDir);
            this.Controls.Add(this.btnAddRootDir);
            this.Controls.Add(this.cbRootDir);
            this.Controls.Add(this.pictureBox1);
            this.Controls.Add(this.linkBack);
            this.Controls.Add(this.lbAssist);
            this.Controls.Add(this.groupBoxFile);
            this.Controls.Add(this.btnOpenDir);
            this.Controls.Add(this.tbSearch);
            this.Controls.Add(this.btnAdd);
            this.Controls.Add(this.lbMdList);
            this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
            this.Name = "Form1";
            this.Text = "LocalMarkdownExplorer";
            this.Load += new System.EventHandler(this.Form1_Load);
            this.Shown += new System.EventHandler(this.Form1_Shown);
            this.tabEditor.ResumeLayout(false);
            this.tabMd.ResumeLayout(false);
            this.tabText.ResumeLayout(false);
            this.tabHTML.ResumeLayout(false);
            this.tabHTML.PerformLayout();
            this.groupBoxFile.ResumeLayout(false);
            this.groupBoxFile.PerformLayout();
            ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit();
            this.ResumeLayout(false);
            this.PerformLayout();

        }

        #endregion

        private System.Windows.Forms.TextBox tbSearch;
        private System.Windows.Forms.Button btnAdd;
        private System.Windows.Forms.ListBox lbMdList;
        private System.Windows.Forms.TabControl tabEditor;
        private System.Windows.Forms.TabPage tabText;
        private System.Windows.Forms.TabPage tabMd;
        private System.Windows.Forms.WebBrowser webMd;
        private System.Windows.Forms.TextBox tbTitle;
        private System.Windows.Forms.Button btnSave;
        private System.Windows.Forms.Button btnOpenFile;
        private System.Windows.Forms.Button btnOpenDir;
        private System.Windows.Forms.Label lbCautionMessge;
        private System.Windows.Forms.TabPage tabHTML;
        private System.Windows.Forms.TextBox tbHTML;
        private System.Windows.Forms.GroupBox groupBoxFile;
        private System.Windows.Forms.Button btnDelete;
        private System.Windows.Forms.LinkLabel linkBack;
        private System.Windows.Forms.RichTextBox rtbMd;
        private System.Windows.Forms.Button btnHighLight;
        private System.Windows.Forms.PictureBox pictureBox1;
        private System.Windows.Forms.Button btnTextAdd_Code;
        private System.Windows.Forms.Button btnTextAdd_H1;
        private System.Windows.Forms.Button btnTextAdd_H2;
        private System.Windows.Forms.Button btnTextAdd_LI2;
        private System.Windows.Forms.Button btnTextAdd_Li1;
        private System.Windows.Forms.ComboBox cbRootDir;
        private System.Windows.Forms.Button btnAddRootDir;
        private System.Windows.Forms.Button btnEditRootDir;
        private System.Windows.Forms.ListBox lbAssist;
        private System.Windows.Forms.Button btnAssistClose;
        private System.Windows.Forms.Button btnCredit;
    }
}


text:
package org.vitrivr.cineast.core.data.providers.primitive;

import java.util.Arrays;

public class IntVectorProvider extends IntArrayProviderImpl implements PrimitiveTypeProvider{

	public IntVectorProvider(int[] array) {
		super(array);
	}

	@Override
	public ProviderDataType getType() {
		return ProviderDataType.INT_ARRAY;
	}

	@Override
  public String getString() {
    return Arrays.toString(getIntArray());
  }

}


text: Functional calculator made with Swift 2.2


text:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<title>DefaultElementLocator</title>
<link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style">

JavaScript is disabled on your browser.

Overview

Package

Class

Tree

Deprecated

Index

Help

Prev Class

Next Class

Frames

No Frames

All Classes

Summary:

Nested |

Field |

Constr |

Method

Detail:

Field |

Constr |

Method

org.openqa.selenium.support.pagefactory

Class DefaultElementLocator

java.lang.Object

org.openqa.selenium.support.pagefactory.DefaultElementLocator

All Implemented Interfaces:

ElementLocator

Direct Known Subclasses:

AjaxElementLocator

public class DefaultElementLocator
extends java.lang.Object
implements ElementLocator

The default element locator, which will lazily locate an element or an element list on a page. This class is
 designed for use with the PageFactory and understands the
 annotations FindBy and CacheLookup.

Constructor Summary

Constructors

Constructor and Description

DefaultElementLocator(SearchContext searchContext,
                     java.lang.reflect.Field field)

Creates a new element locator.

Method Summary

Methods

Modifier and Type
Method and Description

WebElement
findElement()

Find the element.

java.util.List<WebElement>
findElements()

Find the element list.

Methods inherited from class java.lang.Object

clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

DefaultElementLocator

public DefaultElementLocator(SearchContext searchContext,
                     java.lang.reflect.Field field)

Creates a new element locator.

Parameters:

searchContext - The context to use when finding the element

field - The field on the Page Object that will hold the located value

Method Detail

findElement

public WebElement findElement()

Find the element.

Specified by:

findElement in interface ElementLocator

findElements

public java.util.List<WebElement> findElements()

Find the element list.

Specified by:

findElements in interface ElementLocator

Overview

Package

Class

Tree

Deprecated

Index

Help

Prev Class

Next Class

Frames

No Frames

All Classes

Summary:

Nested |

Field |

Constr |

Method

Detail:

Field |

Constr |

Method


text:
layout: collection
title: Projects
collection: projects
template: modules/project.html
---


text:
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.

using System;
using Microsoft.AspNetCore.Mvc;

[assembly: ApiConventionType(typeof(DefaultApiConventions))]

namespace Microsoft.AspNetCore.Mvc.Api.Analyzers
{
    [ApiController]
    public class DiagnosticsAreReturned_ForActionResultOfTReturningMethodWithoutAnyAttributes : ControllerBase
    {
        public ActionResult<string> Method(Guid? id)
        {
            if (id == null)
            {
                return /*MM*/NotFound();
            }

            return "Hello world";
        }
    }
}