text:
def sudo(*args)
  ["/usr/bin/sudo", "-E", "--"] + args.flatten
end

class FakeSystemCommand
  def self.responses
    @responses ||= {}
  end

  def self.expectations
    @expectations ||= {}
  end

  def self.system_calls
    @system_calls ||= Hash.new(0)
  end

  def self.clear
    @responses    = nil
    @expectations = nil
    @system_calls = nil
  end

  def self.stubs_command(command, response = "")
    command = command.map(&:to_s)
    responses[command] = response
  end

  def self.expects_command(command, response = "", times = 1)
    command = command.map(&:to_s)
    stubs_command(command, response)
    expectations[command] = times
  end

  def self.verify_expectations!
    expectations.each do |command, times|
      unless system_calls[command] == times
        raise("expected #{command.inspect} to be run #{times} times, but got #{system_calls[command]}")
      end
    end
  end

  def self.run(command_string, options = {})
    command = SystemCommand.new(command_string, options).command
    puts command
    unless responses.key?(command)
      raise("no response faked for #{command.inspect}, faked responses are: #{responses.inspect}")
    end
    system_calls[command] += 1

    response = responses[command]
    if response.respond_to?(:call)
      response.call(command_string, options)
    else
      SystemCommand::Result.new(command, [[:stdout, response]], OpenStruct.new(exitstatus: 0))
    end
  end

  def self.run!(command, options = {})
    run(command, options.merge(must_succeed: true))
  end
end

RSpec.configure do |config|
  config.after(:each) do
    begin
      FakeSystemCommand.verify_expectations!
    ensure
      FakeSystemCommand.clear
    end
  end
end

redpajama_set_name: RedPajamaGithub


text:
import Ember from 'ember';
import ZzCheckboxComponent from 'zz-form/components/zz-checkbox';

export default ZzCheckboxComponent;


text:
package com.obductiongame.translate.server;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.logging.Level;
import java.util.logging.Logger;

import com.ibm.icu.util.ULocale;
import com.obductiongame.translate.server.service.MainServiceImpl;
import com.obductiongame.translate.shared.Language;
import com.obductiongame.translate.shared.LanguageImpl;

public class LanguageLoader {

	private static final Logger LOG = Logger.getLogger(MainServiceImpl.class.getName());

	private static LanguageImpl[] languagesArray;

	static public Language[] getLanguages() {
		if (languagesArray == null) {
			LOG.log(Level.INFO, "languagesArray is null, creating");
			ArrayList<LanguageImpl> languages = new ArrayList<LanguageImpl>();

			String[] languageCodes = ULocale.getISOLanguages();
			for (String languageCode : languageCodes) {
				String languageName = new ULocale(languageCode).getDisplayLanguage(ULocale.ENGLISH);
				languages.add(new LanguageImpl(languageCode, languageName));
			}

			languagesArray = languages.toArray(new LanguageImpl[0]);
			Arrays.sort(languagesArray, new LanguageImpl.NameComparator());
		}

		return languagesArray;
	}
}


text:
import abc
import bisect
import copy
import math

import six

from rally.common import costilius
from rally.common import streaming_algorithms as streaming
from rally import exceptions
from rally.task.processing import utils

@six.add_metaclass(abc.ABCMeta)
class Chart(object):
    """Base class for charts."""

    def __init__(self, benchmark_info, zipped_size=1000):
        """Setup initial values.

        :param benchmark_info: dict, generalized info about iterations.
                               The most important value is `iterations_count'
                               that should have int value of total data size
        :param zipped_size: int maximum number of points on scale
        """
        self._data = costilius.OrderedDict()  # Container for results
        self._benchmark_info = benchmark_info
        self.base_size = benchmark_info.get("iterations_count", 0)
        self.zipped_size = zipped_size

    def add_iteration(self, iteration):
        """Add iteration data.

        This method must be called for each iteration.
        If overridden, this method must use streaming data processing,
        so chart instance could process unlimited number of iterations,
        with low memory usage.
        """
        for name, value in self._map_iteration_values(iteration):
            if name not in self._data:
                self._data[name] = utils.GraphZipper(self.base_size,
                                                     self.zipped_size)
            self._data[name].add_point(value)

    def render(self):
        """Generate chart data ready for drawing."""
        return [(name, points.get_zipped_graph())
                for name, points in self._data.items()]

    def _fix_atomic_actions(self, iteration):
        """Set `0' for missed atomic actions.

        Since some atomic actions can absent in some iterations
        due to failures, this method must be used in all cases
        related to atomic actions processing.
        """
        for name in self._benchmark_info["atomic"]:
            iteration["atomic_actions"].setdefault(name, 0)
        return iteration

    @abc.abstractmethod
    def _map_iteration_values(self, iteration):
        """Get values for processing, from given iteration."""

class MainStackedAreaChart(Chart):

    def _map_iteration_values(self, iteration):
        if iteration["error"]:
            result = [("duration", 0), ("idle_duration", 0)]
            if self._benchmark_info["iterations_failed"]:
                result.append(
                    ("failed_duration",
                     iteration["duration"] + iteration["idle_duration"]))
        else:
            result = [("duration", iteration["duration"]),
                      ("idle_duration", iteration["idle_duration"])]
            if self._benchmark_info["iterations_failed"]:
                result.append(("failed_duration", 0))
        return result

class AtomicStackedAreaChart(Chart):

    def _map_iteration_values(self, iteration):
        iteration = self._fix_atomic_actions(iteration)
        atomics = list(iteration["atomic_actions"].items())
        if self._benchmark_info["iterations_failed"]:
            if iteration["error"]:
                failed_duration = (
                    iteration["duration"] + iteration["idle_duration"]
                    - sum([(a[1] or 0) for a in atomics]))
            else:
                failed_duration = 0
            atomics.append(("failed_duration", failed_duration))
        return atomics

class OutputStackedAreaChart(Chart):

    def _map_iteration_values(self, iteration):
        return [(name, iteration["scenario_output"]["data"].get(name, 0))
                for name in self._benchmark_info["output_names"]]

class AvgChart(Chart):
    """Base class for charts with average results."""

    def add_iteration(self, iteration):
        for name, value in self._map_iteration_values(iteration):
            if name not in self._data:
                self._data[name] = streaming.MeanComputation()
            self._data[name].add(value or 0)

    def render(self):
        return [(k, v.result()) for k, v in self._data.items()]

class AtomicAvgChart(AvgChart):

    def _map_iteration_values(self, iteration):
        iteration = self._fix_atomic_actions(iteration)
        return list(iteration["atomic_actions"].items())

class LoadProfileChart(Chart):
    """Chart for parallel durations."""

    def __init__(self, benchmark_info, name="parallel iterations",
                 scale=200):
        """Setup chart with graph name and scale.

        :benchmark_info:  dict, generalized info about iterations
        :param name: str name for X axis
        :param scale: int number of X points
        """
        super(LoadProfileChart, self).__init__(benchmark_info)
        self._name = name
        self._duration = benchmark_info["load_duration"]
        self._tstamp_start = benchmark_info["tstamp_start"]

        # NOTE(amaretskiy): Determine a chart `step' - duration between
        #   two X points, rounded with minimal accuracy (digits after point)
        #   to improve JavaScript drawing performance.
        # Examples:
        #   scale  duration       step (initial)    accuracy  step
        #   200    30.8043010235  0.154021505117    1         0.2
        #   200    1.25884699821  0.00629423499107  3         0.006
        step = self._duration / float(scale)
        if step == 0:
            accuracy = 0
        else:
            accuracy = max(-int(math.floor(math.log10(step))), 0)
        step = round(step, accuracy)
        self._time_axis = [step * x
                           for x in six.moves.range(1, int(scale))
                           if (step * x) < self._duration]
        self._time_axis.append(self._duration)
        self._started = [0] * len(self._time_axis)
        self._stopped = [0] * len(self._time_axis)

    def _map_iteration_values(self, iteration):
        return (iteration["timestamp"],
                0 if iteration["error"] else iteration["duration"])

    def add_iteration(self, iteration):
        timestamp, duration = self._map_iteration_values(iteration)
        ts_start = timestamp - self._tstamp_start
        ts_stop = ts_start + duration
        self._started[bisect.bisect(self._time_axis, ts_start)] += 1
        self._stopped[bisect.bisect(self._time_axis, ts_stop)] += 1

    def render(self):
        data = []
        running = 0
        for ts, started, ended in zip(self._time_axis,
                                      self._started, self._stopped):
            running += started
            data.append([ts, running])
            running -= ended
        return [(self._name, data)]

