text:
namespace omaha {

namespace update_response_utils {

// TODO(omaha): unit test the functions below.

// Returns a pointer to the app object corresponding to the appid in the
// response object. Returns NULL if the app is not found.
const xml::response::App* GetApp(const xml::response::Response& response,
                                 const CString& appid) {
  size_t app_index = 0;
  for (; app_index < response.apps.size(); ++app_index) {
    if (!appid.CompareNoCase(response.apps[app_index].appid)) {
      return &response.apps[app_index];
    }
  }
  return NULL;
}

HRESULT GetInstallData(const std::vector<xml::response::Data>& data,
                       const CString& install_data_index,
                       CString* install_data) {
  ASSERT1(install_data);
  if (install_data_index.IsEmpty()) {
    return S_OK;
  }

  std::vector<xml::response::Data>::const_iterator it;
  for (it = data.begin(); it != data.end(); ++it) {
    if (install_data_index != it->install_data_index) {
      continue;
    }

    if (it->status != kResponseStatusOkValue) {
      ASSERT1(it->status == kResponseDataStatusNoData);
      return GOOPDATE_E_INVALID_INSTALL_DATA_INDEX;
    }

    ASSERT1(!it->install_data.IsEmpty());
    *install_data = it->install_data;
    return S_OK;
  }

  return GOOPDATE_E_INVALID_INSTALL_DATA_INDEX;
}

// Check the outer elements first, then check any child elements only if the
// outer element was successful.
CString GetAppResponseStatus(const xml::response::App& app) {
  if (_tcsicmp(kResponseStatusOkValue, app.status) != 0) {
    ASSERT1(!app.status.IsEmpty());
    return app.status;
  }

  if (!app.update_check.status.IsEmpty() &&
      _tcsicmp(kResponseStatusOkValue, app.update_check.status) != 0) {
    return app.update_check.status;
  }

  std::vector<xml::response::Data>::const_iterator data;
  for (data = app.data.begin(); data != app.data.end(); ++data) {
    if (!data->status.IsEmpty() &&
        _tcsicmp(kResponseStatusOkValue, data->status) != 0) {
      return data->status;
    }
  }

  if (!app.ping.status.IsEmpty() &&
      _tcsicmp(kResponseStatusOkValue, app.ping.status) != 0) {
    return app.ping.status;
  }

  std::vector<xml::response::Event>::const_iterator it;
  for (it = app.events.begin(); it != app.events.end(); ++it) {
    if (!it->status.IsEmpty() &&
        _tcsicmp(kResponseStatusOkValue, it->status) != 0) {
      return it->status;
    }
  }

  // TODO(omaha): verify that no other elements can report errors
  // once we've finalized the protocol.

  return app.status;
}

HRESULT BuildApp(const xml::UpdateResponse* update_response,
                 HRESULT code,
                 App* app) {
  ASSERT1(update_response);
  ASSERT1(SUCCEEDED(code) || code == GOOPDATE_E_NO_UPDATE_RESPONSE);
  ASSERT1(app);

  AppVersion* next_version = app->next_version();

  const CString& app_id = app->app_guid_string();

  const xml::response::App* response_app(GetApp(update_response->response(),
                                                app_id));
  ASSERT1(response_app);
  const xml::response::UpdateCheck& update_check = response_app->update_check;

  VERIFY1(SUCCEEDED(app->put_ttToken(CComBSTR(update_check.tt_token))));

  if (code == GOOPDATE_E_NO_UPDATE_RESPONSE) {
    return S_OK;
  }

  for (size_t i = 0; i < update_check.urls.size(); ++i) {
    HRESULT hr = next_version->AddDownloadBaseUrl(update_check.urls[i]);
    if (FAILED(hr)) {
      return hr;
    }
  }

  for (size_t i = 0; i < update_check.install_manifest.packages.size(); ++i) {
    const xml::InstallPackage& package(
        update_check.install_manifest.packages[i]);
    HRESULT hr = next_version->AddPackage(package.name,
                                          package.size,
                                          package.hash);
    if (FAILED(hr)) {
      return hr;
    }
  }

  CString server_install_data;
  HRESULT hr = GetInstallData(response_app->data,
                              app->server_install_data_index(),
                              &server_install_data);
  if (FAILED(hr)) {
    return hr;
  }
  app->set_server_install_data(server_install_data);

  ASSERT1(!next_version->install_manifest());
  next_version->set_install_manifest(
      new xml::InstallManifest(update_check.install_manifest));

  // TODO(omaha): it appears the version_ below holds either the manifest
  // version or the "pv" version, written by the installer. If this is the case,
  // then it is confusing and perhaps we need to have two different members to
  // hold these values.
  ASSERT1(next_version->version().IsEmpty());
  next_version->set_version(next_version->install_manifest()->version);

  return S_OK;
}

// "noupdate" is an error for fresh installs, but a successful completion in
// the cases of silent and on demand updates. The caller is responsible for
// interpreting "noupdate" as it sees fit.
xml::UpdateResponseResult GetResult(const xml::UpdateResponse* update_response,
                                    const CString& appid,
                                    const CString& language) {
  ASSERT1(update_response);
  const xml::response::App* response_app(GetApp(update_response->response(),
                                                appid));

  StringFormatter formatter(language);
  CString text;

  if (!response_app) {
    CORE_LOG(L1, (_T("[UpdateResponse::GetResult][app not found][%s]"), appid));
    VERIFY1(SUCCEEDED(formatter.LoadString(IDS_UNKNOWN_APPLICATION, &text)));
    return std::make_pair(GOOPDATE_E_NO_SERVER_RESPONSE, text);
  }

  const xml::response::UpdateCheck& update_check = response_app->update_check;
  const CString& status = GetAppResponseStatus(*response_app);
  const CString& display_name = update_check.install_manifest.name;

  ASSERT1(!status.IsEmpty());
  CORE_LOG(L1, (_T("[UpdateResponse::GetResult][%s][%s][%s]"),
                appid, status, display_name));

  // ok
  if (_tcsicmp(kResponseStatusOkValue, status) == 0) {
    return std::make_pair(S_OK, CString());
  }

  // noupdate
  if (_tcsicmp(kResponseStatusNoUpdate, status) == 0) {
    VERIFY1(SUCCEEDED(formatter.LoadString(IDS_NO_UPDATE_RESPONSE, &text)));
    return std::make_pair(GOOPDATE_E_NO_UPDATE_RESPONSE, text);
  }

  // "restricted"
  if (_tcsicmp(kResponseStatusRestrictedExportCountry, status) == 0) {
    VERIFY1(SUCCEEDED(formatter.LoadString(IDS_RESTRICTED_RESPONSE_FROM_SERVER,
                                           &text)));
    return std::make_pair(GOOPDATE_E_RESTRICTED_SERVER_RESPONSE, text);
  }

  // "error-UnKnownApplication"
  if (_tcsicmp(kResponseStatusUnKnownApplication, status) == 0) {
    VERIFY1(SUCCEEDED(formatter.LoadString(IDS_UNKNOWN_APPLICATION, &text)));
    return std::make_pair(GOOPDATE_E_UNKNOWN_APP_SERVER_RESPONSE, text);
  }

  // "error-OsNotSupported"
  if (_tcsicmp(kResponseStatusOsNotSupported, status) == 0) {
    const CString& error_url(update_check.error_url);
    VERIFY1(SUCCEEDED(formatter.LoadString(IDS_OS_NOT_SUPPORTED, &text)));
    if (!error_url.IsEmpty()) {
      // TODO(omaha3): The error URL is no longer in the error string. Either
      // we need to provide this URL to the client or we need to deprecate
      // error_url and put this information in the Get Help redirect.
      // Alternatively, we could have the COM server build error URLs in all
      // cases. The current UI would still need to build an URL for the entire
      // bundle, though, because it does not have per-app links.
    }
    return std::make_pair(GOOPDATE_E_OS_NOT_SUPPORTED, text);
  }

  // "error-internal"
  if (_tcsicmp(kResponseStatusInternalError, status) == 0) {
    VERIFY1(SUCCEEDED(formatter.FormatMessage(&text,
                                              IDS_NON_OK_RESPONSE_FROM_SERVER,
                                              status)));
    return std::make_pair(GOOPDATE_E_INTERNAL_ERROR_SERVER_RESPONSE, text);
  }

  // "error-hash"
  if (_tcsicmp(kResponseStatusHashError, status) == 0) {
    VERIFY1(SUCCEEDED(formatter.FormatMessage(&text,
                                              IDS_NON_OK_RESPONSE_FROM_SERVER,
                                              status)));
    return std::make_pair(GOOPDATE_E_SERVER_RESPONSE_NO_HASH, text);
  }

  // "error-unsupportedprotocol"
  if (_tcsicmp(kResponseStatusUnsupportedProtocol, status) == 0) {
    // TODO(omaha): Ideally, we would provide an app-specific URL instead of
    // just the publisher name. If it was a link, we could use point to a
    // redirect URL and provide the app GUID rather than somehow obtaining the
    // app-specific URL.
    VERIFY1(SUCCEEDED(formatter.FormatMessage(&text,
                                              IDS_INSTALLER_OLD,
                                              kShortCompanyName)));
    return std::make_pair(GOOPDATE_E_SERVER_RESPONSE_UNSUPPORTED_PROTOCOL,
                          text);
  }

  VERIFY1(SUCCEEDED(formatter.FormatMessage(&text,
                                            IDS_NON_OK_RESPONSE_FROM_SERVER,
                                            status)));
  return std::make_pair(GOOPDATE_E_UNKNOWN_SERVER_RESPONSE, text);
}

bool IsOmahaUpdateAvailable(const xml::UpdateResponse* update_response) {
  ASSERT1(update_response);
  xml::UpdateResponseResult update_response_result(
      update_response_utils::GetResult(update_response,
                                       kGoogleUpdateAppId,
                                       lang::GetDefaultLanguage(true)));
  return update_response_result.first == S_OK;
}

HRESULT ApplyExperimentLabelDeltas(bool is_machine,
                                   const xml::UpdateResponse* update_response) {
  ASSERT1(update_response);

  for (size_t app_index = 0;
       app_index < update_response->response().apps.size();
       ++app_index) {
    const xml::response::App& app = update_response->response().apps[app_index];
    if (!app.experiments.IsEmpty()) {
      VERIFY1(IsGuid(app.appid));

      ExperimentLabels labels;
      VERIFY1(SUCCEEDED(labels.ReadFromRegistry(is_machine, app.appid)));

      if (!labels.DeserializeAndApplyDelta(app.experiments)) {
        return E_FAIL;
      }

      HRESULT hr = labels.WriteToRegistry(is_machine, app.appid);
      if (FAILED(hr)) {
        return hr;
      }
    }
  }

  return S_OK;
}

}  // namespace update_response_utils

}  // namespace omaha


text:
import expressMiddleware from './express'
// import authMiddleware from './auth'
import rbac from './rbac'
import errorHandler from './errorHandler'
import apolloUpload from './apolloUpload'

export { apolloUpload, expressMiddleware, /* authMiddleware, */ rbac, errorHandler }

redpajama_set_name: RedPajamaGithub


text:
<?php

namespace Selim;

class Output
{
    public function __construct(array $pages)
    {
        $this->pages = $pages;
    }

    protected $pages = array();

    protected static function DefaultAdminText(SilverstripePage $sspage)
    {
        return Util::boolToString($sspage->hasDefaultAdmin());
    }

    protected static function EmailLoggingText(SilverstripePage $sspage)
    {
        return Util::boolToString($sspage->hasEmailLogging());
    }

    protected static function ModuleText(SilverstripePage $sspage)
    {
        return implode(" ", $sspage->getModules());
    }
}


text:
id: addons
title: Add-ons
permalink: addons.html
prev: tooling-integration.html
next: animation.html
---

`React.addons` is where we park some useful utilities for building React apps. **These should be considered experimental** but will eventually be rolled into core or a blessed utilities library:

