text:
// canThis(someUser).edit.posts([id]|[[ids]])
// canThis(someUser).edit.post(somePost|somePostId)

var _                   = require('lodash'),
    Promise             = require('bluebird'),
    Models              = require('../models'),
    effectivePerms      = require('./effective'),
    init,
    refresh,
    canThis,
    CanThisResult,
    exported;

function hasActionsMap() {
    // Just need to find one key in the actionsMap

    return _.any(exported.actionsMap, function (val, key) {
        /*jslint unparam:true*/
        return Object.hasOwnProperty.call(exported.actionsMap, key);
    });
}

// TODO: Move this to its own file so others can use it?
function parseContext(context) {
    // Parse what's passed to canThis.beginCheck for standard user and app scopes
    var parsed = {
            internal: false,
            user: null,
            app: null
        };

    if (context && (context === 'internal' || context.internal)) {
        parsed.internal = true;
    }

    if (context && context.user) {
        parsed.user = context.user;
    }

    if (context && context.app) {
        parsed.app = context.app;
    }

    return parsed;
}

// Base class for canThis call results
CanThisResult = function () {
    return;
};

CanThisResult.prototype.buildObjectTypeHandlers = function (objTypes, actType, context, permissionLoad) {
    // @TODO: remove this lazy require
    var objectTypeModelMap  = require('./object-type-model-map');

    // Iterate through the object types, i.e. ['post', 'tag', 'user']
    return _.reduce(objTypes, function (objTypeHandlers, objType) {
        // Grab the TargetModel through the objectTypeModelMap
        var TargetModel = objectTypeModelMap[objType];

        // Create the 'handler' for the object type;
        // the '.post()' in canThis(user).edit.post()
        objTypeHandlers[objType] = function (modelOrId) {
            var modelId;

            // If it's an internal request, resolve immediately
            if (context.internal) {
                return Promise.resolve();
            }

            if (_.isNumber(modelOrId) || _.isString(modelOrId)) {
                // It's an id already, do nothing
                modelId = modelOrId;
            } else if (modelOrId) {
                // It's a model, get the id
                modelId = modelOrId.id;
            }
            // Wait for the user loading to finish
            return permissionLoad.then(function (loadedPermissions) {
                // Iterate through the user permissions looking for an affirmation
                var userPermissions = loadedPermissions.user ? loadedPermissions.user.permissions : null,
                    appPermissions = loadedPermissions.app ? loadedPermissions.app.permissions : null,
                    hasUserPermission,
                    hasAppPermission,
                    checkPermission = function (perm) {
                        var permObjId;

                        // Look for a matching action type and object type first
                        if (perm.get('action_type') !== actType || perm.get('object_type') !== objType) {
                            return false;
                        }

                        // Grab the object id (if specified, could be null)
                        permObjId = perm.get('object_id');

                        // If we didn't specify a model (any thing)
                        // or the permission didn't have an id scope set
                        // then the "thing" has permission
                        if (!modelId || !permObjId) {
                            return true;
                        }

                        // Otherwise, check if the id's match
                        // TODO: String vs Int comparison possibility here?
                        return modelId === permObjId;
                    };
                // Check user permissions for matching action, object and id.

                if (_.any(loadedPermissions.user.roles, {name: 'Owner'})) {
                    hasUserPermission = true;
                } else if (!_.isEmpty(userPermissions)) {
                    hasUserPermission = _.any(userPermissions, checkPermission);
                }

                // Check app permissions if they were passed
                hasAppPermission = true;
                if (!_.isNull(appPermissions)) {
                    hasAppPermission = _.any(appPermissions, checkPermission);
                }

                // Offer a chance for the TargetModel to override the results
                if (TargetModel && _.isFunction(TargetModel.permissible)) {
                    return TargetModel.permissible(
                        modelId, actType, context, loadedPermissions, hasUserPermission, hasAppPermission
                    );
                }

                if (hasUserPermission && hasAppPermission) {
                    return;
                }

                return Promise.reject();
            });
        };

        return objTypeHandlers;
    }, {});
};

CanThisResult.prototype.beginCheck = function (context) {
    var self = this,
        userPermissionLoad,
        appPermissionLoad,
        permissionsLoad;

    // Get context.user and context.app
    context = parseContext(context);

    if (!hasActionsMap()) {
        throw new Error('No actions map found, please call permissions.init() before use.');
    }

    // Kick off loading of effective user permissions if necessary
    if (context.user) {
        userPermissionLoad = effectivePerms.user(context.user);
    } else {
        // Resolve null if no context.user to prevent db call
        userPermissionLoad = Promise.resolve(null);
    }

    // Kick off loading of effective app permissions if necessary
    if (context.app) {
        appPermissionLoad = effectivePerms.app(context.app);
    } else {
        // Resolve null if no context.app
        appPermissionLoad = Promise.resolve(null);
    }

    // Wait for both user and app permissions to load
    permissionsLoad = Promise.all([userPermissionLoad, appPermissionLoad]).then(function (result) {
        return {
            user: result[0],
            app: result[1]
        };
    });

    // Iterate through the actions and their related object types
    _.each(exported.actionsMap, function (objTypes, actType) {
        // Build up the object type handlers;
        // the '.post()' parts in canThis(user).edit.post()
        var objTypeHandlers = self.buildObjectTypeHandlers(objTypes, actType, context, permissionsLoad);

        // Define a property for the action on the result;
        // the '.edit' in canThis(user).edit.post()
        Object.defineProperty(self, actType, {
            writable: false,
            enumerable: false,
            configurable: false,
            value: objTypeHandlers
        });
    });

    // Return this for chaining
    return this;
};

canThis = function (context) {
    var result = new CanThisResult();

    return result.beginCheck(context);
};

init = refresh = function () {
    // Load all the permissions
    return Models.Permission.findAll().then(function (perms) {
        var seenActions = {};

        exported.actionsMap = {};

        // Build a hash map of the actions on objects, i.e
        /*
        {
            'edit': ['post', 'tag', 'user', 'page'],
            'delete': ['post', 'user'],
            'create': ['post', 'user', 'page']
        }
        */
        _.each(perms.models, function (perm) {
            var actionType = perm.get('action_type'),
                objectType = perm.get('object_type');

            exported.actionsMap[actionType] = exported.actionsMap[actionType] || [];
            seenActions[actionType] = seenActions[actionType] || {};

            // Check if we've already seen this action -> object combo
            if (seenActions[actionType][objectType]) {
                return;
            }

            exported.actionsMap[actionType].push(objectType);
            seenActions[actionType][objectType] = true;
        });

        return exported.actionsMap;
    });
};

module.exports = exported = {
    init: init,
    refresh: refresh,
    canThis: canThis,
    actionsMap: {}
};


text:
```sh
duo --use duo-babel
```

#### Via Node API

```js
Duo(root)
  .entry(entry)
  .use(babel)
  .run(fn);
```

    For more information see the babel/duo-babel repo.

redpajama_set_name: RedPajamaGithub


text:
<?php

namespace App\Controller\Admin;

use App\MainBundle\Document\User;
use Doctrine\ODM\MongoDB\DocumentManager;
use Doctrine\ORM\Query\Expr\Base;
use Doctrine\Persistence\ObjectRepository;
use Symfony\Component\DependencyInjection\ParameterBag\ParameterBagInterface;
use Symfony\Component\Routing\Annotation\Route;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\ParamConverter;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\JsonResponse;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Security\Core\Encoder\UserPasswordEncoderInterface;
use Symfony\Component\Serializer\SerializerInterface;
use Symfony\Contracts\Translation\TranslatorInterface;
use Symfony\Component\Validator\Validator\ValidatorInterface;

/**
 * Class OrderController
 * @package App\Controller
 * @Route("/admin/users")
 */
class UserController extends StorageControllerAbstract
{

    /** @var ValidatorInterface */
    protected $validator;
    /** @var UserPasswordEncoderInterface */
    protected $encoder;

    public function __construct(
        ParameterBagInterface $params,
        DocumentManager $dm,
        TranslatorInterface $translator,
        ValidatorInterface $validator,
        UserPasswordEncoderInterface $encoder
    )
    {
        parent::__construct($params, $dm, $translator);
        $this->validator = $validator;
        $this->encoder = $encoder;
    }

    /**
     * @param $data
     * @param int $itemId
     * @return array
     */
    public function validateData($data, $itemId = null)
    {
        if (empty($data)) {
            return ['success' => false, 'msg' => 'Data is empty.'];
        }
        if (empty($data['role'])) {
            return ['success' => false, 'msg' => 'Role should not be blank.'];
        }
        return ['success' => true];
    }

    /**
     * Create or update item
     * @param $data
     * @param string $itemId
     * @return JsonResponse
     * @throws \Doctrine\ODM\MongoDB\LockException
     * @throws \Doctrine\ODM\MongoDB\Mapping\MappingException
     * @throws \Doctrine\ODM\MongoDB\MongoDBException
     */
    public function createUpdate($data, $itemId = null)
    {
        /** @var User $currentUser */
        $currentUser = $this->getUser();
        $repository = $this->getRepository();

        /** @var User $item */
        if($itemId){
            /** @var User $item */
            $item = $this->getRepository()->find($itemId);
            if(!$item){
                return $this->setError($this->translator->trans('Item not found.', [], 'validators'));
            }
            if ($data['email'] !== $item->getEmail()) {
                $usersCount = $repository->getUsersCountBy('email', $data['email']);
                if ($usersCount > 0) {
                    return $this->setError($this->translator->trans('register.email.already exists', [], 'validators'));
                } else {
                    $item->setUsername($data['email']);
                }
            }
        } else {
            $item = new User();
        }

        if ($currentUser->getId() == $item->getId()
            && $currentUser->getIsActive() && empty($data['isActive'])) {
                return $this->setError($this->translator->trans('You can not block yourself.', [], 'validators'));
        }

        $item
            ->setEmail($data['email'])
            ->setFullName($data['fullName'])
            ->setPhone($data['phone'])
            ->setIsActive(!empty($data['isActive']))
            ->setApiToken($data['apiToken'] ?? '')
            ->setGroups($data['groups'] ?? []);

        if (isset($data['role']) && $currentUser->getId() !== $item->getId()) {
            $item->setRoles([$data['role']]);
        }

        // Set / update password
        if (!empty($data['password'])) {
            if (empty($data['confirmPassword']) || $data['password'] != $data['confirmPassword']) {
                return $this->setError($this->translator->trans('The password fields must match.', [], 'validators'));
            }
            $item
                ->setPlainPassword($data['password'])
                ->setPassword($this->encoder->encodePassword($item, $data['password']));
            $errors = $this->validator->validate($item);
            if (count($errors)) {
                return $this->setError($this->translator->trans($errors[0]->getMessage(), [], 'validators'));
            }
        }

        $errors = $this->validator->validate($item);
        if (count($errors)) {
            return $this->setError($this->translator->trans($errors[0]->getMessage(), [], 'validators'));
        }

        if (isset($data['options']) && is_array($data['options'])) {
            $item->setOptions($data['options']);
        }

        if (!$item->getId()) {
            $this->dm->persist($item);
        }
        $this->dm->flush();

        return $this->json($item, 200, [], ['groups' => ['details']]);
    }

    /**
     * @Route("", methods={"GET"})
     * @param Request $request
     * @return JsonResponse
     */
    public function getList(Request $request)
    {
        /** @var User $user */
        $user = $this->getUser();
        $queryString = $request->getQueryString();
        $options = $this->getQueryOptions($queryString);

        $repository = $this->getRepository();

        $filterIds = [];
        if (!$user->getIsSuperAdmin()) {
            $filterIds = $repository->getAdminIds();
        }
        // $filterIds[] = $user->getId();
        $filterIds = array_unique($filterIds);

        $results = $repository->findAllByOptions($options, $user->getId(), $filterIds);

        return $this->json([
            'items' => array_values($results['items']->toArray()),
            'total' => $results['total']
        ],
            200, [], ['groups' => ['list']]
        );
    }

    /**
     * @param $itemId
     * @return array
     * @throws \Doctrine\ODM\MongoDB\LockException
     * @throws \Doctrine\ODM\MongoDB\Mapping\MappingException
     * @throws \Doctrine\ODM\MongoDB\MongoDBException
     */
    public function deleteItem($itemId)
    {
        /** @var User $currentUser */
        $currentUser = $this->getUser();
        $repository = $this->getRepository();

        /** @var User $item */
        $item = $repository->find($itemId);
        if(!$item || $item->getId() === $currentUser->getId()){
            return [
                'success' => false,
                'msg' => 'You can not delete yourself.'
            ];
        }

        $this->dm->remove($item);
        $this->dm->flush();

        return ['success' => true];
    }

    /**
     * @param $itemId
     * @param bool $isActive
     * @return array
     * @throws \Doctrine\ODM\MongoDB\LockException
     * @throws \Doctrine\ODM\MongoDB\Mapping\MappingException
     * @throws \Doctrine\ODM\MongoDB\MongoDBException
     */
    public function blockItem($itemId, $isActive = false)
    {
        /** @var User $currentUser */
        $currentUser = $this->getUser();
        $repository = $this->getRepository();

        /** @var User $item */
        $item = $repository->find($itemId);
        if(!$item || $item->getId() === $currentUser->getId()){
            return [
                'success' => false,
                'msg' => 'You can not block yourself.'
            ];
        }

        $item->setIsActive($isActive);

        $this->dm->flush();

        return ['success' => true];
    }

    /**
     * @Route("/roles", methods={"GET"})
     * @return JsonResponse
     */
    public function getRolesHierarchyAction()
    {
        return $this->json([
            'roles' => $this->getRolesHierarchy()
        ]);
    }

    /**
     * @Route("/create_api_token", methods={"POST"})
     * @return JsonResponse
     */
    public function createApiTokenAction()
    {
        try {
            $token = User::createApiToken();
        } catch (\Exception $e) {
            return $this->setError($e->getMessage());
        }
        return $this->json([
            'token' => $token
        ]);
    }

