text:
#include <linux/module.h>
#include <linux/kernel.h>

#include <pcmcia/cs_types.h>
#include <pcmcia/ss.h>
#include <pcmcia/cs.h>
#include "cs_internal.h"

#ifdef CONFIG_PCMCIA_IOCTL

#ifdef CONFIG_PCMCIA_PROBE

static int adjust_irq(struct pcmcia_socket *s, adjust_t *adj)
{
	int irq;
	u32 mask;

	irq = adj->resource.irq.IRQ;
	if ((irq < 0) || (irq > 15))
		return CS_BAD_IRQ;

	if (adj->Action != REMOVE_MANAGED_RESOURCE)
		return 0;

	mask = 1 << irq;

	if (!(s->irq_mask & mask))
		return 0;

	s->irq_mask &= ~mask;

	return 0;
}

#else

static inline int adjust_irq(struct pcmcia_socket *s, adjust_t *adj) {
	return CS_SUCCESS;
}

#endif

int pcmcia_adjust_resource_info(adjust_t *adj)
{
	struct pcmcia_socket *s;
	int ret = CS_UNSUPPORTED_FUNCTION;
	unsigned long flags;

	down_read(&pcmcia_socket_list_rwsem);
	list_for_each_entry(s, &pcmcia_socket_list, socket_list) {

		if (adj->Resource == RES_IRQ)
			ret = adjust_irq(s, adj);

		else if (s->resource_ops->adjust_resource) {

			/* you can't use the old interface if the new
			 * one was used before */
			spin_lock_irqsave(&s->lock, flags);
			if ((s->resource_setup_new) &&
			    !(s->resource_setup_old)) {
				spin_unlock_irqrestore(&s->lock, flags);
				continue;
			} else if (!(s->resource_setup_old))
				s->resource_setup_old = 1;
			spin_unlock_irqrestore(&s->lock, flags);

			ret = s->resource_ops->adjust_resource(s, adj);
			if (!ret) {
				/* as there's no way we know this is the
				 * last call to adjust_resource_info, we
				 * always need to assume this is the latest
				 * one... */
				spin_lock_irqsave(&s->lock, flags);
				s->resource_setup_done = 1;
				spin_unlock_irqrestore(&s->lock, flags);
			}
		}
	}
	up_read(&pcmcia_socket_list_rwsem);

	return (ret);
}
EXPORT_SYMBOL(pcmcia_adjust_resource_info);

#endif

int pcmcia_validate_mem(struct pcmcia_socket *s)
{
	if (s->resource_ops->validate_mem)
		return s->resource_ops->validate_mem(s);
	/* if there is no callback, we can assume that everything is OK */
	return 0;
}
EXPORT_SYMBOL(pcmcia_validate_mem);

int pcmcia_adjust_io_region(struct resource *res, unsigned long r_start,
		     unsigned long r_end, struct pcmcia_socket *s)
{
	if (s->resource_ops->adjust_io_region)
		return s->resource_ops->adjust_io_region(res, r_start, r_end, s);
	return -ENOMEM;
}
EXPORT_SYMBOL(pcmcia_adjust_io_region);

struct resource *pcmcia_find_io_region(unsigned long base, int num,
		   unsigned long align, struct pcmcia_socket *s)
{
	if (s->resource_ops->find_io)
		return s->resource_ops->find_io(base, num, align, s);
	return NULL;
}
EXPORT_SYMBOL(pcmcia_find_io_region);

struct resource *pcmcia_find_mem_region(u_long base, u_long num, u_long align,
				 int low, struct pcmcia_socket *s)
{
	if (s->resource_ops->find_mem)
		return s->resource_ops->find_mem(base, num, align, low, s);
	return NULL;
}
EXPORT_SYMBOL(pcmcia_find_mem_region);

void release_resource_db(struct pcmcia_socket *s)
{
	if (s->resource_ops->exit)
		s->resource_ops->exit(s);
}

static int static_init(struct pcmcia_socket *s)
{
	unsigned long flags;

	/* the good thing about SS_CAP_STATIC_MAP sockets is
	 * that they don't need a resource database */

	spin_lock_irqsave(&s->lock, flags);
	s->resource_setup_done = 1;
	spin_unlock_irqrestore(&s->lock, flags);

	return 0;
}

struct pccard_resource_ops pccard_static_ops = {
	.validate_mem = NULL,
	.adjust_io_region = NULL,
	.find_io = NULL,
	.find_mem = NULL,
	.adjust_resource = NULL,
	.init = static_init,
	.exit = NULL,
};
EXPORT_SYMBOL(pccard_static_ops);

#ifdef CONFIG_PCCARD_IODYN

static struct resource *
make_resource(unsigned long b, unsigned long n, int flags, char *name)
{
	struct resource *res = kzalloc(sizeof(*res), GFP_KERNEL);

	if (res) {
		res->name = name;
		res->start = b;
		res->end = b + n - 1;
		res->flags = flags;
	}
	return res;
}

struct pcmcia_align_data {
	unsigned long	mask;
	unsigned long	offset;
};

static void pcmcia_align(void *align_data, struct resource *res,
			unsigned long size, unsigned long align)
{
	struct pcmcia_align_data *data = align_data;
	unsigned long start;

	start = (res->start & ~data->mask) + data->offset;
	if (start < res->start)
		start += data->mask + 1;
	res->start = start;

#ifdef CONFIG_X86
        if (res->flags & IORESOURCE_IO) {
                if (start & 0x300) {
                        start = (start + 0x3ff) & ~0x3ff;
                        res->start = start;
                }
        }
#endif

#ifdef CONFIG_M68K
        if (res->flags & IORESOURCE_IO) {
		if ((res->start + size - 1) >= 1024)
			res->start = res->end;
	}
#endif
}

static int iodyn_adjust_io_region(struct resource *res, unsigned long r_start,
				      unsigned long r_end, struct pcmcia_socket *s)
{
	return adjust_resource(res, r_start, r_end - r_start + 1);
}

static struct resource *iodyn_find_io_region(unsigned long base, int num,
		unsigned long align, struct pcmcia_socket *s)
{
	struct resource *res = make_resource(0, num, IORESOURCE_IO,
					     s->dev.bus_id);
	struct pcmcia_align_data data;
	unsigned long min = base;
	int ret;

	if (align == 0)
		align = 0x10000;

	data.mask = align - 1;
	data.offset = base & data.mask;

#ifdef CONFIG_PCI
	if (s->cb_dev) {
		ret = pci_bus_alloc_resource(s->cb_dev->bus, res, num, 1,
					     min, 0, pcmcia_align, &data);
	} else
#endif
		ret = allocate_resource(&ioport_resource, res, num, min, ~0UL,
					1, pcmcia_align, &data);

	if (ret != 0) {
		kfree(res);
		res = NULL;
	}
	return res;
}

struct pccard_resource_ops pccard_iodyn_ops = {
	.validate_mem = NULL,
	.adjust_io_region = iodyn_adjust_io_region,
	.find_io = iodyn_find_io_region,
	.find_mem = NULL,
	.adjust_resource = NULL,
	.init = static_init,
	.exit = NULL,
};
EXPORT_SYMBOL(pccard_iodyn_ops);

#endif /* CONFIG_PCCARD_IODYN */


text:
<?php

namespace TS\BodegaBundle\Model;

use TS\BodegaBundle\Model\om\BaseCompras;

class Compras extends BaseCompras
{
}

redpajama_set_name: RedPajamaGithub


text:
window.targetThing = "";
window.LEDstore = false;
$.support.cors = true;

setTimeout(function(){

	var presetThing = freeboard.getDatasourceSettings("CC3200-LaunchXL").thing_id;
	if (presetThing !=='') {
		window.setThing(presetThing);
		$("#thingfield").val(presetThing);
	}

	$('button#thingsubmit').click(function(e){
		window.setThing($("#thingfield").val());
		freeboard.setDatasourceSettings("CC3200-LaunchXL", {"thing_id":window.targetThing});
	    $("#thingfield").prop('disabled', true);
	    $('button#thingsubmit').prop("disabled",true);
	});

	$('button#led').click(function(e){
		var lednum = $(this).attr('name');
		if (window.LEDstore) {
			window.setLED(false);
		}
		else {
			window.setLED(true);
		}

	});

},3000);

