text:
#ifndef TENSORFLOW_COMPILER_MLIR_TFR_INTEGRATION_GRAPH_DECOMPOSE_PASS_H_
#define TENSORFLOW_COMPILER_MLIR_TFR_INTEGRATION_GRAPH_DECOMPOSE_PASS_H_

#include "mlir/IR/MLIRContext.h"  // from @llvm-project
#include "tensorflow/compiler/mlir/mlir_graph_optimization_pass.h"
#include "tensorflow/compiler/mlir/tfr/integration/tfr_decompose_ctx.h"
#include "tensorflow/compiler/xla/stream_executor/lib/statusor.h"

namespace tensorflow {
namespace tfr {

// An optimization pass that decompose the composite ops in a module according
// to the decomposition library. Currently the decomposition library is loaded
// each time the pass runs. A special environment variable is set to locate the
// decomposition library.
class GraphDecomposePass : public MlirOptimizationPass {
 public:
  llvm::StringRef name() const override { return "tfr"; }

  // Whether to run this pass. If this is enabled, the GraphDef will be imported
  // to MLIR even no tf composition file is found.
  ::tensorflow::MlirOptimizationPassState GetPassState(
      const DeviceSet* device_set, const ConfigProto& config_proto,
      const Graph& graph,
      const FunctionLibraryDefinition& function_library) const override;

  // This should be used as a thin mapper around mlir::ModulePass::runOnModule
  // API integrated with the Tensorflow runtime.
  Status Run(const ConfigProto& config_proto, mlir::ModuleOp module,
             const Graph& graph,
             const FunctionLibraryDefinition& function_library) override;
};

}  // namespace tfr
}  // namespace tensorflow

#endif  // TENSORFLOW_COMPILER_MLIR_TFR_INTEGRATION_GRAPH_DECOMPOSE_PASS_H_


text:
package com.oprisnik.semdroid.filter;

import com.oprisnik.semdroid.BaseComponentTest;
import com.oprisnik.semdroid.app.AccessFlags;
import com.oprisnik.semdroid.app.App;
import com.oprisnik.semdroid.app.DexClass;
import com.oprisnik.semdroid.app.DexMethod;
import com.oprisnik.semdroid.app.MethodCall;
import com.oprisnik.semdroid.app.Opcode;
import com.oprisnik.semdroid.config.BadConfigException;
import com.oprisnik.semdroid.config.Config;

import org.junit.Test;

import java.io.IOException;

import static org.junit.Assert.*;

public class MethodCallWhiteAndBlacklistFilterTest extends BaseComponentTest {

    @Test
    public void testDefaultMethodFilter() throws BadConfigException, IOException {
        Config config = getXmlConfig("/method-call-white-and-blacklist-filter.xml");

        MethodCallFilter filter = config.getComponentAndInit("method-call-filter", MethodCallFilter.class);
        assertNotNull(filter);

        App app = new App();

        assertFalse(filter.use(new MethodCall("com.oprisnik.semdroid.test.Class-onReceive", new String[0], app)));

        assertTrue(filter.use(new MethodCall("java.math.BigInteger-onReceive", new String[0], app)));
    }

}

redpajama_set_name: RedPajamaGithub


text:
<?xml version="1.0" encoding="utf-8"?>
<androidx.coordinatorlayout.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    android:id="@+id/coordinator"
    android:layout_width="match_parent"
    android:layout_height="match_parent">

    <LinearLayout
        android:id="@+id/bottom_sheet"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_gravity="bottom"
        android:animateLayoutChanges="true"
        android:orientation="vertical"
        android:background="?colorSurface"
        app:layout_behavior="com.google.android.material.bottomsheet.BottomSheetBehavior">

        <!-- This empty ComposeView is used to open a LinkVerificationDialog when needed -->
        <androidx.compose.ui.platform.ComposeView
            android:id="@+id/link_auth"
            android:layout_width="match_parent"
            android:layout_height="0dp" />

        <com.google.android.material.appbar.AppBarLayout
            android:id="@+id/appbar"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:animateLayoutChanges="true"
            app:elevation="0dp">

            <com.google.android.material.appbar.MaterialToolbar
                android:id="@+id/toolbar"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:background="?colorSurface"
                android:paddingEnd="12dp"
                app:contentInsetStart="0dp"
                app:contentInsetStartWithNavigation="0dp"
                tools:ignore="RtlSymmetry">

                <TextView
                    android:id="@+id/testmode"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:visibility="gone"
                    android:paddingTop="2dp"
                    android:paddingBottom="2dp"
                    android:paddingEnd="6dp"
                    android:paddingStart="6dp"
                    android:background="@drawable/stripe_paymentsheet_testmode_background"
                    android:textColor="@color/stripe_paymentsheet_testmode_text"
                    android:textStyle="bold"
                    android:text="@string/stripe_paymentsheet_test_mode_indicator"/>

            </com.google.android.material.appbar.MaterialToolbar>

        </com.google.android.material.appbar.AppBarLayout>

        <ScrollView
            android:id="@+id/scroll_view"
            android:layout_width="match_parent"
            android:layout_height="wrap_content">

            <LinearLayout
                android:id="@+id/fragment_container_parent"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:orientation="vertical"
                android:animateLayoutChanges="true">

                <androidx.compose.ui.platform.ComposeView
                    android:id="@+id/header"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:layout_marginHorizontal="@dimen/stripe_paymentsheet_outer_spacing_horizontal"/>

                <androidx.fragment.app.FragmentContainerView
                    android:id="@+id/fragment_container"
                    android:name="com.stripe.android.paymentsheet.PaymentSheetLoadingFragment"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content" />

                <TextView
                    android:id="@+id/message"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:visibility="gone"
                    android:layout_marginVertical="2dp"
                    android:layout_marginHorizontal="@dimen/stripe_paymentsheet_outer_spacing_horizontal" />

                <!-- Needed to avoid animating layout changes when showing/hiding the button -->
                <FrameLayout
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content">

                    <com.stripe.android.paymentsheet.ui.PrimaryButton
                        android:id="@+id/continue_button"
                        android:layout_marginTop="@dimen/stripe_paymentsheet_button_container_spacing"
                        android:layout_marginStart="@dimen/stripe_paymentsheet_outer_spacing_horizontal"
                        android:layout_marginEnd="@dimen/stripe_paymentsheet_outer_spacing_horizontal"
                        android:layout_width="match_parent"
                        android:layout_height="wrap_content"
                        android:visibility="gone" />

                </FrameLayout>

                <androidx.compose.ui.platform.ComposeView
                    android:id="@+id/notes"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:visibility="gone"
                    android:layout_marginVertical="2dp"
                    android:layout_marginHorizontal="@dimen/stripe_paymentsheet_outer_spacing_horizontal" />

                <View
                    android:id="@+id/bottom_spacer"
                    android:visibility="gone"
                    android:layout_width="wrap_content"
                    android:layout_height="@dimen/stripe_paymentsheet_button_container_spacing_bottom" />
            </LinearLayout>
        </ScrollView>
    </LinearLayout>
</androidx.coordinatorlayout.widget.CoordinatorLayout>


text:
SYNONYM

#### According to
Index Fungorum

#### Published in
null

#### Original name
Verrucaria epidermidis var. aeruginella Nyl.

### Remarks
null


text:
package com.apm.service;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.core.userdetails.UserDetailsService;
import org.springframework.security.core.userdetails.UsernameNotFoundException;
import org.springframework.stereotype.Service;

import com.apm.models.APMUser;
import com.apm.repos.APMUserRepository;

@Service
public class LoginUserDetailsService implements UserDetailsService {

	@Autowired
	APMUserRepository repo;

	@Override
	public APMUser loadUserByUsername(String username) throws UsernameNotFoundException {
		return repo.loadUserByUserName(username);
	}

	public APMUser authticateUserAndGetDetails(String username, String password) {
		return repo.authticateUserAndGetDetails(username, password);
	}

}


text:
/**
 * Module dependencies
 */

var util = require('util');
var _ = require('lodash');
_.defaults = require('merge-defaults');

/**
 * sails-generate-cli
 *
 * Usage:
 * `sails generate cli`
 *
 * @description Generates a cli
 * @help See http://links.sailsjs.org/docs/generators
 */

module.exports = {

  /**
   * `before()` is run before executing any of the `targets`
   * defined below.
   *
   * This is where we can validate user input, configure default
   * scope variables, get extra dependencies, and so on.
   *
   * @param  {Object} scope
   * @param  {Function} cb    [callback]
   */

  before: function (scope, cb) {

    // scope.args are the raw command line arguments.
    //
    // e.g. if someone runs:
    // $ sails generate cli user find create update
    // then `scope.args` would be `['user', 'find', 'create', 'update']`
    if (!scope.args[0]) {
      return cb( new Error('Please provide a name for this cli.') );
    }

    // scope.rootPath is the base path for this generator
    //
    // e.g. if this generator specified the target:
    // './Foobar.md': { copy: 'Foobar.md' }
    //
    // And someone ran this generator from `/Users/dbowie/sailsStuff`,
    // then `/Users/dbowie/sailsStuff/Foobar.md` would be created.
    if (!scope.rootPath) {
      return cb( INVALID_SCOPE_VARIABLE('rootPath') );
    }

    // Attach defaults
    _.defaults(scope, {
      createdAt: new Date()
    });

    // Decide the output filename for use in targets below:
    scope.filename = scope.args[0];

    // Add other stuff to the scope for use in our templates:
    scope.whatIsThis = 'an example file created at '+scope.createdAt;

    // When finished, we trigger a callback with no error
    // to begin generating files/folders as specified by
    // the `targets` below.
    cb();
  },

  /**
   * The files/folders to generate.
   * @type {Object}
   */

  targets: {

    // Usage:
    // './path/to/destination.foo': { someHelper: opts }

    // Creates a dynamically-named file relative to `scope.rootPath`
    // (defined by the `filename` scope variable).
    //
    // The `template` helper reads the specified template, making the
    // entire scope available to it (uses underscore/JST/ejs syntax).
    // Then the file is copied into the specified destination (on the left).
    './:filename': { template: 'example.template.js' },

    // Creates a folder at a static path
    './hey_look_a_folder': { folder: {} }

  },

  /**
   * The absolute path to the `templates` for this generator
   * (for use with the `template` helper)
   *
   * @type {String}
   */
  templatesDirectory: require('path').resolve(__dirname, './templates')
};