    /**
     * @return array
     */
    public function getRolesHierarchy()
    {
        $output = [];
        $rolesHierarchy = $this->params->get('security.role_hierarchy.roles');
        $roles = array_keys($rolesHierarchy);

        if (!in_array('ROLE_USER', $roles)) {
            array_unshift($roles, 'ROLE_USER');
        }

        foreach ($roles as $role) {
            array_push($output, [
                'name' => $role,
                'title' => $this->translator->trans($role)
            ]);
        }

        return $output;
    }

    /**
     * @return \App\Repository\UserRepository|ObjectRepository
     */
    public function getRepository()
    {
        return $this->dm->getRepository(User::class);
    }
}


text:
var TrackedHolds = require("./tracked_holds.js")

// a class for analyzing a specific frame
// being able to store and reference the frame in object instances is quite
// useful
var FrameAnalyzer = function(frame, options, callback) {
  this.frame = frame;
  this.options = options;
  this.callback = callback;
}

FrameAnalyzer.prototype.process = function() {
  var hand, gesture, passing, checkFnName;

  this._removeVanishedAppendages();
  for (var i = 0; i < this.frame.hands.length; i++) {
    hand = this.frame.hands[i];
    passing = true;
    for (var i = 0; i < this._holdChecks.length && passing; i++) {
      checkFnName = this._holdChecks[i];
      passing = passing && this[checkFnName](hand);
    }
    if (passing) {
      gesture = this._processActiveHold(hand);
      // we may not always publish gestures even if they're active
      // for instance, if they're below the minimum duration
      if (gesture) {
        this.callback(gesture);
      }
    }
    else if (TrackedHolds.storedHold(hand.id)) {
      // if we don't have a valid hold, we only want to fire a stopped event
      // if there's actually a hold being tracked
      // otherwise you'd fire events during non-hold movement
      this.callback(this._processStoppedHold(hand.id));
    }
  }
}

FrameAnalyzer.prototype._holdChecks = ["_checkVelocity", "_checkPosition"];

FrameAnalyzer.prototype._checkVelocity = function(hand) {
  var velocity = hand.palmVelocity;
  for (var i = 0; i < velocity.length; i++) {
    if (Math.abs(velocity[i]) > this.options.maxVelocity) {
      return false;
    }
  }
  return true;
}

FrameAnalyzer.prototype._checkPosition = function(hand) {
  var position = hand.palmPosition, distance;
  // sometime we get hands without position?!
  if (!position) { return false; }
  var originalData = TrackedHolds.storedHold(hand.id);
  if (!originalData) {
    // no position check for new gestures, obviously
    return true;
  }
  var originalPosition = originalData.hand.palmPosition;

  for (var i = 0; i < position.length; i++) {
    distance = position[i] - originalPosition[i];
    if (Math.abs(distance) > this.options.maxDistance) {
      return false;
    }
  }
  return true;
}

FrameAnalyzer.prototype._removeVanishedAppendages = function() {
  for (var id in TrackedHolds.holds("hand")) {
    if (!this.frame.hand(id)) {
      var stopGesture = this._processStoppedHold(id, "vanished");
      this.callback(stopGesture)
    }
  }
}

FrameAnalyzer.prototype._processStoppedHold = function(handId, reason) {
  var gesture = this._constructGesture(handId, "stop");
  TrackedHolds.flushHold(handId);
  return gesture;
}

FrameAnalyzer.prototype._processActiveHold = function(hand) {
  // first, make sure we're tracking this
  var hold = TrackedHolds.storedHold(hand.id);
  var minDuration = this.options.minDuration;
  if (!hold) {
    hold = TrackedHolds.storeHold(hand);
  }

  // now, see if we should publish an event
  if (!minDuration || new Date() - hold.timestamp > minDuration) {
    state = hold.published ? "update" : "start";
    hold.published = true;
    return this._constructGesture(hand.id, state);
  }
  else {
    // don't publish this yet
    return null;
  }
}

FrameAnalyzer.prototype._constructGesture = function(handId, state) {
  // storedHold should always be available,
  // but hand might not be (if the hand has vanished)
  var storedHold = TrackedHolds.storedHold(handId);
  var hand = this.frame.hand(handId);

  return {
    type: "hold",
    state: state,
    handIds: [handId],
    pointableIds: [],
    position: hand ? hand.palmPosition : null,
    startPosition: storedHold.hand.palmPosition,
    duration: new Date() - storedHold.timestamp,
    // id is, for now, useless -- later we'll have to wrap Frame.gesture()
    id: Math.round(Math.random() * 100000)
  }
}

module.exports = FrameAnalyzer;


text:
package flens.core;

import java.util.List;
import java.util.Map;

public interface Config {

    public static class Option {
        private String name;
        private String type;
        private String descr;
        private String defaultv;

        /**
         * Construct a new Option.
         */
        public Option(String name, String type, String defaultv, String descr) {
            super();
            this.name = name;
            this.type = type;
            this.descr = descr;
            this.defaultv = defaultv;
        }

        public String getName() {
            return name;
        }

        public String getType() {
            return type;
        }

        public String getDescr() {
            return descr;
        }

        public String getDefaultv() {
            return defaultv;
        }

    }

    public void readConfigPart(String plugin, Map<String, Object> tree, Flengine engine);

    public List<Option> getOptions();

    public String getDescription();

}


text:
from setuptools import setup

version = '0.1.0dev'

with open('requirements.txt') as requirements:
    install_requires = requirements.read().split()

setup(
    name='frappeclient',
    version=version,
    author='Rushabh Mehta',
    author_email='rushabh@erpnext.com',
    packages=[
        'frappeclient'
    ],
    install_requires=install_requires,
    tests_requires=[
        'httmock<=1.2.2',
        'nose<=1.3.4'
    ],
)


text:
' Licensed to the .NET Foundation under one or more agreements.
' The .NET Foundation licenses this file to you under the MIT license.
' See the LICENSE file in the project root for more information.

Imports Microsoft.CodeAnalysis.Text
Imports Microsoft.CodeAnalysis.VisualBasic.Symbols
Imports Microsoft.CodeAnalysis.VisualBasic.Syntax

Namespace Microsoft.CodeAnalysis.VisualBasic

    Friend Partial Class BoundUserDefinedConversion

        Public ReadOnly Property Operand As BoundExpression
            Get
                If (InOutConversionFlags And 1) <> 0 Then
                    Return DirectCast([Call].Arguments(0), BoundConversion).Operand
                Else
                    Return [Call].Arguments(0)
                End If
            End Get
        End Property

        Public ReadOnly Property InConversionOpt As BoundConversion
            Get
                If (InOutConversionFlags And 1) <> 0 Then
                    Return DirectCast([Call].Arguments(0), BoundConversion)
                End If

                Return Nothing
            End Get
        End Property

        Public ReadOnly Property OutConversionOpt As BoundConversion
            Get
                If (InOutConversionFlags And 2) <> 0 Then
                    Return DirectCast(UnderlyingExpression, BoundConversion)
                End If

                Return Nothing
            End Get
        End Property

        Public ReadOnly Property [Call] As BoundCall
            Get
                If (InOutConversionFlags And 2) <> 0 Then
                    Return DirectCast(DirectCast(UnderlyingExpression, BoundConversion).Operand, BoundCall)
                End If

                Return DirectCast(UnderlyingExpression, BoundCall)
            End Get
        End Property

#If DEBUG Then
        Private Sub Validate()

            Dim outConversion As BoundConversion = OutConversionOpt
            If outConversion IsNot Nothing Then
                Debug.Assert(Conversions.ConversionExists(outConversion.ConversionKind) AndAlso (outConversion.ConversionKind And ConversionKind.UserDefined) = 0)
            End If

            Dim underlyingCall = [Call]
            Debug.Assert(underlyingCall.Method.MethodKind = MethodKind.Conversion AndAlso underlyingCall.Method.ParameterCount = 1)

            Dim operand As BoundExpression
            Dim inConversion As BoundConversion = InConversionOpt

            If inConversion IsNot Nothing Then
                Debug.Assert(Conversions.ConversionExists(inConversion.ConversionKind) AndAlso (inConversion.ConversionKind And ConversionKind.UserDefined) = 0)
                operand = inConversion.Operand
            Else
                operand = underlyingCall.Arguments(0)
            End If

            Debug.Assert(operand.Type.IsSameTypeIgnoringAll(Type))
        End Sub
#End If

    End Class

End Namespace


text:
'use strict';

goog.provide('Blockly.Msg.hrx');

goog.require('Blockly.Msg');