- [`TransitionGroup` and `CSSTransitionGroup`](animation.html), for dealing with animations and transitions that are usually not simple to implement, such as before a component's removal.
- [`LinkedStateMixin`](two-way-binding-helpers.html), to simplify the coordination between user's form input data and the component's state.
- [`cloneWithProps`](clone-with-props.html), to make shallow copies of React components and change their props.
- [`createFragment`](create-fragment.html), to create a set of externally-keyed children.
- [`update`](update.html), a helper function that makes dealing with immutable data in JavaScript easier.
- [`PureRenderMixin`](pure-render-mixin.html), a performance booster under certain situations.

The add-ons below are in the development (unminified) version of React only:

- [`TestUtils`](test-utils.html), simple helpers for writing test cases (unminified build only).
- [`Perf`](perf.html), for measuring performance and giving you hint where to optimize.

To get the add-ons, use `react-with-addons.js` (and its minified counterpart) rather than the common `react.js`.

When using the react package from npm, simply `require('react/addons')` instead of `require('react')` to get React with all of the add-ons.


text:
Images
==============================================

Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Donec quam felis, ultricies nec, pellentesque eu, pretium quis, sem. Nulla consequat massa quis enim. Donec pede justo, fringilla vel, aliquet nec, vulputate eget, arcu. In enim justo, rhoncus ut, imperdiet a, venenatis vitae, justo. Nullam dictum felis eu pede mollis pretium. Integer tincidunt. Cras dapibus.

.figure .left .w50

Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Donec quam felis, ultricies nec, pellentesque eu, pretium quis, sem. Nulla consequat massa quis enim. Donec pede justo, fringilla vel, aliquet nec, vulputate eget, arcu. In enim justo, rhoncus ut, imperdiet a, venenatis vitae, justo. Nullam dictum felis eu pede mollis pretium. Integer tincidunt. Cras dapibus. Vivamus elementum semper nisi. Aenean vulputate eleifend tellus. Aenean leo ligula, porttitor eu, consequat vitae, eleifend ac, enim. Aliquam lorem ante, dapibus in, viverra quis, feugiat a, tellus. Phasellus viverra nulla ut metus varius laoreet. Quisque rutrum. Aenean imperdiet. Etiam ultricies nisi vel augue. Curabitur ullamcorper ultricies nisi.

.figure .center .w25

Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Donec quam felis, ultricies nec, pellentesque eu, pretium quis, sem. Nulla consequat massa quis enim. Donec pede justo, fringilla vel, aliquet nec, vulputate eget, arcu. In enim justo, rhoncus ut, imperdiet a, venenatis vitae, justo. Nullam dictum felis eu pede mollis pretium. Integer tincidunt. Cras dapibus. Vivamus elementum semper nisi. Aenean vulputate eleifend tellus. Aenean leo ligula, porttitor eu, consequat vitae, eleifend ac, enim. Aliquam lorem ante, dapibus in, viverra quis, feugiat a, tellus. Phasellus viverra nulla ut metus varius laoreet. Quisque rutrum. Aenean imperdiet. Etiam ultricies nisi vel augue. Curabitur ullamcorper ultricies nisi.

![DBWEBBISAR](cimage/imgd.php?src=dbwebbisar.jpg&w=500)

Infront .figure .left .w50

Infront Trading System

Advanced charting tools in Infront help you to visualize huge amounts of data, making it easier to understand and act on the information. With more than 50 studies and endless customization possibilities, you can create just the chart you need for any situation. Drill down to real-time, tick-by-tick data, or zoom out to see years of historical prices. Integrated sharing features make it easy for you to share charts via IM, email and social media with a click.

Visualize massive amounts of data

Everything from tick-by-tick to decades of historical pricing is available for charting, including company fundamental data, macroeconomic data and other data series.

Show off your charts

It only takes a click to generate a custom link to share your charts on Twitter, IM or email.

.figure .right .w50

JetBarins IDE

The smartest editor

Use the full power of the modern JavaScript ecosystem – WebStorm's got you covered! Enjoy the intelligent code completion, on-the-fly error detection, powerful navigation and refactoring for JavaScript, TypeScript, stylesheet languages, and the most popular frameworks.

Seamless tool integration

Take advantage of linters, build tools, test runners, REST client, and more tools, all deeply integrated with the IDE. But any time you need Terminal, it's also available as an IDE tool window.

Support for Standard Style

WebStorm can now format your JavaScript code according to Standard Style. The newly added code style options give you much more flexibility.


text:
var gulp = require('gulp'),
    shell = require('gulp-shell'),
    del = require('del'),
    bower = require('gulp-bower'),
    react = require('gulp-react'),
    filter = require('gulp-filter');

gulp.task('watch',function(){
    gulp.watch('public/**/*.html', ['reload-chrome']);
    gulp.watch('src/js/**/*.jsx', ['react','reload-chrome']);
});
gulp.task('default',['clean', 'bower', 'react'], function(){
});

gulp.task('reload-chrome', shell.task(
        ['chrome-cli list links \
        | grep localhost:'+process.env.PORT+' \
        | sed -E "s/\\[([0-9]+:)?(.*)\\](.*)/\\2/" \
        | xargs -L1 chrome-cli reload -t']));

gulp.task('clean', function(cb) { del(['public/build/*', 'public/bower/*'], cb); });
gulp.task('bower', function() {
    return bower()
        .pipe(gulp.dest('public/bower'))
});
gulp.task('react', function(){
    return gulp.src('src/js/**/*.jsx')
        .pipe(react())
        .pipe(gulp.dest('public/build'))
});


text:
require 'spec_helper'
require 'diffident/new_tokenizer'

def diff_print( diff )
  diff.each do |d|
    puts "%2d,%2d   %-80s %s"% [d.base_row, d.this_row, d.text, d.action]
  end
end

describe Diffident::NewTokenizer do
  it "produces output", focus: true do
    t = Diffident::NewTokenizer.new( 'spec/support/files/changed/base.css', 'spec/support/files/changed/this.css' )
    diff = t.process
    # diff_print(diff)
  end

  context "no differances between files" do
    it "returns only :same changes" do
      t = Diffident::NewTokenizer.new( 'spec/support/files/changed/this.css', 'spec/support/files/changed/this.css' )
      diff = t.process
      # diff_print(diff)
      diff.each do |change|
        change.action.should == :same
      end
    end
  end

  context "additions to this" do
    it "are correctly detected" do
      t = Diffident::NewTokenizer.new( 'spec/support/files/changed/base.css', 'spec/support/files/changed/this.css' )
      diff = t.process
      # diff_print(diff)
      diff.each do |change|
        if (15..18).include? change.this_row
          change.action.should == :addition
        else
          change.action.should == :same
        end
      end
    end
  end

  context "deletions in this" do
    it "are correctly detected" do
      t = Diffident::NewTokenizer.new( 'spec/support/files/changed/this.css', 'spec/support/files/changed/base.css' )
      diff = t.process
      # diff_print(diff)
      diff.each do |change|
        if (15..18).include? change.base_row
          change.action.should == :deletion
        else
          change.action.should == :same
        end
      end
    end
  end

  context "complex changes between files" do
    it "are correctly marked" do
      t = Diffident::NewTokenizer.new( 'spec/support/files/changed/base.css', 'spec/support/files/changed/complex_this.css' )
      diff = t.process
      # diff_print(diff)
      diff.each do |change|
        case change.this_row
          when 9..12, 19..23
            change.action.should == :addition
          when -1
            # noop
          else
            change.action.should == :same
        end

        case change.base_row
          when 6, 7, 17, 20
            change.action.should == :deletion
          when -1
            # noop
          else
            change.action.should == :same
        end
      end
    end
  end
end


text:
package org.apache.synapse.util.resolver;

import org.apache.synapse.config.SynapseConfigUtils;
import org.apache.synapse.config.SynapseConfiguration;
import org.apache.ws.commons.schema.resolver.URIResolver;
import org.xml.sax.InputSource;

/**
 * Class that adapts a {@link ResourceMap} to XmlSchemas's {@link URIResolver}.
 */
public class CustomXmlSchemaURIResolver implements URIResolver {
    private ResourceMap resourceMap;
    private SynapseConfiguration synCfg;

    public CustomXmlSchemaURIResolver() {
    }

    /**
     * Constructor.
     *
     * @param resourceMap the resource map; may be null if no resource map is configured
     * @param synCfg the Synapse configuration
     */
    public CustomXmlSchemaURIResolver(ResourceMap resourceMap,
                                  SynapseConfiguration synCfg) {
        this();
        this.resourceMap = resourceMap;
        this.synCfg = synCfg;
    }

    /**
     * Resolve a schema import.
     * This method will first attempt to resolve the location using the configured
     * {@link ResourceMap} object. If this fails (because no {@link ResourceMap} is
     * configured or because {@link ResourceMap#resolve(SynapseConfiguration, String)}
     * returns null, it will resolve the location using
     * {@link SynapseConfigUtils#resolveRelativeURI(String, String)}.
     */
    public InputSource resolveEntity(String targetNamespace, String schemaLocation, String baseUri) {
        InputSource result = null;
        if (resourceMap != null) {
            result = resourceMap.resolve(synCfg, schemaLocation);
        }
        if (result == null) {
            result = new InputSource(SynapseConfigUtils.resolveRelativeURI(baseUri, schemaLocation));
        }
        return result;
    }
}


text:
namespace BcmMigrationTool
{
    using System;

    public partial class GetUserFieldLinks_Result
    {
        public Nullable<System.Guid> Column1 { get; set; }
        public int LinkItemType { get; set; }
        public string FieldName { get; set; }
    }
}


text:
require 'test_helper'

class MailAccountAdminTest < ActiveSupport::TestCase
  test "truth" do
    assert_kind_of Module, MailAccountAdmin
  end
end


text:
package at.aau.esop15.course13;

import javax.imageio.ImageIO;
import javax.swing.*;
import java.awt.*;
import java.io.File;
import java.io.IOException;

/**
 * This is the version from the lecture
 * @author Dr. Mathias Lux, mlux@itec.aau.at, 14.01.2016 14:12.
 */
public class MinesweeperFrame extends JFrame {
    public MinesweeperFrame() {
        super("Minesweeper");
        try {
            setIconImage(ImageIO.read(new File("data/minesweeper/32/Bomb.png")));
        } catch (IOException e) {
            e.printStackTrace();
        }
        setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);
    }

    public static void main(String[] args) {
        MinesweeperFrame f = new MinesweeperFrame();
        f.setSize(600, 600);
        f.add(new MinesweeperPanel(), BorderLayout.CENTER);
        f.pack();
        f.setVisible(true);
    }
}


text:
'use strict';

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

goog.require('Blockly.Msg');