/**
 * INVALID_SCOPE_VARIABLE()
 *
 * Helper method to put together a nice error about a missing or invalid
 * scope variable. We should always validate any required scope variables
 * to avoid inadvertently smashing someone's filesystem.
 *
 * @param {String} varname [the name of the missing/invalid scope variable]
 * @param {String} details [optional - additional details to display on the console]
 * @param {String} message [optional - override for the default message]
 * @return {Error}
 * @api private
 */

function INVALID_SCOPE_VARIABLE (varname, details, message) {
  var DEFAULT_MESSAGE =
  'Issue encountered in generator "cli":\n'+
  'Missing required scope variable: `%s`"\n' +
  'If you are the author of `sails-generate-cli`, please resolve this '+
  'issue and publish a new patch release.';

  message = (message || DEFAULT_MESSAGE) + (details ? '\n'+details : '');
  message = util.inspect(message, varname);

  return new Error(message);
}


text:
/**
 * Created by pomy on 16/4/9.
 */

'use strict';

import React, {Component} from 'react';

import ContentView from '../general/content-view/index';

export default class ContentContainer extends Component {
    constructor (){
        super ();
    }

    render (){
        return <ContentView/>;
    }
}


text:
var BottomPanel = {
    init: function() {
        // TITLE
        EventSystem.addEventListener('video_info_fetched', function(info) {
            BottomPanel.setTitleText(info.title);
        });

        $('#bottom .info .i').click(function() {
            if (player.currentVideo) {
                $(this).arrowPopup('#video-info-popup', 'down');
            }
        });
        $('#bottom .info .title').bind('contextmenu', function(event) {
            if (player.currentVideo) {
                showResultsItemContextMenu(event, player.currentVideo.listView);
            }
            return false;
        });
        $('#bottom .info .title').click(function() {
            Utils.showWhatIsCurrentlyPlaying();
        });

        // CONTROLS
        $('#bottom .controls .playpause').click(player.playPause);
        $('#bottom .controls .next').click(player.next);
        $('#bottom .controls .prev').click(player.prev);

        // FULLSCREEN is set in FullScreen.js

        // SHUFFLE
        if (new Settings().shuffle) {
            $('#bottom .shuffle').addClass('on');
        }

        $('#bottom .shuffle').click(function() {
            var settings = new Settings(),
                $this = $(this);
            $this.toggleClass('on');
            settings.shuffle = $this.hasClass('on');
            settings.saveLocal();

            if (player.currentVideo && player.currentVideo.listView) {
                Queue.addSiblingsToPlayorder(player.currentVideo.listView);
            }
        });
    },
    setTitleText: function(titleText) {
        $('#bottom .info .i').css({'display': 'inline-block'});
        $('#bottom .info .title')
            .text(titleText)
            .attr('title', titleText);
    },
    show: function() {
        $('#bottom').show();
    },
    hide: function() {
        $('#bottom').hide();
    }
};


text:
'use strict';

/**
 * Requirements
 * @ignore
 */
const BaseTask = require('./BaseTask.js').BaseTask;
const FilesRepository = require('../model/file/FilesRepository.js').FilesRepository;
const PathesConfiguration = require('../model/configuration/PathesConfiguration.js').PathesConfiguration;
const SitesRepository = require('../model/site/SitesRepository.js').SitesRepository;
const ContentType = require('../model/ContentType.js');
const Site = require('../model/site/Site.js').Site;
const CliLogger = require('../cli/CliLogger.js').CliLogger;
const assertParameter = require('../utils/assert.js').assertParameter;
const pathes = require('../utils/pathes.js');
const urls = require('../utils/urls.js');
const through2 = require('through2');
const VinylFile = require('vinyl');
const co = require('co');
const sass = require('node-sass');
const templateString = require('es6-template-strings');

/**
 * @memberOf task
 */
class CompileSassTask extends BaseTask
{
    /**
     *
     */
    constructor(cliLogger, filesRepository, sitesRepository, pathesConfiguration)
    {
        super(cliLogger);

        //Check params
        assertParameter(this, 'filesRepository', filesRepository, true, FilesRepository);
        assertParameter(this, 'sitesRepository', sitesRepository, true, SitesRepository);
        assertParameter(this, 'pathesConfiguration', pathesConfiguration, true, PathesConfiguration);

        // Assign options
        this._filesRepository = filesRepository;
        this._sitesRepository = sitesRepository;
        this._pathesConfiguration = pathesConfiguration;
    }

    /**
     * @inheritDocs
     */
    static get injections()
    {
        return { 'parameters': [CliLogger, FilesRepository, SitesRepository, PathesConfiguration] };
    }

    /**
     * @inheritDocs
     */
    static get className()
    {
        return 'task/CompileSassTask';
    }

    /**
     * @protected
     * @returns {Promise<Array>}
     */
    prepareParameters(buildConfiguration, parameters)
    {
        const result = super.prepareParameters(buildConfiguration, parameters);
        result.query = result.query || '*';
        result.filenameTemplate = result.filenameTemplate || '${site.name.urlify()}/css/${group}.scss';
        return result;
    }

    /**
     * @protected
     * @returns {Promise<Array>}
     */
    generateFiles(buildConfiguration, parameters)
    {
        const scope = this;
        const promise = co(function *()
        {
            // Prepare
            const params = scope.prepareParameters(buildConfiguration, parameters);

            // Start
            const work = scope._cliLogger.section('Generating sass files for <' + params.query + '>');

            // Get Sites
            let sites = [];
            if (params.query !== '*')
            {
                const site = yield scope._sitesRepository.findBy(Site.ANY, params.query);
                sites.push(site);
            }
            else
            {
                sites = yield scope._sitesRepository.getItems();
            }
            scope.logger.debug('Generating files for sites : ' + (sites.reduce((current, next) => current+= next.name + ' ', '')));

            // Get files
            const files = [];
            for (const site of sites)
            {
                // Get sass sources
                const filter = function(file)
                {
                    return file.contentType === ContentType.SASS && !file.basename.startsWith('_');
                };
                const sourceFiles = yield scope._filesRepository.getBySiteGrouped(site, filter, 'groups.css', 'common');

                // Create sass files
                for (const group in sourceFiles)
                {
                    const filename = templateString(params.filenameTemplate, { site: site, group: group });
                    const workGroup = scope._cliLogger.work('Generating <' + filename + '> for site <' + site.name + '> and group <' + group + '>');

                    let content = '';
                    for (const file of sourceFiles[group])
                    {
                        let includePath = pathes.normalize(file.filename);
                        includePath = includePath.replace(pathes.normalize(scope._pathesConfiguration.sites), '');
                        includePath = urls.normalizePathSeperators(pathes.trimLeadingSlash(includePath));
                        content+= `@import '${includePath}';\n`;
                    }
                    const vinylFile = new VinylFile(
                        {
                            path: filename,
                            contents: new Buffer(content)
                        });
                    files.push(vinylFile);

                    scope._cliLogger.end(workGroup);
                }
            }

            // End
            scope._cliLogger.end(work);
            return files;
        });
        return promise;
    }

    /**
     * Compiles a sass file
     *
     * @protected
     * @return {Promise<VinylFile>}
     */
    compileFile(file, buildConfiguration, parameters)
    {
        if (!file || !file.isNull)
        {
            return Promise.resolve('');
        }

        const work = this._cliLogger.work('Compiling file <' + file.path + '>');

        // Prepare
        const includePathes = [this._pathesConfiguration.sites];
        if (this._pathesConfiguration.bower)
        {
            includePathes.push(this._pathesConfiguration.bower);
        }
        const compiledFile = new VinylFile(
            {
                path: file.path ? file.path.replace(/\.scss/, '.css') : '',
                contents: false
            });
        const options =
        {
            data: file.contents.toString(),
            includePaths: includePathes,
            outputStyle: 'expanded',
            sourceMap: buildConfiguration.get('sass.sourceMaps', false),
            sourceMapEmbed: true
        };

        // Render
        let compiled = false;
        try
        {
            if (options.data != '')
            {
                compiled = sass.renderSync(options);
            }
            else
            {
                compiled = { css: '' };
            }
        }
        catch(error)
        {
            compiled = false;
            this._cliLogger.error('Error compiling Sass');
            this._cliLogger.error(error.message);
            this._cliLogger.error(error.file + '@' + error.line);
        }

        // Error?
        if (compiled === false)
        {
            this._cliLogger.end(work, true);
            throw new Error(this.className + '::compileFile - could not compile file ' + file.path);
        }

        // Done
        compiledFile.contents = new Buffer(compiled.css);
        this._cliLogger.end(work);
        return Promise.resolve(compiledFile);
    }

    /**
     * @protected
     * @returns {Stream}
     */
    compileFiles(buildConfiguration, parameters)
    {
        const stream = through2(
            {
                objectMode: true
            });
        const scope = this;
        co(function *()
        {
            const sourceFiles = yield scope.generateFiles(buildConfiguration, parameters);
            const work = scope._cliLogger.section('Compiling sass files');
            scope._cliLogger.options(scope.prepareParameters(buildConfiguration, parameters));
            for (const sourceFile of sourceFiles)
            {
                const compiledFile = yield scope.compileFile(sourceFile, buildConfiguration, parameters);
                stream.write(compiledFile);
            }
            stream.end();
            scope._cliLogger.end(work);
        });
        return stream;
    }

    /**
     * @returns {Stream}
     */
    stream(stream, buildConfiguration, parameters)
    {
        let resultStream = stream;
        if (!resultStream)
        {
            resultStream = this.compileFiles(buildConfiguration, parameters);
        }
        return resultStream;
    }
}