Blockly.Msg.ADD_COMMENT = "Kommentar hinzufüche";
Blockly.Msg.ARD_ANALOGREAD = "read analog pin#";  // untranslated
Blockly.Msg.ARD_ANALOGREAD_TIP = "Return value between 0 and 1024";  // untranslated
Blockly.Msg.ARD_ANALOGWRITE = "set analog pin#";  // untranslated
Blockly.Msg.ARD_ANALOGWRITE_TIP = "Write analog value between 0 and 255 to a specific PWM Port";  // untranslated
Blockly.Msg.ARD_BUILTIN_LED = "set built-in LED";  // untranslated
Blockly.Msg.ARD_BUILTIN_LED_TIP = "Light on or off for the built-in LED of the Arduino";  // untranslated
Blockly.Msg.ARD_DEFINE = "Define";  // untranslated
Blockly.Msg.ARD_DIGITALREAD = "read digital pin#";  // untranslated
Blockly.Msg.ARD_DIGITALREAD_TIP = "Read digital value on a pin: HIGH or LOW";  // untranslated
Blockly.Msg.ARD_DIGITALWRITE = "set digitial pin#";  // untranslated
Blockly.Msg.ARD_DIGITALWRITE_TIP = "Write digital value HIGH or LOW to a specific Port";  // untranslated
Blockly.Msg.ARD_FUN_RUN_LOOP = "Arduino loop forever:";  // untranslated
Blockly.Msg.ARD_FUN_RUN_SETUP = "Arduino run first:";  // untranslated
Blockly.Msg.ARD_FUN_RUN_TIP = "Defines the Arduino setup() and loop() functions.";  // untranslated
Blockly.Msg.ARD_HIGH = "HIGH";  // untranslated
Blockly.Msg.ARD_HIGHLOW_TIP = "Set a pin state logic High or Low.";  // untranslated
Blockly.Msg.ARD_LOW = "LOW";  // untranslated
Blockly.Msg.ARD_MAP = "Map";  // untranslated
Blockly.Msg.ARD_MAP_TIP = "Re-maps a number from [0-1024] to another.";  // untranslated
Blockly.Msg.ARD_MAP_VAL = "value to [0-";  // untranslated
Blockly.Msg.ARD_NOTONE = "Turn off tone on pin #";  // untranslated
Blockly.Msg.ARD_NOTONE_PIN = "No tone PIN#";  // untranslated
Blockly.Msg.ARD_NOTONE_PIN_TIP = "Stop generating a tone on a pin";  // untranslated
Blockly.Msg.ARD_NOTONE_TIP = "Turns the tone off on the selected pin";  // untranslated
Blockly.Msg.ARD_PIN_WARN1 = "Pin %1 is needed for %2 as pin %3. Already used as %4.";  // untranslated
Blockly.Msg.ARD_PULSEON = "pulse on pin #";  // untranslated
Blockly.Msg.ARD_PULSEREAD = "Read";  // untranslated
Blockly.Msg.ARD_PULSETIMEOUT = "timeout after";  // untranslated
Blockly.Msg.ARD_PULSETIMEOUT_MS = "";  // untranslated
Blockly.Msg.ARD_PULSETIMEOUT_TIP = "Measures the duration of a pulse on the selected pin, if it is within the timeout.";  // untranslated
Blockly.Msg.ARD_PULSE_TIP = "Measures the duration of a pulse on the selected pin.";  // untranslated
Blockly.Msg.ARD_SERIAL_BPS = "bps";  // untranslated
Blockly.Msg.ARD_SERIAL_PRINT = "print";  // untranslated
Blockly.Msg.ARD_SERIAL_PRINT_NEWLINE = "add new line";  // untranslated
Blockly.Msg.ARD_SERIAL_PRINT_TIP = "Prints data to the console/serial port as human-readable ASCII text.";  // untranslated
Blockly.Msg.ARD_SERIAL_PRINT_WARN = "A setup block for %1 must be added to the workspace to use this block!";  // untranslated
Blockly.Msg.ARD_SERIAL_SETUP = "Setup";  // untranslated
Blockly.Msg.ARD_SERIAL_SETUP_TIP = "Selects the speed for a specific Serial peripheral";  // untranslated
Blockly.Msg.ARD_SERIAL_SPEED = ":  speed to";  // untranslated
Blockly.Msg.ARD_SERVO_READ = "read SERVO from PIN#";  // untranslated
Blockly.Msg.ARD_SERVO_READ_TIP = "Read a Servo angle";  // untranslated
Blockly.Msg.ARD_SERVO_WRITE = "set SERVO from Pin";  // untranslated
Blockly.Msg.ARD_SERVO_WRITE_DEG_180 = "Degrees (0~180)";  // untranslated
Blockly.Msg.ARD_SERVO_WRITE_TIP = "Set a Servo to an specified angle";  // untranslated
Blockly.Msg.ARD_SERVO_WRITE_TO = "to";  // untranslated
Blockly.Msg.ARD_SETTONE = "Set tone on pin #";  // untranslated
Blockly.Msg.ARD_SPI_SETUP = "Setup";  // untranslated
Blockly.Msg.ARD_SPI_SETUP_CONF = "configuration:";  // untranslated
Blockly.Msg.ARD_SPI_SETUP_DIVIDE = "clock divide";  // untranslated
Blockly.Msg.ARD_SPI_SETUP_LSBFIRST = "LSBFIRST";  // untranslated
Blockly.Msg.ARD_SPI_SETUP_MODE = "SPI mode (idle - edge)";  // untranslated
Blockly.Msg.ARD_SPI_SETUP_MODE0 = "0 (Low - Falling)";  // untranslated
Blockly.Msg.ARD_SPI_SETUP_MODE1 = "1 (Low - Rising)";  // untranslated
Blockly.Msg.ARD_SPI_SETUP_MODE2 = "2 (High - Falling)";  // untranslated
Blockly.Msg.ARD_SPI_SETUP_MODE3 = "3 (High - Rising)";  // untranslated
Blockly.Msg.ARD_SPI_SETUP_MSBFIRST = "MSBFIRST";  // untranslated
Blockly.Msg.ARD_SPI_SETUP_SHIFT = "data shift";  // untranslated
Blockly.Msg.ARD_SPI_SETUP_TIP = "Configures the SPI peripheral.";  // untranslated
Blockly.Msg.ARD_SPI_TRANSRETURN_TIP = "Send a SPI message to an specified slave device and get data back.";  // untranslated
Blockly.Msg.ARD_SPI_TRANS_NONE = "none";  // untranslated
Blockly.Msg.ARD_SPI_TRANS_SLAVE = "to slave pin";  // untranslated
Blockly.Msg.ARD_SPI_TRANS_TIP = "Send a SPI message to an specified slave device.";  // untranslated
Blockly.Msg.ARD_SPI_TRANS_VAL = "transfer";  // untranslated
Blockly.Msg.ARD_SPI_TRANS_WARN1 = "A setup block for %1 must be added to the workspace to use this block!";  // untranslated
Blockly.Msg.ARD_SPI_TRANS_WARN2 = "Old pin value %1 is no longer available.";  // untranslated
Blockly.Msg.ARD_STEPPER_MOTOR = "stepper motor:";  // untranslated
Blockly.Msg.ARD_STEPPER_PIN1 = "pin1#";  // untranslated
Blockly.Msg.ARD_STEPPER_PIN2 = "pin2#";  // untranslated
Blockly.Msg.ARD_STEPPER_REVOLVS = "how many steps per revolution";  // untranslated
Blockly.Msg.ARD_STEPPER_SETUP = "Setup";  // untranslated
Blockly.Msg.ARD_STEPPER_SETUP_TIP = "Configures a stepper motor pinout and other settings.";  // untranslated
Blockly.Msg.ARD_STEPPER_SPEED = "set speed (rpm) to";  // untranslated
Blockly.Msg.ARD_STEPPER_STEP = "move stepper";  // untranslated
Blockly.Msg.ARD_STEPPER_STEPS = "steps";  // untranslated
Blockly.Msg.ARD_STEPPER_STEP_TIP = "Turns the stepper motor a specific number of steps.";  // untranslated
Blockly.Msg.ARD_STEPPER_STEP_WARN1 = "A STEPPER configuration block must be added to use this block!";  // untranslated
Blockly.Msg.ARD_STEPPER_STEP_WARN2 = "A Name input must be added to the Stepper configuration block!";  // untranslated
Blockly.Msg.ARD_STEPPER_STEP_WARN3 = "Selected stepper does not exist any more, please select a new one.";  // untranslated
Blockly.Msg.ARD_TIME_DELAY = "wait";  // untranslated
Blockly.Msg.ARD_TIME_DELAY_MICROS = "microseconds";  // untranslated
Blockly.Msg.ARD_TIME_DELAY_MICRO_TIP = "Wait specific time in microseconds";  // untranslated
Blockly.Msg.ARD_TIME_DELAY_TIP = "Wait specific time in milliseconds";  // untranslated
Blockly.Msg.ARD_TIME_INF = "wait forever (end program)";  // untranslated
Blockly.Msg.ARD_TIME_INF_TIP = "Wait indefinitely, stopping the program.";  // untranslated
Blockly.Msg.ARD_TIME_MICROS = "current elapsed Time (microseconds)";  // untranslated
Blockly.Msg.ARD_TIME_MICROS_TIP = "Returns the number of microseconds since the Arduino board began running the current program. Has to be stored in a positive long integer";  // untranslated
Blockly.Msg.ARD_TIME_MILLIS = "current elapsed Time (milliseconds)";  // untranslated
Blockly.Msg.ARD_TIME_MILLIS_TIP = "Returns the number of milliseconds since the Arduino board began running the current program. Has to be stored in a positive long integer";  // untranslated
Blockly.Msg.ARD_TIME_MS = "milliseconds";  // untranslated
Blockly.Msg.ARD_TONEFREQ = "at frequency";  // untranslated
Blockly.Msg.ARD_TONE_FREQ = "frequency";  // untranslated
Blockly.Msg.ARD_TONE_PIN = "Tone PIN#";  // untranslated
Blockly.Msg.ARD_TONE_PIN_TIP = "Generate audio tones on a pin";  // untranslated
Blockly.Msg.ARD_TONE_TIP = "Sets tone on pin to specified frequency within range 31 - 65535";  // untranslated
Blockly.Msg.ARD_TONE_WARNING = "Frequency must be in range 31 - 65535";  // untranslated
Blockly.Msg.ARD_TYPE_ARRAY = "Array";  // untranslated
Blockly.Msg.ARD_TYPE_BOOL = "Boolean";  // untranslated
Blockly.Msg.ARD_TYPE_CHAR = "Character";  // untranslated
Blockly.Msg.ARD_TYPE_CHILDBLOCKMISSING = "ChildBlockMissing";  // untranslated
Blockly.Msg.ARD_TYPE_DECIMAL = "Decimal";  // untranslated
Blockly.Msg.ARD_TYPE_LONG = "Large Number";  // untranslated
Blockly.Msg.ARD_TYPE_NULL = "Null";  // untranslated
Blockly.Msg.ARD_TYPE_NUMBER = "Number";  // untranslated
Blockly.Msg.ARD_TYPE_SHORT = "Short Number";  // untranslated
Blockly.Msg.ARD_TYPE_TEXT = "Text";  // untranslated
Blockly.Msg.ARD_TYPE_UNDEF = "Undefined";  // untranslated
Blockly.Msg.ARD_VAR_AS = "as";  // untranslated
Blockly.Msg.ARD_VAR_AS_TIP = "Sets a value to a specific type";  // untranslated
Blockly.Msg.ARD_WRITE_TO = "to";  // untranslated
Blockly.Msg.AUTH = "Weart ännre:";
Blockly.Msg.CHANGE_VALUE_TITLE = "Neie Variable...";
Blockly.Msg.CHAT = "Sprech mit unsrem Mitoorweiter doorrich renschreiwe von Text hier in den Kaste!";
Blockly.Msg.CLEAN_UP = "Clean up Blocks";  // untranslated
Blockly.Msg.COLLAPSE_ALL = "Blocke zusammerfalte";
Blockly.Msg.COLLAPSE_BLOCK = "Block zusammerfalte";
Blockly.Msg.COLOUR_BLEND_COLOUR1 = "Farreb 1";
Blockly.Msg.COLOUR_BLEND_COLOUR2 = "mit Farreb 2";
Blockly.Msg.COLOUR_BLEND_HELPURL = "http://meyerweb.com/eric/tools/color-blend/";  // untranslated
Blockly.Msg.COLOUR_BLEND_RATIO = "im Verhältniss";
Blockly.Msg.COLOUR_BLEND_TITLE = "misch";
Blockly.Msg.COLOUR_BLEND_TOOLTIP = "Vermischt 2 Farwe mit konfigurierbare Farrebverhältniss (0.0 - 1.0).";
Blockly.Msg.COLOUR_PICKER_HELPURL = "https://hrx.wikipedia.org/wiki/Farreb";
Blockly.Msg.COLOUR_PICKER_TOOLTIP = "Wähl en Farreb von der Palett.";
Blockly.Msg.COLOUR_RANDOM_HELPURL = "http://randomcolour.com";  // untranslated
Blockly.Msg.COLOUR_RANDOM_TITLE = "zufälliche Farwe";
Blockly.Msg.COLOUR_RANDOM_TOOLTIP = "Wähl en Farreb noh dem Zufallsprinzip.";
Blockly.Msg.COLOUR_RGB_BLUE = "blau";
Blockly.Msg.COLOUR_RGB_GREEN = "grün";
Blockly.Msg.COLOUR_RGB_HELPURL = "http://www.december.com/html/spec/colorper.html";  // untranslated
Blockly.Msg.COLOUR_RGB_RED = "rot";
Blockly.Msg.COLOUR_RGB_TITLE = "Färreb mit";
Blockly.Msg.COLOUR_RGB_TOOLTIP = "Kreiere ene Farreb mit sellrbst definierte rot, grün und blau Wearte. All Wearte müsse zwischich 0 und 100 liehe.";
Blockly.Msg.CONTROLS_FLOW_STATEMENTS_HELPURL = "https://github.com/google/blockly/wiki/Loops#loop-termination-blocks";  // untranslated
Blockly.Msg.CONTROLS_FLOW_STATEMENTS_OPERATOR_BREAK = "ausbreche aus der Schleif";
Blockly.Msg.CONTROLS_FLOW_STATEMENTS_OPERATOR_CONTINUE = "mit der nächste Iteration fortfoohre aus der Schleifa";
Blockly.Msg.CONTROLS_FLOW_STATEMENTS_TOOLTIP_BREAK = "Die umgebne Schleif beenne.";
Blockly.Msg.CONTROLS_FLOW_STATEMENTS_TOOLTIP_CONTINUE = "Die Oonweisung abbreche und mit der nächste Schleifiteration fortfoohre.";
Blockly.Msg.CONTROLS_FLOW_STATEMENTS_WARNING = "Warnung: Die block sollt nuar in en Schleif verwennet sin.";
Blockly.Msg.CONTROLS_FOREACH_HELPURL = "https://github.com/google/blockly/wiki/Loops#for-each";  // untranslated
Blockly.Msg.CONTROLS_FOREACH_TITLE = "Für Weart %1 aus der List %2";
Blockly.Msg.CONTROLS_FOREACH_TOOLTIP = "Füahr en Oonweisung für jede Weart in der List aus und setzt dabei die Variable \"%1\" uff den aktuelle List Weart.";
Blockly.Msg.CONTROLS_FOR_HELPURL = "https://github.com/google/blockly/wiki/Loops#count-with";  // untranslated
Blockly.Msg.CONTROLS_FOR_TITLE = "Zähl %1 von %2 bis %3 mit %4";
Blockly.Msg.CONTROLS_FOR_TOOLTIP = "Zähl die Variable \"%1\" von enem Startweart bis zu enem Zielweart und füahrefür jede Weart en Oonweisung aus.";
Blockly.Msg.CONTROLS_IF_ELSEIF_TOOLTIP = "En weitre Bedingung hinzufüche.";
Blockly.Msg.CONTROLS_IF_ELSE_TOOLTIP = "En orrer Bedingung hinzufüche, füahrt en Oonweisung aus falls ken Bedingung zutrifft.";
Blockly.Msg.CONTROLS_IF_HELPURL = "https://github.com/google/blockly/wiki/IfElse";  // untranslated
Blockly.Msg.CONTROLS_IF_IF_TOOLTIP = "Hinzufüche, entferne orrer sortiere von Sektione";
Blockly.Msg.CONTROLS_IF_MSG_ELSE = "orrer";
Blockly.Msg.CONTROLS_IF_MSG_ELSEIF = "orrer wenn";
Blockly.Msg.CONTROLS_IF_MSG_IF = "wenn";
Blockly.Msg.CONTROLS_IF_TOOLTIP_1 = "Wenn en Bedingung woahr (true) ist, dann füahr en Oonweisung aus.";
Blockly.Msg.CONTROLS_IF_TOOLTIP_2 = "Wenn en Bedingung woahr (true) ist, dann füahr die earscht Oonweisung aus.  Ansonscht füahr die zwooite Oonweisung aus.";
Blockly.Msg.CONTROLS_IF_TOOLTIP_3 = "Wenn der erschte Bedingung woahr (true) ist, dann füahr die erschte Oonweisung aus.  Orrer wenn die zwooite Bedingung woahr (true) ist, dann füahr die zwooite Oonweisung aus.";
Blockly.Msg.CONTROLS_IF_TOOLTIP_4 = "Wenn der erscht Bedingung woahr (true) ist, dann füahr die erschte Oonweisung aus.  Orrer wenn die zwooite Bedingung woahr (true) ist, dann füahr die zwooite Oonweisung aus.  Falls ken der beide Bedingungen woahr (true) ist, dann füahr die dritte Oonweisung aus.";
Blockly.Msg.CONTROLS_REPEAT_HELPURL = "https://hrx.wikipedia.org/wiki/For-Schleif";
Blockly.Msg.CONTROLS_REPEAT_INPUT_DO = "mach";
Blockly.Msg.CONTROLS_REPEAT_TITLE = "wiederhol %1 mol";
Blockly.Msg.CONTROLS_REPEAT_TOOLTIP = "En Oonweisung meahrfach ausführe.";
Blockly.Msg.CONTROLS_WHILEUNTIL_HELPURL = "https://github.com/google/blockly/wiki/Loops#repeat";  // untranslated
Blockly.Msg.CONTROLS_WHILEUNTIL_OPERATOR_UNTIL = "Repetiere bis";
Blockly.Msg.CONTROLS_WHILEUNTIL_OPERATOR_WHILE = "Repetier solang";
Blockly.Msg.CONTROLS_WHILEUNTIL_TOOLTIP_UNTIL = "Füahr die Oonweisung solang aus wie die Bedingung falsch (false) ist.";
Blockly.Msg.CONTROLS_WHILEUNTIL_TOOLTIP_WHILE = "Füahr die Oonweisung solang aus wie die Bedingung woahr (true) ist.";
Blockly.Msg.DELETE_ALL_BLOCKS = "All %1 Bausten lösche?";
Blockly.Msg.DELETE_BLOCK = "Block lösche";
Blockly.Msg.DELETE_X_BLOCKS = "Block %1 lösche";
Blockly.Msg.DISABLE_BLOCK = "Block deaktivieren";
Blockly.Msg.DUPLICATE_BLOCK = "Kopieren";
Blockly.Msg.ENABLE_BLOCK = "Block aktivieren";
Blockly.Msg.EXPAND_ALL = "Blocke expandiere";
Blockly.Msg.EXPAND_BLOCK = "Block entfalte";
Blockly.Msg.EXTERNAL_INPUTS = "External Inputsexterne Ingänge";
Blockly.Msg.HELP = "Hellef";
Blockly.Msg.INLINE_INPUTS = "interne Ingänge";
Blockly.Msg.LISTS_CREATE_EMPTY_HELPURL = "https://github.com/google/blockly/wiki/Lists#create-empty-list";  // untranslated
Blockly.Msg.LISTS_CREATE_EMPTY_TITLE = "Generier/erzeich en leear List";
Blockly.Msg.LISTS_CREATE_EMPTY_TOOLTIP = "Generier/erzeich en leear List ohne Inhalt.";
Blockly.Msg.LISTS_CREATE_WITH_CONTAINER_TITLE_ADD = "List";
Blockly.Msg.LISTS_CREATE_WITH_CONTAINER_TOOLTIP = "Hinzufüche, entferne und sortiere von Elemente.";
Blockly.Msg.LISTS_CREATE_WITH_HELPURL = "https://github.com/google/blockly/wiki/Lists#create-list-with";  // untranslated
Blockly.Msg.LISTS_CREATE_WITH_INPUT_WITH = "Erzeich List mit";
Blockly.Msg.LISTS_CREATE_WITH_ITEM_TOOLTIP = "En Element zur List hinzufüche.";
Blockly.Msg.LISTS_CREATE_WITH_TOOLTIP = "Generier/erzeich en List mit konfigurierte Elemente.";
Blockly.Msg.LISTS_GET_INDEX_FIRST = "earste";
Blockly.Msg.LISTS_GET_INDEX_FROM_END = "#te von hinne";
Blockly.Msg.LISTS_GET_INDEX_FROM_START = "#";  // untranslated
Blockly.Msg.LISTS_GET_INDEX_GET = "Nehm";
Blockly.Msg.LISTS_GET_INDEX_GET_REMOVE = "Nehm und entfern";
Blockly.Msg.LISTS_GET_INDEX_LAST = "letzte";
Blockly.Msg.LISTS_GET_INDEX_RANDOM = "zufälliches";
Blockly.Msg.LISTS_GET_INDEX_REMOVE = "Entfern";
Blockly.Msg.LISTS_GET_INDEX_TAIL = "";  // untranslated
Blockly.Msg.LISTS_GET_INDEX_TOOLTIP_GET_FIRST = "Extrahiert das earste Element von der List.";
Blockly.Msg.LISTS_GET_INDEX_TOOLTIP_GET_FROM_END = "Extrahiert das #1te Element der List sei End.";
Blockly.Msg.LISTS_GET_INDEX_TOOLTIP_GET_FROM_START = "Extrahiert das #1te Element von der List.";
Blockly.Msg.LISTS_GET_INDEX_TOOLTIP_GET_LAST = "Extrahiert das letzte Element von der List.";
Blockly.Msg.LISTS_GET_INDEX_TOOLTIP_GET_RANDOM = "Extrahiert en zufälliches Element von der List.";
Blockly.Msg.LISTS_GET_INDEX_TOOLTIP_GET_REMOVE_FIRST = "Extrahiert und entfernt das earste Element von der List.";
Blockly.Msg.LISTS_GET_INDEX_TOOLTIP_GET_REMOVE_FROM_END = "Extrahiert und entfernt das #1te Element der List sei End.";
Blockly.Msg.LISTS_GET_INDEX_TOOLTIP_GET_REMOVE_FROM_START = "Extrahiert und entfernt das #1te Element von der List.";
Blockly.Msg.LISTS_GET_INDEX_TOOLTIP_GET_REMOVE_LAST = "Extrahiert und entfernt das letzte Element von der List.";
Blockly.Msg.LISTS_GET_INDEX_TOOLTIP_GET_REMOVE_RANDOM = "Extrahiert und entfernt en zufälliches Element von der List.";
Blockly.Msg.LISTS_GET_INDEX_TOOLTIP_REMOVE_FIRST = "Entfernt das earste Element von der List.";
Blockly.Msg.LISTS_GET_INDEX_TOOLTIP_REMOVE_FROM_END = "Entfernt das #1te Element der List sei End.";
Blockly.Msg.LISTS_GET_INDEX_TOOLTIP_REMOVE_FROM_START = "Entfernt das #1te Element von der List.";
Blockly.Msg.LISTS_GET_INDEX_TOOLTIP_REMOVE_LAST = "Entfernt das letzte Element von der List.";
Blockly.Msg.LISTS_GET_INDEX_TOOLTIP_REMOVE_RANDOM = "Entfernt en zufälliches Element von der List.";
Blockly.Msg.LISTS_GET_SUBLIST_END_FROM_END = "zu # vom End";
Blockly.Msg.LISTS_GET_SUBLIST_END_FROM_START = "zu #";
Blockly.Msg.LISTS_GET_SUBLIST_END_LAST = "zum Letzte";
Blockly.Msg.LISTS_GET_SUBLIST_HELPURL = "https://github.com/google/blockly/wiki/Lists#getting-a-sublist";  // untranslated
Blockly.Msg.LISTS_GET_SUBLIST_START_FIRST = "hol Unnerliste vom Earste";
Blockly.Msg.LISTS_GET_SUBLIST_START_FROM_END = "hol Unnerliste von # vom End";
Blockly.Msg.LISTS_GET_SUBLIST_START_FROM_START = "hol Unnerlist von #";
Blockly.Msg.LISTS_GET_SUBLIST_TAIL = "";  // untranslated
Blockly.Msg.LISTS_GET_SUBLIST_TOOLTIP = "Generiert en Kopie von en definierte Tel von en List.";
Blockly.Msg.LISTS_INDEX_OF_FIRST = "Such earstes Voarkommniss";
Blockly.Msg.LISTS_INDEX_OF_HELPURL = "https://github.com/google/blockly/wiki/Lists#getting-items-from-a-list";  // untranslated
Blockly.Msg.LISTS_INDEX_OF_LAST = "Such letztes Voarkommniss";
Blockly.Msg.LISTS_INDEX_OF_TOOLTIP = "Sucht die Position (index) von en Element in der List Gebt 0 zurück wenn nixs gefunn woard.";
Blockly.Msg.LISTS_INLIST = "in der List";
Blockly.Msg.LISTS_ISEMPTY_HELPURL = "https://github.com/google/blockly/wiki/Lists#is-empty";  // untranslated
Blockly.Msg.LISTS_ISEMPTY_TITLE = "%1 ist leear?";
Blockly.Msg.LISTS_ISEMPTY_TOOLTIP = "Ist woahr (true), wenn die List leear ist.";
Blockly.Msg.LISTS_LENGTH_HELPURL = "https://github.com/google/blockly/wiki/Lists#length-of";  // untranslated
Blockly.Msg.LISTS_LENGTH_TITLE = "länge %1";
Blockly.Msg.LISTS_LENGTH_TOOLTIP = "Die Oonzoohl von Elemente in der List.";
Blockly.Msg.LISTS_REPEAT_HELPURL = "https://github.com/google/blockly/wiki/Lists#create-list-with";  // untranslated
Blockly.Msg.LISTS_REPEAT_TITLE = "Erzich List mit Element %1 wiederhol das %2 mol";
Blockly.Msg.LISTS_REPEAT_TOOLTIP = "Erzeicht en List mit en variable Oonzoohl von Elemente";
Blockly.Msg.LISTS_SET_INDEX_HELPURL = "https://github.com/google/blockly/wiki/Lists#in-list--set";  // untranslated
Blockly.Msg.LISTS_SET_INDEX_INPUT_TO = "uff";
Blockly.Msg.LISTS_SET_INDEX_INSERT = "tue ren setz an";
Blockly.Msg.LISTS_SET_INDEX_SET = "setz";
Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_INSERT_FIRST = "Tut das Element an en Oonfang von en List ren setze.";
Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_INSERT_FROM_END = "Tut das Element ren setze an en definierte Position an en List.  #1 ist das letzte Element.";
Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_INSERT_FROM_START = "Tut das Element ren setze an en definierte Position an en List.  #1 ist das earschte Element.";
Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_INSERT_LAST = "Oonhängt das Element zu en List sei End.";
Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_INSERT_RANDOM = "Tut das Element zufällich an en List ren setze.";
Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_SET_FIRST = "Sets the first item in a list.Setzt das earschte Element an en list.";
Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_SET_FROM_END = "Setzt das Element zu en definierte Position an en List. #1 ist das letzte Element.";
Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_SET_FROM_START = "Setzt das Element zu en definierte Stell in en List.  #1 ist das earschte Element.";
Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_SET_LAST = "Setzt das letzte Element an en List.";
Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_SET_RANDOM = "Setzt en zufälliches Element an en List.";
Blockly.Msg.LISTS_SORT_HELPURL = "https://github.com/google/blockly/wiki/Lists#sorting-a-list";  // untranslated
Blockly.Msg.LISTS_SORT_ORDER_ASCENDING = "ascending";  // untranslated
Blockly.Msg.LISTS_SORT_ORDER_DESCENDING = "descending";  // untranslated
Blockly.Msg.LISTS_SORT_TITLE = "sort %1 %2 %3";  // untranslated
Blockly.Msg.LISTS_SORT_TOOLTIP = "Sort a copy of a list.";  // untranslated
Blockly.Msg.LISTS_SORT_TYPE_IGNORECASE = "alphabetic, ignore case";  // untranslated
Blockly.Msg.LISTS_SORT_TYPE_NUMERIC = "numeric";  // untranslated
Blockly.Msg.LISTS_SORT_TYPE_TEXT = "alphabetic";  // untranslated
Blockly.Msg.LISTS_SPLIT_HELPURL = "https://github.com/google/blockly/wiki/Lists#splitting-strings-and-joining-lists";  // untranslated
Blockly.Msg.LISTS_SPLIT_LIST_FROM_TEXT = "make list from text";  // untranslated
Blockly.Msg.LISTS_SPLIT_TEXT_FROM_LIST = "make text from list";  // untranslated
Blockly.Msg.LISTS_SPLIT_TOOLTIP_JOIN = "Join a list of texts into one text, separated by a delimiter.";  // untranslated
Blockly.Msg.LISTS_SPLIT_TOOLTIP_SPLIT = "Split text into a list of texts, breaking at each delimiter.";  // untranslated
Blockly.Msg.LISTS_SPLIT_WITH_DELIMITER = "with delimiter";  // untranslated
Blockly.Msg.LOGIC_BOOLEAN_FALSE = "falsch";
Blockly.Msg.LOGIC_BOOLEAN_HELPURL = "https://github.com/google/blockly/wiki/Logic#values";  // untranslated
Blockly.Msg.LOGIC_BOOLEAN_TOOLTIP = "Ist entweder woahr (true) orrer falsch (false)";
Blockly.Msg.LOGIC_BOOLEAN_TRUE = "woahr";
Blockly.Msg.LOGIC_COMPARE_HELPURL = "https://hrx.wikipedia.org/wiki/Vergleich_%28Zahlen%29";
Blockly.Msg.LOGIC_COMPARE_TOOLTIP_EQ = "Ist woahr (true) wenn beide Wearte identisch sind.";
Blockly.Msg.LOGIC_COMPARE_TOOLTIP_GT = "Ist woahr (true) wenn der erschte Weart grösser als der zwooite Weart ist.";
Blockly.Msg.LOGIC_COMPARE_TOOLTIP_GTE = "Ist woahr (true) wenn der erschte Weart grösser als orrer gleich gross wie zwooite Weart ist.";
Blockly.Msg.LOGIC_COMPARE_TOOLTIP_LT = "Ist woahr (true) wenn der earschte Weart klener als der zwooite Weart ist.";
Blockly.Msg.LOGIC_COMPARE_TOOLTIP_LTE = "Ist woahr (true) wenn der earscht Weart klener als orrer gleich gross wie zwooite Weart ist.";
Blockly.Msg.LOGIC_COMPARE_TOOLTIP_NEQ = "Ist woahr (true) wenn beide Wearte unnerschiedlich sind.";
Blockly.Msg.LOGIC_NEGATE_HELPURL = "https://github.com/google/blockly/wiki/Logic#not";  // untranslated
Blockly.Msg.LOGIC_NEGATE_TITLE = "net %1";
Blockly.Msg.LOGIC_NEGATE_TOOLTIP = "Ist woahr (true) wenn der Ingäweweart falsch (false) ist.  Ist falsch (false) wenn der Ingäweweart woahr (true) ist.";
Blockly.Msg.LOGIC_NULL = "null";
Blockly.Msg.LOGIC_NULL_HELPURL = "https://en.wikipedia.org/wiki/Nullable_type";  // untranslated
Blockly.Msg.LOGIC_NULL_TOOLTIP = "Is NULL.";
Blockly.Msg.LOGIC_OPERATION_AND = "und";
Blockly.Msg.LOGIC_OPERATION_HELPURL = "https://github.com/google/blockly/wiki/Logic#logical-operations";  // untranslated
Blockly.Msg.LOGIC_OPERATION_OR = "orrer";
Blockly.Msg.LOGIC_OPERATION_TOOLTIP_AND = "Ist woahr (true) wenn beide Wearte woahr (true) sind.";
Blockly.Msg.LOGIC_OPERATION_TOOLTIP_OR = "Ist woahr (true) wenn en von der beide Wearte woahr (true) ist.";
Blockly.Msg.LOGIC_TERNARY_CONDITION = "test";
Blockly.Msg.LOGIC_TERNARY_HELPURL = "https://en.wikipedia.org/wiki/%3F:";  // untranslated
Blockly.Msg.LOGIC_TERNARY_IF_FALSE = "wenn falsch";
Blockly.Msg.LOGIC_TERNARY_IF_TRUE = "wenn woahr";
Blockly.Msg.LOGIC_TERNARY_TOOLTIP = "Üwerprüft en Bedingung \"test\". Wenn die Bedingung woahr ist weerd der \"wenn woahr\" Weart zurückgeb, annerfalls der \"wenn falsch\" Weart";
Blockly.Msg.MATH_ADDITION_SYMBOL = "+";  // untranslated
Blockly.Msg.MATH_ARITHMETIC_HELPURL = "https://hrx.wikipedia.org/wiki/Grundrechenoort";
Blockly.Msg.MATH_ARITHMETIC_TOOLTIP_ADD = "Ist die Summe zwooier Wearte.";
Blockly.Msg.MATH_ARITHMETIC_TOOLTIP_DIVIDE = "Ist der Quotient zwooier Wearte.";
Blockly.Msg.MATH_ARITHMETIC_TOOLTIP_MINUS = "Ist die Differenz zwooier Wearte.";
Blockly.Msg.MATH_ARITHMETIC_TOOLTIP_MULTIPLY = "Ist das Produkt zwooier Wearte.";
Blockly.Msg.MATH_ARITHMETIC_TOOLTIP_POWER = "Ist der earschte Weart potenziert mit dem zoiten Weart.";
Blockly.Msg.MATH_CHANGE_HELPURL = "https://hrx.wikipedia.org/wiki/Inkrement_und_Dekrement";
Blockly.Msg.MATH_CHANGE_TITLE = "mach höcher / erhöhe %1 um %2";
Blockly.Msg.MATH_CHANGE_TOOLTIP = "Addiert en Weart zur Variable \"%1\" hinzu.";
Blockly.Msg.MATH_CONSTANT_HELPURL = "https://hrx.wikipedia.org/wiki/Mathematische_Konstante";
Blockly.Msg.MATH_CONSTANT_TOOLTIP = "Mathematische Konstante wie: π (3.141…), e (2.718…), φ (1.618…), sqrt(2) (1.414…), sqrt(½) (0.707…) oder ∞ (unendlich).";
Blockly.Msg.MATH_CONSTRAIN_HELPURL = "https://en.wikipedia.org/wiki/Clamping_%28graphics%29";  // untranslated
Blockly.Msg.MATH_CONSTRAIN_TITLE = "begrenze %1 von %2 bis %3";
Blockly.Msg.MATH_CONSTRAIN_TOOLTIP = "Begrenzt den Weartebereich mittels von / bis Wearte. (inklusiv)";
Blockly.Msg.MATH_DIVISION_SYMBOL = "÷";  // untranslated
Blockly.Msg.MATH_IS_DIVISIBLE_BY = "ist telbar/kann getelt sin doorrich";
Blockly.Msg.MATH_IS_EVEN = "ist grood";
Blockly.Msg.MATH_IS_NEGATIVE = "ist negativ";
Blockly.Msg.MATH_IS_ODD = "ist ungrood";
Blockly.Msg.MATH_IS_POSITIVE = "ist positiv";
Blockly.Msg.MATH_IS_PRIME = "ist en Primenzoohl";
Blockly.Msg.MATH_IS_TOOLTIP = "Üwerprüft ob en Zoohl grood, ungrood, en Primenzoohl, ganzzoohlich, positiv, negativ orrer doorrich en zwooite Zoohl telbar ist.  Gebt woahr (true) orrer falsch (false) zurück.";
Blockly.Msg.MATH_IS_WHOLE = "ganze Zoohl";
Blockly.Msg.MATH_MODULO_HELPURL = "https://hrx.wikipedia.org/wiki/Modulo";
Blockly.Msg.MATH_MODULO_TITLE = "Rest von %1 ÷ %2";
Blockly.Msg.MATH_MODULO_TOOLTIP = "Der Rest noh en Division.";
Blockly.Msg.MATH_MULTIPLICATION_SYMBOL = "×";  // untranslated
Blockly.Msg.MATH_NUMBER_HELPURL = "https://hrx.wikipedia.org/wiki/Zoohl";
Blockly.Msg.MATH_NUMBER_TOOLTIP = "En Zoohl.";
Blockly.Msg.MATH_ONLIST_HELPURL = "";  // untranslated
Blockly.Msg.MATH_ONLIST_OPERATOR_AVERAGE = "Mittelweart en List";
Blockly.Msg.MATH_ONLIST_OPERATOR_MAX = "Maximalweart en List";
Blockly.Msg.MATH_ONLIST_OPERATOR_MEDIAN = "Median von en List";
Blockly.Msg.MATH_ONLIST_OPERATOR_MIN = "Minimalweart von en List";
Blockly.Msg.MATH_ONLIST_OPERATOR_MODE = "Restweart von en List";
Blockly.Msg.MATH_ONLIST_OPERATOR_RANDOM = "Zufallsweart von en List";
Blockly.Msg.MATH_ONLIST_OPERATOR_STD_DEV = "Standart/Padrong Abweichung von en List";
Blockly.Msg.MATH_ONLIST_OPERATOR_SUM = "Summe von en List";
Blockly.Msg.MATH_ONLIST_TOOLTIP_AVERAGE = "Ist der Doorrichschnittsweart von aller Wearte in en List.";
Blockly.Msg.MATH_ONLIST_TOOLTIP_MAX = "Ist der grösste Weart in en List.";
Blockly.Msg.MATH_ONLIST_TOOLTIP_MEDIAN = "Ist der Zentralweart von aller Wearte in en List.";
Blockly.Msg.MATH_ONLIST_TOOLTIP_MIN = "Ist der klenste Weart in en List.";
Blockly.Msg.MATH_ONLIST_TOOLTIP_MODE = "Findt den am häifichste voarkommend Weart in en List.  Falls ken Weart öftersch voarkomme als all annre, weard die originale List zurückgeche";
Blockly.Msg.MATH_ONLIST_TOOLTIP_RANDOM = "Geb en Zufallsweart aus der List zurück.";
Blockly.Msg.MATH_ONLIST_TOOLTIP_STD_DEV = "Ist die standartiesierte/padronisierte Standartabweichung/Padrongabweichung von aller Wearte in der List";
Blockly.Msg.MATH_ONLIST_TOOLTIP_SUM = "Ist die Summ aller Wearte in en List.";
Blockly.Msg.MATH_POWER_SYMBOL = "^";  // untranslated
Blockly.Msg.MATH_RANDOM_FLOAT_HELPURL = "https://hex.wikipedia.org/wiki/Zufallszoohle";
Blockly.Msg.MATH_RANDOM_FLOAT_TITLE_RANDOM = "Zufallszoohl (0.0 -1.0)";
Blockly.Msg.MATH_RANDOM_FLOAT_TOOLTIP = "Generier/erzeich en Zufallszoohl zwischich 0.0 (inklusiv) und 1.0 (exklusiv).";
Blockly.Msg.MATH_RANDOM_INT_HELPURL = "https://hrx.wikipedia.org/wiki/Zufallszahlen";
Blockly.Msg.MATH_RANDOM_INT_TITLE = "ganzoohlicher Zufallswearte zwischich %1 bis %2";
Blockly.Msg.MATH_RANDOM_INT_TOOLTIP = "Generier/erzeich en ganzähliche Zufallsweart zwischich zwooi Wearte (inklusiv).";
Blockly.Msg.MATH_ROUND_HELPURL = "https://hrx.wikipedia.org/wiki/Runden";
Blockly.Msg.MATH_ROUND_OPERATOR_ROUND = "runde";
Blockly.Msg.MATH_ROUND_OPERATOR_ROUNDDOWN = "ab runde";
Blockly.Msg.MATH_ROUND_OPERATOR_ROUNDUP = "uff runde";
Blockly.Msg.MATH_ROUND_TOOLTIP = "En Zoohl uff orrer ab runde.";
Blockly.Msg.MATH_SINGLE_HELPURL = "https://hrx.wikipedia.org/wiki/Quadratwoorzel";
Blockly.Msg.MATH_SINGLE_OP_ABSOLUTE = "Absolutweart";
Blockly.Msg.MATH_SINGLE_OP_ROOT = "Quadratwoorzel";
Blockly.Msg.MATH_SINGLE_TOOLTIP_ABS = "Ist der Absolutweart von en Weart.";
Blockly.Msg.MATH_SINGLE_TOOLTIP_EXP = "Ist Weart von der Exponentialfunktion von en Weart.";
Blockly.Msg.MATH_SINGLE_TOOLTIP_LN = "Ist der natüarliche Logarithmus von en Weart.";
Blockly.Msg.MATH_SINGLE_TOOLTIP_LOG10 = "Ist der dekoodische Logarithmus von en Weart.";
Blockly.Msg.MATH_SINGLE_TOOLTIP_NEG = "Negiert en Weart.";
Blockly.Msg.MATH_SINGLE_TOOLTIP_POW10 = "Rechnet 10 hoch Ingäbweart.";
Blockly.Msg.MATH_SINGLE_TOOLTIP_ROOT = "Ist die Qudratwoorzel von en Weart.";
Blockly.Msg.MATH_SUBTRACTION_SYMBOL = "-";  // untranslated
Blockly.Msg.MATH_TRIG_ACOS = "acos";  // untranslated
Blockly.Msg.MATH_TRIG_ASIN = "asin";  // untranslated
Blockly.Msg.MATH_TRIG_ATAN = "atan";  // untranslated
Blockly.Msg.MATH_TRIG_COS = "cos";  // untranslated
Blockly.Msg.MATH_TRIG_HELPURL = "https://hrx.wikipedia.org/wiki/Trigonometrie";
Blockly.Msg.MATH_TRIG_SIN = "sin";  // untranslated
Blockly.Msg.MATH_TRIG_TAN = "tan";  // untranslated
Blockly.Msg.MATH_TRIG_TOOLTIP_ACOS = "Ist der Arcuscosinus von en Ingabweart.";
Blockly.Msg.MATH_TRIG_TOOLTIP_ASIN = "Ist der Arcussinus von en Ingäbweart.";
Blockly.Msg.MATH_TRIG_TOOLTIP_ATAN = "Ist der Arcustangens von en Ingäbweart.";
Blockly.Msg.MATH_TRIG_TOOLTIP_COS = "Ist der Cosinus von en Winkel.";
Blockly.Msg.MATH_TRIG_TOOLTIP_SIN = "Ist der Sinus von en Winkel.";
Blockly.Msg.MATH_TRIG_TOOLTIP_TAN = "Ist der Tangens von en Winkel.";
Blockly.Msg.ME = "Ich";
Blockly.Msg.NEW_VARIABLE = "Neie Variable...";
Blockly.Msg.NEW_VARIABLE_TITLE = "Die neie Variable sei Noome:";
Blockly.Msg.ORDINAL_NUMBER_SUFFIX = "";  // untranslated
Blockly.Msg.PROCEDURES_ALLOW_STATEMENTS = "allow statements";  // untranslated
Blockly.Msg.PROCEDURES_BEFORE_PARAMS = "mit:";
Blockly.Msg.PROCEDURES_CALLNORETURN_HELPURL = "https://hrx.wikipedia.org/wiki/Prozedur_%28Programmierung%29";
Blockly.Msg.PROCEDURES_CALLNORETURN_TOOLTIP = "Ruf en Funktionsblock ohne Rückgäweart uff.";
Blockly.Msg.PROCEDURES_CALLRETURN_HELPURL = "https://hrx.wikipedia.org/wiki/Prozedur_%28Programmierung%29";
Blockly.Msg.PROCEDURES_CALLRETURN_TOOLTIP = "Ruf en Funktionsblock mit Rückgäbweart uff.";
Blockly.Msg.PROCEDURES_CALL_BEFORE_PARAMS = "mit:";
Blockly.Msg.PROCEDURES_CREATE_DO = "Generier/erzeich \"Uffruf %1\"";
Blockly.Msg.PROCEDURES_DEFNORETURN_COMMENT = "Describe this function...";  // untranslated
Blockly.Msg.PROCEDURES_DEFNORETURN_DO = "";  // untranslated
Blockly.Msg.PROCEDURES_DEFNORETURN_HELPURL = "https://en.wikipedia.org/wiki/Procedure_%28computer_science%29";  // untranslated
Blockly.Msg.PROCEDURES_DEFNORETURN_PROCEDURE = "Funktionsblock";
Blockly.Msg.PROCEDURES_DEFNORETURN_TITLE = "zu";
Blockly.Msg.PROCEDURES_DEFNORETURN_TOOLTIP = "En Funktionsblock ohne Rückgäbweart.";
Blockly.Msg.PROCEDURES_DEFRETURN_HELPURL = "https://en.wikipedia.org/wiki/Procedure_%28computer_science%29";  // untranslated
Blockly.Msg.PROCEDURES_DEFRETURN_RETURN = "geb zurück";
Blockly.Msg.PROCEDURES_DEFRETURN_TOOLTIP = "En Funktionsblock mit Rückgäbweart.";
Blockly.Msg.PROCEDURES_DEF_DUPLICATE_WARNING = "Warnung: die Funktionsblock hot doppelt Parameter.";
Blockly.Msg.PROCEDURES_HIGHLIGHT_DEF = "Markiear Funktionsblock";
Blockly.Msg.PROCEDURES_IFRETURN_HELPURL = "http://c2.com/cgi/wiki?GuardClause";  // untranslated
Blockly.Msg.PROCEDURES_IFRETURN_TOOLTIP = "Wenn der earste Weart woahr (true) ist, Geb den zwooite Weart zurück.";
Blockly.Msg.PROCEDURES_IFRETURN_WARNING = "Warnung: Der Block därref nuar innich en Funktionsblock genutzt sin.";
Blockly.Msg.PROCEDURES_MUTATORARG_TITLE = "Markiear Funktionsblock";
Blockly.Msg.PROCEDURES_MUTATORARG_TOOLTIP = "Generier/erzeich \"Uffruf %1\"";
Blockly.Msg.PROCEDURES_MUTATORCONTAINER_TITLE = "Parameter";
Blockly.Msg.PROCEDURES_MUTATORCONTAINER_TOOLTIP = "Variable:";
Blockly.Msg.REDO = "Redo";  // untranslated
Blockly.Msg.REMOVE_COMMENT = "Kommentar entferne";
Blockly.Msg.RENAME_VARIABLE = "Die neie Variable sei Noome:";
Blockly.Msg.RENAME_VARIABLE_TITLE = "All \"%1\" Variable umbenenne in:";
Blockly.Msg.REPLACE_EXISTING_BLOCKS = "Replace existing blocks? 'Cancel' will merge.";  // untranslated
Blockly.Msg.TEXT_APPEND_APPENDTEXT = "Text oonhänge";
Blockly.Msg.TEXT_APPEND_HELPURL = "https://github.com/google/blockly/wiki/Text#text-modification";  // untranslated
Blockly.Msg.TEXT_APPEND_TO = "An";
Blockly.Msg.TEXT_APPEND_TOOLTIP = "Text an die Variable \"%1\" oonhänge.";
Blockly.Msg.TEXT_CHANGECASE_HELPURL = "https://github.com/google/blockly/wiki/Text#adjusting-text-case";  // untranslated
Blockly.Msg.TEXT_CHANGECASE_OPERATOR_LOWERCASE = "umwandle in klenbuchstoobe";
Blockly.Msg.TEXT_CHANGECASE_OPERATOR_TITLECASE = "umwandle in Wörter";
Blockly.Msg.TEXT_CHANGECASE_OPERATOR_UPPERCASE = "umwandle in GROSSBUCHSTOOBE";
Blockly.Msg.TEXT_CHANGECASE_TOOLTIP = "Wandelt Schreibweise von Texte um, in Grossbuchstoobe, Klenbuchstoobe orrer den earste Buchstoob von jedes Wort gross und die annre klen.";
Blockly.Msg.TEXT_CHARAT_FIRST = "hol earschte Buchstoob";
Blockly.Msg.TEXT_CHARAT_FROM_END = "hol Buchstoob # von End";
Blockly.Msg.TEXT_CHARAT_FROM_START = "hol Buchstoob #";
Blockly.Msg.TEXT_CHARAT_HELPURL = "https://github.com/google/blockly/wiki/Text#extracting-text";  // untranslated
Blockly.Msg.TEXT_CHARAT_INPUT_INTEXT = "in Text";
Blockly.Msg.TEXT_CHARAT_LAST = "hol letztes Wort";
Blockly.Msg.TEXT_CHARAT_RANDOM = "hol zufälliches Buchstoob";
Blockly.Msg.TEXT_CHARAT_TAIL = "";  // untranslated
Blockly.Msg.TEXT_CHARAT_TOOLTIP = "Extrahiear en Buchstoob von en spezifizierte Position.";
Blockly.Msg.TEXT_CREATE_JOIN_ITEM_TOOLTIP = "En Element zum Text hinzufüche.";
Blockly.Msg.TEXT_CREATE_JOIN_TITLE_JOIN = "verbinne";
Blockly.Msg.TEXT_CREATE_JOIN_TOOLTIP = "Hinzufüche, entfernne und sortiere von Elemente.";
Blockly.Msg.TEXT_GET_SUBSTRING_END_FROM_END = "bis #te Buchstoob von hinne";
Blockly.Msg.TEXT_GET_SUBSTRING_END_FROM_START = "bis Buchstoob #te";
Blockly.Msg.TEXT_GET_SUBSTRING_END_LAST = "bis letzte Buchstoob";
Blockly.Msg.TEXT_GET_SUBSTRING_HELPURL = "https://github.com/google/blockly/wiki/Text#extracting-a-region-of-text";  // untranslated
Blockly.Msg.TEXT_GET_SUBSTRING_INPUT_IN_TEXT = "in Text";
Blockly.Msg.TEXT_GET_SUBSTRING_START_FIRST = "earschte Buchstoob";
Blockly.Msg.TEXT_GET_SUBSTRING_START_FROM_END = "hol #te Buchstoob von hinne";
Blockly.Msg.TEXT_GET_SUBSTRING_START_FROM_START = "hol substring Buchstoob #te";
Blockly.Msg.TEXT_GET_SUBSTRING_TAIL = "";  // untranslated
Blockly.Msg.TEXT_GET_SUBSTRING_TOOLTIP = "Schickt en bestimmstes Tel von dem Text retuar.";
Blockly.Msg.TEXT_INDEXOF_HELPURL = "https://github.com/google/blockly/wiki/Text#finding-text";  // untranslated
Blockly.Msg.TEXT_INDEXOF_INPUT_INTEXT = "im Text";
Blockly.Msg.TEXT_INDEXOF_OPERATOR_FIRST = "Such der Begriff sein earstes Voarkommniss";
Blockly.Msg.TEXT_INDEXOF_OPERATOR_LAST = "Suche der Begriff sein letztes Vorkommniss.";
Blockly.Msg.TEXT_INDEXOF_TAIL = "";  // untranslated
Blockly.Msg.TEXT_INDEXOF_TOOLTIP = "Findt das earste / letzte Voarkommniss von en Suchbegriffes in enem Text.  Gebt die Position von dem Begriff orrer 0 zurück.";
Blockly.Msg.TEXT_ISEMPTY_HELPURL = "https://github.com/google/blockly/wiki/Text#checking-for-empty-text";  // untranslated
Blockly.Msg.TEXT_ISEMPTY_TITLE = "%1 ist leer?";
Blockly.Msg.TEXT_ISEMPTY_TOOLTIP = "Ist woahr (true), wenn der Text leer ist.";
Blockly.Msg.TEXT_JOIN_HELPURL = "https://github.com/google/blockly/wiki/Text#text-creation";  // untranslated
Blockly.Msg.TEXT_JOIN_TITLE_CREATEWITH = "Erstell Text aus";
Blockly.Msg.TEXT_JOIN_TOOLTIP = "Erstellt en Text doorrich das verbinne von mehre Textelemente.";
Blockly.Msg.TEXT_LENGTH_HELPURL = "https://github.com/google/blockly/wiki/Text#text-modification";  // untranslated
Blockly.Msg.TEXT_LENGTH_TITLE = "läng %1";
Blockly.Msg.TEXT_LENGTH_TOOLTIP = "Die Oonzoohl von Zeiche in enem Text. (inkl. Leerzeiche)";
Blockly.Msg.TEXT_PRINT_HELPURL = "https://github.com/google/blockly/wiki/Text#printing-text";  // untranslated
Blockly.Msg.TEXT_PRINT_TITLE = "Ausgäb %1";
Blockly.Msg.TEXT_PRINT_TOOLTIP = "Geb den Inhalt von en Variable aus.";
Blockly.Msg.TEXT_PROMPT_HELPURL = "https://github.com/google/blockly/wiki/Text#getting-input-from-the-user";  // untranslated
Blockly.Msg.TEXT_PROMPT_TOOLTIP_NUMBER = "Frocht den Benutzer noh en Zoohl.";
Blockly.Msg.TEXT_PROMPT_TOOLTIP_TEXT = "Frocht den Benutzer noh enem Text.";
Blockly.Msg.TEXT_PROMPT_TYPE_NUMBER = "Frächt noh Zoohl mit Hinweis";
Blockly.Msg.TEXT_PROMPT_TYPE_TEXT = "Frocht noh Text mit Hinweis";
Blockly.Msg.TEXT_TEXT_HELPURL = "https://en.wikipedia.org/wiki/String_(computer_science)https://hrx.wikipedia.org/wiki/Zeichenkette";
Blockly.Msg.TEXT_TEXT_TOOLTIP = "En Buchstoob, Text orrer Satz.";
Blockly.Msg.TEXT_TRIM_HELPURL = "https://github.com/google/blockly/wiki/Text#trimming-removing-spaces";  // untranslated
Blockly.Msg.TEXT_TRIM_OPERATOR_BOTH = "entfern Leerzeiche von Oonfang und End Seite";
Blockly.Msg.TEXT_TRIM_OPERATOR_LEFT = "entferne Leerzeiche von Oonfang Seite";
Blockly.Msg.TEXT_TRIM_OPERATOR_RIGHT = "entferne Leerzeiche von End Seite von";
Blockly.Msg.TEXT_TRIM_TOOLTIP = "Entfernt Leerzeiche vom Oonfang und / orrer End von en Text.";
Blockly.Msg.TODAY = "Today";  // untranslated
Blockly.Msg.UNDO = "Undo";  // untranslated
Blockly.Msg.VARIABLES_DEFAULT_NAME = "Element";
Blockly.Msg.VARIABLES_GET_CREATE_SET = "Generier/erzeiche \"Schreibe %1\"";
Blockly.Msg.VARIABLES_GET_HELPURL = "https://github.com/google/blockly/wiki/Variables#get";  // untranslated
Blockly.Msg.VARIABLES_GET_TOOLTIP = "Gebt der Variable sein Weart zurück.";
Blockly.Msg.VARIABLES_SET = "Schreib %1 zu %2";
Blockly.Msg.VARIABLES_SET_CREATE_GET = "Generier/erzeich \"Lese %1\"";
Blockly.Msg.VARIABLES_SET_HELPURL = "https://github.com/google/blockly/wiki/Variables#set";  // untranslated
Blockly.Msg.VARIABLES_SET_TOOLTIP = "Setzt en Variable sei Weart.";
Blockly.Msg.MATH_CHANGE_TITLE_ITEM = Blockly.Msg.VARIABLES_DEFAULT_NAME;
Blockly.Msg.PROCEDURES_DEFRETURN_TITLE = Blockly.Msg.PROCEDURES_DEFNORETURN_TITLE;
Blockly.Msg.CONTROLS_IF_IF_TITLE_IF = Blockly.Msg.CONTROLS_IF_MSG_IF;
Blockly.Msg.CONTROLS_WHILEUNTIL_INPUT_DO = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO;
Blockly.Msg.CONTROLS_IF_MSG_THEN = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO;
Blockly.Msg.CONTROLS_IF_ELSE_TITLE_ELSE = Blockly.Msg.CONTROLS_IF_MSG_ELSE;
Blockly.Msg.PROCEDURES_DEFRETURN_PROCEDURE = Blockly.Msg.PROCEDURES_DEFNORETURN_PROCEDURE;
Blockly.Msg.LISTS_GET_SUBLIST_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST;
Blockly.Msg.LISTS_GET_INDEX_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST;
Blockly.Msg.PROCEDURES_DEFRETURN_DO = Blockly.Msg.PROCEDURES_DEFNORETURN_DO;
Blockly.Msg.CONTROLS_IF_ELSEIF_TITLE_ELSEIF = Blockly.Msg.CONTROLS_IF_MSG_ELSEIF;
Blockly.Msg.LISTS_GET_INDEX_HELPURL = Blockly.Msg.LISTS_INDEX_OF_HELPURL;
Blockly.Msg.CONTROLS_FOREACH_INPUT_DO = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO;
Blockly.Msg.LISTS_SET_INDEX_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST;
Blockly.Msg.CONTROLS_FOR_INPUT_DO = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO;
Blockly.Msg.LISTS_CREATE_WITH_ITEM_TITLE = Blockly.Msg.VARIABLES_DEFAULT_NAME;
Blockly.Msg.TEXT_APPEND_VARIABLE = Blockly.Msg.VARIABLES_DEFAULT_NAME;
Blockly.Msg.TEXT_CREATE_JOIN_ITEM_TITLE_ITEM = Blockly.Msg.VARIABLES_DEFAULT_NAME;
Blockly.Msg.LISTS_INDEX_OF_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST;
Blockly.Msg.PROCEDURES_DEFRETURN_COMMENT = Blockly.Msg.PROCEDURES_DEFNORETURN_COMMENT;


