text:
package org.springframework.security.oauth2.client.web;

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

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;

import org.springframework.security.oauth2.core.endpoint.OAuth2AuthorizationRequest;
import org.springframework.security.oauth2.core.endpoint.OAuth2ParameterNames;
import org.springframework.util.Assert;

/**
 * An implementation of an {@link AuthorizationRequestRepository} that stores
 * {@link OAuth2AuthorizationRequest} in the {@code HttpSession}.
 *
 * @author Joe Grandja
 * @author Rob Winch
 * @author Craig Andrews
 * @since 5.0
 * @see AuthorizationRequestRepository
 * @see OAuth2AuthorizationRequest
 */
public final class HttpSessionOAuth2AuthorizationRequestRepository
		implements AuthorizationRequestRepository<OAuth2AuthorizationRequest> {

	private static final String DEFAULT_AUTHORIZATION_REQUEST_ATTR_NAME = HttpSessionOAuth2AuthorizationRequestRepository.class
			.getName() + ".AUTHORIZATION_REQUEST";

	private final String sessionAttributeName = DEFAULT_AUTHORIZATION_REQUEST_ATTR_NAME;

	private boolean allowMultipleAuthorizationRequests;

	@Override
	public OAuth2AuthorizationRequest loadAuthorizationRequest(HttpServletRequest request) {
		Assert.notNull(request, "request cannot be null");
		String stateParameter = this.getStateParameter(request);
		if (stateParameter == null) {
			return null;
		}
		Map<String, OAuth2AuthorizationRequest> authorizationRequests = this.getAuthorizationRequests(request);
		return authorizationRequests.get(stateParameter);
	}

	@Override
	public void saveAuthorizationRequest(OAuth2AuthorizationRequest authorizationRequest, HttpServletRequest request,
			HttpServletResponse response) {
		Assert.notNull(request, "request cannot be null");
		Assert.notNull(response, "response cannot be null");
		if (authorizationRequest == null) {
			this.removeAuthorizationRequest(request, response);
			return;
		}
		String state = authorizationRequest.getState();
		Assert.hasText(state, "authorizationRequest.state cannot be empty");
		if (this.allowMultipleAuthorizationRequests) {
			Map<String, OAuth2AuthorizationRequest> authorizationRequests = this.getAuthorizationRequests(request);
			authorizationRequests.put(state, authorizationRequest);
			request.getSession().setAttribute(this.sessionAttributeName, authorizationRequests);
		}
		else {
			request.getSession().setAttribute(this.sessionAttributeName, authorizationRequest);
		}
	}

	@Override
	public OAuth2AuthorizationRequest removeAuthorizationRequest(HttpServletRequest request) {
		Assert.notNull(request, "request cannot be null");
		String stateParameter = this.getStateParameter(request);
		if (stateParameter == null) {
			return null;
		}
		Map<String, OAuth2AuthorizationRequest> authorizationRequests = this.getAuthorizationRequests(request);
		OAuth2AuthorizationRequest originalRequest = authorizationRequests.remove(stateParameter);
		if (authorizationRequests.size() == 0) {
			request.getSession().removeAttribute(this.sessionAttributeName);
		}
		else if (authorizationRequests.size() == 1) {
			request.getSession().setAttribute(this.sessionAttributeName,
					authorizationRequests.values().iterator().next());
		}
		else {
			request.getSession().setAttribute(this.sessionAttributeName, authorizationRequests);
		}
		return originalRequest;
	}

	@Override
	public OAuth2AuthorizationRequest removeAuthorizationRequest(HttpServletRequest request,
			HttpServletResponse response) {
		Assert.notNull(response, "response cannot be null");
		return this.removeAuthorizationRequest(request);
	}

	/**
	 * Gets the state parameter from the {@link HttpServletRequest}
	 * @param request the request to use
	 * @return the state parameter or null if not found
	 */
	private String getStateParameter(HttpServletRequest request) {
		return request.getParameter(OAuth2ParameterNames.STATE);
	}

	/**
	 * Gets a non-null and mutable map of {@link OAuth2AuthorizationRequest#getState()} to
	 * an {@link OAuth2AuthorizationRequest}
	 * @param request
	 * @return a non-null and mutable map of {@link OAuth2AuthorizationRequest#getState()}
	 * to an {@link OAuth2AuthorizationRequest}.
	 */
	private Map<String, OAuth2AuthorizationRequest> getAuthorizationRequests(HttpServletRequest request) {
		HttpSession session = request.getSession(false);
		Object sessionAttributeValue = (session != null) ? session.getAttribute(this.sessionAttributeName) : null;
		if (sessionAttributeValue == null) {
			return new HashMap<>();
		}
		else if (sessionAttributeValue instanceof OAuth2AuthorizationRequest) {
			OAuth2AuthorizationRequest auth2AuthorizationRequest = (OAuth2AuthorizationRequest) sessionAttributeValue;
			Map<String, OAuth2AuthorizationRequest> authorizationRequests = new HashMap<>(1);
			authorizationRequests.put(auth2AuthorizationRequest.getState(), auth2AuthorizationRequest);
			return authorizationRequests;
		}
		else if (sessionAttributeValue instanceof Map) {
			@SuppressWarnings("unchecked")
			Map<String, OAuth2AuthorizationRequest> authorizationRequests = (Map<String, OAuth2AuthorizationRequest>) sessionAttributeValue;
			return authorizationRequests;
		}
		else {
			throw new IllegalStateException(
					"authorizationRequests is supposed to be a Map or OAuth2AuthorizationRequest but actually is a "
							+ sessionAttributeValue.getClass());
		}
	}

	/**
	 * Configure if multiple {@link OAuth2AuthorizationRequest}s should be stored per
	 * session. Default is false (not allow multiple {@link OAuth2AuthorizationRequest}
	 * per session).
	 * @param allowMultipleAuthorizationRequests true allows more than one
	 * {@link OAuth2AuthorizationRequest} to be stored per session.
	 * @since 5.5
	 */
	@Deprecated
	public void setAllowMultipleAuthorizationRequests(boolean allowMultipleAuthorizationRequests) {
		this.allowMultipleAuthorizationRequests = allowMultipleAuthorizationRequests;
	}

}


text:
package net.codemirror.mode;

import com.google.gwt.core.client.GWT;
import com.google.gwt.resources.client.ClientBundle;
import com.google.gwt.resources.client.DataResource;
import com.google.gwt.resources.client.DataResource.DoNotEmbed;

public interface Modes extends ClientBundle {
  public static final Modes I = GWT.create(Modes.class);

  @Source("clike.js") @DoNotEmbed DataResource clike();
  @Source("clojure.js") @DoNotEmbed DataResource clojure();
  @Source("coffeescript.js") @DoNotEmbed DataResource coffeescript();
  @Source("commonlisp.js") @DoNotEmbed DataResource commonlisp();
  @Source("css.js") @DoNotEmbed DataResource css();
  @Source("d.js") @DoNotEmbed DataResource d();
  @Source("dart.js") @DoNotEmbed DataResource dart();
  @Source("diff.js") @DoNotEmbed DataResource diff();
  @Source("dockerfile.js") @DoNotEmbed DataResource dockerfile();
  @Source("dtd.js") @DoNotEmbed DataResource dtd();
  @Source("erlang.js") @DoNotEmbed DataResource erlang();
  @Source("gas.js") @DoNotEmbed DataResource gas();
  @Source("gerrit/commit.js") @DoNotEmbed DataResource gerrit_commit();
  @Source("gfm.js") @DoNotEmbed DataResource gfm();
  @Source("go.js") @DoNotEmbed DataResource go();
  @Source("groovy.js") @DoNotEmbed DataResource groovy();
  @Source("haskell.js") @DoNotEmbed DataResource haskell();
  @Source("htmlmixed.js") @DoNotEmbed DataResource htmlmixed();
  @Source("javascript.js") @DoNotEmbed DataResource javascript();
  @Source("lua.js") @DoNotEmbed DataResource lua();
  @Source("markdown.js") @DoNotEmbed DataResource markdown();
  @Source("perl.js") @DoNotEmbed DataResource perl();
  @Source("php.js") @DoNotEmbed DataResource php();
  @Source("pig.js") @DoNotEmbed DataResource pig();
  @Source("properties.js") @DoNotEmbed DataResource properties();
  @Source("puppet.js") @DoNotEmbed DataResource puppet();
  @Source("python.js") @DoNotEmbed DataResource python();
  @Source("r.js") @DoNotEmbed DataResource r();
  @Source("rst.js") @DoNotEmbed DataResource rst();
  @Source("ruby.js") @DoNotEmbed DataResource ruby();
  @Source("scheme.js") @DoNotEmbed DataResource scheme();
  @Source("shell.js") @DoNotEmbed DataResource shell();
  @Source("smalltalk.js") @DoNotEmbed DataResource smalltalk();
  @Source("soy.js") @DoNotEmbed DataResource soy();
  @Source("sql.js") @DoNotEmbed DataResource sql();
  @Source("stex.js") @DoNotEmbed DataResource stex();
  @Source("tcl.js") @DoNotEmbed DataResource tcl();
  @Source("velocity.js") @DoNotEmbed DataResource velocity();
  @Source("verilog.js") @DoNotEmbed DataResource verilog();
  @Source("xml.js") @DoNotEmbed DataResource xml();
  @Source("yaml.js") @DoNotEmbed DataResource yaml();

  // When adding a resource, update static initializer in ModeInfo.
}

redpajama_set_name: RedPajamaGithub


text:
class AddTimestamps < ActiveRecord::Migration
  def self.up
    add_column :context_metadatas, :created_at, :datetime
    add_column :context_metadatas, :updated_at, :datetime
    add_column :users, :created_at, :datetime
    add_column :users, :updated_at, :datetime
  end

  def self.down
    remove_column :context_metadatas, :created_at
    remove_column :context_metadatas, :updated_at
    remove_column :users, :created_at
    remove_column :users, :updated_at
  end
end


text:
'use strict';

Object.defineProperty(exports, "__esModule", {
  value: true
});

var _de_DE = require('../../date-picker/locale/de_DE');

var _de_DE2 = _interopRequireDefault(_de_DE);

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }

exports["default"] = _de_DE2["default"];
module.exports = exports['default'];


text:
/*****************************************************************************/
/* Project  : SerialPortTerminal                                  */
/* File     : DemoWondow.cs                                                  */
/* Version  : 1                                                              */
/* Language : C#                                                             */
/* Summary  : Start window of the project, use to test the instruments       */
/* Creation : 30/06/2008                                                     */
/* Autor    : Guillaume CHOUTEAU                                             */
/* History  :                                                                */
/*****************************************************************************/

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace SerialPortTerminal
{
    public partial class DemoWinow : Form
    {
        frmTerminal parentSerialTerminal;
        public DemoWinow(frmTerminal parentTerminal)
        {
            parentSerialTerminal = parentTerminal;
            InitializeComponent();
        }

        public void updatePitchRoll(double P, double R)
        {
            horizonInstrumentControl1.SetAttitudeIndicatorParameters(P, R);
        }

        public void udpateHeading(int H)
        {
            headingIndicatorInstrumentControl1.SetHeadingIndicatorParameters(H);
        }

        public void horizon_refresh() {
            horizonInstrumentControl1.Refresh();

        }

        public void heading_refresh(){
             headingIndicatorInstrumentControl1.Refresh();

        }
    }
}


text:
#pragma once

#include <cstdio>

#include <memory>
#include <mutex>
#include <string>

#include <ucpp/cpp.h>

struct lexer_state;

namespace JoeLang
{
namespace Compiler
{

enum class TerminalType;

void InitializeUCPP();

/**
  * \class UCPPContext
  * \brief A class to manage the lifetime of the ucpp allocated memory
  */
class UCPPContext
{
public:
    ~UCPPContext();

private:
    friend
    void InitializeUCPP();