class HistogramChart(Chart):
    """Base class for chart with histograms.

    This chart is relatively complex, because actually it is a set
    of histograms, that usually can be switched by dropdown select.
    And each histogram has several data views.
    """

    def _init_views(self, min_value, max_value):
        """Generate initial data for each histogram view."""
        if not self.base_size:
            return []
        min_value, max_value = min_value or 0, max_value or 0
        views = []
        for view, bins in [
                ("Square Root Choice",
                 int(math.ceil(math.sqrt(self.base_size)))),
                ("Sturges Formula",
                 int(math.ceil(math.log(self.base_size, 2) + 1))),
                ("Rice Rule",
                 int(math.ceil(2 * self.base_size ** (1.0 / 3))))]:
            bin_width = float(max_value - min_value) / bins
            x_axis = [min_value + (bin_width * x) for x in range(1, bins + 1)]
            views.append({"view": view, "bins": bins,
                          "x": x_axis, "y": [0] * len(x_axis)})
        return views

    def add_iteration(self, iteration):
        for name, value in self._map_iteration_values(iteration):
            if name not in self._data:
                raise KeyError("Unexpected histogram name: %s" % name)
            for i, view in enumerate(self._data[name]["views"]):
                for bin_i, bin_v in enumerate(view["x"]):
                    if (value or 0) <= bin_v:
                        self._data[name]["views"][i]["y"][bin_i] += 1
                        break

    def render(self):
        data = []
        for name, hist in self._data.items():
            data.append(
                [{"key": name, "view": v["view"], "disabled": hist["disabled"],
                  "values": [{"x": x, "y": y} for x, y in zip(v["x"], v["y"])]}
                 for v in hist["views"]])
        return data

class MainHistogramChart(HistogramChart):

    def __init__(self, benchmark_info):
        super(MainHistogramChart, self).__init__(benchmark_info)
        views = self._init_views(self._benchmark_info["min_duration"],
                                 self._benchmark_info["max_duration"])
        self._data["task"] = {"views": views, "disabled": None}

    def _map_iteration_values(self, iteration):
        return [("task", 0 if iteration["error"] else iteration["duration"])]

class AtomicHistogramChart(HistogramChart):

    def __init__(self, benchmark_info):
        super(AtomicHistogramChart, self).__init__(benchmark_info)
        for i, atomic in enumerate(self._benchmark_info["atomic"].items()):
            name, value = atomic
            self._data[name] = {
                "views": self._init_views(value["min_duration"],
                                          value["max_duration"]),
                "disabled": i}

    def _map_iteration_values(self, iteration):
        iteration = self._fix_atomic_actions(iteration)
        return list(iteration["atomic_actions"].items())

class MainStatsTable(Chart):

    def _init_row(self, name, iterations_count):

        def round_3(stream, no_result):
            if no_result:
                return "n/a"
            return round(stream.result(), 3)

        return [
            ("Action", name),
            ("Min (sec)", streaming.MinComputation(), round_3),
            ("Median (sec)",
             streaming.PercentileComputation(0.5, iterations_count), round_3),
            ("90%ile (sec)",
             streaming.PercentileComputation(0.9, iterations_count), round_3),
            ("95%ile (sec)",
             streaming.PercentileComputation(0.95, iterations_count), round_3),
            ("Max (sec)", streaming.MaxComputation(), round_3),
            ("Avg (sec)", streaming.MeanComputation(), round_3),
            ("Success", streaming.MeanComputation(),
             lambda stream, no_result:
             "%.1f%%" % (stream.result() * 100) if not no_result else "n/a"),
            ("Count", streaming.IncrementComputation(),
             lambda x, no_result: x.result())
        ]

    def __init__(self, benchmark_info, zipped_size=1000):
        self.rows = list(benchmark_info["atomic"].keys())
        self.rows.append("total")
        self.rows_index = dict((name, i) for i, name in enumerate(self.rows))
        self.table = [self._init_row(name, benchmark_info["iterations_count"])
                      for name in self.rows]

    def add_iteration(self, iteration):
        data = copy.copy(iteration["atomic_actions"])
        data["total"] = iteration["duration"]

        for name, value in data.items():
            index = self.rows_index[name]
            self.table[index][-1][1].add(None)
            if iteration["error"]:
                self.table[index][-2][1].add(0)
            else:
                self.table[index][-2][1].add(1)
                for elem in self.table[index][1:-2]:
                    elem[1].add(value)

    def render(self):
        rows = []

        for i in range(len(self.table)):
            row = [self.table[i][0][1]]
            # no results if all iterations failed
            try:
                no_result = self.table[i][-2][1].result() == 0.0
            except exceptions.RallyException:
                no_result = True
            row.extend(x[2](x[1], no_result) for x in self.table[i][1:])
            rows.append(row)

        return {"cols": list(map(lambda x: x[0], self.table[0])),
                "rows": rows}

    def _map_iteration_values(self, iteration):
        pass


text:
package com.vav.karumanchi.Stacks_04;

/**
 * Created by Vaibhav on 12/20/17.
 */
public class Q4_FindStackPermutations {
    //After Dynamic programming
}


text:
package com.vaadin.tests.server.component.csslayout;

import org.junit.Test;

import com.vaadin.shared.ui.label.ContentMode;
import com.vaadin.tests.design.DeclarativeTestBase;
import com.vaadin.ui.Button;
import com.vaadin.ui.CssLayout;
import com.vaadin.ui.Label;

/**
 * Tests declarative support for CssLayout.
 *
 * @since
 * @author Vaadin Ltd
 */
public class CssLayoutDeclarativeTest extends DeclarativeTestBase<CssLayout> {

    @Test
    public void testNoChildren() {
        String design = "<v-css-layout />";
        CssLayout layout = new CssLayout();
        testRead(design, layout);
        testWrite(design, layout);
        design = "<v-css-layout caption=\"A caption\"/>";
        layout = new CssLayout();
        layout.setCaption("A caption");
        testRead(design, layout);
        testWrite(design, layout);
    }

    @Test
    public void testFeatures() {
        String design = "<v-css-layout caption=test-layout><v-label caption=test-label />"
                + "<v-button>test-button</v-button></v-css-layout>";
        CssLayout layout = new CssLayout();
        layout.setCaption("test-layout");
        Label l = new Label();
        l.setContentMode(ContentMode.HTML);
        l.setCaption("test-label");
        layout.addComponent(l);
        Button b = new Button("test-button");
        b.setCaptionAsHtml(true);
        layout.addComponent(b);
        testRead(design, layout);
        testWrite(design, layout);
    }
}


text:
package com.dmt.train.routing.client;

import static org.hamcrest.CoreMatchers.containsString;
import static org.hamcrest.CoreMatchers.hasItem;
import static org.hamcrest.CoreMatchers.is;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertThat;
import static org.junit.Assert.assertTrue;

import java.io.IOException;
import java.util.Collection;
import java.util.Optional;

import javax.inject.Inject;

import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;

import com.dmt.train.routing.RouteDistanceApplicationService;
import com.dmt.train.routing.TripFinderApplicationService;

/**
 * Sample test scenarios.

 *
 * @author diegomtassis
 *
 */
@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration(classes = { ApplicationConfiguration.class })
public class RequiredSampleITest extends AbstractITest {

	@Inject
	private RouteDistanceApplicationService distanceService;

	@Inject
	private TripFinderApplicationService tripFinderService;

	@Before
	public void setUp() throws IOException {

		assertNotNull(distanceService);
		assertNotNull(tripFinderService);

		loadInitialRoutes("sample-fixture.txt");
	}

	/**
	 * The distance of the route A-B-C.
	 *

	 * Output #1: 9
	 */
	@Test
	public void testScenario1() {

		// setup
		String routePath = "ABC";

		// exercise
		Optional<Integer> distance = distanceService.distance(routePath);

		// verify
		assertThat(distance.get(), is(9));
	}

	/**
	 * The distance of the route A-D.
	 *

	 * Output #2: 5
	 */
	@Test
	public void testScenario2() {

		// setup
		String routePath = "AD";

		// exercise
		Optional<Integer> distance = distanceService.distance(routePath);

		// verify
		assertThat(distance.get(), is(5));
	}

	/**
	 * The distance of the route A-D-C.
	 *

	 * Output #3: 13
	 */
	@Test
	public void testScenario3() {

		// setup
		String routePath = "ADC";

		// exercise
		Optional<Integer> distance = distanceService.distance(routePath);

		// verify
		assertThat(distance.get(), is(13));
	}

	/**
	 * The distance of the route A-E-B-C-D.
	 *

	 * Output #4: 22
	 */
	@Test
	public void testScenario4() {

		// setup
		String routePath = "AEBCD";

		// exercise
		Optional<Integer> distance = distanceService.distance(routePath);

		// verify
		assertThat(distance.get(), is(22));
	}

	/**
	 * The distance of the route A-E-D.
	 *

	 * Output #5: NO SUCH ROUTE
	 */
	@Test
	public void testScenario5() {

		// setup
		String routePath = "AED";

		// exercise
		Optional<Integer> distance = distanceService.distance(routePath);

		// verify
		assertFalse(distance.isPresent());
	}

	/**
	 * The number of trips starting at C and ending at C with a maximum of 3
	 * stops. In the sample data below, there are two such trips: C-D-C (2
	 * stops). and C-E-B-C (3 stops).
	 *

	 * Output #6: 2
	 */
	@Test
	public void testScenario6() {

		// setup
		String startPoint = "C";
		String endPoint = "C";
		Integer minStops = 1;
		Integer maxStops = 3;

		// exercise
		Collection<String> trips = tripFinderService.find(startPoint, endPoint, minStops, maxStops);

		// verify
		assertThat(trips.size(), is(2));
		assertTrue(trips.stream().anyMatch(s -> s.contains("path:CDC,")));
		assertTrue(trips.stream().anyMatch(s -> s.contains("path:CEBC,")));
	}