text:
package org.headb.sandpile;

import java.util.*;
import gnu.trove.list.array.TIntArrayList;
import gnu.trove.stack.array.TIntArrayStack;

/**
 * Represents a weighted, directed graph with methods for updating a sandpile
 * configuration on that graph. Contains methods for calculating several
 * important configuration. The most efficient method of updating a config
 * repeatedly is to use an iterator returned by inPlaceParallelUpdater(config). Calling
 * the iterator's next() method will transform config into the next
 * configuration. This class is quite optimized for updating, and not as much
 * for adding and removing vertices, and doing non-iterating reads. However,
 * the performance should be more than sufficient for manual creation of graphs.
 * @author Bryan Head
 */
public class SandpileGraph {

    // Edges are represented by Edge arrays
    // where int[0] = source
    // int[1] = dest
    // int[2] = weight
    private ArrayList<EdgeOffsetList> offsetLists;
    private HashMap<EdgeOffsetList, Integer> vertexCounts;
    //private TIntArrayList degrees;
    private ArrayList<EdgeOffsetList> vertsToOffsetLists;
    private int[] degrees;

    /**
     * Creates a new, empty graph.
     */
    public SandpileGraph() {
        this.offsetLists = new ArrayList<EdgeOffsetList>();
        this.vertsToOffsetLists = new ArrayList<EdgeOffsetList>();
        this.vertexCounts = new HashMap<EdgeOffsetList, Integer>();
        degrees = new int[0];
    }