Blockly.Msg.ADD_COMMENT = "Ouzhpennañ un evezhiadenn";
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 = "Roit aotre, mar plij, d'an arload-mañ evit gallout saveteiñ ho labour ha reiñ aotre dezhañ da rannañ ho labour ganimp.";
Blockly.Msg.CHANGE_VALUE_TITLE = "Kemmañ an dalvoudenn :";
Blockly.Msg.CHAT = "Flapañ gant ho kenlabourer en ur skrivañ er voest-se !";
Blockly.Msg.CLEAN_UP = "Naetaat ar bloc'hoù";
Blockly.Msg.COLLAPSE_ALL = "Bihanaat ar bloc'hoù";
Blockly.Msg.COLLAPSE_BLOCK = "Bihanaat ar bloc'h";
Blockly.Msg.COLOUR_BLEND_COLOUR1 = "liv 1";
Blockly.Msg.COLOUR_BLEND_COLOUR2 = "liv 2";
Blockly.Msg.COLOUR_BLEND_HELPURL = "http://meyerweb.com/eric/tools/color-blend/";  // untranslated
Blockly.Msg.COLOUR_BLEND_RATIO = "feur";
Blockly.Msg.COLOUR_BLEND_TITLE = "meskañ";
Blockly.Msg.COLOUR_BLEND_TOOLTIP = "a gemmesk daou liv gant ur feur roet(0.0 - 1.0).";
Blockly.Msg.COLOUR_PICKER_HELPURL = "http://br.wikipedia.org/wiki/Liv";
Blockly.Msg.COLOUR_PICKER_TOOLTIP = "Dibab ul liv diwar al livaoueg.";
Blockly.Msg.COLOUR_RANDOM_HELPURL = "http://randomcolour.com";  // untranslated
Blockly.Msg.COLOUR_RANDOM_TITLE = "liv dargouezhek";
Blockly.Msg.COLOUR_RANDOM_TOOLTIP = "Tennañ ul liv d'ar sord";
Blockly.Msg.COLOUR_RGB_BLUE = "glas";
Blockly.Msg.COLOUR_RGB_GREEN = "gwer";
Blockly.Msg.COLOUR_RGB_HELPURL = "http://www.december.com/html/spec/colorper.html";  // untranslated
Blockly.Msg.COLOUR_RGB_RED = "ruz";
Blockly.Msg.COLOUR_RGB_TITLE = "liv gant";
Blockly.Msg.COLOUR_RGB_TOOLTIP = "Krouiñ ul liv gant ar c'hementad spisaet a ruz, a wer hag a c'hlas. Etre 0 ha 100 e tle bezañ an holl dalvoudoù.";
Blockly.Msg.CONTROLS_FLOW_STATEMENTS_HELPURL = "https://github.com/google/blockly/wiki/Loops#loop-termination-blocks";  // untranslated
Blockly.Msg.CONTROLS_FLOW_STATEMENTS_OPERATOR_BREAK = "Mont e-maez an adlañsañ";
Blockly.Msg.CONTROLS_FLOW_STATEMENTS_OPERATOR_CONTINUE = "Kenderc'hel gant iteradur nevez ar rodell";
Blockly.Msg.CONTROLS_FLOW_STATEMENTS_TOOLTIP_BREAK = "Mont e-maez ar boukl engronnus.";
Blockly.Msg.CONTROLS_FLOW_STATEMENTS_TOOLTIP_CONTINUE = "Lammat ar rest eus ar rodell, ha kenderc'hel gant an iteradur war-lerc'h.";
Blockly.Msg.CONTROLS_FLOW_STATEMENTS_WARNING = "Diwallit : ne c'hall ar bloc'h-mañ bezañ implijet nemet e-barzh ur boukl.";
Blockly.Msg.CONTROLS_FOREACH_HELPURL = "https://github.com/google/blockly/wiki/Loops#for-each";  // untranslated
Blockly.Msg.CONTROLS_FOREACH_TITLE = "evit pep elfenn %1 er roll %2";
Blockly.Msg.CONTROLS_FOREACH_TOOLTIP = "Evit pep elfenn en ur roll, reiñ talvoud an elfenn d'an argemmenn '%1', ha seveniñ urzhioù zo da c'houde.";
Blockly.Msg.CONTROLS_FOR_HELPURL = "https://github.com/google/blockly/wiki/Loops#count-with";  // untranslated
Blockly.Msg.CONTROLS_FOR_TITLE = "kontañ gant %1 eus %2 da %3 dre %4";
Blockly.Msg.CONTROLS_FOR_TOOLTIP = "Ober e doare ma kemero an argemmenn \"%1\" an talvoudennoù adalek niverenn an deroù betek niverenn an dibenn, en ur inkremantiñ an esaouenn, ha seveniñ an urzhioù spisaet.";
Blockly.Msg.CONTROLS_IF_ELSEIF_TOOLTIP = "Ouzhpennañ un amplegad d'ar bloc'h ma.";
Blockly.Msg.CONTROLS_IF_ELSE_TOOLTIP = "Ouzhpennañ un amplegad dibenn lak-pep-tra d'ar bloc'h ma.";
Blockly.Msg.CONTROLS_IF_HELPURL = "https://github.com/google/blockly/wiki/IfElse";  // untranslated
Blockly.Msg.CONTROLS_IF_IF_TOOLTIP = "Ouzhpennañ, lemel pe adurzhiañ ar rannoù evit kefluniañ ar bloc'h ma.";
Blockly.Msg.CONTROLS_IF_MSG_ELSE = "a-hend-all";
Blockly.Msg.CONTROLS_IF_MSG_ELSEIF = "mod all ma";
Blockly.Msg.CONTROLS_IF_MSG_IF = "ma";
Blockly.Msg.CONTROLS_IF_TOOLTIP_1 = "Ma vez gwir un dalvoudenn, seveniñ urzhioù zo neuze.";
Blockly.Msg.CONTROLS_IF_TOOLTIP_2 = "Ma vez gwir un dalvoudenn, seveniñ ar c'henañ bloc'had urzhioù neuze. Anez seveniñ an eil bloc'had urzhioù.";
Blockly.Msg.CONTROLS_IF_TOOLTIP_3 = "Ma vez gwir an dalvoudenn gentañ, seveniñ ar c'hentañ bloc'had urzhioù neuze. Anez ma vez gwir an eil talvoudenn, seveniñ an eil bloc'had urzhioù.";
Blockly.Msg.CONTROLS_IF_TOOLTIP_4 = "Ma vez gwir an dalvoudenn gentañ, seveniñ ar c'hentañ bloc'had. Anez, ma vez gwir an eil talvoudenn, seveniñ an eil bloc'had urzhioù. Ma ne vez gwir talvoudenn ebet, seveniñ ar bloc'had diwezhañ a urzhioù.";
Blockly.Msg.CONTROLS_REPEAT_HELPURL = "https://en.wikipedia.org/wiki/For_loop";
Blockly.Msg.CONTROLS_REPEAT_INPUT_DO = "ober";
Blockly.Msg.CONTROLS_REPEAT_TITLE = "adober %1 gwech";
Blockly.Msg.CONTROLS_REPEAT_TOOLTIP = "Seveniñ urzhioù zo meur a wech";
Blockly.Msg.CONTROLS_WHILEUNTIL_HELPURL = "https://github.com/google/blockly/wiki/Loops#repeat";  // untranslated
Blockly.Msg.CONTROLS_WHILEUNTIL_OPERATOR_UNTIL = "adober betek";
Blockly.Msg.CONTROLS_WHILEUNTIL_OPERATOR_WHILE = "adober keit ha ma";
Blockly.Msg.CONTROLS_WHILEUNTIL_TOOLTIP_UNTIL = "Keit ha ma vez faos un dalvoudenn,seveniñ urzhioù zo neuze.";
Blockly.Msg.CONTROLS_WHILEUNTIL_TOOLTIP_WHILE = "Keit ha ma vez gwir un dalvoudenn, seveniñ urzhioù zo neuze.";
Blockly.Msg.DELETE_ALL_BLOCKS = "Diverkañ an holl vloc'hoù %1 ?";
Blockly.Msg.DELETE_BLOCK = "Dilemel ar bloc'h";
Blockly.Msg.DELETE_X_BLOCKS = "Dilemel %1 bloc'h";
Blockly.Msg.DISABLE_BLOCK = "Diweredekaat ar bloc'h";
Blockly.Msg.DUPLICATE_BLOCK = "Eiladuriñ";
Blockly.Msg.ENABLE_BLOCK = "Gweredekaat ar bloc'h";
Blockly.Msg.EXPAND_ALL = "Astenn ar bloc'hoù";
Blockly.Msg.EXPAND_BLOCK = "Astenn ar bloc'h";
Blockly.Msg.EXTERNAL_INPUTS = "Monedoù diavaez";
Blockly.Msg.HELP = "Skoazell";
Blockly.Msg.INLINE_INPUTS = "Monedoù enlinenn";
Blockly.Msg.LISTS_CREATE_EMPTY_HELPURL = "https://github.com/google/blockly/wiki/Lists#create-empty-list";  // untranslated
Blockly.Msg.LISTS_CREATE_EMPTY_TITLE = "krouiñ ur roll goullo";
Blockly.Msg.LISTS_CREATE_EMPTY_TOOLTIP = "Distreiñ ul listenn, 0 a hirder, n'eus enrolladenn ebet enni";
Blockly.Msg.LISTS_CREATE_WITH_CONTAINER_TITLE_ADD = "roll";
Blockly.Msg.LISTS_CREATE_WITH_CONTAINER_TOOLTIP = "Ouzhpennañ, lemel pe adurzhiañ ar rannoù evit kefluniañ ar bloc'h listenn-mañ.";
Blockly.Msg.LISTS_CREATE_WITH_HELPURL = "https://github.com/google/blockly/wiki/Lists#create-list-with";
Blockly.Msg.LISTS_CREATE_WITH_INPUT_WITH = "krouiñ ur roll gant";
Blockly.Msg.LISTS_CREATE_WITH_ITEM_TOOLTIP = "Ouzhpennañ un elfenn d'ar roll";
Blockly.Msg.LISTS_CREATE_WITH_TOOLTIP = "Krouiñ ur roll gant un niver bennak a elfennoù.";
Blockly.Msg.LISTS_GET_INDEX_FIRST = "kentañ";
Blockly.Msg.LISTS_GET_INDEX_FROM_END = "# adalek ar fin";
Blockly.Msg.LISTS_GET_INDEX_FROM_START = "#";  // untranslated
Blockly.Msg.LISTS_GET_INDEX_GET = "tapout";
Blockly.Msg.LISTS_GET_INDEX_GET_REMOVE = "tapout ha lemel";
Blockly.Msg.LISTS_GET_INDEX_LAST = "diwezhañ";
Blockly.Msg.LISTS_GET_INDEX_RANDOM = "dre zegouezh";
Blockly.Msg.LISTS_GET_INDEX_REMOVE = "lemel";
Blockly.Msg.LISTS_GET_INDEX_TAIL = "";  // untranslated
Blockly.Msg.LISTS_GET_INDEX_TOOLTIP_GET_FIRST = "Distreiñ an elfenn gentañ en ul listenn.";
Blockly.Msg.LISTS_GET_INDEX_TOOLTIP_GET_FROM_END = "Distreiñ an elfenn el lec'h meneget en ul listenn. #1 eo an elfenn gentañ.";
Blockly.Msg.LISTS_GET_INDEX_TOOLTIP_GET_FROM_START = "Distreiñ an elfenn el lec'h meneget en ul listenn. #1 eo an elfenn gentañ.";
Blockly.Msg.LISTS_GET_INDEX_TOOLTIP_GET_LAST = "Distreiñ un elfenn diwezhañ en ul listenn.";
Blockly.Msg.LISTS_GET_INDEX_TOOLTIP_GET_RANDOM = "Distreiñ un elfenn dre zegouezh en ul listenn.";
Blockly.Msg.LISTS_GET_INDEX_TOOLTIP_GET_REMOVE_FIRST = "Lemel ha distreiñ a ra an elfenn gentañ en ul listenn.";
Blockly.Msg.LISTS_GET_INDEX_TOOLTIP_GET_REMOVE_FROM_END = "Lemel ha distreiñ a ra an elfenn el lec'h meneget en ul listenn. #1 eo an elfenn ziwezhañ.";
Blockly.Msg.LISTS_GET_INDEX_TOOLTIP_GET_REMOVE_FROM_START = "Lemel ha distreiñ a ra an elfenn el lec'h meneget en ul listenn. #1 eo an elfenn gentañ.";
Blockly.Msg.LISTS_GET_INDEX_TOOLTIP_GET_REMOVE_LAST = "Lemel ha distreiñ a ra an elfenn diwezhañ en ul listenn.";
Blockly.Msg.LISTS_GET_INDEX_TOOLTIP_GET_REMOVE_RANDOM = "Lemel ha distreiñ a ra an elfenn dre zegouezh en ul listenn.";
Blockly.Msg.LISTS_GET_INDEX_TOOLTIP_REMOVE_FIRST = "Lemel a ra an elfenn gentañ en ul listenn.";
Blockly.Msg.LISTS_GET_INDEX_TOOLTIP_REMOVE_FROM_END = "Lemel a ra an elfenn el lec'h meneget en ul listenn. #1 eo an elfenn ziwezhañ.";
Blockly.Msg.LISTS_GET_INDEX_TOOLTIP_REMOVE_FROM_START = "Lemel a ra an elfenn el lec'h meneget en ul listenn. #1 eo an elfenn gentañ.";
Blockly.Msg.LISTS_GET_INDEX_TOOLTIP_REMOVE_LAST = "Distreiñ a ra an elfenn diwezhañ en ul listenn.";
Blockly.Msg.LISTS_GET_INDEX_TOOLTIP_REMOVE_RANDOM = "Lemel a ra un elfenn dre zegouezh en ul listenn.";
Blockly.Msg.LISTS_GET_SUBLIST_END_FROM_END = "betek # adalek an dibenn";
Blockly.Msg.LISTS_GET_SUBLIST_END_FROM_START = "da #";
Blockly.Msg.LISTS_GET_SUBLIST_END_LAST = "betek ar fin";
Blockly.Msg.LISTS_GET_SUBLIST_HELPURL = "https://github.com/google/blockly/wiki/Lists#getting-a-sublist";  // untranslated
Blockly.Msg.LISTS_GET_SUBLIST_START_FIRST = "Kaout an islistenn adalek an deroù";
Blockly.Msg.LISTS_GET_SUBLIST_START_FROM_END = "Kaout an islistenn adalek # adalek an dibenn";
Blockly.Msg.LISTS_GET_SUBLIST_START_FROM_START = "Kaout an islistenn adalek #";
Blockly.Msg.LISTS_GET_SUBLIST_TAIL = "";  // untranslated
Blockly.Msg.LISTS_GET_SUBLIST_TOOLTIP = "Krouiñ un eilad eus lodenn spisaet ul listenn.";
Blockly.Msg.LISTS_INDEX_OF_FIRST = "kavout reveziadenn gentañ un elfenn";
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 = "kavout reveziadenn diwezhañ un elfenn";
Blockly.Msg.LISTS_INDEX_OF_TOOLTIP = "Distreiñ meneger ar c'hentañ/an eil reveziadenn eus an elfenn en ul listenn. Distreiñ 0 ma n'eo ket kavet an destenn.";
Blockly.Msg.LISTS_INLIST = "el listenn";
Blockly.Msg.LISTS_ISEMPTY_HELPURL = "https://github.com/google/blockly/wiki/Lists#is-empty";  // untranslated
Blockly.Msg.LISTS_ISEMPTY_TITLE = "%1 zo goullo";
Blockly.Msg.LISTS_ISEMPTY_TOOLTIP = "Distreiñ gwir m'eo goullo al listenn.";
Blockly.Msg.LISTS_LENGTH_HELPURL = "https://github.com/google/blockly/wiki/Lists#length-of";  // untranslated
Blockly.Msg.LISTS_LENGTH_TITLE = "hirder %1";
Blockly.Msg.LISTS_LENGTH_TOOLTIP = "Distreiñ hirder ul listenn.";
Blockly.Msg.LISTS_REPEAT_HELPURL = "https://github.com/google/blockly/wiki/Lists#create-list-with";  // untranslated
Blockly.Msg.LISTS_REPEAT_TITLE = "Krouiñ ul listenn gant an elfenn %1 arreet div wech";
Blockly.Msg.LISTS_REPEAT_TOOLTIP = "Krouiñ ul listenn a c'hoarvez eus an dalvoudenn roet arreet an niver a wech meneget";
Blockly.Msg.LISTS_SET_INDEX_HELPURL = "https://github.com/google/blockly/wiki/Lists#in-list--set";  // untranslated
Blockly.Msg.LISTS_SET_INDEX_INPUT_TO = "evel";
Blockly.Msg.LISTS_SET_INDEX_INSERT = "ensoc'hañ evel";
Blockly.Msg.LISTS_SET_INDEX_SET = "termenañ";
Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_INSERT_FIRST = "Ensoc'hañ a ra an elfenn e deroù ul listenn.";
Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_INSERT_FROM_END = "Ensoc'hañ a ra an elfenn el lec'h meneget en ul listenn. #1 eo an elfenn gentañ.";
Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_INSERT_FROM_START = "Ensoc'hañ a ra an elfenn el lec'h meneget en ul listenn. #1 eo an elfenn gentañ.";
Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_INSERT_LAST = "Ouzhpennañ a ra an elfenn e fin al listenn.";
Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_INSERT_RANDOM = "Ensoc'hañ a ra an elfenn dre zegouezh en ul listenn.";
Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_SET_FIRST = "Termenañ a ra an elfenn gentañ en ul listenn.";
Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_SET_FROM_END = "Termenañ a ra an elfenn el lec'h meneget en ul listenn. #1 eo an elfenn diwezhañ.";
Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_SET_FROM_START = "Termenañ a ra an elfenn el lec'h meneget en ul listenn. #1 eo an elfenn ziwezhañ.";
Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_SET_LAST = "Termenañ a ra an elfenn diwezhañ en ul listenn.";
Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_SET_RANDOM = "Termenañ a ra un elfenn dre zegouezh en ul listenn.";
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";
Blockly.Msg.LISTS_SPLIT_LIST_FROM_TEXT = "Krouiñ ul listenn diwar an destenn";
Blockly.Msg.LISTS_SPLIT_TEXT_FROM_LIST = "Krouiñ un destenn diwar al listenn";
Blockly.Msg.LISTS_SPLIT_TOOLTIP_JOIN = "Bodañ ul listennad testennoù en ul listenn hepken, o tispartiañ anezho gant un dispartier.";
Blockly.Msg.LISTS_SPLIT_TOOLTIP_SPLIT = "Troc'hañ un destenn en ul listennad testennoù, o troc'hañ e pep dispartier.";
Blockly.Msg.LISTS_SPLIT_WITH_DELIMITER = "gant an dispartier";
Blockly.Msg.LOGIC_BOOLEAN_FALSE = "gaou";
Blockly.Msg.LOGIC_BOOLEAN_HELPURL = "https://github.com/google/blockly/wiki/Logic#values";  // untranslated
Blockly.Msg.LOGIC_BOOLEAN_TOOLTIP = "Distreiñ pe gwir pe faos";
Blockly.Msg.LOGIC_BOOLEAN_TRUE = "gwir";
Blockly.Msg.LOGIC_COMPARE_HELPURL = "https://en.wikipedia.org/wiki/Inequality_(mathematics)";
Blockly.Msg.LOGIC_COMPARE_TOOLTIP_EQ = "Distreiñ gwir m'eo par an daou voned.";
Blockly.Msg.LOGIC_COMPARE_TOOLTIP_GT = "Distreiñ gwir m'eo brasoc'h ar moned kentañ eget an eil.";
Blockly.Msg.LOGIC_COMPARE_TOOLTIP_GTE = "Distreiñ gwir m'eo brasoc'h ar moned kentañ eget an eil pe par dezhañ.";
Blockly.Msg.LOGIC_COMPARE_TOOLTIP_LT = "Distreiñ gwir m'eo bihanoc'h ar moned kentañ eget an eil.";
Blockly.Msg.LOGIC_COMPARE_TOOLTIP_LTE = "Distreiñ gwir m'eo bihanoc'h ar moned kentañ eget an eil pe m'eo par dezhañ.";
Blockly.Msg.LOGIC_COMPARE_TOOLTIP_NEQ = "Distreiñ gwir ma n'eo ket par an daou voned.";
Blockly.Msg.LOGIC_NEGATE_HELPURL = "https://github.com/google/blockly/wiki/Logic#not";  // untranslated
Blockly.Msg.LOGIC_NEGATE_TITLE = "nann %1";
Blockly.Msg.LOGIC_NEGATE_TOOLTIP = "Distreiñ gwir m'eo faos ar moned. Distreiñ faos m'eo gwir ar moned.";
Blockly.Msg.LOGIC_NULL = "Null";
Blockly.Msg.LOGIC_NULL_HELPURL = "https://en.wikipedia.org/wiki/Nullable_type";  // untranslated
Blockly.Msg.LOGIC_NULL_TOOLTIP = "Distreiñ null.";
Blockly.Msg.LOGIC_OPERATION_AND = "ha(g)";
Blockly.Msg.LOGIC_OPERATION_HELPURL = "https://github.com/google/blockly/wiki/Logic#logical-operations";  // untranslated
Blockly.Msg.LOGIC_OPERATION_OR = "pe";
Blockly.Msg.LOGIC_OPERATION_TOOLTIP_AND = "Distreiñ gwir m'eo gwir an da daou voned.";
Blockly.Msg.LOGIC_OPERATION_TOOLTIP_OR = "Distreiñ gwir m'eo gwir unan eus an daou voned da nebeutañ.";
Blockly.Msg.LOGIC_TERNARY_CONDITION = "amprouad";
Blockly.Msg.LOGIC_TERNARY_HELPURL = "https://en.wikipedia.org/wiki/%3F:";  // untranslated
Blockly.Msg.LOGIC_TERNARY_IF_FALSE = "m'eo gaou";
Blockly.Msg.LOGIC_TERNARY_IF_TRUE = "m'eo gwir";
Blockly.Msg.LOGIC_TERNARY_TOOLTIP = "Gwiriañ an amplegad e 'prouad'. M'eo gwir an amplegad, distreiñ an dalvoudenn 'm'eo gwir'; anez distreiñ ar moned 'm'eo faos'.";
Blockly.Msg.MATH_ADDITION_SYMBOL = "+";  // untranslated
Blockly.Msg.MATH_ARITHMETIC_HELPURL = "https://br.wikipedia.org/wiki/Aritmetik";
Blockly.Msg.MATH_ARITHMETIC_TOOLTIP_ADD = "Distreiñ sammad daou niver.";
Blockly.Msg.MATH_ARITHMETIC_TOOLTIP_DIVIDE = "Distreiñ rannad daou niver.";
Blockly.Msg.MATH_ARITHMETIC_TOOLTIP_MINUS = "Distreiñ diforc'h daou niver";
Blockly.Msg.MATH_ARITHMETIC_TOOLTIP_MULTIPLY = "Distreiñ liesad daou niver.";
Blockly.Msg.MATH_ARITHMETIC_TOOLTIP_POWER = "Distreiñ an niver kentañ lakaet dindan gallouter an eil niver.";
Blockly.Msg.MATH_CHANGE_HELPURL = "https://en.wikipedia.org/wiki/Programming_idiom#Incrementing_a_counter";
Blockly.Msg.MATH_CHANGE_TITLE = "kemmañ %1 gant %2";
Blockly.Msg.MATH_CHANGE_TOOLTIP = "Ouzhpennañ un niver d'an argemm '%1'.";
Blockly.Msg.MATH_CONSTANT_HELPURL = "https://en.wikipedia.org/wiki/Mathematical_constant";
Blockly.Msg.MATH_CONSTANT_TOOLTIP = "Distreiñ unan eus  digemmennoù red : π (3.141…), e (2.718…), φ (1.618…), sqrt(2) (1.414…), sqrt(½) (0.707…), or ∞ (anvevenn).";
Blockly.Msg.MATH_CONSTRAIN_HELPURL = "https://en.wikipedia.org/wiki/Clamping_%28graphics%29";  // untranslated
Blockly.Msg.MATH_CONSTRAIN_TITLE = "destrizhañ %1 etre %2 ha %3";
Blockly.Msg.MATH_CONSTRAIN_TOOLTIP = "Destrizhañ un niver da vezañ etre ar bevennoù spisaet (enlakaet)";
Blockly.Msg.MATH_DIVISION_SYMBOL = "÷";  // untranslated
Blockly.Msg.MATH_IS_DIVISIBLE_BY = "a zo rannadus dre";
Blockly.Msg.MATH_IS_EVEN = "zo par";
Blockly.Msg.MATH_IS_NEGATIVE = "a zo negativel";
Blockly.Msg.MATH_IS_ODD = "zo ampar";
Blockly.Msg.MATH_IS_POSITIVE = "a zo pozitivel";
Blockly.Msg.MATH_IS_PRIME = "zo kentañ";
Blockly.Msg.MATH_IS_TOOLTIP = "Gwiriañ m'eo par, anpar, kentañ, muiel, leiel un niverenn pe ma c'haller rannañ anezhi dre un niver roet zo. Distreiñ gwir pe faos.";
Blockly.Msg.MATH_IS_WHOLE = "zo anterin";
Blockly.Msg.MATH_MODULO_HELPURL = "https://en.wikipedia.org/wiki/Modulo_operation";
Blockly.Msg.MATH_MODULO_TITLE = "rest eus %1 ÷ %2";
Blockly.Msg.MATH_MODULO_TOOLTIP = "Distreiñ dilerc'h rannadur an div niver";
Blockly.Msg.MATH_MULTIPLICATION_SYMBOL = "×";  // untranslated
Blockly.Msg.MATH_NUMBER_HELPURL = "https://br.wikipedia.org/wiki/Niver";
Blockly.Msg.MATH_NUMBER_TOOLTIP = "Un niver.";
Blockly.Msg.MATH_ONLIST_HELPURL = "";  // untranslated
Blockly.Msg.MATH_ONLIST_OPERATOR_AVERAGE = "Keitat al listenn";
Blockly.Msg.MATH_ONLIST_OPERATOR_MAX = "Uc'hegenn al listenn";
Blockly.Msg.MATH_ONLIST_OPERATOR_MEDIAN = "Kreizad al listenn";
Blockly.Msg.MATH_ONLIST_OPERATOR_MIN = "Izegenn al listenn";
Blockly.Msg.MATH_ONLIST_OPERATOR_MODE = "modoù stankañ el listenn";
Blockly.Msg.MATH_ONLIST_OPERATOR_RANDOM = "Elfennn eus al listenn tennet d'ar sord";
Blockly.Msg.MATH_ONLIST_OPERATOR_STD_DEV = "forc'had standart eus al listenn";
Blockly.Msg.MATH_ONLIST_OPERATOR_SUM = "Sammad al listenn";
Blockly.Msg.MATH_ONLIST_TOOLTIP_AVERAGE = "Distreiñ keitad (niveroniel) an talvoudennoù niverel el listenn.";
Blockly.Msg.MATH_ONLIST_TOOLTIP_MAX = "Distreiñ an niver brasañ el listenn.";
Blockly.Msg.MATH_ONLIST_TOOLTIP_MEDIAN = "Distreiñ an niver kreiz el listenn";
Blockly.Msg.MATH_ONLIST_TOOLTIP_MIN = "Distreiñ an niver bihanañ el listenn";
Blockly.Msg.MATH_ONLIST_TOOLTIP_MODE = "Distreiñ ul listennad elfennoù stankoc'h el listenn.";
Blockly.Msg.MATH_ONLIST_TOOLTIP_RANDOM = "Distreiñ un elfenn zargouezhek el listenn";
Blockly.Msg.MATH_ONLIST_TOOLTIP_STD_DEV = "Distreiñ forc'had standart al listenn.";
Blockly.Msg.MATH_ONLIST_TOOLTIP_SUM = "Distreiñ sammad an holl niveroù zo el listenn.";
Blockly.Msg.MATH_POWER_SYMBOL = "^";  // untranslated
Blockly.Msg.MATH_RANDOM_FLOAT_HELPURL = "https://en.wikipedia.org/wiki/Random_number_generation";
Blockly.Msg.MATH_RANDOM_FLOAT_TITLE_RANDOM = "Rann dargouezhek";
Blockly.Msg.MATH_RANDOM_FLOAT_TOOLTIP = "Distreiñ ur rann dargouezhek etre 0.0 (enkaelat) hag 1.0 (ezkaelat).";
Blockly.Msg.MATH_RANDOM_INT_HELPURL = "https://en.wikipedia.org/wiki/Random_number_generation";
Blockly.Msg.MATH_RANDOM_INT_TITLE = "anterin dargouezhek etre %1 ha %2";
Blockly.Msg.MATH_RANDOM_INT_TOOLTIP = "Distreiñ un anterin dargouezhek etre an div vevenn spisaet, endalc'het.";
Blockly.Msg.MATH_ROUND_HELPURL = "https://en.wikipedia.org/wiki/Rounding";
Blockly.Msg.MATH_ROUND_OPERATOR_ROUND = "Rontaat";
Blockly.Msg.MATH_ROUND_OPERATOR_ROUNDDOWN = "Rontaat dindan";
Blockly.Msg.MATH_ROUND_OPERATOR_ROUNDUP = "Rontaat a-us";
Blockly.Msg.MATH_ROUND_TOOLTIP = "Rontaat un niver dindan pe a-us";
Blockly.Msg.MATH_SINGLE_HELPURL = "https://br.wikipedia.org/wiki/Square_root";
Blockly.Msg.MATH_SINGLE_OP_ABSOLUTE = "dizave";
Blockly.Msg.MATH_SINGLE_OP_ROOT = "gwrizienn garrez";
Blockly.Msg.MATH_SINGLE_TOOLTIP_ABS = "Distreiñ talvoud dizave un niver.";
Blockly.Msg.MATH_SINGLE_TOOLTIP_EXP = "Distreiñ galloudad un niver.";
Blockly.Msg.MATH_SINGLE_TOOLTIP_LN = "Distreiñ logaritm naturel un niver";
Blockly.Msg.MATH_SINGLE_TOOLTIP_LOG10 = "Distreiñ logaritm diazez 10 un niver";
Blockly.Msg.MATH_SINGLE_TOOLTIP_NEG = "Distreiñ enebad un niver";
Blockly.Msg.MATH_SINGLE_TOOLTIP_POW10 = "Distreiñ 10 da c'halloudad un niver.";
Blockly.Msg.MATH_SINGLE_TOOLTIP_ROOT = "Distreiñ gwrizienn garrez un niver";
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://br.wikipedia.org/wiki/Trigonometric_functions";
Blockly.Msg.MATH_TRIG_SIN = "sin";  // untranslated
Blockly.Msg.MATH_TRIG_TAN = "tan";  // untranslated
Blockly.Msg.MATH_TRIG_TOOLTIP_ACOS = "Distreiñ ark kosinuz un niver";
Blockly.Msg.MATH_TRIG_TOOLTIP_ASIN = "Distreiñ ark sinuz un niver";
Blockly.Msg.MATH_TRIG_TOOLTIP_ATAN = "Distreiñ ark tangent un niver";
Blockly.Msg.MATH_TRIG_TOOLTIP_COS = "Distreiñ kosinuz ur c'horn (ket e radianoù)";
Blockly.Msg.MATH_TRIG_TOOLTIP_SIN = "Distreiñ sinuz ur c'horn (ket e radianoù)";
Blockly.Msg.MATH_TRIG_TOOLTIP_TAN = "Distreiñ tangent ur c'horn (ket e radianoù).";
Blockly.Msg.ME = "Me";
Blockly.Msg.NEW_VARIABLE = "Argemmenn nevez...";
Blockly.Msg.NEW_VARIABLE_TITLE = "Anv an argemmenn nevez :";
Blockly.Msg.ORDINAL_NUMBER_SUFFIX = "";  // untranslated
Blockly.Msg.PROCEDURES_ALLOW_STATEMENTS = "aotren an disklêriadurioù";
Blockly.Msg.PROCEDURES_BEFORE_PARAMS = "gant :";
Blockly.Msg.PROCEDURES_CALLNORETURN_HELPURL = "https://en.wikipedia.org/wiki/Procedure_%28computer_science%29";
Blockly.Msg.PROCEDURES_CALLNORETURN_TOOLTIP = "Seveniñ an arc'hwel '%1' termenet gant an implijer.";
Blockly.Msg.PROCEDURES_CALLRETURN_HELPURL = "https://en.wikipedia.org/wiki/Procedure_%28computer_science%29";
Blockly.Msg.PROCEDURES_CALLRETURN_TOOLTIP = "Seveniñ an arc'hwel '%1' termenet gant an implijer hag implijout e zisoc'h.";
Blockly.Msg.PROCEDURES_CALL_BEFORE_PARAMS = "gant :";
Blockly.Msg.PROCEDURES_CREATE_DO = "Krouiñ '%1'";
Blockly.Msg.PROCEDURES_DEFNORETURN_COMMENT = "Deskrivañ an arc'hwel-mañ...";
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 = "ober un dra bennak";
Blockly.Msg.PROCEDURES_DEFNORETURN_TITLE = "da";
Blockly.Msg.PROCEDURES_DEFNORETURN_TOOLTIP = "Krouiñ un arc'hwel hep mont er-maez.";
Blockly.Msg.PROCEDURES_DEFRETURN_HELPURL = "https://en.wikipedia.org/wiki/Procedure_%28computer_science%29";  // untranslated
Blockly.Msg.PROCEDURES_DEFRETURN_RETURN = "distreiñ";
Blockly.Msg.PROCEDURES_DEFRETURN_TOOLTIP = "Kouiñ un arc'hwel gant ur mont er-maez";
Blockly.Msg.PROCEDURES_DEF_DUPLICATE_WARNING = "Diwallit : an arc'hwel-mañ en deus arventennoù eiladet.";
Blockly.Msg.PROCEDURES_HIGHLIGHT_DEF = "Dreislinennañ termenadur an arc'hwel";
Blockly.Msg.PROCEDURES_IFRETURN_HELPURL = "http://c2.com/cgi/wiki?GuardClause";  // untranslated
Blockly.Msg.PROCEDURES_IFRETURN_TOOLTIP = "Ma'z eo gwir un dalvoudenn, distreiñ un eil talvoudenn neuze.";
Blockly.Msg.PROCEDURES_IFRETURN_WARNING = "Diwallit : Gallout a rafe ar bloc'h bezañ implijet e termenadur un arc'hwel hepken.";
Blockly.Msg.PROCEDURES_MUTATORARG_TITLE = "Anv ar moned";
Blockly.Msg.PROCEDURES_MUTATORARG_TOOLTIP = "Ouzhpennañ ur moned d'an arc'hwel.";
Blockly.Msg.PROCEDURES_MUTATORCONTAINER_TITLE = "Monedoù";
Blockly.Msg.PROCEDURES_MUTATORCONTAINER_TOOLTIP = "Ouzhpennañ, lemel, pe adkempenn monedoù an arc'hwel-mañ.";
Blockly.Msg.REDO = "Redo";  // untranslated
Blockly.Msg.REMOVE_COMMENT = "Lemel an evezhiadenn kuit";
Blockly.Msg.RENAME_VARIABLE = "Adenvel an argemmenn...";
Blockly.Msg.RENAME_VARIABLE_TITLE = "Adenvel an holl argemmennoù '%1' e :";
Blockly.Msg.REPLACE_EXISTING_BLOCKS = "Replace existing blocks? 'Cancel' will merge.";  // untranslated
Blockly.Msg.TEXT_APPEND_APPENDTEXT = "ouzhpennañ an destenn";
Blockly.Msg.TEXT_APPEND_HELPURL = "https://github.com/google/blockly/wiki/Text#text-modification";  // untranslated
Blockly.Msg.TEXT_APPEND_TO = "da";
Blockly.Msg.TEXT_APPEND_TOOLTIP = "Ouzhpennañ testenn d'an argemmenn'%1'.";
Blockly.Msg.TEXT_CHANGECASE_HELPURL = "https://github.com/google/blockly/wiki/Text#adjusting-text-case";  // untranslated
Blockly.Msg.TEXT_CHANGECASE_OPERATOR_LOWERCASE = "e lizherennoù bihan";
Blockly.Msg.TEXT_CHANGECASE_OPERATOR_TITLECASE = "Gant Ur Bennlizherenn E Deroù Pep Ger";
Blockly.Msg.TEXT_CHANGECASE_OPERATOR_UPPERCASE = "e PENNLIZHERENNOÙ";
Blockly.Msg.TEXT_CHANGECASE_TOOLTIP = "Distreiñ un eilenn eus an eilenn en un direnneg all";
Blockly.Msg.TEXT_CHARAT_FIRST = "tapout al lizherenn gentañ";
Blockly.Msg.TEXT_CHARAT_FROM_END = "Kaout al lizherenn # adalek an dibenn.";
Blockly.Msg.TEXT_CHARAT_FROM_START = "Kaout al lizherenn #";
Blockly.Msg.TEXT_CHARAT_HELPURL = "https://github.com/google/blockly/wiki/Text#extracting-text";  // untranslated
Blockly.Msg.TEXT_CHARAT_INPUT_INTEXT = "en destenn";
Blockly.Msg.TEXT_CHARAT_LAST = "tapout al lizherenn ziwezhañ";
Blockly.Msg.TEXT_CHARAT_RANDOM = "Kaout ul lizherenn dre zegouezh";
Blockly.Msg.TEXT_CHARAT_TAIL = "";  // untranslated
Blockly.Msg.TEXT_CHARAT_TOOLTIP = "Distreiñ al lizherenn d'al lec'h spisaet.";
Blockly.Msg.TEXT_CREATE_JOIN_ITEM_TOOLTIP = "Ouzhpennañ un elfenn d'an destenn.";
Blockly.Msg.TEXT_CREATE_JOIN_TITLE_JOIN = "stagañ";
Blockly.Msg.TEXT_CREATE_JOIN_TOOLTIP = "Ouzhpennañ, lemel pe adurzhiañ ar rannoù evit kefluniañ ar bloc'h testenn-mañ.";
Blockly.Msg.TEXT_GET_SUBSTRING_END_FROM_END = "Betek al lizherenn # adalek an dibenn.";
Blockly.Msg.TEXT_GET_SUBSTRING_END_FROM_START = "betek al lizherenn #";
Blockly.Msg.TEXT_GET_SUBSTRING_END_LAST = "d'al lizherenn diwezhañ";
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 = "en destenn";
Blockly.Msg.TEXT_GET_SUBSTRING_START_FIRST = "Kaout an ischadenn adalek al lizherenn gentañ";
Blockly.Msg.TEXT_GET_SUBSTRING_START_FROM_END = "Kaout an ischadenn adalek al lizherenn # betek an dibenn";
Blockly.Msg.TEXT_GET_SUBSTRING_START_FROM_START = "Kaout an ischadenn adalek al lizherenn #";
Blockly.Msg.TEXT_GET_SUBSTRING_TAIL = "";  // untranslated
Blockly.Msg.TEXT_GET_SUBSTRING_TOOLTIP = "Distreiñ un tamm spisaet eus an destenn.";
Blockly.Msg.TEXT_INDEXOF_HELPURL = "https://github.com/google/blockly/wiki/Text#finding-text";  // untranslated
Blockly.Msg.TEXT_INDEXOF_INPUT_INTEXT = "en destenn";
Blockly.Msg.TEXT_INDEXOF_OPERATOR_FIRST = "kavout reveziadenn gentañ an destenn";
Blockly.Msg.TEXT_INDEXOF_OPERATOR_LAST = "kavout reveziadenn diwezhañ an destenn";
Blockly.Msg.TEXT_INDEXOF_TAIL = "";  // untranslated
Blockly.Msg.TEXT_INDEXOF_TOOLTIP = "Distreiñ meneger ar c'hentañ/an eil reveziadenn eus ar chadenn gentañ en eil chadenn. Distreiñ 0 ma n'eo ket kavet ar chadenn.";
Blockly.Msg.TEXT_ISEMPTY_HELPURL = "https://github.com/google/blockly/wiki/Text#checking-for-empty-text";  // untranslated
Blockly.Msg.TEXT_ISEMPTY_TITLE = "%1 zo goullo";
Blockly.Msg.TEXT_ISEMPTY_TOOLTIP = "Adkas gwir m'eo goullo an destenn roet.";
Blockly.Msg.TEXT_JOIN_HELPURL = "https://github.com/google/blockly/wiki/Text#text-creation";  // untranslated
Blockly.Msg.TEXT_JOIN_TITLE_CREATEWITH = "krouiñ un destenn gant";
Blockly.Msg.TEXT_JOIN_TOOLTIP = "Krouit un tamm testenn en ur gevelstrollañ un niver bennak a elfennoù";
Blockly.Msg.TEXT_LENGTH_HELPURL = "https://github.com/google/blockly/wiki/Text#text-modification";  // untranslated
Blockly.Msg.TEXT_LENGTH_TITLE = "hirder %1";
Blockly.Msg.TEXT_LENGTH_TOOLTIP = "Distreiñ an niver a lizherennoù(en ur gontañ an esaouennoù e-barzh) en destenn roet.";
Blockly.Msg.TEXT_PRINT_HELPURL = "https://github.com/google/blockly/wiki/Text#printing-text";  // untranslated
Blockly.Msg.TEXT_PRINT_TITLE = "moullañ %1";
Blockly.Msg.TEXT_PRINT_TOOLTIP = "Moullañ an destenn, an niverenn pe un dalvoudenn spisaet all";
Blockly.Msg.TEXT_PROMPT_HELPURL = "https://github.com/google/blockly/wiki/Text#getting-input-from-the-user";  // untranslated
Blockly.Msg.TEXT_PROMPT_TOOLTIP_NUMBER = "Goulenn un niver gant an implijer.";
Blockly.Msg.TEXT_PROMPT_TOOLTIP_TEXT = "Goulenn un destenn gant an implijer.";
Blockly.Msg.TEXT_PROMPT_TYPE_NUMBER = "pedadenn evit un niver gant ur c'hemennad";
Blockly.Msg.TEXT_PROMPT_TYPE_TEXT = "pedadenn evit un destenn gant ur c'hemennad";
Blockly.Msg.TEXT_TEXT_HELPURL = "https://en.wikipedia.org/wiki/String_(computer_science)";
Blockly.Msg.TEXT_TEXT_TOOLTIP = "Ul lizherenn, ur ger pe ul linennad testenn.";
Blockly.Msg.TEXT_TRIM_HELPURL = "https://github.com/google/blockly/wiki/Text#trimming-removing-spaces";  // untranslated
Blockly.Msg.TEXT_TRIM_OPERATOR_BOTH = "Lemel an esaouennoù en daou du";
Blockly.Msg.TEXT_TRIM_OPERATOR_LEFT = "Lemel an esaouennoù eus an tu kleiz";
Blockly.Msg.TEXT_TRIM_OPERATOR_RIGHT = "Lemel an esaouennoù eus an tu dehou";
Blockly.Msg.TEXT_TRIM_TOOLTIP = "Distreiñ un eilenn eus an destenn gant an esaouennoù lamet eus un tu pe eus an daou du";
Blockly.Msg.TODAY = "Hiziv";
Blockly.Msg.UNDO = "Undo";  // untranslated
Blockly.Msg.VARIABLES_DEFAULT_NAME = "elfenn";
Blockly.Msg.VARIABLES_GET_CREATE_SET = "Krouiñ 'termenañ %1'";
Blockly.Msg.VARIABLES_GET_HELPURL = "https://github.com/google/blockly/wiki/Variables#get";  // untranslated
Blockly.Msg.VARIABLES_GET_TOOLTIP = "Distreiñ talvoud an argemm-mañ.";
Blockly.Msg.VARIABLES_SET = "termenañ %1 da %2";
Blockly.Msg.VARIABLES_SET_CREATE_GET = "Krouiñ 'kaout %1'";
Blockly.Msg.VARIABLES_SET_HELPURL = "https://github.com/google/blockly/wiki/Variables#set";  // untranslated
Blockly.Msg.VARIABLES_SET_TOOLTIP = "Termenañ a ra argemm-mañ evit ma vo par da dalvoudenn ar moned.";
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:
describe('LocalstorageEventStoreAdapter', function() {
    // Mandatory: Firefox doesn't allow to mock localStorage
    var lsmock = {
        values: {},
        getItem: function(key) {
            return this.values[key];
        },
        setItem: function(key, value) {
            this.values[key] = value;
        },
        clear: function() {
            this.values = {};
        }
    };

    var store = new Osef.storage.LocalstorageEventStoreAdapter('test');
    store.storage = lsmock;
    var assert = chai.assert,
        spy = sinon.spy(lsmock, 'setItem');

    afterEach(function() {
        lsmock.clear();
    });

    describe('append', function() {
        it('should store the data in localstorage along with its version number', function() {
            store.append('contact-123', 0, {foo: 'bar'});
            assert(spy.calledWith('test:contact-123:1', '{"data":{"foo":"bar"},"version":1}'));
        });

        it('should store the version number', function() {
            store.append('contact-123', 0, {foo: 'bar'});
            assert(spy.calledWith('test:contact-123:__version__', '1'));
        });

        it('should throw if there is a version conflict', function() {
            store.append('contact-123', 0, {foo: 'bar'});
            assert.throws(function() { store.append('contact-123', 2, {foo: 'bar'}) }, /Concurrency error/);
        });
    });

    describe('read', function() {
        beforeEach(function() {
            store.append('contact-123', 0, {foo: 'bar'});
            store.append('contact-123', 1, {hello: 'world'});
            store.append('contact-123', 2, {john: 'doe'});
        });

        it('should return all data records', function() {
            var records = store.read('contact-123');
            assert.equal(3, records.length);
            assert.deepEqual({hello: 'world'}, records[1].data);
        });

        it('should return data recorded after a specific version', function() {
            var records = store.read('contact-123', 2);
            assert.equal(1, records.length);
            assert.deepEqual({john: 'doe'}, records[0].data);
        });

        it('should return data recorded after a specific version with a limit count', function() {
            var records = store.read('contact-123', 1, 1);
            assert.equal(1, records.length);
            assert.deepEqual({hello: 'world'}, records[0].data);
        });
    });
});