	/**
	 * The number of trips starting at A and ending at C with exactly 4 stops.
	 * In the sample data below, there are three such trips: A to C (via B,C,D);
	 * A to C (via D,C,D); and A to C (via D,E,B).
	 *

	 * Output #7: 3
	 */
	@Test
	public void testScenario7() {

		// setup
		String startPoint = "A";
		String endPoint = "C";
		Integer minStops = 4;
		Integer maxStops = 4;

		// exercise
		Collection<String> trips = tripFinderService.find(startPoint, endPoint, minStops, maxStops);

		// verify
		assertThat(trips.size(), is(3));
		assertTrue(trips.stream().anyMatch(s -> s.contains("path:ABCDC,")));
		assertTrue(trips.stream().anyMatch(s -> s.contains("path:ADCDC,")));
		assertTrue(trips.stream().anyMatch(s -> s.contains("path:ADEBC,")));
	}

	/**
	 * The length of the shortest route (in terms of distance to travel) from A
	 * to C.
	 *

	 * Output #8: 9
	 */
	@Test
	public void testScenario8() {

		// setup
		String startPoint = "A";
		String endPoint = "C";

		// exercise
		Optional<Integer> distance = tripFinderService.find(startPoint, endPoint);

		// verify
		assertThat(distance.get(), is(9));
	}

	/**
	 * The length of the shortest route (in terms of distance to travel) from B
	 * to B.
	 *

	 * Output #9: 9
	 */
	@Test
	public void testScenario9() {

		// setup
		String startPoint = "B";
		String endPoint = "B";

		// exercise
		Optional<Integer> distance = tripFinderService.find(startPoint, endPoint);

		// verify
		assertThat(distance.get(), is(9));
	}

	/**
	 * The number of different routes from C to C with a distance of less than
	 * 30. In the sample data, the trips are: CDC, CEBC, CEBCDC, CDCEBC, CDEBC,
	 * CEBCEBC, CEBCEBCEBC.
	 *

	 * Output #10: 7
	 */
	@Test
	public void testScenario10() {

		// setup
		String startPoint = "C";
		String endPoint = "C";
		Integer maxDistance = 30;

		// exercise
		Collection<String> routes = tripFinderService.find(startPoint, endPoint, maxDistance);

		// verify
		assertThat(routes.size(), is(7));
		assertThat(routes, hasItem(containsString("CDC")));
		assertThat(routes, hasItem(containsString("CEBC")));
		assertThat(routes, hasItem(containsString("CEBCDC")));
		assertThat(routes, hasItem(containsString("CDCEBC")));
		assertThat(routes, hasItem(containsString("CDEBC")));
		assertThat(routes, hasItem(containsString("CEBCEBC")));
		assertThat(routes, hasItem(containsString("CEBCEBCEBC")));
	}
}


text:
package org.terracotta.management.entity.server;

import org.terracotta.entity.ClientDescriptor;
import org.terracotta.management.entity.ManagementAgent;
import org.terracotta.management.entity.ManagementAgentConfig;
import org.terracotta.management.service.monitoring.IMonitoringConsumer;
import org.terracotta.monitoring.IMonitoringProducer;
import org.terracotta.voltron.proxy.server.ProxiedServerEntity;

import java.util.Objects;

import static org.terracotta.management.entity.server.Utils.array;
import static org.terracotta.management.entity.server.Utils.getClientIdentifier;

/**
 * @author Mathieu Carbou
 */
class ManagementAgentServerEntity extends ProxiedServerEntity<ManagementAgent> {

  private final IMonitoringConsumer consumer;
  private final IMonitoringProducer producer;

  ManagementAgentServerEntity(ManagementAgentConfig config, IMonitoringConsumer consumer, IMonitoringProducer producer) {
    super(new ManagementAgentImpl(config, consumer, producer));
    this.consumer = Objects.requireNonNull(consumer, "IMonitoringConsumer service is missing");
    this.producer = Objects.requireNonNull(producer, "IMonitoringProducer service is missing");

    // when an entity is created, we create the root: /management (null)
    if (!consumer.getChildNamesForNode(array("management")).isPresent()) {
      producer.addNode(new String[0], "management", null);
    }
    if (!consumer.getChildNamesForNode(array("management", "clients")).isPresent()) {
      producer.addNode(array("management"), "clients", null);
    }
  }

  @Override
  public void connected(ClientDescriptor clientDescriptor) {
    super.connected(clientDescriptor);

    // when an entity is fetched, we create the root /management/<id> (ClientDescriptor)
    getClientIdentifier(consumer, clientDescriptor).ifPresent(clientIdentifier -> {
      producer.addNode(array("management", "clients"), clientIdentifier.getClientId(), clientDescriptor);
      producer.addNode(array("management", "clients", clientIdentifier.getClientId()), "registry", null);
    });
  }

  @Override
  public void disconnected(ClientDescriptor clientDescriptor) {
    // when an entity is closed, we remove the node /management/<id> having the same ClientDescriptor
    getClientIdentifier(consumer, clientDescriptor).ifPresent(clientIdentifier -> {
      producer.removeNode(array("management", "clients"), clientIdentifier.getClientId());
    });

    super.disconnected(clientDescriptor);
  }

  @Override
  public void destroy() {
    consumer.close();
    super.destroy();
  }

}


text:
<?php

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

namespace flaminux\mioBundle\Entity;
use Doctrine\ORM\Mapping as ORM;

/**
 * @ORM\Entity
 * @ORM\Table(name="dome_device")
 */
class DomeDevice {
    //put your code here

    /**
    * @ORM\Id
    * @ORM\Column(type="integer")
    * @ORM\GeneratedValue(strategy="AUTO")
    */
    protected $id;

    /**
    * @ORM\Column(type="string")
    */
    protected $nome;

    /**
    * @ORM\Column(type="string")
    */
    protected $descrizione;

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

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

        return $this;
    }

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

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

        return $this;
    }

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


text:
package com.tuohang.framework.jfinal.demo.common;

import com.jfinal.config.Routes;

public class FrontRoutes extends Routes {

	@Override
	public void config() {

	}

}


text:
package com.helger.commons.annotation;

import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

/**
 * Just to indicate that a method is meant to be overridden in sub classes.
 *
 * @author Philip Helger
 */
@Retention (RetentionPolicy.CLASS)
@Target (ElementType.METHOD)
@Documented
public @interface OverrideOnDemand
{
  String value() default "";
}


text:
package k8s

import (
	"context"
	"encoding/json"
	"fmt"
	"net"
	"strconv"

	"github.com/cilium/cilium/pkg/annotation"
	"github.com/cilium/cilium/pkg/cidr"
	"github.com/cilium/cilium/pkg/controller"
	slim_corev1 "github.com/cilium/cilium/pkg/k8s/slim/k8s/apis/core/v1"
	"github.com/cilium/cilium/pkg/logging/logfields"
	"github.com/cilium/cilium/pkg/node/addressing"
	nodeTypes "github.com/cilium/cilium/pkg/node/types"
	"github.com/cilium/cilium/pkg/option"
	"github.com/cilium/cilium/pkg/source"

	"github.com/sirupsen/logrus"
	corev1 "k8s.io/api/core/v1"
	metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
	"k8s.io/client-go/kubernetes"
)

// ParseNodeAddressType converts a Kubernetes NodeAddressType to a Cilium
// NodeAddressType. If the Kubernetes NodeAddressType does not have a
// corresponding Cilium AddressType, returns an error.
func ParseNodeAddressType(k8sAddress slim_corev1.NodeAddressType) (addressing.AddressType, error) {

	var err error
	convertedAddr := addressing.AddressType(k8sAddress)

	switch convertedAddr {
	case addressing.NodeExternalDNS, addressing.NodeExternalIP, addressing.NodeHostName, addressing.NodeInternalIP, addressing.NodeInternalDNS:
	default:
		err = fmt.Errorf("invalid Kubernetes NodeAddressType %s", convertedAddr)
	}
	return convertedAddr, err
}