    public SandpileGraph(SandpileGraph graph) {
        this.offsetLists = new ArrayList<EdgeOffsetList>();
        this.vertsToOffsetLists = new ArrayList<EdgeOffsetList>();
        this.vertexCounts = new HashMap<EdgeOffsetList, Integer>();
        degrees = new int[graph.numVertices()];

        for (int v = 0; v < graph.numVertices(); v++) {
            addVertex();
            placeVertexWithOffsets(v, graph.getOffsetList(v));
            degrees[v] = graph.degreeQuick(v);
        }
    }

    private EdgeOffsetList getOffsetList(int vert) {
        return vertsToOffsetLists.get(vert);
    }

    /**
     * Returns the number of vertices.
     * @return An int of the number of vertices.
     */
    public int numVertices() {
        return vertsToOffsetLists.size();
    }

    /**
     * Retrieves the sum of the weights of the outgoing edges of the given
     * vertex.
     *
     * @param vert The index of the vertex.
     * @return The sum of the weights of the outgoing edges of the given vertex.
     */
    public int degree(int vert) {
        //return this.vertices.get(vert).degree();
        return getOffsetList(vert).degree();
    }

    /**
     * Retrieves the sum of the weights of the outgoing edges of the given
     * vertex. Does not check to see if the index is within range, thus
     * creating unpredictable behavior if it is not.
     *
     * @param vert The index of the vertex.
     * @return The sum of the weights of the outgoing edges of the given vertex.
     */
    public int degreeQuick(int vert) {
        return degrees[vert];
    }