text:
#include <stdio.h>
#include <stdint.h>

#include "esppwm.h"

#include "py/runtime.h"
#include "shared-bindings/pulseio/PWMOut.h"

#include "eagle_soc.h"
#include "c_types.h"
#include "gpio.h"

#define PWM_FREQ_MAX 1000

// Shared with pybpwm
extern bool pwm_inited;
bool first_channel_variable;

void pwmout_reset(void) {
    first_channel_variable = false;
}

void common_hal_pulseio_pwmout_construct(pulseio_pwmout_obj_t* self, const mcu_pin_obj_t* pin, uint16_t duty, uint32_t frequency,
        bool variable_frequency) {
    if (frequency > PWM_FREQ_MAX) {
        nlr_raise(mp_obj_new_exception_msg_varg(&mp_type_OSError,
            "Maximum PWM frequency is %dhz.", PWM_FREQ_MAX));
    } else if (frequency < 1) {
        nlr_raise(mp_obj_new_exception_msg(&mp_type_OSError,
            "Minimum PWM frequency is 1hz."));
    }

    // start the PWM subsystem if it's not already running
    if (!pwm_inited) {
        pwm_init();
        pwm_inited = true;
        pwm_set_freq(frequency, 0);
        first_channel_variable = variable_frequency;
    } else if (first_channel_variable || pwm_get_freq(0) != frequency) {
        nlr_raise(mp_obj_new_exception_msg_varg(&mp_type_OSError,
            "Multiple PWM frequencies not supported. PWM already set to %dhz.", pwm_get_freq(0)));
    }

    self->channel = pwm_add(pin->gpio_number,
                            pin->peripheral,
                            pin->gpio_function);
    self->pin = pin;
    if (self->channel == -1) {
        nlr_raise(mp_obj_new_exception_msg_varg(&mp_type_OSError,
            "PWM not supported on pin %d", pin->gpio_number));
    }
}