/**
 * Exports
 * @ignore
 */
module.exports.CompileSassTask = CompileSassTask;


text:
yes | scp -i $1 $1 ubuntu@$2:/home/ubuntu/.ssh
ssh -i $1 ubuntu@$2 mkdir /home/ubuntu/ec2-ubuntu-ansible-master
scp -i $1 ./ansibleMaster.sh ubuntu@$2:/home/ubuntu/ec2-ubuntu-ansible-master
scp -i $1 ./ansible.cfg ubuntu@$2:/home/ubuntu/ec2-ubuntu-ansible-master
ssh -i $1 ubuntu@$2 chmod +x /home/ubuntu/ec2-ubuntu-ansible-master/ansibleMaster.sh
ssh -i $1 ubuntu@$2 /home/ubuntu/ec2-ubuntu-ansible-master/ansibleMaster.sh
ssh -i $1 ubuntu@$2 sudo cp /home/ubuntu/ec2-ubuntu-ansible-master/ansible.cfg /etc/ansible


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

<title>PronomDocumentHelper</title>
<meta name="date" content="2015-06-15">
<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

com.exlibris.digitool.common.dnx

Class PronomDocumentHelper

java.lang.Object

com.exlibris.digitool.common.dnx.PronomDocumentHelper

public class PronomDocumentHelper
extends java.lang.Object

Nested Class Summary

Nested Classes

Modifier and Type
Class and Description

class
PronomDocumentHelper.PronomRegistry

Constructor Summary

Constructors

Constructor and Description

PronomDocumentHelper(DnxDocument document)

Method Summary

Methods

Modifier and Type
Method and Description

DnxDocument
getDocument()

PronomDocumentHelper.PronomRegistry
getPronomRegistry()

void
setDocument(DnxDocument document)

void
setPronomRegistry(PronomDocumentHelper.PronomRegistry obj)

Methods inherited from class java.lang.Object

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

Constructor Detail

PronomDocumentHelper

public PronomDocumentHelper(DnxDocument document)

Method Detail

getDocument

public DnxDocument getDocument()

setDocument

public void setDocument(DnxDocument document)

getPronomRegistry

public PronomDocumentHelper.PronomRegistry getPronomRegistry()

setPronomRegistry

public void setPronomRegistry(PronomDocumentHelper.PronomRegistry obj)

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:
package de.germanspacebuild.plugins.fasttravel.commands;

import de.germanspacebuild.plugins.fasttravel.FastTravel;
import de.germanspacebuild.plugins.fasttravel.data.FastTravelDB;
import de.germanspacebuild.plugins.fasttravel.data.FastTravelSign;
import de.germanspacebuild.plugins.fasttravel.io.IOManager;
import org.bukkit.Bukkit;
import org.bukkit.command.Command;
import org.bukkit.command.CommandExecutor;
import org.bukkit.command.CommandSender;

import java.util.List;
import java.util.UUID;

/**
 * Created by oneill011990 on 02.09.2014
 * for FastTravelReborn
 *
 * @author oneill011990
 */
public class ClearCommand implements CommandExecutor {

    FastTravel plugin;
    IOManager io;

    public ClearCommand(FastTravel plugin) {
        this.plugin = plugin;
        this.io = plugin.getIOManger();
    }

    public boolean onCommand(CommandSender sender, Command cmd, String label, String[] args) {
        if (!sender.hasPermission("fasttravelsigns.clear")) {
            io.sendTranslation(sender, "Perms.Not");
            return false;
        }
        if (args.length == 0) {
            io.sendTranslation(sender, "Command.NoSign");
        } else if (FastTravelDB.getSign(args[0]) == null) {
            io.send(sender, io.translate("Sign.Exists.Not").replaceAll("%sign", args[0]));
        } else {
            FastTravelSign sign = FastTravelDB.getSign(args[0]);
            List<UUID> players = sign.getPlayers();
            for (UUID player : players) {
                io.send(Bukkit.getServer().getPlayer(player), io.translate("Player.Removed").replaceAll("%sign",
                        sign.getName()));
            }
            sign.clearPlayers();
            return true;
        }
        return false;
    }
}


text:
.dashboard {
  width: 100%;
  overflow: hidden;
  background: pink;
  height: 90%;
}

.dashboard /deep/ .widget {
  background-color: darkgrey;
}

.widget .close {
  position: absolute;
  top: 5px;
  right: 5px;
  cursor: pointer;
}

.handle {
  cursor: move;
}


text:
define("dojox/layout/ToggleSplitter",["dojo","dijit","dijit/layout/BorderContainer"],function(_1,_2){
_1.experimental("dojox.layout.ToggleSplitter");
var _3=_1.declare("dojox.layout.ToggleSplitter",_2.layout._Splitter,{container:null,child:null,region:null,state:"full",_closedSize:"0",baseClass:"dojoxToggleSplitter",templateString:"
"+"
"+"
"+"
",postCreate:function(){
this.inherited(arguments);
var _4=this.region;
_1.addClass(this.domNode,this.baseClass+_4.charAt(0).toUpperCase()+_4.substring(1));
},startup:function(){
this.inherited(arguments);
var _5=this.child,_6=this.child.domNode,_7=_1.style(_6,(this.horizontal?"height":"width"));
this.domNode.setAttribute("aria-controls",_6.id);
_1.forEach(["toggleSplitterState","toggleSplitterFullSize","toggleSplitterCollapsedSize"],function(_8){
var _9=_8.substring("toggleSplitter".length);
_9=_9.charAt(0).toLowerCase()+_9.substring(1);
if(_8 in this.child){
this[_9]=this.child[_8];
}
},this);
if(!this.fullSize){
this.fullSize=this.state=="full"?_7+"px":"75px";
}
this._openStyleProps=this._getStyleProps(_6,"full");
this._started=true;
this.set("state",this.state);
return this;
},_onKeyPress:function(_a){
if(this.state=="full"){
this.inherited(arguments);
}
if(_a.charCode==_1.keys.SPACE||_a.keyCode==_1.keys.ENTER){
this._toggle(_a);
_1.stopEvent(_a);
}
},_onToggleNodeMouseDown:function(_b){
_1.stopEvent(_b);
this.toggleNode.focus();
},_startDrag:function(e){
if(this.state=="full"){
this.inherited(arguments);
}
},_stopDrag:function(e){
this.inherited(arguments);
this.toggleNode.blur();
},_toggle:function(_c){
var _d;
switch(this.state){
case "full":
_d=this.collapsedSize?"collapsed":"closed";
break;
case "collapsed":
_d="closed";
break;
default:
_d="full";
}
this.set("state",_d);
},_onToggleNodeMouseMove:function(_e){
var _f=this.baseClass,_10=this.toggleNode,on=this.state=="full"||this.state=="collapsed",_11=_e.type=="mouseout"||_e.type=="blur";
_1.toggleClass(_10,_f+"IconOpen",_11&&on);
_1.toggleClass(_10,_f+"IconOpenHover",!_11&&on);
_1.toggleClass(_10,_f+"IconClosed",_11&&!on);
_1.toggleClass(_10,_f+"IconClosedHover",!_11&&!on);
},_handleOnChange:function(_12){
var _13=this.child.domNode,_14,_15,dim=this.horizontal?"height":"width";
if(this.state=="full"){
var _16=_1.mixin({display:"block",overflow:"auto",visibility:"visible"},this._openStyleProps);
_16[dim]=(this._openStyleProps&&this._openStyleProps[dim])?this._openStyleProps[dim]:this.fullSize;
_1.style(this.domNode,"cursor","");
_1.style(_13,_16);
}else{
if(this.state=="collapsed"){
_15=_1.getComputedStyle(_13);
_14=this._getStyleProps(_13,"full",_15);
this._openStyleProps=_14;
_1.style(this.domNode,"cursor","auto");
_1.style(_13,dim,this.collapsedSize);
}else{
if(!this.collapsedSize){
_15=_1.getComputedStyle(_13);
_14=this._getStyleProps(_13,"full",_15);
this._openStyleProps=_14;
}
var _17=this._getStyleProps(_13,"closed",_15);
_1.style(this.domNode,"cursor","auto");
_1.style(_13,_17);
}
}
this._setStateClass();
if(this.container._started){
this.container._layoutChildren(this.region);
}
},_getStyleProps:function(_18,_19,_1a){
if(!_1a){
_1a=_1.getComputedStyle(_18);
}
var _1b={},dim=this.horizontal?"height":"width";
_1b["overflow"]=(_19!="closed")?_1a["overflow"]:"hidden";
_1b["visibility"]=(_19!="closed")?_1a["visibility"]:"hidden";
_1b[dim]=(_19!="closed")?_18.style[dim]||_1a[dim]:this._closedSize;
var _1c=["Top","Right","Bottom","Left"];
_1.forEach(["padding","margin","border"],function(_1d){
for(var i=0;i<_1c.length;i++){
var _1e=_1d+_1c[i];
if(_1d=="border"){
_1e+="Width";
}
if(undefined!==_1a[_1e]){
_1b[_1e]=(_19!="closed")?_1a[_1e]:0;
}
}
});
return _1b;
},_setStateClass:function(){
var _1f="&#9652",_20=this.region.toLowerCase(),_21=this.baseClass,_22=this.toggleNode,on=this.state=="full"||this.state=="collapsed",_23=this.focused;
_1.toggleClass(_22,_21+"IconOpen",on&&!_23);
_1.toggleClass(_22,_21+"IconClosed",!on&&!_23);
_1.toggleClass(_22,_21+"IconOpenHover",on&&_23);
_1.toggleClass(_22,_21+"IconClosedHover",!on&&_23);
if(_20=="top"&&on||_20=="bottom"&&!on){
_1f="&#9650";
}else{
if(_20=="top"&&!on||_20=="bottom"&&on){
_1f="&#9660";
}else{
if(_20=="right"&&on||_20=="left"&&!on){
_1f="&#9654";
}else{
if(_20=="right"&&!on||_20=="left"&&on){
_1f="&#9664";
}
}
}
}
this.a11yText.innerHTML=_1f;
},_setStateAttr:function(_24){
if(!this._started){
return;
}
var _25=this.state;
this.state=_24;
this._handleOnChange(_25);
var _26;
switch(_24){
case "full":
this.domNode.setAttribute("aria-expanded",true);
_26="onOpen";
break;
case "collapsed":
this.domNode.setAttribute("aria-expanded",true);
_26="onCollapsed";
break;
default:
this.domNode.setAttribute("aria-expanded",false);
_26="onClosed";
}
this[_26](this.child);
},onOpen:function(_27){
},onCollapsed:function(_28){
},onClosed:function(_29){
}});
_1.extend(_2._Widget,{toggleSplitterState:"full",toggleSplitterFullSize:"",toggleSplitterCollapsedSize:""});
return _3;
});


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"/>
<meta name="generator" content="Doxygen 1.8.12"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Tempest: Tempest::Layout Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>