    /**
     * Retrieves the list of edges which begin with the source vertex.
     */
    public final EdgeList getOutgoingEdges(int vert) {
        return vertsToOffsetLists.get(vert).getOutgoingEdges(vert);
    }

    private int getBlockSize(EdgeOffsetList offsetList) {
        return vertexCounts.get(offsetList);
    }

    private void incBlockSize(EdgeOffsetList offsetList) {
        vertexCounts.put(offsetList, getBlockSize(offsetList) + 1);
    }

    private void decBlockSize(EdgeOffsetList offsetList) {
        vertexCounts.put(offsetList, getBlockSize(offsetList) + 1);
    }

    private void addOffsetList(EdgeOffsetList offsetList) {
        offsetLists.add(offsetList);
        vertexCounts.put(offsetList, 0);
    }

    private boolean removeOffsetListIfEmpty(EdgeOffsetList offsetList) {
        if (getBlockSize(offsetList) == 0) {
            offsetLists.remove(offsetList);
            return true;
        }
        return false;
    }

    private void removeVertexFromOffsetList(int v) {
        EdgeOffsetList offsetList = getOffsetList(v);
        decBlockSize(offsetList);
        removeOffsetListIfEmpty(offsetList);
    }

    private EdgeOffsetList getMatchingOffsetList(EdgeOffsetList offsetList) {
        for (EdgeOffsetList ol : offsetLists) {
            if (ol.equals(offsetList)) {
                return ol;
            }
        }
        return null;
    }