window.setThing = function(thingname) {
	window.targetThing = thingname;
}
window.setLED = function(state) {
	if (window.targetThing == "") {
		freeboard.showDialog($("
Error: Please set thing name!
"),"Error!","OK",null,function(){});
		return;
	}
	var payloadToSend = {};
	if (state) {
	    payloadToSend["set_led"] = "on";
	} else
	    payloadToSend["set_led"] = "off";

   	dweetio.dweet_for(window.targetThing+'-send', payloadToSend, function(err, dweet){console.log(dweet);});
	freeboard.showLoadingIndicator(true);
	setTimeout(function(){
		freeboard.showLoadingIndicator(false);
	},4000);
}


text:
**Nom du type**|**Description**
:--- | :---
MUR-EXT-GEN|Mur générique (par défaut)
MUR-EXT-BETON-MODENATURE|Modénature en façades
MUR-EXT-BRIQUE-_épaisseur (en cm)_|Murs maçonneries extérieurs : brique
MUR-EXT-PARPAING-_épaisseur (en cm)_|Murs maçonneries extérieurs : parpaings
MUR-INT-BRIQUE-_épaisseur (en cm)_|Murs maçonneries intérieurs : brique
MUR-INT-PARPAING-_épaisseur (en cm)_|Murs maçonneries intérieurs : parpaings
MUR-EXT-BOIS-_épaisseur (en cm)_|Ossature bois de façades
MUR-EXT-BERLINOISE-_épaisseur (en cm)_|Parois Berlinoise
MUR-EXT-BETON-PROJETE-_épaisseur (en cm)_|Parois béton projeté
MUR-EXT-ACROTERE-_épaisseur (en cm)_|Relevés. Acrotères. Gardes-corps
MUR-EXT-BETON-PREFA-_épaisseur (en cm)_|Voiles béton préfa par passes
MUR-EXT-BETON-_épaisseur (en cm)_|Voiles extérieurs béton
MUR-INT-BETON-_épaisseur (en cm)_|Voiles intérieurs béton
MUR-EXT-VOILES-PERIPHERIQUE-_épaisseur (en cm)_|Voiles périphériques


text:
module Aspose
  module Cloud
    module Barcode
      class Builder

=begin
  Create Barcode with different options
  @param string code_text Text to encode inside barcode.
  @param string symbology Type of barcode.
  @param string image_format Returns an image in specified format.
  @param string remote_folder Folder with barcode image.
  @param string x_resolution Resolution along X in dpi.
  @param string y_resolution Resolution along Y in dpi.
  @param string x_dimension Width of barcode unit (bar or space).
  @param string y_dimension Height of barcode unit (for 2D barcodes).
  @param string code_location Location of the code.
  @param string gr_unit Measurement of basic barcode parameters.
  @param string auto_size Sets if barcode's size will be updated automatically.
  @param string bar_height Height of the bar.
  @param string image_height Sets height of the image.
  @param string image_width Sets width of the image.
  @param string image_quality Sets quality of the image.
  @param string rotation_angle Angle of barcode orientation.
  @param string top_margin Margin between barcode and top image border.
  @param string bottom_margin Margin between barcode and bottom image border.
  @param string left_margin Margin between barcode and left image border.
  @param string right_margin Margin between barcode and right image border.
  @param string enable_checksum Sets if checksum will be added to barcode image.
=end
        def save(code_text, symbology='QR', image_format='png', remote_folder='', storage_type='Aspose', storage_name='', x_resolution=nil, y_resolution=nil, x_dimension=nil, y_dimension=nil, code_location='', gr_unit='', auto_size='', bar_height=nil, image_height=nil, image_width=nil, image_quality=nil, rotation_angle=nil, top_margin=nil, bottom_margin=nil, left_margin=nil, right_margin=nil, enable_checksum='')
          raise 'code_text can not be empty.' if code_text.empty?
          raise 'symbology can not be empty.' if symbology.empty?
          raise 'image_format can not be empty.' if image_format.empty?

          str_uri = "#{Aspose::Cloud::Common::Product.product_uri}/barcode/generate?"
          str_uri = "#{str_uri}text=#{code_text}&type=#{symbology}&format=#{image_format}"
          str_uri = "#{str_uri}&resolutionX=#{x_resolution}" unless x_resolution.nil?
          str_uri = "#{str_uri}&resolutionY=#{y_resolution}" unless y_resolution.nil?
          str_uri = "#{str_uri}&dimensionX=#{x_dimension}" unless x_dimension.nil?
          str_uri = "#{str_uri}&dimensionY=#{y_dimension}" unless y_dimension.nil?
          str_uri = "#{str_uri}&codeLocation=#{code_location}" unless code_location.empty?
          str_uri = "#{str_uri}&grUnit=#{gr_unit}" unless gr_unit.empty?
          str_uri = "#{str_uri}&barHeight=#{bar_height}" unless bar_height.nil?
          str_uri = "#{str_uri}&imageHeight=#{image_height}" unless image_height.nil?
          str_uri = "#{str_uri}&imageWidth=#{image_width}" unless image_width.nil?
          str_uri = "#{str_uri}&imageQuality=#{image_quality}" unless image_quality.nil?
          str_uri = "#{str_uri}&rotAngle=#{rotation_angle}" unless rotation_angle.nil?
          str_uri = "#{str_uri}&topMargin=#{top_margin}" unless top_margin.nil?
          str_uri = "#{str_uri}&bottomMargin=#{bottom_margin}" unless bottom_margin.nil?
          str_uri = "#{str_uri}&leftMargin=#{left_margin}" unless left_margin.nil?
          str_uri = "#{str_uri}&rightMargin=#{right_margin}" unless right_margin.nil?
          str_uri = "#{str_uri}&enableChecksum=#{enable_checksum}" unless enable_checksum.empty?
          str_uri = Aspose::Cloud::Common::Utils.append_storage(str_uri,remote_folder,storage_name,storage_type)

          signed_uri = Aspose::Cloud::Common::Utils.sign(str_uri)
          response = RestClient.get(signed_uri, :accept => 'application/json')
          output_path = "#{Aspose::Cloud::Common::AsposeApp.output_location}barcode#{symbology}.#{image_format}"
          Aspose::Cloud::Common::Utils.save_file(response, output_path)
          output_path
        end

=begin
  Create Barcode and Get Image as Stream
  @param string code_text Text to encode inside barcode.
  @param string symbology Type of barcode.
  @param string image_format Returns an image in specified format.
  @param string remote_folder Folder with barcode image.
=end

        def generate_barcode_image_stream(code_text, symbology='QR', image_format='png', remote_folder='', storage_type='Aspose', storage_name='')
          raise 'code_text can not be empty.' if code_text.empty?
          raise 'symbology can not be empty.' if symbology.empty?
          raise 'image_format can not be empty.' if image_format.empty?

          str_uri = "#{Aspose::Cloud::Common::Product.product_uri}/barcode/generate?"
          str_uri = "#{str_uri}text=#{code_text}&type=#{symbology}&format=#{image_format}"
          str_uri = Aspose::Cloud::Common::Utils.append_storage(str_uri,remote_folder,storage_name,storage_type)

          signed_uri = Aspose::Cloud::Common::Utils.sign(str_uri)
          response_stream = RestClient.get(signed_uri, :accept => 'application/json')
        end

=begin
  Generate Barcode with Appropriate Code Text Location
  @param string code_text Text to encode inside barcode.
  @param string symbology Type of barcode.
  @param string image_format Returns an image in specified format.
  @param string code_location Location of the code.
  @param string remote_folder Folder with barcode image.
=end
        def set_barcode_code_location(code_text, code_location, symbology='QR', image_format='png', remote_folder='', storage_type='Aspose', storage_name='')
          raise 'code_text can not be empty.' if code_text.empty?
          raise 'symbology can not be empty.' if symbology.empty?
          raise 'image_format can not be empty.' if image_format.empty?
          raise 'code_location can not be empty.' if code_location.empty?

          str_uri = "#{Aspose::Cloud::Common::Product.product_uri}/barcode/generate?"
          str_uri = "#{str_uri}text=#{code_text}&type=#{symbology}&format=#{image_format}&codeLocation=#{code_location}"
          str_uri = Aspose::Cloud::Common::Utils.append_storage(str_uri,remote_folder,storage_name,storage_type)
          signed_uri = Aspose::Cloud::Common::Utils.sign(str_uri)
          response = RestClient.get(signed_uri, :accept => 'application/json')

          output_path = "#{Aspose::Cloud::Common::AsposeApp.output_location}barcode#{symbology}.#{image_format}"
          Aspose::Cloud::Common::Utils.save_file(response, output_path)
        end
=begin
  Generate Barcode with Checksum Option
  @param string code_text Text to encode inside barcode.
  @param string symbology Type of barcode.
  @param string image_format Returns an image in specified format.
  @param string checksum Sets if checksum will be added to barcode image.
  @param string remote_folder Folder with barcode image.
=end
        def set_barcode_checksum(code_text, checksum, symbology='QR', image_format='png', remote_folder='', storage_type='Aspose', storage_name='')
          raise 'code_text can not be empty.' if code_text.empty?
          raise 'symbology can not be empty.' if symbology.empty?
          raise 'image_format can not be empty.' if image_format.empty?
          raise 'checksum can not be empty.' if checksum.empty?

          str_uri = "#{Aspose::Cloud::Common::Product.product_uri}/barcode/generate?"
          str_uri = "#{str_uri}text=#{code_text}&type=#{symbology}&format=#{image_format}&enableChecksum=#{checksum}"
          str_uri = Aspose::Cloud::Common::Utils.append_storage(str_uri,remote_folder,storage_name,storage_type)
          signed_uri = Aspose::Cloud::Common::Utils.sign(str_uri)

          response = RestClient.get(signed_uri, :accept => 'application/json')
          output_path = "#{Aspose::Cloud::Common::AsposeApp.output_location}barcode#{symbology}.#{image_format}"
          Aspose::Cloud::Common::Utils.save_file(response, output_path)
        end

=begin
  Set Barcode Image Height, Width and Quality along with Auto Size Option
  @param string code_text Text to encode inside barcode.
  @param string symbology Type of barcode.
  @param string image_format Returns an image in specified format.
  @param string image_height Sets height of the image.
  @param string image_width Sets width of the image.
  @param string image_quality Sets quality of the image.
  @param string rotation_angle Angle of barcode orientation.
  @param string auto_size Sets if barcode's size will be updated automatically.
  @param string remote_folder Folder with barcode image.
=end
        def set_barcode_height_width(code_text, height, width, quality, auto_size, symbology='QR', image_format='png', remote_folder='', storage_type='Aspose', storage_name='')
          raise 'code_text can not be empty.' if code_text.empty?
          raise 'symbology can not be empty.' if symbology.empty?
          raise 'image_format can not be empty.' if image_format.empty?
          raise 'height can not be empty.' if height.nil?
          raise 'width can not be empty.' if width.nil?
          raise 'quality can not be empty.' if quality.nil?
          raise 'auto_size can not be empty.' if auto_size.nil?

          str_uri = "#{Aspose::Cloud::Common::Product.product_uri}/barcode/generate?"
          str_uri = "#{str_uri}text=#{code_text}&type=#{symbology}&format=#{image_format}&imageHeight=#{height}&imageWidth=#{width}&imageQuality=#{quality}&autoSize=#{auto_size}"
          str_uri = Aspose::Cloud::Common::Utils.append_storage(str_uri,remote_folder,storage_name,storage_type)
          signed_uri = Aspose::Cloud::Common::Utils.sign(str_uri)

          response = RestClient.get(signed_uri, :accept => 'application/json')
          output_path = "#{Aspose::Cloud::Common::AsposeApp.output_location}barcode#{symbology}.#{image_format}"
          Aspose::Cloud::Common::Utils.save_file(response, output_path)
        end

=begin
  Rotate Barcode Image with Suitable Angle
  @param string code_text Text to encode inside barcode.
  @param string symbology Type of barcode.
  @param string image_format Returns an image in specified format.
  @param number rotation_angle Angle of barcode orientation.
  @param string remote_folder Folder with barcode image.
=end
        def set_barcode_angle(code_text, rotation_angle, symbology='QR', image_format='png', remote_folder='', storage_type='Aspose', storage_name='')
          raise 'code_text can not be empty.' if code_text.empty?
          raise 'symbology can not be empty.' if symbology.empty?
          raise 'image_format can not be empty.' if image_format.empty?
          raise 'rotation_angle can not be empty.' if rotation_angle.nil?

          str_uri = "#{Aspose::Cloud::Common::Product.product_uri}/barcode/generate?"
          str_uri = "#{str_uri}text=#{code_text}&type=#{symbology}&format=#{image_format}&rotAngle=#{rotation_angle}"
          str_uri = Aspose::Cloud::Common::Utils.append_storage(str_uri,remote_folder,storage_name,storage_type)
          signed_uri = Aspose::Cloud::Common::Utils.sign(str_uri)

          response = RestClient.get(signed_uri, :accept => 'application/json')
          output_path = "#{Aspose::Cloud::Common::AsposeApp.output_location}barcode#{symbology}.#{image_format}"
          Aspose::Cloud::Common::Utils.save_file(response, output_path)
        end

=begin
  Set Barcode Image Margin
  @param string code_text Text to encode inside barcode.
  @param string symbology Type of barcode.
  @param string image_format Returns an image in specified format.
  @param string top_margin Margin between barcode and top image border.
  @param string bottom_margin Margin between barcode and bottom image border.
  @param string left_margin Margin between barcode and left image border.
  @param string right_margin Margin between barcode and right image border.
  @param string remote_folder Folder with barcode image.
=end
        def set_barcode_margin(code_text, top_margin, bottom_margin, left_margin, right_margin, symbology='QR', image_format='png', remote_folder='', storage_type='Aspose', storage_name='')
          raise 'code_text can not be empty.' if code_text.empty?
          raise 'symbology can not be empty.' if symbology.empty?
          raise 'image_format can not be empty.' if image_format.empty?
          raise 'top_margin can not be empty.' if top_margin.nil?
          raise 'bottom_margin can not be empty.' if bottom_margin.nil?
          raise 'left_margin can not be empty.' if left_margin.nil?
          raise 'right_margin can not be empty.' if right_margin.nil?

          str_uri = "#{Aspose::Cloud::Common::Product.product_uri}/barcode/generate?"
          str_uri = "#{str_uri}text=#{code_text}&type=#{symbology}&format=#{image_format}&topMargin=#{top_margin}&bottomMargin=#{bottom_margin}&leftMargin=#{left_margin}&rightMargin=#{right_margin}"
          str_uri = Aspose::Cloud::Common::Utils.append_storage(str_uri,remote_folder,storage_name,storage_type)
          signed_uri = Aspose::Cloud::Common::Utils.sign(str_uri)

          response_stream = RestClient.get(signed_uri, :accept => 'application/json')
          output_path = "#{Aspose::Cloud::Common::AsposeApp.output_location}barcode#{symbology}.#{image_format}"
          Aspose::Cloud::Common::Utils.save_file(response_stream, output_path)
        end

=begin
  Set Barcode Image Resolution
  @param string code_text Text to encode inside barcode.
  @param string symbology Type of barcode.
  @param string image_format Returns an image in specified format.
  @param string x_resolution Resolution along X in dpi.
  @param string y_resolution Resolution along Y in dpi.
  @param string remote_folder Folder with barcode image.
=end
        def set_barcode_resolution(code_text, x_resolution, y_resolution, symbology='QR', image_format='png', remote_folder='', storage_type='Aspose', storage_name='')
          raise 'code_text can not be empty.' if code_text.empty?
          raise 'symbology can not be empty.' if symbology.empty?
          raise 'image_format can not be empty.' if image_format.empty?
          raise 'x_resolution can not be empty.' if x_resolution.nil?
          raise 'y_resolution can not be empty.' if y_resolution.nil?

          str_uri = "#{Aspose::Cloud::Common::Product.product_uri}/barcode/generate?"
          str_uri = "#{str_uri}text=#{code_text}&type=#{symbology}&format=#{image_format}&resolutionX=#{x_resolution}&resolutionY=#{y_resolution}"
          str_uri = Aspose::Cloud::Common::Utils.append_storage(str_uri,remote_folder,storage_name,storage_type)
          signed_uri = Aspose::Cloud::Common::Utils.sign(str_uri)

          response_stream = RestClient.get(signed_uri, :accept => 'application/json')
          output_path = "#{Aspose::Cloud::Common::AsposeApp.output_location}barcode#{symbology}.#{image_format}"
          Aspose::Cloud::Common::Utils.save_file(response_stream, output_path)
        end

=begin
  Set Height of the Bars in the Barcode Image
  @param string code_text Text to encode inside barcode.
  @param string symbology Type of barcode.
  @param string image_format Returns an image in specified format.
  @param number height Height of the bar.
  @param string gr_unit Measurement of basic barcode parameters.
  @param string remote_folder Folder with barcode image.
=end
        def set_barcode_height(code_text, height, gr_unit, symbology='QR', image_format='png', remote_folder='', storage_type='Aspose', storage_name='')
          raise 'code_text can not be empty.' if code_text.empty?
          raise 'symbology can not be empty.' if symbology.empty?
          raise 'image_format can not be empty.' if image_format.empty?
          raise 'height can not be empty.' if height.nil?
          raise 'gr_unit can not be empty.' if gr_unit.empty?

          str_uri = "#{Aspose::Cloud::Common::Product.product_uri}/barcode/generate?"
          str_uri = "#{str_uri}text=#{code_text}&type=#{symbology}&format=#{image_format}&barHeight=#{height}&grUnit=#{gr_unit}"
          str_uri = Aspose::Cloud::Common::Utils.append_storage(str_uri,remote_folder,storage_name,storage_type)
          signed_uri = Aspose::Cloud::Common::Utils.sign(str_uri)

          response_stream = RestClient.get(signed_uri, :accept => 'application/json')
          output_path = "#{Aspose::Cloud::Common::AsposeApp.output_location}barcode#{symbology}.#{image_format}"
          Aspose::Cloud::Common::Utils.save_file(response_stream, output_path)
        end

=begin
  Set X and Y Dimensions of a Barcode
  @param string code_text Text to encode inside barcode.
  @param string symbology Type of barcode.
  @param string image_format Returns an image in specified format.
  @param number x_dimension Width of barcode unit (bar or space).
  @param number y_dimension Height of barcode unit (for 2D barcodes).
  @param string remote_folder Folder with barcode image.
=end
        def set_barcode_dimensions(code_text, x_dimension, y_dimension, symbology='QR', image_format='png', remote_folder='', storage_type='Aspose', storage_name='')
          raise 'code_text can not be empty.' if code_text.empty?
          raise 'symbology can not be empty.' if symbology.empty?
          raise 'image_format can not be empty.' if image_format.empty?
          raise 'x_dimension can not be empty.' if x_dimension.nil?
          raise 'y_dimension can not be empty.' if y_dimension.nil?

          str_uri = "#{Aspose::Cloud::Common::Product.product_uri}/barcode/generate?"
          str_uri = "#{str_uri}text=#{code_text}&type=#{symbology}&format=#{image_format}&dimensionX=#{x_dimension}&dimensionY=#{y_dimension}"
          str_uri = Aspose::Cloud::Common::Utils.append_storage(str_uri,remote_folder,storage_name,storage_type)
          signed_uri = Aspose::Cloud::Common::Utils.sign(str_uri)

          response_stream = RestClient.get(signed_uri, :accept => 'application/json')
          output_path = "#{Aspose::Cloud::Common::AsposeApp.output_location}barcode#{symbology}.#{image_format}"
          Aspose::Cloud::Common::Utils.save_file(response_stream, output_path)
        end
      end
    end
  end
end


text:
package com.virjar.vscrawler.core.selector.string.function.awk.jrt;

/**
 * A list of keys into an associative array.
 * <p>
 * KeyList is provided to differentiate between associative
 * array key lists and other types of lists on the operand stack
 * or as contained by variables. However, this is the only
 * List in used in this manner within Jawk at the time of
 * this writing.
 * </p>
 *
 * @see KeyListImpl
 */
//public interface KeyList extends java.util.List<Object>
public interface KeyList {

	/**
	 * Retrieve the number of elements in the KeyList.
	 */
	int size();

	Object getFirstAndRemove();
}


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

using System.Runtime.InteropServices;

namespace System.Buffers.Text
{
    public static partial class CustomParser
    {
        public static bool TryParseDecimal(ReadOnlySpan<byte> text, out decimal value, out int bytesConsumed, SymbolTable symbolTable = null)
        {
            symbolTable = symbolTable ?? SymbolTable.InvariantUtf8;

            bytesConsumed = 0;
            value = default;

            if (symbolTable == SymbolTable.InvariantUtf8)
            {
                return Utf8Parser.TryParse(text, out value, out bytesConsumed);
            }
            else if (symbolTable == SymbolTable.InvariantUtf16)
            {
                ReadOnlySpan<char> textChars = MemoryMarshal.Cast<byte, char>(text);
                bool result = Utf16Parser.TryParseDecimal(textChars, out value, out int charactersConsumed);
                bytesConsumed = charactersConsumed * sizeof(char);
                return result;
            }

            return false;
        }
    }
}


text:
set -e

source_code=$1
fname=$2.py

touch $fname
echo "$source_code" > $fname
python $fname


text:
/* Define to prevent recursive inclusion -------------------------------------*/
#ifndef __STM32F10x_FLASH_H
#define __STM32F10x_FLASH_H

#ifdef __cplusplus
 extern "C" {
#endif

/* Includes ------------------------------------------------------------------*/
#include "stm32f10x.h"

/** @addtogroup STM32F10x_StdPeriph_Driver
  * @{
  */

/** @addtogroup FLASH
  * @{
  */

/** @defgroup FLASH_Exported_Types
  * @{
  */

/**
  * @brief  FLASH Status
  */

typedef enum
{
  FLASH_BUSY = 1,
  FLASH_ERROR_PG,
  FLASH_ERROR_WRP,
  FLASH_COMPLETE,
  FLASH_TIMEOUT
}FLASH_Status;

/**
  * @}
  */

/** @defgroup FLASH_Exported_Constants
  * @{
  */

/** @defgroup Flash_Latency
  * @{
  */

#define FLASH_Latency_0                ((uint32_t)0x00000000)  /*!< FLASH Zero Latency cycle */
#define FLASH_Latency_1                ((uint32_t)0x00000001)  /*!< FLASH One Latency cycle */
#define FLASH_Latency_2                ((uint32_t)0x00000002)  /*!< FLASH Two Latency cycles */
#define IS_FLASH_LATENCY(LATENCY) (((LATENCY) == FLASH_Latency_0) || \
                                   ((LATENCY) == FLASH_Latency_1) || \
                                   ((LATENCY) == FLASH_Latency_2))
/**
  * @}
  */

/** @defgroup Half_Cycle_Enable_Disable
  * @{
  */

#define FLASH_HalfCycleAccess_Enable   ((uint32_t)0x00000008)  /*!< FLASH Half Cycle Enable */
#define FLASH_HalfCycleAccess_Disable  ((uint32_t)0x00000000)  /*!< FLASH Half Cycle Disable */
#define IS_FLASH_HALFCYCLEACCESS_STATE(STATE) (((STATE) == FLASH_HalfCycleAccess_Enable) || \
                                               ((STATE) == FLASH_HalfCycleAccess_Disable))
/**
  * @}
  */

/** @defgroup Prefetch_Buffer_Enable_Disable
  * @{
  */

#define FLASH_PrefetchBuffer_Enable    ((uint32_t)0x00000010)  /*!< FLASH Prefetch Buffer Enable */
#define FLASH_PrefetchBuffer_Disable   ((uint32_t)0x00000000)  /*!< FLASH Prefetch Buffer Disable */
#define IS_FLASH_PREFETCHBUFFER_STATE(STATE) (((STATE) == FLASH_PrefetchBuffer_Enable) || \
                                              ((STATE) == FLASH_PrefetchBuffer_Disable))