<link href="navtree.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" />
<link href="style.css" rel="stylesheet" type="text/css"/>

Tempest

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

Public Member Functions |
Static Public Member Functions |
Protected Member Functions |
Static Protected Member Functions |
Friends |
List of all members

Tempest::Layout Class Reference

The Layout class is the base class of ui-geometry managers.
 More...

#include <layout.h>

Inheritance diagram for Tempest::Layout:

  <map id="Tempest::Layout_map" name="Tempest::Layout_map">
<area href="struct_tempest_1_1_abstract_list_box_1_1_wrap_layout.html" alt="Tempest::AbstractListBox::WrapLayout" shape="rect" coords="0,56,225,80"/>
<area href="class_tempest_1_1_linear_layout.html" alt="Tempest::LinearLayout" shape="rect" coords="235,56,460,80"/>
</map>

Public Member Functions

Widget * 	owner ()

const Widget * 	owner () const

void 	add (Widget *w, size_t pos)

void 	add (Widget *widget)

void 	del (Widget *widget)

void 	removeAll ()

Widget * 	take (Widget *widget)

const std::vector< Widget * > & 	widgets ()

virtual void 	applyLayout ()

void 	setSpacing (int s)

int 	spacing () const

void 	setMargin (const Margin &m)

void 	setMargin (int l, int r, int t, int b)

const Margin & 	margin () const

Static Public Member Functions

static void 	placeIn (Widget *wx, int x, int y, int w, int h)

static void 	placeIn (Widget *wx, const Rect &r)

Protected Member Functions

int 	summarySpacings ()

int 	visibleCount () const

Static Protected Member Functions

static Size 	sizeHint (const Widget *wx)

Friends

class 	Widget

Detailed Description

The Layout class is the base class of ui-geometry managers.

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

ui/layout.h

Tempest

Layout

Generated by

     1.8.12


text:
package com.hazelcast.test.starter.test;

import com.hazelcast.config.Config;
import com.hazelcast.core.Hazelcast;
import com.hazelcast.core.HazelcastInstance;
import com.hazelcast.instance.impl.HazelcastInstanceImpl;
import com.hazelcast.instance.impl.Node;
import com.hazelcast.instance.impl.TestUtil;
import com.hazelcast.internal.partition.TestPartitionUtils;
import com.hazelcast.internal.partition.impl.PartitionServiceState;
import com.hazelcast.internal.server.FirewallingServer;
import com.hazelcast.internal.server.tcp.TcpServer;
import com.hazelcast.test.HazelcastSerialClassRunner;
import com.hazelcast.test.TestHazelcastInstanceFactory;
import com.hazelcast.test.annotation.SlowTest;
import com.hazelcast.test.starter.HazelcastStarter;
import org.junit.After;
import org.junit.Ignore;
import org.junit.Test;
import org.junit.experimental.categories.Category;
import org.junit.runner.RunWith;

import java.io.File;

import static com.hazelcast.instance.impl.TestUtil.terminateInstance;
import static com.hazelcast.test.HazelcastTestSupport.assertInstanceOf;
import static com.hazelcast.test.HazelcastTestSupport.ignore;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail;

@RunWith(HazelcastSerialClassRunner.class)
@Category(SlowTest.class)
@Ignore("To be enabled in 4.1 with 4.x instances - see https://github.com/hazelcast/hazelcast/issues/15263")
public class HazelcastStarterTest {

    private HazelcastInstance hz;

    @After
    public void tearDown() {
        if (hz != null) {
            hz.shutdown();
        }
    }

    @Test
    public void testMember() {
        hz = HazelcastStarter.newHazelcastInstance("3.7", false);

        HazelcastInstance bouncingInstance = null;
        try {
            for (int i = 1; i < 6; i++) {
                String version = "3.7." + i;
                System.out.println("Starting member " + version);
                bouncingInstance = HazelcastStarter.newHazelcastInstance(version);
                System.out.println("Stopping member " + version);
                bouncingInstance.shutdown();
            }
        } finally {
            if (bouncingInstance != null && bouncingInstance.getLifecycleService().isRunning()) {
                terminateInstance(bouncingInstance);
            }
        }
    }

    /**
     * Hazelcast 3.9 knows the {@link FirewallingConnectionManager}.
     */
    // reason for ignore: The ConnectionManager interface got replaced
    // by EndpointManager and NetworkingService in 3.12. This test is
    // supposed to verify behavior for split-brain compatibility tests
    // that needs a considerable effort to adapt
    // FirewallingConnectionManager to 3.12's NetworkingService. This test
    // therefore got ignored until the decisions is made whether or not
    // to support split-brain compatibility tests with the recent changes.
    @Ignore
    @Test
    public void testMemberWithConfig_withFirewallingConnectionManager() {
        testMemberWithConfig("3.9", true);
    }

    private void testMemberWithConfig(String version, boolean supportsFirewallingConnectionManager) {
        Config config = new Config()
                .setInstanceName("test-name");

        hz = HazelcastStarter.newHazelcastInstance(version, config, false);
        assertEquals(hz.getName(), "test-name");

        Node node = HazelcastStarter.getNode(hz);
        assertNotNull(node);
        assertEquals("Expected the same address from HazelcastInstance and Node",
                hz.getCluster().getLocalMember().getAddress(), node.getThisAddress());
        if (supportsFirewallingConnectionManager) {
            assertInstanceOf(FirewallingServer.class, node.getServer());
        } else {
            assertInstanceOf(TcpServer.class, node.getServer());
        }
    }

    @Test
    public void testGetOrCreateWorkingDir() {
        String versionSpec = "3.10-EE-test";
        File dir = HazelcastStarter.getOrCreateVersionDirectory(versionSpec);
        assertTrue("Temporary directory should have been created", dir.exists());
        String path = dir.getAbsolutePath();
        // ensure no exception is thrown when attempting to recreate an existing version directory
        dir = HazelcastStarter.getOrCreateVersionDirectory(versionSpec);
        assertEquals(path, dir.getAbsolutePath());
    }

    @Test
    public void testHazelcastInstanceCompatibility_withStarterInstance() {
        Config config = new Config();
        hz = HazelcastStarter.newHazelcastInstance("3.10.3", config, false);
        testHazelcastInstanceCompatibility(hz, null);
    }

    @Test
    public void testHazelcastInstanceCompatibility_withRealInstance() {
        HazelcastInstance instance = Hazelcast.newHazelcastInstance();
        try {
            testHazelcastInstanceCompatibility(instance, null);
        } finally {
            terminateInstance(instance);
        }
    }

    @Test
    public void testHazelcastInstanceCompatibility_withFactoryInstance() {
        TestHazelcastInstanceFactory factory = new TestHazelcastInstanceFactory(1);
        HazelcastInstance instance = factory.newHazelcastInstance();
        try {
            testHazelcastInstanceCompatibility(instance, factory);
        } finally {
            factory.terminateAll();
        }
    }

    private static void testHazelcastInstanceCompatibility(HazelcastInstance instance, TestHazelcastInstanceFactory factory) {
        Node node = TestUtil.getNode(instance);
        HazelcastInstanceImpl instanceImpl = TestUtil.getHazelcastInstanceImpl(instance);
        if (factory != null) {
            assertEquals("Expected one active HazelcastInstance in the factory", 1, factory.getAllHazelcastInstances().size());
        }

        assertNode(node, true);
        assertHazelcastInstanceImpl(instanceImpl);
        assertSafePartitionServiceState(instance);

        instance.shutdown();
        assertNode(node, false);
        if (factory != null) {
            assertEquals("Expected no active HazelcastInstances in the factory", 0, factory.getAllHazelcastInstances().size());
        }

        assertGetNodeFromShutdownInstance(instance);
        assertGetHazelcastInstanceImplFromShutdownInstance(instance);
        assertSafePartitionServiceState(instance);
    }

    private static void assertNode(Node node, boolean isRunning) {
        assertNotNull(node);
        assertEquals(isRunning, node.isRunning());
    }

    private static void assertGetNodeFromShutdownInstance(HazelcastInstance hz) {
        try {
            TestUtil.getNode(hz);
            fail("Expected IllegalArgumentException from TestUtil.getNode()");
        } catch (IllegalArgumentException expected) {
            ignore(expected);
        }
    }

    private static void assertHazelcastInstanceImpl(HazelcastInstanceImpl hazelcastInstanceImpl) {
        assertNotNull(hazelcastInstanceImpl);
    }

    private static void assertGetHazelcastInstanceImplFromShutdownInstance(HazelcastInstance hz) {
        try {
            TestUtil.getHazelcastInstanceImpl(hz);
            fail("Expected IllegalArgumentException from TestUtil.getHazelcastInstanceImpl()");
        } catch (IllegalArgumentException expected) {
            ignore(expected);
        }
    }

    private static void assertSafePartitionServiceState(HazelcastInstance realInstance) {
        PartitionServiceState partitionServiceState = TestPartitionUtils.getPartitionServiceState(realInstance);
        assertEquals(PartitionServiceState.SAFE, partitionServiceState);
    }
}


text:
package sklse.yongfeng.juint;