    /**
      * The constructor is private and can only be called from InitializeUCPP()
      */
    UCPPContext();
};

/**
  * \class UCPPLexerState
  * \brief A class to manage the lifetime of a ucpp lexer state and buffers
  */
class UCPPLexerState
{
public:
    UCPPLexerState( const std::string& source, const std::string& filename );
    ~UCPPLexerState();

    TerminalType Lex( std::string& string );

    unsigned GetLineNumber();
private:
    static
    const long s_LexerFlags;

    lexer_state m_LexerState;
};

/**
  * This holds onto the ucpp buffers and releases them at program termination
  */
extern std::unique_ptr<UCPPContext> g_UCPPContext;

/**
  * This mutex is used to control access to ucpp
  */
extern std::mutex g_UCPPMutex;

} // namespace Compiler
} // namespace JoeLang


text:
//  SBXSinglePointCrossover.java
//
//  Author:
//       Antonio J. Nebro <antonio@lcc.uma.es>
//
//  Copyright (c) 2011 Antonio J. Nebro
//
//  This program is free software: you can redistribute it and/or modify
//  it under the terms of the GNU Lesser General Public License as published by
//  the Free Software Foundation, either version 3 of the License, or
//  (at your option) any later version.
//
//  This program is distributed in the hope that it will be useful,
//  but WITHOUT ANY WARRANTY; without even the implied warranty of
//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
//  GNU Lesser General Public License for more details.
//
//  You should have received a copy of the GNU Lesser General Public License
//  along with this program.  If not, see <http://www.gnu.org/licenses/>.

package evochecker.genetic.jmetal.operators;

import java.util.Arrays;
import java.util.HashMap;
import java.util.List;

import evochecker.genetic.jmetal.encoding.ArrayRealIntSolutionType;
import evochecker.genetic.jmetal.encoding.XInt;
import evochecker.genetic.jmetal.encoding.XReal;
import jmetal.core.Solution;
import jmetal.operators.crossover.Crossover;
import jmetal.util.Configuration;
import jmetal.util.JMException;
import jmetal.util.PseudoRandom;

public class SBXSinglePointCrossover extends Crossover {
	/**
	 * EPS defines the minimum difference allowed between real values
	 */
	private static final double EPS = 1.0e-14;

	private static final double ETA_C_DEFAULT_ = 20.0;
	private Double realCrossoverProbability_ = null;
	private Double intCrossoverProbability_ = null;
	private double distributionIndex_ = ETA_C_DEFAULT_;

	/**
	 * Valid solution types to apply this operator
	 */
	private static final List VALID_TYPES = Arrays
			.asList(ArrayRealIntSolutionType.class);

	/**
	 * Constructor
	 */
	public SBXSinglePointCrossover(HashMap<String, Object> parameters) {
		super(parameters);

		if (parameters.get("realCrossoverProbability") != null)
			realCrossoverProbability_ = (Double) parameters
					.get("realCrossoverProbability");
		if (parameters.get("intCrossoverProbability") != null)
			intCrossoverProbability_ = (Double) parameters
					.get("intCrossoverProbability");
		if (parameters.get("distributionIndex") != null)
			distributionIndex_ = (Double) parameters.get("distributionIndex");
	} // Constructor

	/**
	 * Perform the crossover operation.
	 *
	 * @param realProbability
	 *            Crossover probability
	 * @param parent1
	 *            The first parent
	 * @param parent2
	 *            The second parent
	 * @return An array containing the two offsprings
	 */
	public Solution[] doCrossover(Double realProbability,
			Double intProbability, Solution parent1, Solution parent2)
			throws JMException {

		Solution[] offSpring = new Solution[2];

		offSpring[0] = new Solution(parent1);
		offSpring[1] = new Solution(parent2);

		// SBX crossover
		double rand;
		double y1, y2, yL, yu;
		double c1, c2;
		double alpha, beta, betaq;
		double valueX1R, valueX2R;
		int valueX1I, valueX2I;

		// Real part
		XReal x1R = new XReal(parent1);
		XReal x2R = new XReal(parent2);
		XReal offs1R = new XReal(offSpring[0]);
		XReal offs2R = new XReal(offSpring[1]);

		// Int part
		XInt x1I = new XInt(parent1);
		XInt x2I = new XInt(parent2);
		XInt offs1I = new XInt(offSpring[0]);
		XInt offs2I = new XInt(offSpring[1]);

		// SBX for real part
		if (PseudoRandom.randDouble() <= realProbability) {
			for (int i = 0; i < x1R.getNumberOfDecisionVariables(); i++) {
				valueX1R = x1R.getValue(i);
				valueX2R = x2R.getValue(i);
				if (PseudoRandom.randDouble() <= 0.5) {
					if (java.lang.Math.abs(valueX1R - valueX2R) > EPS) {

						if (valueX1R < valueX2R) {
							y1 = valueX1R;
							y2 = valueX2R;
						} else {
							y1 = valueX2R;
							y2 = valueX1R;
						} // if

						yL = x1R.getLowerBound(i);
						yu = x1R.getUpperBound(i);
						rand = PseudoRandom.randDouble();
						beta = 1.0 + (2.0 * (y1 - yL) / (y2 - y1));
						alpha = 2.0 - java.lang.Math.pow(beta,
								-(distributionIndex_ + 1.0));

						if (rand <= (1.0 / alpha)) {
							betaq = java.lang.Math.pow((rand * alpha),
									(1.0 / (distributionIndex_ + 1.0)));
						} else {
							betaq = java.lang.Math.pow((1.0 / (2.0 - rand
									* alpha)),
									(1.0 / (distributionIndex_ + 1.0)));
						} // if

						c1 = 0.5 * ((y1 + y2) - betaq * (y2 - y1));
						beta = 1.0 + (2.0 * (yu - y2) / (y2 - y1));
						alpha = 2.0 - java.lang.Math.pow(beta,
								-(distributionIndex_ + 1.0));

						if (rand <= (1.0 / alpha)) {
							betaq = java.lang.Math.pow((rand * alpha),
									(1.0 / (distributionIndex_ + 1.0)));
						} else {
							betaq = java.lang.Math.pow((1.0 / (2.0 - rand
									* alpha)),
									(1.0 / (distributionIndex_ + 1.0)));
						} // if

						c2 = 0.5 * ((y1 + y2) + betaq * (y2 - y1));

						if (c1 < yL)
							c1 = yL;

						if (c2 < yL)
							c2 = yL;

						if (c1 > yu)
							c1 = yu;

						if (c2 > yu)
							c2 = yu;

						if (PseudoRandom.randDouble() <= 0.5) {
							offs1R.setValue(i, c2);
							offs2R.setValue(i, c1);
						} else {
							offs1R.setValue(i, c1);
							offs2R.setValue(i, c2);
						} // if
					} // if
					else {
						offs1R.setValue(i, valueX1R);
						offs2R.setValue(i, valueX2R);
					} // if
				} // if
				else {
					offs1R.setValue(i, valueX2R);
					offs2R.setValue(i, valueX1R);
				} // else
			} // for
		} // if

		// Single point crossover for integer part
		if (PseudoRandom.randDouble() <= intProbability) {
			int crossoverPoint = PseudoRandom.randInt(0,
					x1I.getNumberOfDecisionVariables() - 1);
			for (int i = crossoverPoint; i < x1I.getNumberOfDecisionVariables(); i++) {
				valueX1I = (int) x1I.getValue(i);
				valueX2I = (int) x2I.getValue(i);
				offs1I.setValue(i, valueX2I);
				offs2I.setValue(i, valueX1I);
			} // for
		} // if

		return offSpring;
	} // doCrossover

	@Override
	public Object execute(Object object) throws JMException {
		Solution[] parents = (Solution[]) object;

		if (parents.length != 2) {
			Configuration.logger_
					.severe("SBXSinglePointCrossover.execute: operator "
							+ "needs two parents");
			Class cls = java.lang.String.class;
			String name = cls.getName();
			throw new JMException("Exception in " + name + ".execute()");
		} // if

		if (!(VALID_TYPES.contains(parents[0].getType().getClass()) && VALID_TYPES
				.contains(parents[1].getType().getClass()))) {
			Configuration.logger_
					.severe("SBXSinglePointCrossover.execute: the solutions "
							+ "type " + parents[0].getType()
							+ " is not allowed with this operator");

			Class cls = java.lang.String.class;
			String name = cls.getName();
			throw new JMException("Exception in " + name + ".execute()");
		} // if
		Solution[] offSpring;
		offSpring = doCrossover(realCrossoverProbability_,
				intCrossoverProbability_, parents[0], parents[1]);

		return offSpring;
	} // execute

} // SBXSinglePointCrossover


text:
ACCEPTED

#### According to
Index Fungorum

#### Published in
null

#### Original name
Stictina quercizans var. quercizans

### Remarks
null


text:
<!DOCTYPE module PUBLIC
        "-//Puppy Crawl//DTD Check Configuration 1.2//EN"
        "http://www.puppycrawl.com/dtds/configuration_1_2.dtd">
<module name="Checker">
    <module name="RegexpHeader">
        <property name="headerFile" value="${config_loc}/required-header.txt"/>
    </module>
    <module name="TreeWalker">
        <module name="JavadocType">
            <property name="authorFormat" value="\S"/>
        </module>
    </module>
</module>


text:
inspired by https://github.com/highgroove/hbase-rb

## Installation

### Bundler

Add to `Gemfile` and run `bundle install`:

```ruby
gem 'hbase2-rb'
```

### Without Bundler

Install the gem:

```bash
gem install hbase2-rb
```

Require it explicitly in your scripts:

```ruby
require "rubygems"
require "hbase2-rb"
```

## Versioning

The base version of the gem matches the version of HBase the interface was
generated against.

For instance, when using HBase 1.2.0:

```ruby
gem 'hbase-rb', '~> 1.2.0'
```

## Usage

For example:

```ruby
socket    = Thrift::Socket.new('localhost', 9090)

transport = Thrift::BufferedTransport.new(socket)
transport.open

protocol  = Thrift::BinaryProtocol.new(transport)
client    = HBase2::Client.new(protocol)
```

## Writing Rows

```ruby
# Assuming a table "mytable" and a column family "c"
column_value = HBase2::TColumnValue.new
column_value.family = 'c'
column_value.qualifier = 'foo'
column_value.value = 'bar'
put = HBase2::TPut.new row: 'abc123', columnValues: [column_value]
client.put('mytable', put)
```

## Reading Rows

```ruby
# Assuming a table "mytable" and a column family "c"
get = HBase2::TGet.new row: 'abc123'
result = client.get('mytable', get)
if result.row
  result.columnValues.each do |column|
    puts "#{column.family}:#{column.qualifier} #{column.value}"
  end
end
```

## API Reference

