text:
/*globals define */
define(["text", "knockout", "stringTemplateEngine"], function (text, ko) {
   var inferTemplateName = function(name) {
      var templateName,
      index = name.indexOf("!"),
      parts;

      if (index !== -1) {
         //use the template name that is specified
         templateName = name.substring(index + 1, name.length);
      }
      else {
         //use the file name sans the path as the template name
         parts = name.split("/");
         templateName = parts[parts.length - 1].split(".").join("-");
      }

      return templateName;
   },
   loader = {
      load: function (name, req, load, config) {
         var onLoad = function (content) {
            var safeName = inferTemplateName(name);
            ko.templates[safeName] = content;
            load(content);
         },
         templateName = name,
         index;

         //use the global configuration if it is defined
         if (config !== undefined && config.loadKoTemplate !== undefined) {
            if (config.loadKoTemplate.templatePath !== undefined) {
               templateName = config.loadKoTemplate.templatePath + templateName;
            }
            if (config.loadKoTemplate.extension !== undefined) {

               //if we have a ! in the path we only want the text before it
               index = templateName.indexOf("!");
               if (index !== -1) {
                  templateName = templateName.substring(0, index);
               }
               templateName = templateName + config.loadKoTemplate.extension;
            }
         }

         text.load(templateName, req, onLoad, config);
      },
      write: function (pluginName, moduleName, write, config) {
         //write the text content of the template into a module using text plugin
         text.write("text", moduleName, write, config);

         var safeName = inferTemplateName(moduleName);

         //create a knockout template using the text content from the previous module
         write.asModule(pluginName + "!" + moduleName,
            "define(['text!" + moduleName + "', 'knockout', 'stringTemplateEngine'], function (content, ko) {" +
            "ko.templates['" + safeName + "'] = content;" +
            "});\n");
      }
   };

   return loader;
});

redpajama_set_name: RedPajamaGithub