import org.junit.*;
import org.junit.runners.MethodSorters;
import static org.hamcrest.CoreMatchers.*;

@FixMethodOrder(MethodSorters.NAME_ASCENDING) // Setting execution order
public class CalculatorTest {

//	@Rule
//	public Timeout globalTimeout = Timeout.seconds(3000);

	@Before
	public void setUp(){
		// Here do some configuration before testing.

	}

	@Test
	public void testAdd1(){
		Calculator ca = new Calculator(1, 1);
		Assert.assertEquals(2, ca.Add());
		Assert.assertThat(ca.Add(), is(2));
	}

	@Test(timeout = 2000)
//	@Test
	public void testAdd2(){
		Calculator ca1 = new Calculator(1, 2);
		Assert.assertEquals(3, ca1.Add());
		for(int i=0;;i++){
			// here is the infinite for-loop
		}
//		Assert.assertThat(ca1.Add(), );
	}

	@Test
	public void testAdd3(){
		Calculator ca2 = new Calculator(3, 2);
		Assert.assertEquals(5, ca2.Add());
	}

	@Test
	public void testMinus1(){
		Calculator ca = new Calculator(1, 1);
		Assert.assertEquals(0, ca.Minus());
	}

	@Test
	public void testMinus2(){
		Calculator ca1 = new Calculator(1, 2);
		Assert.assertEquals(-1, ca1.Minus());
	}

	@Test
	public void testMinus3(){
		Calculator ca2 = new Calculator(3, 2);
		Assert.assertEquals(1, ca2.Minus());
	}

	@Test
	public void testDivide1(){
		Calculator ca2 = new Calculator(2, 2);
		Assert.assertEquals(1, ca2.Divide());
	}

	@Test
	public void testDivide2(){
		Calculator ca2 = new Calculator(2, 4);
		Assert.assertEquals(0, ca2.Divide());
	}

	@Test
	public void testDivide3(){
		Calculator ca2 = new Calculator(3, 2);
		Assert.assertEquals(1.5, ca2.Divide(), 0.1);
	}

	@Test
	public void testDivide4(){
		Calculator ca2 = new Calculator(0, 2);
		Assert.assertEquals(0, ca2.Divide());
	}

	@Test(expected = ArithmeticException.class) //This test case will pass even if Line 77 will throw Exception
	public void testDivide5(){
		Calculator ca2 = new Calculator(1, 0);
		Assert.assertEquals(0, ca2.Divide()); // It will throw ArithmeticException here
	}

	@After
	public void tearDown(){

	}

}


text:
<?xml version="1.0" encoding="utf-8"?>
<appengine-web-app xmlns="http://appengine.google.com/ns/1.0">
    <application>myanhub-collabra</application>
    <version>1</version>
    <threadsafe>true</threadsafe>
</appengine-web-app>


text:
#ifndef   _KCUDA_CONSTS
#define   _KCUDA_CONSTS

#define KC_GPU_DEVICE  0

/*option for chosing to compile the CUDA functions as single or double precision.
* The code was initially intended to have an easy switch between double/single
* precision for speed, but this didn't percolate through and some functions are
* only double precision compatible.
*/
#define KC_DOUBLE_PRECISION 1

#if KC_DOUBLE_PRECISION >0
    #define KC_FP_TYPE double
    #define KC_FP_TYPE_MATLAB mxDOUBLE_CLASS

    #define KC_LOG log
    #define KC_EXP exp
    #define KC_GAMMALN lgamma
    #define KC_SQRT sqrt
    #define KC_MIN fmin
    #define KC_MAX fmax
    #define KC_NORMCDF normcdf
    #define KC_MINN 1e-30
    #define KC_MAXN 1e30
    #define KC_POW pow

    #define KC_RANDOM_UNIFORM_FUNCTION curandGenerateUniformDouble
    #define KC_RANDOM_NORMAL_FUNCTION curandGenerateNormalDouble
#else
    #define KC_FP_TYPE float
    #define KC_FP_TYPE_MATLAB mxSINGLE_CLASS

    #define KC_LOG logf
    #define KC_EXP expf
    #define KC_GAMMALN lgammaf
    #define KC_SQRT sqrtf
    #define KC_MIN fminf
    #define KC_MAX fmaxf
    #define KC_NORMCDF normcdff
    #define KC_MINN 1e-15
    #define KC_MAXN 1e15
    #define KC_POW powf

    #define KC_RANDOM_UNIFORM_FUNCTION curandGenerateUniform
    #define KC_RANDOM_NORMAL_FUNCTION curandGenerateNormal
#endif

//For 32 or 64 bit compilation

#define KC_PTR_SIZE long long
#define KC_PTR_SIZE_MATLAB mxUINT64_CLASS

#include <cuda.h>

//Array types
#define KC_DOUBLE_ARRAY 1
#define KC_INT_ARRAY    2
#define KC_FLOAT_ARRAY  3

//Struct field names
#define KC_ARRAY_NUMEL "numel"
#define KC_ARRAY_NDIM  "ndim"
#define KC_ARRAY_SIZE  "size"
#define KC_ARRAY_PTR   "ptr"
#define KC_ARRAY_TYPE  "type"

#define KC_HANDLE_SPARSE_PTR   "sparseHandlePtr"
#define KC_HANDLE_RAND_PTR   "randHandlePtr"

#define KC_NULL_ARRAY   0

#include <sys/time.h>

#endif

#include <math.h>
#ifndef  M_PI
#define M_PI 3.14159265358979323846
#define M_SQRT2 1.41421356237309504880
#define M_SQRT_2 0.707106781186547524401
#define M_1_SQRTPI 0.564189583547756286948
#endif


text:
/* globals module */
let dataUtils = require('./utils/data-utils');

module.exports = function(models) {
    let { Recipe } = models;
    const approvedStatus = 'approved';
    const waitingForApprovalStatus = 'waiting-for-approval';

    return {
        createRecipe(recipe) {
            return new Promise((resolve, reject) => {
                    let newRecipe = new Recipe({
                        name: recipe.name,
                        ingredients: recipe.ingredients,
                        methodOfPreparation: recipe.methodOfPreparation,
                        imgUrl: recipe.imgUrl,
                        author: recipe.author,
                        status: recipe.status,
                        rejectMessage: recipe.rejectMessage
                    });

                    resolve(newRecipe);
                })
                .then((newRecipe) => {
                    return dataUtils.save(newRecipe);
                })
        },
        getAllPublicRecipes() {
            return dataUtils.getAllByStatus(Recipe, approvedStatus);
        },
        getAllUnapprovedRecipes() {
            return dataUtils.getAllByStatus(Recipe, waitingForApprovalStatus);
        },
        getRecipeById(id) {
            return dataUtils.getOneById(Recipe, id)
        },
        changeRecipeStatus(recipeInfo) {
            return new Promise((resolve, reject) => {
                this.getRecipeById(recipeInfo._id)
                    .then(recipeForUpdate => {
                            recipeForUpdate.status = recipeInfo.status;
                            recipeForUpdate.rejectMessage = recipeInfo.rejectMessage;

                        dataUtils.update(recipeForUpdate);
                        resolve(recipeForUpdate);
                        })
                    });
        },
        addCommentToRecipe(recipe) {
            return new Promise((resolve, reject) => {
                this.getRecipeById(recipe._id)
                    .then(recipeForUpdate => {
                            recipeForUpdate.comments = recipe.comments;

                        dataUtils.update(recipeForUpdate);
                        resolve(recipeForUpdate);
                        })
                    });
        }
    };
};


text:
{% load static %}<!DOCTYPE html>

    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link rel="shortcut icon" href="{% static 'img/favicon.png' %}" />

    <title>тестовое задание для grissli.ru</title>

    <link href="{% static 'css/bootstrap.min.css' %}" rel="stylesheet">

    <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css">

    <link href='https://fonts.googleapis.com/css?family=Inconsolata' rel='stylesheet' type='text/css'>

    <link href="{% static 'css/style.css' %}" rel="stylesheet">

    {% load socketio_tags %}
    {% socketio %}

	{% block head %}
	{% endblock %}

               Admin panel

               GitHub

               Резюме

      {% block content %}
      {% endblock %}

        Внимание! Для тестирования можно использовать аккаунт admin/admin.

Frontend

              Bootstrap, jQuery, font-awesome

Backend

              Django, Queue, BeautifulSoup, django-socketio

© 2016 Grissli, Inc.


text:
{% extends 'modal_content.html' %}

{% block content_tag %}form{% endblock %}
{% block content_attrs %}method="POST" action="/saagie?view=login_form"{% endblock %}

{% block body %}
  {% if error %}

{{ error }}

  {% endif %}

    Saagie root URL
    <input type="text" id="saagie_root_url" class="form-control" name="saagie_root_url" value="{{ saagie_root_url }}" placeholder="https://xxx-manager.saagie.prod.io/" />

    Username
    <input id="username" class="form-control" name="username" value="{{ username }}" type="text" />

    Password
    <input id="password" class="form-control" name="password" type="password" />

{% endblock %}

{% block footer %}
  <button class="btn btn-primary" type="submit">Log in</button>
{% endblock %}


text:
<?php
namespace LolAPI\GameConstants\SubType\SubTypes;

use LolAPI\GameConstants\SubType\SubTypeInterface;

class URFBot implements SubTypeInterface
{
    /**
     * Returns code
     * @return string
     */
    public function getCode()
    {
        return self::SUB_TYPE_URF_BOT;
    }

    /**
     * Returns description (from API documentation)
     * @return string
     */
    public function getDescription()
    {
        return "Ultra Rapid Fire games played against AI";
    }

}


text:
package me.leolin;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.scheduling.annotation.EnableAsync;
import org.springframework.scheduling.annotation.EnableScheduling;

/**
 * @author leolin
 */
@SpringBootApplication
@EnableScheduling
@EnableAsync
public class App {
    public static void main(String[] args) {
        SpringApplication.run(App.class, args);
    }
}


text:
package com.dianping.cat.consumer.event;