// ParseNode parses a kubernetes node to a cilium node
func ParseNode(k8sNode *slim_corev1.Node, source source.Source) *nodeTypes.Node {
	scopedLog := log.WithFields(logrus.Fields{
		logfields.NodeName:  k8sNode.Name,
		logfields.K8sNodeID: k8sNode.UID,
	})
	addrs := []nodeTypes.Address{}
	for _, addr := range k8sNode.Status.Addresses {
		// We only care about this address types,
		// we ignore all other types.
		switch addr.Type {
		case slim_corev1.NodeInternalIP, slim_corev1.NodeExternalIP:
		default:
			continue
		}
		// If the address is not set let's not parse it at all.
		// This can be the case for corev1.NodeExternalIPs
		if addr.Address == "" {
			continue
		}
		ip := net.ParseIP(addr.Address)
		if ip == nil {
			scopedLog.WithFields(logrus.Fields{
				logfields.IPAddr: addr.Address,
				"type":           addr.Type,
			}).Warn("Ignoring invalid node IP")
			continue
		}

		addressType, err := ParseNodeAddressType(addr.Type)

		if err != nil {
			scopedLog.WithError(err).Warn("invalid address type for node")
		}

		na := nodeTypes.Address{
			Type: addressType,
			IP:   ip,
		}
		addrs = append(addrs, na)
	}

	k8sNodeAddHostIP := func(annotation string) {
		if ciliumInternalIP, ok := k8sNode.Annotations[annotation]; !ok || ciliumInternalIP == "" {
			scopedLog.Debugf("Missing %s. Annotation required when IPSec Enabled", annotation)
		} else if ip := net.ParseIP(ciliumInternalIP); ip == nil {
			scopedLog.Debugf("ParseIP %s error", ciliumInternalIP)
		} else {
			na := nodeTypes.Address{
				Type: addressing.NodeCiliumInternalIP,
				IP:   ip,
			}
			addrs = append(addrs, na)
			scopedLog.Debugf("Add NodeCiliumInternalIP: %s", ip)
		}
	}

	k8sNodeAddHostIP(annotation.CiliumHostIP)
	k8sNodeAddHostIP(annotation.CiliumHostIPv6)

	encryptKey := uint8(0)
	if key, ok := k8sNode.Annotations[annotation.CiliumEncryptionKey]; ok {
		if u, err := strconv.ParseUint(key, 10, 8); err == nil {
			encryptKey = uint8(u)
		}
	}

	newNode := &nodeTypes.Node{
		Name:          k8sNode.Name,
		Cluster:       option.Config.ClusterName,
		IPAddresses:   addrs,
		Source:        source,
		EncryptionKey: encryptKey,
	}

	if len(k8sNode.Spec.PodCIDRs) != 0 {
		if len(k8sNode.Spec.PodCIDRs) > 2 {
			scopedLog.WithField("podCIDR", k8sNode.Spec.PodCIDRs).Errorf("Invalid PodCIDRs expected 1 or 2 PodCIDRs, received %d", len(k8sNode.Spec.PodCIDRs))
		} else {
			for _, podCIDR := range k8sNode.Spec.PodCIDRs {
				if allocCIDR, err := cidr.ParseCIDR(podCIDR); err != nil {
					scopedLog.WithError(err).WithField("podCIDR", k8sNode.Spec.PodCIDR).Warn("Invalid PodCIDR value for node")
				} else {
					if allocCIDR.IP.To4() != nil {
						newNode.IPv4AllocCIDR = allocCIDR
					} else {
						newNode.IPv6AllocCIDR = allocCIDR
					}
				}
			}
		}
	} else if len(k8sNode.Spec.PodCIDR) != 0 {
		if allocCIDR, err := cidr.ParseCIDR(k8sNode.Spec.PodCIDR); err != nil {
			scopedLog.WithError(err).WithField(logfields.V4Prefix, k8sNode.Spec.PodCIDR).Warn("Invalid PodCIDR value for node")
		} else {
			if allocCIDR.IP.To4() != nil {
				newNode.IPv4AllocCIDR = allocCIDR
			} else {
				newNode.IPv6AllocCIDR = allocCIDR
			}
		}
	}
	// Spec.PodCIDR takes precedence since it's
	// the CIDR assigned by k8s controller manager
	// In case it's invalid or empty then we fall back to our annotations.
	if newNode.IPv4AllocCIDR == nil {
		if ipv4CIDR, ok := k8sNode.Annotations[annotation.V4CIDRName]; !ok || ipv4CIDR == "" {
			scopedLog.Debug("Empty IPv4 CIDR annotation in node")
		} else {
			allocCIDR, err := cidr.ParseCIDR(ipv4CIDR)
			if err != nil {
				scopedLog.WithError(err).WithField(logfields.V4Prefix, ipv4CIDR).Error("BUG, invalid IPv4 annotation CIDR in node")
			} else {
				newNode.IPv4AllocCIDR = allocCIDR
			}
		}
	}

	if newNode.IPv6AllocCIDR == nil {
		if ipv6CIDR, ok := k8sNode.Annotations[annotation.V6CIDRName]; !ok || ipv6CIDR == "" {
			scopedLog.Debug("Empty IPv6 CIDR annotation in node")
		} else {
			allocCIDR, err := cidr.ParseCIDR(ipv6CIDR)
			if err != nil {
				scopedLog.WithError(err).WithField(logfields.V6Prefix, ipv6CIDR).Error("BUG, invalid IPv6 annotation CIDR in node")
			} else {
				newNode.IPv6AllocCIDR = allocCIDR
			}
		}
	}

	if newNode.IPv4HealthIP == nil {
		if healthIP, ok := k8sNode.Annotations[annotation.V4HealthName]; !ok || healthIP == "" {
			scopedLog.Debug("Empty IPv4 health endpoint annotation in node")
		} else if ip := net.ParseIP(healthIP); ip == nil {
			scopedLog.WithField(logfields.V4HealthIP, healthIP).Error("BUG, invalid IPv4 health endpoint annotation in node")
		} else {
			newNode.IPv4HealthIP = ip
		}
	}

	if newNode.IPv6HealthIP == nil {
		if healthIP, ok := k8sNode.Annotations[annotation.V6HealthName]; !ok || healthIP == "" {
			scopedLog.Debug("Empty IPv6 health endpoint annotation in node")
		} else if ip := net.ParseIP(healthIP); ip == nil {
			scopedLog.WithField(logfields.V6HealthIP, healthIP).Error("BUG, invalid IPv6 health endpoint annotation in node")
		} else {
			newNode.IPv6HealthIP = ip
		}
	}

	newNode.Labels = k8sNode.GetLabels()

	return newNode
}

// GetNode returns the kubernetes nodeName's node information from the
// kubernetes api server
func GetNode(c kubernetes.Interface, nodeName string) (*corev1.Node, error) {
	// Try to retrieve node's cidr and addresses from k8s's configuration
	return c.CoreV1().Nodes().Get(context.TODO(), nodeName, metav1.GetOptions{})
}

// setNodeNetworkUnavailableFalse sets Kubernetes NodeNetworkUnavailable to
// false as Cilium is managing the network connectivity.
// https://kubernetes.io/docs/concepts/architecture/nodes/#condition
func setNodeNetworkUnavailableFalse(c kubernetes.Interface, nodeName string) error {
	condition := corev1.NodeCondition{
		Type:               corev1.NodeNetworkUnavailable,
		Status:             corev1.ConditionFalse,
		Reason:             "CiliumIsUp",
		Message:            "Cilium is running on this node",
		LastTransitionTime: metav1.Now(),
		LastHeartbeatTime:  metav1.Now(),
	}
	raw, err := json.Marshal(&[]corev1.NodeCondition{condition})
	if err != nil {
		return err
	}
	patch := []byte(fmt.Sprintf(`{"status":{"conditions":%s}}`, raw))
	_, err = c.CoreV1().Nodes().PatchStatus(context.TODO(), nodeName, patch)
	return err
}

// MarkNodeReady marks the Kubernetes node resource as ready from a networking
// perspective
func (k8sCli K8sClient) MarkNodeReady(nodeName string) {
	log.WithField(logfields.NodeName, nodeName).Debug("Setting NetworkUnavailable=false")

	controller.NewManager().UpdateController("mark-k8s-node-as-available",
		controller.ControllerParams{
			DoFunc: func(_ context.Context) error {
				return setNodeNetworkUnavailableFalse(k8sCli, nodeName)
			},
		})
}


text:
namespace Ui {
    class MainWindow;
}

class MainWindow : public QMainWindow
{
    Q_OBJECT

public:
    explicit MainWindow(QWidget *parent = 0);
    ~MainWindow();

private:
    Ui::MainWindow *ui;
    Poppler::Document *document;
    QRubberBand *rubberBand;
    QTimer updateTimer;
    QSizeF currentPageSize;
    QString sourceFilename;
    QProcess *workerProcess;

    void resizeEvent ( QResizeEvent * event );
    void wheelEvent ( QWheelEvent * event );

private slots:
    void on_btnCrop_clicked();
    void on_actionPageChanged_triggered();
    void on_actionLoad_triggered();
    void reload_page();
    void rectSelected(QRect rect);
    void processFinished(int exitCode, QProcess::ExitStatus exitStatus);
    void readError();
    void readOutput();
};

#endif // MAINWINDOW_H


text:
//Dependencies
#include <stdlib.h>
#include "samv71.h"
#include "samv71_xplained_ultra.h"
#include "os_port.h"
#include "core/net.h"
#include "drivers/samv71_eth.h"
#include "drivers/ksz8061.h"
#include "dhcp/dhcp_client.h"
#include "ipv6/slaac.h"
#include "ftp/ftp_client.h"
#include "ext_int_driver.h"
#include "error.h"
#include "debug.h"

//Application configuration
#define APP_MAC_ADDR "00-AB-CD-EF-71-21"