text:
[![Build Status](https://travis-ci.org/coduo/php-humanizer.svg?branch=master)](https://travis-ci.org/coduo/php-humanizer)
[![Latest Stable Version](https://poser.pugx.org/coduo/php-humanizer/v/stable)](https://packagist.org/packages/coduo/php-humanizer)
[![Total Downloads](https://poser.pugx.org/coduo/php-humanizer/downloads)](https://packagist.org/packages/coduo/php-humanizer)
[![Latest Unstable Version](https://poser.pugx.org/coduo/php-humanizer/v/unstable)](https://packagist.org/packages/coduo/php-humanizer)
[![License](https://poser.pugx.org/coduo/php-humanizer/license)](https://packagist.org/packages/coduo/php-humanizer)

Humanize values to make them readable for regular people ;)

#Installation

Run the following command:

```shell
composer require coduo/php-humanizer
```

#Usage

## Text

**Humanize**

```php
use Coduo\PHPHumanizer\StringHumanizer;

echo StringHumanizer::humanize('field_name'); // "Field Name"
echo StringHumanizer::humanize('user_id'); // "User"
echo StringHumanizer::humanize('field_name', false); // "field name"
```

**Truncate**

Truncate string to word closest to a certain length

```php
use Coduo\PHPHumanizer\StringHumanizer;

$text = 'Lorem ipsum dolorem si amet, lorem ipsum. Dolorem sic et nunc.';

echo StringHumanizer::truncate($text, 8); // "Lorem ipsum"
echo StringHumanizer::truncate($text, 8, '...'); // "Lorem ipsum..."
echo StringHumanizer::truncate($text, 2); // "Lorem"
echo StringHumanizer::truncate($text, strlen($text)); // "Lorem ipsum dolorem si amet, lorem ipsum. Dolorem sic et nunc."

```

**Truncate HTML**

Truncate and HTML string to word closest to a certain length

```php
use Coduo\PHPHumanizer\StringHumanizer;

$text = '<p><b>HyperText Markup Language</b>, commonly referred to as <b>HTML</b>, is the standard <a href="/wiki/Markup_language" title="Markup language">markup language</a> used to create <a href="/wiki/Web_page" title="Web page">web pages</a>.<sup id="cite_ref-1" class="reference"><a href="#cite_note-1"><span>[</span>1<span>]</span></a></sup> <a href="/wiki/Web_browser" title="Web browser">Web browsers</a> can read HTML files and render them into visible or audible web pages. HTML describes the structure of a <a href="/wiki/Website" title="Website">website</a> <a href="/wiki/Semantic" title="Semantic" class="mw-redirect">semantically</a> along with cues for presentation, making it a markup language, rather than a <a href="/wiki/Programming_language" title="Programming language">programming language</a>.</p>';

echo StringHumanizer::truncateHtml($text, 3); // "<b>HyperText</b>"
echo StringHumanizer::truncateHtml($text, 12, ''); // "HyperText Markup"
echo StringHumanizer::truncateHtml($text, 50, '', '...'); // "HyperText Markup Language, commonly referred to as..."
echo StringHumanizer::truncateHtml($text, 75, '<b><i><u><em><strong><a><span>', '...'); // '<b>HyperText Markup Language</b>, commonly referred to as <b>HTML</b>, is the standard <a href="/wiki/Markup_language" title="Markup language">markup...</a>'

```

## Number

**Ordinalize**

```php
use Coduo\PHPHumanizer\NumberHumanizer;

echo NumberHumanizer::ordinalize(0); // "0th"
echo NumberHumanizer::ordinalize(1); // "1st"
echo NumberHumanizer::ordinalize(2); // "2nd"
echo NumberHumanizer::ordinalize(23); // "23rd"
echo NumberHumanizer::ordinalize(1002, 'nl'); // "1002e"
echo NumberHumanizer::ordinalize(-111); // "-111th"

```

**Ordinal**

```php
use Coduo\PHPHumanizer\NumberHumanizer;

echo NumberHumanizer::ordinal(0); // "th"
echo NumberHumanizer::ordinal(1); // "st"
echo NumberHumanizer::ordinal(2); // "nd"
echo NumberHumanizer::ordinal(23); // "rd"
echo NumberHumanizer::ordinal(1002); // "nd"
echo NumberHumanizer::ordinal(-111, 'nl'); // "e"
```

**Roman numbers**
```php
use Coduo\PHPHumanizer\NumberHumanizer;

echo NumberHumanizer::toRoman(1); // "I"
echo NumberHumanizer::toRoman(5); // "V"
echo NumberHumanizer::toRoman(1300); // "MCCC"

echo NumberHumanizer::fromRoman("MMMCMXCIX"); // 3999
echo NumberHumanizer::fromRoman("V"); // 5
echo NumberHumanizer::fromRoman("CXXV"); // 125
```

**Binary Suffix**

Convert a number of bytes in to the highest applicable data unit

```php
use Coduo\PHPHumanizer\NumberHumanizer;

echo NumberHumanizer::binarySuffix(0); // "0 bytes"
echo NumberHumanizer::binarySuffix(1); // "1 bytes"
echo NumberHumanizer::binarySuffix(1024); // "1 kB"
echo NumberHumanizer::binarySuffix(1025); // "1 kB"
echo NumberHumanizer::binarySuffix(1536); // "1.5 kB"
echo NumberHumanizer::binarySuffix(1048576 * 5); // "5 MB"
echo NumberHumanizer::binarySuffix(1073741824 * 2); // "2 GB"
echo NumberHumanizer::binarySuffix(1099511627776 * 3); // "3 TB"
echo NumberHumanizer::binarySuffix(1325899906842624); // "1.18 PB"
```

Number can be also formatted for specific locale

```php
use Coduo\PHPHumanizer\NumberHumanizer;

echo NumberHumanizer::binarySuffix(1536, 'pl'); // "1,5 kB"
```

Number can also be humanized with a specific number of decimal places with `preciseBinarySuffix($number, $precision, $locale = 'en')`
The precision parameter must be between 0 and 3.

```php
use Coduo\PHPHumanizer\NumberHumanizer;

echo NumberHumanizer::preciseBinarySuffix(1024, 2); // "1.00 kB"
echo NumberHumanizer::preciseBinarySuffix(1325899906842624, 3); // "1.178 PB"
```

This function also supports locale

```php
use Coduo\PHPHumanizer\NumberHumanizer;

echo NumberHumanizer::preciseBinarySuffix(1325899906842624, 3, 'pl'); // "1,178 PB"
```

**Metric Suffix**

```php
use Coduo\PHPHumanizer\NumberHumanizer;

echo NumberHumanizer::metricSuffix(-1); // "-1"
echo NumberHumanizer::metricSuffix(0); // "0"
echo NumberHumanizer::metricSuffix(1); // "1"
echo NumberHumanizer::metricSuffix(101); // "101"
echo NumberHumanizer::metricSuffix(1000); // "1k"
echo NumberHumanizer::metricSuffix(1240); // "1.2k"
echo NumberHumanizer::metricSuffix(1240000); // "1.24M"
echo NumberHumanizer::metricSuffix(3500000); // "3.5M"
```

Number can be also formatted for specific locale

```php
use Coduo\PHPHumanizer\NumberHumanizer;

echo NumberHumanizer::metricSuffix(1240000, 'pl'); // "1,24M"
```

## Collections

**Oxford**

```php
use Coduo\PHPHumanizer\CollectionHumanizer;

echo CollectionHumanizer::oxford(['Michal', 'Norbert', 'Lukasz', 'Pawel'], 2); // "Michal, Norbert, and 2 others"
echo CollectionHumanizer::oxford(['Michal', 'Norbert', 'Lukasz'], 2); // "Michal, Norbert, and 1 other"
echo CollectionHumanizer::oxford(['Michal', 'Norbert']); // "Michal and Norbert"
```

Oxford is using translator component, so you can use whatever string format you like.

## Date time

**Difference**

```php
use Coduo\PHPHumanizer\DateTimeHumanizer;

echo DateTimeHumanizer::difference(new \DateTime("2014-04-26 13:00:00"), new \DateTime("2014-04-26 13:00:00")); // just now
echo DateTimeHumanizer::difference(new \DateTime("2014-04-26 13:00:00"), new \DateTime("2014-04-26 13:00:05")); // 5 seconds from now
echo DateTimeHumanizer::difference(new \DateTime("2014-04-26 13:00:00"), new \DateTime("2014-04-26 12:59:00")); // 1 minute ago
echo DateTimeHumanizer::difference(new \DateTime("2014-04-26 13:00:00"), new \DateTime("2014-04-26 12:45:00")); // 15 minutes ago
echo DateTimeHumanizer::difference(new \DateTime("2014-04-26 13:00:00"), new \DateTime("2014-04-26 13:15:00")); // 15 minutes from now
echo DateTimeHumanizer::difference(new \DateTime("2014-04-26 13:00:00"), new \DateTime("2014-04-26 14:00:00")); // 1 hour from now
echo DateTimeHumanizer::difference(new \DateTime("2014-04-26 13:00:00"), new \DateTime("2014-04-26 15:00:00")); // 2 hours from now
echo DateTimeHumanizer::difference(new \DateTime("2014-04-26 13:00:00"), new \DateTime("2014-04-26 12:00:00")); // 1 hour ago
echo DateTimeHumanizer::difference(new \DateTime("2014-04-26"), new \DateTime("2014-04-25")); // 1 day ago
echo DateTimeHumanizer::difference(new \DateTime("2014-04-26"), new \DateTime("2014-04-24")); // 2 days ago
echo DateTimeHumanizer::difference(new \DateTime("2014-04-26"), new \DateTime("2014-04-28")); // 2 days from now
echo DateTimeHumanizer::difference(new \DateTime("2014-04-01"), new \DateTime("2014-04-15")); // 2 weeks from now
echo DateTimeHumanizer::difference(new \DateTime("2014-04-15"), new \DateTime("2014-04-07")); // 1 week ago
echo DateTimeHumanizer::difference(new \DateTime("2014-01-01"), new \DateTime("2014-04-01")); // 3 months from now
echo DateTimeHumanizer::difference(new \DateTime("2014-05-01"), new \DateTime("2014-04-01")); // 1 month ago
echo DateTimeHumanizer::difference(new \DateTime("2015-05-01"), new \DateTime("2014-04-01")); // 1 year ago
echo DateTimeHumanizer::difference(new \DateTime("2014-05-01"), new \DateTime("2016-04-01")); // 2 years from now
```

**Precise difference**

```php
use Coduo\PHPHumanizer\DateTimeHumanizer;

echo DateTimeHumanizer::preciseDifference(new \DateTime("2014-04-26 13:00:00"), new \DateTime("2014-04-25 11:20:00")); // 1 day, 1 hour, 40 minutes ago
echo DateTimeHumanizer::preciseDifference(new \DateTime("2014-04-26 13:00:00"), new \DateTime("2015-04-28 17:00:00")); // 1 year, 2 days, 4 hours from now
echo DateTimeHumanizer::preciseDifference(new \DateTime("2014-04-26 13:00:00"), new \DateTime("2016-04-27 13:00:00")); // 2 years, 1 day from now
```

Currently we support following languages:
* [English](src/Coduo/PHPHumanizer/Resources/translations/difference.en.yml)
* [Polish](src/Coduo/PHPHumanizer/Resources/translations/difference.pl.yml)
* [German](src/Coduo/PHPHumanizer/Resources/translations/difference.de.yml)
* [Turkish](src/Coduo/PHPHumanizer/Resources/translations/difference.tr.yml)
* [French](src/Coduo/PHPHumanizer/Resources/translations/difference.fr.yml)
* [Português - Brasil](src/Coduo/PHPHumanizer/Resources/translations/difference.pt_BR.yml)
* [Italian](src/Coduo/PHPHumanizer/Resources/translations/difference.it.yml)
* [Dutch](src/Coduo/PHPHumanizer/Resources/translations/difference.nl.yml)
* [Русский](src/Coduo/PHPHumanizer/Resources/translations/difference.ru.yml)
* [Norwegian](src/Coduo/PHPHumanizer/Resources/translations/difference.no.yml)
* [Afrikaans] (src/Coduo/PHPHumanizer/Resources/translations/difference.af.yml)
* [Bulgarian] (src/Coduo/PHPHumanizer/Resources/translations/difference.bg.yml)
* [Indonesian] (src/Coduo/PHPHumanizer/Resources/translations/difference.id.yml)
* [Chinese Simplified] (src/Coduo/PHPHumanizer/Resources/translations/difference.zh_CN.yml)
* [Spanish] (src/Coduo/PHPHumanizer/Resources/translations/difference.es.yml)
* [Ukrainian] (src/Coduo/PHPHumanizer/Resources/translations/difference.uk.yml)
* [Danish] (src/Coduo/PHPHumanizer/Resources/translations/difference.da.yml)
* [Thai] (src/Coduo/PHPHumanizer/Resources/translations/difference.th.yml)

# Credits

This lib was inspired by [Java Humanize Lib](https://github.com/mfornos/humanize) && [Rails Active Support](https://github.com/rails/rails/tree/master/activesupport/lib/active_support)


text:
import SectionManager from '../SectionManager'

export default function calculateSizeAndPositionData ({
  cellCount,
  cellSizeAndPositionGetter,
  sectionSize
}) {
  const cellMetadata = []
  const sectionManager = new SectionManager(sectionSize)
  let height = 0
  let width = 0

  for (let index = 0; index < cellCount; index++) {
    const cellMetadatum = cellSizeAndPositionGetter(index)

    if (
      cellMetadatum.height == null || isNaN(cellMetadatum.height) ||
      cellMetadatum.width == null || isNaN(cellMetadatum.width) ||
      cellMetadatum.x == null || isNaN(cellMetadatum.x) ||
      cellMetadatum.y == null || isNaN(cellMetadatum.y)
    ) {
      throw Error(
        `Invalid metadata returned for cell ${index}:
        x:${cellMetadatum.x}, y:${cellMetadatum.y}, width:${cellMetadatum.width}, height:${cellMetadatum.height}`
      )
    }

    height = Math.max(height, cellMetadatum.y + cellMetadatum.height)
    width = Math.max(width, cellMetadatum.x + cellMetadatum.width)

    cellMetadata[index] = cellMetadatum
    sectionManager.registerCell({
      cellMetadatum,
      index
    })
  }

  return {
    cellMetadata,
    height,
    sectionManager,
    width
  }
}


text:
package eu.com.cwsfe.cms;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.PropertySource;
import org.springframework.core.env.Environment;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.jdbc.datasource.DataSourceTransactionManager;
import org.springframework.jdbc.datasource.DriverManagerDataSource;

import javax.sql.DataSource;

/**
 * Created by Radoslaw Osinski.
 */
@Configuration
@ComponentScan({"eu.com.cwsfe.cms.version"})
public class DataSourceTestConfiguration {

    private Environment environment;

    @Autowired
    public void setEnvironment(Environment environment) {
        this.environment = environment;
    }

    @Bean
    public DataSource getTestDataSource() {
        DriverManagerDataSource dataSource = new DriverManagerDataSource();
        dataSource.setDriverClassName(environment.getProperty("cwsfe_cms.jdbc.driverClassName", "org.postgresql.Driver"));
        dataSource.setUrl(environment.getProperty("cwsfe_cms.jdbc.url"));
        dataSource.setUsername(environment.getProperty("cwsfe_cms.jdbc.user"));
        dataSource.setPassword(environment.getProperty("cwsfe_cms.jdbc.password"));
        dataSource.setSchema(environment.getProperty("cwsfe_cms.jdbc.schema"));
        return dataSource;
    }

    @Bean
    public org.springframework.jdbc.core.JdbcTemplate getJdbcTemplate() {
        return new JdbcTemplate(getTestDataSource());
    }

    @Bean
    public org.springframework.jdbc.datasource.DataSourceTransactionManager getDataSourceTransactionManager() {
        return new DataSourceTransactionManager(getTestDataSource());
    }

}


text:
from translator.hot.syntax.hot_resource import HotResource

# Name used to dynamically load appropriate map class.
TARGET_CLASS_NAME = 'ToscaNfvVnf'

class ToscaNfvVnf(HotResource):
    """Translate TOSCA node type tosca.nodes.nfv.VNF."""

    toscatype = 'tosca.nodes.nfv.VNF'

    def __init__(self, nodetemplate, csar_dir):
        super(ToscaNfvVnf, self).__init__(
            nodetemplate,
            csar_dir=csar_dir)

    def handle_properties(self):
        pass


text:
module Rack
  module OAuth2
    module Server
      class Authorize
        module ErrorHandler
          def self.included(klass)
            klass.send :attr_accessor, :redirect_uri, :state, :protocol_params_location
          end

          def protocol_params
            super.merge(:state => state)
          end

          def finish
            if redirect_uri.present? && protocol_params_location.present?
              super do |response|
                response.redirect Util.redirect_uri(redirect_uri, protocol_params_location, protocol_params)
              end
            else
              raise self
            end
          end
        end

        class BadRequest < Abstract::BadRequest
          include ErrorHandler
        end

        class ServerError < Abstract::ServerError
          include ErrorHandler
        end

        class TemporarilyUnavailable < Abstract::TemporarilyUnavailable
          include ErrorHandler
        end

        module ErrorMethods
          DEFAULT_DESCRIPTION = {
            :invalid_request => "The request is missing a required parameter, includes an unsupported parameter or parameter value, or is otherwise malformed.",
            :unauthorized_client => "The client is not authorized to use the requested response type.",
            :access_denied => "The end-user or authorization server denied the request.",
            :unsupported_response_type => "The requested response type is not supported by the authorization server.",
            :invalid_scope => "The requested scope is invalid, unknown, or malformed.",
            :server_error => "Internal Server Error",
            :temporarily_unavailable => "Service Unavailable"
          }

          def self.included(klass)
            DEFAULT_DESCRIPTION.each do |error, default_description|
              klass.class_eval <<-ERROR
                def #{error}!(description = "#{default_description}", options = {})
                  bad_request! :#{error}, description, options
                end
              ERROR
            end
          end

          def bad_request!(error = :bad_request, description = nil, options = {})
            exception = BadRequest.new error, description, options
            exception.protocol_params_location = error_params_location
            exception.state = state
            exception.redirect_uri = verified_redirect_uri
            raise exception
          end
        end

        Request.send :include, ErrorMethods
      end
    end
  end
end


text:
package cap06;

import java.util.ArrayList;

import prog.utili.Quadrato;
import prog.utili.Rettangolo;

/** legge da string una sequenza di rettangoli/quadrati
 * (se base == altezza costruisce un quqdrato)
 * la memorizza in una ArrayList, cerca il più grande e lo stampa
 * e stampa se è una quadrato o un rettangolo
 */
public class SeqRettangoli {

	public static void main(String[] args) {
		// separiamo le figure con ;
		// separiamo base e altezza da ,
		String data = "8,9;8,10;7,7;1,10";
		// le miei figure
		ArrayList<Rettangolo> figure = new ArrayList<Rettangolo>();
		// leggi la string
		for(String figura: data.split(";")) {
			String[] basealtezza =  figura.split(",");
			double base = Double.parseDouble(basealtezza[0]);
			double altezza = Double.parseDouble(basealtezza[1]);
			if (base == altezza)
				figure.add(new Quadrato(base));
			else
				figure.add(new Rettangolo(base,altezza));
		}
		// cerca il più grande
		double maxArea = 0;
		Rettangolo maxFigura = null;
		for(Rettangolo r: figure) {
			if (r.getArea() > maxArea) {
				maxArea = r.getArea();
				maxFigura = r;
			}
		}
		// stampa maxFigura
		System.out.println("il rettangolo più grande è "+ maxFigura);
		// maxFigura è rettangolo o quadrato???
		// NOOif (maxFigura instanceof Rettangolo)
		if (maxFigura instanceof Quadrato)
			System.out.println("Quadrato");
		else
			System.out.println("Rettangolo");
		//
		System.out.println(maxFigura.getClass().getSimpleName());
	}

}


text:
Lambdefy
=================================

If you have a Node application listening to a port, you can deploy it to AWS Lambda and API Gateway using Lambdefy, just add one line of code.


text:
namespace bunny_files
{
    partial class Form1
    {
        /// <summary>
        /// Variable del diseñador requerida.
        /// </summary>
        private System.ComponentModel.IContainer components = null;

        /// <summary>
        /// Limpiar los recursos que se estén utilizando.
        /// </summary>
        /// <param name="disposing">true si los recursos administrados se deben eliminar; false en caso contrario.</param>
        protected override void Dispose(bool disposing)
        {
            if (disposing && (components != null))
            {
                components.Dispose();
            }
            base.Dispose(disposing);
        }

        #region Código generado por el Diseñador de Windows Forms

        /// <summary>
        /// Método necesario para admitir el Diseñador. No se puede modificar
        /// el contenido del método con el editor de código.
        /// </summary>
        private void InitializeComponent()
        {
            this.label1 = new System.Windows.Forms.Label();
            this.usb_devices = new System.Windows.Forms.ComboBox();
            this.label2 = new System.Windows.Forms.Label();
            this.button1 = new System.Windows.Forms.Button();
            this.button2 = new System.Windows.Forms.Button();
            this.label3 = new System.Windows.Forms.Label();
            this.formulario = new System.Windows.Forms.FlowLayoutPanel();
            this.SuspendLayout();
            //
            // label1
            //
            this.label1.AutoSize = true;
            this.label1.Font = new System.Drawing.Font("Times New Roman", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.label1.Location = new System.Drawing.Point(12, 9);
            this.label1.Name = "label1";
            this.label1.Size = new System.Drawing.Size(208, 19);
            this.label1.TabIndex = 0;
            this.label1.Text = "Seleccione la unidad a formatear:";
            //
            // usb_devices
            //
            this.usb_devices.FormattingEnabled = true;
            this.usb_devices.Location = new System.Drawing.Point(226, 10);
            this.usb_devices.Name = "usb_devices";
            this.usb_devices.Size = new System.Drawing.Size(121, 21);
            this.usb_devices.TabIndex = 1;
            //
            // label2
            //
            this.label2.AutoSize = true;
            this.label2.Font = new System.Drawing.Font("Times New Roman", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.label2.Location = new System.Drawing.Point(12, 45);
            this.label2.Name = "label2";
            this.label2.Size = new System.Drawing.Size(152, 19);
            this.label2.TabIndex = 2;
            this.label2.Text = "Cargue el PDF a editar:";
            //
            // button1
            //
            this.button1.AutoSize = true;
            this.button1.Location = new System.Drawing.Point(358, 9);
            this.button1.Name = "button1";
            this.button1.Size = new System.Drawing.Size(178, 23);
            this.button1.TabIndex = 3;
            this.button1.Text = "Formatear unidad y escribir PDF";
            this.button1.UseVisualStyleBackColor = true;
            this.button1.Click += new System.EventHandler(this.button1_Click);
            //
            // button2
            //
            this.button2.AutoSize = true;
            this.button2.Location = new System.Drawing.Point(165, 44);
            this.button2.Name = "button2";
            this.button2.Size = new System.Drawing.Size(134, 23);
            this.button2.TabIndex = 4;
            this.button2.Text = "Seleccionar archivo";
            this.button2.UseVisualStyleBackColor = true;
            this.button2.Click += new System.EventHandler(this.button2_Click);
            //
            // label3
            //
            this.label3.AutoSize = true;
            this.label3.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.label3.Location = new System.Drawing.Point(13, 82);
            this.label3.Name = "label3";
            this.label3.Size = new System.Drawing.Size(41, 13);
            this.label3.TabIndex = 5;
            this.label3.Text = "label3";
            this.label3.Visible = false;
            //
            // formulario
            //
            this.formulario.AutoSize = true;
            this.formulario.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
            this.formulario.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
            this.formulario.FlowDirection = System.Windows.Forms.FlowDirection.TopDown;
            this.formulario.Location = new System.Drawing.Point(16, 106);
            this.formulario.Name = "formulario";
            this.formulario.Size = new System.Drawing.Size(4, 4);
            this.formulario.TabIndex = 6;
            this.formulario.Visible = false;
            //
            // Form1
            //
            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
            this.AutoSize = true;
            this.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
            this.ClientSize = new System.Drawing.Size(548, 261);
            this.Controls.Add(this.formulario);
            this.Controls.Add(this.label3);
            this.Controls.Add(this.button2);
            this.Controls.Add(this.button1);
            this.Controls.Add(this.label2);
            this.Controls.Add(this.usb_devices);
            this.Controls.Add(this.label1);
            this.Name = "Form1";
            this.Text = "Bunny Files";
            this.ResumeLayout(false);
            this.PerformLayout();

        }

        #endregion

        private System.Windows.Forms.Label label1;
        private System.Windows.Forms.ComboBox usb_devices;
        private System.Windows.Forms.Label label2;
        private System.Windows.Forms.Button button1;
        private System.Windows.Forms.Button button2;
        private System.Windows.Forms.Label label3;
        private System.Windows.Forms.FlowLayoutPanel formulario;
    }
}


text:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Cabinet.Core.Providers;
using System.IO.Abstractions;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
using System.IO;

namespace Cabinet.Config {
    public class FileCabinetProviderConfigStore : ICabinetProviderConfigStore {
        private const string TypeKey = "type";
        private const string ConfigKey = "config";

        private readonly string configFilePath;
        private readonly IFileCabinetConfigConverterFactory converterFactory;
        private readonly IFileSystem fs;

        public FileCabinetProviderConfigStore(string configFilePath, IFileCabinetConfigConverterFactory converterFactory)
            : this(configFilePath, converterFactory, new FileSystem()) {
        }

        public FileCabinetProviderConfigStore(string configFilePath, IFileCabinetConfigConverterFactory converterFactory, IFileSystem fs) {
            this.configFilePath = configFilePath;
            this.converterFactory = converterFactory;
            this.fs = fs;
        }

        public IStorageProviderConfig GetConfig(string name) {
            if (String.IsNullOrWhiteSpace(name)) throw new ArgumentNullException(nameof(name));

            using (var configStream = fs.File.OpenRead(this.configFilePath)) {
                using (var streamReader = new StreamReader(configStream)) {
                    using (var jsonReader = new JsonTextReader(streamReader)) {

                        var config = JToken.Load(jsonReader, new JsonLoadSettings {
                            CommentHandling = CommentHandling.Ignore,
                            LineInfoHandling = LineInfoHandling.Ignore
                        });

                        var namedConfig = config[name];
                        if (namedConfig == null) {
                            return null;
                        }

                        string type = namedConfig.Value<string>(TypeKey);

                        if (String.IsNullOrWhiteSpace(type)) {
                            return null;
                        }

                        var converter = converterFactory.GetConverter(type);
                        var providerConfig = converter.ToConfig(namedConfig[ConfigKey]);

                        return providerConfig;
                    }
                }
            }
        }
    }
}


text:
from __future__ import absolute_import
from blockcanvas.class_tools.class_library import *


text:
babel src --ignore __tests__ --out-dir npm

# Ensure a vanilla package.json before deploying so other tools do not interpret
# The built output as requiring any further transformation.
node -e "var package = require('./package.json'); \
  delete package.scripts; \
  delete package.options; \
  delete package.devDependencies; \
  require('fs').writeFileSync('./npm/package.json', JSON.stringify(package, null, 2));"

cp README.md npm/
cp LICENSE npm/

cd npm
git init
git config user.name "Travis CI"
git config user.email "github@fb.com"
git add .
git commit -m "Deploy master to NPM branch"
git push --force --quiet "https://${GH_TOKEN}@github.com/graphql/graphql-js.git" master:npm


text:
OUTDIR=../freshtml

#test -r README.txt || ln -s ../README.txt
#test -r NEWS.txt || ln -s ../NEWS.txt

rm -rf $OUTDIR

sphinx-build -a . $OUTDIR

cd $OUTDIR

# From: http://github.com/michaeljones/sphinx-to-github

for underscore_folder in  _*
do

	folder_without_underscore=`echo $underscore_folder | sed 's/^.//'`

	echo "Processing matches for: $underscore_folder -> $folder_without_underscore"
	for underscore_file in $( find $underscore_folder -type f )
	do
		echo "Check occurences of $underscore_file"
		file_without_underscore=`echo $underscore_file | sed 's/^.//'`

		for file in $( find . -type f -name "*.html" )
		do
			echo " - found $file"
			sed -i "" "s/${underscore_file//\//\/}/${file_without_underscore//\//\/}/g" $file
		done
	done

	mv $underscore_folder $folder_without_underscore
done


text:
using namespace Anubis;

AVOID EntityResource::VLoad(const ASTRING & filename)
{
	//parse file
	JSONLoader::Parse(filename);

	//read position data
	m_pos = Vector(JSONLoader::GetAREAL32("position_x"), JSONLoader::GetAREAL32("position_y"), JSONLoader::GetAREAL32("position_z"), 1.0f);
}


text:
import * as React from 'react';
import { Button, Jumbotron } from 'react-bootstrap';
const style = require('./style.css');

class Home extends React.Component<any, any> {

  public render() {
    return (
      <Jumbotron>

Welcome to Thing9!

          <Button bsStyle="info">Click Me!</Button>

      </Jumbotron>
    );
  }
}

export { Home }


text:
<?php

/**
  Truncate Html string without stripping tags
  register in Resources/config/services.yml with:
  services:
  truncatehtml.twig.extension:
  class: Radley\TwigExtensionBundle\Extension\TruncateHtmlExtension
  tags:
  - { name: twig.extension }

  Usage:
  {{ htmlstring|truncatehtml(500)|raw }}
 */

namespace Radley\TwigExtensionBundle\Extension;

class TruncateHtmlString {

    function __construct($string, $limit) {
// create dom element using the html string
        $this->tempDiv = new \DomDocument();
        $this->tempDiv->loadXML('<div>' . $string . '</div>');
// keep the characters count till now
        $this->charCount = 0;
        $this->encoding = 'UTF-8';
// character limit need to check
        $this->limit = $limit;
    }

    function cut() {
// create empty document to store new html
        $this->newDiv = new \DomDocument();
// cut the string by parsing through each element
        $this->searchEnd($this->tempDiv->documentElement, $this->newDiv);
        $newhtml = $this->newDiv->saveHTML();
        return $newhtml;
    }

    function deleteChildren($node) {
        while (isset($node->firstChild)) {
            $this->deleteChildren($node->firstChild);
            $node->removeChild($node->firstChild);
        }
    }

    function searchEnd($parseDiv, $newParent) {
        foreach ($parseDiv->childNodes as $ele) {
// not text node
            if ($ele->nodeType != 3) {
                $newEle = $this->newDiv->importNode($ele, true);
                if (count($ele->childNodes) === 0) {
                    $newParent->appendChild($newEle);
                    continue;
                }
                $this->deleteChildren($newEle);
                $newParent->appendChild($newEle);
                $res = $this->searchEnd($ele, $newEle);
                if ($res)
                    return $res;
                else
                    continue;
            }

// the limit of the char count reached
            if (mb_strlen($ele->nodeValue, $this->encoding) + $this->charCount >= $this->limit) {
                $newEle = $this->newDiv->importNode($ele);
                $newEle->nodeValue = substr($newEle->nodeValue, 0, $this->limit - $this->charCount);
                $newParent->appendChild($newEle);
                return true;
            }
            $newEle = $this->newDiv->importNode($ele);
            $newParent->appendChild($newEle);
            $this->charCount += mb_strlen($newEle->nodeValue, $this->encoding);
        }
        return false;
    }

}

class TruncateHtmlExtension extends \Twig_Extension {

    public function getName() {
        return 'truncatehtml';
    }

    public function getFilters() {
        return array('truncatehtml' => new \Twig_Filter_Method($this, 'truncatehtml'));
    }

    public function truncatehtml($html, $limit, $endchar = '…') {
        $output = new TruncateHtmlString($html, $limit);
        return $output->cut() . $endchar;
    }

}


text:
<!DOCTYPE html>

  <meta charset="utf-8" />
  <meta http-equiv="X-UA-Compatible" content="IE=edge" />
  <meta name="HandheldFriendly" content="true" />
  <link rel="shortcut icon" href="https://www.epa.gov/sites/all/themes/epa/favicon.ico" type="image/vnd.microsoft.icon" />
  <meta name="MobileOptimized" content="width" />
  <meta http-equiv="cleartype" content="on" />
  <meta http-equiv="ImageToolbar" content="false" />
  <meta name="viewport" content="width=device-width" />
  <meta name="version" content="20161218" />

  <meta name="DC.description" content="" />
  <meta name="DC.title" content="" />
  <title>
  Interactive Effects of UV Radiation and Titanium Dioxide Nanoparticles on Marine Planktonic Food Webs|

  Research Project Database | Grantee Research Project | ORD | US EPA</title>

  <meta name="keywords" content="" />
  <link rel="shortlink" href="" />
  <link rel="canonical" href="" />
  <meta name="DC.creator" content="" />
  <meta name="DC.language" content="en" />
  <meta name="DC.Subject.epachannel" content="" />
  <meta name="DC.type" content="" />
  <meta name="DC.date.created" content="" />
  <meta name="DC.date.modified" content="2016-07-22" />

  <link type="text/css" rel="stylesheet" href="https://www.epa.gov/misc/ui/jquery.ui.autocomplete.css" media="all" />
  <link type="text/css" rel="stylesheet" href="https://www.epa.gov/sites/all/themes/epa/css/lib/jquery.ui.theme.css" media="all" />
  <link type="text/css" rel="stylesheet" href="https://www.epa.gov/sites/all/libraries/template2/s.css" media="all" />

	<link rel="alternate" type="application/atom+xml" title="EPA.gov All Press Releases" href="https://www.epa.gov/newsreleases/search/rss" />
	<link rel="alternate" type="application/atom+xml" title="EPA.gov Headquarters Press Releases" href="https://www.epa.gov/newsreleases/search/rss/field_press_office/headquarters" />
	<link rel="alternate" type="application/atom+xml" title="Greenversations, EPA's Blog" href="https://blog.epa.gov/blog/feed/" />

Jump to main content

  <hgroup class="site-name-and-slogan">

US EPA

United States Environmental Protection Agency

  </hgroup>
  <form class="epa-search" method="get" action="https://search.epa.gov/epasearch/epasearch">
    Search
    <input class="form-text" placeholder="Search EPA.gov" name="querytext" id="search-box" value=""/>
    <button class="epa-search-button" id="search-button" type="submit" title="Search">Search</button>
    <input type="hidden" name="fld" value="" />
    <input type="hidden" name="areaname" value="" />
    <input type="hidden" name="areacontacts" value="" />
    <input type="hidden" name="areasearchurl" value="" />
    <input type="hidden" name="typeofsearch" value="epa" />
    <input type="hidden" name="result_template" value="2col.ftl" />
    <input type="hidden" name="filter" value="sample4filt.hts" />
  </form>

Contact Us

Related Information

Research Grants

P3: Student Design Competition

Research Fellowships

Small Business Innovation Research (SBIR)

Grantee Research Project Results Search

      Interactive Effects of UV Radiation and Titanium Dioxide Nanoparticles on Marine Planktonic Food Webs

    EPA Grant Number: FP917806

    Title: Interactive Effects of UV Radiation and Titanium Dioxide Nanoparticles on Marine Planktonic Food Webs

    Investigators:
     Haynes, Vena N

    Institution:

      University of Connecticut

    	EPA Project Officer:

           Lee, Sonja

      Project Period:
      September 1, 2015 through
        August 31, 2018

        Project Amount:

          $132,000

      RFA:
      STAR Graduate Fellowships (2015)

        		RFA Text |
          Recipients Lists

      Research Category:

          Academic Fellowships

Objective:

        Titanium dioxide nanoparticles are used in a variety of consumer products including paints, sunscreens, and skin-care products, and are released into the environment directly (e.g., product usage) and indirectly (e.g., wastewater). There are a few studies that have examined the phototoxic effects of titanium dioxide on aquatic organisms, however, how these particles affect zooplanktonic animals under natural light common in most near-shore waters is largely unknown. The proposed research will focus on this knowledge gap by examining the interactive effects of UV radiation and titanium dioxide nanoparticles on key organisms that form the base of the marine planktonic food web, and are critical to healthy fisheries.

Approach:

        By altering both titanium dioxide nanoparticle type (P25, UV-Titan) and concentration (0.1, 0.5 mg/L), the impact on 1a) growth and 1b) mortality of hetero/mixotrophic ciliates; 2a) ingestion rate (IR) and 2b) egg production rate (EPR) of copepods; and 3) egg hatching frequency (HF) of copepods will be quantified under dark and environmentally-relevant light conditions. Importantly, by exposing organisms to both light and dark conditions, the nanoparticle effects due to photoreactivity versus nanoscale-size reactivity can be disentangled.

Expected Results:

        Previous studies using titanium dioxide nanoparticles without light show little to no toxic effects. With the addition of light, it is anticipated that there will be interactive and negative effects on the organisms tested. Results will provide critical data on the impact of nanoparticles on organisms in the near-shore environment and provide insight into how this may affect marine planktonic trophic cascades. This work will also inform future studies on organisms that rely on zooplankton for food (e.g., fish larvae and filter-feeders).

Supplemental Keywords:

      Nanoparticles, titanium dioxide, UV radiation, marine food web, ciliates, copepods, ecotoxicity

Top of Page

 The perspectives, information and conclusions conveyed in research project abstracts, progress reports, final reports, journal abstracts and journal publications convey the viewpoints of the principal investigator and may not represent the views and policies of ORD and EPA.  Conclusions drawn by the principal investigators have not been reviewed by the Agency.

Main menu

Environmental Topics

Laws & Regulations

About EPA

Discover.

Accessibility

EPA Administrator

Budget & Performance

Contracting

Grants

No FEAR Act Data

Privacy and Security

Connect.

Data.gov

Inspector General

Jobs

Newsroom

Open Government

Regulations.gov

Subscribe

USA.gov

White House

Ask.

Contact Us

Hotlines

FOIA Requests

Frequent Questions

Follow.

Facebook

Twitter

YouTube

Flickr

Instagram

Last updated on Friday, July 22, 2016


text:
@protocol PLSumatorProtocol <NSObject>
- (double)sum:(double)x with:(double)y;
@end


text:
/**
 *
 */
package titli.controller;

import java.util.ArrayList;
import java.util.List;

/**
 * the abstract class that conatins much of the functionality reqiured for refreshing the index in batches
 * in a way that separates the task of refreshing the index from the the task of identifying refrashable records.
 * The only abstract method is pullRefreshableRecords()
 *
 * @author Juber Patel
 *
 */
public abstract class IndexRefresherInvoker
{
	private List<RecordIdentifier> insertableList;
	private List<RecordIdentifier> deletableList;
	private List<RecordIdentifier> updatableList;

	/**
	 *
	 *
	 */
	public IndexRefresherInvoker()
	{
		insertableList = new ArrayList<RecordIdentifier>();
		deletableList = new ArrayList<RecordIdentifier>();
		updatableList = new ArrayList<RecordIdentifier>();
	}

	/**
	 *
	 *This abstract method should pull the records that should be inserted, deleted or updated
	 *The RecordIdentifier objects should be added to insertableList,
	 *deletableList and updatableList as required
	 */
	public abstract void pullRefreshableRecords();

	/**
	 *refresh the indexes ie insert, delete and update identified records
	 *this method should be called whenver updating of indexes is desired
	 */
	public void refresh()
	{
		pullRefreshableRecords();

	}

	/**
	 * @return the deletableList
	 */
	public List<RecordIdentifier> getDeletableList()
	{
		return deletableList;
	}

	/**
	 * @return the insertableList
	 */
	public List<RecordIdentifier> getInsertableList()
	{
		return insertableList;
	}

	/**
	 * @return the updatableList
	 */
	public List<RecordIdentifier> getUpdatableList()
	{
		return updatableList;
	}

}


text:
namespace OpenCurve.Engine
{
    using Microsoft.Xna.Framework;

    public class PlayerOptions
    {
        public Color Color { get; set; }
        public PlayerControls PlayerControls { get; set; }
    }
}


text:
<?php

namespace Mage\Downloadable\Test\Constraint;

use Mage\Catalog\Test\Page\Product\CatalogProductView;
use Mage\Downloadable\Test\Fixture\DownloadableProduct;
use Magento\Mtf\Client\Browser;
use Magento\Mtf\Constraint\AbstractAssertForm;

/**
 * Assert that Samples links are present on the downloadable product on front-end.
 */
class AssertDownloadableSamplesData extends AbstractAssertForm
{
    /* tags */
    const SEVERITY = 'low';
    /* end tags */

    /**
     * List downloadable sample links fields for verify.
     *
     * @var array
     */
    protected $downloadableSampleField = [
        'title',
        'downloadable',
    ];

    /**
     * List fields of downloadable sample link for verify.
     *
     * @var array
     */
    protected $linkField = [
        'title',
    ];

    /**
     * Assert that Samples links are present on the downloadable product on front-end.
     *
     * @param CatalogProductView $productView
     * @param DownloadableProduct $product
     * @param Browser $browser
     * @return void
     */
    public function processAssert(CatalogProductView $productView, DownloadableProduct $product, Browser $browser)
    {
        $browser->open($_ENV['app_frontend_url'] . $product->getUrlKey() . '.html');

        $fixtureSampleLinks = $this->prepareFixtureData($product);
        $pageOptions = $productView->getViewBlock()->getOptions($product);
        $pageSampleLinks = isset($pageOptions['downloadable_options']['downloadable_sample'])
            ? $this->preparePageData($pageOptions['downloadable_options']['downloadable_sample'])
            : [];
        $error = $this->verifyData($fixtureSampleLinks, $pageSampleLinks);
        \PHPUnit_Framework_Assert::assertEmpty($error, $error);
    }

    /**
     * Prepare fixture data for verify.
     *
     * @param DownloadableProduct $product
     * @return array
     */
    protected function prepareFixtureData(DownloadableProduct $product)
    {
        $data = $this->sortDataByPath($product->getDownloadableSample(), 'downloadable/sample::sort_order');

        foreach ($data['downloadable']['sample'] as $key => $link) {
            $link = array_intersect_key($link, array_flip($this->linkField));
            $data['downloadable']['sample'][$key] = $link;
        }
        $data = array_intersect_key($data, array_flip($this->downloadableSampleField));

        return $data;
    }

    /**
     * Prepare page data for verify.
     *
     * @param array $data
     * @return array
     */
    protected function preparePageData(array $data)
    {
        foreach ($data['downloadable']['sample'] as $key => $link) {
            $link = array_intersect_key($link, array_flip($this->linkField));
            $data['downloadable']['sample'][$key] = $link;
        }
        $data = array_intersect_key($data, array_flip($this->downloadableSampleField));

        return $data;
    }

    /**
     * Returns a string representation of the object.
     *
     * @return string
     */
    public function toString()
    {
        return 'Sample links for downloadable product are present on product page.';
    }
}


text:
/*
 * 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 VMware, Inc. 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 VMWARE, INC. 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.
 */

/****************************************************************************/
/* single memory argument */

OPCODE(lldt, lldt, lldt, 0, MEMARG(OPSZ_2))
OPCODE(ltr, ltr, ltr, 0, MEMARG(OPSZ_2))
OPCODE(verr, verr, verr, 0, MEMARG(OPSZ_2))
OPCODE(verw, verw, verw, 0, MEMARG(OPSZ_2))
OPCODE(lgdt, lgdt, lgdt, 0, MEMARG(OPSZ_lgdt))
OPCODE(lidt, lidt, lidt, 0, MEMARG(OPSZ_lidt))
OPCODE(lmsw, lmsw, lmsw, 0, MEMARG(OPSZ_2))
OPCODE(invlpg, invlpg, invlpg, 0, MEMARG(OPSZ_lea))
OPCODE(fxrstor, fxrstor, fxrstor, 0, MEMARG(OPSZ_fxrstor))
OPCODE(ldmxcsr, ldmxcsr, ldmxcsr, 0, MEMARG(OPSZ_4))
OPCODE(nop_modrm, nop_modrm, nop_modrm, 0, MEMARG(OPSZ_4))
OPCODE(prefetchnta, prefetchnta, prefetchnta, 0, MEMARG(OPSZ_prefetch))
OPCODE(prefetcht0, prefetcht0, prefetcht0, 0, MEMARG(OPSZ_prefetch))
OPCODE(prefetcht1, prefetcht1, prefetcht1, 0, MEMARG(OPSZ_prefetch))
OPCODE(prefetcht2, prefetcht2, prefetcht2, 0, MEMARG(OPSZ_prefetch))
OPCODE(prefetch, prefetch, prefetch, 0, MEMARG(OPSZ_prefetch))
OPCODE(prefetchw, prefetchw, prefetchw, 0, MEMARG(OPSZ_prefetch))
OPCODE(clflush, clflush, clflush, 0, MEMARG(OPSZ_clflush))
OPCODE(fldenv, fldenv, fldenv, 0, MEMARG(OPSZ_fldenv))
OPCODE(fldcw, fldcw, fldcw, 0, MEMARG(OPSZ_2))
OPCODE(frstor, frstor, frstor, 0, MEMARG(OPSZ_frstor))
OPCODE(fcom, fcom, fcom, 0, MEMARG(OPSZ_8))
OPCODE(fcomp, fcomp, fcomp, 0, MEMARG(OPSZ_8))
OPCODE(sldt, sldt, sldt, 0, MEMARG(OPSZ_2))
OPCODE(str, str, str, 0, MEMARG(OPSZ_2))
OPCODE(sgdt, sgdt, sgdt, 0, MEMARG(OPSZ_sgdt))
OPCODE(sidt, sidt, sidt, 0, MEMARG(OPSZ_sidt))
OPCODE(smsw, smsw, smsw, 0, MEMARG(OPSZ_2))
OPCODE(fxsave, fxsave, fxsave, 0, MEMARG(OPSZ_fxsave))
OPCODE(stmxcsr, stmxcsr, stmxcsr, 0, MEMARG(OPSZ_4))
OPCODE(fnstenv, fnstenv, fnstenv, 0, MEMARG(OPSZ_fnstenv))
OPCODE(fnstcw, fnstcw, fnstcw, 0, MEMARG(OPSZ_2))
OPCODE(fnsave, fnsave, fnsave, 0, MEMARG(OPSZ_fnsave))
OPCODE(fnstsw, fnstsw, fnstsw, 0, MEMARG(OPSZ_2))
OPCODE(inc, inc, inc, 0, MEMARG(OPSZ_4))
OPCODE(dec, dec, dec, 0, MEMARG(OPSZ_4))
OPCODE(not, not, not, 0, MEMARG(OPSZ_4))
OPCODE(neg, neg, neg, 0, MEMARG(OPSZ_4))
OPCODE(fst, fst, fst, 0, MEMARG(OPSZ_4))
OPCODE(fstp, fstp, fstp, 0, MEMARG(OPSZ_10))
OPCODE(fld, fld, fld, 0, MEMARG(OPSZ_10))
OPCODE(fist, fist, fist, 0, MEMARG(OPSZ_4))
OPCODE(fistp, fistp, fistp, 0, MEMARG(OPSZ_4))
OPCODE(fisttp, fisttp, fisttp, 0, MEMARG(OPSZ_4))
OPCODE(fbstp, fbstp, fbstp, 0, MEMARG(OPSZ_10))
OPCODE(fild, fild, fild, 0, MEMARG(OPSZ_4))
OPCODE(fbld, fbld, fbld, 0, MEMARG(OPSZ_10))
OPCODE(fiadd, fiadd, fiadd, 0, MEMARG(OPSZ_4))
OPCODE(fimul, fimul, fimul, 0, MEMARG(OPSZ_4))
OPCODE(fidiv, fidiv, fidiv, 0, MEMARG(OPSZ_4))
OPCODE(fidivr, fidivr, fidivr, 0, MEMARG(OPSZ_4))
OPCODE(fisub, fisub, fisub, 0, MEMARG(OPSZ_4))
OPCODE(fisubr, fisubr, fisubr, 0, MEMARG(OPSZ_4))
OPCODE(ficom, ficom, ficom, 0, MEMARG(OPSZ_4))
OPCODE(ficomp, ficomp, ficomp, 0, MEMARG(OPSZ_4))
OPCODE(imul1, imul, imul_1, 0, MEMARG(OPSZ_1))
OPCODE(imul4, imul, imul_4, 0, MEMARG(OPSZ_4))
OPCODE(mul1, mul, mul_1, 0, MEMARG(OPSZ_1))
OPCODE(mul4, mul, mul_4, 0, MEMARG(OPSZ_4))
OPCODE(div1, div, div_1, 0, MEMARG(OPSZ_1))
OPCODE(div4, div, div_4, 0, MEMARG(OPSZ_4))
OPCODE(idiv1, idiv, idiv_1, 0, MEMARG(OPSZ_1))
OPCODE(idiv4, idiv, idiv_4, 0, MEMARG(OPSZ_4))
OPCODE(pop, pop, pop, 0, MEMARG(OPSZ_4x8))
OPCODE(push, push, push, 0, MEMARG(OPSZ_4x8))
OPCODE(cmpxchg8b, cmpxchg8b, cmpxchg8b, 0, MEMARG(OPSZ_8))
OPCODE(jmp_ind, jmp_ind, jmp_ind, 0, MEMARG(OPSZ_4x8))
OPCODE(call_ind, call_ind, call_ind, 0, MEMARG(OPSZ_4x8))
OPCODE(vmptrst, vmptrst, vmptrst, X64_ONLY, MEMARG(OPSZ_8))
OPCODE(vmptrld, vmptrld, vmptrld, X64_ONLY, MEMARG(OPSZ_8))
OPCODE(vmxon, vmxon, vmxon, X64_ONLY, MEMARG(OPSZ_8))
OPCODE(vmclear, vmclear, vmclear, X64_ONLY, MEMARG(OPSZ_8))
OPCODE(xsave, xsave, xsave, 0, MEMARG(OPSZ_xsave))
OPCODE(xrstor, xrstor, xrstor, 0, MEMARG(OPSZ_xsave))
OPCODE(xsaveopt, xsaveopt, xsaveopt, 0, MEMARG(OPSZ_xsave))

/****************************************************************************/
/* single immed argument */

OPCODE(out_1_imm, out, out_1_imm, 0, IMMARG(OPSZ_1))
OPCODE(out_4_imm, out, out_4_imm, 0, IMMARG(OPSZ_1))
OPCODE(in_1_imm, in, in_1_imm, 0, IMMARG(OPSZ_1))
OPCODE(in_4_imm, in, in_4_imm, 0, IMMARG(OPSZ_1))
OPCODE(aam, aam, aam, X86_ONLY, IMMARG(OPSZ_1))
OPCODE(aad, aad, aad, X86_ONLY, IMMARG(OPSZ_1))
OPCODE(ret_imm, ret, ret_imm, 0, IMMARG(OPSZ_2))
OPCODE(ret_far_imm, ret_far, ret_far_imm, 0, IMMARG(OPSZ_2))
OPCODE(push_imm, push_imm, push_imm, 0, IMMARG(OPSZ_4))
OPCODE(int, int, int, 0, IMMARG(OPSZ_1))

/****************************************************************************/
/* single register argument */

OPCODE(bswap, bswap, bswap, 0, REGARG(EAX))
OPCODE(fcomi, fcomi, fcomi, 0, REGARG(ST0))
OPCODE(fcomip, fcomip, fcomip, 0, REGARG(ST0))
OPCODE(fucomi, fucomi, fucomi, 0, REGARG(ST0))
OPCODE(fucomip, fucomip, fucomip, 0, REGARG(ST0))
OPCODE(fucom, fucom, fucom, 0, REGARG(ST0))
OPCODE(fucomp, fucomp, fucomp, 0, REGARG(ST0))
OPCODE(ffree, ffree, ffree, 0, REGARG(ST0))
OPCODE(faddp, faddp, faddp, 0, REGARG(ST0))
OPCODE(fmulp, fmulp, fmulp, 0, REGARG(ST0))
OPCODE(fdivp, fdivp, fdivp, 0, REGARG(ST0))
OPCODE(fdivrp, fdivrp, fdivrp, 0, REGARG(ST0))
OPCODE(fsubp, fsubp, fsubp, 0, REGARG(ST0))
OPCODE(fsubrp, fsubrp, fsubrp, 0, REGARG(ST0))
OPCODE(fxch, fxch, fxch, 0, REGARG(ST0))
OPCODE(ffreep, ffreep, ffreep, 0, REGARG(ST0))

/****************************************************************************/
/* single pc/instr argument */

OPCODE(jmp, jmp, jmp, 0, TGTARG)
OPCODE(jmp_short, jmp_short, jmp_short, 0, TGTARG)
OPCODE(jecxz, jecxz, jecxz, 0, TGTARG)
OPCODE(jcxz, jcxz, jcxz, X86_ONLY, TGTARG)
OPCODE(loopne, loopne, loopne, 0, TGTARG)
OPCODE(loope, loope, loope, 0, TGTARG)
OPCODE(loop, loop, loop, 0, TGTARG)
OPCODE(jmp_far, jmp_far, jmp_far, X86_ONLY, opnd_create_far_pc(0x1234, 0))
OPCODE(jmp_far_ind, jmp_far_ind, jmp_far_ind, 0, MEMARG(OPSZ_6))
OPCODE(call, call, call, 0, TGTARG)
OPCODE(call_far, call_far, call_far, X86_ONLY, opnd_create_far_pc(0x1234, 0))
OPCODE(call_far_ind, call_far_ind, call_far_ind, 0, MEMARG(OPSZ_6))


text:
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

import javax.swing.JFrame;
import javax.swing.JOptionPane;

public class MenuAbout_ActionListener implements ActionListener{

	JFrame ptrFrame = null;

	public MenuAbout_ActionListener(JFrame ptrFrame){
		this.ptrFrame = ptrFrame;
	}

	public void actionPerformed(ActionEvent e){

		//JOptionPane.showMessageDialog(ptrFrame, "Desenvolvido por DUNEDIN SOFTWARE LTDA\nContato: marketing@dunedin.com.br", "DUNEDIN SOFTWARE LTDA", JOptionPane.INFORMATION_MESSAGE, iconBotom);
		JOptionPane.showMessageDialog(ptrFrame, "\nDUNEDIN SOFTWARE LTDA\n\nmarketing@dunedin.com.br", "Desenvolvedor", JOptionPane.PLAIN_MESSAGE);

	}

}


text:
package terraform

import (
	"fmt"

	"github.com/hashicorp/terraform/addrs"
	"github.com/hashicorp/terraform/providers"
	"github.com/hashicorp/terraform/tfdiags"
)

// ImportStateTransformer is a GraphTransformer that adds nodes to the
// graph to represent the imports we want to do for resources.
type ImportStateTransformer struct {
	Targets []*ImportTarget
}

func (t *ImportStateTransformer) Transform(g *Graph) error {
	for _, target := range t.Targets {
		// The ProviderAddr may not be supplied for non-aliased providers.
		// This will be populated if the targets come from the cli, but tests
		// may not specify implied provider addresses.
		providerAddr := target.ProviderAddr
		if providerAddr.ProviderConfig.Type == "" {
			providerAddr = target.Addr.Resource.Resource.DefaultProviderConfig().Absolute(target.Addr.Module)
		}

		node := &graphNodeImportState{
			Addr:         target.Addr,
			ID:           target.ID,
			ProviderAddr: providerAddr,
		}
		g.Add(node)
	}
	return nil
}

type graphNodeImportState struct {
	Addr             addrs.AbsResourceInstance // Addr is the resource address to import into
	ID               string                    // ID is the ID to import as
	ProviderAddr     addrs.AbsProviderConfig   // Provider address given by the user, or implied by the resource type
	ResolvedProvider addrs.AbsProviderConfig   // provider node address after resolution

	states []providers.ImportedResource
}

var (
	_ GraphNodeSubPath           = (*graphNodeImportState)(nil)
	_ GraphNodeEvalable          = (*graphNodeImportState)(nil)
	_ GraphNodeProviderConsumer  = (*graphNodeImportState)(nil)
	_ GraphNodeDynamicExpandable = (*graphNodeImportState)(nil)
)

func (n *graphNodeImportState) Name() string {
	return fmt.Sprintf("%s (import id %q)", n.Addr, n.ID)
}

// GraphNodeProviderConsumer
func (n *graphNodeImportState) ProvidedBy() (addrs.AbsProviderConfig, bool) {
	// We assume that n.ProviderAddr has been properly populated here.
	// It's the responsibility of the code creating a graphNodeImportState
	// to populate this, possibly by calling DefaultProviderConfig() on the
	// resource address to infer an implied provider from the resource type
	// name.
	return n.ProviderAddr, false
}

// GraphNodeProviderConsumer
func (n *graphNodeImportState) SetProvider(addr addrs.AbsProviderConfig) {
	n.ResolvedProvider = addr
}

// GraphNodeSubPath
func (n *graphNodeImportState) Path() addrs.ModuleInstance {
	return n.Addr.Module
}

// GraphNodeEvalable impl.
func (n *graphNodeImportState) EvalTree() EvalNode {
	var provider providers.Interface

	// Reset our states
	n.states = nil

	// Return our sequence
	return &EvalSequence{
		Nodes: []EvalNode{
			&EvalGetProvider{
				Addr:   n.ResolvedProvider,
				Output: &provider,
			},
			&EvalImportState{
				Addr:     n.Addr.Resource,
				Provider: &provider,
				ID:       n.ID,
				Output:   &n.states,
			},
		},
	}
}

// GraphNodeDynamicExpandable impl.
//
// We use DynamicExpand as a way to generate the subgraph of refreshes
// and state inserts we need to do for our import state. Since they're new
// resources they don't depend on anything else and refreshes are isolated
// so this is nearly a perfect use case for dynamic expand.
func (n *graphNodeImportState) DynamicExpand(ctx EvalContext) (*Graph, error) {
	var diags tfdiags.Diagnostics

	g := &Graph{Path: ctx.Path()}

	// nameCounter is used to de-dup names in the state.
	nameCounter := make(map[string]int)

	// Compile the list of addresses that we'll be inserting into the state.
	// We do this ahead of time so we can verify that we aren't importing
	// something that already exists.
	addrs := make([]addrs.AbsResourceInstance, len(n.states))
	for i, state := range n.states {
		addr := n.Addr
		if t := state.TypeName; t != "" {
			addr.Resource.Resource.Type = t
		}

		// Determine if we need to suffix the name to de-dup
		key := addr.String()
		count, ok := nameCounter[key]
		if ok {
			count++
			addr.Resource.Resource.Name += fmt.Sprintf("-%d", count)
		}
		nameCounter[key] = count

		// Add it to our list
		addrs[i] = addr
	}

	// Verify that all the addresses are clear
	state := ctx.State()
	for _, addr := range addrs {
		existing := state.ResourceInstance(addr)
		if existing != nil {
			diags = diags.Append(tfdiags.Sourceless(
				tfdiags.Error,
				"Resource already managed by Terraform",
				fmt.Sprintf("Terraform is already managing a remote object for %s. To import to this address you must first remove the existing object from the state.", addr),
			))
			continue
		}
	}
	if diags.HasErrors() {
		// Bail out early, then.
		return nil, diags.Err()
	}

	// For each of the states, we add a node to handle the refresh/add to state.
	// "n.states" is populated by our own EvalTree with the result of
	// ImportState. Since DynamicExpand is always called after EvalTree, this
	// is safe.
	for i, state := range n.states {
		g.Add(&graphNodeImportStateSub{
			TargetAddr:       addrs[i],
			State:            state,
			ResolvedProvider: n.ResolvedProvider,
		})
	}

	// Root transform for a single root
	t := &RootTransformer{}
	if err := t.Transform(g); err != nil {
		return nil, err
	}

	// Done!
	return g, diags.Err()
}

// graphNodeImportStateSub is the sub-node of graphNodeImportState
// and is part of the subgraph. This node is responsible for refreshing
// and adding a resource to the state once it is imported.
type graphNodeImportStateSub struct {
	TargetAddr       addrs.AbsResourceInstance
	State            providers.ImportedResource
	ResolvedProvider addrs.AbsProviderConfig
}

var (
	_ GraphNodeSubPath  = (*graphNodeImportStateSub)(nil)
	_ GraphNodeEvalable = (*graphNodeImportStateSub)(nil)
)

func (n *graphNodeImportStateSub) Name() string {
	return fmt.Sprintf("import %s result", n.TargetAddr)
}

func (n *graphNodeImportStateSub) Path() addrs.ModuleInstance {
	return n.TargetAddr.Module
}

// GraphNodeEvalable impl.
func (n *graphNodeImportStateSub) EvalTree() EvalNode {
	// If the Ephemeral type isn't set, then it is an error
	if n.State.TypeName == "" {
		err := fmt.Errorf("import of %s didn't set type", n.TargetAddr.String())
		return &EvalReturnError{Error: &err}
	}

	state := n.State.AsInstanceObject()

	var provider providers.Interface
	var providerSchema *ProviderSchema
	return &EvalSequence{
		Nodes: []EvalNode{
			&EvalGetProvider{
				Addr:   n.ResolvedProvider,
				Output: &provider,
				Schema: &providerSchema,
			},
			&EvalRefresh{
				Addr:           n.TargetAddr.Resource,
				ProviderAddr:   n.ResolvedProvider,
				Provider:       &provider,
				ProviderSchema: &providerSchema,
				State:          &state,
				Output:         &state,
			},
			&EvalImportStateVerify{
				Addr:  n.TargetAddr.Resource,
				State: &state,
			},
			&EvalWriteState{
				Addr:           n.TargetAddr.Resource,
				ProviderAddr:   n.ResolvedProvider,
				ProviderSchema: &providerSchema,
				State:          &state,
			},
		},
	}
}


text:
<?php if (!defined('IDIR')) { die; }

/**
* trubb
/**
* trubb_001 Associate Users
*
* @package			ImpEx.trubb
*
*/
class trubb_002 extends trubb_000
{
	var $_version 		= '0.0.1';
	var $_dependent 	= '001';
	var $_modulestring 	= 'Associate Users';

	function trubb_002()
	{
	}

	function init(&$sessionobject, &$displayobject, &$Db_target, &$Db_source)
	{
		$proceed = $this->check_order($sessionobject,$this->_dependent);
		if ($proceed)
		{
			if($sessionobject->get_session_var('associateperpage') == 0)
			{
				$sessionobject->add_session_var('associateperpage','25');
			}

			$displayobject->update_basic('title','Assocatie users');
			$displayobject->update_html($displayobject->do_form_header('index','002'));
			$displayobject->update_html($displayobject->make_hidden_code('002','WORKING'));
			$displayobject->update_html($displayobject->make_hidden_code('associateusers','1'));
			$displayobject->update_html($displayobject->make_table_header('Associate Users'));
			$displayobject->update_html($displayobject->make_description('
Warning !!
 Assosiated users will currently be deleted if you run the import user module twice as it removes users with an importuserid'));
			$displayobject->update_html($displayobject->make_description('
If you want to associate a trubb user (in the left column) with an existing vBulletin user,
					enter the user id number of the vBulletin user in the box provided, and click the Associate Users button.

					To view the list of existing vBulletin users, together with their userid'));
			$displayobject->update_html($displayobject->make_input_code('Users per page','associateperpage',$sessionobject->get_session_var('associateperpage'),1,60));
			$displayobject->update_html($displayobject->do_form_footer('Continue',''));

			$sessionobject->add_session_var('doassociate','0');
			$sessionobject->add_session_var('associatestartat','0');
		}
		else
		{
			$sessionobject->add_error('notice',
									 $this->_modulestring,
									 "$this->_modulestring:init Called when dependent not complete.",
									 'Call the oduiles in the correct order');
			$displayobject->update_html($displayobject->do_form_header('index',''));
			$displayobject->update_html($displayobject->make_description('
This module is dependent on ' . $sessionobject->get_module_title($this->_dependent) . ' cannot run until that is complete.'));
			$displayobject->update_html($displayobject->do_form_footer('Continue',''));
			$sessionobject->set_session_var('002','FALSE');
			$sessionobject->set_session_var('module','000');
		}
	}

	function resume(&$sessionobject, &$displayobject, &$Db_target, &$Db_source)
	{
		// Turn off the modules display
		$displayobject->update_basic('displaymodules','FALSE');

		// Get some more usable local vars
		$associate_start_at		= $sessionobject->get_session_var('associatestartat');
		$associate_per_page		= $sessionobject->get_session_var('associateperpage');
		$target_database_type	= $sessionobject->get_session_var('targetdatabasetype');
		$target_table_prefix	= $sessionobject->get_session_var('targettableprefix');
		$source_database_type	= $sessionobject->get_session_var('sourcedatabasetype');
		$source_table_prefix	= $sessionobject->get_session_var('sourcetableprefix');

		// Get some usable variables
		$associate_users		= 	$sessionobject->get_session_var('associateusers');
		$do_associate			=	$sessionobject->get_session_var('doassociate');
		$class_num				= 	substr(get_class($this) , -3);

		// Start the timings
		if(!$sessionobject->get_session_var($class_num . '_start'))
		{
			$sessionobject->timing($class_num, 'start', $sessionobject->get_session_var('autosubmit'));
		}

		//	List from the start_at number
		if ($associate_users == 1)
		{
			// Get a list of the trubb members in this current selection
			$userarray = $this->get_trubb_members_list($Db_source, $source_database_type, $source_table_prefix, $associate_start_at, $associate_per_page);

			// Build a list of the ubb users with a box to enter a vB user id into
			$displayobject->update_html($displayobject->do_form_header('index','002'));
			$displayobject->update_html($displayobject->make_table_header('Association list'));
			$displayobject->update_html($displayobject->make_description('Put the exsisting vbulletin user id next to the trubb user that you wish to associate them with'));

			// Set up list variables
			$any_more = false;
			$counter  = 1;

			// Build the list
			foreach ($userarray as $userid => $username )
			{
				$displayobject->update_html($displayobject->make_input_code("$counter) Userid - " . $userid . " :: " . $username ,'user_to_ass_' . $userid,'',10));
				$any_more = true;
				$counter++;
			}

			// If there are not any more, tell the user and quit out for them.
			if(!$any_more)
			{
				$displayobject->update_html($displayobject->make_description('There are NO more vBulletin users, quit to continue.'));
			}
			else
			{
				$sessionobject->set_session_var('associatestartat',$associate_start_at + $associate_per_page);
			}

			// Continue with the association
			$sessionobject->set_session_var('associateusers','0');
			$sessionobject->set_session_var('doassociate','1');
			$displayobject->update_html($displayobject->make_hidden_code('doassociate','1'));
			$displayobject->update_html($displayobject->do_form_footer('Associate',''));

			// Quit button
			$displayobject->update_html($displayobject->do_form_header('index','002'));
			$displayobject->update_html($displayobject->make_hidden_code('associateusers','2'));
			$displayobject->update_html($displayobject->make_hidden_code('doassociate','0'));
			$displayobject->update_html($displayobject->do_form_footer('Quit',''));
		}

		//	If there are some to assosiate
		if ($do_associate == 1)
		{
			$displayobject->update_html($displayobject->display_now('
Associating the users...
'));

			$users_to_associate = $sessionobject->get_users_to_associate();

			foreach ($users_to_associate as $key => $value)
			{
				if($this->associate_user($Db_target, $target_database_type, $target_table_prefix, substr(key($value),12),  current($value)))
				{
					$displayobject->update_html($displayobject->display_now('
trubb user ' .  substr(key($value),12) . ' done.
'));
					$sessionobject->add_session_var($class_num . '_objects_done',intval($sessionobject->get_session_var($class_num . '_objects_done')) + 1 );
				}
				else
				{
					$sessionobject->set_session_var($class_num . '_objects_failed',$sessionobject->get_session_var($class_num . '_objects_failed') + 1 );
					$displayobject->update_html($displayobject->display_now('
' . substr(key($value),12) . ' NOT done. It is most likely that vBulletin user ' . current($value) . ' dose not exsist.
'));
				}
			}

			$sessionobject->delete_users_to_associate();

			// Continue with the association
			$sessionobject->set_session_var('associateusers','1');
			$sessionobject->set_session_var('doassociate','0');
			$displayobject->update_html($displayobject->display_now('
Continuing with the association.
'));
			$displayobject->update_html($displayobject->print_redirect('index.php','1'));
		}

		//	Finish the module
		if ($associate_users == 2)
		{
			$sessionobject->set_session_var('002','FINISHED');
			$sessionobject->set_session_var('module','000');

			$displayobject->update_html($displayobject->display_now('
Quitting back to main menu.
'));
			$displayobject->update_html($displayobject->print_redirect('index.php','1'));
		}
	}
}// End class
# Autogenerated on : November 16, 2004, 8:22 pm
# By ImpEx-generator 1.0.
/*======================================================================*/
?>


text:
using System.ComponentModel.Composition.Hosting;
using System.Windows;
using Prism.Mef;
using Prism.Regions;
using StickEmApp.Windows.Infrastructure.Behaviors;

namespace StickEmApp.Windows
{
    public class StickEmAppBootStrapper : MefBootstrapper
    {
        protected override void ConfigureAggregateCatalog()
        {
            AggregateCatalog.Catalogs.Add(new AssemblyCatalog(typeof(StickEmAppBootStrapper).Assembly));
            AggregateCatalog.Catalogs.Add(new AssemblyCatalog(typeof(UnitOfWork).Assembly));
        }

        protected override void InitializeShell()
        {
            base.InitializeShell();

            Application.Current.MainWindow = (Shell)Shell;
            Application.Current.MainWindow.Show();
        }

        protected override IRegionBehaviorFactory ConfigureDefaultRegionBehaviors()
        {
            var factory = base.ConfigureDefaultRegionBehaviors();

            factory.AddIfMissing("AutoPopulateExportedViewsBehavior", typeof(AutoPopulateExportedViewsBehavior));

            return factory;
        }

        protected override DependencyObject CreateShell()
        {
            return Container.GetExportedValue<Shell>();
        }
    }
}


text:
from toontown.estate.DistributedLawnDecorAI import DistributedLawnDecorAI
from toontown.estate import GardenGlobals

class DistributedPlantBaseAI(DistributedLawnDecorAI):
    notify = directNotify.newCategory("DistributedPlantBaseAI")

    def __init__(self, air, gardenManager, ownerIndex):
        DistributedLawnDecorAI.__init__(self, air, gardenManager, ownerIndex)

        self.typeIndex = None
        self.waterLevel = None
        self.growthLevel = None
        self.timestamp = None

    def d_setTypeIndex(self, index):
        self.sendUpdate('setTypeIndex', [index])

    def getTypeIndex(self):
        return self.typeIndex

    def d_setWaterLevel(self, waterLevel):
        self.sendUpdate('setWaterLevel', [waterLevel])

    def getWaterLevel(self):
        return self.waterLevel

    def d_setGrowthLevel(self, growthLevel):
        self.sendUpdate('setGrowthLevel', [growthLevel])

    def getGrowthLevel(self):
        return self.growthLevel

    def getGrowthThresholds(self):
        return GardenGlobals.PlantAttributes[self.typeIndex]['growthThresholds']

    def getGrowthState(self):
        state = 0
        for v in self.getGrowthThresholds():
            if self.growthLevel >= v:
                state += 1
        return state

    def waterPlant(self):
        avId = self.air.getAvatarIdFromSender()
        av = self.air.doId2do.get(avId)
        if not av:
            return

        if self.waterLevel < GardenGlobals.getMaxWateringCanPower():
            self.waterLevel += GardenGlobals.getWateringCanPower(av.wateringCan, av.wateringCanSkill)
            self.d_setWaterLevel(self.waterLevel)

            self.gardenManager.updateGardenData()

        self.setMovie(GardenGlobals.MOVIE_WATER, self.air.getAvatarIdFromSender())

    def waterPlantDone(self):
        avId = self.air.getAvatarIdFromSender()
        av = self.air.doId2do.get(avId)
        if not av:
            return

        currSkill = av.getWateringCanSkill()
        if self.waterLevel < GardenGlobals.getMaxWateringCanPower():
            av.b_setWateringCanSkill(currSkill + 1 + self.getGrowthState())

        self.setMovie(GardenGlobals.MOVIE_CLEAR, self.air.getAvatarIdFromSender())

    def construct(self, gardenData):
        DistributedLawnDecorAI.construct(self, gardenData)

        self.typeIndex = gardenData.getUint8()
        self.waterLevel = gardenData.getInt8()
        self.growthLevel = gardenData.getInt8()

        self.timestamp = gardenData.getUint32()

        self.updateFromTimestamp()

    def updateFromTimestamp(self):
        seconds = self.gardenManager.getTimestamp() - self.timestamp
        cycles = seconds / GardenGlobals.GROWTH_INTERVAL
        unwateredCycles = abs(self.growthLevel - cycles)
        self.waterLevel = max(self.waterLevel - unwateredCycles, -1)
        if self.waterLevel < 0:
            # This tree is wilted, don't grow it.
            return

        if self.waterLevel > 127:
            # Oh no, a broken garden!
            self.waterLevel = 0

        self.growthLevel = min(cycles, GardenGlobals.MAX_GROWTH_LEVEL)

    def pack(self, gardenData):
        DistributedLawnDecorAI.pack(self, gardenData)

        gardenData.addUint8(self.typeIndex)
        gardenData.addInt8(self.waterLevel)
        gardenData.addInt8(self.growthLevel)
        gardenData.addUint32(self.timestamp)


text:
<?php

declare(strict_types=1);

namespace ApiPlatform\Core\Tests\Fixtures\TestBundle\Entity;

use ApiPlatform\Core\Annotation\ApiResource;
use ApiPlatform\Core\Tests\Fixtures\TestBundle\Dto\NonResourceClass;
use Doctrine\ORM\Mapping as ORM;

/**
 * @ApiResource
 * @ORM\Entity
 */
class NonRelationResource
{
    /**
     * @ORM\Column(type="integer")
     * @ORM\Id
     * @ORM\GeneratedValue(strategy="AUTO")
     */
    private $id;

    /**
     * @var NonResourceClass
     */
    public $relation;

    public function getId()
    {
        return $this->id;
    }
}


text:
<!DOCTYPE html>

    <meta http-equiv="refresh" content="0;URL=../../../glium/uniforms/struct.EmptyUniforms.html">

Redirecting to ../../../glium/uniforms/struct.EmptyUniforms.html...


text:
package org.apache.hive.streaming;

import java.util.List;

import org.apache.hadoop.hive.ql.metadata.Table;

/**
 * Helper interface to get connection related information.
 */
public interface ConnectionInfo {

  /**
   * Get metastore URI that metastore client uses.
   *
   * @return - metastore URI used by client
   */
  String getMetastoreUri();

  /**
   * Get the table used by streaming connection.
   *
   * @return - table
   */
  Table getTable();

  /**
   * Get any static partitions specified during streaming connection creation.
   *
   * @return - static partition values
   */
  List<String> getStaticPartitionValues();

  /**
   * Get if the specified table is partitioned table or not.
   *
   * @return - true if partitioned table else false
   */
  boolean isPartitionedTable();

  /**
   * Get if dynamic partitioning is used.
   *
   * @return - true if dynamic partitioning case else false
   */
  boolean isDynamicPartitioning();

  /**
   * Get agent info that is set during streaming connection.
   *
   * @return - agent info
   */
  String getAgentInfo();
}


text:
require 'rake'

module DynaModel
  module Tasks
    extend self
    def included_models
      dir = ENV['DIR'].to_s != '' ? ENV['DIR'] : Rails.root.join("app/models")
      DynaModel::Config.logger.info "Loading models from: #{dir}"
      included = []
      Dir.glob(File.join("#{dir}/**/*.rb")).each do |path|
        model_filename = path[/#{Regexp.escape(dir.to_s)}\/([^\.]+).rb/, 1]
        next if model_filename.match(/^concerns\//i) # Skip concerns/ folder

        begin
          klass = model_filename.camelize.constantize
        rescue NameError
          require(path) ? retry : raise
        rescue LoadError => e
          # Try non-namespaced class name instead...
          klass = model_filename.camelize.split("::").last.constantize
        end

        # Skip if the class doesn't have DynaModel integration
        next unless klass.respond_to?(:dynamo_db_table)

        included << klass
      end
      included
    end
  end
end

namespace :ddb do
  desc 'Create a DynamoDB table'
  task :create => :environment do
    raise "expected usage: rake ddb:create CLASS=User" unless ENV['CLASS']
    options = {}
    options.merge!(shard_name: ENV['SHARD']) if ENV['SHARD']
    if ENV["CLASS"] == "all"
      DynaModel::Tasks.included_models.each do |klass|
        DynaModel::Config.logger.info "Creating table for #{klass}..."
        begin
          klass.create_table(options)
        rescue Exception => e
          DynaModel::Config.logger.info "Could not create table! #{e.inspect}"
        end
      end
    else
      ENV['CLASS'].constantize.create_table(options)
    end
  end

  desc 'Resize a DynamoDB table read/write provision'
  task :resize => :environment do
    raise "expected usage: rake ddb:resize CLASS=User" unless ENV['CLASS']
    options = {}
    options.merge!(shard_name: ENV['SHARD']) if ENV['SHARD']
    options.merge!(read_capacity_units: ENV['READ'].to_i) if ENV['READ']
    options.merge!(write_capacity_units: ENV['WRITE'].to_i) if ENV['WRITE']
    ENV['CLASS'].constantize.resize_table(options)
  end

  desc 'Destroy a DynamoDB table'
  task :destroy => :environment do
    raise "expected usage: rake ddb:destroy CLASS=User" unless ENV['CLASS']
    options = {}
    options.merge!(shard_name: ENV['SHARD']) if ENV['SHARD']
    if ENV["CLASS"] == "all"
      DynaModel::Tasks.included_models.each do |klass|
        DynaModel::Config.logger.info "Destroying table for #{klass}..."
        begin
          klass.delete_table(options)
        rescue Exception => e
          DynaModel::Config.logger.info "Could not create table! #{e.inspect}"
        end
      end
    else
      ENV['CLASS'].constantize.delete_table(options)
    end
  end
end


text:
import { NgModule } from '@angular/core';
import { HttpModule } from '@angular/http';
import { AppComponent } from './app.component';

import { TranslateModule} from "ng2-translate";
import { AppRoutingModule } from './app-routing.module';

import { BrowserModule } from '@angular/platform-browser';
import {FormsModule} from "@angular/forms";
import {MaterialModule} from "@angular/material";
import {LoggedInGuard} from "../services/logged-in.guard";
import {UserService} from "../services/user";
@NgModule({
  imports: [
    MaterialModule.forRoot(),
    HttpModule,
    AppRoutingModule,
    BrowserModule,
    FormsModule
  ],
  exports: [ TranslateModule],
  declarations: [ AppComponent ],
  providers:[LoggedInGuard,UserService],
  bootstrap: [ AppComponent ],
})//SharedModule.forRoot(),
export class AppModule { }


text:
require 'fileutils'
require 'timeout'

module SprocketsDerailleur
  module FileStoreExtension
    def lock
      @lock ||= begin
        FileUtils.mkdir_p @root
        File.open(@root.join("lock"), File::RDWR|File::CREAT)
      end
    end

    # Lookup value in cache
    def [](key)
      with_lock(File::LOCK_SH) { super }
    end

    # Save value to cache
    def []=(key, value)
      with_lock(File::LOCK_EX) { super }
    end

    def with_lock(type)
      Timeout::timeout(SprocketsDerailleur.configuration.file_lock_timeout) { lock.flock(type) }
      yield
    ensure
      lock.flock(File::LOCK_UN)
    end
  end
end


text:
| Filename | line # | TODO
|:------|:------:|:------
| modules/dashboard-nav/ui/controllers.js | 15 | Cache navItems. There's no need to keep reloading
| modules/dashboard-nav/ui/controllers.js | 19 | What if this fails?
| modules/page/app/routes.js | 109 | add caching and optimizations
| modules/page/ui/controllers.js | 2 | Move this
| modules/page/ui/controllers.js | 95 | Only update dirty fields
| modules/page/ui/controllers.js | 107 | Make this more generic to handle future errors
| modules/page/ui/services.js | 7 | Add failure fallbacks
| modules/page/ui/services.js | 40 | make sure status is 204?
| modules/snippet/app/models.js | 25 | handle err
| modules/snippet/ui/controllers.js | 52 | Handle other errors
| modules/snippet/ui/controllers.js | 67 | Only update dirty fields
| modules/snippet/ui/controllers.js | 68 | Handle errors
| modules/snippet/ui/services.js | 7 | Add failure fallbacks
| modules/snippet/ui/services.js | 40 | make sure status is 204?
| modules/template/app/models.js | 123 | Should we output some indication to the user that the snippet
| modules/template/ui/controllers.js | 47 | handle other errors?
| modules/template/ui/controllers.js | 62 | Only update dirty fields
| modules/template/ui/controllers.js | 63 | Handle errors
| modules/template/ui/services.js | 7 | Add failure fallbacks
| modules/template/ui/services.js | 46 | make sure status is 204?
| ui/scss/app.scss | 1 | format, organize, and refactor
| ui/scss/app.scss | 265 | Make a new theme, don't override here


text:
'use strict';

module.exports = {
  leagueName: 'NHL',
  urls: function() {
    return Promise.resolve(['http://live.nhle.com/GameData/RegularSeasonScoreboardv3.jsonp']);
  },
  Scores: require('../models/nhl/Scores')
};


text:
import glob
import re
import os

htmlFiles = sorted(glob.glob("../content/posts/html/*.html"), key=os.path.getctime)

index = open("../index.html", "w+")

with open("../content/default_content/header.html", 'r') as content_file:
    header = content_file.read()

index.write(header)
index.write("\n")

with open("../content/default_content/footer.html", 'r') as content_file:
    footer = content_file.read()

for i in range(len(htmlFiles)):
    with open(htmlFiles[i], 'r') as content_file:
        pageContents = content_file.read()
    title = re.findall(r'', pageContents)[0].replace("", "")
    date = re.findall(r'', pageContents)[0].replace("", "")
    author = re.findall(r'', pageContents)[0].replace("", "")
    index.write('
' + title + "
")
    index.write('\n
Posted by: ' + author + ' on ' + date + '
')

index.write("\n")
index.write(footer)
index.close()


text:
<!DOCTYPE html>

    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <link rel="stylesheet" src="//normalize-css.googlecode.com/svn/trunk/normalize.css" />

    <link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/pickadate.js/3.5.3/compressed/themes/default.css">
    <link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/pickadate.js/3.5.3/compressed/themes/default.date.css">
    <link rel="stylesheet" type="text/css" href="static/css/common.css">
    <link rel="stylesheet" type="text/css" href="static/css/singledate.css">
    <link rel="stylesheet" type="text/css" href="static/css/usertrips.css">
    <link rel="stylesheet" type="text/css" href="static/css/energymap.css">
    <link rel="icon" type="image/png" href="static/icon/favicon-16x16.png" sizes="16x16">
    <link rel="icon" type="image/png" href="static/icon/favicon-32x32.png" sizes="32x32">
    <link rel="icon" type="image/png" href="static/icon/favicon-96x96.png" sizes="96x96">
    <link rel="icon" type="image/png" href="static/icon/appicon-192x192.png" sizes="192x192">
    <title>{{ APPLICATION_NAME }} Routes on Map</title>

    <link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/jqueryui/1.12.1/jquery-ui.min.css">

        <input id="date" value="2015-11-11" />
        <button id="menu" >Menu</button>

      <form>
        <fieldset>
          <legend>Transport mode</legend>

            <input type="radio" name="mode" id="BUS" value="BUS">


Bus

            <input type="radio" name="mode" id="FERRY" value="FERRY">


Ferry

            <input type="radio" name="mode" id="SUBWAY" value="SUBWAY">


Subway

            <input type="radio" name="mode" id="TRAIN" value="TRAIN">


Train

            <input type="radio" name="mode" id="TRAM" value="TRAM">


Tram

            <input type="radio" name="mode" id="ON_BICYCLE" value="ON_BICYCLE">


Bicycle

            <input type="radio" name="mode" id="IN_VEHICLE" value="IN_VEHICLE">


Car

            <input type="radio" name="mode" id="RUNNING" value="RUNNING">


Running

            <input type="radio" name="mode" id="WALKING" value="WALKING">


Walking

            <input type="radio" name="mode" id="RESET" value="RESET">


Reset

        </fieldset>

          Mass transit line name
          <input type="text" name="line" id="line"
           class="text ui-widget-content ui-corner-all">

          <input type="submit" tabindex="-1" style="position:absolute; top:-1000px">
      </form>


text: Install mavlink on the autopilot system i.e. Beaglebone Blue


text:
class Shape {
public:
  const int ndim;
  const int nelem;
  const std::array<int, MAX_DIM> vec;

public:
  Shape() : Shape({}) {}

  template <typename Iter>
  Shape(Iter begin, Iter end)
      : ndim(end - begin),
        nelem(
            std::accumulate(begin, end, 1, [](int a, int b) { return a * b; })),
        vec(make_array<int, MAX_DIM>(begin, end, 1)) {}

  Shape(std::initializer_list<int> strides)
      : Shape(strides.begin(), strides.end()) {}

  bool operator==(const Shape &other) const {
    return ndim == other.ndim && nelem == other.nelem && vec == other.vec;
  }

  std::string describe() const;
};

inline std::ostream &operator<<(std::ostream &out, const Shape &shape) {
  out << shape.describe();
  return out;
}

#endif


text:
import {
  animate,
  AnimationTriggerMetadata,
  state,
  style,
  transition,
  trigger,
} from '@angular/animations';

// This value should match the value used for the Status View styles in 'status.component.scss'
const statusViewBottomOut = '-10.5rem';
const statusViewBottomIn = 0;

export const SlideInOutAnimation: AnimationTriggerMetadata = trigger(
  'SlideInOutAnimation',
  [
    state(
      'in',
      style({
        bottom: statusViewBottomIn,
      })
    ),
    state(
      'out',
      style({
        bottom: statusViewBottomOut,
      })
    ),
    transition('out => in', [
      animate(
        '.5s ease',
        style({
          bottom: statusViewBottomIn,
        })
      ),
    ]),
    transition('in => out', [
      animate(
        '.5s ease',
        style({
          bottom: statusViewBottomOut,
        })
      ),
    ]),
  ]
);


text:
package org.openbel.framework.common.bel.converters;

import java.util.Arrays;
import java.util.List;

import org.openbel.bel.model.BELDocumentHeader;
import org.openbel.framework.common.model.Header;

public class BELDocumentHeaderConverter extends
        BELConverter<BELDocumentHeader, Header> {

    /**
     * {@inheritDoc}
     */
    @Override
    public Header convert(BELDocumentHeader bdh) {
        String name = bdh.getName();
        String desc = bdh.getDescription();
        String version = bdh.getVersion();
        Header h = new Header(name, desc, version);
        h.setAuthors(Arrays.asList(bdh.getAuthor()));
        h.setContactInfo(bdh.getContactInfo());
        h.setCopyright(bdh.getCopyright());
        h.setDisclaimer(bdh.getDisclaimer());
        h.setLicenses(bdh.getLicense() == null ? null : Arrays.asList(bdh
                .getLicense()));

        return h;
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public BELDocumentHeader convert(Header h) {
        String name = h.getName();
        String author = join(h.getAuthors());
        String copyright = h.getCopyright();
        String contactInfo = h.getContactInfo();
        String description = h.getDescription();
        String disclaimer = h.getDisclaimer();
        String license = join(h.getLicenses());
        String version = h.getVersion();

        return new BELDocumentHeader(name, description, version, author,
                copyright,
                contactInfo,
                disclaimer, license);
    }

    private String join(List<String> strings) {
        StringBuilder b = new StringBuilder();
        for (int i = 0; i < strings.size(); i++) {
            String s = strings.get(i);

            if (i != 0) {
                b.append(", ");
            }

            b.append(s);
        }
        return b.toString();
    }
}


text:
var util = require('util'),
    events = require('events'),
    helpers = require('../helpers/helpers.js'),
    request = require('request');

function CheckForStringNotPresent () {
  events.EventEmitter.call(this);
}

// inherit from node's event emitter
util.inherits(CheckForStringNotPresent, events.EventEmitter);

CheckForStringNotPresent.prototype.command = function (path, string, timeout) {
  var couchUrl = this.client.options.db_url;

  if (!timeout) {
    timeout = helpers.maxWaitTime;
  }

  var timeOutId = setTimeout(function () {
    throw new Error('timeout waiting for string to disappear');
  }, timeout);

  var intervalId = setInterval(function () {
    var url = [couchUrl, path].join('/');

    request(url, function (er, res, body) {
      if (body) {
        if (body.indexOf(string) === -1) {
          clearTimeout(timeOutId);
          console.log('string disappeared: ' + string);
          clearInterval(intervalId);
          this.emit('complete');
        }
      }
    }.bind(this));
  }.bind(this), 1000);

  return this;
};

module.exports = CheckForStringNotPresent;


text:
module CheckPoint
  class Main

  end
end


text:
class AddAnswersToQuestions < ActiveRecord::Migration
  def change
    add_column :questions, :answers, :string, array: true, default: []
  end
end


text:
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**payload_name** | **string** | Payload name | [optional]
**result_set** | [**\ultracart\v2\models\ResultSet**](ResultSet.md) |  | [optional]

[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)


text: * Minor Update. Tests Passing.


text:
<!-- 2017-02-16 -->

Welcome to Haskell Weekly!
[Haskell](https://www.haskell.org) is an advanced, purely functional programming language.
This is a weekly summary of what's going on in its community.
You can subscribe to [the email newsletter](https://news.us10.list-manage.com/subscribe?u=49a6a2e17b12be2c5c4dcb232&id=ffbbbbd930)
or [the Atom feed](/haskell-weekly.atom).

Want to contribute to Haskell Weekly?
Send us a message [on Twitter](https://twitter.com/haskellweekly)
or open an issue [on GitHub](https://github.com/haskellweekly/haskellweekly.github.io).

## News from the Haskell community

-   [Stackage LTS 8.0](https://www.stackage.org/lts-8.0)

    This is the first Stackage LTS snapshot with GHC 8.0.2.

-   [GHC generics explained](https://stackbuilders.com/tutorials/haskell/generics/)

    > This tutorial will get you up to speed with GHC generics quickly. It should be noted that generics is not something academic and useless, quite the contrary, it's a very pragmatic way to reduce the amount of boilerplate (and associated with it errors) in your functional code with minimal mental overhead.

-   [Haskell on Bash/WSL](https://blogs.msdn.microsoft.com/commandline/2017/02/09/haskell-on-bashwsl/)

    > Haskell is a popular and powerful functional programming language which wasn't able to run on Bash/WSL in Anniversary Update or earlier Insider builds, because WSL had not yet implemented the `timer_create()` syscall. Now that WSL builds >= #14986 do support `timer_create()` we can run Haskell and many other tools (e.g. Elm, Cabal, Pandoc, Agda, etc.).

-   [Stricter JSON parsing with Haskell and Aeson](https://arunraghavan.net/2017/02/stricter-json-parsing-with-haskell-and-aeson/)

    > However, as this nice tour of how Aeson works demonstrate, if the input has keys that we don't recognise, no error will be raised. This behaviour would not be undesirable in use-cases such as mine; if the client is sending fields we don't understand, I'd like for the server to signal an error so the underlying problem can be caught early.

-   [Replacing GHCi's pretty-printer](http://teh.id.au/posts/2017/02/13/interactive-print/index.html)

    > Luckily, GHCi is quite configurable! Using the `-interactive-print` flag, We can replace `IO.print` as the pretty-printer of choice, and slot in any function we please. My favourite alternative pretty-printer is Iavor Diatchki's wonderful pretty-show, which uses a Haskell lexer.

-   [Aelve Guide: Haskell CPP](https://guide.aelve.com/haskell/cpp-vww0qd72)

    > With `{-# LANGUAGE CPP #-}` enabled, `.hs` files will be processed with C preprocessor before the code is compiled.

-   [Better exception messages](http://www.snoyman.com/blog/2017/02/better-exception-messages)

    > When you throw an exception in your code, whether it be via throwIO, returning Left, using fail, or using error, please give us some context. During development, it's a pain to have to dive into the code, add some trace statements, figure out what the actual problem is, and then remove the trace statements.

## Package of the week

This week's package of the week is [hip](https://www.stackage.org/package/hip),
a Haskell image processing library.

Send us a message [on Twitter](https://twitter.com/haskellweekly) to nominate next week's package!