text:
<?php
namespace PhpBrew\Command;

use Exception;

class VirtualCommand extends \CLIFramework\Command
{
    public function execute($version = null)
    {
        throw new Exception("You should not see this, please check if bashrc is sourced in your shell.");
    }
}

redpajama_set_name: RedPajamaGithub


text:
using System;
using System.Collections.Generic;
using System.Linq.Expressions;
using EFSqlTranslator.Translation.MethodTranslators;

namespace EFSqlTranslator.Translation
{
    public class TranslationPlugIns
    {
        private readonly Dictionary<string, AbstractMethodTranslator> _methodTranslators =
            new Dictionary<string, AbstractMethodTranslator>(StringComparer.CurrentCultureIgnoreCase);

        public void RegisterMethodTranslator(string methodName, AbstractMethodTranslator translator)
        {
            _methodTranslators[methodName] = translator;
        }

        internal bool TranslateMethodCall(
            MethodCallExpression m, TranslationState state, UniqueNameGenerator nameGenerator)
        {
            var method = m.Method;
            if (!_methodTranslators.ContainsKey(method.Name))
                return false;

            var translator = _methodTranslators[method.Name];
            translator.Translate(m, state, nameGenerator);
            return true;
        }
    }
}


text:
[![Build Status](https://travis-ci.org/feiin/shipit-mono.svg?branch=master)](https://travis-ci.org/feiin/shipit-mono)
[![npm](https://img.shields.io/npm/dt/shipit-mono.svg?maxAge=2592000)]()

deploy mono web/asp.net application base on [Shipit-deploy](https://github.com/shipitjs/shipit-deploy)

## Install

```
npm install shipit-mono
```

## Usage

### Example `shipitfile.js`

```js
module.exports = function (shipit) {
  require('shipit-mono')(shipit);

  shipit.initConfig({
    default: {
      workspace: '/tmp/github-monitor',
      deployTo: '/tmp/deploy_to',
      repositoryUrl: 'https://github.com/user/repo.git',
      ignores: ['.git', 'node_modules'],
      keepReleases: 2,
      xdt:'Release'
      shallowClone: false,
      xbuild:{
                solutionPath:'./src/Kings.sln',
                buildTool:'msbuild', //or xbuild
                target:'Kings.Web',
                properties:{
                    Configuration:'Release'
                }
            }
    },
    staging: {
      servers: 'user@myserver.com'
    }
  });
};
```

To deploy on staging, you must use the following command :

```
shipit staging deploy
```

You can rollback to the previous releases with the command :

```
shipit staging rollback
```

## Options

### workspace

Type: `String`

Define a path to an empty directory where Shipit builds it's syncing source. **Beware to not set this path to the root of your repository as shipit-deploy cleans the directory at the given path as a first step.**

### dirToCopy

Type: `String`
Default: same as workspace

Define directory within the workspace which should be deployed.

### deployTo

Type: `String`

Define the remote path where the project will be deployed. A directory `releases` is automatically created. A symlink `current` is linked to the current release.

### repositoryUrl

Type: `String`

Git URL of the project repository.

### branch

Type: `String`

Tag, branch or commit to deploy.

### ignores

Type: `Array<String>`

An array of paths that match ignored files. These paths are used in the rsync command.

### deleteOnRollback

Type: `Boolean`

Whether or not to delete the old release when rolling back to a previous release.

#### key

Type: `String`

Path to SSH key

### keepReleases

Type: `Number`

Number of releases to keep on the remote server.

### xdt

Type: `String`

 transform Web.config using xdt(Microsoft Xml Document Transformation). Default: ''

Example:

xdt = `Release`

```
 Web.config + Web.Release.config  -> Web.config

```

### shallowClone

Type: `Boolean`

Perform a shallow clone. Default: `false`.

###updateSubmodules

Type: `Boolean`

Update submodules. Default: `false`.

### gitLogFormat

Type: `String`

Log format to pass to [`git log`](http://git-scm.com/docs/git-log#_pretty_formats). Used to display revision diffs in `pending` task. Default: `%h: %s - %an`.

### copy

Type: `String`

Parameter to pass to `cp` to copy the previous release. Non NTFS filesystems support `-r`. Default: `-a`

## Variables

Several variables are attached during the deploy and the rollback process:

### shipit.config.*

All options described in the config sections are available in the `shipit.config` object.

### shipit.repository

Attached during `deploy:fetch` task.

You can manipulate the repository using git command, the API is describe in [gift](https://github.com/sentientwaffle/gift).

### shipit.releaseDirname

Attached during `deploy:update` and `rollback:init` task.

The current release dirname of the project, the format used is "YYYYMMDDHHmmss" (moment format).

### shipit.releasesPath

Attached during `deploy:init`, `rollback:init`, and `pending:log` tasks.

The remote releases path.

### shipit.releasePath

Attached during `deploy:update` and `rollback:init` task.

The complete release path : `path.join(shipit.releasesPath, shipit.releaseDirname)`.

### shipit.currentPath

Attached during `deploy:init`, `rollback:init`, and `pending:log` tasks.

The current symlink path : `path.join(shipit.config.deployTo, 'current')`.

### xbuild

#### buildTool
Type:`String`
Attached during `deploy:build` task.  default `msbuild`

options: `msbuild` or `xbuild`

#### solutionDir

Type: `String`

Attached during `deploy:build` task.

solution(*.sln) directory within the workspace

#### framework

Type: `String`

Attached during `deploy:build` task.

.net  framework version.

#### configuration

Type: `String`

Attached during `deploy:build` task.

xbuild configuration

#### csprojPath

Type: `String`

Attached during `deploy:build` task.

web.csproj within the workspace which should be deployed.

#### properties
Type:`Object`

extra properties

## Workflow tasks

the same with shipit-deploy

- deploy
  - deploy:init
    - Emit event "deploy".
  - deploy:fetch
    - Create workspace.
    - Initialize repository.
    - Add remote.
    - Fetch repository.
    - Checkout commit-ish.
    - Merge remote branch in local branch.
    - Emit event "fetched".
  - deploy:build
    - nuget restore.
    - xbuild csproj.
    - cp release contents & bin.
    - Emit event "builded".
  - deploy:update
    - Create and define release path.
    - Remote copy project.
    - Emit event "updated".
  - deploy:publish
    - Update symlink.
    - Emit event "published".
  - deploy:clean
    - Remove old releases.
    - Emit event "cleaned".
  - deploy:finish
    - Emit event "deployed".
- rollback
  - rollback:init
    - Define release path.
    - Emit event "rollback".
  - deploy:publish
    - Update symlink.
    - Emit event "published".
  - deploy:clean
    - Remove old releases.
    - Emit event "cleaned".
  - rollback:finish
    - Emit event "rollbacked".
- pending
  - pending:log
    - Log pending commits (diff between HEAD and currently deployed revision) to console.

## Dependencies

### Local

- git 1.7.8+
- rsync 3+
- OpenSSH 5+
- mono
- xamarin studio

## License

MIT


text:
class CAI_ASW_RangedAttackBehavior : public CAI_ASW_Behavior
{
	DECLARE_CLASS( CAI_ASW_RangedAttackBehavior, CAI_ASW_Behavior );

public:
	CAI_ASW_RangedAttackBehavior( );

	virtual BehaviorClass_T		Classify( void ) { return ( BehaviorClass_T )BEHAVIOR_CLASS_RANGED_ATTACK; }
	static	const char			*GetClassName() { return "behavior_rangedattack"; }
	virtual const char			*GetClassNameV() { return GetClassName(); }
	virtual const char			*GetName() { return "RangedAttack"; }

	static void		LevelInit( void );

	virtual bool	KeyValue( const char *szKeyName, const char *szValue );
	virtual void	Precache( void );
	virtual void	Init( );

	virtual bool 	CanSelectSchedule( );
	virtual void	GatherConditions( );
	virtual void	GatherConditionsNotActive( );

	virtual void	StartTask( const Task_t *pTask );
	virtual void	RunTask( const Task_t *pTask );

	virtual int		SelectSchedule( );

	virtual void	HandleBehaviorEvent( CBaseEntity *pInflictor, BehaviorEvent_t eEvent, int nParm );

	virtual bool	CanYieldTargetSlot() { return false; }			// this behavior won't yield target slot if it's primary

			Vector	&GetMissileLocation( ) { return m_vMissileLocation; }

	enum
	{
		SCHED_RANGED_MOVE_TO_FIRE_SPOT = BaseClass::NEXT_SCHEDULE,
		NEXT_SCHEDULE,

		TASK_RANGED_FIND_MISSILE_LOCATION = BaseClass::NEXT_TASK,
		TASK_RANGED_PREPARE_TO_FIRE,
		TASK_RANGED_FIRE,
		TASK_RANGED_FIRE_RECOVER,

		NEXT_TASK,
	};

	DEFINE_CUSTOM_SCHEDULE_PROVIDER;

protected:
	virtual void	GatherCommonConditions();

private:
	bool	FindFiringLocation();
	void	UpdateTargetLocation();
	bool	ValidateMissileLocation();

	float	m_flMinFiringDistance;
	float	m_flMaxFiringDistance;
	float	m_flMaxFiringDistanceSq;
	float	m_flProjectileVelocity;
	float	m_flFireRate;
	float	m_flGlobalShotDelay;
	CUtlString	m_strVolleyType;
	bool	m_bRadiusAttack;

	EHANDLE			m_hTarget;
	Vector			m_vMissileLocation;
	static float	s_flGlobalShotDeferUntil;
	float			m_flDeferUntil;

	DECLARE_DATADESC();
};

#endif // ASW_AI_BEHAVIOR_RANGED_ATTACK_H


text:
package attestlib

import (
	"crypto/ecdsa"
	"crypto/rsa"
	"crypto/sha256"
	"crypto/x509"
	"encoding/base64"
	"encoding/pem"
	"fmt"
	"github.com/pkg/errors"
)

const rsaPkcs1Key = "RSA PRIVATE KEY"
const ecPkcs1Key = "EC PRIVATE KEY"
const pkcs8Key = "PRIVATE KEY"

func parsePkixPrivateKeyPem(privateKey []byte) (interface{}, error) {
	der, rest := pem.Decode(privateKey)

	if len(rest) != 0 {
		return nil, errors.New("expected one public key")
	}
	switch der.Type {
	case rsaPkcs1Key:
		key, err := x509.ParsePKCS1PrivateKey(der.Bytes)
		if err != nil {
			return nil, errors.Wrap(err, "failed to parse rsa pkcs1 private key")
		}
		return key, nil
	case ecPkcs1Key:
		key, err := x509.ParseECPrivateKey(der.Bytes)
		if err != nil {
			return nil, errors.Wrap(err, "failed to parse ecdsa pkcs1 private key")
		}
		return key, nil
	case pkcs8Key:
		key, err := x509.ParsePKCS8PrivateKey(der.Bytes)
		if err != nil {
			return nil, errors.Wrap(err, "failed to parse pkcs8 private key")
		}
		return key, nil
	default:
		return nil, errors.New("unexpected key type")
	}
}

// key should be of type *rsa.PrivateKey, *ecdsa.PrivateKey or []byte. If []byte the key should be a public key.
func generatePkixPublicKeyId(key interface{}) (string, error) {
	switch key.(type) {
	case *rsa.PrivateKey:
		rsaKey := key.(*rsa.PrivateKey)
		publicKeyMaterial, err := x509.MarshalPKIXPublicKey(&rsaKey.PublicKey)
		if err != nil {
			return "", errors.Wrap(err, "marshal rsa public key error")
		}
		dgst := sha256.Sum256(publicKeyMaterial)
		base64Dgst := base64.RawURLEncoding.EncodeToString(dgst[:])
		return fmt.Sprintf("ni:///sha-256;%s", base64Dgst), nil
	case *ecdsa.PrivateKey:
		ecKey := key.(*ecdsa.PrivateKey)
		publicKeyMaterial, err := x509.MarshalPKIXPublicKey(&ecKey.PublicKey)
		if err != nil {
			return "", errors.Wrap(err, "marshal ecdsa public key error")
		}
		dgst := sha256.Sum256(publicKeyMaterial)
		base64Dgst := base64.RawURLEncoding.EncodeToString(dgst[:])
		return fmt.Sprintf("ni:///sha-256;%s", base64Dgst), nil
	case []byte:
		der, rest := pem.Decode(key.([]byte))
		if len(rest) != 0 {
			return "", errors.New("expected one public key")
		}
		dgst := sha256.Sum256(der.Bytes)
		base64Dgst := base64.RawURLEncoding.EncodeToString(dgst[:])
		return fmt.Sprintf("ni:///sha-256;%s", base64Dgst), nil
	default:
		return "", errors.New("unexpected key type")
	}
}


text:
__author__ = 'AVIRAM'

#sys.path.insert(0, 'lib')  #we need this line in order to make libraries imported from lib folder work properly
import requests  #Used for http requests
import symbol

symbol2=["SP","NSDQ","DAX","GOLD","C.OIL"]
priceForIndex=[50,20,25,500,100]

def calculatingRisk(symbolInput,enterPri,stopPri,vol,type):#(type=1-long, type=0-short)
    if (type==1):#long
        sumPoint=enterPri-stopPri
    else:#short
        sumPoint=stopPri-enterPri

    priceForPoint=symbol.Symbol.getPrice(symbolInput)#get the price from date store

    '''
    for x in  range(len(symbol2)):
        if (symbol2[x]==symbolInput):
            risk=sumPoint*vol*priceForIndex[x]
    '''
    risk=sumPoint*vol*priceForPoint

    return risk

#print(calculatingRisk("SP",100,90,1,1))


text:
from twisted.internet import defer

from synapse.events.utils import prune_event

from synapse.crypto.event_signing import check_event_content_hash

from synapse.api.errors import SynapseError

from synapse.util import unwrapFirstError

import logging

logger = logging.getLogger(__name__)

class FederationBase(object):
    @defer.inlineCallbacks
    def _check_sigs_and_hash_and_fetch(self, origin, pdus, outlier=False):
        """Takes a list of PDUs and checks the signatures and hashs of each
        one. If a PDU fails its signature check then we check if we have it in
        the database and if not then request if from the originating server of
        that PDU.

        If a PDU fails its content hash check then it is redacted.

        The given list of PDUs are not modified, instead the function returns
        a new list.

        Args:
            pdu (list)
            outlier (bool)

        Returns:
            Deferred : A list of PDUs that have valid signatures and hashes.
        """

        signed_pdus = []

        @defer.inlineCallbacks
        def do(pdu):
            try:
                new_pdu = yield self._check_sigs_and_hash(pdu)
                signed_pdus.append(new_pdu)
            except SynapseError:
                # FIXME: We should handle signature failures more gracefully.

                # Check local db.
                new_pdu = yield self.store.get_event(
                    pdu.event_id,
                    allow_rejected=True,
                    allow_none=True,
                )
                if new_pdu:
                    signed_pdus.append(new_pdu)
                    return

                # Check pdu.origin
                if pdu.origin != origin:
                    try:
                        new_pdu = yield self.get_pdu(
                            destinations=[pdu.origin],
                            event_id=pdu.event_id,
                            outlier=outlier,
                            timeout=10000,
                        )

                        if new_pdu:
                            signed_pdus.append(new_pdu)
                            return
                    except:
                        pass

                logger.warn(
                    "Failed to find copy of %s with valid signature",
                    pdu.event_id,
                )

        yield defer.gatherResults(
            [do(pdu) for pdu in pdus],
            consumeErrors=True
        ).addErrback(unwrapFirstError)

        defer.returnValue(signed_pdus)

    @defer.inlineCallbacks
    def _check_sigs_and_hash(self, pdu):
        """Throws a SynapseError if the PDU does not have the correct
        signatures.

        Returns:
            FrozenEvent: Either the given event or it redacted if it failed the
            content hash check.
        """
        # Check signatures are correct.
        redacted_event = prune_event(pdu)
        redacted_pdu_json = redacted_event.get_pdu_json()

        try:
            yield self.keyring.verify_json_for_server(
                pdu.origin, redacted_pdu_json
            )
        except SynapseError:
            logger.warn(
                "Signature check failed for %s",
                pdu.event_id,
            )
            raise

        if not check_event_content_hash(pdu):
            logger.warn(
                "Event content has been tampered, redacting.",
                pdu.event_id,
            )
            defer.returnValue(redacted_event)

        defer.returnValue(pdu)


text:
package gr.forth.ics.graph.algo;

import gr.forth.ics.graph.Direction;
import gr.forth.ics.graph.Graphs;
import gr.forth.ics.graph.InspectableGraph;
import gr.forth.ics.graph.Node;
import gr.forth.ics.graph.path.Path;
import java.util.*;
import gr.forth.ics.util.DVMap;

class ConnectedComponents extends Dfs implements Clusterer {
    private final Map<Object, Collection<Node>> components
            = DVMap.newLinkedHashMapWithLinkedLists();
    private final Object MARK = new Object();

    private ConnectedComponents(InspectableGraph graph) {
        super(graph, Direction.EITHER);
    }

    private ConnectedComponents(InspectableGraph graph, Node startNode) {
        super(graph, startNode, Direction.EITHER);
    }

    static ConnectedComponents execute(InspectableGraph g) {
        ConnectedComponents cc = new ConnectedComponents(g);
        cc.execute();
        return cc;
    }

    static ConnectedComponents execute(InspectableGraph g, Node startNode) {
        ConnectedComponents cc = new ConnectedComponents(Graphs.undirected(g), startNode);
        cc.execute();
        return cc;
    }

    public Iterator<Collection<Node>> iterator() {
        return Collections.unmodifiableMap(components).values().iterator();
    }

    public Collection<Node> getCluster(Object cluster) {
        if (!components.containsKey(cluster)) {
            return Collections.emptyList();
        }
        return Collections.unmodifiableCollection(components.get(cluster));
    }

    public Set<Object> getClusters() {
        return Collections.unmodifiableSet(components.keySet());
    }

    @Override public boolean visitPre(Path path) {
        Node node = path.tailNode();
        Object tree = getComponentIdentifier(node);
        Collection<Node> component = components.get(tree);
        component.add(node);
        node.putWeakly(MARK, tree);
        return false;
    }

    public Object findClusterOf(Node node) {
        return getComponentIdentifier(node);
    }

    @Override
    public String toString() {
        return "[Components: " + components.values() + "]";
    }
}


text:
import { Component, OnInit } from '@angular/core';
import { Router } from '@angular/router';
import { AuthService } from '../../services';
import { MdDialogRef, MdSnackBar } from '@angular/material';
import { LoadingAnimateService } from 'ng2-loading-animate';

@Component({
  selector: 'app-forgot',
  templateUrl: './forgot.component.html',
  styleUrls: ['./forgot.component.css'],
  providers : [AuthService]
})
export class ForgotComponent implements OnInit {

  email : string;

  constructor(
    private authService : AuthService,
    private dialogRef : MdDialogRef<ForgotComponent>,
    private loading : LoadingAnimateService,
    private snackbar : MdSnackBar,
    private router : Router
    ) { }

  ngOnInit() {
  }

  sendToken(){
    this.loading.setValue(true);

    this.authService.sendPasswordToken(this.email)
      .subscribe(
        () => {
          //console.log('GUAY');
          this.loading.setValue(false);
          this.dialogRef.close();
          this.snackbar.open('Token enviado con éxito. Revisa tu correo.', 'CERRAR', { duration : 2500 })
            .afterDismissed()
            .subscribe( () => {
              this.router.navigateByUrl('/');
            });
        },
        err => {
          //console.log(err);
          this.loading.setValue(false);
          this.snackbar.open('Hubo algún fallo enviando el token.', 'CERRAR', { duration : 2500 })
        }
      );
  }

}


text:
window.onload = loop;

const ecs = new Ecs();

function Vector(x, y) {
  this.x = x;
  this.y = y;
}

// Components
ecs.registerComponent('position', Vector);

ecs.registerComponent('velocity', Vector);

ecs.registerComponent('rectangle', function(width = 5, height = 5) {
  this.width = width;
  this.height = height;
});

ecs.registerComponent('color');

// Systems
ecs.registerSystem({
  group: 'model',
  has: ['position', 'velocity'],
  forEach({ position, velocity }, dt) {
    position.x += velocity.x * dt;
    position.y += velocity.y * dt;
  },
});

ecs.registerSystem({
  group: 'model',
  has: ['position'],
  forEach(entity) {
    const { position } = entity;
    const isOffScreen =
      position.y > view.canvas.height || position.x > view.canvas.width;

    if (isOffScreen) {
      entity.destroy();
    }
  },
});

ecs.registerSystem({
  group: 'graphics',
  has: ['position', 'rectangle', 'color'],
  pre({ ctx, canvas }) {
    ctx.clearRect(0, 0, canvas.width, canvas.height);
  },
  forEach({ position, rectangle, color }, { ctx }) {
    const { x, y } = position;
    const { width, height } = rectangle;
    ctx.fillStyle = color.value;
    ctx.fillRect(x, y, width, height);
  },
});

function createMeteorite() {
  const startX = Math.random() * view.canvas.width;
  ecs.createEntity().addMultiple([
    ['position', startX, 0],
    ['velocity', 20, 50],
    ['rectangle'], // default values
    ['color', 'black'],
  ]);
}

function createSnowFlake() {
  const startX = Math.random() * view.canvas.width;
  ecs
    .createEntity()
    .addMultiple([
      ['position', startX, 0],
      ['velocity', 0, 5],
      ['rectangle', 1, 2],
      ['color', 'white'],
    ]);
}

const view = {
  canvas: document.querySelector('canvas'),
  ctx: document.querySelector('canvas').getContext('2d'),
};

function loop() {
  const tickTime = 0.016;

  createSnowFlake();

  if (Math.random() > 0.9) createMeteorite();

  ecs.runGroup('model', tickTime);
  ecs.runGroup('graphics', view);

  requestAnimationFrame(loop);
}


text:
/* $Id: EAFLib.C,v 1.12 2003-10-28 22:11:36 wilsonp Exp $ */
#include "EAFLib.h"
#include "DataLib/ALARALib/ALARALib_def.h"

EAFLib::EAFLib(const char *transFname, const char *decayFname, const char *alaraFname)
  : ASCIILib(DATALIB_EAF)
{
  if (transFname != NULL && decayFname != NULL)
    {
      inTrans.open(searchNonXSPath(transFname), ios::in);
      inDecay.open(searchNonXSPath(decayFname), ios::in);

      makeBinLib(alaraFname);
    }

}

EAFLib::~EAFLib()
{
  /* delete arrays here that were dimensioned with
   * EAF relevant constants */
  int rxnNum;

  for (rxnNum=0;rxnNum<MAXEAFRXNS;rxnNum++)
    {
      delete xSection[rxnNum];
      delete emitted[rxnNum];
    }
  delete xSection;
  delete emitted;
  delete transKza;

  delete decayKza;
  delete bRatio;

  inTrans.close();
  inDecay.close();
}

void EAFLib::extract(char* input, float* value)
{
  char section[32];

  /* find beginning of exponent */
  int expStart = strcspn(input,"+-");

  /* extract mantissa portion to string variable */
  strncpy(section,input,expStart);
  section[expStart] = '\0';

  /* read the mantissa of the number */
  float Man = atof(section);

  /* extract exponent portion to string variable */
  strncpy(section,input+expStart,3);
  section[3] = '\0';

  /* read the exponent */
  int Exp = atoi(section);

  /* return the value */
  *value = Man*pow(10,Exp);
  return;
}

int EAFLib::delKza(float rxnType)
{
  int baseType = int(rxnType);
  int otherType = int((rxnType-baseType)*10);

  int result;

  switch (baseType)
    {
    case 1:
      result = -1000;
      break;
    case 2:
      result = 1000;
      break;
    case 3:
      result = 0;
      break;
    case 4:
      result = 2004;
      break;
    case 5:
      result = 1;
      break;
    case 7:
      result = 1001;
      break;
    }

  switch (otherType)
    {
    case 1:
      result += -1000;
      break;
    case 2:
      result += 1000;
      break;
    case 3:
      result += 0;
      break;
    case 4:
      result += 2004;
      break;
    case 5:
      result += 1;
      break;
    case 7:
      result += 1001;
      break;
    }

  return result;
}

/************************************
 ******* Trans data handling ********
 ***********************************/

/* read the head of the file and get the following info:
 *  - Title
 *  - nGroups
 *  - group bound text description
 *  - group boundaries
 *  - group weighting
 * and then advance to first isotope */
void EAFLib::getTransInfo()
{
  int strPos, rxnNum;
  char buffer[MAXLINELENGTH];

  /* find title line */
  inTrans.getline(buffer,MAXLINELENGTH);
  inTrans.getline(transTitle,MAXLINELENGTH);

  /* set correct length of title card for index file */
  if (strlen(transTitle)<76)
    for (strPos=strlen(transTitle);strPos<76;strPos++)
      transTitle[strPos] = ' ';
  /* truncate to make room for number of parents */
  transTitle[76] = '\0';
  /* parse number of groups from title card */
  nGroups = atoi(strstr(transTitle,"Gp")-3);

  grpBnds = NULL;
  grpWeights = NULL;
  /* looking for last comment card */
  inTrans.getline(buffer,MAXLINELENGTH);
  while (buffer[0] != '#')
    inTrans.getline(buffer,MAXLINELENGTH);

  /* initialize arrays */
  transKza = new int[MAXEAFRXNS];
  memCheck(transKza,"EAFLib::getTransInfo(...): transKza");

  xSection = new float*[MAXEAFRXNS];
  memCheck(xSection,"EAFLib::getTransInfo(...): xSection");

  emitted = new char*[MAXEAFRXNS];
  memCheck(emitted,"EAFLib::getTransInfo(...): emitted");

  for (rxnNum=0;rxnNum<MAXEAFRXNS;rxnNum++)
    {
      xSection[rxnNum] = new float[nGroups+1];
      memCheck(xSection[rxnNum],"EAFLib::getTransInfo(...): xSection[n]");

      xSection[rxnNum][nGroups] = 0;

      emitted[rxnNum] = new char[6];
      memCheck(emitted[rxnNum],"EAFLib::getTransInfo(...): emitted[n]");
    }

}

void EAFLib::readReaction(int& rxnNum, int zak )
{

  /* for forming kza of daughter isotope */
  char daugIsoF,daugIsoC,daugSym[5]=" ";
  int daugIsoN,daugNum;

  char buffer[MAXLINELENGTH];

  int nEntries,gNum;

  /* increment reaction counter */
  rxnNum++;

  /* read a line from input file */
  inTrans.getline(buffer,MAXLINELENGTH);

  /* parse input */
  /* [reaction code] [x-section entries]
   * [symbol][mass #][Isomeric Flag][Isomer #](N,[emitted particles])
   * [daughter symbol][duaghter mass#][daughter Iso. Flag][daughter Iso. #] */
  sscanf(buffer,"%*d %d %*2s %*d%*c%*c(N,%3s )%2s %d%c%c",
	 &nEntries,emitted[rxnNum],daugSym+1,&daugNum,&daugIsoF,
	 &daugIsoC);

  debug(6,"Found reaction with %d entries, %d(n,%s)%s %d ,%c,%c.",nEntries,zak,emitted[rxnNum],daugSym+1,daugNum,daugIsoF,daugIsoC);

  if (daugIsoF == 'M')
    strcat(emitted[rxnNum],"*");

  /* expand to correct length: daugSym[4] */
  if (daugSym[2] == '\0')
    {
      daugSym[2] = ' ';
    }
  daugSym[3] = ' ';
  daugSym[4] = '\0';

  /* clear two comment lines */
  inTrans.getline(buffer,MAXLINELENGTH);
  inTrans.getline(buffer,MAXLINELENGTH);

  debug(6,"Reading xsection %d for %d.",rxnNum,zak);

  /* read x-section entries */
  for (gNum=0;gNum<nEntries;gNum++)
    inTrans >> xSection[rxnNum][gNum];

  /* set all non-entry groups */
  for (;gNum<nGroups;gNum++)
    xSection[rxnNum][gNum] = xSection[rxnNum][nEntries-1];

  /* parse daughter */
  if (daugIsoF == 'M')
    daugIsoN = daugIsoC - '0';
  else
    daugIsoN = 0;
  daugSym[1] = tolower(daugSym[1]);
  daugSym[2] = tolower(daugSym[2]);
  int Z = (strstr(SYMBOLS,daugSym)-SYMBOLS)/3 + 1;
  transKza[rxnNum] = (Z*1000+daugNum)*10 + daugIsoN;

}

/* read a block of data for the next isotope
 * return data:
 *  - kza
 *  - nTRxns
 *  - xSection[]
 *  - transKza[]
 *  - emitted[]
 */
int EAFLib::getTransData()
{

  static int zak = 0;

  /* parent isotope specifics parameters */
  int rxnNum;
  int oldZak;

  /* counters */
  int gNum;
  unsigned int eNum;

  /* for tracking gas production */
  const int numGases = 5;
  int mult,gasNum,gasFlag[numGases];
  int gasKza[numGases]={10030,10020,10010,20040,20030};
  const char *gasList = "tdpah";
  const char *gasEmitted = "x    ";
  static float *gas[numGases]={NULL,NULL,NULL,NULL,NULL};

  if (gas[0] == NULL)
      for (gasNum=0;gasNum<numGases;gasNum++)
	{
	  gas[gasNum] = new float[nGroups];
	  memCheck(gas[gasNum],"EAFLib::getTransData(...): gas[n]");
	}

  /* first time into this routine */
  if (zak == 0)
    /* read modified kza number */
    inTrans >> zak;
  else if (zak == -1)
    {
      debug(5,"End of transmutation file.");
      return LASTISO;
    }

  debug(5,"Found isotope with zak: %d",zak);

  /* used to make sure we are still
   * reading reactions for the
   * current isotope */
  oldZak = zak;

  /* initialize reaction counter */
  rxnNum=-1;

  for (gasNum=0;gasNum<numGases;gasNum++)
    {
      /* initialize the gas production flags */
      gasFlag[gasNum] = 0;

      /* initialize gas production xsections */
      for (gNum=0;gNum<nGroups;gNum++)
	gas[gasNum][gNum] = 0;
    }

  debug(6,"Reading through reaction paths for %d",zak);
  /* while this is still the same isotope */
  while (zak==oldZak)
    {
      /* read everything we need to know from the input file */
      readReaction(rxnNum, zak);

      /* parse emitted particles */
      /* create a total production cross-section */
      for (eNum=0;eNum<strlen(emitted[rxnNum]);eNum++)
	{
	  emitted[rxnNum][eNum] = tolower(emitted[rxnNum][eNum]);
	  mult=1;
	  /* if this is not the first character AND
	   * the previous character is a digit */
	  if (eNum>0 && isdigit(emitted[rxnNum][eNum-1]))
	    /* determine how many are produced */
	    mult=atoi(emitted[rxnNum]+eNum-1);
	  /* based on which character this is */
	  gasNum = strchr(gasList,emitted[rxnNum][eNum])-gasList;
	  if (gasNum>=0)
	    {
	      gasFlag[gasNum] = 1;
	      for (gNum=0;gNum<nGroups;gNum++)
		gas[gasNum][gNum] += mult*xSection[rxnNum][gNum];
	    }
	}

      inTrans >> zak;

      /* get next modified kza number */
      if (inTrans.eof())
	zak = -1;

      /* if fission x-section, dismiss */
      if (tolower(emitted[rxnNum][0]) == 'f')
	{
	  rxnNum--;
	  continue;
	}
    }

  /* put all data into correct variables and arrays */
  nTRxns = rxnNum+1;

  for (gasNum=0;gasNum<numGases;gasNum++)
    if (gasFlag[gasNum])
      {
	for(gNum=0;gNum<nGroups;gNum++)
	  xSection[nTRxns][gNum] = gas[gasNum][gNum];
	transKza[nTRxns] = gasKza[gasNum];
	strcpy(emitted[nTRxns],gasEmitted);
	nTRxns++;
      }

  debug(5,"Found %d reaction paths for %d.",nTRxns,oldZak);

  return oldZak;
}

/************************************
 ******* Decay data handling ********
 ***********************************/

/* read the head of the file and get the following info:
 *  - Title
 * and then advance to first isotope */
void EAFLib::getDecayInfo()
{

  char buffer[MAXLINELENGTH];
  int junkInt,i;

  /* read number of initial comment lines */
  inDecay >> junkInt;

  /* read end of this line and comment lines */
  for (i=0;i<=junkInt;i++)
    inDecay.getline(buffer,MAXLINELENGTH);

  decayKza = new int[MAXEAFDCYMODES];
  memCheck(decayKza,"EAFLib::getDecayInfo(...): decayKza");

  bRatio = new float[MAXEAFDCYMODES];
  memCheck(bRatio,"EAFLib::getDecayInfo(...): bRatio");

}

/* read a block of data for the next isotope
 * return data:
 *  - kza
 *  - nDRxns
 *  - nIons
 *  - thalf
 *  - decayKza[]
 *  - E[]
 *  - bratio[]
 */
int EAFLib::getDecayData()
{
  char buffer[MAXLINELENGTH];
  int MT, isoFlag, zak;
  float inFlt, rxnType;
  int pFlag, aFlag, decyNum, numDecayEnergies;
  float pBranch, aBranch, dIsoFlag;

  do
    {
      /* scan for first 457 card */
      inDecay.getline(buffer,MAXLINELENGTH);
      /* extract the MT number of this line */
      buffer[75] = '\0';
      MT = atoi(buffer+72);
    } while (MT != 457 && !inDecay.eof());

  if (inDecay.eof())
    {
      debug(5,"End of Decay file.");
      return LASTISO;
    }

  /* extract the number of radiation spectra */
  buffer[66] = '\0';
  numSpec = atoi(buffer+55);
  /* extract the za number of the isotope */
  buffer[44] = '\0';
  isoFlag = atoi(buffer+33);
  extract(buffer,&inFlt);
  zak = int(inFlt+0.1)*10 + isoFlag;

  debug(5,"Found decay data for %d.",zak);
  /* read line */
  /* thalf */
  inDecay.getline(buffer,MAXLINELENGTH);
  /* extract data */
  extract(buffer,&thalf);
  numDecayEnergies=atoi(buffer+44)/2;

  /* read line */
  /* betaA --> gammaE --> alphaE */
  inDecay.getline(buffer,MAXLINELENGTH);
  /* extract data */
  extract(buffer,E);
  extract(buffer+22,E+1);
  extract(buffer+44,E+2);
  if (numDecayEnergies > 3)
    {
      inDecay.getline(buffer,MAXLINELENGTH);
      inDecay.getline(buffer,MAXLINELENGTH);
      inDecay.getline(buffer,MAXLINELENGTH);
      inDecay.getline(buffer,MAXLINELENGTH);
      inDecay.getline(buffer,MAXLINELENGTH);
    }

  /* read line */
  /* --> numDecyRxn */
  inDecay.getline(buffer,MAXLINELENGTH);
  /* extract data */
  buffer[66] = '\0';
  nDRxns = atoi(buffer+55);

  debug(6,"Found %d decay branches for %d.",nDRxns,zak);

  pFlag=0;
  aFlag=0;
  aBranch=0;
  pBranch=0;
  /* for each decay mode */
  for (decyNum=0;decyNum<nDRxns;decyNum++)
    {
      /* read line */
      /* rxnType --> daughter's isomeric state --> branching ratio */
      inDecay.getline(buffer,MAXLINELENGTH);
      /* extract data */
      extract(buffer,&rxnType);
      extract(buffer+11,&dIsoFlag);
      extract(buffer+44,bRatio+decyNum);

      /* set daughter kza based on reaction type*/
      decayKza[decyNum] = (zak/10 - delKza(rxnType))*10
	+ int(dIsoFlag);
      /* if this is a proton producing reaction */
      if (int(rxnType) == 7)
	{
	  pFlag = 1;
	  pBranch += bRatio[decyNum];
	}
      /* if this is an alpha producing reaction */
      else if (int(rxnType) == 4 || int(rxnType*10)%10 == 4)
	{
	  aFlag = 1;
	  aBranch += bRatio[decyNum];
	}
      /* spontaneous fission */
      else if (int(rxnType) == 6)
	{
	  decyNum--;
	  nDRxns--;
	}

    }

  /* put all data in correct variables and arrays */
  /* write alpha and proton production rates */
  nIons = 0;
  if (pFlag)
    {
      decayKza[nDRxns] = 10010;
      bRatio[nDRxns] = pBranch;
      nDRxns++;
      nIons++;
    }

  if (aFlag)
    {
      decayKza[nDRxns] = 20040;
      bRatio[nDRxns] = aBranch;
      nDRxns++;
      nIons++;
    }
  if (numSpec != 0)
    numSpec = getGammaData();

  /* skip to end of this file section */
  do
    {
      /* scan for last 457 card */
      inDecay.getline(buffer,MAXLINELENGTH);
      /* extract the MT number of this line */
      buffer[75] = '\0';
      MT = atoi(buffer+72);
    } while (MT == 457 && !inDecay.eof());

  debug(6,"Returning %d decay branches for %d.",nDRxns,zak);

  return zak;
}

/************************************
 ******* Gamma data handling ********
 ***********************************/

void EAFLib::skipDiscreteGammas(char* buffer, int numGammas)
{
  int gammaNum, numParms;

  /* for each discrete gamma */
  for (gammaNum=0;gammaNum<numGammas;gammaNum++)
    {
      /* read first line */
      inDecay.getline(buffer,MAXLINELENGTH);
      /* get number of parameters */
      buffer[55] = '\0';
      numParms = atoi(buffer+44);
      /* skip next line */
      inDecay.getline(buffer,MAXLINELENGTH);
      /* if necessary */
      if (numParms>6)
	/* skip another line */
	inDecay.getline(buffer,MAXLINELENGTH);
    }
}

void EAFLib::skipContGammas(char *buffer)
{
  int numPnts, numReg, covFlag;
  int regNum,pntNum;

  /* skip line */
  inDecay.getline(buffer,MAXLINELENGTH);
  /* read covariance flag -->
   * number of interpolation regions -->
   * number of interpolations points */
  buffer[66] = '\0';
  numPnts = atoi(buffer+55);
  buffer[55] = '\0';
  numReg = atoi(buffer+44);
  buffer[44] = '\0';
  covFlag = atoi(buffer+33);
  /* skip one line for every three interpolation regions */
  for (regNum=0;regNum<numReg;regNum+=3)
    inDecay.getline(buffer,MAXLINELENGTH);
  /* skip one line for every three data points */
  for (pntNum=0;pntNum<numPnts;pntNum+=3)
    inDecay.getline(buffer,MAXLINELENGTH);

  if (covFlag>0)
    {
      inDecay.getline(buffer,MAXLINELENGTH);
      /* read number of points in table */
      buffer[66] = '\0';
      numPnts = atoi(buffer+55);
      /* skip one line for every three data points */
      for (pntNum=0;pntNum<numPnts;pntNum+=3)
	inDecay.getline(buffer,MAXLINELENGTH);
    }
}

void EAFLib::readDiscreteGammas(int specNum, int numGammas,
				float discFactor, char *buffer )
{
  int gammaNum;
  int numParms;
  float gammaE, gammaI;

  numDisc[specNum] = numGammas;
  discGammaE[specNum] = new float[numGammas];
  discGammaI[specNum] = new float[numGammas];

  /* read new list of gamma energy and intensities */
  for (gammaNum=0;gammaNum<numGammas;gammaNum++)
    {
      /* extract gamma energy */
      inDecay.getline(buffer,MAXLINELENGTH);
      extract(buffer,&gammaE);
      buffer[55] = '\0';
      numParms = atoi(buffer+44);

      /* extract gamma intensity */
      inDecay.getline(buffer,MAXLINELENGTH);
      extract(buffer+22,&gammaI);

      /* throw away extra line if necessary */
      if (numParms>6)
	inDecay.getline(buffer,MAXLINELENGTH);

      discGammaE[specNum][gammaNum] = gammaE;
      discGammaI[specNum][gammaNum] = gammaI*discFactor;
    }
}

void EAFLib::readContGammas(int specNum, float contFactor, char* buffer)
{
  int regNum, pntNum;
  int numPnts, numReg, covFlag;
  int b[3],t[3];
  float x, y;

  /* read covariance flag... */
  inDecay.getline(buffer,MAXLINELENGTH);
  /* read covariance flag -->
   * number of interpolation regions -->
   * number of interpolations points */
  buffer[66] = '\0';
  numPnts = atoi(buffer+55);
  buffer[55] = '\0';
  numReg = atoi(buffer+44);
  buffer[44] = '\0';
  covFlag = atoi(buffer+33);

  /* read interpolation regions */
  nIntReg[specNum] = numReg;
  intRegB[specNum] = new int[numReg];
  intRegT[specNum] = new int[numReg];

  /* read each interpolation region */
  for (regNum=0;regNum<numReg;)
    {
      /* record first regNum for this input line */
      int lineStart = regNum;
      /* read this line */
      inDecay.getline(buffer,MAXLINELENGTH);
      /* extract region boundaries and interpolation types */
      buffer[66] = '\0';
      sscanf(buffer,"%d %d %d %d %d %d",b,t,b+1,t+1,b+2,t+2);
      /* for each region on this line */
      for (;regNum<lineStart+3 && regNum<numReg;regNum++)
	{
	  /* set the data */
	  intRegB[specNum][regNum] = b[regNum-lineStart];
	  intRegT[specNum][regNum] = t[regNum-lineStart];
	}
    }

  /* read the interpolation table */
  nPnts[specNum] = numPnts;
  contX[specNum] = new float[numPnts];
  contY[specNum] = new float[numPnts];

  /* read each interpolation point */
  for (pntNum=0;pntNum<numPnts;)
    {
      /* record first pntNum for this input line */
      int lineStart = pntNum;
      /* read this line */
      inDecay.getline(buffer,MAXLINELENGTH);
      buffer[66] = '\0';
      /* extract spectrum table data */
      /* for each point on this line */
      for (;pntNum<lineStart+3 && pntNum<numPnts;pntNum++)
	{
	  extract(buffer+22*(pntNum-lineStart),&x);
	  extract(buffer+11+22*(pntNum-lineStart),&y);
	  /* set the data */
	  contX[specNum][pntNum] = x;
	  contY[specNum][pntNum] = y*contFactor;
	}
    }

  /* skip covariance data */
  if (covFlag>0)
    {
      inDecay.getline(buffer,MAXLINELENGTH);
      /* read number of points in table */
      buffer[66] = '\0';
      numPnts = atoi(buffer+55);
      /* skip one line for every three data points */
      for (pntNum=0;pntNum<numPnts;pntNum+=3)
	inDecay.getline(buffer,MAXLINELENGTH);
    }
}

int EAFLib::getGammaData()
{

  char buffer[MAXLINELENGTH];
  int specNum, numGammas, specType;
  float radType, discFactor, contFactor;
  int numGSpec = 0;

  nIntReg = new int[numSpec];
  intRegB = new int*[numSpec];
  intRegT = new int*[numSpec];
  nPnts = new int[numSpec];
  contX = new float*[numSpec];
  contY = new float*[numSpec];
  numDisc = new int[numSpec];
  discGammaE = new float*[numSpec];
  discGammaI = new float*[numSpec];

  /* for each spectrum */
  for (specNum=0;specNum<numSpec;specNum++)
    {
      /* read line */
      /* --> decay type, data type --> number of discrete values */
      inDecay.getline(buffer,MAXLINELENGTH);
      /* extract data */
      buffer[66] = '\0';
      /* get the spectrum type */
      extract(buffer+11,&radType);

      /* read spectrum type and number of discrete spectra */
      buffer[66] = '\0';
      numGammas = atoi(buffer+55);
      buffer[33] = '\0';
      specType = atoi(buffer+22);

      /* read normalization constants */
      inDecay.getline(buffer,MAXLINELENGTH);
      buffer[66] = '\0';
      extract(buffer,&discFactor);
      extract(buffer+44,&contFactor);

      /* it is possible that the ENDF entry is all zeros,
       * in which case, skip this spectrum */
      if ( (discFactor == 0.0 || numGammas == 0) && (specType == 0.0 || contFactor == 0.0) )
	radType = 1;

      /* if this is not a gamma spectrum or an x-ray spectrum entry */
      if ( (int(radType) != 0) && (int(radType) != 9) )
	{
	  skipDiscreteGammas(buffer,numGammas);
	  if (specType>0)
	    skipContGammas(buffer);
	}
      /* this is a gamma spectrum entry */
      else
	{
	  /* read this spectrum */
	  /* read discrete entries */
	  numDisc[numGSpec] = 0;
	  discGammaE[numGSpec] = NULL;
	  discGammaI[numGSpec] = NULL;

	  if (numGammas > 0 )
	    {
	    /* if there are valid discrete gammas */
	    if (discFactor > 0 )
	      readDiscreteGammas(numGSpec,numGammas,discFactor,buffer);
	    else
	      skipDiscreteGammas(buffer,numGammas);
	    }

	  nIntReg[numGSpec] = 0;
	  intRegB[numGSpec] = NULL;
	  intRegT[numGSpec] = NULL;
	  nPnts[numGSpec] = 0;
	  contX[numGSpec] = NULL;
	  contY[numGSpec] = NULL;

	  /* read continuous data */
	  if (specType>0)
	    {
	    /* if the scaling factor is non-zero */
	    if (contFactor>0)
	      readContGammas(numGSpec,contFactor,buffer);
	    else
	      skipContGammas(buffer);
	    }

	  /* increment gamma spectra counter */
	  numGSpec++;
	}
    }

  if (numGSpec == 0)
    {
      delete numDisc;
      delete nIntReg;
      delete nPnts;
      delete discGammaE;
      delete discGammaI;
      delete intRegB;
      delete intRegT;
      delete contX;
      delete contY;
    }

  return numGSpec;
}


text:
' Copyright (c) Microsoft.  All Rights Reserved.  Licensed under the Apache License, Version 2.0.  See License.txt in the project root for license information.

Imports System.Collections.Concurrent
Imports System.Collections.Generic
Imports System.Collections.Immutable
Imports System.Runtime.InteropServices
Imports System.Threading
Imports Microsoft.CodeAnalysis.RuntimeMembers
Imports Microsoft.CodeAnalysis.Text
Imports Microsoft.CodeAnalysis.VisualBasic.Symbols
Imports Microsoft.CodeAnalysis.VisualBasic.Syntax
Imports Roslyn.Utilities
Imports TypeKind = Microsoft.CodeAnalysis.TypeKind

Namespace Microsoft.CodeAnalysis.VisualBasic

    ''' <summary>
    ''' A source module binder provides the context associated with a source module.
    ''' </summary>
    Friend Class SourceModuleBinder
        Inherits Binder

        Private ReadOnly _sourceModule As SourceModuleSymbol

        Public Sub New(containingBinder As Binder, sourceModule As SourceModuleSymbol)
            MyBase.New(containingBinder, sourceModule, sourceModule.ContainingSourceAssembly.DeclaringCompilation)
            _sourceModule = sourceModule
        End Sub

        Public Overrides Function CheckAccessibility(sym As Symbol,
                                                     <[In], Out> ByRef useSiteDiagnostics As HashSet(Of DiagnosticInfo),
                                                     Optional accessThroughType As TypeSymbol = Nothing,
                                                     Optional basesBeingResolved As ConsList(Of Symbol) = Nothing) As AccessCheckResult
            Return If(IgnoresAccessibility,
                AccessCheckResult.Accessible,
                AccessCheck.CheckSymbolAccessibility(sym, _sourceModule.ContainingSourceAssembly, useSiteDiagnostics, basesBeingResolved))  ' accessThroughType doesn't matter at assembly level.
        End Function

        Public Overrides Function GetErrorSymbol(name As String,
                                                 errorInfo As DiagnosticInfo,
                                                 candidateSymbols As ImmutableArray(Of Symbol),
                                                 resultKind As LookupResultKind) As ErrorTypeSymbol
            Return New ExtendedErrorTypeSymbol(errorInfo, name, 0, candidateSymbols, resultKind)
        End Function

        Public Overrides ReadOnly Property OptionStrict As OptionStrict
            Get
                Return _sourceModule.Options.OptionStrict
            End Get
        End Property

        Public Overrides ReadOnly Property OptionInfer As Boolean
            Get
                Return _sourceModule.Options.OptionInfer
            End Get
        End Property

        Public Overrides ReadOnly Property OptionExplicit As Boolean
            Get
                Return _sourceModule.Options.OptionExplicit
            End Get
        End Property

        Public Overrides ReadOnly Property OptionCompareText As Boolean
            Get
                Return _sourceModule.Options.OptionCompareText
            End Get
        End Property

        Public Overrides ReadOnly Property CheckOverflow As Boolean
            Get
                Return _sourceModule.Options.CheckOverflow
            End Get
        End Property

        Public Overrides ReadOnly Property QuickAttributeChecker As QuickAttributeChecker
            Get
                Return _sourceModule.QuickAttributeChecker
            End Get
        End Property
    End Class

End Namespace


text:
<?php
if(isset($_GET['submit'])){

	if($inserts_correct == "TRUE"){ //If Inserts are correct, redirect to next site
		header("Location: ?step=1");
	}

}else{
echo"
Welcome to Beta Installer!

";
echo"
Please insert the following informations:

";
echo'
<form method="POST" action="?step=0&submit=yes">

Seitenname:
<input name="sitename" class="input_field" type="text">

Administrator Benutzername:
<input name="admin_username" class="input_field" type="text">

	<button type="submit" class="buttons">Begin installation</button>
</form>';
}


text:
#pragma once

namespace inviwo {
namespace discretedata {

/** Cell types of vtk **/
enum class CellType {
    // Linear cells
    EmptyCell = 0,
    Vertex = 1,
    PolyVertex = 2,
    Line = 3,
    PolyLine = 4,
    Triangle = 5,
    TriangleStrip = 6,
    Polygon = 7,
    Pixel = 8,
    Quad = 9,
    Tetra = 10,
    Voxel = 11,
    Hexahedron = 12,
    Wedge = 13,
    Pyramid = 14,
    PentagonalPrism = 15,
    HexagonalPrism = 16,

    // Quadratic, isoparametric cells
    QuadraticEdge = 21,
    QuadraticTriangle = 22,
    QuadraticQuad = 23,
    QuadraticPolygon = 36,
    QuadraticTetra = 24,
    QuadraticHexahedron = 25,
    QuadraticWedge = 26,
    QuadraticPyramid = 27,
    BiquadraticQuad = 28,
    TriquadraticHexahedron = 29,
    QuadraticLinearQuad = 30,
    QuadraticLinearWedge = 31,
    BiquadraticQuadraticWedge = 32,
    BiquadraticQuadraticHexahedron = 33,
    BiquadraticTriangle = 34,

    // Cubic, isoparametric cell
    CubicLine = 35,

    // Special class of cells formed by convex group of points
    ConvexPointSet = 41,

    // Polyhedron cell (consisting of polygonal faces)
    Polyhedron = 42,

    // Higher order cells in parametric form
    ParametricCurve = 51,
    ParametricSurface = 52,
    ParametricTriSurface = 53,
    ParametricQuadSurface = 54,
    ParametricTetraRegion = 55,
    ParametricHexRegion = 56,

    // Higher order cells
    HigherOrderEdge = 60,
    HigherOrderTriangle = 61,
    HigherOrderQuad = 62,
    HigherOrderPolygon = 63,
    HigherOrderTetrahedron = 64,
    HigherOrderWedge = 65,
    HigherOrderPyramid = 66,
    HigherOrderHexahedron = 67,

    // Arbitrary order Lagrange elements
    // (formulated separated from generic higher order cells)
    LagrangeCurve = 68,
    LagrangeTriangle = 69,
    LagrangeQuadrilateral = 70,
    LagrangeTetrahedron = 71,
    LagrangeHexahedron = 72,
    LagrangeWedge = 73,
    LagrangePyramid = 74,

    NumberOfCellTypes
};

}  // namespace discretedata
}  // namespace inviwo


text:
namespace SSS_Windows_Forms.Forms.Administrator
{
    partial class Administrator
    {
        /// <summary>
        /// Required designer variable.
        /// </summary>
        private System.ComponentModel.IContainer components = null;

        /// <summary>
        /// Clean up any resources being used.
        /// </summary>
        /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
        protected override void Dispose(bool disposing)
        {
            if (disposing && (components != null))
            {
                components.Dispose();
            }
            base.Dispose(disposing);
        }

        #region Windows Form Designer generated code

        /// <summary>
        /// Required method for Designer support - do not modify
        /// the contents of this method with the code editor.
        /// </summary>
        private void InitializeComponent()
        {
            this.components = new System.ComponentModel.Container();
            System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Administrator));
            this.panel8 = new System.Windows.Forms.Panel();
            this.menuStrip9 = new System.Windows.Forms.MenuStrip();
            this.logoutToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
            this.menuStrip10 = new System.Windows.Forms.MenuStrip();
            this.dashboardToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
            this.label1 = new System.Windows.Forms.Label();
            this.panel2 = new System.Windows.Forms.Panel();
            this.lblDate = new System.Windows.Forms.Label();
            this.lblCoordinatorName = new System.Windows.Forms.Label();
            this.tmrSecond = new System.Windows.Forms.Timer(this.components);
            this.iS2G10_DBSSSDataSet = new SSS_Library.IS2G10_DBSSSDataSet();
            this.sSS_COORDINATORTableAdapter = new SSS_Library.IS2G10_DBSSSDataSetTableAdapters.SSS_COORDINATORTableAdapter();
            this.searchCoordinatorToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
            this.panel3 = new System.Windows.Forms.Panel();
            this.panel1 = new System.Windows.Forms.Panel();
            this.panel4 = new System.Windows.Forms.Panel();
            this.panel7 = new System.Windows.Forms.Panel();
            this.panel6 = new System.Windows.Forms.Panel();
            this.menuStrip5 = new System.Windows.Forms.MenuStrip();
            this.coordinatorToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
            this.registerCoordinatorToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
            this.updateCoordinatorToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
            this.sSSCOORDINATORBindingSource = new System.Windows.Forms.BindingSource(this.components);
            this.menuStrip2 = new System.Windows.Forms.MenuStrip();
            this.toolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem();
            this.menuStrip1 = new System.Windows.Forms.MenuStrip();
            this.systemSettingsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
            this.panel8.SuspendLayout();
            this.menuStrip9.SuspendLayout();
            this.menuStrip10.SuspendLayout();
            this.panel2.SuspendLayout();
            ((System.ComponentModel.ISupportInitialize)(this.iS2G10_DBSSSDataSet)).BeginInit();
            this.panel3.SuspendLayout();
            this.panel1.SuspendLayout();
            this.panel4.SuspendLayout();
            this.panel6.SuspendLayout();
            this.menuStrip5.SuspendLayout();
            ((System.ComponentModel.ISupportInitialize)(this.sSSCOORDINATORBindingSource)).BeginInit();
            this.menuStrip2.SuspendLayout();
            this.menuStrip1.SuspendLayout();
            this.SuspendLayout();
            //
            // panel8
            //
            this.panel8.Controls.Add(this.menuStrip9);
            this.panel8.Location = new System.Drawing.Point(3, 507);
            this.panel8.Name = "panel8";
            this.panel8.Size = new System.Drawing.Size(235, 31);
            this.panel8.TabIndex = 9;
            //
            // menuStrip9
            //
            this.menuStrip9.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
            this.logoutToolStripMenuItem});
            this.menuStrip9.Location = new System.Drawing.Point(0, 0);
            this.menuStrip9.Name = "menuStrip9";
            this.menuStrip9.Size = new System.Drawing.Size(235, 27);
            this.menuStrip9.TabIndex = 0;
            this.menuStrip9.Text = "menuStrip9";
            //
            // logoutToolStripMenuItem
            //
            this.logoutToolStripMenuItem.Font = new System.Drawing.Font("Calibri", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.logoutToolStripMenuItem.Name = "logoutToolStripMenuItem";
            this.logoutToolStripMenuItem.Size = new System.Drawing.Size(65, 23);
            this.logoutToolStripMenuItem.Text = "Logout";
            this.logoutToolStripMenuItem.Click += new System.EventHandler(this.logoutToolStripMenuItem_Click);
            //
            // menuStrip10
            //
            this.menuStrip10.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
            this.dashboardToolStripMenuItem});
            this.menuStrip10.Location = new System.Drawing.Point(0, 0);
            this.menuStrip10.Name = "menuStrip10";
            this.menuStrip10.Size = new System.Drawing.Size(241, 27);
            this.menuStrip10.TabIndex = 10;
            this.menuStrip10.Text = "menuStrip10";
            //
            // dashboardToolStripMenuItem
            //
            this.dashboardToolStripMenuItem.Font = new System.Drawing.Font("Calibri", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.dashboardToolStripMenuItem.Name = "dashboardToolStripMenuItem";
            this.dashboardToolStripMenuItem.Size = new System.Drawing.Size(91, 23);
            this.dashboardToolStripMenuItem.Text = "Dashboard";
            //
            // label1
            //
            this.label1.AutoSize = true;
            this.label1.Font = new System.Drawing.Font("Calibri", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.label1.Location = new System.Drawing.Point(338, 18);
            this.label1.Name = "label1";
            this.label1.Size = new System.Drawing.Size(291, 23);
            this.label1.TabIndex = 0;
            this.label1.Text = "Welcome to Student Support System";
            //
            // panel2
            //
            this.panel2.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
            this.panel2.Controls.Add(this.lblDate);
            this.panel2.Controls.Add(this.lblCoordinatorName);
            this.panel2.Location = new System.Drawing.Point(3, 635);
            this.panel2.Name = "panel2";
            this.panel2.Size = new System.Drawing.Size(1025, 23);
            this.panel2.TabIndex = 0;
            //
            // lblDate
            //
            this.lblDate.AutoSize = true;
            this.lblDate.Location = new System.Drawing.Point(890, 5);
            this.lblDate.Name = "lblDate";
            this.lblDate.Size = new System.Drawing.Size(0, 13);
            this.lblDate.TabIndex = 1;
            //
            // lblCoordinatorName
            //
            this.lblCoordinatorName.AutoSize = true;
            this.lblCoordinatorName.Location = new System.Drawing.Point(5, 6);
            this.lblCoordinatorName.Name = "lblCoordinatorName";
            this.lblCoordinatorName.Size = new System.Drawing.Size(0, 13);
            this.lblCoordinatorName.TabIndex = 0;
            //
            // tmrSecond
            //
            this.tmrSecond.Enabled = true;
            this.tmrSecond.Interval = 1000;
            this.tmrSecond.Tick += new System.EventHandler(this.tmrSecond_Tick);
            //
            // iS2G10_DBSSSDataSet
            //
            this.iS2G10_DBSSSDataSet.DataSetName = "IS2G10_DBSSSDataSet";
            this.iS2G10_DBSSSDataSet.SchemaSerializationMode = System.Data.SchemaSerializationMode.IncludeSchema;
            //
            // sSS_COORDINATORTableAdapter
            //
            this.sSS_COORDINATORTableAdapter.ClearBeforeFill = true;
            //
            // searchCoordinatorToolStripMenuItem
            //
            this.searchCoordinatorToolStripMenuItem.Name = "searchCoordinatorToolStripMenuItem";
            this.searchCoordinatorToolStripMenuItem.Size = new System.Drawing.Size(212, 24);
            this.searchCoordinatorToolStripMenuItem.Text = "Search Coordinator";
            //
            // panel3
            //
            this.panel3.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
            this.panel3.Controls.Add(this.label1);
            this.panel3.Location = new System.Drawing.Point(3, 9);
            this.panel3.Name = "panel3";
            this.panel3.Size = new System.Drawing.Size(1019, 71);
            this.panel3.TabIndex = 1;
            //
            // panel1
            //
            this.panel1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
            this.panel1.Controls.Add(this.panel4);
            this.panel1.Controls.Add(this.panel3);
            this.panel1.Controls.Add(this.panel2);
            this.panel1.Location = new System.Drawing.Point(2, 2);
            this.panel1.Name = "panel1";
            this.panel1.Size = new System.Drawing.Size(1033, 663);
            this.panel1.TabIndex = 1;
            //
            // panel4
            //
            this.panel4.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
            this.panel4.Controls.Add(this.panel7);
            this.panel4.Controls.Add(this.panel6);
            this.panel4.Location = new System.Drawing.Point(3, 82);
            this.panel4.Name = "panel4";
            this.panel4.Size = new System.Drawing.Size(1019, 547);
            this.panel4.TabIndex = 2;
            //
            // panel7
            //
            this.panel7.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
            this.panel7.Location = new System.Drawing.Point(252, 3);
            this.panel7.Name = "panel7";
            this.panel7.Size = new System.Drawing.Size(762, 539);
            this.panel7.TabIndex = 2;
            //
            // panel6
            //
            this.panel6.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
            this.panel6.Controls.Add(this.menuStrip1);
            this.panel6.Controls.Add(this.menuStrip2);
            this.panel6.Controls.Add(this.menuStrip5);
            this.panel6.Controls.Add(this.panel8);
            this.panel6.Controls.Add(this.menuStrip10);
            this.panel6.Location = new System.Drawing.Point(3, 3);
            this.panel6.Name = "panel6";
            this.panel6.Size = new System.Drawing.Size(243, 539);
            this.panel6.TabIndex = 1;
            //
            // menuStrip5
            //
            this.menuStrip5.Font = new System.Drawing.Font("Calibri", 12F);
            this.menuStrip5.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
            this.coordinatorToolStripMenuItem});
            this.menuStrip5.Location = new System.Drawing.Point(0, 27);
            this.menuStrip5.Name = "menuStrip5";
            this.menuStrip5.Size = new System.Drawing.Size(241, 27);
            this.menuStrip5.TabIndex = 27;
            this.menuStrip5.Text = "menuStrip5";
            //
            // coordinatorToolStripMenuItem
            //
            this.coordinatorToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
            this.registerCoordinatorToolStripMenuItem,
            this.updateCoordinatorToolStripMenuItem,
            this.searchCoordinatorToolStripMenuItem});
            this.coordinatorToolStripMenuItem.Name = "coordinatorToolStripMenuItem";
            this.coordinatorToolStripMenuItem.Size = new System.Drawing.Size(97, 23);
            this.coordinatorToolStripMenuItem.Text = "Coordinator";
            //
            // registerCoordinatorToolStripMenuItem
            //
            this.registerCoordinatorToolStripMenuItem.Name = "registerCoordinatorToolStripMenuItem";
            this.registerCoordinatorToolStripMenuItem.Size = new System.Drawing.Size(212, 24);
            this.registerCoordinatorToolStripMenuItem.Text = "Register Coordinator";
            //
            // updateCoordinatorToolStripMenuItem
            //
            this.updateCoordinatorToolStripMenuItem.Name = "updateCoordinatorToolStripMenuItem";
            this.updateCoordinatorToolStripMenuItem.Size = new System.Drawing.Size(212, 24);
            this.updateCoordinatorToolStripMenuItem.Text = "Update Coordinator";
            //
            // sSSCOORDINATORBindingSource
            //
            this.sSSCOORDINATORBindingSource.DataMember = "SSS_COORDINATOR";
            this.sSSCOORDINATORBindingSource.DataSource = this.iS2G10_DBSSSDataSet;
            //
            // menuStrip2
            //
            this.menuStrip2.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
            this.toolStripMenuItem1});
            this.menuStrip2.Location = new System.Drawing.Point(0, 54);
            this.menuStrip2.Name = "menuStrip2";
            this.menuStrip2.Size = new System.Drawing.Size(241, 27);
            this.menuStrip2.TabIndex = 31;
            this.menuStrip2.Text = "menuStrip2";
            //
            // toolStripMenuItem1
            //
            this.toolStripMenuItem1.Font = new System.Drawing.Font("Calibri", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.toolStripMenuItem1.Name = "toolStripMenuItem1";
            this.toolStripMenuItem1.Size = new System.Drawing.Size(79, 23);
            this.toolStripMenuItem1.Text = "Branding";
            this.toolStripMenuItem1.Click += new System.EventHandler(this.toolStripMenuItem1_Click);
            //
            // menuStrip1
            //
            this.menuStrip1.Font = new System.Drawing.Font("Calibri", 12F);
            this.menuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
            this.systemSettingsToolStripMenuItem});
            this.menuStrip1.Location = new System.Drawing.Point(0, 81);
            this.menuStrip1.Name = "menuStrip1";
            this.menuStrip1.Size = new System.Drawing.Size(241, 27);
            this.menuStrip1.TabIndex = 32;
            this.menuStrip1.Text = "menuStrip1";
            //
            // systemSettingsToolStripMenuItem
            //
            this.systemSettingsToolStripMenuItem.Name = "systemSettingsToolStripMenuItem";
            this.systemSettingsToolStripMenuItem.Size = new System.Drawing.Size(123, 23);
            this.systemSettingsToolStripMenuItem.Text = "System Settings";
            this.systemSettingsToolStripMenuItem.Click += new System.EventHandler(this.systemSettingsToolStripMenuItem_Click);
            //
            // Administrator
            //
            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
            this.ClientSize = new System.Drawing.Size(1037, 667);
            this.Controls.Add(this.panel1);
            this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
            this.Name = "Administrator";
            this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
            this.Text = "Administrator";
            this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.Administrator_FormClosing);
            this.panel8.ResumeLayout(false);
            this.panel8.PerformLayout();
            this.menuStrip9.ResumeLayout(false);
            this.menuStrip9.PerformLayout();
            this.menuStrip10.ResumeLayout(false);
            this.menuStrip10.PerformLayout();
            this.panel2.ResumeLayout(false);
            this.panel2.PerformLayout();
            ((System.ComponentModel.ISupportInitialize)(this.iS2G10_DBSSSDataSet)).EndInit();
            this.panel3.ResumeLayout(false);
            this.panel3.PerformLayout();
            this.panel1.ResumeLayout(false);
            this.panel4.ResumeLayout(false);
            this.panel6.ResumeLayout(false);
            this.panel6.PerformLayout();
            this.menuStrip5.ResumeLayout(false);
            this.menuStrip5.PerformLayout();
            ((System.ComponentModel.ISupportInitialize)(this.sSSCOORDINATORBindingSource)).EndInit();
            this.menuStrip2.ResumeLayout(false);
            this.menuStrip2.PerformLayout();
            this.menuStrip1.ResumeLayout(false);
            this.menuStrip1.PerformLayout();
            this.ResumeLayout(false);

        }

        #endregion

        private System.Windows.Forms.Panel panel8;
        private System.Windows.Forms.MenuStrip menuStrip9;
        private System.Windows.Forms.ToolStripMenuItem logoutToolStripMenuItem;
        private System.Windows.Forms.MenuStrip menuStrip10;
        private System.Windows.Forms.ToolStripMenuItem dashboardToolStripMenuItem;
        private System.Windows.Forms.Label label1;
        private System.Windows.Forms.Panel panel2;
        private System.Windows.Forms.Label lblDate;
        private System.Windows.Forms.Label lblCoordinatorName;
        private System.Windows.Forms.Timer tmrSecond;
        private SSS_Library.IS2G10_DBSSSDataSet iS2G10_DBSSSDataSet;
        private SSS_Library.IS2G10_DBSSSDataSetTableAdapters.SSS_COORDINATORTableAdapter sSS_COORDINATORTableAdapter;
        private System.Windows.Forms.ToolStripMenuItem searchCoordinatorToolStripMenuItem;
        private System.Windows.Forms.Panel panel3;
        private System.Windows.Forms.Panel panel1;
        private System.Windows.Forms.Panel panel4;
        private System.Windows.Forms.Panel panel7;
        private System.Windows.Forms.Panel panel6;
        private System.Windows.Forms.MenuStrip menuStrip5;
        private System.Windows.Forms.ToolStripMenuItem coordinatorToolStripMenuItem;
        private System.Windows.Forms.ToolStripMenuItem registerCoordinatorToolStripMenuItem;
        private System.Windows.Forms.ToolStripMenuItem updateCoordinatorToolStripMenuItem;
        private System.Windows.Forms.BindingSource sSSCOORDINATORBindingSource;
        private System.Windows.Forms.MenuStrip menuStrip1;
        private System.Windows.Forms.ToolStripMenuItem systemSettingsToolStripMenuItem;
        private System.Windows.Forms.MenuStrip menuStrip2;
        private System.Windows.Forms.ToolStripMenuItem toolStripMenuItem1;
    }
}


text:
#pragma once

#include <random>

#include "..\utils\tictoc.h"

namespace nntl {
namespace rng {

	template<typename RealT>
	struct _i_rng : public math::smatrix_td {
		typedef RealT real_t;
		typedef math::smatrix<real_t> realmtx_t;
		typedef math::smatrix_deform<real_t> realmtxdef_t;

		//all typedefs below should be changed in derived classes to suit needs

		typedef int seed_t;
		nntl_interface void seed(seed_t s) noexcept;
		nntl_interface void seed64(uint64_t s) noexcept;
		nntl_interface void seedTime(const utils::tictoc::time_point_t& tp)noexcept;

		//////////////////////////////////////////////////////////////////////////
		//Initialization functions
		//
		//preinit_additive_*() set of functions is used to inform RNG about total expected amount of random numbers that is
		// about to be requested during one training epoch. Arguments of multiple calls are summed.
		//
		// normal distribution
		void preinit_additive_normal_distr(const numel_cnt_t ne)noexcept { NNTL_UNREF(ne); }
		//for calls to gen_vector_norm(), gen_vector() and related
		void preinit_additive_norm(const numel_cnt_t ne)noexcept { NNTL_UNREF(ne); }

		//not using init(), there're too many different init() routines now, hard to seek them in code
		bool init_rng()noexcept { return true; }
		void deinit_rng()noexcept {}

		//////////////////////////////////////////////////////////////////////////
		// Multithreading support. iRng instance should not create own threading pool, it should be given a threads pool object
		// during initialization
		//
		// change to appropriate value in derived class
		static constexpr bool is_multithreaded = false;

		template<typename iThreadsT>
		bool init_ithreads(iThreadsT& t, const seed_t s = static_cast<seed_t>(s64to32(::std::time(0))))noexcept { return false; }

		//////////////////////////////////////////////////////////////////////////
		// iRng object should provide the following types of random numbers:
		// - fixed point number in range [0, A], where A is given. This numbers are going to used primarily by ::std::random_shuffle()
		//		and should be implicitly convertible to ptrdiff_t.
		// - fixed point number in its full range. To be used by distributions generators such as ::std::normal_distribution.
		//		This rng must obey UniformRandomBitGenerator concept.
		// - floating point number in ranges [0,1], [0,A] and [-A,A]

		//////////////////////////////////////////////////////////////////////////
		// ::std::random_shuffle() support
		//
		// ptrdiff_t is either int on 32bits or int64 on 64bits. Type required by random_shuffle()
		typedef ptrdiff_t int_4_random_shuffle_t;
		// int_4_random_shuffle_t is either int on 32bits or int64 on 64bits
		nntl_interface int_4_random_shuffle_t gen_i(int_4_random_shuffle_t lessThan)noexcept;
		nntl_interface int_4_random_shuffle_t operator()(int_4_random_shuffle_t lessThan)noexcept;// { return gen_i(lessThan); }

		//////////////////////////////////////////////////////////////////////////
		// ::std::*_distribution<> support. This API must conform UniformRandomBitGenerator concept
		//
		typedef int int_4_distribution_t;
		nntl_interface int_4_distribution_t operator()()noexcept;//returns values that are uniformly distributed between min() and max().
		nntl_interface int_4_distribution_t min()noexcept;//returns the minimum value that is returned by the generator's operator().
		nntl_interface int_4_distribution_t max()noexcept;//returns the maximum value that is returned by the generator's operator().
		nntl_interface int_4_distribution_t gen_int()noexcept;//random full-ranged int

		//floating point generation

		//////////////////////////////////////////////////////////////////////////
		//generate FP value in range [0,1]. RNG precision of the result is NO WORSE than T.
		// That means that for T==double it must return double or even wider data type, and
		// for T==float it may return float as well as double (depending on RNG implementation)
		template<typename T>
		nntl_interface auto gen_f_norm()noexcept;

		//generate a vector using Bernoulli distribution with probability of success p and success value sVal.
		nntl_interface void bernoulli_vector(real_t* ptr, const numel_cnt_t n, const real_t p, const real_t sVal = real_t(1.), const real_t negVal = real_t(0.))noexcept;
		nntl_interface void bernoulli_matrix(realmtx_t& A, const real_t p, const real_t sVal = real_t(1.), const real_t negVal = real_t(0.))noexcept;

		//generate a binary vector/matrix (i.e. may contain only 0 or 1), with probability of 1 equal to p
		nntl_interface void binary_vector(real_t* ptr, const numel_cnt_t n, const real_t p)noexcept;
		nntl_interface void binary_matrix(realmtx_t& A, const real_t p)noexcept;

		// generates using normal distribution N(m,st)
		nntl_interface void normal_vector(real_t* ptr, const numel_cnt_t n, const real_t m = real_t(0.), const real_t st = real_t(1.))noexcept;
		nntl_interface void normal_matrix(realmtx_t& A, const real_t m = real_t(0.), const real_t st = real_t(1.))noexcept;

		//////////////////////////////////////////////////////////////////////////
		// matrix/vector generation (sequence of numbers drawn from uniform distribution in [-a,a])
		nntl_interface void gen_vector(real_t* ptr, const numel_cnt_t n, const real_t a)noexcept;
		// matrix/vector generation (sequence of numbers drawn from uniform distribution in [neg,pos])
		nntl_interface void gen_vector(real_t* ptr, const numel_cnt_t n, const real_t neg, const real_t pos)noexcept;

		//////////////////////////////////////////////////////////////////////////
		//generate vector with values in range [0,1]
		nntl_interface void gen_vector_norm(real_t* ptr, const numel_cnt_t n)noexcept;

		//////////////////////////////////////////////////////////////////////////
		//generate vector with values in range [0,a]
		template<typename BaseType>
		nntl_interface void gen_vector_gtz(BaseType* ptr, const numel_cnt_t n, const BaseType a)noexcept;

		//generate FP value in range [0,a]
		nntl_interface real_t gen_f(const real_t a)noexcept; //{ return a*gen_f_norm(); }

		// matrix/vector generation (sequence from begin to end of numbers drawn from uniform distribution in [-a,a])
		nntl_interface void gen_matrix(realmtx_t& mtx, const real_t a)noexcept;
		nntl_interface void gen_matrix_no_bias(realmtx_t& mtx, const real_t a)noexcept;
		//gen_matrixAny() doesn't expect specific biased/non-biased matrix and doesn't throw assertions if matrix has/doesn't have biases.
		nntl_interface void gen_matrixAny(realmtx_t& mtx, const real_t a)noexcept;

		//generate matrix with values in range [0,1]
		nntl_interface void gen_matrix_norm(realmtx_t& mtx)noexcept;
		nntl_interface void gen_matrix_no_bias_norm(realmtx_t& mtx)noexcept;

		//generate matrix with values in range [0,a]
		nntl_interface void gen_matrix_gtz(realmtx_t& mtx, const real_t a)noexcept;
		nntl_interface void gen_matrix_no_bias_gtz(realmtx_t& mtx, const real_t a)noexcept;

		static constexpr uint32_t s64to32(const uint64_t v)noexcept {
			return static_cast<uint32_t>(v & UINT32_MAX) ^ static_cast<uint32_t>((v >> 32)&UINT32_MAX);
		}
	};

	template<typename RealT, typename int4ShuffleT, typename int4DistribsT, typename FinalPolymorphChild>
	struct rng_helper : public _i_rng<RealT> {
	protected:
		typedef FinalPolymorphChild self_t;
		NNTL_METHODS_SELF_CHECKED((::std::is_base_of<rng_helper<real_t, int4ShuffleT, int4DistribsT, FinalPolymorphChild>, FinalPolymorphChild>::value)
			, "FinalPolymorphChild must derive from _i_rng_helper<RealT,FinalPolymorphChild>");

	public:
		typedef int4ShuffleT int_4_random_shuffle_t;
		typedef int4DistribsT int_4_distribution_t;
		typedef math::s_elems_range elms_range;

		~rng_helper()noexcept {
			get_self().deinit_rng();
		}

		//////////////////////////////////////////////////////////////////////////
		void seed64(uint64_t s) noexcept {
			get_self().seed(static_cast<seed_t>(s64to32(s)));
		}

		void seedTime(const utils::tictoc::time_point_t& tp)noexcept {
			get_self().seed64(tp.time_since_epoch().count());
		}

		//////////////////////////////////////////////////////////////////////////
		// ::std::random_shuffle() support
		int_4_random_shuffle_t operator()(int_4_random_shuffle_t lessThan)noexcept { return get_self().gen_i(lessThan); }

		//////////////////////////////////////////////////////////////////////////
		// ::std::*_distribution<> support. This API must conform UniformRandomBitGenerator concept
		int_4_distribution_t operator()()noexcept { return get_self().gen_int(); }
		//returns the minimum value that is returned by the generator's operator().
		//static constexpr int_4_distribution_t min()const noexcept { return ::std::numeric_limits<int_4_distribution_t>::min() + 1; } //+1 is essential
		static constexpr int_4_distribution_t min() noexcept { return ::std::numeric_limits<int_4_distribution_t>::min(); }
		//returns the maximum value that is returned by the generator's operator().
		static constexpr int_4_distribution_t max() noexcept { return ::std::numeric_limits<int_4_distribution_t>::max(); }

		//////////////////////////////////////////////////////////////////////////
		//generate FP value in range [0,a]
		real_t gen_f(const real_t a)noexcept { return static_cast<real_t>(a*get_self().gen_f_norm<real_t>()); }

		//////////////////////////////////////////////////////////////////////////
		//////////////////////////////////////////////////////////////////////////
		//note that derived class may override any function, so this implementation actually might be multithreaded
		void bernoulli_vector(real_t* ptr, const numel_cnt_t n, const real_t p, const real_t posVal = real_t(1.), const real_t negVal = real_t(0.))noexcept {
			NNTL_ASSERT(ptr);
			NNTL_ASSERT(p > real_t(0) && p < real_t(1));
			const auto pE = ptr + n;
			typedef decltype(get_self().gen_f_norm<real_t>()) gen_f_norm_t;
			gen_f_norm_t cmpr = static_cast<gen_f_norm_t>(p);
			while (ptr != pE) {
				*ptr++ = get_self().gen_f_norm<real_t>() < cmpr ? posVal : negVal;
			}
		}
		void bernoulli_matrix(realmtx_t& A, const real_t p, const real_t posVal = real_t(1.), const real_t negVal = real_t(0.))noexcept {
			NNTL_ASSERT(!A.emulatesBiases());
			get_self().bernoulli_vector(A.data(), A.numel(), p, posVal, negVal);
		}

		//////////////////////////////////////////////////////////////////////////
		//////////////////////////////////////////////////////////////////////////
		//generate a binary vector/matrix (i.e. may contain only 0 or 1), with probability of 1 equal to p
		void binary_vector(real_t* ptr, const numel_cnt_t n, const real_t p = real_t(.5))noexcept {
			return get_self().bernoulli_vector(ptr, n, p, real_t(1.), real_t(0.));
		}
		void binary_matrix(realmtx_t& A, const real_t p = real_t(.5))noexcept {
			return get_self().bernoulli_matrix(A, p, real_t(1.), real_t(0.));
		}

		//////////////////////////////////////////////////////////////////////////
		//////////////////////////////////////////////////////////////////////////
		void normal_vector(real_t*const ptr, const numel_cnt_t n, const real_t m = real_t(0.), const real_t st = real_t(1.))noexcept {
			::std::normal_distribution<real_t> distr(m,n);
			for (numel_cnt_t i = 0; i < n; ++i) {
				ptr[i] = distr(*this);
			}
		}
		void normal_matrix(realmtx_t& A, const real_t m = real_t(0.), const real_t st = real_t(1.))noexcept {
			get_self().normal_vector(A.data(), A.numel(), m , st);
		}

		//////////////////////////////////////////////////////////////////////////
		//////////////////////////////////////////////////////////////////////////
		// matrix/vector generation (sequence from begin to end of numbers drawn from uniform distribution in [-a,a])
		void gen_matrix(realmtx_t& mtx, const real_t a)noexcept {
			NNTL_ASSERT(!mtx.emulatesBiases());
			get_self().gen_vector(mtx.data(), mtx.numel(), a);
		}
		void gen_matrix_no_bias(realmtx_t& mtx, const real_t a)noexcept {
			NNTL_ASSERT(!mtx.emulatesBiases() || mtx.test_biases_strict());
			get_self().gen_vector(mtx.data(), mtx.numel_no_bias(), a);
			NNTL_ASSERT(!mtx.emulatesBiases() || mtx.test_biases_strict());
		}

		// gen_matrixAny() fill a mtx matrix with random just like gen_matrix/gen_matrix_no_bias() but it
		// doesn't require the mtx to either have or don't have biases. They are just skipped if any
		// #supportsBatchInRow
		void gen_matrixAny(realmtx_t& mtx, const real_t a)noexcept {
			NNTL_ASSERT(mtx.if_biases_test_strict());

			//if biases set for bBatchInRow mode, then generate all and restore biases afterwards
			get_self().gen_vector(mtx.data(), mtx.numel(mtx.emulatesBiases() && mtx.bSampleInRow()), a);

			if (mtx.emulatesBiases() && mtx.bSampleInColumn()) {
				mtx.fill_bias_row();
			}else NNTL_ASSERT(mtx.if_biases_test_strict());
		}

		//generate matrix with values in range [0,1]
		void gen_matrix_norm(realmtx_t& mtx)noexcept {
			NNTL_ASSERT(!mtx.emulatesBiases());
			get_self().gen_vector_norm(mtx.data(), mtx.numel());
		}
		void gen_matrix_no_bias_norm(realmtx_t& mtx)noexcept {
			NNTL_ASSERT(!mtx.emulatesBiases() || mtx.test_biases_strict());
			get_self().gen_vector_norm(mtx.data(), mtx.numel_no_bias());
			NNTL_ASSERT(!mtx.emulatesBiases() || mtx.test_biases_strict());
		}

		//////////////////////////////////////////////////////////////////////////
		//generate matrix with values in range [0,a]
		void gen_matrix_gtz(realmtx_t& mtx, const real_t a)noexcept {
			NNTL_ASSERT(!mtx.emulatesBiases());
			get_self().gen_vector_gtz(mtx.data(), mtx.numel(), a);
		}
		void gen_matrix_no_bias_gtz(realmtx_t& mtx, const real_t a)noexcept {
			NNTL_ASSERT(!mtx.emulatesBiases() || mtx.test_biases_strict());
			get_self().gen_vector_gtz(mtx.data(), mtx.numel_no_bias(), a);
			NNTL_ASSERT(!mtx.emulatesBiases() || mtx.test_biases_strict());
		}
	};

	///////////////////////////////////////////////////////////////////////////
	//////////////////////////////////////////////////////////////////////////

	// helper to recognize if the Rng class provides asynchronous generation
	template< class, class = ::std::void_t<> >
	struct is_asynch : ::std::false_type { };
	// specialization recognizes types that do have a nested ::asynch_rng_t member:
	template< class RngT >
	struct is_asynch<RngT, ::std::void_t<typename RngT::asynch_rng_t>> : ::std::true_type {};

}
}


text:
export let SUCCESS_OK = 200
export let SUCCESS_CREATED = 201
export let SUCCESS_LOGGED_IN = 202
export let SUCCESS_UPDATED = 203


text:
final abstract class Int private extends AnyVal
final abstract class Long private extends AnyVal
// etc

// These all have sane implementations of hashCode, equals, etc
// Conversions between primitives happen via implicits, so you can seamlessly widen a type like Int to Long, or Float to
// Double.

def withLong(x: Long) = x * 2
def withInt(x: Int) = x * 2
withLong(1: Long)  // okay, same type
withLong(1: Int)   // okay, Int is automatically converted ("widened") to a Long
withInt(1: Int)    // okay, same type
withInt(1: Long)   // fail! can't shrink a Long to an Int
//  error: type mismatch;
//  found   : Long
//  required: Int
//      withInt(1: Long)

// You can define your own value classes which, once compiled, may not use the wrapper class.  This gives the double
// benefit of using a descriptive type and still getting native speed.  This has gotchas, however -- boxing will happen
// automatically whenever needed.  See http://docs.scala-lang.org/overviews/core/value-classes.html for all the catches.

class Feet(val amount: Int) extends AnyVal {
  def +(other: Feet): Feet = new Feet(amount + other.amount)
}

new Feet(2) + new Feet(3) // No allocations required!


text:
""" Functions related to graph covers."""

from networkx.utils import not_implemented_for
from networkx.algorithms.bipartite.matching import hopcroft_karp_matching
from networkx.algorithms.covering import min_edge_cover as _min_edge_cover

__all__ = ['min_edge_cover']

@not_implemented_for('directed')
@not_implemented_for('multigraph')
def min_edge_cover(G, matching_algorithm=None):
    """Returns a set of edges which constitutes
    the minimum edge cover of the graph.

    The smallest edge cover can be found in polynomial time by finding
    a maximum matching and extending it greedily so that all nodes
    are covered.

    Parameters
    ----------
    G : NetworkX graph
        An undirected bipartite graph.

    matching_algorithm : function
        A function that returns a maximum cardinality matching in a
        given bipartite graph. The function must take one input, the
        graph ``G``, and return a dictionary mapping each node to its
        mate. If not specified,
        :func:`~networkx.algorithms.bipartite.matching.hopcroft_karp_matching`
        will be used. Other possibilities include
        :func:`~networkx.algorithms.bipartite.matching.eppstein_matching`,

    Returns
    -------
    set
        A set of the edges in a minimum edge cover of the graph, given as
        pairs of nodes. It contains both the edges `(u, v)` and `(v, u)`
        for given nodes `u` and `v` among the edges of minimum edge cover.

    Notes
    -----
    An edge cover of a graph is a set of edges such that every node of
    the graph is incident to at least one edge of the set.
    A minimum edge cover is an edge covering of smallest cardinality.

    Due to its implementation, the worst-case running time of this algorithm
    is bounded by the worst-case running time of the function
    ``matching_algorithm``.
    """
    if G.order() == 0:  # Special case for the empty graph
        return set()
    if matching_algorithm is None:
        matching_algorithm = hopcroft_karp_matching
    return _min_edge_cover(G, matching_algorithm=matching_algorithm)


text:
'use strict';
var path = require('path');
var chalk = require('chalk');
var util = require('util');
var ScriptBase = require('../../lib/script-base.js');
var angularUtils = require('../../lib/util.js');
var preference = require('../../lib/preference');

/**
 * Constructor
 */
var Generator = module.exports = function()
{
    ScriptBase.apply(this, arguments);

    this.option('uri', {
        desc: 'Allow a custom uri for routing',
        type: String,
        required: false
    });

    this.config = preference.getConfig();
    this.routerType = this.config.ngRoute;

    // set up a new flag to use component instead of a controller
    if (!this.options.abstract) {
        var args = [this.name];
        if (this.options.component) {
            this.composeWith('ng-panes:component' , {args: args});
        }
        else {
            this.composeWith('ng-panes:controller' , {args: args});
        }
        this.composeWith('ng-panes:view' , {args: args});
    }
};

util.inherits(Generator, ScriptBase);

/**
 * ask if the user want to overwrite the existing file
 */
Generator.prototype.rewriteAppJs = function()
{
    // new options TODO to integrate it
    var moduleDir = this.checkModuleOption();
    var appJsFile = (moduleDir==='') ? path.join('scripts' , 'app.js')
                                     : path.join('scripts' , 'modules' , moduleDir , 'module.js');

    this.uri = this.name;

    if (this.options.uri) {
        this.uri = this.options.uri;
    }

    var config = {
        file: path.join(
            this.env.options.appPath,
            appJsFile
        ),
        needle: '.otherwise'};
    var lower = this.name.toLowerCase();
    switch (this.routerType) {
        case 'ui-router':
            // config.needle = "$urlRouterProvider.otherwise('/');";
            config.splicable = [
                " url: '/"+ lower + "',",
            ];

            if (this.options.abstract) {
                config.splicable.push('    abstract: true,');
                config.splicable.push('    template: "<ui-view />"');
            } else {
                if (!this.options.component) {
                    config.splicable.push("    controller: '" + this.classedName + "Ctrl'" +  ",");
                    config.splicable.push("    controllerAs: '" + this.cameledName + "',");
                }
                config.splicable.push("   templateUrl: 'views/" + lower + ".html'");
            }

            config.splicable.unshift("   $stateProvider.state('" + this.uri + "' , {");
            config.splicable.push("});");
        break;
        // there got to have one now
        // case 'ngRoute':
        default:
            config.splicable = [
                "    templateUrl: 'views/" + lower + ".html', ",
                "    controller: '" + this.classedName + "Ctrl',",
                "    controllerAs: '"+ this.cameledName + "'"
            ];
            config.splicable.unshift(".when('/" + this.uri + "', {");
            config.splicable.push("})");
        break;
    }
    angularUtils.rewriteFile(config);

};


text:
package mailchimp

import (
	"fmt"
	"time"

	"github.com/influxdata/telegraf"
	"github.com/influxdata/telegraf/plugins/inputs"
)

type MailChimp struct {
	api *ChimpAPI

	ApiKey     string
	DaysOld    int
	CampaignId string
}

var sampleConfig = `
  ## MailChimp API key
  ## get from https://admin.mailchimp.com/account/api/
  api_key = "" # required
  ## Reports for campaigns sent more than days_old ago will not be collected.
  ## 0 means collect all.
  days_old = 0
  ## Campaign ID to get, if empty gets all campaigns, this option overrides days_old
  # campaign_id = ""
`

func (m *MailChimp) SampleConfig() string {
	return sampleConfig
}

func (m *MailChimp) Description() string {
	return "Gathers metrics from the /3.0/reports MailChimp API"
}

func (m *MailChimp) Gather(acc telegraf.Accumulator) error {
	if m.api == nil {
		m.api = NewChimpAPI(m.ApiKey)
	}
	m.api.Debug = false

	if m.CampaignId == "" {
		since := ""
		if m.DaysOld > 0 {
			now := time.Now()
			d, _ := time.ParseDuration(fmt.Sprintf("%dh", 24*m.DaysOld))
			since = now.Add(-d).Format(time.RFC3339)
		}

		reports, err := m.api.GetReports(ReportsParams{
			SinceSendTime: since,
		})
		if err != nil {
			return err
		}
		now := time.Now()

		for _, report := range reports.Reports {
			gatherReport(acc, report, now)
		}
	} else {
		report, err := m.api.GetReport(m.CampaignId)
		if err != nil {
			return err
		}
		now := time.Now()
		gatherReport(acc, report, now)
	}

	return nil
}

func gatherReport(acc telegraf.Accumulator, report Report, now time.Time) {
	tags := make(map[string]string)
	tags["id"] = report.ID
	tags["campaign_title"] = report.CampaignTitle
	fields := map[string]interface{}{
		"emails_sent":              report.EmailsSent,
		"abuse_reports":            report.AbuseReports,
		"unsubscribed":             report.Unsubscribed,
		"hard_bounces":             report.Bounces.HardBounces,
		"soft_bounces":             report.Bounces.SoftBounces,
		"syntax_errors":            report.Bounces.SyntaxErrors,
		"forwards_count":           report.Forwards.ForwardsCount,
		"forwards_opens":           report.Forwards.ForwardsOpens,
		"opens_total":              report.Opens.OpensTotal,
		"unique_opens":             report.Opens.UniqueOpens,
		"open_rate":                report.Opens.OpenRate,
		"clicks_total":             report.Clicks.ClicksTotal,
		"unique_clicks":            report.Clicks.UniqueClicks,
		"unique_subscriber_clicks": report.Clicks.UniqueSubscriberClicks,
		"click_rate":               report.Clicks.ClickRate,
		"facebook_recipient_likes": report.FacebookLikes.RecipientLikes,
		"facebook_unique_likes":    report.FacebookLikes.UniqueLikes,
		"facebook_likes":           report.FacebookLikes.FacebookLikes,
		"industry_type":            report.IndustryStats.Type,
		"industry_open_rate":       report.IndustryStats.OpenRate,
		"industry_click_rate":      report.IndustryStats.ClickRate,
		"industry_bounce_rate":     report.IndustryStats.BounceRate,
		"industry_unopen_rate":     report.IndustryStats.UnopenRate,
		"industry_unsub_rate":      report.IndustryStats.UnsubRate,
		"industry_abuse_rate":      report.IndustryStats.AbuseRate,
		"list_stats_sub_rate":      report.ListStats.SubRate,
		"list_stats_unsub_rate":    report.ListStats.UnsubRate,
		"list_stats_open_rate":     report.ListStats.OpenRate,
		"list_stats_click_rate":    report.ListStats.ClickRate,
	}
	acc.AddFields("mailchimp", fields, tags, now)
}

func init() {
	inputs.Add("mailchimp", func() telegraf.Input {
		return &MailChimp{}
	})
}


text:
using System.Collections;
using NodeCanvas.Framework;
using ParadoxNotion.Design;
using UnityEngine;

namespace NodeCanvas.Tasks.Actions{

	[Category("✫ Blackboard/Lists")]
	public class ShuffleList : ActionTask {

		[RequiredField] [BlackboardOnly]
		public BBParameter<IList> targetList;

		protected override void OnExecute(){

			var list = targetList.value;

			for ( var i= list.Count -1; i > 0; i--){
				var j = (int)Mathf.Floor(Random.value * (i + 1));
				var temp = list[i];
				list[i] = list[j];
				list[j] = temp;
			}

			EndAction();
		}
	}
}


text:
/* DO NOT EDIT THIS FILE - it is machine generated */
#include <jni.h>
/* Header for class org_lwjgl_opengl_CallbackUtil */

#ifndef _Included_org_lwjgl_opengl_CallbackUtil
#define _Included_org_lwjgl_opengl_CallbackUtil
#ifdef __cplusplus
extern "C" {
#endif
/*
 * Class:     org_lwjgl_opengl_CallbackUtil
 * Method:    ncreateGlobalRef
 * Signature: (Ljava/lang/Object;)J
 */
JNIEXPORT jlong JNICALL Java_org_lwjgl_opengl_CallbackUtil_ncreateGlobalRef
  (JNIEnv *, jclass, jobject);

/*
 * Class:     org_lwjgl_opengl_CallbackUtil
 * Method:    deleteGlobalRef
 * Signature: (J)V
 */
JNIEXPORT void JNICALL Java_org_lwjgl_opengl_CallbackUtil_deleteGlobalRef
  (JNIEnv *, jclass, jlong);

/*
 * Class:     org_lwjgl_opengl_CallbackUtil
 * Method:    getDebugOutputCallbackARB
 * Signature: ()J
 */
JNIEXPORT jlong JNICALL Java_org_lwjgl_opengl_CallbackUtil_getDebugOutputCallbackARB
  (JNIEnv *, jclass);

/*
 * Class:     org_lwjgl_opengl_CallbackUtil
 * Method:    getDebugOutputCallbackAMD
 * Signature: ()J
 */
JNIEXPORT jlong JNICALL Java_org_lwjgl_opengl_CallbackUtil_getDebugOutputCallbackAMD
  (JNIEnv *, jclass);

/*
 * Class:     org_lwjgl_opengl_CallbackUtil
 * Method:    getDebugCallbackKHR
 * Signature: ()J
 */
JNIEXPORT jlong JNICALL Java_org_lwjgl_opengl_CallbackUtil_getDebugCallbackKHR
  (JNIEnv *, jclass);

#ifdef __cplusplus
}
#endif
#endif


text:
from ...external.qt.QtGui import QWidget, QDrag
from ...external.qt.QtCore import QMimeData, Qt
from ...external.qt.QtTest import QTest

from .. import mime

import pytest

class TestWidget(QWidget):
    def __init__(self, out_mime, parent=None):
        super(TestWidget, self).__init__(parent)
        self.setAcceptDrops(True)

        self.last_mime = None
        self.out_mime = out_mime

    def dragEnterEvent(self, event):
        print 'drag enter'
        event.accept()

    def dropEvent(self, event):
        print 'drop'
        self.last_mime = event.mimeData()

    def mousePressEvent(self, event):
        print 'mouse event'
        drag = QDrag(self)
        drag.setMimeData(self.out_mime)
        drop_action = drag.exec_()
        print drop_action
        event.accept()

class TestMime(object):
    def test_formats(self):
        d = mime.PyMimeData()
        assert set(d.formats()) == set([mime.INSTANCE_MIME_TYPE])

        d = mime.PyMimeData(**{'text/plain': 'hello'})
        assert set(d.formats()) == set([mime.INSTANCE_MIME_TYPE, 'text/plain'])

    def test_empty_has_format(self):
        d = mime.PyMimeData()
        assert d.hasFormat(mime.INSTANCE_MIME_TYPE)
        assert not d.hasFormat(mime.LAYER_MIME_TYPE)
        assert not d.hasFormat(mime.LAYERS_MIME_TYPE)

    def test_instance_format(self):
        d = mime.PyMimeData(5)
        assert d.hasFormat(mime.INSTANCE_MIME_TYPE)
        assert not d.hasFormat(mime.LAYER_MIME_TYPE)
        assert not d.hasFormat(mime.LAYERS_MIME_TYPE)

    def test_layer_format(self):
        d = mime.PyMimeData(5, **{mime.LAYER_MIME_TYPE: 10})
        assert d.hasFormat(mime.INSTANCE_MIME_TYPE)
        assert d.hasFormat(mime.LAYER_MIME_TYPE)
        assert not d.hasFormat(mime.LAYERS_MIME_TYPE)

    def test_layers_format(self):
        d = mime.PyMimeData(5, **{mime.LAYERS_MIME_TYPE: 10})
        assert d.hasFormat(mime.INSTANCE_MIME_TYPE)
        assert d.hasFormat(mime.LAYERS_MIME_TYPE)
        assert not d.hasFormat(mime.LAYER_MIME_TYPE)

    def test_retrieve_instance(self):
        d = mime.PyMimeData(10)
        assert d.retrieveData(mime.INSTANCE_MIME_TYPE) == 10

    def test_retrieve_layer(self):
        d = mime.PyMimeData(**{mime.LAYERS_MIME_TYPE: 12})
        assert d.retrieveData(mime.LAYERS_MIME_TYPE) == 12

        d = mime.PyMimeData(**{mime.LAYER_MIME_TYPE: 12})
        assert d.retrieveData(mime.LAYER_MIME_TYPE) == 12

    def test_retrieve_not_present_returns_null(self):
        d = mime.PyMimeData()
        assert d.retrieveData('not-a-format') is None

@pytest.skip
class TestMimeDragAndDrop(object):
    def setup_method(self, method):

        m1 = mime.PyMimeData(1, **{'text/plain': 'hi', 'test': 4})
        m2 = mime.PyMimeData(1, **{'test': 5})

        w1 = TestWidget(m1)
        w2 = TestWidget(m2)

        self.w1 = w1
        self.w2 = w2
        self.m1 = m1
        self.m2 = m2

    def test_drag_drop(self):
        QTest.mousePress(self.w1, Qt.LeftButton)
        QTest.mouseMove(self.w2)
        QTest.mouseRelease(self.w2, Qt.LeftButton)

        assert self.w2.last_mime == self.m1


text:
using namespace std;

struct local_symbols
{
    string local_name;
    int address;
};

struct function_symbol
{
    string function_name;
    int entry_point;
    int after_exit;
    vector<struct local_symbols> locals;
};

struct statement_symbol
{
    struct source_span source_span;
    int start_address;
};

struct symbols
{
    vector<struct function_symbol> functions;
    vector<struct statement_symbol> statements;
};