#define APP_USE_DHCP ENABLED
#define APP_IPV4_HOST_ADDR "192.168.0.20"
#define APP_IPV4_SUBNET_MASK "255.255.255.0"
#define APP_IPV4_DEFAULT_GATEWAY "192.168.0.254"
#define APP_IPV4_PRIMARY_DNS "8.8.8.8"
#define APP_IPV4_SECONDARY_DNS "8.8.4.4"

#define APP_USE_SLAAC ENABLED
#define APP_IPV6_LINK_LOCAL_ADDR "fe80::7121"
#define APP_IPV6_PREFIX "2001:db8::"
#define APP_IPV6_PREFIX_LENGTH 64
#define APP_IPV6_GLOBAL_ADDR "2001:db8::7121"
#define APP_IPV6_ROUTER "fe80::1"
#define APP_IPV6_PRIMARY_DNS "2001:4860:4860::8888"
#define APP_IPV6_SECONDARY_DNS "2001:4860:4860::8844"

DhcpClientSettings dhcpClientSettings;
DhcpClientCtx dhcpClientContext;
SlaacSettings slaacSettings;
SlaacContext slaacContext;

/**
 * @brief I/O initialization
 **/

void ioInit(void)
{
   //Disable write protection
   MATRIX->MATRIX_WPMR = MATRIX_WPMR_WPKEY_PASSWD;
   //Select PB12 function rather than ERASE function
   MATRIX->CCFG_SYSIO |= CCFG_SYSIO_SYSIO12;

   //Enable PIO peripheral clocks
   PMC->PMC_PCER0 = (1 << ID_PIOA) | (1 << ID_PIOB) | (1 << ID_PIOC);

   //Configure LED0
   PIO_LED0->PIO_PER = LED0;
   PIO_LED0->PIO_OER = LED0;
   PIO_LED0->PIO_SODR = LED0;

   //Configure LED1
   PIO_LED1->PIO_PER = LED1;
   PIO_LED1->PIO_OER = LED1;
   PIO_LED1->PIO_SODR = LED1;

   //Configure SW0 button
   PIO_SW0->PIO_PER = SW0;
   PIO_SW0->PIO_ODR = SW0;
   PIO_SW0->PIO_PUER = SW0;

   //Configure SW1 button
   PIO_SW1->PIO_PER = SW1;
   PIO_SW1->PIO_ODR = SW1;
   PIO_SW1->PIO_PUER = SW1;
}

/**
 * @brief FTP client test routine
 * @return Error code
 **/

error_t ftpClientTest(void)
{
   error_t error;
   size_t length;
   IpAddr ipAddr;
   FtpClientContext ftpContext;
   static char_t buffer[256];

   //Debug message
   TRACE_INFO("\r\n\r\nResolving server name...\r\n");
   //Resolve FTP server name
   error = getHostByName(NULL, "ftp.gnu.org", &ipAddr, 0);

   //Any error to report?
   if(error)
   {
      //Debug message
      TRACE_INFO("Failed to resolve server name!\r\n");
      //Exit immediately
      return error;
   }

   //Debug message
   TRACE_INFO("Connecting to FTP server %s\r\n", ipAddrToString(&ipAddr, NULL));
   //Connect to the FTP server
   error = ftpConnect(&ftpContext, NULL, &ipAddr, 21, FTP_NO_SECURITY | FTP_PASSIVE_MODE);

   //Any error to report?
   if(error)
   {
      //Debug message
      TRACE_INFO("Failed to connect to FTP server!\r\n");
      //Exit immediately
      return error;
   }

   //Debug message
   TRACE_INFO("Successful connection\r\n");

   //Start of exception handling block
   do
   {
      //Login to the FTP server using the provided username and password
      error = ftpLogin(&ftpContext, "anonymous", "password", "");
      //Any error to report?
      if(error) break;

      //Open the specified file for reading
      error = ftpOpenFile(&ftpContext, "welcome.msg", FTP_FOR_READING | FTP_BINARY_TYPE);
      //Any error to report?
      if(error) break;

      //Dump the contents of the file
      while(1)
      {
         //Read data
         error = ftpReadFile(&ftpContext, buffer, sizeof(buffer) - 1, &length, 0);
         //End of file?
         if(error) break;

         //Properly terminate the string with a NULL character
         buffer[length] = '\0';
         //Dump current data
         TRACE_INFO("%s", buffer);
      }

      //End the string with a line feed
      TRACE_INFO("\r\n");
      //Close the file
      error = ftpCloseFile(&ftpContext);

      //End of exception handling block
   } while(0);

   //Close the connection
   ftpClose(&ftpContext);
   //Debug message
   TRACE_INFO("Connection closed...\r\n");

   //Return status code
   return error;
}

/**
 * @brief User task
 **/

void userTask(void *param)
{
   //Endless loop
   while(1)
   {
      //SW0 button pressed?
      if(!(PIO_SW0->PIO_PDSR & SW0))
      {
         //FTP client test routine
         ftpClientTest();

         //Wait for the SW0 button to be released
         while(!(PIO_SW0->PIO_PDSR & SW0));
      }

      //Loop delay
      osDelayTask(100);
   }
}

/**
 * @brief LED blinking task
 **/

void blinkTask(void *parameters)
{
   //Endless loop
   while(1)
   {
      PIO_LED0->PIO_CODR = LED0;
      osDelayTask(100);
      PIO_LED0->PIO_SODR = LED0;
      osDelayTask(900);
   }
}

/**
 * @brief Main entry point
 * @return Unused value
 **/

int_t main(void)
{
   error_t error;
   NetInterface *interface;
   OsTask *task;
   MacAddr macAddr;
#if (APP_USE_DHCP == DISABLED)
   Ipv4Addr ipv4Addr;
#endif
#if (APP_USE_SLAAC == DISABLED)
   Ipv6Addr ipv6Addr;
#endif

   //Disable watchdog timer
   WDT->WDT_MR = WDT_MR_WDDIS;

   //Enable I-cache
   SCB_EnableICache();
   //D-cache is not supported
   //SCB_EnableDCache();

   //Update system core clock
   SystemCoreClockUpdate();

   //Initialize kernel
   osInitKernel();
   //Configure debug UART
   debugInit(115200);

   //Start-up message
   TRACE_INFO("\r\n");
   TRACE_INFO("**********************************\r\n");
   TRACE_INFO("*** CycloneTCP FTP Client Demo ***\r\n");
   TRACE_INFO("**********************************\r\n");
   TRACE_INFO("Copyright: 2010-2015 Oryx Embedded SARL\r\n");
   TRACE_INFO("Compiled: %s %s\r\n", __DATE__, __TIME__);
   TRACE_INFO("Target: SAMV71\r\n");
   TRACE_INFO("\r\n");

   //Configure I/Os
   ioInit();

   //TCP/IP stack initialization
   error = netInit();
   //Any error to report?
   if(error)
   {
      //Debug message
      TRACE_ERROR("Failed to initialize TCP/IP stack!\r\n");
   }

   //Configure the first Ethernet interface
   interface = &netInterface[0];

   //Set interface name
   netSetInterfaceName(interface, "eth0");
   //Set host name
   netSetHostname(interface, "FTPClientDemo");
   //Select the relevant network adapter
   netSetDriver(interface, &samv71EthDriver);
   netSetPhyDriver(interface, &ksz8061PhyDriver);
   //Set external interrupt line driver
   netSetExtIntDriver(interface, &extIntDriver);
   //Set host MAC address
   macStringToAddr(APP_MAC_ADDR, &macAddr);
   netSetMacAddr(interface, &macAddr);

   //Initialize network interface
   error = netConfigInterface(interface);
   //Any error to report?
   if(error)
   {
      //Debug message
      TRACE_ERROR("Failed to configure interface %s!\r\n", interface->name);
   }

#if (IPV4_SUPPORT == ENABLED)
#if (APP_USE_DHCP == ENABLED)
   //Get default settings
   dhcpClientGetDefaultSettings(&dhcpClientSettings);
   //Set the network interface to be configured by DHCP
   dhcpClientSettings.interface = interface;
   //Disable rapid commit option
   dhcpClientSettings.rapidCommit = FALSE;

   //DHCP client initialization
   error = dhcpClientInit(&dhcpClientContext, &dhcpClientSettings);
   //Failed to initialize DHCP client?
   if(error)
   {
      //Debug message
      TRACE_ERROR("Failed to initialize DHCP client!\r\n");
   }

   //Start DHCP client
   error = dhcpClientStart(&dhcpClientContext);
   //Failed to start DHCP client?
   if(error)
   {
      //Debug message
      TRACE_ERROR("Failed to start DHCP client!\r\n");
   }
#else
   //Set IPv4 host address
   ipv4StringToAddr(APP_IPV4_HOST_ADDR, &ipv4Addr);
   ipv4SetHostAddr(interface, ipv4Addr);

   //Set subnet mask
   ipv4StringToAddr(APP_IPV4_SUBNET_MASK, &ipv4Addr);
   ipv4SetSubnetMask(interface, ipv4Addr);

   //Set default gateway
   ipv4StringToAddr(APP_IPV4_DEFAULT_GATEWAY, &ipv4Addr);
   ipv4SetDefaultGateway(interface, ipv4Addr);

   //Set primary and secondary DNS servers
   ipv4StringToAddr(APP_IPV4_PRIMARY_DNS, &ipv4Addr);
   ipv4SetDnsServer(interface, 0, ipv4Addr);
   ipv4StringToAddr(APP_IPV4_SECONDARY_DNS, &ipv4Addr);
   ipv4SetDnsServer(interface, 1, ipv4Addr);
#endif
#endif

#if (IPV6_SUPPORT == ENABLED)
#if (APP_USE_SLAAC == ENABLED)
   //Get default settings
   slaacGetDefaultSettings(&slaacSettings);
   //Set the network interface to be configured
   slaacSettings.interface = interface;

   //SLAAC initialization
   error = slaacInit(&slaacContext, &slaacSettings);
   //Failed to initialize SLAAC?
   if(error)
   {
      //Debug message
      TRACE_ERROR("Failed to initialize SLAAC!\r\n");
   }

   //Start IPv6 address autoconfiguration process
   error = slaacStart(&slaacContext);
   //Failed to start SLAAC process?
   if(error)
   {
      //Debug message
      TRACE_ERROR("Failed to start SLAAC!\r\n");
   }
#else
   //Set link-local address
   ipv6StringToAddr(APP_IPV6_LINK_LOCAL_ADDR, &ipv6Addr);
   ipv6SetLinkLocalAddr(interface, &ipv6Addr);

   //Set IPv6 prefix
   ipv6StringToAddr(APP_IPV6_PREFIX, &ipv6Addr);
   ipv6SetPrefix(interface, &ipv6Addr, APP_IPV6_PREFIX_LENGTH);

   //Set global address
   ipv6StringToAddr(APP_IPV6_GLOBAL_ADDR, &ipv6Addr);
   ipv6SetGlobalAddr(interface, &ipv6Addr);

   //Set router
   ipv6StringToAddr(APP_IPV6_ROUTER, &ipv6Addr);
   ipv6SetRouter(interface, &ipv6Addr);

   //Set primary and secondary DNS servers
   ipv6StringToAddr(APP_IPV6_PRIMARY_DNS, &ipv6Addr);
   ipv6SetDnsServer(interface, 0, &ipv6Addr);
   ipv6StringToAddr(APP_IPV6_SECONDARY_DNS, &ipv6Addr);
   ipv6SetDnsServer(interface, 1, &ipv6Addr);
#endif
#endif

   //Create user task
   task = osCreateTask("User Task", userTask, NULL, 500, 1);
   //Failed to create the task?
   if(task == OS_INVALID_HANDLE)
   {
      //Debug message
      TRACE_ERROR("Failed to create task!\r\n");
   }

   //Create a task to blink the LED
   task = osCreateTask("Blink", blinkTask, NULL, 500, 1);
   //Failed to create the task?
   if(task == OS_INVALID_HANDLE)
   {
      //Debug message
      TRACE_ERROR("Failed to create task!\r\n");
   }

   //Start the execution of tasks
   osStartKernel();

   //This function should never return
   return 0;
}