/**
  * @}
  */

/** @defgroup Option_Bytes_Write_Protection
  * @{
  */

/* Values to be used with STM32 Low and Medium density devices */
#define FLASH_WRProt_Pages0to3         ((uint32_t)0x00000001) /*!< STM32 Low and Medium density devices: Write protection of page 0 to 3 */
#define FLASH_WRProt_Pages4to7         ((uint32_t)0x00000002) /*!< STM32 Low and Medium density devices: Write protection of page 4 to 7 */
#define FLASH_WRProt_Pages8to11        ((uint32_t)0x00000004) /*!< STM32 Low and Medium density devices: Write protection of page 8 to 11 */
#define FLASH_WRProt_Pages12to15       ((uint32_t)0x00000008) /*!< STM32 Low and Medium density devices: Write protection of page 12 to 15 */
#define FLASH_WRProt_Pages16to19       ((uint32_t)0x00000010) /*!< STM32 Low and Medium density devices: Write protection of page 16 to 19 */
#define FLASH_WRProt_Pages20to23       ((uint32_t)0x00000020) /*!< STM32 Low and Medium density devices: Write protection of page 20 to 23 */
#define FLASH_WRProt_Pages24to27       ((uint32_t)0x00000040) /*!< STM32 Low and Medium density devices: Write protection of page 24 to 27 */
#define FLASH_WRProt_Pages28to31       ((uint32_t)0x00000080) /*!< STM32 Low and Medium density devices: Write protection of page 28 to 31 */

/* Values to be used with STM32 Medium-density devices */
#define FLASH_WRProt_Pages32to35       ((uint32_t)0x00000100) /*!< STM32 Medium-density devices: Write protection of page 32 to 35 */
#define FLASH_WRProt_Pages36to39       ((uint32_t)0x00000200) /*!< STM32 Medium-density devices: Write protection of page 36 to 39 */
#define FLASH_WRProt_Pages40to43       ((uint32_t)0x00000400) /*!< STM32 Medium-density devices: Write protection of page 40 to 43 */
#define FLASH_WRProt_Pages44to47       ((uint32_t)0x00000800) /*!< STM32 Medium-density devices: Write protection of page 44 to 47 */
#define FLASH_WRProt_Pages48to51       ((uint32_t)0x00001000) /*!< STM32 Medium-density devices: Write protection of page 48 to 51 */
#define FLASH_WRProt_Pages52to55       ((uint32_t)0x00002000) /*!< STM32 Medium-density devices: Write protection of page 52 to 55 */
#define FLASH_WRProt_Pages56to59       ((uint32_t)0x00004000) /*!< STM32 Medium-density devices: Write protection of page 56 to 59 */
#define FLASH_WRProt_Pages60to63       ((uint32_t)0x00008000) /*!< STM32 Medium-density devices: Write protection of page 60 to 63 */
#define FLASH_WRProt_Pages64to67       ((uint32_t)0x00010000) /*!< STM32 Medium-density devices: Write protection of page 64 to 67 */
#define FLASH_WRProt_Pages68to71       ((uint32_t)0x00020000) /*!< STM32 Medium-density devices: Write protection of page 68 to 71 */
#define FLASH_WRProt_Pages72to75       ((uint32_t)0x00040000) /*!< STM32 Medium-density devices: Write protection of page 72 to 75 */
#define FLASH_WRProt_Pages76to79       ((uint32_t)0x00080000) /*!< STM32 Medium-density devices: Write protection of page 76 to 79 */
#define FLASH_WRProt_Pages80to83       ((uint32_t)0x00100000) /*!< STM32 Medium-density devices: Write protection of page 80 to 83 */
#define FLASH_WRProt_Pages84to87       ((uint32_t)0x00200000) /*!< STM32 Medium-density devices: Write protection of page 84 to 87 */
#define FLASH_WRProt_Pages88to91       ((uint32_t)0x00400000) /*!< STM32 Medium-density devices: Write protection of page 88 to 91 */
#define FLASH_WRProt_Pages92to95       ((uint32_t)0x00800000) /*!< STM32 Medium-density devices: Write protection of page 92 to 95 */
#define FLASH_WRProt_Pages96to99       ((uint32_t)0x01000000) /*!< STM32 Medium-density devices: Write protection of page 96 to 99 */
#define FLASH_WRProt_Pages100to103     ((uint32_t)0x02000000) /*!< STM32 Medium-density devices: Write protection of page 100 to 103 */
#define FLASH_WRProt_Pages104to107     ((uint32_t)0x04000000) /*!< STM32 Medium-density devices: Write protection of page 104 to 107 */
#define FLASH_WRProt_Pages108to111     ((uint32_t)0x08000000) /*!< STM32 Medium-density devices: Write protection of page 108 to 111 */
#define FLASH_WRProt_Pages112to115     ((uint32_t)0x10000000) /*!< STM32 Medium-density devices: Write protection of page 112 to 115 */
#define FLASH_WRProt_Pages116to119     ((uint32_t)0x20000000) /*!< STM32 Medium-density devices: Write protection of page 115 to 119 */
#define FLASH_WRProt_Pages120to123     ((uint32_t)0x40000000) /*!< STM32 Medium-density devices: Write protection of page 120 to 123 */
#define FLASH_WRProt_Pages124to127     ((uint32_t)0x80000000) /*!< STM32 Medium-density devices: Write protection of page 124 to 127 */

/* Values to be used with STM32 High-density and STM32F10X Connectivity line devices */
#define FLASH_WRProt_Pages0to1         ((uint32_t)0x00000001) /*!< STM32 High-density, XL-density and Connectivity line devices:
                                                                   Write protection of page 0 to 1 */
#define FLASH_WRProt_Pages2to3         ((uint32_t)0x00000002) /*!< STM32 High-density, XL-density and Connectivity line devices:
                                                                   Write protection of page 2 to 3 */
#define FLASH_WRProt_Pages4to5         ((uint32_t)0x00000004) /*!< STM32 High-density, XL-density and Connectivity line devices:
                                                                   Write protection of page 4 to 5 */
#define FLASH_WRProt_Pages6to7         ((uint32_t)0x00000008) /*!< STM32 High-density, XL-density and Connectivity line devices:
                                                                   Write protection of page 6 to 7 */
#define FLASH_WRProt_Pages8to9         ((uint32_t)0x00000010) /*!< STM32 High-density, XL-density and Connectivity line devices:
                                                                   Write protection of page 8 to 9 */