* [Hbase/ThriftIDL](https://github.com/apache/hbase/blob/rel/1.2.0/hbase-thrift/src/main/resources/org/apache/hadoop/hbase/thrift2/hbase.thrift)
* [Hbase/TestThriftService2Handler](https://github.com/apache/hbase/blob/rel/1.2.0/hbase-thrift/src/test/java/org/apache/hadoop/hbase/thrift2/TestThriftHBaseServiceHandler.java)
* [Hbase/ThriftService2Handler](https://hbase.apache.org/devapidocs/org/apache/hadoop/hbase/thrift2/ThriftHBaseServiceHandler.html)


text:
Load Data into Google Genomics
===============================

Here you will find task-oriented documentation regarding how to load data into Google Genomics.

.. toctree::
   :maxdepth: 2

   load_variants
   ../../job_troubleshooting


text:
import subprocess
import sys
from cgi import parse_qs, escape
import base64
import luxuryradar

def application(environ, start_response):

    if environ['REQUEST_METHOD'] == 'POST':

        if environ['PATH_INFO'] == "/update":
            data = subprocess.check_output(["git","pull"],cwd="/home/huangwc94/luxuryradar")
            start_response("200 OK", [
                ("Content-Type", "text/plain"),
                ("Content-Length", str(len(data)))
            ])

            reload(luxuryradar)
        else:
            request_body_size = int(environ.get('CONTENT_LENGTH', 0))
            raw = environ['wsgi.input'].read(request_body_size)
            d = parse_qs(raw)

            baseData = d['encode_string']
            print baseData
            raw = base64.standard_b64decode(baseData[0])
            data = luxuryradar.identify(raw)

            start_response("200 OK", [
                ("Content-Type", "application/json"),
                ("Content-Length", str(len(data)))
            ])
    elif environ['PATH_INFO'] == "/favicon.ico":
        with open('/home/huangwc94/luxuryradar/favicon.ico', mode='rb') as file:
            data = file.read()
        start_response("200 OK", [
            ("Content-Type", "image/x-icon"),
            ("Content-Length", str(len(data)))
        ])
    else:
        data = open('/home/huangwc94/luxuryradar/index.html').read()
        start_response("200 OK", [
            ("Content-Type", "text/html"),
            ("Content-Length", str(len(data)))
        ])
    return iter([data])


text:
//$Id$
package org.hibernate.test.annotations;
import javax.persistence.Entity;

/**
 * @author Emmanuel Bernard
 */
@Entity()
public class A320b extends A320 {

}


text:
package runtime

import (
	"fmt"
	"io/ioutil"
	"regexp"
	"strings"

	"code.cloudfoundry.org/localip"
)

// Parse resolve.conf file from the provided path.
// implementation is based on guardian's implementation
// here: https://github.com/cloudfoundry/guardian/blob/master/kawasaki/dns/resolv_compiler.go
func ParseHostResolveConf(path string) ([]string, error) {

	resolvConf, err := ioutil.ReadFile(path)
	if err != nil {
		return nil, fmt.Errorf("unable to read host's resolv.conf: %w", err)
	}

	resolvContents := string(resolvConf)

	loopbackNameserver := regexp.MustCompile(`^\s*nameserver\s+127\.0\.0\.\d+\s*$`)
	if loopbackNameserver.MatchString(resolvContents) {
		ip, err := localip.LocalIP()
		if err != nil {
			return nil, err
		}
		return []string{"nameserver " + ip}, nil
	}

	var entries []string

	for _, resolvEntry := range strings.Split(strings.TrimSpace(resolvContents), "\n") {
		if resolvEntry == "" {
			continue
		}

		if !strings.HasPrefix(resolvEntry, "nameserver") {
			entries = append(entries, strings.TrimSpace(resolvEntry))
			continue
		}

		pattern := regexp.MustCompile(`127\.\d{1,3}\.\d{1,3}\.\d{1,3}`)
		if !pattern.MatchString(strings.TrimSpace(resolvEntry)) {
			nameserverFields := strings.Fields(resolvEntry)
			if len(nameserverFields) != 2 {
				continue
			}
			entries = append(entries, strings.Join(nameserverFields, " "))
		}
	}

	return entries, nil
}


text:
import os
import unittest
from unittest.mock import PropertyMock, patch

from airflow.providers.apache.hive.operators.hive_to_mysql import HiveToMySqlTransfer
from airflow.utils import timezone
from airflow.utils.operator_helpers import context_to_airflow_vars
from tests.providers.apache.hive import TestHiveEnvironment

DEFAULT_DATE = timezone.datetime(2015, 1, 1)

class TestHiveToMySqlTransfer(TestHiveEnvironment):

    def setUp(self):
        self.kwargs = dict(
            sql='sql',
            mysql_table='table',
            hiveserver2_conn_id='hiveserver2_default',
            mysql_conn_id='mysql_default',
            task_id='test_hive_to_mysql',
        )
        super().setUp()

    @patch('airflow.providers.apache.hive.operators.hive_to_mysql.MySqlHook')
    @patch('airflow.providers.apache.hive.operators.hive_to_mysql.HiveServer2Hook')
    def test_execute(self, mock_hive_hook, mock_mysql_hook):
        HiveToMySqlTransfer(**self.kwargs).execute(context={})

        mock_hive_hook.assert_called_once_with(hiveserver2_conn_id=self.kwargs['hiveserver2_conn_id'])
        mock_hive_hook.return_value.get_records.assert_called_once_with('sql', hive_conf={})
        mock_mysql_hook.assert_called_once_with(mysql_conn_id=self.kwargs['mysql_conn_id'])
        mock_mysql_hook.return_value.insert_rows.assert_called_once_with(
            table=self.kwargs['mysql_table'],
            rows=mock_hive_hook.return_value.get_records.return_value
        )

    @patch('airflow.providers.apache.hive.operators.hive_to_mysql.MySqlHook')
    @patch('airflow.providers.apache.hive.operators.hive_to_mysql.HiveServer2Hook')
    def test_execute_mysql_preoperator(self, mock_hive_hook, mock_mysql_hook):
        self.kwargs.update(dict(mysql_preoperator='preoperator'))

        HiveToMySqlTransfer(**self.kwargs).execute(context={})

        mock_mysql_hook.return_value.run.assert_called_once_with(self.kwargs['mysql_preoperator'])

    @patch('airflow.providers.apache.hive.operators.hive_to_mysql.MySqlHook')
    @patch('airflow.providers.apache.hive.operators.hive_to_mysql.HiveServer2Hook')
    def test_execute_with_mysql_postoperator(self, mock_hive_hook, mock_mysql_hook):
        self.kwargs.update(dict(mysql_postoperator='postoperator'))

        HiveToMySqlTransfer(**self.kwargs).execute(context={})

        mock_mysql_hook.return_value.run.assert_called_once_with(self.kwargs['mysql_postoperator'])

    @patch('airflow.providers.apache.hive.operators.hive_to_mysql.MySqlHook')
    @patch('airflow.providers.apache.hive.operators.hive_to_mysql.NamedTemporaryFile')
    @patch('airflow.providers.apache.hive.operators.hive_to_mysql.HiveServer2Hook')
    def test_execute_bulk_load(self, mock_hive_hook, mock_tmp_file, mock_mysql_hook):
        type(mock_tmp_file).name = PropertyMock(return_value='tmp_file')
        context = {}
        self.kwargs.update(dict(bulk_load=True))

        HiveToMySqlTransfer(**self.kwargs).execute(context=context)

        mock_tmp_file.assert_called_once_with()
        mock_hive_hook.return_value.to_csv.assert_called_once_with(
            self.kwargs['sql'],
            mock_tmp_file.return_value.name,
            delimiter='\t',
            lineterminator='\n',
            output_header=False,
            hive_conf=context_to_airflow_vars(context)
        )
        mock_mysql_hook.return_value.bulk_load.assert_called_once_with(
            table=self.kwargs['mysql_table'],
            tmp_file=mock_tmp_file.return_value.name
        )
        mock_tmp_file.return_value.close.assert_called_once_with()

    @patch('airflow.providers.apache.hive.operators.hive_to_mysql.MySqlHook')
    @patch('airflow.providers.apache.hive.operators.hive_to_mysql.HiveServer2Hook')
    def test_execute_with_hive_conf(self, mock_hive_hook, mock_mysql_hook):
        context = {}
        self.kwargs.update(dict(hive_conf={'mapreduce.job.queuename': 'fake_queue'}))

        HiveToMySqlTransfer(**self.kwargs).execute(context=context)

        hive_conf = context_to_airflow_vars(context)
        hive_conf.update(self.kwargs['hive_conf'])
        mock_hive_hook.return_value.get_records.assert_called_once_with(
            self.kwargs['sql'],
            hive_conf=hive_conf
        )

    @unittest.skipIf(
        'AIRFLOW_RUNALL_TESTS' not in os.environ,
        "Skipped because AIRFLOW_RUNALL_TESTS is not set")
    def test_hive_to_mysql(self):
        op = HiveToMySqlTransfer(
            mysql_conn_id='airflow_db',
            task_id='hive_to_mysql_check',
            create=True,
            sql="""
                SELECT name
                FROM airflow.static_babynames
                LIMIT 100
                """,
            mysql_table='test_static_babynames',
            mysql_preoperator=[
                'DROP TABLE IF EXISTS test_static_babynames;',
                'CREATE TABLE test_static_babynames (name VARCHAR(500))',
            ],
            dag=self.dag)
        op.clear(start_date=DEFAULT_DATE, end_date=DEFAULT_DATE)
        op.run(start_date=DEFAULT_DATE, end_date=DEFAULT_DATE,
               ignore_ti_state=True)


text:
<?php
/**
 * The template for displaying posts in the Image post format
 *
 * @package WordPress
 * @subpackage Twenty_Thirteen
 * @since Twenty Thirteen 1.0
 */
?>

<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>

		<?php if ( is_single() ) : ?>

<?php the_title(); ?>

		<?php else : ?>

			<a href="<?php the_permalink(); ?>" rel="bookmark"><?php the_title(); ?>

		<?php endif; // is_single() ?>

		<?php
			/* translators: %s: Name of current post */
			the_content( sprintf(
				__( 'Continue reading %s →', 'opengovfoundation' ),
				the_title( '', '', false )
			) );

			wp_link_pages( array( 'before' => '
' . __( 'Pages:', 'opengovfoundation' ) . '', 'after' => '
', 'link_before' => '', 'link_after' => '' ) );
		?>

		<?php opengovfoundation_entry_meta(); ?>

		<?php if ( comments_open() && ! is_single() ) : ?>

			<?php comments_popup_link( '' . __( 'Leave a comment', 'opengovfoundation' ) . '', __( 'One comment so far', 'opengovfoundation' ), __( 'View all % comments', 'opengovfoundation' ) ); ?>

		<?php endif; // comments_open() ?>
		<?php edit_post_link( __( 'Edit', 'opengovfoundation' ), '', '' ); ?>

		<?php if ( is_single() && get_the_author_meta( 'description' ) && is_multi_author() ) : ?>
			<?php get_template_part( 'author-bio' ); ?>
		<?php endif; ?>


text:
/* You can add global styles to this file, and also import other style files */
@import '~@angular/material/prebuilt-themes/deeppurple-amber.css';

body {
    margin: 0;
}

body, html {
    padding: 0 !important;
    margin: 0 !important;

    background-color: #CFD8DC;
}

.mat-tab-list {
    background-color: white;
}

.mat-input-wrapper {
    margin: 20px;
}


text:
using System;
using System.Collections.Generic;
using System.Text;

namespace MO.Core.Window.Api {

   public class EWindowMessage {

      public const int WM_DRIVEADD = 0x0401;
      public const int WM_DRIVEREMOVE = WM_DRIVEADD + 1;

      public const int WH_KEYBOARD = 2;
      public const int WH_KEYBOARD_LL = 13;

      public const int WM_KEYDOWN = 0x100;
      public const int WM_KEYUP = 0x101;
      public const int WM_SYSKEYDOWN = 0x104;
      public const int WM_SYSKEYUP = 0x105;
      public const int WM_SHNOTIFY = 0x401;

   }
}


text:
A React component to show and run through a workout with timed exercises.

This was made as a learning exercies in React.

I have tried to keep the commit history fairly clean to show my process
without many distractions from superfluous details.

## Usage

Open `index.html` in a browser.


text:
/**
 * This package exists because proper error reporting relies on that module classes are defined outside of
 * package {@link com.svbio.cloudkeeper.plugins.dsl}. More precisely, the result returned by
 * {@link com.svbio.cloudkeeper.dsl.Locatables#getCallingStackTraceElement()} depends on the packages of the
 * classes in the stack trace.
 */
package com.svbio.cloudkeeper.dsl.modules;


text:
class TalksController < ApplicationController
  before_filter :verify_password, :only => :create
  before_filter :set_title, :only => [:index, :create]

  def index
    talks
    @talk  = Talk.new
  end

  def create
    @talk = Talk.new(params[:talk])

    if @talk.save
      redirect_to talks_url, notice: 'Talk was successfully created.'
    else
      talks
      render action: "index"
    end
  end

  def checklist
  end

  private

  def set_title
    @title ||= "Talks"
  end

  def talks
    @talks ||= Talk.available
  end

  def verify_password
    unless params[:password] == "" then
      sleep rand(10) unless Rails.env.test?
      redirect_to root_path
    end
  end
end


text:
//=============================================================================================================

//*************************************************************************************************************
//=============================================================================================================
// INCLUDES
//=============================================================================================================

#include "mne.h"

#include "FormFiles/mnesetupwidget.h"

//*************************************************************************************************************
//=============================================================================================================
// QT INCLUDES
//=============================================================================================================

#include <QtCore/QtPlugin>
#include <QtConcurrent>
#include <QDebug>

//*************************************************************************************************************
//=============================================================================================================
// USED NAMESPACES
//=============================================================================================================

using namespace MNEPLUGIN;
using namespace FIFFLIB;
using namespace SCMEASLIB;

//*************************************************************************************************************
//=============================================================================================================
// DEFINE MEMBER METHODS
//=============================================================================================================

MNE::MNE()
: m_bIsRunning(false)
, m_bReceiveData(false)
, m_bProcessData(false)
, m_bFinishedClustering(false)
, m_qFileFwdSolution("./MNE-sample-data/MEG/sample/sample_audvis-meg-eeg-oct-6-fwd.fif")
, m_sAtlasDir("./MNE-sample-data/subjects/sample/label")
, m_sSurfaceDir("./MNE-sample-data/subjects/sample/surf")
, m_iNumAverages(1)
, m_iDownSample(6)
, m_sAvrType("1")
{

}

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

MNE::~MNE()
{
    if(this->isRunning())
        stop();
}

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

QSharedPointer<IPlugin> MNE::clone() const
{
    QSharedPointer<MNE> pMNEClone(new MNE());
    return pMNEClone;
}

//*************************************************************************************************************
//=============================================================================================================
// Creating required display instances and set configurations
//=============================================================================================================

void MNE::init()
{
    // Inits
    m_pFwd = MNEForwardSolution::SPtr(new MNEForwardSolution(m_qFileFwdSolution));
    m_pAnnotationSet = AnnotationSet::SPtr(new AnnotationSet(m_sAtlasDir+"/lh.aparc.a2009s.annot", m_sAtlasDir+"/rh.aparc.a2009s.annot"));
    m_pSurfaceSet = SurfaceSet::SPtr(new SurfaceSet(m_sSurfaceDir+"/lh.inflated", m_sSurfaceDir+"/rh.inflated"));

    // Input
    m_pRTMSAInput = PluginInputData<NewRealTimeMultiSampleArray>::create(this, "MNE RTMSA In", "MNE real-time multi sample array input data");
    connect(m_pRTMSAInput.data(), &PluginInputConnector::notify, this, &MNE::updateRTMSA, Qt::DirectConnection);
    m_inputConnectors.append(m_pRTMSAInput);

    m_pRTESInput = PluginInputData<RealTimeEvokedSet>::create(this, "MNE RTE In", "MNE real-time evoked input data");
    connect(m_pRTESInput.data(), &PluginInputConnector::notify, this, &MNE::updateRTE, Qt::DirectConnection);
    m_inputConnectors.append(m_pRTESInput);

    m_pRTCInput = PluginInputData<RealTimeCov>::create(this, "MNE RTC In", "MNE real-time covariance input data");
    connect(m_pRTCInput.data(), &PluginInputConnector::notify, this, &MNE::updateRTC, Qt::DirectConnection);
    m_inputConnectors.append(m_pRTCInput);

    // Output
    m_pRTSEOutput = PluginOutputData<RealTimeSourceEstimate>::create(this, "MNE Out", "MNE output data");
    m_outputConnectors.append(m_pRTSEOutput);
    m_pRTSEOutput->data()->setName(this->getName());//Provide name to auto store widget settings

    // start clustering
    QFuture<void> future = QtConcurrent::run(this, &MNE::doClustering);

    //
    // Set the fwd, annotation and surface data
    //
    m_pRTSEOutput->data()->setAnnotSet(m_pAnnotationSet);
    m_pRTSEOutput->data()->setSurfSet(m_pSurfaceSet);
    m_pRTSEOutput->data()->setFwdSolution(m_pClusteredFwd);
}

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

void MNE::unload()
{

}

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

void MNE::calcFiffInfo()
{
    QMutexLocker locker(&m_qMutex);

    if(m_qListCovChNames.size() > 0 && m_pFiffInfoInput && m_pFiffInfoForward)
    {
        qDebug() << "Fiff Infos available";

//        qDebug() << "m_qListCovChNames" << m_qListCovChNames;
//        qDebug() << "m_pFiffInfoForward->ch_names" << m_pFiffInfoForward->ch_names;
//        qDebug() << "m_pFiffInfoInput->ch_names" << m_pFiffInfoInput->ch_names;

        // Align channel names of the forward solution to the incoming averaged (currently acquired) data
        // Find out whether the forward solution depends on only MEG, EEG or both MEG and EEG channels
        QStringList forwardChannelsTypes;
        m_pFiffInfoForward->ch_names.clear();
        int counter = 0;

        for(qint32 x = 0; x < m_pFiffInfoForward->chs.size(); ++x) {
            if(forwardChannelsTypes.contains("MEG") && forwardChannelsTypes.contains("EEG"))
                break;

            if(m_pFiffInfoForward->chs[x].kind == FIFFV_MEG_CH && !forwardChannelsTypes.contains("MEG"))
                forwardChannelsTypes<<"MEG";

            if(m_pFiffInfoForward->chs[x].kind == FIFFV_EEG_CH && !forwardChannelsTypes.contains("EEG"))
                forwardChannelsTypes<<"EEG";
        }

        //If only MEG channels are used
        if(forwardChannelsTypes.contains("MEG") && !forwardChannelsTypes.contains("EEG")) {
            for(qint32 x = 0; x < m_pFiffInfoInput->chs.size(); ++x)
            {
                if(m_pFiffInfoInput->chs[x].kind == FIFFV_MEG_CH) {
                    m_pFiffInfoForward->chs[counter].ch_name = m_pFiffInfoInput->chs[x].ch_name;
                    m_pFiffInfoForward->ch_names << m_pFiffInfoInput->chs[x].ch_name;
                    counter++;
                }
            }
        }

        //If only EEG channels are used
        if(!forwardChannelsTypes.contains("MEG") && forwardChannelsTypes.contains("EEG")) {
            for(qint32 x = 0; x < m_pFiffInfoInput->chs.size(); ++x)
            {
                if(m_pFiffInfoInput->chs[x].kind == FIFFV_EEG_CH) {
                    m_pFiffInfoForward->chs[counter].ch_name = m_pFiffInfoInput->chs[x].ch_name;
                    m_pFiffInfoForward->ch_names << m_pFiffInfoInput->chs[x].ch_name;
                    counter++;
                }
            }
        }

        //If both MEG and EEG channels are used
        if(forwardChannelsTypes.contains("MEG") && forwardChannelsTypes.contains("EEG")) {
            qDebug()<<"MEG EEG fwd solution";
            for(qint32 x = 0; x < m_pFiffInfoInput->chs.size(); ++x)
            {
                if(m_pFiffInfoInput->chs[x].kind == FIFFV_MEG_CH || m_pFiffInfoInput->chs[x].kind == FIFFV_EEG_CH) {
                    m_pFiffInfoForward->chs[counter].ch_name = m_pFiffInfoInput->chs[x].ch_name;
                    m_pFiffInfoForward->ch_names << m_pFiffInfoInput->chs[x].ch_name;
                    counter++;
                }
            }
        }

        //Pick only channels which are present in all data structures (covariance, evoked and forward)
        QStringList tmp_pick_ch_names;
        foreach (const QString &ch, m_pFiffInfoForward->ch_names)
        {
            if(m_pFiffInfoInput->ch_names.contains(ch))
                tmp_pick_ch_names << ch;
        }
        m_qListPickChannels.clear();

        foreach (const QString &ch, tmp_pick_ch_names)
        {
            if(m_qListCovChNames.contains(ch))
                m_qListPickChannels << ch;
        }
        RowVectorXi sel = m_pFiffInfoInput->pick_channels(m_pFiffInfoInput->ch_names, m_qListPickChannels);

        qDebug() << "m_qListPickChannels" << m_qListPickChannels;

        m_pFiffInfo = QSharedPointer<FiffInfo>(new FiffInfo(m_pFiffInfoInput->pick_info(sel)));

        m_pRTSEOutput->data()->setFiffInfo(m_pFiffInfo);

        qDebug() << "m_pFiffInfo" << m_pFiffInfo->ch_names;
    }
}

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

void MNE::doClustering()
{
    emit clusteringStarted();

    m_qMutex.lock();
    m_bFinishedClustering = false;
    m_pClusteredFwd = MNEForwardSolution::SPtr(new MNEForwardSolution(m_pFwd->cluster_forward_solution(*m_pAnnotationSet.data(), 40)));
    //m_pClusteredFwd = m_pFwd;
    m_pRTSEOutput->data()->setFwdSolution(m_pClusteredFwd);

    m_qMutex.unlock();

    finishedClustering();
}

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

void MNE::finishedClustering()
{
    m_qMutex.lock();
    m_bFinishedClustering = true;
    m_pFiffInfoForward = QSharedPointer<FiffInfoBase>(new FiffInfoBase(m_pClusteredFwd->info));
    m_qMutex.unlock();

    emit clusteringFinished();
}

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

bool MNE::start()
{
    //Check if the thread is already or still running. This can happen if the start button is pressed immediately after the stop button was pressed. In this case the stopping process is not finished yet but the start process is initiated.
    if(this->isRunning())
        QThread::wait();

    if(m_bFinishedClustering)
    {
        m_bIsRunning = true;
        QThread::start();
        return true;
    }
    else
        return false;
}

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

bool MNE::stop()
{
    m_bIsRunning = false;

    if(m_pRtInvOp->isRunning())
        m_pRtInvOp->stop();

    if(m_bProcessData) // Only clear if buffers have been initialised
    {
        m_qVecFiffEvoked.clear();
        m_qVecFiffCov.clear();
    }

    m_qListCovChNames.clear();

    // Stop filling buffers with data from the inputs
    m_bProcessData = false;

    m_bReceiveData = false;

    return true;
}

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

IPlugin::PluginType MNE::getType() const
{
    return _IAlgorithm;
}

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

QString MNE::getName() const
{
    return "RTC-MNE";
}

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

QWidget* MNE::setupWidget()
{
    MNESetupWidget* setupWidget = new MNESetupWidget(this);//widget is later distroyed by CentralWidget - so it has to be created everytime new

    if(!m_bFinishedClustering)
        setupWidget->setClusteringState();

    connect(this, &MNE::clusteringStarted, setupWidget, &MNESetupWidget::setClusteringState);
    connect(this, &MNE::clusteringFinished, setupWidget, &MNESetupWidget::setSetupState);

    return setupWidget;
}

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

void MNE::updateRTMSA(SCMEASLIB::NewMeasurement::SPtr pMeasurement)
{
    qDebug() << "updateRTMSA()";

    QSharedPointer<NewRealTimeMultiSampleArray> pRTMSA = pMeasurement.dynamicCast<NewRealTimeMultiSampleArray>();

    if(pRTMSA && m_bReceiveData) {
        //Check if buffer initialized
        if(!m_pMatrixDataBuffer)
            m_pMatrixDataBuffer = CircularMatrixBuffer<double>::SPtr(new CircularMatrixBuffer<double>(64, pRTMSA->getNumChannels(), pRTMSA->getMultiSampleArray()[0].cols()));

        //Fiff Information of the evoked
        if(!m_pFiffInfoInput) {
            //qDebug()<<"MNE::updateRTMSA - Creating m_pFiffInfoInput";
            //m_pFiffInfoInput = QSharedPointer<FiffInfo>(new FiffInfo(pRTMSA->info().data()));
            m_pFiffInfoInput = pRTMSA->info();
        }

        if(m_bProcessData)
        {
            for(qint32 i = 0; i < pRTMSA->getMultiSampleArray().size(); ++i)
            {
                MatrixXd t_mat = pRTMSA->getMultiSampleArray()[i];

                m_pMatrixDataBuffer->push(&t_mat);
            }
        }
    }
}

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

void MNE::updateRTC(SCMEASLIB::NewMeasurement::SPtr pMeasurement)
{
    QSharedPointer<RealTimeCov> pRTC = pMeasurement.dynamicCast<RealTimeCov>();

    //MEG
    if(pRTC && m_bReceiveData)
    {
        //Fiff Information of the covariance
        if(m_qListCovChNames.size() != pRTC->getValue()->names.size())
            m_qListCovChNames = pRTC->getValue()->names;

        if(m_bProcessData)
        {
            m_qMutex.lock();
            m_qVecFiffCov.push_back(pRTC->getValue()->pick_channels(m_qListPickChannels));
            m_qMutex.unlock();
        }
    }
}

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

void MNE::updateRTE(SCMEASLIB::NewMeasurement::SPtr pMeasurement)
{
    qDebug() << "updateRTE()";

    QSharedPointer<RealTimeEvokedSet> pRTES = pMeasurement.dynamicCast<RealTimeEvokedSet>();

    QMutexLocker locker(&m_qMutex);
    //MEG
    if(pRTES && m_bReceiveData)
    {
        //Fiff Information of the evoked
        if(!m_pFiffInfoInput && pRTES->getValue()->evoked.size() > 0) {
            for(int i = 0; i < pRTES->getValue()->evoked.size(); ++i) {
                if(pRTES->getValue()->evoked.at(i).comment == m_sAvrType) {
                    m_pFiffInfoInput = QSharedPointer<FiffInfo>(new FiffInfo(pRTES->getValue()->evoked.at(i).info));
                }
            }
        }

        if(m_bProcessData) {
            FiffEvokedSet::SPtr pFiffEvokedSet = pRTES->getValue();

            for(int i = 0; i < pFiffEvokedSet->evoked.size(); ++i) {
                qDebug()<<""<<m_sAvrType;
                if(pFiffEvokedSet->evoked.at(i).comment == m_sAvrType) {
                    qDebug()<<"MNE::updateRTE - avrage found type - " << m_sAvrType;
                    m_qVecFiffEvoked.push_back(pFiffEvokedSet->evoked.at(i).pick_channels(m_qListPickChannels));
                }
            }
        }
    }
}

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

void MNE::updateInvOp(MNEInverseOperator::SPtr p_pInvOp)
{
    qDebug() << "MNE::updateInvOp - START";
    m_pInvOp = p_pInvOp;

    double snr = 3.0;
    double lambda2 = 1.0 / pow(snr, 2); //ToDO estimate lambda using covariance

    QString method("dSPM"); //"MNE" | "dSPM" | "sLORETA"

    m_qMutex.lock();

    m_pMinimumNorm = MinimumNorm::SPtr(new MinimumNorm(*m_pInvOp.data(), lambda2, method));

    //
    //   Set up the inverse according to the parameters
    //
    m_pMinimumNorm->doInverseSetup(m_iNumAverages,false);
    m_qMutex.unlock();
}

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

void MNE::run()
{
    //
    // start receiving data
    //
    m_qMutex.lock();
    m_bReceiveData = true;
    m_qMutex.unlock();

    //
    // Read Fiff Info
    //
    while(true)
    {
        {
            QMutexLocker locker(&m_qMutex);
            if(m_pFiffInfo)
                break;
        }
        calcFiffInfo();
        msleep(10);// Wait for fiff Info
    }

    qDebug() << "m_pClusteredFwd->info.ch_names" << m_pClusteredFwd->info.ch_names;
    qDebug() << "m_pFiffInfo->ch_names" << m_pFiffInfo->ch_names;

    //
    // Init Real-Time inverse estimator
    //
    m_pRtInvOp = RtInvOp::SPtr(new RtInvOp(m_pFiffInfo, m_pClusteredFwd));
    connect(m_pRtInvOp.data(), &RtInvOp::invOperatorCalculated,
            this, &MNE::updateInvOp);
    m_pMinimumNorm.reset();

    //
    // Start the rt helpers
    //
    m_pRtInvOp->start();

    //
    // start processing data
    //
    m_bProcessData = true;

    qint32 skip_count = 0;

//    //
//    // TEMP INV LOADING START
//    //

//    QFile t_fileCov("./MNE-sample-data/MEG/sample/sample_audvis-cov.fif");
//    FiffCov noise_cov(t_fileCov);

//    // regularize noise covariance
//    noise_cov = noise_cov.regularize(*m_pFiffInfoInput.data(), 0.05, 0.05, 0.1, true);

//    //
//    // make an inverse operators
//    //
//    MNEInverseOperator inverse_operator(*m_pFiffInfoInput.data(), *m_pClusteredFwd.data(), noise_cov, 0.2f, 0.8f, false);

//    m_pInvOp = MNEInverseOperator::SPtr(&inverse_operator);

//    double snr = 1.0;
//    double lambda2 = 1.0 / pow(snr, 2); //ToDO estimate lambda using covariance
//    QString method("dSPM"); //"MNE" | "dSPM" | "sLORETA"
//    m_pMinimumNorm = MinimumNorm::SPtr(new MinimumNorm(inverse_operator, lambda2, method));
//    m_pMinimumNorm->doInverseSetup(20,false);

//    //
//    // TEMP INV LOADING END
//    //

    while(m_bIsRunning)
    {
        m_qMutex.lock();
        qint32 t_covSize = m_qVecFiffCov.size();
        m_qMutex.unlock();
        if(t_covSize > 0)
        {
            m_qMutex.lock();
            m_pRtInvOp->appendNoiseCov(m_qVecFiffCov[0]);
            m_qVecFiffCov.pop_front();
            m_qMutex.unlock();
        }

        m_qMutex.lock();
        qint32 t_evokedSize = m_qVecFiffEvoked.size();
        m_qMutex.unlock();

        if(m_pMatrixDataBuffer)
        {
            //qDebug()<<"MNE::run - Processing RTMSA data";
            if(m_pMinimumNorm && ((skip_count % m_iDownSample) == 0))
            {
                MatrixXd rawSegment = m_pMatrixDataBuffer->pop();

                float tmin = 1 / m_pFiffInfo->sfreq;
                float tstep = 1 / m_pFiffInfo->sfreq;

                m_qMutex.lock();

                //TODO: Add picking here. See evoked part as input.
                MNESourceEstimate sourceEstimate = m_pMinimumNorm->calculateInverse(rawSegment, tmin, tstep);

                m_qMutex.unlock();

                m_pRTSEOutput->data()->setValue(sourceEstimate);
            }
            else
            {
                m_qMutex.lock();
                m_qVecFiffEvoked.pop_front();
                m_qMutex.unlock();
            }
            ++skip_count;
        }

        if(t_evokedSize > 0)
        {
            qDebug() << "MNE::run - Processing RTE data - t_evokedSize" << t_evokedSize;
            if(m_pMinimumNorm && ((skip_count % m_iDownSample) == 0))
            {
                m_qMutex.lock();
                FiffEvoked t_fiffEvoked = m_qVecFiffEvoked[0];
                qDebug()<<"MNE::run - t_fiffEvoked.data.rows()"<<t_fiffEvoked.data.rows();
                m_qVecFiffEvoked.pop_front();
                m_qMutex.unlock();

                float tmin = ((float)t_fiffEvoked.first) / t_fiffEvoked.info.sfreq;
                float tstep = 1/t_fiffEvoked.info.sfreq;

                m_qMutex.lock();

                t_fiffEvoked = t_fiffEvoked.pick_channels(m_pInvOp->noise_cov->names);

                MNESourceEstimate sourceEstimate = m_pMinimumNorm->calculateInverse(t_fiffEvoked.data, tmin, tstep);

                m_qMutex.unlock();

                m_pRTSEOutput->data()->setValue(sourceEstimate);
            }
            else
            {
                m_qMutex.lock();
                m_qVecFiffEvoked.pop_front();
                m_qMutex.unlock();
            }
            ++skip_count;
        }
    }
}


text:
SYNONYM

#### According to
Index Fungorum

#### Published in
Scott. crypt. fl. (Edinburgh) 1: ad tab. 13 (1822)

#### Original name
Cryptosphaeria Grev.

### Remarks
null


text:
@interface FakeMPStreamAdPlacementData : NSObject

- (MPStreamAdPlacementData *)masquerade;

@end


text:
from base64 import urlsafe_b64decode

from datadog_checks.dev.tooling.constants import get_agent_requirements

MARKER = '<docs-insert-dependencies>'
OTHER_DEPENDENCY = urlsafe_b64decode('aHR0cHM6Ly93d3cueW91dHViZS5jb20vd2F0Y2g_dj1kUXc0dzlXZ1hjUQ==').decode('utf-8')

def patch(lines):
    """This renders the list of shipped dependencies."""
    if not lines or not (lines[0] == '# Acknowledgements' and MARKER in lines):
        return

    marker_index = lines.index(MARKER)
    new_lines = lines[:marker_index]

    agent_requirements = get_agent_requirements()

    dependencies = set()
    with open(agent_requirements, 'r', encoding='utf-8') as f:
        for line in f:
            line = line.strip()
            if line:
                dependencies.add(line.split('==')[0].split('[')[0].strip().lower())

    new_lines.append('??? example "Dependencies"')
    new_lines.append('    === "Core"')
    for dep in sorted(dependencies):
        new_lines.append(f'        - [{dep}](https://pypi.org/project/{dep}/)')

    new_lines.append('')
    new_lines.append('    === "Other"')
    new_lines.append(f'        - [Rick]({OTHER_DEPENDENCY})')

    new_lines.extend(lines[marker_index + 1:])
    return new_lines


text:
<!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">

  <title> Styleguides – Beispiele &#038; Links</title>
  <meta name="description" content="Ein Styleguide bildet eine Richtlinie für das Design einer Firma, eines Produktes oder z.B. eines Internetauftrittes. Viele Firmen veröffentlichen Ihre Webdesign-Styleguides im Netz. Eine Auswahl:">
  <link rel="canonical" href="https://mo.phlow.de/styleguides-beispiele-links/">

  <meta property="og:title" content=" Styleguides – Beispiele &#038; Links">
  <meta property="og:description" content="Ein Styleguide bildet eine Richtlinie für das Design einer Firma, eines Produktes oder z.B. eines Internetauftrittes. Viele Firmen veröffentlichen Ihre Webdesign-Styleguides im Netz. Eine Auswahl:">
  <meta property="og:url" content="https://mo.phlow.de/styleguides-beispiele-links/">
  <meta property="og:locale" content="de_DE">
  <meta property="og:type" content="website">
  <meta property="og:site_name" content="Sign 'O' The Times">
  <meta property="og:image" content="https://mo.phlow.de/assets/img/facebook-placeholder-1200x630.jpg">

  <link rel="icon" sizes="32x32" href="https://mo.phlow.de/assets/img/favicon-32x32.png" />
  <link rel="icon" sizes="192x192" href="https://mo.phlow.de/assets/img/touch-icon-192x192.png" />
  <link rel="apple-touch-icon-precomposed" sizes="180x180" href="https://mo.phlow.de/assets/img/apple-touch-icon-180x180-precomposed.png" />
  <link rel="apple-touch-icon-precomposed" sizes="152x152" href="https://mo.phlow.de/assets/img/apple-touch-icon-152x152-precomposed.png" />
  <link rel="apple-touch-icon-precomposed" sizes="144x144" href="https://mo.phlow.de/assets/img/apple-touch-icon-144x144-precomposed.png" />
  <link rel="apple-touch-icon-precomposed" sizes="120x120" href="https://mo.phlow.de/assets/img/apple-touch-icon-120x120-precomposed.png" />
  <link rel="apple-touch-icon-precomposed" sizes="114x114" href="https://mo.phlow.de/assets/img/apple-touch-icon-114x114-precomposed.png" />
  <link rel="apple-touch-icon-precomposed" sizes="76x76" href="https://mo.phlow.de/assets/img/apple-touch-icon-76x76-precomposed.png" />
  <link rel="apple-touch-icon-precomposed" sizes="72x72" href="https://mo.phlow.de/assets/img/apple-touch-icon-72x72-precomposed.png" />
  <link rel="apple-touch-icon-precomposed" href="https://mo.phlow.de/assets/img/apple-touch-icon-precomposed.png" />
  <meta name="msapplication-TileImage" content="https://mo.phlow.de/assets/img/msapplication_tileimage.png" />
  <meta name="msapplication-TileColor" content="#fabb00" />

  <link rel="alternate" type="application/rss+xml" title="RSS Sign 'O' The Times" href="https://mo.phlow.de/feed.xml">
  <link type="text/plain" rel="author" href="https://mo.phlow.de/humans.txt">

  <link rel="stylesheet" href="https://mo.phlow.de/assets/css/styles.css">

    Sign 'O' The Times

    Digitale Kultur / Digitales Leben

  ARTIKEL

   /

  SUCHE

   /

  ÜBER

Styleguides – Beispiele & Links

Ein Styleguide bildet eine Richtlinie für das Design einer Firma, eines Produktes oder z.B. eines Internetauftrittes. Viele Firmen veröffentlichen Ihre Webdesign-Styleguides im Netz. Eine Auswahl:

HTML & CSS: Primer – GitHub Styleguide

HTML & CSS: Mailchimp Styleguide

HTML & CSS: Yelp Styleguide

Design: Material Design Styleguide von Google

Design: Android Design Styleguide

Eine noch größere Auswahl an Styleguide bietet styleguides.io.

      – <time datetime="2018-05-18T00:00:00+02:00" itemprop="datePublished">18. May 2018</time>

      /

        Moritz »mo.« Sauer

<button class="tem2" onclick="myFunction()">Was meinst Du? Kommentar schreiben!</button>

Was meinst Du? Kommentar schreiben!.

      Impressum & Datenschutz /

      Kontakt /

      RSS /
      ↑


text:
<?php

define('PGV_SCRIPT_NAME', 'hourglass_ajax.php');
require './config.php';
require_once PGV_ROOT.'includes/controllers/hourglass_ctrl.php';

/*
 * The purpose of this page is to build the left half of the Hourglass chart via Ajax.
 * This page only produces a husband and wife with the connecting lines to unite and
 * 	label the pair as a pair.
 */

$controller = new HourglassController();
$controller->init();

// -- print html header information
if (isset($_REQUEST['type']) && $_REQUEST['type']=='desc')
	$controller->print_descendency($controller->pid, 1, false);
else
	$controller->print_person_pedigree($controller->pid, 0);
?>


text:
module Digup

  class Logger

    def self.file_path
      Rails.root.join('log', 'digup.log').to_s
    end

    def initialize(responder)
      @responder = responder
    end

    # appends log as html footer
    def log_to_html_body
      template = case
        when @responder.html_response?
          Template.html_template
        when @responder.javascript_response?
          Template.javascript_template
        else
          new_json_template
      end
      @responder.append_template_to_response(template)
    end

    # appends log as web console
    def log_to_console
      template = case
        when @responder.html_response?
          Template.console_template_for_html_response
        when @responder.javascript_response?
          Template.console_template_for_javascript_response
        when !Setting.log_to_html_body?
          new_json_template
      end
      @responder.append_template_to_response(template) if template
    end

    # Add log to database. ActiveRecord required
    def log_to_db
      RequestResponseInfo.create(
        :request_method => @responder.request.request_method,
        :request_accepts => @responder.request.accepts,
        :response_type => @responder.content_type,
        :response_status => @responder.status,
        :params => @responder.request.filtered_parameters
      ).digup_logs.create(Digup.message_store)
    end

    # add log to file inside log/digup.log
    def log_to_file
      File.open(Logger.file_path, 'a') do |f|
        f.write(Template.file_template(@responder))
      end
    end

    # log to every available option
    def log_all
      if Digup.message_store.present?
        log_to_html_body if Setting.log_to_html_body?
        log_to_console if Setting.log_to_console?
        log_to_db if Setting.log_to_db?
        log_to_file if Setting.log_to_file?
      end
    end

    def response_body
      @responder.response_body
    end

    # creates json template depending on the last character of response(} or ])
    def new_json_template
      Template.json_template(response_body[response_body.length - 1])
    end

  end

end


text:
<?php

namespace phparia\Events;

/**
 * @author Brian Smith <wormling@gmail.com>
 */
interface MessageInterface
{
    public function getType();
}


text:
<com.kmwllc.brigade.config.ConnectorConfig>
    <connectorName>testCSV</connectorName>
    <connectorClass>com.kmwllc.brigade.connector.CSVConnector</connectorClass>
    <config>
        <entry>
            <string>filename</string>
            <string>nonexisting.csv</string>
        </entry>
        <entry>
            <string>separator</string>
            <string>,</string>
        </entry>
        <entry>
            <string>firstRowAsColumns</string>
            <string>true</string>
        </entry>
        <entry>
            <string>useRowAsId</string>
            <string>true</string>
        </entry>
        <entry>
            <string>workflowName</string>
            <string>ingest</string>
        </entry>

    </config>
</com.kmwllc.brigade.config.ConnectorConfig>


text:
/**
 * Check that thread-lifetime grips last past a resume.
 */

var gDebuggee;
var gClient;
var gThreadClient;

function run_test()
{
  initTestDebuggerServer();
  gDebuggee = addTestGlobal("test-grips");
  gClient = new DebuggerClient(DebuggerServer.connectPipe());
  gClient.connect(function() {
    attachTestGlobalClientAndResume(gClient, "test-grips", function(aResponse, aThreadClient) {
      gThreadClient = aThreadClient;
      test_thread_lifetime();
    });
  });
  do_test_pending();
}

function test_thread_lifetime()
{
  gThreadClient.addOneTimeListener("paused", function(aEvent, aPacket) {
    let pauseGrip = aPacket.frame.arguments[0];

    gClient.request({ to: pauseGrip.actor, type: "threadGrip" }, function(aResponse) {
      let threadGrip = aResponse.threadGrip;

      do_check_neq(pauseGrip.actor, threadGrip.actor);

      // Create a thread-lifetime actor for this object.

      gThreadClient.addOneTimeListener("paused", function(aEvent, aPacket) {
        // Now that we've resumed, should get noSuchActor for the
        // pause grip, but unrecognizePacketType for the thread grip.
        gClient.request({ to: pauseGrip.actor, type: "bogusRequest" }, function(aResponse) {
          do_check_eq(aResponse.error, "noSuchActor");
          gClient.request({ to: threadGrip.actor, type: "bogusRequest"}, function(aResponse) {
            do_check_eq(aResponse.error, "unrecognizedPacketType");
            gThreadClient.resume(function() {
              finishClient(gClient);
            });
          });
        });
      });
      gThreadClient.resume();
    });
  });

  gDebuggee.eval("(" + function() {
    function stopMe(arg1) {
      debugger;
      debugger;
    };
    stopMe({obj: true});
    ")"
  } + ")()");
}


text:
<?php
namespace Asgard\Form\Field;

/**
 * Day field.
 * @author Michel Hognerud <michel@hognerud.com>
 */
class DayField extends \Asgard\Form\Field\SelectField {
	/**
	 * {@inheritDoc}
	 */
	public function __construct(array $options=[]) {
		$options['validation']['type'] = 'integer';
		$options['choices'] = ['Day'];
		foreach(range(1, 31) as $i)
			$options['choices'][$i] = $i;
		parent::__construct($options);
	}
}


text:
<?php

namespace Application\Innovare\ModelBundle\Entity;

use Doctrine\ORM\Mapping as ORM;

/**
 * FondiAcquisto
 */
class FondiAcquisto
{
    /**
     * @var string
     */
    private $nome;

    /**
     * @var string
     */
    private $descrizione;

    /**
     * @var string
     */
    private $note;

    /**
     * @var integer
     */
    private $id;

    /**
     * @var \Doctrine\Common\Collections\Collection
     */
    private $idStrumento;

    /**
     * Constructor
     */
    public function __construct()
    {
        $this->idStrumento = new \Doctrine\Common\Collections\ArrayCollection();
    }

    /**
     * Set nome
     *
     * @param string $nome
     * @return FondiAcquisto
     */
    public function setNome($nome)
    {
        $this->nome = $nome;

        return $this;
    }

    /**
     * Get nome
     *
     * @return string
     */
    public function getNome()
    {
        return $this->nome;
    }

    /**
     * Set descrizione
     *
     * @param string $descrizione
     * @return FondiAcquisto
     */
    public function setDescrizione($descrizione)
    {
        $this->descrizione = $descrizione;

        return $this;
    }

    /**
     * Get descrizione
     *
     * @return string
     */
    public function getDescrizione()
    {
        return $this->descrizione;
    }

    /**
     * Set note
     *
     * @param string $note
     * @return FondiAcquisto
     */
    public function setNote($note)
    {
        $this->note = $note;

        return $this;
    }

    /**
     * Get note
     *
     * @return string
     */
    public function getNote()
    {
        return $this->note;
    }

    /**
     * Get id
     *
     * @return integer
     */
    public function getId()
    {
        return $this->id;
    }

    /**
     * Add idStrumento
     *
     * @param \Application\Innovare\ModelBundle\Entity\Strumenti $idStrumento
     * @return FondiAcquisto
     */
    public function addIdStrumento(\Application\Innovare\ModelBundle\Entity\Strumenti $idStrumento)
    {
        $this->idStrumento[] = $idStrumento;

        return $this;
    }

    /**
     * Remove idStrumento
     *
     * @param \Application\Innovare\ModelBundle\Entity\Strumenti $idStrumento
     */
    public function removeIdStrumento(\Application\Innovare\ModelBundle\Entity\Strumenti $idStrumento)
    {
        $this->idStrumento->removeElement($idStrumento);
    }

    /**
     * Get idStrumento
     *
     * @return \Doctrine\Common\Collections\Collection
     */
    public function getIdStrumento()
    {
        return $this->idStrumento;
    }
}


text:
package org.kie.workbench.common.stunner.bpmn.definition;

import java.util.HashSet;
import java.util.Set;

import javax.validation.Valid;

import org.jboss.errai.common.client.api.annotations.MapsTo;
import org.jboss.errai.common.client.api.annotations.NonPortable;
import org.jboss.errai.common.client.api.annotations.Portable;
import org.jboss.errai.databinding.client.api.Bindable;
import org.kie.workbench.common.forms.adf.definitions.annotations.FormDefinition;
import org.kie.workbench.common.forms.adf.definitions.annotations.FormField;
import org.kie.workbench.common.forms.adf.definitions.settings.FieldPolicy;
import org.kie.workbench.common.stunner.bpmn.definition.property.background.BackgroundSet;
import org.kie.workbench.common.stunner.bpmn.definition.property.diagram.DiagramSet;
import org.kie.workbench.common.stunner.bpmn.definition.property.dimensions.RectangleDimensionsSet;
import org.kie.workbench.common.stunner.bpmn.definition.property.font.FontSet;
import org.kie.workbench.common.stunner.bpmn.definition.property.variables.ProcessData;
import org.kie.workbench.common.stunner.core.definition.annotation.Definition;
import org.kie.workbench.common.stunner.core.definition.annotation.PropertySet;
import org.kie.workbench.common.stunner.core.definition.annotation.definition.Category;
import org.kie.workbench.common.stunner.core.definition.annotation.definition.Labels;
import org.kie.workbench.common.stunner.core.definition.builder.Builder;
import org.kie.workbench.common.stunner.core.factory.graph.NodeFactory;
import org.kie.workbench.common.stunner.core.rule.annotation.CanContain;
import org.kie.workbench.common.stunner.core.util.HashUtil;

@Portable
@Bindable
@Definition(graphFactory = NodeFactory.class, builder = BPMNDiagramImpl.BPMNDiagramBuilder.class)
@CanContain(roles = {"all"})
@FormDefinition(
        startElement = "diagramSet",
        policy = FieldPolicy.ONLY_MARKED
)
public class BPMNDiagramImpl implements BPMNDiagram {

    @Category
    public static final transient String category = Categories.CONTAINERS;

    @PropertySet
    @FormField
    @Valid
    private DiagramSet diagramSet;

    @PropertySet
    @FormField(
            afterElement = "diagramSet"
    )
    @Valid
    protected ProcessData processData;

    @PropertySet
    private BackgroundSet backgroundSet;

    @PropertySet
    private FontSet fontSet;

    @PropertySet
    protected RectangleDimensionsSet dimensionsSet;

    @Labels
    private final Set<String> labels = new HashSet<String>() {{
        add("canContainArtifacts");
        add("diagram");
    }};

    @NonPortable
    public static class BPMNDiagramBuilder implements Builder<BPMNDiagramImpl> {

        public static final Double WIDTH = 950d;
        public static final Double HEIGHT = 950d;

        @Override
        public BPMNDiagramImpl build() {
            return new BPMNDiagramImpl(new DiagramSet(),
                                       new ProcessData(),
                                       new BackgroundSet(),
                                       new FontSet(),
                                       new RectangleDimensionsSet(WIDTH,
                                                                  HEIGHT));
        }
    }

    public BPMNDiagramImpl() {
    }

    public BPMNDiagramImpl(final @MapsTo("diagramSet") DiagramSet diagramSet,
                           final @MapsTo("processData") ProcessData processData,
                           final @MapsTo("backgroundSet") BackgroundSet backgroundSet,
                           final @MapsTo("fontSet") FontSet fontSet,
                           final @MapsTo("dimensionsSet") RectangleDimensionsSet dimensionsSet) {
        this.diagramSet = diagramSet;
        this.processData = processData;
        this.backgroundSet = backgroundSet;
        this.fontSet = fontSet;
        this.dimensionsSet = dimensionsSet;
    }

    public String getCategory() {
        return category;
    }

    public Set<String> getLabels() {
        return labels;
    }

    public DiagramSet getDiagramSet() {
        return diagramSet;
    }

    public RectangleDimensionsSet getDimensionsSet() {
        return dimensionsSet;
    }

    public void setDimensionsSet(final RectangleDimensionsSet dimensionsSet) {
        this.dimensionsSet = dimensionsSet;
    }

    public ProcessData getProcessData() {
        return processData;
    }

    public BackgroundSet getBackgroundSet() {
        return backgroundSet;
    }

    public FontSet getFontSet() {
        return fontSet;
    }

    public void setDiagramSet(final DiagramSet diagramSet) {
        this.diagramSet = diagramSet;
    }

    public void setProcessData(final ProcessData processData) {
        this.processData = processData;
    }

    public void setBackgroundSet(final BackgroundSet backgroundSet) {
        this.backgroundSet = backgroundSet;
    }

    public void setFontSet(final FontSet fontSet) {
        this.fontSet = fontSet;
    }

    @Override
    public BPMNBaseInfo getGeneral() {
        return null;
    }

    @Override
    public int hashCode() {
        return HashUtil.combineHashCodes(diagramSet.hashCode(),
                                         processData.hashCode(),
                                         backgroundSet.hashCode(),
                                         fontSet.hashCode(),
                                         dimensionsSet.hashCode());
    }

    @Override
    public boolean equals(Object o) {
        if (o instanceof BPMNDiagramImpl) {
            BPMNDiagramImpl other = (BPMNDiagramImpl) o;
            return diagramSet.equals(other.diagramSet) &&
                    processData.equals(other.processData) &&
                    backgroundSet.equals(other.backgroundSet) &&
                    fontSet.equals(other.fontSet) &&
                    dimensionsSet.equals(other.dimensionsSet);
        }
        return false;
    }
}


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

<LinearLayout
    android:layout_width="260dp"
    android:layout_height="wrap_content"
    android:orientation="vertical"
    android:layout_marginTop="12dp"
    android:layout_marginBottom="12dp"
    android:layout_marginLeft="20dp"
    android:layout_marginRight="20dp">
    <TextView
        android:id="@+id/item_phone"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:textSize="18sp"
        android:padding="10dp"
        android:text="电话记录"
        android:textColor="@android:color/white"
        android:gravity="center"
        android:background="@drawable/blue_rounded_rectangle_selector"/>

    <TextView
        android:id="@+id/item_message"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:textSize="18sp"
        android:layout_marginTop="8dp"
        android:padding="10dp"
        android:textColor="@android:color/white"
        android:text="短信记录"
        android:background="@drawable/blue_rounded_rectangle_selector"
        android:gravity="center"/>
    </LinearLayout>
</LinearLayout>


text:
ACCEPTED

#### According to
Index Fungorum

#### Published in
null

#### Original name
Podostroma truncatum S. Imai

### Remarks
null


text:
cask "microsoft-word" do
  version "16.40.20081000"
  sha256 "3b8d896dbc79982ef300a1760b3391be86c1a000c809fcca37b13106422bd265"

  # officecdn-microsoft-com.akamaized.net/pr/C1297A47-86C4-4C1F-97FA-950631F94777/MacAutoupdate/ was verified as official when first introduced to the cask
  url "https://officecdn-microsoft-com.akamaized.net/pr/C1297A47-86C4-4C1F-97FA-950631F94777/MacAutoupdate/Microsoft_Word_#{version}_Installer.pkg"
  appcast "https://docs.microsoft.com/en-us/officeupdates/update-history-office-for-mac"
  name "Microsoft Word"
  homepage "https://products.office.com/en-US/word"

  auto_updates true
  conflicts_with cask: "microsoft-office"
  depends_on cask: "microsoft-auto-update"
  depends_on macos: ">= :sierra"

  pkg "Microsoft_Word_#{version}_Installer.pkg",
      choices: [
        {
          "choiceIdentifier" => "com.microsoft.autoupdate", # Office16_all_autoupdate.pkg
          "choiceAttribute"  => "selected",
          "attributeSetting" => 0,
        },
      ]

  uninstall pkgutil:   [
    "com.microsoft.package.Microsoft_Word.app",
    "com.microsoft.pkg.licensing",
  ],
            launchctl: "com.microsoft.office.licensingV2.helper"

  zap trash: [
    "~/Library/Application Scripts/com.microsoft.Word",
    "~/Library/Application Support/com.apple.sharedfilelist/com.apple.LSSharedFileList.ApplicationRecentDocuments/com.microsoft.word.sfl*",
    "~/Library/Application Support/CrashReporter/Microsoft Word_*.plist",
    "~/Library/Containers/com.microsoft.Word",
    "~/Library/Preferences/com.microsoft.Word.plist",
  ]
end


text: long long Point::count = 0;


text:
package org.apache.commons.cli.bug;

import static org.junit.Assert.assertFalse;

import org.apache.commons.cli.CommandLine;
import org.apache.commons.cli.Option;
import org.apache.commons.cli.Options;
import org.apache.commons.cli.ParseException;
import org.apache.commons.cli.PosixParser;
import org.junit.Test;

@SuppressWarnings("deprecation") // tests some deprecated classes
public class BugCLI133Test {
    @Test
    public void testOrder() throws ParseException {
        final Option optionA = new Option("a", "first");
        final Options opts = new Options();
        opts.addOption(optionA);
        final PosixParser posixParser = new PosixParser();
        final CommandLine line = posixParser.parse(opts, null);
        assertFalse(line.hasOption((String) null));
    }
}


text:
module Day13 where

import Data.List

type Feelings = [(String, String, Int)]

parse :: String -> Feelings
parse =  map (go . words . init) . lines
  where go :: [String] -> (String, String, Int)
        go [name, _, "lose", num, _, _, _, _, _, _, to] = (name, to, (- readInt num))
        go [name, _, "gain", num, _, _, _, _, _, _, to] = (name, to,    readInt num )

        go                                          x@_ = error $ "no parse: " ++ concat x
        readInt :: String -> Int
        readInt = read

getHappiness :: String -> String -> Feelings -> Int
getHappiness x y feels =
    case find (\(a,b,_) -> x == a && y == b) feels of
        Just (a,b,i) -> i
        Nothing      -> error $ "no parse: " ++ x ++ '|':y

happiness :: Feelings -> [String] -> Int
happiness feels (x:xs) = doubleHappiness x (last xs) feels + go feels (x:xs)
    where go :: Feelings -> [String] -> Int
          go feels [y] = 0
          go feels (x:y:xs) = doubleHappiness x y feels + go feels (y:xs)

          doubleHappiness n1 n2 feels = feel1 + feel2
              where feel1 = getHappiness n1 n2 feels
                    feel2 = getHappiness n2 n1 feels

part1 :: IO ()
part1 = do
  txt <- readFile "lib/day13-input.txt"
  let feels    = parse txt
      (p,_,_) = unzip3 feels
      people  = nub p
      positions = permutations people
      rating  = maximum . map (happiness feels) $ positions

  print rating

createMyself :: [String] -> [(String, String, Int)]
createMyself []     = []
createMyself (x:xs) = ("Me", x, 0):(x,"Me", 0) : createMyself xs

part2 :: IO ()
part2 = do
  txt <- readFile "lib/day13-input.txt"
  let feels   = parse txt
      (p,_,_) = unzip3 feels
      people  = nub p
      feels'  = createMyself people ++ feels
      people' = "Me":people
      positions = permutations people'

      rating  = maximum . map (happiness feels') $ positions
  print rating


text:
#ifndef ICMPV4_L4_PROTOCOL_H
#define ICMPV4_L4_PROTOCOL_H

#include "ip-l4-protocol.h"
#include "icmpv4.h"
#include "ns3/ipv4-address.h"

namespace ns3 {

class Node;
class Ipv4Interface;
class Ipv4Route;

class Icmpv4L4Protocol : public IpL4Protocol
{
public:
  /**
   * \brief Get the type ID.
   * \return the object TypeId
   */
  static TypeId GetTypeId (void);
  static const uint8_t PROT_NUMBER; //!< ICMP protocol number (0x1)

  Icmpv4L4Protocol ();
  virtual ~Icmpv4L4Protocol ();

  /**
   * \brief Set the node the protocol is associated with.
   * \param node the node
   */
  void SetNode (Ptr<Node> node);

  /**
   * Get the protocol number
   * \returns the protocol number
   */
  static uint16_t GetStaticProtocolNumber (void);

  /**
   * Get the protocol number
   * \returns the protocol number
   */
  virtual int GetProtocolNumber (void) const;

  /**
   * \brief Receive method.
   * \param p the packet
   * \param header the IPv4 header
   * \param incomingInterface the interface from which the packet is coming
   * \returns the receive status
   */
  virtual enum IpL4Protocol::RxStatus Receive (Ptr<Packet> p,
                                               Ipv4Header const &header,
                                               Ptr<Ipv4Interface> incomingInterface);

  /**
   * \brief Receive method.
   * \param p the packet
   * \param header the IPv6 header
   * \param incomingInterface the interface from which the packet is coming
   * \returns the receive status
   */
  virtual enum IpL4Protocol::RxStatus Receive (Ptr<Packet> p,
                                               Ipv6Header const &header,
                                               Ptr<Ipv6Interface> incomingInterface);

  /**
   * \brief Send a Destination Unreachable - Fragmentation needed ICMP error
   * \param header the original IP header
   * \param orgData the original packet
   * \param nextHopMtu the next hop MTU
   */
  void SendDestUnreachFragNeeded (Ipv4Header header, Ptr<const Packet> orgData, uint16_t nextHopMtu);

  /**
   * \brief Send a Time Exceeded ICMP error
   * \param header the original IP header
   * \param orgData the original packet
   */
  void SendTimeExceededTtl (Ipv4Header header, Ptr<const Packet> orgData);

  /**
   * \brief Send a Time Exceeded ICMP error
   * \param header the original IP header
   * \param orgData the original packet
   */
  void SendDestUnreachPort (Ipv4Header header, Ptr<const Packet> orgData);

  // From IpL4Protocol
  virtual void SetDownTarget (IpL4Protocol::DownTargetCallback cb);
  virtual void SetDownTarget6 (IpL4Protocol::DownTargetCallback6 cb);
  // From IpL4Protocol
  virtual IpL4Protocol::DownTargetCallback GetDownTarget (void) const;
  virtual IpL4Protocol::DownTargetCallback6 GetDownTarget6 (void) const;
protected:
  /*
   * This function will notify other components connected to the node that a new stack member is now connected
   * This will be used to notify Layer 3 protocol of layer 4 protocol stack to connect them together.
   */
  virtual void NotifyNewAggregate ();
private:
  /**
   * \brief Handles an incoming ICMP Echo packet
   * \param p the packet
   * \param header the IP header
   * \param source the source address
   * \param destination the destination address
   */
  void HandleEcho (Ptr<Packet> p,
                   Icmpv4Header header,
                   Ipv4Address source,
                   Ipv4Address destination);
  /**
   * \brief Handles an incoming ICMP Destination Unreachable packet
   * \param p the packet
   * \param header the IP header
   * \param source the source address
   * \param destination the destination address
   */
  void HandleDestUnreach (Ptr<Packet> p,
                          Icmpv4Header header,
                          Ipv4Address source,
                          Ipv4Address destination);
  /**
   * \brief Handles an incoming ICMP Time Exceeded packet
   * \param p the packet
   * \param icmp the ICMP header
   * \param source the source address
   * \param destination the destination address
   */
  void HandleTimeExceeded (Ptr<Packet> p,
                           Icmpv4Header icmp,
                           Ipv4Address source,
                           Ipv4Address destination);
  /**
   * \brief Send an ICMP Destination Unreachable packet
   *
   * \param header the original IP header
   * \param orgData the original packet
   * \param code the ICMP code
   * \param nextHopMtu the next hop MTU
   */
  void SendDestUnreach (Ipv4Header header, Ptr<const Packet> orgData,
                        uint8_t code, uint16_t nextHopMtu);
  /**
   * \brief Send a generic ICMP packet
   *
   * \param packet the packet
   * \param dest the destination
   * \param type the ICMP type
   * \param code the ICMP code
   */
  void SendMessage (Ptr<Packet> packet, Ipv4Address dest, uint8_t type, uint8_t code);
  /**
   * \brief Send a generic ICMP packet
   *
   * \param packet the packet
   * \param source the source
   * \param dest the destination
   * \param type the ICMP type
   * \param code the ICMP code
   * \param route the route to be used
   */
  void SendMessage (Ptr<Packet> packet, Ipv4Address source, Ipv4Address dest, uint8_t type, uint8_t code, Ptr<Ipv4Route> route);
  /**
   * \brief Forward the message to an L4 protocol
   *
   * \param source the source
   * \param icmp the ICMP header
   * \param info info data (e.g., the target MTU)
   * \param ipHeader the IP header carried by ICMP
   * \param payload payload chunk carried by ICMP
   */
  void Forward (Ipv4Address source, Icmpv4Header icmp,
                uint32_t info, Ipv4Header ipHeader,
                const uint8_t payload[8]);

  virtual void DoDispose (void);

  Ptr<Node> m_node; //!< the node this protocol is associated with
  IpL4Protocol::DownTargetCallback m_downTarget; //!< callback to Ipv4::Send
};

} // namespace ns3

#endif /* ICMPV4_L4_PROTOCOL_H */


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

		<title>Sanity check, width="100%" height="49%"</title>

You should see a blue rectangle 100% wide and 49% high when viewing this file. Image size is 500 x 500.


text:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Net.Http;
using System.Web.Http;
using AutoMapper;
using AutoMapper.QueryableExtensions;
using RestaurantSystem.Data.UoW;
using RestaurantSystem.Models;
using RestaurantSystem.Models.BindingModel;
using RestaurantSystem.Models.ViewModels;

namespace RestaurantSystem.API.Controllers
{
    public class MealsController : BaseApiController
    {
        public MealsController(IRestaurantData data)
            : base(data)
        {
        }

        [HttpGet]
        public IHttpActionResult GetAll()
        {
            var meals =
                this.Data.Meals.All()
                .OrderBy(x => x.Id)
                .ProjectTo<MealViewModel>()
                .ToList();

            return this.Ok(meals);
        }

        [HttpGet]
        public IHttpActionResult GetMealById(int id)
        {
            var dbMeal = this.FindMealById(id);
            if (dbMeal == null)
            {
                return this.NotFound();
            }
            var mealVM = Mapper.Map<Meal, MealViewModel>(dbMeal);
            return this.Ok(mealVM);
        }

        //[Authorize]
        [HttpPost]
        public IHttpActionResult CreateMeal(MealBindingModel model)
        {
            if (model == null)
            {
                return this.BadRequest("Model cannot be null");
            }
            if (!this.ModelState.IsValid)
            {
                return this.BadRequest(this.ModelState);
            }
            var dbMeal = Mapper.Map<MealBindingModel, Meal>(model);
            this.Data.Meals.Add(dbMeal);
            this.Data.SaveChanges();
            return this.Ok();
        }

        //[Authorize]
        [HttpPut]
        public IHttpActionResult UpdateMeal(int id, MealUpdateBindingModel model)
        {
            if (model == null)
            {
                return this.BadRequest("Model cannot be null");
            }
            if (!this.ModelState.IsValid)
            {
                return this.BadRequest(this.ModelState);
            }
            var dbMeal = this.FindMealById(id);
            if (dbMeal == null)
            {
                return this.NotFound();
            }

            if (model.Title != null)
            {
                dbMeal.Title = model.Title;
            }
            if (model.Description != null)
            {
                dbMeal.Description = model.Description;
            }
            if (model.SubCategoryId != null)
            {
                var subCatId = Convert.ToInt32(model.SubCategoryId);
                var subCategoryExists = this.Data.SubCategories.All().Any(c => c.Id == subCatId);
                if (subCategoryExists)
                {
                    dbMeal.SubCategoryId = subCatId;
                }
            }
            if (model.Price != null)
            {
                var price = Convert.ToDecimal(model.Price);
                dbMeal.Price = price;
            }

            this.Data.Meals.Update(dbMeal);
            this.Data.SaveChanges();
            return this.Ok();
        }

        //[Authorize]
        [HttpDelete]
        public IHttpActionResult DeleteMealById(int id)
        {
            var dbMeal = this.FindMealById(id);
            if (dbMeal == null)
            {
                return this.NotFound();
            }
            this.Data.Meals.Delete(dbMeal);
            this.Data.SaveChanges();
            return this.Ok();
        }

        [NonAction]
        private Meal FindMealById(int id)
        {
            var meal = this.Data.Meals.All().FirstOrDefault(c => c.Id == id);
            return meal;
        }
    }
}


text:
  Rancenay est
       un village
       géographiquement positionné dans le département des Doubs en Franche-Comté. Elle totalisait 285 habitants en 2008.

Le parc d'habitations, à Rancenay, était réparti en 2011 en onze appartements et 111 maisons soit
 un marché relativement équilibré.

Rancenay est situé à seulement 8 km de Besançon, les étudiants qui aurons besoin de se loger à pas cher pourront envisager de louer un logement à Rancenay. Rancenay est également un bon placement locatif a cause de sa proximité de Besançon et de ses Universités. Il sera aisé de trouver un appartement à acheter.

Si vous pensez emmenager à Rancenay, vous pourrez facilement trouver une maison à vendre.

À coté de Rancenay sont situées les communes de
Montferrand-le-Château située à 2 km, 2 160 habitants,
Arguel à 4 km, 242 habitants,
Grandfontaine située à 3 km, 1 450 habitants,
Vorges-les-Pins à 3 km, 493 habitants,
Thoraise à 3 km, 280 habitants,
Avanne-Aveney à 1 km, 2 307 habitants,
 entre autres. De plus, Rancenay est située à seulement huit km de Besançon.


text:
<?xml version="1.0" encoding="UTF-8"?>
<lint>
    <issue id="DefaultLocale" severity="ignore" />
    <issue id="ViewConstructor">
        <ignore path="src/com/funnyhatsoftware/spacedock/CaptainsAdapter.java" />
        <ignore path="src/com/funnyhatsoftware/spacedock/FlagshipsAdapter.java" />
        <ignore path="src/com/funnyhatsoftware/spacedock/ResourcesAdapter.java" />
        <ignore path="src/com/funnyhatsoftware/spacedock/SetsAdapter.java" />
        <ignore path="src/com/funnyhatsoftware/spacedock/ShipsAdapter.java" />
        <ignore path="src/com/funnyhatsoftware/spacedock/WeaponsAdapter.java" />
    </issue>
</lint>


text:
<Record>
<Term>Azidamfenicol</Term>
<SemanticType>Pharmacologic Substance</SemanticType>
<ParentTerm>Antibiotic</ParentTerm>
<ClassificationPath>Chemicals_and_Drugs_Kind/Drug, Food, Chemical or Biomedical Material/Pharmacologic Substance/Anti-Infective Agent/Antibiotic/Azidamfenicol</ClassificationPath>
<BroaderTerm>Chemicals_and_Drugs_Kind</BroaderTerm>
<BroaderTerm>Antibiotic</BroaderTerm>
<BroaderTerm>Pharmacologic Substance</BroaderTerm>
<BroaderTerm>Azidamfenicol</BroaderTerm>
<BroaderTerm>Anti-Infective Agent</BroaderTerm>
<BroaderTerm>Drug, Food, Chemical or Biomedical Material</BroaderTerm>
<Synonym>AZIDAMFENICOL</Synonym>
<Synonym>Azidamfenicol</Synonym>
<Source>NCI Thesaurus</Source>
</Record>