text:
/*
 * File:   stm32l1xx_vectors.h
 * Author: karlp
 * considered BSD/MIT license, but the table text was all from the datasheets.
 * Contains a vector table, weakly defined, for _only_ the STM32L1xx specific
 * interrupt vectors.
 * ie, the ones that are device specifc, _after_ the SYSTICK handler....
 * This is intended to be used to get the entries in the vector table filled in...
 * Just include this file at least once..
 *
 * Created on December 3, 2011, 11:49 PM
 */

/**
 * This should be defined in your other startup files...
 */
// Something's not quite right.. I was sure this was working before,
// and properly using the Dummy_Handler() defined in cm3_genstartup.c
//extern void Dummy_Handler(void);
void Dummy_Handler(void) __attribute__ ((weak));
void Dummy_Handler(void) {
    while(1)
        ;
}

void WWDG_IRQHandler(void) __attribute__((weak, alias("Dummy_Handler")));
void PVD_IRQHandler(void) __attribute__((weak, alias("Dummy_Handler")));
void TAMPER_STAMP_IRQHandler(void) __attribute__((weak, alias("Dummy_Handler")));
void RTC_WKUP_IRQHandler(void) __attribute__((weak, alias("Dummy_Handler")));
void FLASH_IRQHandler(void) __attribute__((weak, alias("Dummy_Handler")));
void RCC_IRQHandler(void) __attribute__((weak, alias("Dummy_Handler")));
void EXTI0_IRQHandler(void) __attribute__((weak, alias("Dummy_Handler")));
void EXTI1_IRQHandler(void) __attribute__((weak, alias("Dummy_Handler")));
void EXTI2_IRQHandler(void) __attribute__((weak, alias("Dummy_Handler")));
void EXTI3_IRQHandler(void) __attribute__((weak, alias("Dummy_Handler")));
void EXTI4_IRQHandler(void) __attribute__((weak, alias("Dummy_Handler")));
void DMA1_Channel1_IRQHandler(void) __attribute__((weak, alias("Dummy_Handler")));
void DMA1_Channel2_IRQHandler(void) __attribute__((weak, alias("Dummy_Handler")));
void DMA1_Channel3_IRQHandler(void) __attribute__((weak, alias("Dummy_Handler")));
void DMA1_Channel4_IRQHandler(void) __attribute__((weak, alias("Dummy_Handler")));
void DMA1_Channel5_IRQHandler(void) __attribute__((weak, alias("Dummy_Handler")));
void DMA1_Channel6_IRQHandler(void) __attribute__((weak, alias("Dummy_Handler")));
void DMA1_Channel7_IRQHandler(void) __attribute__((weak, alias("Dummy_Handler")));
void ADC1_IRQHandler(void) __attribute__((weak, alias("Dummy_Handler")));
void USB_HP_IRQHandler(void) __attribute__((weak, alias("Dummy_Handler")));
void USB_LP_IRQHandler(void) __attribute__((weak, alias("Dummy_Handler")));
void DAC_IRQHandler(void) __attribute__((weak, alias("Dummy_Handler")));
void COMP_IRQHandler(void) __attribute__((weak, alias("Dummy_Handler")));
void EXTI9_5_IRQHandler(void) __attribute__((weak, alias("Dummy_Handler")));
void LCD_IRQHandler(void) __attribute__((weak, alias("Dummy_Handler")));
void TIM9_IRQHandler(void) __attribute__((weak, alias("Dummy_Handler")));
void TIM10_IRQHandler(void) __attribute__((weak, alias("Dummy_Handler")));
void TIM11_IRQHandler(void) __attribute__((weak, alias("Dummy_Handler")));
void TIM2_IRQHandler(void) __attribute__((weak, alias("Dummy_Handler")));
void TIM3_IRQHandler(void) __attribute__((weak, alias("Dummy_Handler")));
void TIM4_IRQHandler(void) __attribute__((weak, alias("Dummy_Handler")));
void I2C1_EV_IRQHandler(void) __attribute__((weak, alias("Dummy_Handler")));
void I2C1_ER_IRQHandler(void) __attribute__((weak, alias("Dummy_Handler")));
void I2C2_EV_IRQHandler(void) __attribute__((weak, alias("Dummy_Handler")));
void I2C2_ER_IRQHandler(void) __attribute__((weak, alias("Dummy_Handler")));
void SPI1_IRQHandler(void) __attribute__((weak, alias("Dummy_Handler")));
void SPI2_IRQHandler(void) __attribute__((weak, alias("Dummy_Handler")));
void USART1_IRQHandler(void) __attribute__((weak, alias("Dummy_Handler")));
void USART2_IRQHandler(void) __attribute__((weak, alias("Dummy_Handler")));
void USART3_IRQHandler(void) __attribute__((weak, alias("Dummy_Handler")));
void EXTI15_10_IRQHandler(void) __attribute__((weak, alias("Dummy_Handler")));
void RTC_Alarm_IRQHandler(void) __attribute__((weak, alias("Dummy_Handler")));
void USB_FS_WKUP_IRQHandler(void) __attribute__((weak, alias("Dummy_Handler")));
void TIM6_IRQHandler(void) __attribute__((weak, alias("Dummy_Handler")));
void TIM7_IRQHandler(void) __attribute__((weak, alias("Dummy_Handler")));