    public void setOutgoingEdges(SingleSourceEdgeList edges) {
        int vert = edges.source();
        removeVertexFromOffsetList(vert);
        EdgeOffsetList offsetList = edges.getEdgeOffsetList();
        this.placeVertexWithOffsets(vert, offsetList);
    }

    public GeneralEdgeList getIncomingEdges(int vert) {
        GeneralEdgeList edges = new GeneralEdgeList();
        for (int v = 0; v < this.numVertices(); v++) {
            for (Edge e : getOutgoingEdges(v)) {
                if (e.dest() == vert) {
                    edges.add(e);
                }
            }
        }
        return edges;
    }

    /**
     * Determines if the given offset data currently resides in the graph. If so
     * it links the vertex to that data. Otherwise, it adds the offset data and
     * links the vertex to it.
     */
    private void placeVertexWithOffsets(int vert, EdgeOffsetList offsets) {
        EdgeOffsetList offsetList = this.getMatchingOffsetList(offsets);
        if (offsetList == null) {
            offsetList = new EdgeOffsetList(offsets);
            addOffsetList(offsetList);
        }
        //assert !offsetList.tryAddVertex(vert, offsets):
        //	new RuntimeException("This should be impossible");
        //offsetList.tryAddVertex(vert, offsets);
        incBlockSize(offsetList);

        vertsToOffsetLists.set(vert, offsetList);
        degrees[vert] = offsetList.degree();
    }

    public void addVertex() {
        vertsToOffsetLists.add(null);
        if (numVertices() > degrees.length) {
            int[] newDegrees = new int[numVertices() * 2];
            for (int i = 0; i < degrees.length; i++) {
                newDegrees[i] = degrees[i];
            }
            degrees = newDegrees;
        }
        placeVertexWithOffsets(this.numVertices() - 1, new EdgeOffsetList());

    }

    /**
     * Removes a vertex from the graph. Note that the index of all vertices
     * added after the vertex being deleted will be decreased by one.
     *
     * @param toDelete The index of the vertex to delete.
     */
    public void removeVertex(int toDelete) {
        // Filling in this method would simply be rewriting removeVertices using
        // a single index instead of a list. No reason to rewrite and this seems
        // plenty fast for now.
        TIntArrayList singleton = new TIntArrayList(1);
        singleton.add(toDelete);
        removeVertices(singleton);
    }

    /**
     * Removes the vertices in the list from the graph. Indices are adjusted
     * appropriately. Note that this means that the index of vertices will
     * change after using this function.
     *
     * @param vertices A list of the vertices to remove.
     */
    public void removeVertices(TIntArrayList vertices) {
        int[] translator = new int[numVertices()];
        //ArrayList<EdgeOffsetList> oldOffsetLists = new ArrayList<EdgeOffsetList>(offsetLists);
        ArrayList<EdgeOffsetList> oldVertsToOffsetLists = new ArrayList<EdgeOffsetList>(vertsToOffsetLists);
        boolean[] toRemove = new boolean[numVertices()];
        for (int i = 0; i < vertices.size(); i++) {
            int v = vertices.get(i);
            toRemove[v] = true;
        }
        this.removeAllVertices();
        int w = 0;
        for (int v = 0; v < oldVertsToOffsetLists.size(); v++) {
            if (!toRemove[v]) {
                translator[v] = w;
                w++;
            }
        }
        addVertices(w);
        for (int v = 0; v < oldVertsToOffsetLists.size(); v++) {
            if (toRemove[v]) {
                continue;
            }
            for (Edge e : oldVertsToOffsetLists.get(v).getOutgoingEdges(v)) {
                if (!toRemove[e.dest()]) {
                    addEdge(translator[e.source()], translator[e.dest()], e.wt());
                }
            }
        }
    }

    /**
     * Deletes the whole graph. Should run in constant time.
     */
    public void removeAllVertices() {
        this.offsetLists.clear();
        this.vertsToOffsetLists.clear();
    }

    /**
     * Adds the given number of vertices to the graph. Runs in linear time.
     */
    public void addVertices(int amount) {
        for (int i = 0; i < amount; i++) {
            this.addVertex();
        }
    }

    /**
     * Increases the weight of the edge from sourceVert to destVert by 1. If the
     * edge does not exist yet it will be created.
     * @param sourceVert The index of the source vertex.
     * @param destVert the index of the destination vertex.
     */
    public void addEdge(int sourceVert, int destVert) {
        //this.vertices.get(sourceVert).addOutgoingEdge(this.vertices.get(destVert));
        this.addEdge(sourceVert, destVert, 1);
    }

    public void addEdge(Edge e) {
        addEdge(e.source(), e.dest(), e.wt());
    }

    /**
     * Increases the weight of the edge from sourceVert to destVert by weight.
     * weight can be negative. If the weight of the resulting edge is negative
     * or zero, it is removed. If the edge does not already exist it will be
     * created
     * @param sourceVert The index of the source vertex.
     * @param destVert The index of the destination vertex.
     * @param weight The amount to increase the weight of the edge by.
     */
    public void addEdge(int sourceVert, int destVert, int weight) {
        if (sourceVert == destVert) {
            return;
        }
        EdgeOffsetList offsets = new EdgeOffsetList(this.getOffsetList(sourceVert));
        removeVertexFromOffsetList(sourceVert);

        int offset = destVert - sourceVert;
        int edgeIndex = offsets.find(offset);
        int originalWeight = offsets.wtForOffset(offset);
        int newWeight = Math.max(0, weight + originalWeight);
        if (originalWeight == 0 && newWeight > 0) {
            offsets.addEdge(offset, newWeight);
        } else if (newWeight == 0 && edgeIndex >= 0) {
            offsets.remove(edgeIndex);
        } else if (newWeight > 0) {
            offsets.setWt(edgeIndex, newWeight);
        }
        this.placeVertexWithOffsets(sourceVert, offsets);
    }

    /**
     * Decreases the weight of the edge from sourceVert to destVert by 1. If the
     * weight of the edge becomes zero or less, it is removed.
     * @param sourceVert The index of the source vertex.
     * @param destVert the index of the destination vertex.
     */
    public void removeEdge(int sourceVert, int destVert) {
        this.removeEdge(sourceVert, destVert, 1);
    }

    /**
     * Decreases the weight of the edge from sourceVert to destVert by weight.
     * weight can be negative. If the weight of the resulting edge is negative
     * or zero, it is removed.
     * This is equivalent to addEdge(sourceVert, destVert, -weight)
     * @param sourceVert The index of the source vertex.
     * @param destVert The index of the destination vertex.
     * @param weight The amount to decrease the weight of the edge by.
     */
    public void removeEdge(int sourceVert, int destVert, int weight) {
        this.addEdge(sourceVert, destVert, -weight);
    }

    /**
     * Returns true if the indicated vertex has no outgoing vertices, false otherwise.
     *
     * @param vertIndex The index of a vertex.
     */
    public boolean isSink(int vertIndex) {
        return degree(vertIndex) == 0;
    }

    public boolean isSinkQuick(int vertIndex) {
        return degreeQuick(vertIndex) == 0;
    }

    /**
     * Returns a list containing the indices of all nonsink vertices.
     * @return
     */
    public TIntArrayList getNonSinks() {
        TIntArrayList nonsinks = new TIntArrayList();
        for (int v = 0; v < numVertices(); v++) {
            if (!isSinkQuick(v)) {
                nonsinks.add(v);
            }
        }
        return nonsinks;
    }

    /**
     *
     * @return A list of the indices of each sink vertex.
     */
    public TIntArrayList getSinks() {
        TIntArrayList sinks = new TIntArrayList();
        for (int v = 0; v < numVertices(); v++) {
            if (isSink(v)) {
                sinks.add(v);
            }
        }
        return sinks;
    }

    public SandpileConfiguration fireVertices(SandpileConfiguration config, TIntArrayList verts) {
        SandpileConfiguration newConfig = new SandpileConfiguration(config);
        for (int i = 0; i < verts.size(); i++) {
            int v = verts.get(i);
            for (Edge e : getOutgoingEdges(v)) {
                newConfig.set(e.dest(), newConfig.get(e.dest()) + e.wt());
            }
            newConfig.set(v, newConfig.get(v) - degreeQuick(v));
        }
        return newConfig;
    }

    public SandpileConfiguration fireVerticesInPlace(SandpileConfiguration config, TIntArrayList verts) {
        for (int i = 0; i < verts.size(); i++) {
            int v = verts.get(i);
            for (Edge e : getOutgoingEdges(v)) {
                config.set(e.dest(), config.get(e.dest()) + e.wt());
            }
            config.set(v, config.get(v) - degreeQuick(v));
        }
        return config;
    }

    public void fireVertexInPlace(SandpileConfiguration config, int vert) {
        EdgeList edges = getOutgoingEdges(vert);
        int s = edges.size();
        for (int i = 0; i < s; i++) {
            config.increaseQuick(edges.destQuick(i), edges.wtQuick(i));
        }
        config.increaseQuick(vert, -degreeQuick(vert));
    }

    public TIntArrayList getUnstables(SandpileConfiguration config) {
        TIntArrayList unstables = new TIntArrayList();
        for (int v = 0; v < numVertices(); v++) {
            if (!isSinkQuick(v) && config.get(v) >= degreeQuick(v)) {
                unstables.add(v);
            }
        }
        return unstables;
    }

    public TIntArrayList getUnstables(SandpileConfiguration config, TIntArrayList verts) {
        TIntArrayList unstables = new TIntArrayList();
        //System.err.println("getUnstables");
        for (int i = 0; i < verts.size(); i++) {
            int v = verts.get(i);
            //System.err.println(v);
            if (!isSinkQuick(v) && config.get(v) >= degreeQuick(v)) {
                unstables.add(v);
            }
        }
        return unstables;
    }

//	public Iterator<SandpileConfiguration> updater(final SandpileConfiguration config) {
//		return updaterStartingWith(config, getUnstables(config));
//	}
//
//	public Iterator<SandpileConfiguration> updaterStartingWith(final SandpileConfiguration config, final TIntArrayList startingVertices) {
//
//		final int[] unstables = new int[config.size()];
//		Arrays.fill(unstables, -1);
//		int i = 0;
//		for(int j=0; j < startingVertices.size(); j++){
//			int v = startingVertices.get(j);
//			if(config.get(v)>=degree(v) && !isSink(v)){
//				unstables[i] = v;
//				i++;
//			}
//		}
//		final int[] newUnstables = new int[config.size()];
//		Arrays.fill(newUnstables,-1);
//		return new Iterator<SandpileConfiguration>() {
//
//			SandpileConfiguration curConfig = new SandpileConfiguration(config);
//			//TIntArrayList unstables = getUnstables(config, startingVertices);
//			boolean[] added = new boolean[numVertices()];
//
//			public boolean hasNext() {
//				return unstables.length>0 && unstables[0]!=-1;
//			}
//			public SandpileConfiguration next() {
//				for(int i=0; unstables[i]!=-1; i++){
//					fireVertexInPlace(curConfig, unstables[i]);
//				}
//				int j=0;
//				for(int i=0; unstables[i]!=-1; i++){
//					int v = unstables[i];
//					if(!added[v] && curConfig.get(v)>=degree(v)){
//						newUnstables[j]=v;
//						added[v]=true;
//						j++;
//					}
//					for(int w : getOutgoingVertices(v)){
//						if(!added[w] && curConfig.get(w)>=degree(w) && !isSink(w)){
//							newUnstables[j]=w;
//							added[w]=true;
//							j++;
//						}
//					}
//					unstables[i]=-1;
//				}
//				for(int i=0; newUnstables[i]!=-1; i++){
//					int v = newUnstables[i];
//					added[v]=false;
//					unstables[i] = v;
//					newUnstables[i]=-1;
//				}
//
//				return curConfig;
//			}
//
//			public void remove() {
//				throw new UnsupportedOperationException();
//			}
//		};
//	}
    public Iterator<SandpileConfiguration> inPlaceParallelUpdater(final SandpileConfiguration config) {
        return inPlaceParallelUpdaterStartingWith(config, getUnstables(config));
    }

    public Iterator<SandpileConfiguration> inPlaceParallelUpdaterStartingWith(final SandpileConfiguration config, final TIntArrayList startingVertices) {

        final IntGenerationalQueue unstables = new IntGenerationalQueue(numVertices());
        final boolean[] added = new boolean[numVertices()];
        for (int i = 0; i < startingVertices.size(); i++) {
            int v = startingVertices.getQuick(i);
            if (config.get(v) >= degreeQuick(v)) {
                unstables.addUnsafe(v);
                added[v] = true;
            }
        }
        return new Iterator<SandpileConfiguration>() {

            public boolean hasNext() {
                return unstables.hasNextGeneration();
            }

            public SandpileConfiguration next() {
                int numUnstables = unstables.nextGenerationLength();
                unstables.goToNextGeneration();
                //System.err.println(numUnstables);
                // foreach unstable in the current generation...
                for (int i = 0; i < numUnstables; i++) {

                    // get the next unstable
                    int v = unstables.nextItemUnsafe();
                    // mark it as removed
                    added[v] = false;

                    //int timesToFire = config.getQuick(v) / degreeQuick(v);

                    // We get the vertices edge info in the form of offsets.
                    // Going through the offset list gives us more direct access
                    // to the edge info.
                    EdgeOffsetList offsetList = vertsToOffsetLists.get(v);
                    int s = offsetList.size();
                    for (int k = 0; k < s; k++) {
                        // Get the a neighboring vertex.
                        int dest = offsetList.destOffsetQuick(k) + v;
                        // Increase the sand on it.
                        //config.increaseQuick(dest, offsetList.wtQuick(k)*timesToFire);
                        config.increaseQuick(dest, offsetList.wtQuick(k));
                        // Check to see if we made it unstable.
                        int degree = degreeQuick(dest);
                        if (!added[dest] && config.getQuick(dest) >= degree && degree > 0) {
                            unstables.addUnsafe(dest);
                            added[dest] = true;
                        }
                    }
                    // Remove the sand fired from our source vertex.
                    int degree = offsetList.degree();
                    //config.increaseQuick(v, -degree*timesToFire);
                    config.increaseQuick(v, -degree);
                    // if still unstable, include it in next generation
                    if (config.getQuick(v) >= degree) {
                        try {
                            unstables.addUnsafe(v);
                        } catch (ArrayIndexOutOfBoundsException e) {
                            e.printStackTrace();
                        }
                        added[v] = true;
                    }
                }
                return config;
            }

            public void remove() {
                throw new UnsupportedOperationException();
            }
        };
    }