extern void common_hal_pulseio_pwmout_deinit(pulseio_pwmout_obj_t* self) {
    pwm_delete(self->channel);
    pwm_start();
    if (self->pin->gpio_number < 16) {
        uint32_t pin_mask = 1 << self->pin->gpio_number;
        gpio_output_set(0x0, 0x0, 0x0, pin_mask);
        PIN_FUNC_SELECT(self->pin->peripheral, 0);
        PIN_PULLUP_DIS(self->pin->peripheral);
    }
}

extern void common_hal_pulseio_pwmout_set_duty_cycle(pulseio_pwmout_obj_t* self, uint16_t duty) {
    // We get 16 bits of duty in but the underlying code is only ten bit.
    pwm_set_duty(duty >> 6, self->channel);
    pwm_start();
}

uint16_t common_hal_pulseio_pwmout_get_duty_cycle(pulseio_pwmout_obj_t* self) {
    return pwm_get_duty(self->channel) << 6;
}

void common_hal_pulseio_pwmout_set_frequency(pulseio_pwmout_obj_t* self, uint32_t frequency) {
    if (frequency > PWM_FREQ_MAX) {
        nlr_raise(mp_obj_new_exception_msg_varg(&mp_type_OSError,
            "Maximum PWM frequency is %dhz.", PWM_FREQ_MAX));
    } else if (frequency < 1) {
        nlr_raise(mp_obj_new_exception_msg(&mp_type_OSError,
            "Minimum PWM frequency is 1hz."));
    }
    pwm_set_freq(frequency, 0);
}