#define FLASH_WRProt_Pages10to11       ((uint32_t)0x00000020) /*!< STM32 High-density, XL-density and Connectivity line devices:
                                                                   Write protection of page 10 to 11 */
#define FLASH_WRProt_Pages12to13       ((uint32_t)0x00000040) /*!< STM32 High-density, XL-density and Connectivity line devices:
                                                                   Write protection of page 12 to 13 */
#define FLASH_WRProt_Pages14to15       ((uint32_t)0x00000080) /*!< STM32 High-density, XL-density and Connectivity line devices:
                                                                   Write protection of page 14 to 15 */
#define FLASH_WRProt_Pages16to17       ((uint32_t)0x00000100) /*!< STM32 High-density, XL-density and Connectivity line devices:
                                                                   Write protection of page 16 to 17 */
#define FLASH_WRProt_Pages18to19       ((uint32_t)0x00000200) /*!< STM32 High-density, XL-density and Connectivity line devices:
                                                                   Write protection of page 18 to 19 */
#define FLASH_WRProt_Pages20to21       ((uint32_t)0x00000400) /*!< STM32 High-density, XL-density and Connectivity line devices:
                                                                   Write protection of page 20 to 21 */
#define FLASH_WRProt_Pages22to23       ((uint32_t)0x00000800) /*!< STM32 High-density, XL-density and Connectivity line devices:
                                                                   Write protection of page 22 to 23 */
#define FLASH_WRProt_Pages24to25       ((uint32_t)0x00001000) /*!< STM32 High-density, XL-density and Connectivity line devices:
                                                                   Write protection of page 24 to 25 */
#define FLASH_WRProt_Pages26to27       ((uint32_t)0x00002000) /*!< STM32 High-density, XL-density and Connectivity line devices:
                                                                   Write protection of page 26 to 27 */
#define FLASH_WRProt_Pages28to29       ((uint32_t)0x00004000) /*!< STM32 High-density, XL-density and Connectivity line devices:
                                                                   Write protection of page 28 to 29 */
#define FLASH_WRProt_Pages30to31       ((uint32_t)0x00008000) /*!< STM32 High-density, XL-density and Connectivity line devices:
                                                                   Write protection of page 30 to 31 */
#define FLASH_WRProt_Pages32to33       ((uint32_t)0x00010000) /*!< STM32 High-density, XL-density and Connectivity line devices:
                                                                   Write protection of page 32 to 33 */
#define FLASH_WRProt_Pages34to35       ((uint32_t)0x00020000) /*!< STM32 High-density, XL-density and Connectivity line devices:
                                                                   Write protection of page 34 to 35 */
#define FLASH_WRProt_Pages36to37       ((uint32_t)0x00040000) /*!< STM32 High-density, XL-density and Connectivity line devices:
                                                                   Write protection of page 36 to 37 */
#define FLASH_WRProt_Pages38to39       ((uint32_t)0x00080000) /*!< STM32 High-density, XL-density and Connectivity line devices:
                                                                   Write protection of page 38 to 39 */
#define FLASH_WRProt_Pages40to41       ((uint32_t)0x00100000) /*!< STM32 High-density, XL-density and Connectivity line devices:
                                                                   Write protection of page 40 to 41 */
#define FLASH_WRProt_Pages42to43       ((uint32_t)0x00200000) /*!< STM32 High-density, XL-density and Connectivity line devices:
                                                                   Write protection of page 42 to 43 */
#define FLASH_WRProt_Pages44to45       ((uint32_t)0x00400000) /*!< STM32 High-density, XL-density and Connectivity line devices:
                                                                   Write protection of page 44 to 45 */
#define FLASH_WRProt_Pages46to47       ((uint32_t)0x00800000) /*!< STM32 High-density, XL-density and Connectivity line devices:
                                                                   Write protection of page 46 to 47 */
#define FLASH_WRProt_Pages48to49       ((uint32_t)0x01000000) /*!< STM32 High-density, XL-density and Connectivity line devices:
                                                                   Write protection of page 48 to 49 */
#define FLASH_WRProt_Pages50to51       ((uint32_t)0x02000000) /*!< STM32 High-density, XL-density and Connectivity line devices:
                                                                   Write protection of page 50 to 51 */
#define FLASH_WRProt_Pages52to53       ((uint32_t)0x04000000) /*!< STM32 High-density, XL-density and Connectivity line devices:
                                                                   Write protection of page 52 to 53 */
#define FLASH_WRProt_Pages54to55       ((uint32_t)0x08000000) /*!< STM32 High-density, XL-density and Connectivity line devices:
                                                                   Write protection of page 54 to 55 */
#define FLASH_WRProt_Pages56to57       ((uint32_t)0x10000000) /*!< STM32 High-density, XL-density and Connectivity line devices:
                                                                   Write protection of page 56 to 57 */
#define FLASH_WRProt_Pages58to59       ((uint32_t)0x20000000) /*!< STM32 High-density, XL-density and Connectivity line devices:
                                                                   Write protection of page 58 to 59 */
#define FLASH_WRProt_Pages60to61       ((uint32_t)0x40000000) /*!< STM32 High-density, XL-density and Connectivity line devices:
                                                                   Write protection of page 60 to 61 */
#define FLASH_WRProt_Pages62to127      ((uint32_t)0x80000000) /*!< STM32 Connectivity line devices: Write protection of page 62 to 127 */
#define FLASH_WRProt_Pages62to255      ((uint32_t)0x80000000) /*!< STM32 Medium-density devices: Write protection of page 62 to 255 */
#define FLASH_WRProt_Pages62to511      ((uint32_t)0x80000000) /*!< STM32 XL-density devices: Write protection of page 62 to 511 */

#define FLASH_WRProt_AllPages          ((uint32_t)0xFFFFFFFF) /*!< Write protection of all Pages */

#define IS_FLASH_WRPROT_PAGE(PAGE) (((PAGE) != 0x00000000))

#define IS_FLASH_ADDRESS(ADDRESS) (((ADDRESS) >= 0x08000000) && ((ADDRESS) < 0x080FFFFF))

#define IS_OB_DATA_ADDRESS(ADDRESS) (((ADDRESS) == 0x1FFFF804) || ((ADDRESS) == 0x1FFFF806))

/**
  * @}
  */

/** @defgroup Option_Bytes_IWatchdog
  * @{
  */

#define OB_IWDG_SW                     ((uint16_t)0x0001)  /*!< Software IWDG selected */
#define OB_IWDG_HW                     ((uint16_t)0x0000)  /*!< Hardware IWDG selected */
#define IS_OB_IWDG_SOURCE(SOURCE) (((SOURCE) == OB_IWDG_SW) || ((SOURCE) == OB_IWDG_HW))

/**
  * @}
  */

/** @defgroup Option_Bytes_nRST_STOP
  * @{
  */

#define OB_STOP_NoRST                  ((uint16_t)0x0002) /*!< No reset generated when entering in STOP */
#define OB_STOP_RST                    ((uint16_t)0x0000) /*!< Reset generated when entering in STOP */
#define IS_OB_STOP_SOURCE(SOURCE) (((SOURCE) == OB_STOP_NoRST) || ((SOURCE) == OB_STOP_RST))

/**
  * @}
  */

/** @defgroup Option_Bytes_nRST_STDBY
  * @{
  */

#define OB_STDBY_NoRST                 ((uint16_t)0x0004) /*!< No reset generated when entering in STANDBY */
#define OB_STDBY_RST                   ((uint16_t)0x0000) /*!< Reset generated when entering in STANDBY */
#define IS_OB_STDBY_SOURCE(SOURCE) (((SOURCE) == OB_STDBY_NoRST) || ((SOURCE) == OB_STDBY_RST))

#ifdef STM32F10X_XL
/**
  * @}
  */
/** @defgroup FLASH_Boot
  * @{
  */
#define FLASH_BOOT_Bank1  ((uint16_t)0x0000) /*!< At startup, if boot pins are set in boot from user Flash position
                                                  and this parameter is selected the device will boot from Bank1(Default) */
#define FLASH_BOOT_Bank2  ((uint16_t)0x0001) /*!< At startup, if boot pins are set in boot from user Flash position
                                                  and this parameter is selected the device will boot from Bank 2 or Bank 1,
                                                  depending on the activation of the bank */
#define IS_FLASH_BOOT(BOOT) (((BOOT) == FLASH_BOOT_Bank1) || ((BOOT) == FLASH_BOOT_Bank2))
#endif
/**
  * @}
  */
/** @defgroup FLASH_Interrupts
  * @{
  */
#ifdef STM32F10X_XL
#define FLASH_IT_BANK2_ERROR                 ((uint32_t)0x80000400)  /*!< FPEC BANK2 error interrupt source */
#define FLASH_IT_BANK2_EOP                   ((uint32_t)0x80001000)  /*!< End of FLASH BANK2 Operation Interrupt source */

#define FLASH_IT_BANK1_ERROR                 FLASH_IT_ERROR          /*!< FPEC BANK1 error interrupt source */
#define FLASH_IT_BANK1_EOP                   FLASH_IT_EOP            /*!< End of FLASH BANK1 Operation Interrupt source */

#define FLASH_IT_ERROR                 ((uint32_t)0x00000400)  /*!< FPEC BANK1 error interrupt source */
#define FLASH_IT_EOP                   ((uint32_t)0x00001000)  /*!< End of FLASH BANK1 Operation Interrupt source */
#define IS_FLASH_IT(IT) ((((IT) & (uint32_t)0x7FFFEBFF) == 0x00000000) && (((IT) != 0x00000000)))
#else
#define FLASH_IT_ERROR                 ((uint32_t)0x00000400)  /*!< FPEC error interrupt source */
#define FLASH_IT_EOP                   ((uint32_t)0x00001000)  /*!< End of FLASH Operation Interrupt source */
#define FLASH_IT_BANK1_ERROR           FLASH_IT_ERROR          /*!< FPEC BANK1 error interrupt source */
#define FLASH_IT_BANK1_EOP             FLASH_IT_EOP            /*!< End of FLASH BANK1 Operation Interrupt source */

#define IS_FLASH_IT(IT) ((((IT) & (uint32_t)0xFFFFEBFF) == 0x00000000) && (((IT) != 0x00000000)))
#endif

/**
  * @}
  */

/** @defgroup FLASH_Flags
  * @{
  */
#ifdef STM32F10X_XL
#define FLASH_FLAG_BANK2_BSY                 ((uint32_t)0x80000001)  /*!< FLASH BANK2 Busy flag */
#define FLASH_FLAG_BANK2_EOP                 ((uint32_t)0x80000020)  /*!< FLASH BANK2 End of Operation flag */
#define FLASH_FLAG_BANK2_PGERR               ((uint32_t)0x80000004)  /*!< FLASH BANK2 Program error flag */
#define FLASH_FLAG_BANK2_WRPRTERR            ((uint32_t)0x80000010)  /*!< FLASH BANK2 Write protected error flag */

#define FLASH_FLAG_BANK1_BSY                 FLASH_FLAG_BSY       /*!< FLASH BANK1 Busy flag*/
#define FLASH_FLAG_BANK1_EOP                 FLASH_FLAG_EOP       /*!< FLASH BANK1 End of Operation flag */
#define FLASH_FLAG_BANK1_PGERR               FLASH_FLAG_PGERR     /*!< FLASH BANK1 Program error flag */
#define FLASH_FLAG_BANK1_WRPRTERR            FLASH_FLAG_WRPRTERR  /*!< FLASH BANK1 Write protected error flag */

#define FLASH_FLAG_BSY                 ((uint32_t)0x00000001)  /*!< FLASH Busy flag */
#define FLASH_FLAG_EOP                 ((uint32_t)0x00000020)  /*!< FLASH End of Operation flag */
#define FLASH_FLAG_PGERR               ((uint32_t)0x00000004)  /*!< FLASH Program error flag */
#define FLASH_FLAG_WRPRTERR            ((uint32_t)0x00000010)  /*!< FLASH Write protected error flag */
#define FLASH_FLAG_OPTERR              ((uint32_t)0x00000001)  /*!< FLASH Option Byte error flag */

#define IS_FLASH_CLEAR_FLAG(FLAG) ((((FLAG) & (uint32_t)0x7FFFFFCA) == 0x00000000) && ((FLAG) != 0x00000000))
#define IS_FLASH_GET_FLAG(FLAG)  (((FLAG) == FLASH_FLAG_BSY) || ((FLAG) == FLASH_FLAG_EOP) || \
                                  ((FLAG) == FLASH_FLAG_PGERR) || ((FLAG) == FLASH_FLAG_WRPRTERR) || \
                                  ((FLAG) == FLASH_FLAG_OPTERR)|| \
                                  ((FLAG) == FLASH_FLAG_BANK1_BSY) || ((FLAG) == FLASH_FLAG_BANK1_EOP) || \
                                  ((FLAG) == FLASH_FLAG_BANK1_PGERR) || ((FLAG) == FLASH_FLAG_BANK1_WRPRTERR) || \
                                  ((FLAG) == FLASH_FLAG_BANK2_BSY) || ((FLAG) == FLASH_FLAG_BANK2_EOP) || \
                                  ((FLAG) == FLASH_FLAG_BANK2_PGERR) || ((FLAG) == FLASH_FLAG_BANK2_WRPRTERR))