import com.dianping.cat.Constants;
import com.dianping.cat.consumer.event.model.entity.EventName;
import com.dianping.cat.consumer.event.model.entity.EventReport;
import com.dianping.cat.consumer.event.model.entity.EventType;
import com.dianping.cat.consumer.event.model.entity.Machine;
import com.dianping.cat.consumer.event.model.entity.Range;
import com.dianping.cat.consumer.event.model.transform.DefaultMerger;

public class EventReportMerger extends DefaultMerger {
	public EventReportMerger(EventReport eventReport) {
		super(eventReport);
	}

	@Override
	public void mergeMachine(Machine old, Machine machine) {
	}

	@Override
	public void mergeName(EventName old, EventName other) {
		old.setTotalCount(old.getTotalCount() + other.getTotalCount());
		old.setFailCount(old.getFailCount() + other.getFailCount());
		old.setTps(old.getTps() + other.getTps());

		if (old.getTotalCount() > 0) {
			old.setFailPercent(old.getFailCount() * 100.0 / old.getTotalCount());
		}

		if (old.getSuccessMessageUrl() == null) {
			old.setSuccessMessageUrl(other.getSuccessMessageUrl());
		}

		if (old.getFailMessageUrl() == null) {
			old.setFailMessageUrl(other.getFailMessageUrl());
		}
	}

	@Override
	public void mergeRange(Range old, Range range) {
		old.setCount(old.getCount() + range.getCount());
		old.setFails(old.getFails() + range.getFails());
	}

	public Machine mergesForAllMachine(EventReport report) {
		Machine machine = new Machine(Constants.ALL);

		for (Machine m : report.getMachines().values()) {
			if (!m.getIp().equals(Constants.ALL)) {
				visitMachineChildren(machine, m);
			}
		}

		return machine;
	}

	@Override
	public void mergeType(EventType old, EventType other) {
		old.setTotalCount(old.getTotalCount() + other.getTotalCount());
		old.setFailCount(old.getFailCount() + other.getFailCount());
		old.setTps(old.getTps() + other.getTps());

		if (old.getTotalCount() > 0) {
			old.setFailPercent(old.getFailCount() * 100.0 / old.getTotalCount());
		}

		if (old.getSuccessMessageUrl() == null) {
			old.setSuccessMessageUrl(other.getSuccessMessageUrl());
		}

		if (old.getFailMessageUrl() == null) {
			old.setFailMessageUrl(other.getFailMessageUrl());
		}
	}

	@Override
	public void visitEventReport(EventReport eventReport) {
		super.visitEventReport(eventReport);

		EventReport report = getEventReport();
		report.getDomainNames().addAll(eventReport.getDomainNames());
		report.getIps().addAll(eventReport.getIps());
	}

}


text:
> {%= description %}