    /**
     * Takes in a configuration and outputs the resulting configuration
     */
    //public SandpileConfiguration updateConfig(SandpileConfiguration config) {
    //	return fireVertices(config, getUnstables(config));
    //}
    public SandpileConfiguration reverseFireVertex(SandpileConfiguration config, int vert) {
        SandpileConfiguration newConfig = new SandpileConfiguration(config);
        newConfig.set(vert, config.get(vert) + degreeQuick(vert));
        for (Edge e : getOutgoingEdges(vert)) {
            newConfig.set(e.dest(), newConfig.get(e.dest()) - e.wt());
        }
        return newConfig;
    }

    public SandpileConfiguration reverseFireVertexInPlace(SandpileConfiguration config, int vert) {
        config.increaseQuick(vert, degreeQuick(vert));
        EdgeList edges = getOutgoingEdges(vert);
        int s = edges.size();
        for (int i = 0; i < s; i++) {
            config.increaseQuick(edges.destQuick(i), -edges.wtQuick(i));
        }
        return config;
    }

    public SandpileConfiguration reverseFireConfig(SandpileConfiguration config) {
        SandpileConfiguration newConfig = new SandpileConfiguration(config);
        for (int sourceVert = 0; sourceVert < config.size(); sourceVert++) {
            newConfig.set(sourceVert, newConfig.get(sourceVert) + degreeQuick(sourceVert));
            for (Edge e : this.getOutgoingEdges(sourceVert)) {
                newConfig.set(e.dest(), newConfig.get(e.dest()) - weight(sourceVert, e.dest()));
            }
        }
        return newConfig;
    }

    /**
     * Updates the graph until all vertices stabilize.
     * WARNING: If the graph does not have a global sink, this function may not end.
     */
    public SandpileConfiguration stabilizeConfig(SandpileConfiguration config) throws InterruptedException {
        return stabilizeConfigStartingWith(config, getUnstables(config));
    }

    public SandpileConfiguration stabilizeConfigStartingWith(SandpileConfiguration config, TIntArrayList starters) throws InterruptedException {
        SandpileConfiguration stableConfig = new SandpileConfiguration(config);
        Iterator<SandpileConfiguration> updater = this.inPlaceParallelUpdaterStartingWith(stableConfig, starters);
        for (; updater.hasNext();) {
            updater.next();
            if (Thread.interrupted()) {
                throw new InterruptedException();
            }
        }
        return stableConfig;
    }

    /**
     * Updates the graph until all vertices stabilize.
     * WARNING: If the graph does not have a global sink, this function may not end.
     */
    public SandpileConfiguration stabilizeConfigInPlace(SandpileConfiguration config) throws InterruptedException {
        return stabilizeConfigInPlaceStartingWith(config, getUnstables(config));
    }

    public SandpileConfiguration stabilizeConfigInPlaceStartingWith(SandpileConfiguration config, TIntArrayList starters) throws InterruptedException {
        SandpileConfiguration stableConfig = config;
        Iterator<SandpileConfiguration> updater = this.inPlaceParallelUpdaterStartingWith(config, starters);
        for (; updater.hasNext();) {
            updater.next();
            if (Thread.interrupted()) {
                throw new InterruptedException();
            }
        }
        return stableConfig;
    }

    /**
     * Returns the number of edges from the first vertex to the second.
     */
    public int weight(int originVert, int destVert) {
        for (Edge e : getOutgoingEdges(originVert)) {
            if (e.dest() == destVert) {
                return e.wt();
            }
        }
        return 0;
    }

    /**
     * Returns a string representation of the edges in the graph.
     * Purely for command line and diagnostic use.
     *//*
    public String edgesString() {
    String output = new String();
    for( int i = 0; i<edges.size(); i++) {
    output = output.concat(i+ " " + vertices.get(i).degree()+"\n");
    }
    return output;
    }*/

    public SandpileConfiguration getUniformConfig(int amount) {
        SandpileConfiguration config = new SandpileConfiguration(this.numVertices());
        for (int i = 0; i < numVertices(); i++) {
            config.add(amount);
        }
        return config;
    }

    /**
     * Calculates the maximum stable configuration of the graph.
     * Runs in O(V).
     *
     * @return Returns a list of integers, where getMaxConfig()[i] = the amount of sand on vertex i.
     */
    public SandpileConfiguration getMaxConfig() {
        SandpileConfiguration maxConfig = new SandpileConfiguration(this.numVertices());
        for (int i = 0; i < numVertices(); i++) {
            int d = degreeQuick(i);
            maxConfig.add(d - 1);
        }
        return maxConfig;
    }

    /**
     * Calculates the dual of the current configuration. That is, degree[i]-sand[i]-1.
     * Runs in O(V).
     *
     * @return Returns a list representing the configuration.
     */
    public SandpileConfiguration getDualConfig(SandpileConfiguration config) {
        SandpileConfiguration dualConfig = new SandpileConfiguration(this.numVertices());
        for (int i = 0; i < config.size(); i++) {
            dualConfig.add(degree(i) - 1 - config.get(i));
        }
        return dualConfig;
    }

    /**
     * Calculates the minimal burning configuration of the graph.
     *
     * @return Returns a list representing the configuration.
     */
    public SandpileConfiguration getMinimalBurningConfig() throws InterruptedException {
        SandpileConfiguration config = reverseFireConfig(getUniformConfig(0));
        TIntArrayStack inDebts = new TIntArrayStack();
        boolean[] added = new boolean[numVertices()];
        for (int v = 0; v < this.numVertices(); v++) {
            if (config.getQuick(v) < 0 && !isSinkQuick(v)) {
                added[v] = true;
                inDebts.push(v);
            }
        }
        while (inDebts.size() > 0) {
            //System.err.println(w);
            if (Thread.interrupted()) {
                throw new InterruptedException();
            }
            int v = inDebts.pop();
            added[v] = false;
            reverseFireVertexInPlace(config, v);
            if (config.getQuick(v) < 0 && !isSinkQuick(v)) {
                added[v] = true;
                inDebts.push(v);
            }
            EdgeList edges = getOutgoingEdges(v);
            int s = edges.size();
            for (int i = 0; i < s; i++) {
                int w = edges.destQuick(i);
                if (!added[w] && config.getQuick(w) < 0 && !isSinkQuick(w)) {
                    added[w] = true;
                    inDebts.push(w);
                }
            }
        }
        return config;
    }

    /**
     * Calculates the recurrent configuration that is equivalent to config,
     * where equivalent means that stabilize(config+identity) = equivConfig.
     * This method calculates the recurrent by adding the burning config to the
     * config repeatedly, until it no longer changes. The efficiency of this
     * method relies on the fact that stabilizing a stable config plus burning
     * is O(V+E), rather than each update taking O(V+E) as with arbitrary
     * stabilization.
     * WARNING: This method can take a very long time for large graphs.
     * WARNING2: If there is no global sink for the graph, this method may not
     * end.
     * @param config An arbitrary SandpileConfiguration.
     * @return The equivalent sandpile configuration.
     */
    public SandpileConfiguration getEquivalentRecurrent(SandpileConfiguration config) throws InterruptedException {
        SandpileConfiguration burning = getMinimalBurningConfig();
        TIntArrayList burningVertices = new TIntArrayList();
        for (int vert = 0; vert < burning.size(); vert++) {
            if (burning.get(vert) > 0) {
                burningVertices.add(vert);
            }
        }
        SandpileConfiguration result = stabilizeConfig(config.plus(burning));
        SandpileConfiguration nextResult = stabilizeConfigStartingWith(result.plus(burning), burningVertices);
        while (!result.equals(nextResult)) {
            result = nextResult;
            nextResult = stabilizeConfigStartingWith(result.plus(burning), burningVertices);
            if (nextResult == null) {
                return null;
            }
        }
        return result;
    }

    /**
     * Calculates the inverse recurrent config. That is, if config is recurrent,
     * stabilize(config + inverse) = identity.
     * WARNING: This method uses getEquivalentRecurrent(), so the same warnings
     * apply.
     * @param config An arbitrary SandpileConfiguration.
     * @return The recurrent inverse of config;
     */
    public SandpileConfiguration getInverseConfig(SandpileConfiguration config) throws InterruptedException {
        SandpileConfiguration inverse = config.times(-1);
        return getEquivalentRecurrent(inverse);
    }

    /**
     * Gets an arbitrary vertex with negative sand.
     * @return Returns the index of a vertex.
     */
    private int getInDebtVertex(SandpileConfiguration config) {
        int s = config.size();
        for (int i = 0; i < s; i++) {
            if (config.getQuick(i) < 0 && !this.isSinkQuick(i)) {
                return i;
            }
        }
        return -1;
    }

    /**
     * Calculates whether or not the given configuration is stable.
     */
    public boolean isStable(SandpileConfiguration config) {
        for (int vert = 0; vert < config.size(); vert++) {
            if (config.get(vert) >= degreeQuick(vert)) {
                return true;
            }
        }
        return false;
    }

    /**
     * Calculates the identity configuration of the graph.
     * WARNING: For big graphs, this can take a long time.
     * Currently, the function adds the burning configuration
     * to itself until it gets the same thing back. This relies
     * on the fact that stabilizing the burning config is linear.
     * SECOND WARNING: If the graph does not have an identity (there is no global
     * sink or something), this function will never end!
     * @return The identity configuration.
     */
    public SandpileConfiguration getIdentityConfig() throws InterruptedException {
        return getEquivalentRecurrent(getUniformConfig(0));
    }
}


text:
cd "$(dirname "${BASH_SOURCE[0]}")" \
    && . "../utils.sh"

# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

print_in_purple "\n   Trackpad\n\n"

execute "defaults write com.apple.driver.AppleBluetoothMultitouch.trackpad Clicking -bool true && \
         defaults write com.apple.AppleMultitouchTrackpad Clicking -int 1 && \
         defaults write -g com.apple.mouse.tapBehavior -int 1 && \
         defaults -currentHost write -g com.apple.mouse.tapBehavior -int 1" \
    "Enable 'Tap to click'"

execute "defaults write com.apple.driver.AppleBluetoothMultitouch.trackpad TrackpadRightClick -bool true && \
         defaults write com.apple.AppleMultitouchTrackpad TrackpadRightClick -int 1 && \
         defaults -currentHost write -g com.apple.trackpad.enableSecondaryClick -bool true && \
         defaults write com.apple.driver.AppleBluetoothMultitouch.trackpad TrackpadCornerSecondaryClick -int 0 && \
         defaults write com.apple.AppleMultitouchTrackpad TrackpadCornerSecondaryClick -int 0 && \
         defaults -currentHost write -g com.apple.trackpad.trackpadCornerClickBehavior -int 0" \
    "Map 'click or tap with two fingers' to the secondary click"


text:
const volatile bool filter_dev = false;
const volatile __u32 targ_dev = 0;

struct {
	__uint(type, BPF_MAP_TYPE_HASH);
	__uint(max_entries, 64);
	__type(key, u32);
	__type(value, struct counter);
} counters SEC(".maps");

SEC("tracepoint/block/block_rq_complete")
int handle__block_rq_complete(void *args)
{
	struct counter *counterp, zero = {};
	sector_t sector;
	u32 nr_sector;
	u32 dev;

	if (has_block_rq_completion()) {
		struct trace_event_raw_block_rq_completion___x *ctx = args;
		sector = BPF_CORE_READ(ctx, sector);
		nr_sector = BPF_CORE_READ(ctx, nr_sector);
		dev = BPF_CORE_READ(ctx, dev);
	} else {
		struct trace_event_raw_block_rq_complete___x *ctx = args;
		sector = BPF_CORE_READ(ctx, sector);
		nr_sector = BPF_CORE_READ(ctx, nr_sector);
		dev = BPF_CORE_READ(ctx, dev);
	}

	if (filter_dev && targ_dev != dev)
		return 0;

	counterp = bpf_map_lookup_or_try_init(&counters, &dev, &zero);
	if (!counterp)
		return 0;
	if (counterp->last_sector) {
		if (counterp->last_sector == sector)
			__sync_fetch_and_add(&counterp->sequential, 1);
		else
			__sync_fetch_and_add(&counterp->random, 1);
		__sync_fetch_and_add(&counterp->bytes, nr_sector * 512);
	}
	counterp->last_sector = sector + nr_sector;
	return 0;
}

char LICENSE[] SEC("license") = "GPL";


text:
function tifWriteForISBI( imgdata, filename )

% Open file for writing
tifFile = Tiff(filename, 'w');

% Settings for writing Tif (all necessary?)
tagstruct.ImageLength = size(imgdata,1);
tagstruct.ImageWidth = size(imgdata,2);
tagstruct.Photometric = Tiff.Photometric.MinIsBlack;
tagstruct.Compression = Tiff.Compression.None;
tagstruct.BitsPerSample = 32;
tagstruct.SamplesPerPixel = 1;
tagstruct.SampleFormat = Tiff.SampleFormat.IEEEFP;
tagstruct.RowsPerStrip = size(imgdata,1);
tagstruct.PlanarConfiguration = Tiff.PlanarConfiguration.Chunky;

for i=1:size(imgdata,3)
    tifFile.setTag(tagstruct);
    tifFile.write(imgdata(:,:,i));
    tifFile.writeDirectory;
end
tifFile.close();

end