void *stm32l1xx_vector_table[] __attribute__((section(".vectors.stm32l1xx"))) = {
    WWDG_IRQHandler, /* Window Watchdog interrupt */
    PVD_IRQHandler, /* PVD through EXTI Line detection */
    TAMPER_STAMP_IRQHandler, /* Tamper and TimeStamps through the EXTI line */
    RTC_WKUP_IRQHandler, /* RTC Wakeup through the EXTI line */
    FLASH_IRQHandler, /* FLASH global interrupt */
    RCC_IRQHandler, /* RCC global interrupt */
    EXTI0_IRQHandler, /* EXTI Line0 interrupt */
    EXTI1_IRQHandler, /* EXTI Line1 interrupt */
    EXTI2_IRQHandler, /* EXTI Line2 interrupt */
    EXTI3_IRQHandler, /* EXTI Line3 interrupt */
    EXTI4_IRQHandler, /* EXTI Line4 interrupt */
    DMA1_Channel1_IRQHandler, /* DMA1 Channel 1 */
    DMA1_Channel2_IRQHandler, /* DMA1 Channel 2 */
    DMA1_Channel3_IRQHandler, /* DMA1 Channel 3 */
    DMA1_Channel4_IRQHandler, /* DMA1 Channel 4 */
    DMA1_Channel5_IRQHandler, /* DMA1 Channel 5 */
    DMA1_Channel6_IRQHandler, /* DMA1 Channel 6 */
    DMA1_Channel7_IRQHandler, /* DMA1 Channel 6 */
    ADC1_IRQHandler, /* ADC1 global interrupt*/
    USB_HP_IRQHandler, /* USB High priority interrupt */
    USB_LP_IRQHandler, /* USB Low priority interrupt */
    DAC_IRQHandler, /* DAC interrupt */
    COMP_IRQHandler, /* Comparator wakeup through EXTI line (21 and 22) interrupt */
    EXTI9_5_IRQHandler, /* EXTI Line[9:5] interrupts */
    LCD_IRQHandler, /* LCD global interrupt */
    TIM9_IRQHandler, /* TIM9 global interrupt */
    TIM10_IRQHandler, /* TIM10 global interrupt */
    TIM11_IRQHandler, /* TIM11 global interrupt priority */
    TIM2_IRQHandler, /* TIM2 global interrupt */
    TIM3_IRQHandler, /* TIM3 global interrupt */
    TIM4_IRQHandler, /* TIM4 global interrupt */
    I2C1_EV_IRQHandler, /* I2C1 event interrupt */
    I2C1_ER_IRQHandler, /* I2C1 error interrupt */
    I2C2_EV_IRQHandler, /* I2C2 event interrupt */
    I2C2_ER_IRQHandler, /* I2C2 error interrupt*/
    SPI1_IRQHandler, /* SPI1 global interrupt */
    SPI2_IRQHandler, /* SPI2 global interrupt */
    USART1_IRQHandler, /* USART1 global interrupt */
    USART2_IRQHandler, /* USART2 global interrupt */
    USART3_IRQHandler, /* USART3 global interrupt */
    EXTI15_10_IRQHandler, /* EXTI Line[15:10] interrupts */
    RTC_Alarm_IRQHandler, /* RTC Alarms (A and B) through EXTI line interrupt */
    USB_FS_WKUP_IRQHandler, /* USB Device FS Wakeup through EXTI line interrupt */
    TIM6_IRQHandler, /* TIM6 global interrupt */
    TIM7_IRQHandler /* TIM7 global interrupt */
};


text:
const webpack = require('webpack');
const HtmlWebpackPlugin = require('html-webpack-plugin');
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
const ESLintPlugin = require('eslint-webpack-plugin');
const path = require('path');
const settings = require('./tasks/helper')
  .init()
  .readSettingsFile()
  .template
  .development;

module.exports = {

  mode: 'development',

  entry: {
    bundle: ['core-js/features/array', 'core-js/features/string/ends-with', 'core-js/features/string/starts-with', 'core-js/features/object', 'core-js/features/symbol', 'core-js/features/promise', 'regenerator-runtime/runtime', './app/main.js'] //Our starting point for our development.
  },

  output: {
    path: path.join(__dirname, '/dist/debug/'),
    filename: 'dashboard.assets/js/[name].js'
  },

  plugins: [
    new ESLintPlugin({
      extensions: [`js`, `jsx`],
    }),
    new webpack.optimize.LimitChunkCountPlugin({maxChunks: 1}),
    new HtmlWebpackPlugin(Object.assign({
      template: settings.src,
      title: 'Project Fauxton',
      filename: 'index.html',
      generationLabel: 'Fauxton Dev',
      generationDate: new Date().toISOString()
    }, settings.variables)),
    new MiniCssExtractPlugin({
      filename: 'dashboard.assets/css/styles.[chunkhash].css',
      chunkFilename: 'dashboard.assets/css/styles.[chunkhash].css'
    }),
    new webpack.LoaderOptionsPlugin({
      debug: true
    })
  ],
  module: {
    rules: [
      {
        test: /\.jsx?$/,
        exclude: ['/node_modules/'],
        use: [{
          loader: 'babel-loader'
        }],
      },
      {
        test: require.resolve('jquery'),
        use: [{
          loader: 'expose-loader',
          options: {
            exposes: ['jQuery', '$']
          },
        },
        ]},
      {
        test: require.resolve("backbone"),
        use: [{
          loader: 'expose-loader',
          options: {
            exposes: [{
              globalName: 'Backbone',
              override: true,
            }],
          },
        }]
      },
      {
        test: /\.less$/,
        use: [
          {
            loader: MiniCssExtractPlugin.loader,
            options: {
              publicPath: '../../'
            },
          },
          "css-loader",
          {
            loader: "less-loader",
            options: {
              lessOptions: {
                modifyVars: {
                  largeLogoPath: "'" + settings.variables.largeLogoPath + "'",
                  smallLogoPath: "'" + settings.variables.smallLogoPath + "'"
                }
              }
            }
          }
        ]
      },
      {
        test: /\.css$/,
        use: [
          {
            loader: MiniCssExtractPlugin.loader,
            options: {
              publicPath: '../../'
            },
          },
          "css-loader"
        ]
      },
      {
        test: /\.woff(\?v=\d+\.\d+\.\d+)?$/,
        type: 'asset/resource',
        generator: {
          filename: 'dashboard.assets/fonts/[name][ext]'
        },
      },
      {
        test: /\.woff2(\?\S*)?$/,
        type: 'asset/resource',
        generator: {
          filename: 'dashboard.assets/fonts/[name][ext]'
        },
      },
      {
        test: /\.ttf(\?v=\d+\.\d+\.\d+)?$/,
        type: 'asset/resource',
        generator: {
          filename: 'dashboard.assets/fonts/[name][ext]'
        },
      },
      {
        test: /\.eot(\?v=\d+\.\d+\.\d+)?$/,
        type: 'asset/resource',
        generator: {
          filename: 'dashboard.assets/fonts/[name][ext]'
        },
      },
      {
        test: /\.png(\?v=\d+\.\d+\.\d+)?$/,
        type: 'asset/resource',
        generator: {
          filename: 'dashboard.assets/img/[name][ext]'
        },
      },
      {
        test: /\.gif(\?v=\d+\.\d+\.\d+)?$/,
        type: 'asset/resource',
        generator: {
          filename: 'dashboard.assets/img/[name][ext]'
        },
      },
      {
        test: /\.svg(\?v=\d+\.\d+\.\d+)?$/,
        type: 'asset/resource',
        generator: {
          filename: 'dashboard.assets/img/[name][ext]'
        },
      }
    ]
  },
  resolve: {
    extensions: ['*', '.js', '.jsx'], //We can use .js and React's .jsx files using Babel
    alias: {
      "underscore": "lodash",
    }
  },
  devtool: 'source-map'
};


text:
public class ViewContainer : MvcBehaviour
{
    public PlayerView Player;
    // Register here all other Views, for example:
    // TimeView, ItemView, MenuView...
}


text:
class HarvestError(Exception):
    pass

class HarvesterConcurrencyError(HarvestError):
    pass

class HarvesterDisabledError(HarvestError):
    pass


text:
package org.n52.sos.service.it;

import org.junit.runner.RunWith;
import org.n52.sos.service.it.v2.kvp.DeleteObservationTest;
import org.n52.sos.service.it.v2.kvp.DeleteSensorTest;
import org.n52.sos.service.it.v2.kvp.DescribeSensorTest;
import org.n52.sos.service.it.v2.kvp.GetCapabilitiesTest;
import org.n52.sos.service.it.v2.kvp.GetDataAvailabilityTest;
import org.n52.sos.service.it.v2.kvp.GetFeatureOfInterestTest;
import org.n52.sos.service.it.v2.kvp.GetObservationByIdTest;
import org.n52.sos.service.it.v2.kvp.GetObservationTest;
import org.n52.sos.service.it.v2.kvp.GetResultTemplateTest;
import org.n52.sos.service.it.v2.kvp.GetResultTest;

/**
 * TODO JavaDoc
 *
 * @author Christian Autermann <c.autermann@52north.org>
 *
 * @since 4.0.0
 */
@RunWith(ComplianceSuiteRunner.class)
public class SosV2KvpSuiteTest extends SOS40Executor {
    @Override
    public Class<?>[] getTests() {
        return new Class<?>[] { DeleteObservationTest.class, DeleteSensorTest.class, DescribeSensorTest.class,
                GetCapabilitiesTest.class, GetDataAvailabilityTest.class, GetFeatureOfInterestTest.class,
                GetObservationByIdTest.class, GetObservationTest.class, GetResultTemplateTest.class,
                GetResultTest.class };
    }
}


text:
#pragma once
#include <aws/clouddirectory/CloudDirectory_EXPORTS.h>
#include <aws/core/utils/memory/stl/AWSString.h>
#include <aws/clouddirectory/model/TypedAttributeValueRange.h>
#include <utility>

namespace Aws
{
namespace Utils
{
namespace Json
{
  class JsonValue;
} // namespace Json
} // namespace Utils
namespace CloudDirectory
{
namespace Model
{