Based on [mout's][mout] implementation of `every`.

## Install
**Install with NPM**
{%= include("install-npm", {save: true}) %}

**Install with Bower**
{%= include("install-bower", {save: true}) %}

## Usage

```js
var every = require('{%= name %}');

every(['a', 'b', 'c'], function (ele) {
  return ele === 'a';
});
//=> false

every(['a', 'a', 'a'], function (ele) {
  return ele === 'a';
});
//=> true
```

## Related projects
{%= related(['array-every', 'array-slice', 'array-unique', 'filter-array', 'index-of'].concat(Object.keys(dependencies))) %}

## Running tests
{%= include("tests") %}

## Contributing
{%= include("contributing") %}

## Author
{%= include("author") %}

## License
{%= copyright() %}
{%= license() %}

***

{%= include("footer") %}

{%= reflinks(['mout']) %}


text:
<?xml version="1.0" encoding="UTF-8"?>
<phpunit backupGlobals="false"
         backupStaticAttributes="false"
         colors="true"
         processIsolation="false"
         stopOnFailure="false">
    <testsuites>
        <testsuite name="Application Test Suite">
            <directory suffix="Test.php">./tests</directory>
        </testsuite>
    </testsuites>
</phpunit>


text:
The coding tutorials are designed to help you test the features without need to write your own code. PDF.co Web API helps with PDF to XML API in C#. PDF.co Web API is the Web API with a set of tools for documents manipulation, data conversion, data extraction, splitting and merging of documents. Includes image recognition, built-in OCR, barcode generation and barcode decoders to decode bar codes from scans, pictures and pdf.

C# code samples for C# developers help to speed up the application's code writing when using PDF.co Web API. Sample code in C# is all you need. Copy-paste it to your the code editor, then add a reference to PDF.co Web API and you are ready to try it! Enjoy writing a code with ready-to-use sample C# codes to add PDF to XML API functions using PDF.co Web API in C#.

Trial version of ByteScout is available for free download from our website. This and other source code samples for C# and other programming languages are available.

## REQUEST FREE TECH SUPPORT

[Click here to get in touch](https://bytescout.zendesk.com/hc/en-us/requests/new?subject=PDF.co%20Web%20API%20Question)

or just send email to [support@bytescout.com](mailto:support@bytescout.com?subject=PDF.co%20Web%20API%20Question)

## ON-PREMISE OFFLINE SDK

[Get Your 60 Day Free Trial](https://bytescout.com/download/web-installer?utm_source=github-readme)
[Explore Documentation](https://bytescout.com/documentation/index.html?utm_source=github-readme)
[Explore Source Code Samples](https://github.com/bytescout/ByteScout-SDK-SourceCode/)
[Sign Up For Online Training](https://academy.bytescout.com/)

## ON-DEMAND REST WEB API

[Get your API key](https://app.pdf.co/signup?utm_source=github-readme)
[Security](https://pdf.co/security)
[Explore Web API Documentation](https://apidocs.pdf.co?utm_source=github-readme)
[Explore Web API Samples](https://github.com/bytescout/ByteScout-SDK-SourceCode/tree/master/PDF.co%20Web%20API)

## VIDEO REVIEW

[https://www.youtube.com/watch?v=NEwNs2b9YN8](https://www.youtube.com/watch?v=NEwNs2b9YN8)

<!-- code block begin -->

##### **ByteScoutWebApiExample.csproj:**

```
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
  <PropertyGroup>
    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
    <ProjectGuid>{1E1C2C34-017E-4605-AE2B-55EA3313BE51}</ProjectGuid>
    <OutputType>Exe</OutputType>
    <AppDesignerFolder>Properties</AppDesignerFolder>
    <RootNamespace>ByteScoutWebApiExample</RootNamespace>
    <AssemblyName>ByteScoutWebApiExample</AssemblyName>
    <TargetFrameworkVersion>v4.6</TargetFrameworkVersion>
    <FileAlignment>512</FileAlignment>
  </PropertyGroup>
  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
    <PlatformTarget>AnyCPU</PlatformTarget>
    <DebugSymbols>true</DebugSymbols>
    <DebugType>full</DebugType>
    <Optimize>false</Optimize>
    <OutputPath>bin\Debug\</OutputPath>
    <DefineConstants>DEBUG;TRACE</DefineConstants>
    <ErrorReport>prompt</ErrorReport>
    <WarningLevel>4</WarningLevel>
  </PropertyGroup>
  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
    <PlatformTarget>AnyCPU</PlatformTarget>
    <DebugType>pdbonly</DebugType>
    <Optimize>true</Optimize>
    <OutputPath>bin\Release\</OutputPath>
    <DefineConstants>TRACE</DefineConstants>
    <ErrorReport>prompt</ErrorReport>
    <WarningLevel>4</WarningLevel>
  </PropertyGroup>
  <ItemGroup>
    <Reference Include="Newtonsoft.Json, Version=10.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
      <HintPath>packages\Newtonsoft.Json.10.0.3\lib\net40\Newtonsoft.Json.dll</HintPath>
      <Private>True</Private>
    </Reference>
    <Reference Include="System" />
    <Reference Include="System.Core" />
    <Reference Include="System.Xml.Linq" />
    <Reference Include="System.Data" />
    <Reference Include="System.Xml" />
  </ItemGroup>
  <ItemGroup>
    <Compile Include="Program.cs" />
    <Compile Include="Properties\AssemblyInfo.cs" />
  </ItemGroup>
  <ItemGroup>
    <None Include="packages.config" />
  </ItemGroup>
  <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
  <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
       Other similar extension points exist, see Microsoft.Common.targets.
  <Target Name="BeforeBuild">
  </Target>
  <Target Name="AfterBuild">
  </Target>
  -->
</Project>
```

<!-- code block end -->

<!-- code block begin -->

##### **ByteScoutWebApiExample.sln:**

```

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 2013
VisualStudioVersion = 12.0.40629.0
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ByteScoutWebApiExample", "ByteScoutWebApiExample.csproj", "{1E1C2C34-017E-4605-AE2B-55EA3313BE51}"
EndProject
Global
	GlobalSection(SolutionConfigurationPlatforms) = preSolution
		Debug|Any CPU = Debug|Any CPU
		Release|Any CPU = Release|Any CPU
	EndGlobalSection
	GlobalSection(ProjectConfigurationPlatforms) = postSolution
		{1E1C2C34-017E-4605-AE2B-55EA3313BE51}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
		{1E1C2C34-017E-4605-AE2B-55EA3313BE51}.Debug|Any CPU.Build.0 = Debug|Any CPU
		{1E1C2C34-017E-4605-AE2B-55EA3313BE51}.Release|Any CPU.ActiveCfg = Release|Any CPU
		{1E1C2C34-017E-4605-AE2B-55EA3313BE51}.Release|Any CPU.Build.0 = Release|Any CPU
	EndGlobalSection
	GlobalSection(SolutionProperties) = preSolution
		HideSolutionNode = FALSE
	EndGlobalSection
EndGlobal

```

<!-- code block end -->

<!-- code block begin -->

##### **Program.cs:**

```
using System;
using System.Collections.Generic;
using System.IO;
using System.Net;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;

namespace ByteScoutWebApiExample
{
	class Program
	{
		// The authentication key (API Key).
		// Get your own by registering at https://app.pdf.co
		const String API_KEY = "***********************************";

		// Direct URL of source PDF file.
		const string SourceFileUrl = "https://bytescout-com.s3.amazonaws.com/files/demo-files/cloud-api/pdf-to-xml/sample.pdf";
		// Comma-separated list of page indices (or ranges) to process. Leave empty for all pages. Example: '0,2-5,7-'.
		const string Pages = "";
		// PDF document password. Leave empty for unprotected documents.
		const string Password = "";
		// Destination XML file name
		const string DestinationFile = @".\result.xml";

		static void Main(string[] args)
		{
			// Create standard .NET web client instance
			WebClient webClient = new WebClient();

			// Set API Key
			webClient.Headers.Add("x-api-key", API_KEY);

			// URL for `PDF To XML` API call
			string url = "https://api.pdf.co/v1/pdf/convert/to/xml";

			// Prepare requests params as JSON
			Dictionary<string, object> parameters = new Dictionary<string, object>();
			parameters.Add("name", Path.GetFileName(DestinationFile));
			parameters.Add("password", Password);
			parameters.Add("pages", Pages);
			parameters.Add("url", SourceFileUrl);

			// Convert dictionary of params to JSON
			string jsonPayload = JsonConvert.SerializeObject(parameters);

			try
			{
				// Execute POST request with JSON payload
				string response = webClient.UploadString(url, jsonPayload);

				// Parse JSON response
				JObject json = JObject.Parse(response);

				if (json["error"].ToObject<bool>() == false)
				{
					// Get URL of generated XML file
					string resultFileUrl = json["url"].ToString();

					// Download XML file
					webClient.DownloadFile(resultFileUrl, DestinationFile);

					Console.WriteLine("Generated XML file saved as \"{0}\" file.", DestinationFile);
				}
				else
				{
					Console.WriteLine(json["message"].ToString());
				}
			}
			catch (WebException e)
			{
				Console.WriteLine(e.ToString());
			}

			webClient.Dispose();

			Console.WriteLine();
			Console.WriteLine("Press any key...");
			Console.ReadKey();
		}
	}
}

```

<!-- code block end -->

<!-- code block begin -->

##### **packages.config:**

```
<?xml version="1.0" encoding="utf-8"?>
<packages>
  <package id="Newtonsoft.Json" version="10.0.3" targetFramework="net40" />
</packages>
```

<!-- code block end -->


text:
<!DOCTYPE html>

	<title>Form 6</title>
	<link rel="stylesheet" type="text/css" href="style/5.Forms6.css">

		<form>

				*First Name:
				<input id="first-name" type="text" name="firstName">

				*E-Mail Address:
				<input id="email" type="text" name="email">

				*Last Name:
				<input id="last-name" type="text" name="lastName">

				URL
				<input id="url" type="text" name="url">

				* Your Message:

				<textarea name="message" id="message" cols="30" rows="10"></textarea>

				<input type="submit" value="Clear">
				<input type="submit" value="Submit">

		</form>


text:
package org.ovirt.engine.api.restapi.types;

import static org.ovirt.engine.api.model.StatisticKind.GAUGE;
import static org.ovirt.engine.api.model.StatisticUnit.BYTES;
import static org.ovirt.engine.api.model.StatisticUnit.SECONDS;

import java.util.List;

import org.ovirt.engine.api.model.BlockStatistic;
import org.ovirt.engine.api.model.BlockStatistics;
import org.ovirt.engine.api.model.BrickProfileDetail;
import org.ovirt.engine.api.model.BrickProfileDetails;
import org.ovirt.engine.api.model.EntityProfileDetail;
import org.ovirt.engine.api.model.FopStatistic;
import org.ovirt.engine.api.model.FopStatistics;
import org.ovirt.engine.api.model.GlusterBrick;
import org.ovirt.engine.api.model.GlusterVolumeProfileDetails;
import org.ovirt.engine.api.model.NfsProfileDetail;
import org.ovirt.engine.api.model.NfsProfileDetails;
import org.ovirt.engine.api.model.ProfileDetail;
import org.ovirt.engine.api.model.ProfileDetails;
import org.ovirt.engine.api.model.Statistic;
import org.ovirt.engine.api.model.StatisticUnit;
import org.ovirt.engine.api.model.Statistics;
import org.ovirt.engine.api.model.ValueType;
import org.ovirt.engine.api.restapi.utils.StatisticResourceUtils;
import org.ovirt.engine.core.common.businessentities.gluster.BlockStats;
import org.ovirt.engine.core.common.businessentities.gluster.FopStats;
import org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeProfileInfo;
import org.ovirt.engine.core.common.businessentities.gluster.StatsInfo;

public class GlusterVolumeProfileInfoMapper {
    private static final Statistic BYTES_BLOCK_READ   = StatisticResourceUtils.create("block.bytes.read", "bytes read", GAUGE, BYTES, ValueType.INTEGER);
    private static final Statistic BYTES_BLOCK_WRITE   = StatisticResourceUtils.create("block.bytes.write", "bytes written", GAUGE, BYTES, ValueType.INTEGER);
    private static final Statistic BLOCK_SIZE   = StatisticResourceUtils.create("block.size", "block size", GAUGE, BYTES, ValueType.INTEGER);
    private static final Statistic TOTAL_READ   = StatisticResourceUtils.create("total.bytes.read", "total bytes read", GAUGE, BYTES, ValueType.INTEGER);
    private static final Statistic TOTAL_WRITE   = StatisticResourceUtils.create("total.bytes.write", "blockSize", GAUGE, BYTES, ValueType.INTEGER);
    private static final Statistic MIN_LATENCY   = StatisticResourceUtils.create("min.latency", "minimum latency", GAUGE, SECONDS, ValueType.INTEGER);
    private static final Statistic MAX_LATENCY   = StatisticResourceUtils.create("max.latency", "maximum latency", GAUGE, SECONDS, ValueType.INTEGER);
    private static final Statistic AVG_LATENCY   = StatisticResourceUtils.create("avg.latency", "average latency", GAUGE, SECONDS, ValueType.INTEGER);
    private static final Statistic HITS   = StatisticResourceUtils.create("hits", "number of hits", GAUGE, StatisticUnit.NONE, ValueType.INTEGER);

    @Mapping (from=GlusterVolumeProfileDetails.class, to=GlusterVolumeProfileInfo.class)
    public static GlusterVolumeProfileInfo map(GlusterVolumeProfileDetails model, GlusterVolumeProfileInfo toEntity) {
        //GlusterVolumeProfileInfo is  read only from server and no support for setting these.
        //Hence mapping from REST model to Business entity not required.
        GlusterVolumeProfileInfo entity = (toEntity == null) ? new GlusterVolumeProfileInfo() : toEntity;
        return entity;
    }

    @Mapping (from=GlusterVolumeProfileInfo.class, to=GlusterVolumeProfileDetails.class)
    public static GlusterVolumeProfileDetails map(GlusterVolumeProfileInfo fromEntity, GlusterVolumeProfileDetails toModel) {
        GlusterVolumeProfileDetails model = new GlusterVolumeProfileDetails();
        BrickProfileDetails brickprofileDetails = new BrickProfileDetails();
        if (fromEntity.getBrickProfileDetails() != null) {
            for (org.ovirt.engine.core.common.businessentities.gluster.BrickProfileDetails brickDetailEntity:
                fromEntity.getBrickProfileDetails()) {
                BrickProfileDetail brickprofileDetail = new BrickProfileDetail();
                brickprofileDetail.setBrick(new GlusterBrick());
                brickprofileDetail.getBrick().setBrickDir(brickDetailEntity.getName());
                mapProfileDetails(brickDetailEntity.getProfileStats(), brickprofileDetail);
                brickprofileDetails.getBrickProfileDetails().add(brickprofileDetail);
            }
        }
        model.setBrickProfileDetails(brickprofileDetails);

        NfsProfileDetails nfsprofileDetails = new NfsProfileDetails();
        if (fromEntity.getNfsProfileDetails() != null) {
            for (org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeProfileStats nfsDetailEntity:
                fromEntity.getNfsProfileDetails()) {
                NfsProfileDetail nfsprofileDetail = new NfsProfileDetail();
                nfsprofileDetail.setNfsServerIp(nfsDetailEntity.getName());
                mapProfileDetails(nfsDetailEntity.getProfileStats(), nfsprofileDetail);
                nfsprofileDetails.getNfsProfileDetails().add(nfsprofileDetail);
            }
        }
        model.setNfsProfileDetails(nfsprofileDetails);
        return model;
    }

    private static void mapProfileDetails(List<StatsInfo> statsInfoList,
            EntityProfileDetail entityprofileDetail) {
        for (StatsInfo statsInfo: statsInfoList) {
            ProfileDetail profileDetail = new ProfileDetail();
            profileDetail.setProfileType(statsInfo.getProfileStatsType().name());
            profileDetail.setDuration(statsInfo.getDuration());
            profileDetail.setStatistics(new Statistics());
            profileDetail.getStatistics().getStatistics().add(StatisticResourceUtils.setDatum(clone(TOTAL_READ), statsInfo.getTotalRead()));
            profileDetail.getStatistics().getStatistics().add(StatisticResourceUtils.setDatum(clone(TOTAL_WRITE), statsInfo.getTotalWrite()));
            mapBlockStats(profileDetail, statsInfo);
            mapFopStats(profileDetail, statsInfo);
            entityprofileDetail.setProfileDetails(new ProfileDetails());
            entityprofileDetail.getProfileDetails().getProfileDetails().add(profileDetail);

        }
    }

    private static void mapFopStats(ProfileDetail profileDetail, StatsInfo statsInfo) {
        for (FopStats fopStat: statsInfo.getFopStats()) {
            FopStatistic fStat = new FopStatistic();
            fStat.setName(fopStat.getName());
            fStat.setStatistics(new Statistics());
            fStat.getStatistics().getStatistics().add(StatisticResourceUtils.setDatum(clone(MIN_LATENCY), fopStat.getMinLatency()));
            fStat.getStatistics().getStatistics().add(StatisticResourceUtils.setDatum(clone(MAX_LATENCY), fopStat.getMaxLatency()));
            fStat.getStatistics().getStatistics().add(StatisticResourceUtils.setDatum(clone(AVG_LATENCY), fopStat.getAvgLatency()));
            fStat.getStatistics().getStatistics().add(StatisticResourceUtils.setDatum(clone(HITS), fopStat.getHits()));
            profileDetail.setFopStatistics(new FopStatistics());
            profileDetail.getFopStatistics().getFopStatistics().add(fStat);
        }
    }

    private static void mapBlockStats(ProfileDetail profileDetail, StatsInfo statsInfo) {
        for (BlockStats blockStat: statsInfo.getBlockStats()) {
            BlockStatistic bStat = new BlockStatistic();
            bStat.setStatistics(new Statistics());
            bStat.getStatistics().getStatistics().add(StatisticResourceUtils.setDatum(clone(BLOCK_SIZE), blockStat.getSize()));
            bStat.getStatistics().getStatistics().add(StatisticResourceUtils.setDatum(clone(BYTES_BLOCK_READ), blockStat.getBlockRead()));
            bStat.getStatistics().getStatistics().add(StatisticResourceUtils.setDatum(clone(BYTES_BLOCK_WRITE), blockStat.getBlockWrite()));
            profileDetail.setBlockStatistics(new BlockStatistics());
            profileDetail.getBlockStatistics().getBlockStatistics().add(bStat);
        }
    }

    public static Statistic clone(Statistic s) {
        return StatisticResourceUtils.create(s.getName(), s.getDescription(), s.getKind(), s.getUnit(), s.getType());
    }

}


text:
<!DOCTYPE html>

    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

    <title>mne.io.Info — MNE 0.11.0 documentation</title>

    <link rel="stylesheet" href="../_static/basic.css" type="text/css" />
    <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
    <link rel="stylesheet" href="../_static/gallery.css" type="text/css" />
    <link rel="stylesheet" href="../_static/bootswatch-3.3.4/flatly/bootstrap.min.css" type="text/css" />
    <link rel="stylesheet" href="../_static/bootstrap-sphinx.css" type="text/css" />
    <link rel="stylesheet" href="../_static/style.css" type="text/css" />

    <link rel="shortcut icon" href="../_static/favicon.ico"/>
    <link rel="top" title="MNE 0.11.0 documentation" href="../index.html" />
    <link rel="up" title="API Reference" href="../python_reference.html" />
    <link rel="next" title="mne.io.Projection" href="mne.io.Projection.html" />
    <link rel="prev" title="mne.Transform" href="mne.Transform.html" />

<link href='http://fonts.googleapis.com/css?family=Open+Sans:400italic,700italic,400,700' rel='stylesheet' type='text/css'>

  <link rel="canonical" href="https://mne.tools/stable/index.html" />

        <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".nav-collapse">

        </button>

        0.11.0

Tutorials

Gallery

Manual

API

FAQ

Cite

  Site

Getting Started

What’s new

Cite MNE

Related publications

Tutorials

Examples Gallery

Manual

API Reference

Frequently Asked Questions

Advanced installation and setup

MNE with CPP

  Page

mne.io.Info

<form class="navbar-form navbar-right" action="../search.html" method="get">

  <input type="text" name="q" class="form-control" placeholder="Search" />

  <input type="hidden" name="check_keywords" value="yes" />
  <input type="hidden" name="area" value="default" />
</form>

mne.io.Info

    « mne.Transform

    mne.io.Projec... »

<form action="../search.html" method="get">

  <input type="text" name="q" class="form-control" placeholder="Search" />

  <input type="hidden" name="check_keywords" value="yes" />
  <input type="hidden" name="area" value="default" />
</form>

mne.io.Info¶

class mne.io.Info¶

Information about the recording.

This data structure behaves like a dictionary. It contains all meta-data
that is available for a recording.

The attributes listed below are the possible dictionary entries:

<col class="field-name" />
<col class="field-body" />

Attributes:
bads : list of str

List of bad (noisy/broken) channels, by name. These channels will by
default be ignored by many processing steps.

ch_names : list of str

The names of the channels.

chs : list of dict

A list of channel information structures.
See: Frequently Asked Questions for details.

comps : list of dict

CTF software gradient compensation data.
See: Frequently Asked Questions for details.

custom_ref_applied : bool

Whether a custom (=other than average) reference has been applied to
the EEG data. This flag is checked by some algorithms that require an
average reference to be set.

events : list of dict

Event list, usually extracted from the stim channels.
See: Frequently Asked Questions for details.

hpi_results : list of dict

Head position indicator (HPI) digitization points and fit information
(e.g., the resulting transform). See: Frequently Asked Questions for details.

meas_date : list of int

The first element of this list is a POSIX timestamp (milliseconds since
1970-01-01 00:00:00) denoting the date and time at which the
measurement was taken. The second element is the number of
microseconds.

nchan : int

Number of channels.

projs : list of dict

List of SSP operators that operate on the data.
See: Frequently Asked Questions for details.

sfreq : float

Sampling frequency in Hertz.
See: Frequently Asked Questions for details.

acq_pars : str | None

MEG system acquition parameters.

acq_stim : str | None

MEG system stimulus parameters.

buffer_size_sec : float | None

Buffer size (in seconds) when reading the raw data in chunks.

ctf_head_t : dict | None

The transformation from 4D/CTF head coordinates to Neuromag head
coordinates. This is only present in 4D/CTF data.
See: Frequently Asked Questions for details.

description : str | None

String description of the recording.

dev_ctf_t : dict | None

The transformation from device coordinates to 4D/CTF head coordinates.
This is only present in 4D/CTF data.
See: Frequently Asked Questions for details.

dev_head_t : dict | None

The device to head transformation.
See: Frequently Asked Questions for details.

dig : list of dict | None

The Polhemus digitization data in head coordinates.
See: Frequently Asked Questions for details.

experimentor : str | None

Name of the person that ran the experiment.

file_id : dict | None

The fif ID datastructure of the measurement file.
See: Frequently Asked Questions for details.

filename : str | None

The name of the file that provided the raw data.

highpass : float | None

Highpass corner frequency in Hertz. Zero indicates a DC recording.

hpi_meas : list of dict | None

HPI measurements that were taken at the start of the recording
(e.g. coil frequencies).

hpi_subsystem : dict | None

Information about the HPI subsystem that was used (e.g., event
channel used for cHPI measurements).

line_freq : float | None

Frequency of the power line in Hertz.

lowpass : float | None

Lowpass corner frequency in Hertz.

meas_id : dict | None

The ID assigned to this measurement by the acquisition system or during
file conversion.
See: Frequently Asked Questions for details.

proj_id : int | None

ID number of the project the experiment belongs to.

proj_name : str | None

Name of the project the experiment belongs to.

subject_info : dict | None

Information about the subject.
See: subject_info for details

proc_history : list of dict | None | not present in dict

The SSS info, the CTC correction and the calibaraions from the SSS
processing logs inside of a raw file.
See: Frequently Asked Questions for details.

Methods

<colgroup>
<col width="10%" />
<col width="90%" />
</colgroup>

clear(() -> None.  Remove all items from D.)

copy()
Copy the instance

fromkeys(...)
v defaults to None.

get((k[,d]) -> D[k] if k in D, ...)

has_key((k) -> True if D has a key k, else False)

items(() -> list of D’s (key, value) pairs, ...)

iteritems(() -> an iterator over the (key, ...)

iterkeys(() -> an iterator over the keys of D)

itervalues(...)

keys(() -> list of D’s keys)

pop((k[,d]) -> v, ...)
If key is not found, d is returned if given, otherwise KeyError is raised

popitem(() -> (k, v), ...)
2-tuple; but raise KeyError if D is empty.

setdefault((k[,d]) -> D.get(k,d), ...)

update(([E, ...)
If E present and has a .keys() method, does:     for k in E: D[k] = E[k]

values(() -> list of D’s values)

viewitems(...)

viewkeys(...)

viewvalues(...)

__init__()¶

x.__init__(...) initializes x; see help(type(x)) for signature

clear() → None.  Remove all items from D.¶

copy()¶

Copy the instance

<col class="field-name" />
<col class="field-body" />

Returns:
info : instance of Info

The copied info.

fromkeys(S[, v]) → New dict with keys from S and values equal to v.¶

v defaults to None.

get(k[, d]) → D[k] if k in D, else d.  d defaults to None.¶

has_key(k) → True if D has a key k, else False¶

items() → list of D's (key, value) pairs, as 2-tuples¶

iteritems() → an iterator over the (key, value) items of D¶

iterkeys() → an iterator over the keys of D¶

itervalues() → an iterator over the values of D¶

keys() → list of D's keys¶

pop(k[, d]) → v, remove specified key and return the corresponding value.¶

If key is not found, d is returned if given, otherwise KeyError is raised

popitem() → (k, v), remove and return some (key, value) pair as a¶

2-tuple; but raise KeyError if D is empty.

setdefault(k[, d]) → D.get(k,d), also set D[k]=d if k not in D¶

update([E, ]**F) → None.  Update D from dict/iterable E and F.¶

If E present and has a .keys() method, does:     for k in E: D[k] = E[k]
If E present and lacks .keys() method, does:     for (k, v) in E: D[k] = v
In either case, this is followed by: for k in F: D[k] = F[k]

values() → list of D's values¶

viewitems() → a set-like object providing a view on D's items¶

viewkeys() → a set-like object providing a view on D's keys¶

viewvalues() → an object providing a view on D's values¶

      Back to top

        © Copyright 2012-2015, MNE Developers.


text: cmake -DBUILD_EXAMPLES_EDUCATION=OFF -DBUILD_CMD_LINE_TOOLS=OFF -DBUILD_PLAYGROUND=OFF ..


text:
<?xml version="1.0" encoding="utf-8"?>
<resources>
    <integer name="article_list_column">4</integer>
</resources>