uint32_t common_hal_pulseio_pwmout_get_frequency(pulseio_pwmout_obj_t* self) {
    return pwm_get_freq(0);
}

bool common_hal_pulseio_pwmout_get_variable_frequency(pulseio_pwmout_obj_t* self) {
    return first_channel_variable;
}


text:
class GravityMachine:

    def add(self):
        left_position = self.program[self.position + 1]
        right_position = self.program[self.position + 2]
        result_position = self.program[self.position + 3]
        self.program[result_position] = self.program[left_position] + self.program[right_position]

    def multiply(self):
        left_position = self.program[self.position + 1]
        right_position = self.program[self.position + 2]
        result_position = self.program[self.position + 3]
        self.program[result_position] = self.program[left_position] * self.program[right_position]

    OPCODES = {
        1: add,
        2: multiply,
        99: 99,
    }

    def __init__(self, program_text):
        self.original_program = [int(x) for x in program_text.split(',')]
        self.reset()

    def set(self, position, value):
        self.program[position] = value

    def get(self, position):
        return self.program[position]

    def reset(self):
        self.position = 0
        self.program = self.original_program.copy()

    def execute(self):
        while self.position < len(self.program):
            instruction = self.program[self.position]
            operation = self.OPCODES.get(instruction, None)
            if operation in [99, None]:
                if operation is None:
                    print(f"Invalid OPCODE {instruction}")
                break
            else:
                operation(self)
                self.position += 4
        print(f"DONE - {self.position}")
        print(self.program)