#else
#define FLASH_FLAG_BSY                 ((uint32_t)0x00000001)  /*!< FLASH Busy flag */
#define FLASH_FLAG_EOP                 ((uint32_t)0x00000020)  /*!< FLASH End of Operation flag */
#define FLASH_FLAG_PGERR               ((uint32_t)0x00000004)  /*!< FLASH Program error flag */
#define FLASH_FLAG_WRPRTERR            ((uint32_t)0x00000010)  /*!< FLASH Write protected error flag */
#define FLASH_FLAG_OPTERR              ((uint32_t)0x00000001)  /*!< FLASH Option Byte error flag */

#define FLASH_FLAG_BANK1_BSY                 FLASH_FLAG_BSY       /*!< FLASH BANK1 Busy flag*/
#define FLASH_FLAG_BANK1_EOP                 FLASH_FLAG_EOP       /*!< FLASH BANK1 End of Operation flag */
#define FLASH_FLAG_BANK1_PGERR               FLASH_FLAG_PGERR     /*!< FLASH BANK1 Program error flag */
#define FLASH_FLAG_BANK1_WRPRTERR            FLASH_FLAG_WRPRTERR  /*!< FLASH BANK1 Write protected error flag */

#define IS_FLASH_CLEAR_FLAG(FLAG) ((((FLAG) & (uint32_t)0xFFFFFFCA) == 0x00000000) && ((FLAG) != 0x00000000))
#define IS_FLASH_GET_FLAG(FLAG)  (((FLAG) == FLASH_FLAG_BSY) || ((FLAG) == FLASH_FLAG_EOP) || \
                                  ((FLAG) == FLASH_FLAG_PGERR) || ((FLAG) == FLASH_FLAG_WRPRTERR) || \
								  ((FLAG) == FLASH_FLAG_BANK1_BSY) || ((FLAG) == FLASH_FLAG_BANK1_EOP) || \
                                  ((FLAG) == FLASH_FLAG_BANK1_PGERR) || ((FLAG) == FLASH_FLAG_BANK1_WRPRTERR) || \
                                  ((FLAG) == FLASH_FLAG_OPTERR))
#endif

/**
  * @}
  */

/**
  * @}
  */

/** @defgroup FLASH_Exported_Macros
  * @{
  */

/**
  * @}
  */

/** @defgroup FLASH_Exported_Functions
  * @{
  */

/*------------ Functions used for all STM32F10x devices -----*/
void FLASH_SetLatency(uint32_t FLASH_Latency);
void FLASH_HalfCycleAccessCmd(uint32_t FLASH_HalfCycleAccess);
void FLASH_PrefetchBufferCmd(uint32_t FLASH_PrefetchBuffer);
void FLASH_Unlock(void);
void FLASH_Lock(void);
FLASH_Status FLASH_ErasePage(uint32_t Page_Address);
FLASH_Status FLASH_EraseAllPages(void);
FLASH_Status FLASH_EraseOptionBytes(void);
FLASH_Status FLASH_ProgramWord(uint32_t Address, uint32_t Data);
FLASH_Status FLASH_ProgramHalfWord(uint32_t Address, uint16_t Data);
FLASH_Status FLASH_ProgramOptionByteData(uint32_t Address, uint8_t Data);
FLASH_Status FLASH_EnableWriteProtection(uint32_t FLASH_Pages);
FLASH_Status FLASH_ReadOutProtection(FunctionalState NewState);
FLASH_Status FLASH_UserOptionByteConfig(uint16_t OB_IWDG, uint16_t OB_STOP, uint16_t OB_STDBY);
uint32_t FLASH_GetUserOptionByte(void);
uint32_t FLASH_GetWriteProtectionOptionByte(void);
FlagStatus FLASH_GetReadOutProtectionStatus(void);
FlagStatus FLASH_GetPrefetchBufferStatus(void);
void FLASH_ITConfig(uint32_t FLASH_IT, FunctionalState NewState);
FlagStatus FLASH_GetFlagStatus(uint32_t FLASH_FLAG);
void FLASH_ClearFlag(uint32_t FLASH_FLAG);
FLASH_Status FLASH_GetStatus(void);
FLASH_Status FLASH_WaitForLastOperation(uint32_t Timeout);

/*------------ New function used for all STM32F10x devices -----*/
void FLASH_UnlockBank1(void);
void FLASH_LockBank1(void);
FLASH_Status FLASH_EraseAllBank1Pages(void);
FLASH_Status FLASH_GetBank1Status(void);
FLASH_Status FLASH_WaitForLastBank1Operation(uint32_t Timeout);

#ifdef STM32F10X_XL
/*---- New Functions used only with STM32F10x_XL density devices -----*/
void FLASH_UnlockBank2(void);
void FLASH_LockBank2(void);
FLASH_Status FLASH_EraseAllBank2Pages(void);
FLASH_Status FLASH_GetBank2Status(void);
FLASH_Status FLASH_WaitForLastBank2Operation(uint32_t Timeout);
FLASH_Status FLASH_BootConfig(uint16_t FLASH_BOOT);
#endif

#ifdef __cplusplus
}
#endif

#endif /* __STM32F10x_FLASH_H */
/**
  * @}
  */

/**
  * @}
  */

/**
  * @}
  */

/******************* (C) COPYRIGHT 2011 STMicroelectronics *****END OF FILE****/