  /**
   *
Identifies the range of attributes that are used by a specified
   * filter.

See Also:
   AWS
   * API Reference

   */
  class AWS_CLOUDDIRECTORY_API TypedLinkAttributeRange
  {
  public:
    TypedLinkAttributeRange();
    TypedLinkAttributeRange(const Aws::Utils::Json::JsonValue& jsonValue);
    TypedLinkAttributeRange& operator=(const Aws::Utils::Json::JsonValue& jsonValue);
    Aws::Utils::Json::JsonValue Jsonize() const;

    /**
     *
The unique name of the typed link attribute.

     */
    inline const Aws::String& GetAttributeName() const{ return m_attributeName; }

    /**
     *
The unique name of the typed link attribute.

     */
    inline void SetAttributeName(const Aws::String& value) { m_attributeNameHasBeenSet = true; m_attributeName = value; }

    /**
     *
The unique name of the typed link attribute.

     */
    inline void SetAttributeName(Aws::String&& value) { m_attributeNameHasBeenSet = true; m_attributeName = std::move(value); }

    /**
     *
The unique name of the typed link attribute.

     */
    inline void SetAttributeName(const char* value) { m_attributeNameHasBeenSet = true; m_attributeName.assign(value); }

    /**
     *
The unique name of the typed link attribute.

     */
    inline TypedLinkAttributeRange& WithAttributeName(const Aws::String& value) { SetAttributeName(value); return *this;}

    /**
     *
The unique name of the typed link attribute.

     */
    inline TypedLinkAttributeRange& WithAttributeName(Aws::String&& value) { SetAttributeName(std::move(value)); return *this;}

    /**
     *
The unique name of the typed link attribute.

     */
    inline TypedLinkAttributeRange& WithAttributeName(const char* value) { SetAttributeName(value); return *this;}

    /**
     *
The range of attribute values that are being selected.

     */
    inline const TypedAttributeValueRange& GetRange() const{ return m_range; }

    /**
     *
The range of attribute values that are being selected.

     */
    inline void SetRange(const TypedAttributeValueRange& value) { m_rangeHasBeenSet = true; m_range = value; }

    /**
     *
The range of attribute values that are being selected.

     */
    inline void SetRange(TypedAttributeValueRange&& value) { m_rangeHasBeenSet = true; m_range = std::move(value); }

    /**
     *
The range of attribute values that are being selected.

     */
    inline TypedLinkAttributeRange& WithRange(const TypedAttributeValueRange& value) { SetRange(value); return *this;}

    /**
     *
The range of attribute values that are being selected.

     */
    inline TypedLinkAttributeRange& WithRange(TypedAttributeValueRange&& value) { SetRange(std::move(value)); return *this;}

  private:
    Aws::String m_attributeName;
    bool m_attributeNameHasBeenSet;
    TypedAttributeValueRange m_range;
    bool m_rangeHasBeenSet;
  };

} // namespace Model
} // namespace CloudDirectory
} // namespace Aws


text:
This module provides API for rendering custom data.

## What is the purpose of this module?

This module allows you to collect any data about a component and render it on the page.

The method and source of data collection is defined in the data gathering strategies.
The rendering location and the component used for this is specified in the data rendering strategies.

## Usage

You need to implement the strategies for collecting and rendering data so that the module will execute them.

Strategies can be set using the `setDataGatheringStrategies` and `setDataRenderStrategies` methods directly in your component that inherits from iBlock.

```typescript
@hook(['mounted', 'updated'])
protected override initInfoRender(): void {
  this.infoRender.setDataGatheringStrategies([getDataFromDebugField]);
  this.infoRender.setDataRenderStrategies([bottomNextBlockRender]);

  super.initInfoRender();
}
```


text:
zsh-completions
===============

**Additional completion definitions for [Zsh](http://www.zsh.org).**

*This projects aims at gathering/developing new completion scripts that are not available in Zsh yet. The scripts are meant to be contributed to the Zsh project when stable enough.*

Status
------
See [issues](https://github.com/zsh-users/zsh-completions/issues) for details on each completion definition.

Gentoo's completions have been removed, as they are maintained upstream. See: [Gentoo zsh-completions](https://github.com/gentoo/gentoo-zsh-completions)

Usage
-----

#### Using packages

* Arch Linux: [community/zsh-completions](https://www.archlinux.org/packages/zsh-completions) / [AUR/zsh-completions-git](https://aur.archlinux.org/packages/zsh-completions-git/)
* Gentoo: [scrill overlay](http://gpo.zugaina.org/app-shells/zsh-completions)
* Mac OS: [Homebrew](https://github.com/mxcl/homebrew/blob/master/Library/Formula/zsh-completions.rb)
* Debian based distributions (Debian/Ubuntu/Linux Mint...): Packager needed, please get in touch !
* RPM based distributions (Fedora/RHEL/CentOS...): Packager needed, please get in touch !

#### Manual installation

* Clone the repository:

        git clone git://github.com/zsh-users/zsh-completions.git

* Include the directory in your `$fpath`, for example by adding in `~/.zshrc`:

        fpath=(path/to/zsh-completions/src $fpath)

* You may have to force rebuild `zcompdump`:

        rm -f ~/.zcompdump; compinit

Contributing
------------

Contributions are welcome, just make sure you follow the guidelines:

 * Completions are not accepted when already available in their original project.
 * Please do not just copy/paste someone else completion, ask before.
 * Completions only partially implemented are not accepted.
 * Please add a header containing authors, license info, status and origin of the script (example [here](src/_ack)).
 * Please try to follow [Zsh completion style guide](https://github.com/zsh-users/zsh/blob/master/Etc/completion-style-guide).
 * Send a pull request or ask for committer access.

License
-------
See each file for license details.


text:
package com.alibaba.json.bvt.parser.deser;

import junit.framework.TestCase;

import org.junit.Assert;

import com.alibaba.fastjson.JSON;

public class ThrowableDeserializerTest_2 extends TestCase {

    public void test_0() throws Exception {
        Assert.assertEquals("xxx", JSON.parseObject("{\"message\":\"xxx\",,,}", MyException.class).getMessage());
    }

    public void test_2() throws Exception {
        Assert.assertEquals(null, JSON.parseObject("{\"message\":\"xxx\"}", MyException2.class).getMessage());
    }

    public void test_3() throws Exception {
        Exception error = null;
        try {
            JSON.parseObject(",\"message\":\"xxx\"}", MyException.class);
        } catch (Exception ex) {
            error = ex;
        }
        Assert.assertNotNull(error);
    }

    public static class MyException extends Exception {

        public MyException(){

        }

        public MyException(String message){
            super(message);
        }
    }

    public static class MyException2 extends Exception {

        public MyException2(){

        }

    }
}


text:
<?php

/**
 *      [Discuz!] (C)2001-2099 Comsenz Inc.
 *      This is NOT a freeware, use is subject to license terms
 *
 *      $Id: cache_custominfo.php 26112 2011-12-02 03:06:01Z zhengqingpeng $
 */

if(!defined('IN_DISCUZ')) {
	exit('Access Denied');
}

function build_cache_custominfo() {

	$data = C::t('common_setting')->fetch_all(array('extcredits', 'customauthorinfo', 'postno', 'postnocustom'));
	$data['customauthorinfo'] = unserialize($data['customauthorinfo']);
	$data['customauthorinfo'] = $data['customauthorinfo'][0];
	$data['fieldsadd'] = '';
	$data['extcredits'] = unserialize($data['extcredits']);
	$order = array();
	if($data['customauthorinfo']) {
		foreach($data['customauthorinfo'] as $k => $v) {
			if($v['left']) {
				$order['left'][$k] = $v['order'];
			}
			if($v['menu']) {
				$order['menu'][$k] = $v['order'];
			}
		}
		if(!empty($order['left'])) {
			asort($order['left']);
		}
		if(!empty($order['menu'])) {
			asort($order['menu']);
		}
	}
	$data['setting'] = $order;

	$profile = array();
	foreach(C::t('common_member_profile_setting')->fetch_all_by_available_showinthread(1, 1) as $field) {
		$data['fieldsadd'] .= ', mp.'.$field['fieldid'].' AS '.$field['fieldid'];
		$profile['field_'.$field['fieldid']] = array($field['title'], $field['fieldid']);
	}
	$data['profile'] = $profile;

	$postnocustomnew[0] = $data['postno'] != '' ? (preg_match("/^[\x01-\x7f]+$/", $data['postno']) ? ''.$data['postno'].'' : $data['postno']) : '#';
	$data['postnocustom'] = unserialize($data['postnocustom']);
	if(is_array($data['postnocustom'])) {
		foreach($data['postnocustom'] as $key => $value) {
			$value = trim($value);
			$postnocustomnew[$key + 1] = preg_match("/^[\x01-\x7f]+$/", $value) ? ''.$value.'' : $value;
		}
	}
	unset($data['customauthorinfo'], $data['postno'], $data['postnocustom'], $data['extcredits']);
	$data['postno'] = $postnocustomnew;

	savecache('custominfo', $data);
}

?>