if __name__ == "__main__":
    with open('input.txt', 'r') as input_file:
        input_program = input_file.read()
    machine = GravityMachine(input_program)
    machine.set(1, 12)
    machine.set(2, 2)
    machine.execute()
    result = machine.get(0)
    print(f"Position 0 = {result}")


text:
- Fixed: Multibyte bugs
- Added: Binary Support

# Release 0.1.2
- Added: POST Support
- Added: POST check body Support
- Added: HTTPMethod Support


text:
<?php
namespace AppBundle\Exception;

use RuntimeException;

/**
 * Triggered when Country entity related errors occur.
 */
class CompanyNotFoundException extends RuntimeException
{
}


text: GetResourceTest test PASSED


text:
FLOW=$1
mkdir tmp
cp root.js tmp/
$FLOW status .
cp tmp1/root.js ./
$FLOW force-recheck root.js
$FLOW status .
mv tmp/root.js ./
rmdir tmp


text:
package org.jboss.pnc.causeway.brewclient;

import java.io.ByteArrayInputStream;

import com.redhat.red.build.koji.model.ImportFile;

import java.util.Iterator;
import java.util.function.Supplier;

import org.jboss.pnc.causeway.source.RenamedSources;

/**
 *
 * @author Honza Brázdil <jbrazdil@redhat.com>
 */
@Deprecated
public class StringLogImportFileGenerator extends ImportFileGenerator {
    private final String log;

    public StringLogImportFileGenerator(String log, RenamedSources sources) {
        super(sources);
        this.log = log;
    }

    @Override
    public Iterator<Supplier<ImportFile>> iterator() {
        return new ImportFileIterator2(artifacts.iterator());
    }

    private class ImportFileIterator2 extends ImportFileIterator {
        private boolean logGiven = false;

        public ImportFileIterator2(Iterator<Artifact> it) {
            super(it);
        }

        @Override
        public boolean hasNext() {
            if (!logGiven) {
                return true;
            }
            return super.hasNext();
        }

        @Override
        public Supplier<ImportFile> next() {
            if (log != null && !logGiven) {
                logGiven = true;
                byte[] bytes = log.getBytes();
                return () -> new ImportFile("build.log", new ByteArrayInputStream(bytes), bytes.length);
            }
            return super.next();
        }
    }

}


text:
MongoClient = require('mongodb').MongoClient;

MongoClient.connect('mongodb://localhost:27017/agilemoves-dev', function(err, db) {
    if(!err) {
        console.log("We are connected");
    }

    var cursor = db.collection('trainingcards').find({});

    cursor.each(function(err, trainingcard) {
        if (err) console.log("trainingcard cannot be read");

        if(trainingcard == null) {
            return 0;
        }

        if(trainingcard.category != null && trainingcard.category != undefined) {

            db.collection('categories').findAndModify({name:trainingcard.category}, [['name', 1]], {name:trainingcard.category}, {new:true, upsert: true}, function(err, doc) {
                if(err) console.log(err);
                console.log("docccc = " + doc);
            });

            //db.collection('trainingcards').update({_id: trainingcard._id}, {
            //    $unset : { 'category' : '' }}, function (err, updated) {
            //
            //    if (err) throw err;
            //    console.dir(updated + " trainingcard Updated!");
            //});

        }

    });
});