text:
define(
['aloha/jquery', 'aloha/contenthandlermanager', 'block/blockmanager'],
function(jQuery, ContentHandlerManager, BlockManager) {

	/**
	 * @name block.BlockContentHandler
	 * @class Special block content handler
	 *
	 * The blog content handler handles pasting of blocks in editables. Pasted
	 * block markup will be replaced by a newly created block instance.
	 */
	var BlockContentHandler = ContentHandlerManager.createHandler(
	/** @lends block.BlockContentHandler */
	{
		/**
		 * Handle the pasting. Remove all unwanted stuff.
		 *
		 * There are two main cases which we need to distinguish:
		 * 1) Aloha Blocks are selected, and crtl+c is pressed then. In this case, *only the block* is copied / pasted.
		 * 2) Text is selected, but the selection also spans an aloha block.
		 *
		 * Generally, case 2) seems to work without bigger problems in Webkit / Firefox, while
		 * case 1) results in very much undesired and inconsistent behavior. If 1) happens,
		 * the property "data-aloha-block-copy-only-block" is set to "true"; so we can kick in and
		 * do additional cleanups.
		 * @param {jQuery} content
		 */
		handleContent: function( content ) {
			if ( typeof content === 'string' ){
				content = jQuery( '
' + content + '
' );
			} else if ( content instanceof jQuery ) {
				content = jQuery( '
' ).append(content);
			}

			if (content.find('.aloha-block[data-aloha-block-copy-only-block="true"]').length > 0) {
				// We are in case 1; so some more cleanup is needed (at least in webkit and firefox).

				// Webkit seems to *duplicate* the block when copying. The duplicated
				// block has *no ID property* set, that's how we can find and discard it.
				// Very ugly!
				content.find('.aloha-block:not([id])').remove();
				// Further cleanup for Webkit, removing empty nodes. Quite hacky!
				content.find('.aloha-block + span:empty').remove();
				content.find('div:empty').remove();
				// (another) Hack for Webkit, removing superfluous BR
				content.find('br.Apple-interchange-newline').remove();

				// Firefox adds a
 directly before the .aloha-block...
				content.find('.aloha-block').prev('br').remove();

				// Chrome (at least) sometimes adds an empty
 inside an (otherwise empty) span
				content.find('div > br:only-child').parent().remove();

			}

			content.find('.aloha-block').each(function() {
				var oldBlock = jQuery(this);

				var elementAttributes = {}; // all attributes except data-*
				var blockAttributes = {}; // all data* attributes
				jQuery.each(oldBlock[0].attributes, function(k, v) {
					if (v.nodeName === 'id') return;

					if (v.nodeName.match(/^data-/)) {
						blockAttributes[v.nodeName.substr(5)] = v.nodeValue;
					} else {
						elementAttributes[v.nodeName] = v.nodeValue;
					}
				});

				var newBlockId = GENTICS.Utils.guid();

				var newBlock = jQuery('<' + this.tagName + '/>')
					.attr(elementAttributes)
					.attr('id', newBlockId)
					.removeClass('aloha-block-active')
					.removeClass('aloha-block')
					.html(oldBlock.html());

				oldBlock.replaceWith(newBlock);

				// We need to blockify the contents with a timeout, as we need the connected DOM node for it.
				window.setTimeout(function() {
					BlockManager._blockify(jQuery('#' + newBlockId), blockAttributes);
				}, 50);
			});

			return content.html();
		}
	});
	return BlockContentHandler;
});


text:
<?php

namespace CotaPreco\Cielo\Serialization\Request;

use CotaPreco\Cielo\RequestInterface;

/**
 * @author Andrey K. Vital <andreykvital@gmail.com>
 */
interface SerializerInterface
{
    /**
     * @param  RequestInterface $request
     * @return bool
     */
    public function canSerialize(RequestInterface $request);

    /**
     * @param  RequestInterface $request
     * @return string
     */
    public function __invoke(RequestInterface $request);
}


text:
'use strict';

var MobProxy = require('./mobproxy'),
    url = require('url');

var nullProxy = {
    launchProcess: function(cb) { cb(); },
    stopProcess: function(cb) { cb(); },
    openProxy: function(cb) { cb(); },
    closeProxy: function(cb) { cb(); },
    clearDNS: function(cb) { cb(); },
    newPage: function(name, cb) { cb(); },
    saveHar: function(filename, data, cb) { cb(); },
    getProxyUrl: function() { return undefined; }
};

function setupMobProxyDefaults(options) {
    options.proxySleepBeforeStart = options.proxySleepBeforeStart || 15000;

    // proxy port is set up when proxy is just about to launch
    options.proxy = 'localhost:' + options.mobProxyPort;

    if (options.connection) {
        if (options.connection === 'mobile3g') {
            options.connectionRaw = {
                downstreamKbps: 1600,
                upstreamKbps: 768,
                latency: 300
            };
        } else if (options.connection === 'mobile3gfast') {
            options.connectionRaw = {
                downstreamKbps: 1600,
                upstreamKbps: 768,
                latency: 150
            };
        } else if (options.connection === 'mobile3gslow') {
            options.connectionRaw = {
                downstreamKbps: 780,
                upstreamKbps: 330,
                latency: 200
            };
        }  if (options.connection === 'mobile2g') {
           options.connectionRaw = {
               downstreamKbps: 35,
               upstreamKbps: 32,
               latency: 1300
           };
       } else if (options.connection === 'cable') {
            options.connectionRaw = {
                downstreamKbps: 5000,
                upstreamKbps: 1000,
                latency: 28
            };
        }
    }
}

var createProxy = function(options) {
    var useProxy = options.useProxy;

    if (useProxy && typeof useProxy === 'string' && useProxy !== 'true') {
        return nullProxy;
    }

    setupMobProxyDefaults(options);

    return new MobProxy({
        port: options.mobProxyPort,
        proxyPort: options.proxyPort,
        domain: url.parse(options.url).hostname,
        headers: options.headers,
        basicAuth: options.basicAuth,
        limit: options.connectionRaw,
        proxySleepBeforeStart: options.proxySleepBeforeStart,
        logDir: options.logDir,
        silent: options.silent
    });
};

module.exports.createProxy = createProxy;


text:
package com.hazelcast.internal.crdt;

import org.junit.Before;
import org.junit.Test;

import java.lang.reflect.Constructor;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.Random;

import static org.junit.Assert.assertArrayEquals;

public abstract class AbstractCRDTPropertyTest<C extends CRDT<C>, H, S> {

    private final Random random = new Random();
    private int numCounters;

    @Before
    public void init() {
        this.numCounters = 2 + random.nextInt(3);
    }

    @Test
    public void strongEventualConsistency() {
        final int rounds = 1000;
        for (int i = 0; i < rounds; i++) {
            final int operationCount = 50 + random.nextInt(50);
            final List<C> crdts = setupCRDTs(numCounters);
            final H state = getStateHolder();
            final Operation<C, H>[] operations = generateOperations(operationCount);

            for (Operation<C, H> operation : operations) {
                operation.perform(crdts, state);
            }
            mergeAll(crdts);
            assertState(crdts, state, numCounters, operations);
        }
    }

    @SuppressWarnings("unchecked")
    private Operation<C, H>[] generateOperations(int operationCount) {
        final List<Class<? extends Operation<C, H>>> operationClasses = getOperationClasses();
        final int size = random.nextInt(operationCount);
        final Operation[] operations = new Operation[size];
        for (int i = 0; i < size; i++) {
            if (random.nextDouble() < 0.1) {
                operations[i] = new MergingOperation(random);
            } else {
                try {
                    final Class operationClass = operationClasses.get(random.nextInt(operationClasses.size()));
                    final Constructor<Operation> c = operationClass.getConstructor(Random.class);
                    operations[i] = c.newInstance(random);
                } catch (Exception e) {
                    throw new RuntimeException("Error instantiating the operation ", e);
                }
            }
        }

        return operations;
    }

    protected abstract List<Class<? extends Operation<C, H>>> getOperationClasses();

    protected abstract C getCRDT();

    protected abstract H getStateHolder();

    protected abstract S getStateValue(C t);

    protected abstract S getStateValue(H t);

    protected void assertState(List<C> crdts, H stateHolder, int counterCount, Operation<C, H>[] operations) {
        final Object[] actuals = new Object[crdts.size()];
        final Object[] expecteds = new Object[crdts.size()];
        for (int i = 0; i < crdts.size(); i++) {
            actuals[i] = getStateValue(crdts.get(i));
            expecteds[i] = getStateValue(stateHolder);
        }
        assertArrayEquals("States differ for " + counterCount + " with operations " + Arrays.toString(operations),
                expecteds, actuals);
    }

    private List<C> setupCRDTs(int size) {
        final List<C> counters = new ArrayList<C>(size);
        for (int i = 0; i < size; i++) {
            counters.add(getCRDT());
        }
        return counters;
    }

    private void mergeAll(List<C> crdts) {
        for (C c1 : crdts) {
            for (C c2 : crdts) {
                if (c1 != c2) {
                    c1.merge(c2);
                }
            }
        }
    }
}


text:
<?php

namespace Nutritionist\UserBundle\Entity;

use Doctrine\ORM\Mapping as ORM;

/**
 * Profile
 *
 * @ORM\Table()
 * @ORM\Entity(repositoryClass="Nutritionist\UserBundle\Entity\ProfileRepository")
 */
class Profile
{
    /**
     * @var integer
     *
     * @ORM\Column(name="id", type="integer")
     * @ORM\Id
     * @ORM\GeneratedValue(strategy="AUTO")
     */
    private $id;

    /**
     * @ORM\OneToOne(targetEntity="User", mappedBy="profile")
     **/
    private $user;

    /**
     * @var string
     * @ORM\Column(name="name", type="string")
     */
    private $name;

    /**
     * @var string
     * @ORM\Column(name="surname", type="string")
     */
    private $surname;

    /**
     * @var string
     * @ORM\Column(name="gender ", type="string",length=10)
     */
    private $gender;

    /**
     * @var date
     * @ORM\Column(name="birthdate", type="date")
     */
    private $birthdate;

    /**
     * @var string
     * @ORM\Column(name="height", type="integer",length=3)
     */
    private $height;

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

    /**
     * Set name
     *
     * @param string $name
     * @return Profile
     */
    public function setName($name)
    {
        $this->name = $name;

        return $this;
    }

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

    /**
     * Set surname
     *
     * @param string $surname
     * @return Profile
     */
    public function setSurname($surname)
    {
        $this->surname = $surname;

        return $this;
    }

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

    /**
     * Set gender
     *
     * @param string $gender
     * @return Profile
     */
    public function setGender($gender)
    {
        $this->gender = $gender;

        return $this;
    }

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

    /**
     * Set birthdate
     *
     * @param \DateTime $birthdate
     * @return Profile
     */
    public function setBirthdate($birthdate)
    {
        $this->birthdate = $birthdate;

        return $this;
    }

    /**
     * Get birthdate
     *
     * @return \DateTime
     */
    public function getBirthdate()
    {
        return $this->birthdate;
    }

    /**
     * Set height
     *
     * @param integer $height
     * @return Profile
     */
    public function setHeight($height)
    {
        $this->height = $height;

        return $this;
    }

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

    /**
     * Set user
     *
     * @param \Nutritionist\UserBundle\Entity\User $user
     * @return Profile
     */
    public function setUser(\Nutritionist\UserBundle\Entity\User $user = null)
    {
        $this->user = $user;

        return $this;
    }

    /**
     * Get user
     *
     * @return \Nutritionist\UserBundle\Entity\User
     */
    public function getUser()
    {
        return $this->user;
    }
}


text:
/* Based on
 *
       SUBROUTINE DORMRZ( SIDE, TRANS, M, N, K, L, A, LDA, TAU, C, LDC,
      $                   WORK, LWORK, INFO )
 *
 *  -- LAPACK routine (version 3.3.1) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
 *  -- April 2011                                                      --
 */

#ifndef FLENS_LAPACK_IMPL_ORMRZ_H
#define FLENS_LAPACK_IMPL_ORMRZ_H 1

#include <flens/matrixtypes/matrixtypes.h>
#include <flens/vectortypes/vectortypes.h>

namespace flens { namespace lapack {

//== ormrz =====================================================================
//
//  Real variant
//
template <typename IndexType, typename MA, typename VTAU, typename MC,
          typename VWORK>
    typename RestrictTo<IsInteger<IndexType>::value
                     && IsRealGeMatrix<MA>::value
                     && IsRealDenseVector<VTAU>::value
                     && IsRealGeMatrix<MC>::value
                     && IsRealDenseVector<VWORK>::value,
             void>::Type
    ormrz(Side          side,
          Transpose     transpose,
          IndexType     l,
          MA            &&A,
          const VTAU    &tau,
          MC            &&C,
          VWORK         &&work);

} } // namespace lapack, flens

#endif // FLENS_LAPACK_IMPL_ORMRZ_H


text:
class MockDB(object):
    """Emulate database via file read/write."""
    pass


text:
class RenderViewHost;
struct WebMenuItem;

class PopupMenuHelper : public content::NotificationObserver {
 public:
  // Creates a PopupMenuHelper that will notify |render_view_host| when a user
  // selects or cancels the popup.
  explicit PopupMenuHelper(RenderViewHost* render_view_host);

  // Shows the popup menu and notifies the RenderViewHost of the selection/
  // cancel.
  // This call is blocking.
  void ShowPopupMenu(const gfx::Rect& bounds,
                     int item_height,
                     double item_font_size,
                     int selected_item,
                     const std::vector<WebMenuItem>& items,
                     bool right_aligned,
                     bool multiple);

 private:
  // content::NotificationObserver implementation:
  virtual void Observe(int type,
                       const content::NotificationSource& source,
                       const content::NotificationDetails& details) OVERRIDE;

  content::NotificationRegistrar notification_registrar_;

  RenderViewHost* render_view_host_;

  DISALLOW_COPY_AND_ASSIGN(PopupMenuHelper);
};

#endif  // CONTENT_BROWSER_TAB_CONTENTS_POPUP_MENU_HELPER_MAC_H_


text:
ACCEPTED

#### According to
Index Fungorum

#### Published in
null

#### Original name
Fermentolunospora polyblastis anon.

### Remarks
null


text:
require 'coveralls'
require 'echowrap'
require 'rspec'
require 'timecop'
require 'webmock/rspec'

Coveralls.wear!

RSpec.configure do |config|
  config.expect_with :rspec do |c|
    c.syntax = :expect
  end
end

def new_test_client
  client = Echowrap::Client.new(:api_key => "AK")
  #Param encoder is being set here because webmock expects params encodeded a certain way
  #Normally, you won't set this option, it's already configured for Echowrap in lib/echowrap/default.rb
  client.connection_options[:request][:params_encoder] = Faraday::NestedParamsEncoder
  client
end

def a_get(path, add_api_key = true)
  a_request(:get, Echowrap::Default::ENDPOINT + path + api_key(add_api_key))
end

def a_post(path)
  a_request(:post, Echowrap::Default::ENDPOINT + path)
end

def stub_get(path, add_api_key = true)
  stub_http_request(:get, Echowrap::Default::ENDPOINT + path + api_key(add_api_key))
end

def stub_post(path)
  stub_request(:post, Echowrap::Default::ENDPOINT + path)
end

def api_key(add_api_key = true)
  add_api_key ? '?api_key=AK' : ''
end

def fixture_path
  File.expand_path("../fixtures", __FILE__)
end

def fixture(file)
  File.new(fixture_path + '/' + file)
end


text:
package com.google.template.soy.basicfunctions;

import static com.google.common.truth.Truth.assertThat;
import static com.google.template.soy.data.restricted.BooleanData.FALSE;
import static com.google.template.soy.data.restricted.BooleanData.TRUE;
import static com.google.template.soy.jbcsrc.restricted.testing.ExpressionTester.assertThatExpression;

import com.google.common.collect.ImmutableList;
import com.google.template.soy.data.SoyValue;
import com.google.template.soy.data.restricted.IntegerData;
import com.google.template.soy.data.restricted.NullData;
import com.google.template.soy.data.restricted.StringData;
import com.google.template.soy.data.restricted.UndefinedData;
import com.google.template.soy.exprtree.Operator;
import com.google.template.soy.jbcsrc.restricted.BytecodeUtils;
import com.google.template.soy.jbcsrc.restricted.SoyExpression;
import com.google.template.soy.jssrc.restricted.JsExpr;
import com.google.template.soy.pysrc.restricted.PyExpr;
import com.google.template.soy.pysrc.restricted.PyExprUtils;
import com.google.template.soy.types.UnknownType;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.runners.JUnit4;

/** Tests for {@link IsNullFunction}. */
@RunWith(JUnit4.class)
public final class IsNullFunctionTest {

  private static final IsNullFunction IS_NULL = new IsNullFunction();

  @Test
  public void testComputeForJava() {
    assertThat(IS_NULL.computeForJava(ImmutableList.<SoyValue>of(UndefinedData.INSTANCE)))
        .isEqualTo(TRUE);
    assertThat(IS_NULL.computeForJava(ImmutableList.<SoyValue>of(NullData.INSTANCE)))
        .isEqualTo(TRUE);
    assertThat(IS_NULL.computeForJava(ImmutableList.<SoyValue>of(IntegerData.forValue(0))))
        .isEqualTo(FALSE);
    assertThat(IS_NULL.computeForJava(ImmutableList.<SoyValue>of(StringData.forValue(""))))
        .isEqualTo(FALSE);
  }

  @Test
  public void testComputeForJbcSrc() {
    assertThatExpression(
            IS_NULL.computeForJbcSrc(
                /*context=*/ null,
                ImmutableList.of(
                    SoyExpression.forSoyValue(
                        UnknownType.getInstance(),
                        BytecodeUtils.constantNull(BytecodeUtils.SOY_VALUE_TYPE)))))
        .evaluatesTo(true);
    assertThatExpression(
            IS_NULL.computeForJbcSrc(
                /*context=*/ null,
                ImmutableList.of(SoyExpression.forInt(BytecodeUtils.constant(1L)).box())))
        .evaluatesTo(false);
  }

  @Test
  public void testComputeForJsSrc() {
    JsExpr expr = new JsExpr("JS_CODE", Integer.MAX_VALUE);
    assertThat(IS_NULL.computeForJsSrc(ImmutableList.of(expr)))
        .isEqualTo(new JsExpr("JS_CODE == null", Operator.EQUAL.getPrecedence()));
  }

  @Test
  public void testComputeForPySrc() {
    PyExpr expr = new PyExpr("PY_CODE", Integer.MAX_VALUE);
    assertThat(IS_NULL.computeForPySrc(ImmutableList.of(expr)))
        .isEqualTo(
            new PyExpr("PY_CODE is None", PyExprUtils.pyPrecedenceForOperator(Operator.EQUAL)));
  }
}


text:
..  BSD LICENSE
    Copyright(c) 2010-2014 Intel Corporation. All rights reserved.
    All rights reserved.

    Redistribution and use in source and binary forms, with or without
    modification, are permitted provided that the following conditions
    are met:

    * Redistributions of source code must retain the above copyright
    notice, this list of conditions and the following disclaimer.
    * Redistributions in binary form must reproduce the above copyright
    notice, this list of conditions and the following disclaimer in
    the documentation and/or other materials provided with the
    distribution.
    * Neither the name of Intel Corporation nor the names of its
    contributors may be used to endorse or promote products derived
    from this software without specific prior written permission.

    THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
    "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
    LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
    A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
    OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
    SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
    LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
    DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
    THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
    (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
    OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

Programmer's Guide
==================

.. toctree::
    :maxdepth: 3
    :numbered:

    intro
    overview
    env_abstraction_layer
    ring_lib
    mempool_lib
    mbuf_lib
    poll_mode_drv
    ivshmem_lib
    link_bonding_poll_mode_drv_lib
    timer_lib
    hash_lib
    lpm_lib
    lpm6_lib
    packet_distrib_lib
    reorder_lib
    ip_fragment_reassembly_lib
    multi_proc_support
    kernel_nic_interface
    thread_safety_intel_dpdk_functions
    qos_framework
    power_man
    packet_classif_access_ctrl
    packet_framework
    vhost_lib
    port_hotplug_framework
    source_org
    dev_kit_build_system
    dev_kit_root_make_help
    extend_intel_dpdk
    build_app
    ext_app_lib_make_help
    perf_opt_guidelines
    writing_efficient_code
    profile_app
    glossary

**Figures**

:numref:`figure_architecture-overview` :ref:`figure_architecture-overview`

:numref:`figure_linuxapp_launch` :ref:`figure_linuxapp_launch`

:numref:`figure_malloc_heap` :ref:`figure_malloc_heap`

:numref:`figure_ring1` :ref:`figure_ring1`

:numref:`figure_ring-enqueue1` :ref:`figure_ring-enqueue1`

:numref:`figure_ring-enqueue2` :ref:`figure_ring-enqueue2`

:numref:`figure_ring-enqueue3` :ref:`figure_ring-enqueue3`

:numref:`figure_ring-dequeue1` :ref:`figure_ring-dequeue1`

:numref:`figure_ring-dequeue2` :ref:`figure_ring-dequeue2`

:numref:`figure_ring-dequeue3` :ref:`figure_ring-dequeue3`

:numref:`figure_ring-mp-enqueue1` :ref:`figure_ring-mp-enqueue1`

:numref:`figure_ring-mp-enqueue2` :ref:`figure_ring-mp-enqueue2`

:numref:`figure_ring-mp-enqueue3` :ref:`figure_ring-mp-enqueue3`

:numref:`figure_ring-mp-enqueue4` :ref:`figure_ring-mp-enqueue4`

:numref:`figure_ring-mp-enqueue5` :ref:`figure_ring-mp-enqueue5`

:numref:`figure_ring-modulo1` :ref:`figure_ring-modulo1`

:numref:`figure_ring-modulo2` :ref:`figure_ring-modulo2`

:numref:`figure_memory-management` :ref:`figure_memory-management`

:numref:`figure_memory-management2` :ref:`figure_memory-management2`

:numref:`figure_mempool` :ref:`figure_mempool`

:numref:`figure_mbuf1` :ref:`figure_mbuf1`

:numref:`figure_mbuf2` :ref:`figure_mbuf2`

:numref:`figure_multi_process_memory` :ref:`figure_multi_process_memory`

:numref:`figure_kernel_nic_intf` :ref:`figure_kernel_nic_intf`

:numref:`figure_pkt_flow_kni` :ref:`figure_pkt_flow_kni`

:numref:`figure_vhost_net_arch2` :ref:`figure_vhost_net_arch2`

:numref:`figure_kni_traffic_flow` :ref:`figure_kni_traffic_flow`

:numref:`figure_pkt_proc_pipeline_qos` :ref:`figure_pkt_proc_pipeline_qos`

:numref:`figure_hier_sched_blk` :ref:`figure_hier_sched_blk`

:numref:`figure_sched_hier_per_port` :ref:`figure_sched_hier_per_port`

:numref:`figure_data_struct_per_port` :ref:`figure_data_struct_per_port`

:numref:`figure_prefetch_pipeline` :ref:`figure_prefetch_pipeline`

:numref:`figure_pipe_prefetch_sm` :ref:`figure_pipe_prefetch_sm`

:numref:`figure_blk_diag_dropper` :ref:`figure_blk_diag_dropper`

:numref:`figure_flow_tru_droppper` :ref:`figure_flow_tru_droppper`

:numref:`figure_ex_data_flow_tru_dropper` :ref:`figure_ex_data_flow_tru_dropper`

:numref:`figure_pkt_drop_probability` :ref:`figure_pkt_drop_probability`

:numref:`figure_drop_probability_graph` :ref:`figure_drop_probability_graph`

:numref:`figure_figure32` :ref:`figure_figure32`

:numref:`figure_figure33` :ref:`figure_figure33`

:numref:`figure_figure34` :ref:`figure_figure34`

:numref:`figure_figure35` :ref:`figure_figure35`

:numref:`figure_figure37` :ref:`figure_figure37`

:numref:`figure_figure38` :ref:`figure_figure38`

:numref:`figure_figure39` :ref:`figure_figure39`

**Tables**

:numref:`table_qos_1` :ref:`table_qos_1`

:numref:`table_qos_2` :ref:`table_qos_2`

:numref:`table_qos_3` :ref:`table_qos_3`

:numref:`table_qos_4` :ref:`table_qos_4`

:numref:`table_qos_5` :ref:`table_qos_5`

:numref:`table_qos_6` :ref:`table_qos_6`

:numref:`table_qos_7` :ref:`table_qos_7`

:numref:`table_qos_8` :ref:`table_qos_8`

:numref:`table_qos_9` :ref:`table_qos_9`

:numref:`table_qos_10` :ref:`table_qos_10`

:numref:`table_qos_11` :ref:`table_qos_11`

:numref:`table_qos_12` :ref:`table_qos_12`

:numref:`table_qos_13` :ref:`table_qos_13`

:numref:`table_qos_14` :ref:`table_qos_14`

:numref:`table_qos_15` :ref:`table_qos_15`

:numref:`table_qos_16` :ref:`table_qos_16`

:numref:`table_qos_17` :ref:`table_qos_17`

:numref:`table_qos_18` :ref:`table_qos_18`

:numref:`table_qos_19` :ref:`table_qos_19`

:numref:`table_qos_20` :ref:`table_qos_20`

:numref:`table_qos_21` :ref:`table_qos_21`

:numref:`table_qos_22` :ref:`table_qos_22`

:numref:`table_qos_23` :ref:`table_qos_23`

:numref:`table_qos_24` :ref:`table_qos_24`

:numref:`table_qos_25` :ref:`table_qos_25`

:numref:`table_qos_26` :ref:`table_qos_26`

:numref:`table_qos_27` :ref:`table_qos_27`

:numref:`table_qos_28` :ref:`table_qos_28`

:numref:`table_qos_29` :ref:`table_qos_29`

:numref:`table_qos_30` :ref:`table_qos_30`

:numref:`table_qos_31` :ref:`table_qos_31`

:numref:`table_qos_32` :ref:`table_qos_32`

:numref:`table_qos_33` :ref:`table_qos_33`

:numref:`table_qos_34` :ref:`table_qos_34`

:numref:`table_hash_lib_1` :ref:`table_hash_lib_1`

:numref:`table_hash_lib_2` :ref:`table_hash_lib_2`


text:
package com.bukhmastov.cdoitmo.event.events;

import android.content.Intent;
import androidx.annotation.NonNull;

public class OpenIntentEvent {

    private final Intent intent;
    private String identity = null;

    public OpenIntentEvent(Intent intent) {
        this.intent = intent;
    }

    public OpenIntentEvent withIdentity(@NonNull String identity) {
        this.identity = identity;
        return this;
    }

    public Intent getIntent() {
        return intent;
    }

    public String getIdentity() {
        return identity;
    }

    public static class Failed {

        private final String identity;
        private final String reason;

        public Failed(String identity, String reason) {
            this.identity = identity;
            this.reason = reason;
        }

        public String getIdentity() {
            return identity;
        }

        public String getReason() {
            return reason;
        }
    }
}


text:
<head>
  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1">

  <title>{% if page.title %}{{ page.title }}{% else %}{{ site.title }}{% endif %}</title>
  <meta name="description" content="{% if page.excerpt %}{{ page.excerpt | strip_html | strip_newlines | truncate: 160 }}{% else %}{{ site.description }}{% endif %}">
  <link rel="canonical" href="{{ page.url | replace:'index.html','' | prepend: site.baseurl | prepend: site.url }}">

  <!-- Facebook Open Graph -->
  <meta property="og:title" content="Aleks Kamko">
  <meta property="og:site_name" content="Aleks Kamko">
  <meta property="og:image" content="{{ "/static/img/portrait.jpg" | prepend: site.url }}">
  <meta property="og:description" content="{{ site.description }}">
  <meta property="og:type" content="website">

  <!-- Facicons and Apple -->
  <link rel="apple-touch-icon-precomposed" href="{{ "static/ico/apple-touch-icon-precomposed.png" | prepend: site.baseurl }}">
  <link rel="shortcut icon" href="{{ "static/ico/favicon.png" | prepend: site.baseurl }}">

  <!-- Embedded Quattrocento Sans -->
  <style>{% include font.css %}</style>

  <!-- Stylesheet -->
  <style type="text/css">
    {% capture include_to_sassify %}{% include main.scss %}{% endcapture %}
    {{ include_to_sassify | scssify }}
  </style>

  <!-- no-js -->
  <script>document.documentElement.classList.remove('no-js');</script>
</head>


text:
package controls

import (
	"errors"
	"github.com/davecgh/go-spew/spew"
	"os"
	"reflect"
	"runtime"
	"testing"
	"time"
)

func initialize() (*TransientSwitch, *mockBackend) {
	swtch := CreateTransientSwitch(0, true, 100*time.Millisecond)
	backend := mockBackend{}
	swtch.setBackend(&backend)

	return swtch, &backend
}

func TestSetStateOnStart(t *testing.T) {
	swtch, backend := initialize()

	swtch.Start()
	defer swtch.Stop()

	time.Sleep(10 * time.Millisecond)

	if !backend.state {
		t.Error("backend should be toggled on after startup")
	}
}

func TestBrokenBackendOnStart(t *testing.T) {
	swtch, backend := initialize()

	backend.toggleError = errors.New("")

	if swtch.Start() == nil {
		t.Error("starting with a broken backend should fail")
	}

	swtch.Stop()
}

func TestResetToGroundState(t *testing.T) {
	swtch, backend := initialize()

	swtch.Start()
	defer swtch.Stop()

	swtch.Toggle(false)

	time.Sleep(50 * time.Millisecond)

	if backend.state {
		t.Error("switch state should be false after 50ms")
	}

	time.Sleep(100 * time.Millisecond)

	if !backend.state {
		t.Error("switch state should be true after 150ms")
	}
}

func TestBumpBeforeTimeout(t *testing.T) {
	swtch, backend := initialize()

	swtch.Start()
	defer swtch.Stop()

	swtch.Toggle(false)

	time.Sleep(50 * time.Millisecond)

	swtch.Toggle(false)

	time.Sleep(100 * time.Millisecond)

	if backend.state {
		t.Error("switch state should be false after 150ms")
	}

	time.Sleep(100 * time.Millisecond)

	if !backend.state {
		t.Error("switch state should be true after 100ms")
	}
}

func TestResetBeforeTimeout(t *testing.T) {
	swtch, backend := initialize()

	swtch.Start()
	defer swtch.Stop()

	swtch.Toggle(false)

	time.Sleep(50 * time.Millisecond)

	swtch.Toggle(true)
	time.Sleep(10 * time.Millisecond)

	backend.state = false

	time.Sleep(90 * time.Millisecond)

	if backend.state {
		t.Error("switch state should still be false after 150ms")
	}
}

func createMarshalled() MarshalledSwitch {
	marshalled := MarshalledSwitch{
		Id:           "foo",
		Type:         SwitchTypeTransient,
		Name:         "bar",
		BackendId:    "dummy",
		BackendIndex: 0,
	}

	marshalled.allocateTransientSwitch()

	*marshalled.GroundState = true
	*marshalled.State = true
	*marshalled.Timeout = "100ms"
	*marshalled.MillisecondsRemaining = 0

	return marshalled
}

func TestUnmarshalInvalid(t *testing.T) {
	m1 := createMarshalled()
	m1.Id = ""

	m2 := createMarshalled()
	*m2.Timeout = "gopher"

	m3 := createMarshalled()
	m3.Type = "gopher"

	m4 := createMarshalled()
	*m4.Timeout = "-10s"

	if _, err := m1.Unmarshal(); err == nil {
		t.Error("unmarshalling m1 should fail")
	}

	if _, err := m2.Unmarshal(); err == nil {
		t.Error("unmarshalling m2 should fail")
	}

	if _, err := m3.Unmarshal(); err == nil {
		t.Error("unmarshalling m3 should fail")
	}

	if _, err := m4.Unmarshal(); err == nil {
		t.Error("unmarshalling m4 should fail")
	}
}

func TestMarshal(t *testing.T) {
	reference := createMarshalled()
	swtch, backend := initialize()
	backend.id = "dummy"
	swtch.SetName("bar")
	swtch.setId("foo")

	swtch.Start()
	defer swtch.Stop()

	time.Sleep(10 * time.Millisecond)

	marshalled := swtch.Marshal()

	if !reflect.DeepEqual(reference, marshalled) {
		t.Errorf("serialization failed; expected: \n%s\n\ngot:\n\n%s",
			spew.Sprintf("%#v", reference), spew.Sprintf("%#v", marshalled))
	}
}

func TestUnmarshal(t *testing.T) {
	marshalled := createMarshalled()

	swtch, _ := initialize()
	swtch.SetName("bar")
	swtch.setId("foo")
	swtch.setBackend(nil)

	reference, err := marshalled.Unmarshal()

	if err != nil {
		t.Fatalf("unmarshalling failed with %v", err)
	}

	// reflect.DeepEqual will choke on the mutex, so we abuse spew for creating
	// a serialized representation
	referenceStringified := spew.Sprintf("%#v", reference)
	swtchStringified := spew.Sprintf("%#v", swtch)

	if referenceStringified != swtchStringified {
		t.Errorf("unmarshalling failed; expected: \n%s\n\ngot:\n\n%s",
			referenceStringified, swtchStringified)
	}
}

func drainChannel(c chan interface{}) (lastValue interface{}, count int) {
loop:
	for {
		select {
		case lastValue = <-c:

		default:
			break loop
		}

		count++
	}

	return
}

func TestSwitchUpdatedEvent(t *testing.T) {
	swtch, _ := initialize()

	eventChannel := make(chan interface{}, 10)
	swtch.setEventChannel(eventChannel)

	assert := func(evt interface{}) {
		e, ok := evt.(SwitchUpdatedEvent)

		if !ok {
			t.Fatal("invalid event --- should be a SwitchUpdatedEvent")
		}

		s, ok := e.Switch().(*TransientSwitch)

		if !ok {
			t.Fatal("invalid event --- should encapsulate a TransientSwitch")
		}

		if s != swtch {
			t.Fatal("wrong switch sent")
		}
	}

	swtch.Start()
	defer swtch.Stop()

	time.Sleep(10 * time.Millisecond)

	evt, count := drainChannel(eventChannel)

	if count != 1 {
		t.Fatalf("expected 1 event after start, got %d events", count)
	}

	assert(evt)

	swtch.Toggle(true)
	time.Sleep(10 * time.Millisecond)

	evt, count = drainChannel(eventChannel)

	if count != 1 {
		t.Fatalf("expected 1 event after toggle, got %d events", count)
	}

	assert(evt)
}

func TestMain(m *testing.M) {
	runtime.GOMAXPROCS(4)

	os.Exit(m.Run())
}


text:
@implementation HFYoutubeVideoDetailView

- (void) setYoutubeVideo:(YoutubeVideo *)youtubeVideo {
    self.titleLabel.text = youtubeVideo.title;
    self.descriptionLabel.text = youtubeVideo.videoDescription;
    self.viewsLabel.text = [NSString stringWithFormat:@"Views: %d",youtubeVideo.viewCount.integerValue];
    self.dateLabel.text = [youtubeVideo.uploadedDate relevantDateRepresentation];
    [self.thumbnailImageView setImageWithURL:[NSURL URLWithString:youtubeVideo.thumbnailURL]];
    _youtubeVideo = youtubeVideo;
    [self autoresize];
}

- (id) initWithCoder:(NSCoder *)aDecoder {
    if (self = [super initWithCoder:aDecoder]) {

    }
    return self;
}

//returns new frame from autoresize
- (void) autoresize {

    CGSize size = [self.descriptionLabel sizeThatFits:CGSizeMake(self.descriptionLabel.width, CGFLOAT_MAX)];
    self.descriptionLabel.height = size.height;// + self.descriptionLabel.fontSize * ([UIDevice isIPAD] ? 4 : 2);

    headerView.layer.shadowOffset = CGSizeMake(0, 2);
    headerView.layer.shadowOpacity = 0.5f;

    if (self.height < self.descriptionLabel.bottom)
        self.height = self.descriptionLabel.bottom;
}

- (void) layoutSubviews {
    [super layoutSubviews];

    [self autoresize];
}

@end


text:
set -e

tar -zxf dist/apache-skywalking-apm-bin.tar.gz -C dist

# List all modules(jars) that belong to the SkyWalking itself, these will be ignored
# when checking the dependency licenses
./mvnw --batch-mode -Pbackend -Dexec.executable='echo' -Dexec.args='${project.artifactId}-${project.version}.jar' exec:exec -q > self-modules.txt

ls dist/apache-skywalking-apm-bin/oap-libs > all-dependencies.txt

# Exclude all self modules(jars) to generate all third-party dependencies
grep -vf self-modules.txt all-dependencies.txt > third-party-dependencies.txt

# Compare the third-party dependencies with known dependencies, expect that
# all third-party dependencies are KNOWN and the exit code of the command is 0,
# otherwise we should add its license to LICENSE file and add the dependency to known-oap-backend-dependencies.txt.
# Unify the `sort` behaviour: here we'll sort them again in case that the behaviour of `sort` command in target OS is different from what we
# used to sort the file `known-oap-backend-dependencies.txt`,
# i.e. "sort the two file using the same command (and default arguments)"
diff -w -B -U0 <(cat tools/dependencies/known-oap-backend-dependencies.txt | sort) <(cat third-party-dependencies.txt | sort)


text:
package com.minelittlepony.client.model.part;

import net.minecraft.client.model.ModelPart;
import net.minecraft.client.render.VertexConsumer;
import net.minecraft.client.util.math.MatrixStack;

import com.minelittlepony.api.model.IPart;
import com.minelittlepony.api.pony.meta.Gender;
import com.minelittlepony.client.MineLittlePony;
import com.minelittlepony.mson.api.ModelContext;
import com.minelittlepony.mson.api.MsonModel;
import com.minelittlepony.mson.api.model.PartBuilder;

import java.util.UUID;

public class PonySnout implements IPart, MsonModel {

    private boolean visible = false;

    private ModelPart mare;
    private ModelPart stallion;

    public PonySnout(ModelPart tree) {

    }

    @Override
    public void init(ModelContext context) {
        mare = context.findByName("mare");
        stallion = context.findByName("stallion");

        PartBuilder head = context.getContext();
        head.addChild("mare", mare);
        head.addChild("stallion", stallion);
    }

    public void rotate(float x, float y, float z) {
        mare.setAngles(x, y, z);
        stallion.setAngles(x, y, z);
    }

    @Override
    public void renderPart(MatrixStack stack, VertexConsumer vertices, int overlayUv, int lightUv, float red, float green, float blue, float alpha, UUID interpolatorId) {
        mare.render(stack, vertices, lightUv, overlayUv, red, green, blue, alpha);
    }

    @Override
    public void setVisible(boolean visible) {
        this.visible = visible;
    }

    public void setGender(Gender gender) {
        boolean show = visible && MineLittlePony.getInstance().getConfig().snuzzles.get();

        mare.visible = (show && gender.isMare());
        stallion.visible = (show && gender.isStallion());
    }
}


text:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Web.Mvc;
using SusuCMS.Data.Enums;
using SusuCMS.Data;

namespace SusuCMS.Web.Admin.Controllers
{
    [AdminAuthorize(Permission.Pages)]
    public class LabelController : AdminControllerBase
    {
        public ActionResult Index(string labelType, int? relativeId)
        {
            var type = LabelType.SiteLabel;
            Enum.TryParse<LabelType>(labelType, out type);

            ViewBag.LabelType = type;

            IQueryable<Label> list = null;
            switch (type)
            {
                case LabelType.SiteLabel:
                    list = DataContext.SiteLabels.WithSiteId(CurrentSiteId);
                    break;
                case LabelType.PageLabel:
                    if (relativeId.HasValue)
                    {
                        list = DataContext.PageLabels.Where(i => i.Page.SiteId == CurrentSiteId && i.PageId == relativeId.Value);
                    }
                    else
                    {
                        list = DataContext.PageLabels.Where(i => i.Page.SiteId == CurrentSiteId);
                    }
                    break;
                case LabelType.WidgetLabel:
                    if (relativeId.HasValue)
                    {
                        list = DataContext.WidgetLabels.Where(i => i.Widget.SiteId == CurrentSiteId && i.WidgetId == relativeId.Value);
                    }
                    else
                    {
                        list = DataContext.WidgetLabels.Where(i => i.Widget.SiteId == CurrentSiteId);
                    }
                    break;
            }

            return View(list);
        }

        public ActionResult Edit(LabelType labelType, int id)
        {
            var label = FindLabel(labelType, id);
            if (label == null)
            {
                return HttpNotFound();
            }

            return View(label);
        }

        [HttpPost, ValidateInput(false), ValidateAntiForgeryToken]
        public ActionResult Edit(LabelType labelType, int id, FormCollection collection)
        {
            var label = FindLabel(labelType, id);
            TryUpdateModel(label, new[] { "Value" });

            if (ModelState.IsValid)
            {
                try
                {
                    SaveChanges();
                }
                catch
                {
                    return Json(new { IsSuccess = false, Message = MessageResource.UpdateFailed });
                }
            }

            return Json(new { IsSuccess = true, Message = MessageResource.UpdateSuccess });
        }

        [HttpPost, ValidateAntiForgeryToken]
        public ActionResult Delete(LabelType labelType2, int id)
        {
            try
            {
                var label = FindLabel(labelType2, id);
                DataContext.Delete(label);
                SaveChanges();

                ShowSuccess(MessageResource.DeleteSuccess);
            }
            catch
            {
                ShowError(MessageResource.DeleteFailed);
            }

            return RedirectToIndex();
        }

        private Label FindLabel(LabelType labelType, int id)
        {
            Label label = null;
            switch (labelType)
            {
                case LabelType.SiteLabel:
                    label = DataContext.SiteLabels.WithSiteId(CurrentSiteId).FirstOrDefault(i => i.Id == id);
                    break;
                case LabelType.PageLabel:
                    label = DataContext.PageLabels.FirstOrDefault(i => i.Id == id && i.Page.SiteId == CurrentSiteId);
                    break;
                case LabelType.WidgetLabel:
                    label = DataContext.WidgetLabels.FirstOrDefault(i => i.Id == id && i.Widget.SiteId == CurrentSiteId);
                    break;
            }

            return label;
        }
    }
}


text:
.class public abstract Ljava/net/CookieHandler;
.super Ljava/lang/Object;
.source "CookieHandler.java"

# static fields
.field private static systemWideCookieHandler:Ljava/net/CookieHandler;

# direct methods
.method public constructor <init>()V
    .locals 0

    .prologue
    .line 26
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    return-void
.end method

.method public static getDefault()Ljava/net/CookieHandler;
    .locals 1

    .prologue
    .line 34
    sget-object v0, Ljava/net/CookieHandler;->systemWideCookieHandler:Ljava/net/CookieHandler;

    return-object v0
.end method

.method public static setDefault(Ljava/net/CookieHandler;)V
    .locals 0
    .param p0, "cHandler"    # Ljava/net/CookieHandler;

    .prologue
    .line 41
    sput-object p0, Ljava/net/CookieHandler;->systemWideCookieHandler:Ljava/net/CookieHandler;

    .line 42
    return-void
.end method

# virtual methods
.method public abstract get(Ljava/net/URI;Ljava/util/Map;)Ljava/util/Map;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Ljava/net/URI;",
            "Ljava/util/Map",
            "<",
            "Ljava/lang/String;",
            "Ljava/util/List",
            "<",
            "Ljava/lang/String;",
            ">;>;)",
            "Ljava/util/Map",
            "<",
            "Ljava/lang/String;",
            "Ljava/util/List",
            "<",
            "Ljava/lang/String;",
            ">;>;"
        }
    .end annotation

    .annotation system Ldalvik/annotation/Throws;
        value = {
            Ljava/io/IOException;
        }
    .end annotation
.end method

.method public abstract put(Ljava/net/URI;Ljava/util/Map;)V
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Ljava/net/URI;",
            "Ljava/util/Map",
            "<",
            "Ljava/lang/String;",
            "Ljava/util/List",
            "<",
            "Ljava/lang/String;",
            ">;>;)V"
        }
    .end annotation

    .annotation system Ldalvik/annotation/Throws;
        value = {
            Ljava/io/IOException;
        }
    .end annotation
.end method


text:
module ActiveRecord
  module Type
    class Decimal < Value # :nodoc:
      include Numeric

      def type
        :decimal
      end

      def type_cast_for_schema(value)
        value.to_s
      end

      private

      def cast_value(value)
        casted_value = case value
        when ::Float
          convert_float_to_big_decimal(value)
        when ::Numeric, ::String
          BigDecimal(value, precision.to_i)
        else
          if value.respond_to?(:to_d)
            value.to_d
          else
            cast_value(value.to_s)
          end
        end

        apply_scale(casted_value)
      end

      def convert_float_to_big_decimal(value)
        if precision
          BigDecimal(apply_scale(value), float_precision)
        else
          value.to_d
        end
      end

      def float_precision
        if precision.to_i > ::Float::DIG + 1
          ::Float::DIG + 1
        else
          precision.to_i
        end
      end

      def apply_scale(value)
        if scale
          value.round(scale)
        else
          value
        end
      end
    end
  end
end


text:
$marketplace = Balanced\Marketplace::mine();
$events = $marketplace->events->query()->all();