text:
module.exports = function(RED) {
    "use strict";
    var crypto = require("crypto");
    var fs = require("fs");
    var request = require("request");
    var url = require("url");
    var minimatch = require("minimatch");

    function BoxNode(n) {
        RED.nodes.createNode(this,n);
    }
    RED.nodes.registerType("box-credentials", BoxNode, {
        credentials: {
            displayName: {type:"text"},
            clientId: {type:"text"},
            clientSecret: {type:"password"},
            accessToken: {type:"password"},
            refreshToken: {type:"password"},
            expireTime: {type:"password"}
        }
    });

    BoxNode.prototype.refreshToken = function(cb) {
        var credentials = this.credentials;
        var node = this;
        //console.log("refreshing token: " + credentials.refreshToken);
        if (!credentials.refreshToken) {
            // TODO: add a timeout to make sure we make a request
            // every so often (if no flows trigger one) to ensure the
            // refresh token does not expire
            node.error("No refresh token to regain Box access");
            return cb('No refresh token to regain Box access');
        }
        request.post({
            url: 'https://api.box.com/oauth2/token',
            json: true,
            form: {
                grant_type: 'refresh_token',
                client_id: credentials.clientId,
                client_secret: credentials.clientSecret,
                refresh_token: credentials.refreshToken,
            },
        }, function(err, result, data) {
            if (err) {
                node.error("refresh token request error:" + err);
                return;
            }
            if (data.error) {
                node.error("refresh token error: " + data.error.message);
                return;
            }
            // console.log("refreshed: " + require('util').inspect(data));
            credentials.accessToken = data.access_token;
            if (data.refresh_token) {
                credentials.refreshToken = data.refresh_token;
            }
            credentials.expiresIn = data.expires_in;
            credentials.expireTime =
                data.expires_in + (new Date().getTime()/1000);
            credentials.tokenType = data.token_type;
            RED.nodes.addCredentials(node.id, credentials);
            if (typeof cb !== undefined) {
                cb();
            }
        });
    };

    BoxNode.prototype.request = function(req, retries, cb) {
        var node = this;
        if (typeof retries === 'function') {
            cb = retries;
            retries = 1;
        }
        if (typeof req !== 'object') {
            req = { url: req };
        }
        req.method = req.method || 'GET';
        if (!req.hasOwnProperty("json")) {
            req.json = true;
        }
        // always set access token to the latest ignoring any already present
        req.auth = { bearer: this.credentials.accessToken };
        if (!this.credentials.expireTime ||
            this.credentials.expireTime < (new Date().getTime()/1000)) {
            if (retries === 0) {
                node.error("too many refresh attempts, giving up");
                cb('too many refresh attempts, giving up');
                return;
            }
            node.warn("trying to refresh token due to expiry");
            node.refreshToken(function (err) {
                if (err) {
                    return;
                }
                node.request(req, 0, cb);
            });
            return;
        }
        return request(req, function(err, result, data) {
            if (err) {
                // handled in callback
                return cb(err, data);
            }
            if (result.statusCode === 401 && retries > 0) {
                retries--;
                node.warn("refreshing access token after 401 error");
                node.refreshToken(function (err) {
                    if (err) {
                        return cb(err, null);
                    }
                    return node.request(req, retries, cb);
                });
            }
            if (result.statusCode >= 400) {
                return cb(result.statusCode + ": " + data.message, data);
            }
            return cb(err, data);
        });
    };

    BoxNode.prototype.folderInfo = function(parent_id, cb) {
        this.request('https://api.box.com/2.0/folders/'+parent_id, cb);
    };

    BoxNode.prototype.resolvePath = function(path, parent_id, cb) {
        var node = this;
        if (typeof parent_id === 'function') {
            cb = parent_id;
            parent_id = 0;
        }
        if (typeof path === "string") {
            // split path and remove empty string components
            path = path.split("/").filter(function(e) { return e !== ""; });
            // TODO: could also handle '/blah/../' and '/./' perhaps
        } else {
            path = path.filter(function(e) { return e !== ""; });
        }
        if (path.length === 0) {
            return cb(null, parent_id);
        }
        var folder = path.shift();
        node.folderInfo(parent_id, function(err, data) {
            if (err) {
                return cb(err, -1);
            }
            var entries = data.item_collection.entries;
            for (var i = 0; i < entries.length; i++) {
                if (entries[i].type === 'folder' &&
                    entries[i].name === folder) {
                    // found
                    return node.resolvePath(path, entries[i].id, cb);
                }
            }
            return cb("not found", -1);
        });
    };

    BoxNode.prototype.resolveFile = function(path, parent_id, cb) {
        var node = this;
        if (typeof parent_id === 'function') {
            cb = parent_id;
            parent_id = 0;
        }
        if (typeof path === "string") {
            // split path and remove empty string components
            path = path.split("/").filter(function(e) { return e !== ""; });
            // TODO: could also handle '/blah/../' and '/./' perhaps
        } else {
            path = path.filter(function(e) { return e !== ""; });
        }
        if (path.length === 0) {
            return cb("missing filename?", -1);
        }
        var file = path.pop();
        node.resolvePath(path, function(err, parent_id) {
            if (err) {
                return cb(err, parent_id);
            }
            node.folderInfo(parent_id, function(err, data) {
                if (err) {
                    return cb(err, -1);
                }
                var entries = data.item_collection.entries;
                for (var i = 0; i < entries.length; i++) {
                    if (entries[i].type === 'file' &&
                        entries[i].name === file) {
                        // found
                        return cb(null, entries[i].id);
                    }
                }
                return cb("not found", -1);
            });
        });
    };

    function constructFullPath(entry) {
        var parentPath = entry.path_collection.entries
            .filter(function (e) { return e.id !== "0"; })
            .map(function (e) { return e.name; })
            .join('/');
        return (parentPath !== "" ? parentPath+'/' : "") + entry.name;
    }

    RED.httpAdmin.get('/box-credentials/auth', function(req, res){
        if (!req.query.clientId || !req.query.clientSecret ||
            !req.query.id || !req.query.callback) {
            res.send(400);
            return;
        }
        var node_id = req.query.id;
        var callback = req.query.callback;
        var credentials = {
            clientId: req.query.clientId,
            clientSecret: req.query.clientSecret
        };

        var csrfToken = crypto.randomBytes(18).toString('base64').replace(/\//g, '-').replace(/\+/g, '_');
        credentials.csrfToken = csrfToken;
        credentials.callback = callback;
        res.cookie('csrf', csrfToken);
        res.redirect(url.format({
            protocol: 'https',
            hostname: 'app.box.com',
            pathname: '/api/oauth2/authorize',
            query: {
                response_type: 'code',
                client_id: credentials.clientId,
                state: node_id + ":" + csrfToken,
                redirect_uri: callback
            }
        }));
        RED.nodes.addCredentials(node_id, credentials);
    });

    RED.httpAdmin.get('/box-credentials/auth/callback', function(req, res) {
        if (req.query.error) {
            return res.send('ERROR: '+ req.query.error + ': ' + req.query.error_description);
        }
        var state = req.query.state.split(':');
        var node_id = state[0];
        var credentials = RED.nodes.getCredentials(node_id);
        if (!credentials || !credentials.clientId || !credentials.clientSecret) {
            return res.send('ERROR: no credentials - should never happen');
        }
        if (state[1] !== credentials.csrfToken) {
            return res.status(401).send(
                'CSRF token mismatch, possible cross-site request forgery attempt.'
            );
        }

        request.post({
            url: 'https://app.box.com/api/oauth2/token',
            json: true,
            form: {
                grant_type: 'authorization_code',
                code: req.query.code,
                client_id: credentials.clientId,
                client_secret: credentials.clientSecret,
                redirect_uri: credentials.callback,
            },
        }, function(err, result, data) {
            if (err) {
                console.log("request error:" + err);
                return res.send("yeah something broke.");
            }
            if (data.error) {
                console.log("oauth error: " + data.error);
                return res.send("yeah something broke.");
            }
            //console.log("data: " + require('util').inspect(data));
            credentials.accessToken = data.access_token;
            credentials.refreshToken = data.refresh_token;
            credentials.expiresIn = data.expires_in;
            credentials.expireTime =
                data.expires_in + (new Date().getTime()/1000);
            credentials.tokenType = data.token_type;
            delete credentials.csrfToken;
            delete credentials.callback;
            RED.nodes.addCredentials(node_id, credentials);
            request.get({
                url: 'https://api.box.com/2.0/users/me',
                json: true,
                auth: { bearer: credentials.accessToken },
            }, function(err, result, data) {
                if (err) {
                    console.log('fetching box profile failed: ' + err);
                    return res.send("auth worked but profile fetching failed");
                }
                if (result.statusCode >= 400) {
                    console.log('fetching box profile failed: ' +
                                result.statusCode + ": " + data.message);
                    return res.send("auth worked but profile fetching failed");
                }
                if (!data.name) {
                    console.log('fetching box profile failed: no name found');
                    return res.send("auth worked but profile fetching failed");
                }
                credentials.displayName = data.name;
                RED.nodes.addCredentials(node_id, credentials);
                res.send("Authorised - you can close this window and return to Node-RED");
            });
        });
    });

    function BoxInNode(n) {
        RED.nodes.createNode(this,n);
        this.filepattern = n.filepattern || "";
        this.box = RED.nodes.getNode(n.box);
        var node = this;
        if (!this.box || !this.box.credentials.accessToken) {
            this.warn("Missing box credentials");
            return;
        }
        node.status({fill:"blue",shape:"dot",text:"initializing"});
        this.box.request({
            url: 'https://api.box.com/2.0/events?stream_position=now&stream_type=changes',
        }, function (err, data) {
            if (err) {
                node.error("failed to initialize event stream: " + err.toString());
                node.status({fill:"red",shape:"ring",text:"failed"});
                return;
            }
            node.state = data.next_stream_position;
            node.status({});
            node.on("input", function(msg) {
                node.status({fill:"blue",shape:"dot",text:"checking for events"});
                node.box.request({
                    url: 'https://api.box.com/2.0/events?stream_position='+node.state+'&stream_type=changes',
                }, function(err, data) {
                    if (err) {
                        node.warn("failed to fetch events: " + err.toString());
                        node.status({});
                        return;
                    }
                    node.status({});
                    node.state = data.next_stream_position;
                    for (var i = 0; i < data.entries.length; i++) {
                        // TODO: support other event types
                        // TODO: suppress duplicate events
                        // for both of the above see:
                        //    https://developers.box.com/docs/#events
                        var event;
                        if (data.entries[i].event_type === 'ITEM_CREATE') {
                            event = 'add';
                        } else if (data.entries[i].event_type === 'ITEM_UPLOAD') {
                            event = 'add';
                        } else if (data.entries[i].event_type === 'ITEM_RENAME') {
                            event = 'add';
                            // TODO: emit delete event?
                        } else if (data.entries[i].event_type === 'ITEM_TRASH') {
                            // need to find old path
                            node.lookupOldPath({}, data.entries[i], 'delete');
                            /* strictly speaking the {} argument above should
                             * be clone(msg) but:
                             *   - it must be {}
                             *   - if there was any possibility of a different
                             *     msg then it should be cloned using the
                             *     node-red/red/nodes/Node.js cloning function
                             */
                            continue;
                        } else {
                            event = 'unknown';
                        }
                        //console.log(JSON.stringify(data.entries[i], null, 2));
                        node.sendEvent(msg, data.entries[i], event);
                    }
                });
            });
            var interval = setInterval(function() {
                node.emit("input", {});
            }, 900000); // 15 minutes
            node.on("close", function() {
                if (interval !== null) {
                    clearInterval(interval);
                }
            });
        });
    }
    RED.nodes.registerType("box in", BoxInNode);

    BoxInNode.prototype.sendEvent = function(msg, entry, event, path) {
        var source = entry.source;
        if (typeof path === "undefined") {
            path = constructFullPath(source);
        }
        if (this.filepattern && !minimatch(path, this.filepattern)) {
            return;
        }
        msg.file = source.name;
        msg.payload = path;
        msg.event = event;
        msg.data = entry;
        this.send(msg);
    };

    BoxInNode.prototype.lookupOldPath = function (msg, entry, event) {
        var source = entry.source;
        this.status({fill:"blue",shape:"dot",text:"resolving path"});
        var node = this;
        node.box.folderInfo(source.parent.id, function(err, folder) {
            if (err) {
                node.warn("failed to resolve old path: " + err.toString());
                node.status({fill:"red",shape:"ring",text:"failed"});
                return;
            }
            node.status({});
            // TODO: add folder path_collection to entry.parent?
            var parentPath = constructFullPath(folder);
            node.sendEvent(msg, entry, event,
                (parentPath !== "" ? parentPath + '/' : '') + source.name);
        });
    };

    function BoxQueryNode(n) {
        RED.nodes.createNode(this,n);
        this.filename = n.filename || "";
        this.box = RED.nodes.getNode(n.box);
        var node = this;
        if (!this.box || !this.box.credentials.accessToken) {
            this.warn("Missing box credentials");
            return;
        }

        node.on("input", function(msg) {
            var filename = node.filename || msg.filename;
            if (filename === "") {
                node.warn("No filename specified");
                return;
            }
            msg.filename = filename;
            node.status({fill:"blue",shape:"dot",text:"resolving path"});
            node.box.resolveFile(filename, function(err, file_id) {
                if (err) {
                    node.warn("failed to resolve path: " + err.toString());
                    node.status({});
                    delete msg.payload;
                    msg.error = err;
                    node.send(msg);
                    return;
                }
                node.status({fill:"blue",shape:"dot",text:"downloading"});
                node.box.request({
                    url: 'https://api.box.com/2.0/files/'+file_id+'/content',
                    json: false,
                    followRedirect: true,
                    maxRedirects: 1,
                    encoding: null,
                }, function(err, data) {
                    if (err) {
                        node.warn("download failed: " + err.toString());
                        delete msg.payload;
                        msg.error = err;
                    } else {
                        msg.payload = data;
                        delete msg.error;
                    }
                    node.status({});
                    node.send(msg);
                });
            });
        });
    }
    RED.nodes.registerType("box", BoxQueryNode);

    function BoxOutNode(n) {
        RED.nodes.createNode(this,n);
        this.filename = n.filename || "";
        this.localFilename = n.localFilename || "";
        this.box = RED.nodes.getNode(n.box);
        var node = this;
        if (!this.box || !this.box.credentials.accessToken) {
            this.warn("Missing box credentials");
            return;
        }

        node.on("input", function(msg) {
            var filename = node.filename || msg.filename;
            if (filename === "") {
                node.warn("No filename specified");
                return;
            }
            var path = filename.split("/");
            var basename = path.pop();
            node.status({fill:"blue",shape:"dot",text:"resolving path"});
            var localFilename = node.localFilename || msg.localFilename;
            if (!localFilename && typeof msg.payload === "undefined") {
                return;
            }
            node.box.resolvePath(path, function(err, parent_id) {
                if (err) {
                    node.error("failed to resolve path: " + err.toString());
                    node.status({fill:"red",shape:"ring",text:"failed"});
                    return;
                }
                node.status({fill:"blue",shape:"dot",text:"uploading"});
                var r = node.box.request({
                    method: 'POST',
                    url: 'https://upload.box.com/api/2.0/files/content',
                }, function(err, data) {
                    if (err) {
                        if (data && data.status === 409 &&
                            data.context_info && data.context_info.conflicts) {
                            // existing file, attempt to overwrite it
                            node.status({fill:"blue",shape:"dot",text:"overwriting"});
                            var r = node.box.request({
                                method: 'POST',
                                url: 'https://upload.box.com/api/2.0/files/'+
                                    data.context_info.conflicts.id+'/content',
                            }, function(err, data) {
                                if (err) {
                                    node.error("failed upload: " + err.toString());
                                    node.status({fill:"red",shape:"ring",text:"failed"});
                                    return;
                                }
                                node.status({});
                            });
                            var form = r.form();
                            if (localFilename) {
                                form.append('filename', fs.createReadStream(localFilename),
                                            { filename: basename });
                            } else {
                                form.append('filename', RED.util.ensureBuffer(msg.payload),
                                { filename: basename });
                            }
                        } else {
                            node.error("failed upload: " + err.toString());
                            node.status({fill:"red",shape:"ring",text:"failed"});
                        }
                        return;
                    }
                    node.status({});
                });
                var form = r.form();
                if (localFilename) {
                    form.append('filename', fs.createReadStream(localFilename),
                                { filename: basename });
                } else {
                    form.append('filename', RED.util.ensureBuffer(msg.payload),
                                { filename: basename });
                }
                form.append('parent_id', parent_id);
            });
        });
    }
    RED.nodes.registerType("box out",BoxOutNode);
};


text:
import logging
import re
from pathlib import Path

from modules.antivirus.base import AntivirusUnix

log = logging.getLogger(__name__)

class DrWeb(AntivirusUnix):
    name = "DrWeb Antivirus (Linux)"

    # ==================================
    #  Constructor and destructor stuff
    # ==================================

    def __init__(self, *args, **kwargs):
        # class super class constructor
        super().__init__(*args, **kwargs)
        # scan tool variables
        self.scan_args = (
            "scan",
        )
        # Drweb does not use return value as infection indicator. Distinction
        # between INFECTED and CLEAN will be done in the 'false positive
        # handler' of Antivirus.scan()
        self._scan_retcodes[self.ScanResult.INFECTED] = lambda x: x in [0]
        self.scan_patterns = [
            re.compile('(?P<file>.*)'
                       '\s+-\s+infected with\s+'
                       '(?P<name>.+)', re.IGNORECASE),
        ]

    # ==========================================
    #  Antivirus methods (need to be overriden)
    # ==========================================

    def get_version(self):
        """return the version of the antivirus"""
        return self._run_and_parse(
            '--version',
            regexp='(?P<version>\d+([.-]\d+)+)',
            group='version')

    def get_database(self):
        """return list of files in the database"""
        # extract folder where are installed definition files
        drwebdir = Path("/var/opt/drweb.com/")
        search_paths = [
            drwebdir / "lib/bases",
            drwebdir / "lib/dws",
        ]
        database_patterns = [
            'timestamp*',
            '*.drl',
            '*.dws',
            '*.vdb',
        ]
        return self.locate(database_patterns, search_paths, syspath=False)

    def get_scan_path(self):
        """return the full path of the scan tool"""
        return self.locate_one("drweb-ctl")