text:
ANSIBLE_METADATA = {'metadata_version': '1.1',
                    'status': ['preview'],
                    'supported_by': 'community'}

DOCUMENTATION = '''
---
module: ovirt_vnic_profile
short_description: Module to manage vNIC profile of network in oVirt/RHV
version_added: "2.8"
author:
- "Ondra Machacek (@machacekondra)"
- "Martin Necas (@mnecas)"
description:
    - "Module to manage vNIC profile of network in oVirt/RHV"
options:
    name:
        description:
            - "A human-readable name in plain text."
        required: true
    state:
        description:
            - "Should the vNIC be absent/present."
        choices: ['absent', 'present']
        default: present
    description:
        description:
            - "A human-readable description in plain text."
    data_center:
        description:
            - "Datacenter name where network reside."
        required: true
    network:
        description:
            - "Name of network to which is vNIC attached."
        required: true
    network_filter:
        description:
            - "The network filter enables to filter packets send to/from the VM's nic according to defined rules."
    custom_properties:
        description:
            - "Custom properties applied to the vNIC profile."
            - "Custom properties is a list of dictionary which can have following values:"
        suboptions:
            name:
                description:
                    - "Name of the custom property. For example: I(hugepages), I(vhost), I(sap_agent), etc."
            regexp:
                description:
                    - Regular expression to set for custom property.
            value:
                description:
                    - Value to set for custom property.
    qos:
        description:
            - "Quality of Service attributes regulate inbound and outbound network traffic of the NIC."
    port_mirroring:
        description:
            - "Enables port mirroring."
        type: bool
    pass_through:
        description:
            - "Enables passthrough to an SR-IOV-enabled host NIC."
            - "When enabled C(qos) and  C(network_filter) are automatically set to None and C(port_mirroring) to False."
            - "When enabled and C(migratable) not specified then C(migratable) is enabled."
            - "Port mirroring, QoS and network filters are not supported on passthrough profiles."
        choices: ['disabled', 'enabled']
    migratable:
        description:
            - "Marks whether pass_through NIC is migratable or not."
        type: bool
extends_documentation_fragment: ovirt
'''

EXAMPLES = '''
# Examples don't contain auth parameter for simplicity,
# look at ovirt_auth module to see how to reuse authentication:
- name: Add vNIC
  ovirt_vnic_profile:
    name: myvnic
    network: mynetwork
    state: present
    data_center: datacenter

- name: Editing vNICs network_filter, custom_properties, qos
  ovirt_vnic_profile:
    name: myvnic
    network: mynetwork
    data_center: datacenter
    qos: myqos
    custom_properties:
      - name: SecurityGroups
        value: 9bd9bde9-39da-44a8-9541-aa39e1a81c9d
    network_filter: allow-dhcp

- name: Remove vNICs network_filter, custom_properties, qos
  ovirt_vnic_profile:
    name: myvnic
    network: mynetwork
    data_center: datacenter
    qos: ""
    custom_properties: ""
    network_filter: ""

- name: Dont use migratable
  ovirt_vnic_profile:
    name: myvnic
    network: mynetwork
    data_center: datacenter
    migratable: False
    pass_through: enabled

- name: Remove vNIC
  ovirt_vnic_profile:
    name: myvnic
    network: mynetwork
    state: absent
    data_center: datacenter
'''

RETURN = '''
id:
    description: ID of the vNIC profile which is managed
    returned: On success if vNIC profile is found.
    type: str
    sample: 7de90f31-222c-436c-a1ca-7e655bd5b60c
vnic:
    description: "Dictionary of all the vNIC profile attributes. Network interface attributes can be found on your oVirt/RHV instance
                  at following url: http://ovirt.github.io/ovirt-engine-api-model/master/#types/nic."
    returned: On success if vNIC profile is found.
    type: dict
'''

try:
    import ovirtsdk4.types as otypes
except ImportError:
    pass

import traceback

from ansible.module_utils.basic import AnsibleModule
from ansible.module_utils.ovirt import (
    BaseModule,
    check_sdk,
    create_connection,
    equal,
    get_link_name,
    ovirt_full_argument_spec,
    search_by_name,
    get_id_by_name
)

class EntityVnicPorfileModule(BaseModule):

    def __init__(self, *args, **kwargs):
        super(EntityVnicPorfileModule, self).__init__(*args, **kwargs)

    def _get_dcs_service(self):
        return self._connection.system_service().data_centers_service()

    def _get_dcs_id(self):
        return get_id_by_name(self._get_dcs_service(), self.param('data_center'))

    def _get_network_id(self):
        networks_service = self._get_dcs_service().service(self._get_dcs_id()).networks_service()
        return get_id_by_name(networks_service, self.param('network'))

    def _get_qos_id(self):
        if self.param('qos'):
            qoss_service = self._get_dcs_service().service(self._get_dcs_id()).qoss_service()
            return get_id_by_name(qoss_service, self.param('qos')) if self.param('qos') else None
        return None

    def _get_network_filter_id(self):
        nf_service = self._connection.system_service().network_filters_service()
        return get_id_by_name(nf_service, self.param('network_filter')) if self.param('network_filter') else None

    def _get_network_filter(self):
        network_filter = None
        # The order of these condition is necessary.
        # When would network_filter and pass_through specified it would try to create and network_filter and fail on engine.
        if self.param('network_filter') == '' or self.param('pass_through') == 'enabled':
            network_filter = otypes.NetworkFilter()
        elif self.param('network_filter'):
            network_filter = otypes.NetworkFilter(id=self._get_network_filter_id())
        return network_filter

    def _get_qos(self):
        qos = None
        # The order of these condition is necessary. When would qos and pass_through specified it would try to create and qos and fail on engine.
        if self.param('qos') == '' or self.param('pass_through') == 'enabled':
            qos = otypes.Qos()
        elif self.param('qos'):
            qos = otypes.Qos(id=self._get_qos_id())
        return qos

    def _get_port_mirroring(self):
        if self.param('pass_through') == 'enabled':
            return False
        return self.param('port_mirroring')

    def _get_migratable(self):
        if self.param('migratable') is not None:
            return self.param('migratable')
        if self.param('pass_through') == 'enabled':
            return True

    def build_entity(self):
        return otypes.VnicProfile(
            name=self.param('name'),
            network=otypes.Network(id=self._get_network_id()),
            description=self.param('description') if self.param('description') is not None else None,
            pass_through=otypes.VnicPassThrough(mode=otypes.VnicPassThroughMode(self.param('pass_through'))) if self.param('pass_through') else None,
            custom_properties=[
                otypes.CustomProperty(
                    name=cp.get('name'),
                    regexp=cp.get('regexp'),
                    value=str(cp.get('value')),
                ) for cp in self.param('custom_properties') if cp
            ] if self.param('custom_properties') else None,
            migratable=self._get_migratable(),
            qos=self._get_qos(),
            port_mirroring=self._get_port_mirroring(),
            network_filter=self._get_network_filter()
        )

    def update_check(self, entity):
        def check_custom_properties():
            if self.param('custom_properties'):
                current = []
                if entity.custom_properties:
                    current = [(cp.name, cp.regexp, str(cp.value)) for cp in entity.custom_properties]
                passed = [(cp.get('name'), cp.get('regexp'), str(cp.get('value'))) for cp in self.param('custom_properties') if cp]
                return sorted(current) == sorted(passed)
            return True

        pass_through = getattr(entity.pass_through.mode, 'name', None)
        return (
            check_custom_properties() and
            # The reason why we can't use equal method, is we get None from _get_network_filter_id or _get_qos_id method, when passing empty string.
            # And when first param of equal method is None it returns true.
            self._get_network_filter_id() == getattr(entity.network_filter, 'id', None) and
            self._get_qos_id() == getattr(entity.qos, 'id', None) and
            equal(self.param('migratable'), getattr(entity, 'migratable', None)) and
            equal(self.param('pass_through'), pass_through.lower() if pass_through else None) and
            equal(self.param('description'), entity.description) and
            equal(self.param('port_mirroring'), getattr(entity, 'port_mirroring', None))
        )

def get_entity(vnic_services, entitynics_module):
    vnic_profiles = vnic_services.list()
    network_id = entitynics_module._get_network_id()
    for vnic in vnic_profiles:
        # When vNIC already exist update it, when not create it
        if vnic.name == entitynics_module.param('name') and network_id == vnic.network.id:
            return vnic

def check_params(module):
    if (module.params.get('port_mirroring') or module.params.get('network_filter') or module.params.get('qos'))\
            and module.params.get('pass_through') == 'enabled':
        module.fail_json(msg="Cannot edit VM network interface profile. 'Port Mirroring,'Qos' and 'Network Filter' are not supported on passthrough profiles.")

def main():
    argument_spec = ovirt_full_argument_spec(
        state=dict(type='str', default='present', choices=['absent', 'present']),
        network=dict(type='str', required=True),
        data_center=dict(type='str', required=True),
        description=dict(type='str'),
        name=dict(type='str', required=True),
        network_filter=dict(type='str'),
        custom_properties=dict(type='list'),
        qos=dict(type='str'),
        pass_through=dict(type='str', choices=['disabled', 'enabled']),
        port_mirroring=dict(type='bool'),
        migratable=dict(type='bool'),
    )
    module = AnsibleModule(
        argument_spec=argument_spec,
        supports_check_mode=True,

    )
    check_sdk(module)
    check_params(module)
    try:
        auth = module.params.pop('auth')
        connection = create_connection(auth)

        vnic_services = connection.system_service().vnic_profiles_service()

        entitynics_module = EntityVnicPorfileModule(
            connection=connection,
            module=module,
            service=vnic_services,
        )
        state = module.params['state']
        entity = get_entity(vnic_services, entitynics_module)
        if state == 'present':
            ret = entitynics_module.create(entity=entity, force_create=entity is None)
        elif state == 'absent':
            if entity is not None:
                ret = entitynics_module.remove(entity=entity)
            else:
                raise Exception("Vnic profile '%s' in network '%s' was not found." % (module.params['name'], module.params['network']))
        module.exit_json(**ret)
    except Exception as e:
        module.fail_json(msg=str(e), exception=traceback.format_exc())
    finally:
        connection.close(logout=auth.get('token') is None)

if __name__ == "__main__":
    main()


text:
package net.runelite.rs.api;

import net.runelite.mapping.Import;

public interface RSNameable
{
	@Import("name")
	RSName getName();
}

redpajama_set_name: RedPajamaGithub


text:
require 'spec_helper'

describe RailsAdmin::AbstractModel do

  describe "#to_s" do
    it 'returns model\'s name' do
      expect(RailsAdmin::AbstractModel.new(Cms::BasicPage).to_s).to eq Cms::BasicPage.to_s
    end
  end

  describe "filters" do
    before do
      @abstract_model = RailsAdmin::AbstractModel.new('FieldTest')
    end

    context "ActiveModel::ForbiddenAttributesProtection" do
      it "is present" do
        @abstract_model.model.ancestors.map(&:to_s).include?('ActiveModel::ForbiddenAttributesProtection')
      end
    end

    context "on dates" do
      it "lists elements within outbound limits" do
        date_format = I18n.t("admin.misc.filter_date_format", :default => I18n.t("admin.misc.filter_date_format", :locale => :en)).gsub('dd', '%d').gsub('mm', '%m').gsub('yy', '%Y')

        FactoryGirl.create(:field_test, :date_field => Date.strptime("01/01/2012", date_format))
        FactoryGirl.create(:field_test, :date_field => Date.strptime("01/02/2012", date_format))
        FactoryGirl.create(:field_test, :date_field => Date.strptime("01/03/2012", date_format))
        FactoryGirl.create(:field_test, :date_field => Date.strptime("01/04/2012", date_format))
        expect(@abstract_model.all(:filters => { "date_field" => { "1" => { :v => ["", "01/02/2012", "01/03/2012"], :o => 'between' } } } ).count).to eq(2)
        expect(@abstract_model.all(:filters => { "date_field" => { "1" => { :v => ["", "01/02/2012", "01/02/2012"], :o => 'between' } } } ).count).to eq(1)
        expect(@abstract_model.all(:filters => { "date_field" => { "1" => { :v => ["", "01/03/2012", ""], :o => 'between' } } } ).count).to eq(2)
        expect(@abstract_model.all(:filters => { "date_field" => { "1" => { :v => ["", "", "01/02/2012"], :o => 'between' } } } ).count).to eq(2)
        expect(@abstract_model.all(:filters => { "date_field" => { "1" => { :v => ["01/02/2012"], :o => 'default' } } } ).count).to eq(1)

      end
    end

    context "on datetimes" do
      it "lists elements within outbound limits" do
        FactoryGirl.create(:field_test, :datetime_field => Time.local(2012, 1, 1, 23, 59, 59))
        FactoryGirl.create(:field_test, :datetime_field => Time.local(2012, 1, 2, 0, 0, 0))
        FactoryGirl.create(:field_test, :datetime_field => Time.local(2012, 1, 3, 23, 59, 59))
        if defined?(Mongoid) && Mongoid::VERSION >= '3.0.0'
          # TODO: Mongoid 3.0.0 mysteriously expands the range of inclusion slightly...
          FactoryGirl.create(:field_test, :datetime_field => Time.local(2012, 1, 4, 0, 0, 1))
        else
          FactoryGirl.create(:field_test, :datetime_field => Time.local(2012, 1, 4, 0, 0, 0))
        end
        expect(@abstract_model.all(:filters => { "datetime_field" => { "1" => { :v => ["", "01/02/2012", "01/03/2012"], :o => 'between' } } } ).count).to eq(2)
        expect(@abstract_model.all(:filters => { "datetime_field" => { "1" => { :v => ["", "01/02/2012", "01/02/2012"], :o => 'between' } } } ).count).to eq(1)
        expect(@abstract_model.all(:filters => { "datetime_field" => { "1" => { :v => ["", "01/03/2012", ""], :o => 'between' } } } ).count).to eq(2)
        expect(@abstract_model.all(:filters => { "datetime_field" => { "1" => { :v => ["", "", "01/02/2012"], :o => 'between' } } } ).count).to eq(2)
        expect(@abstract_model.all(:filters => { "datetime_field" => { "1" => { :v => ["01/02/2012"], :o => 'default' } } } ).count).to eq(1)
      end
    end
  end

  context "with Kaminari" do
    before do
      @paged = Player.page(1)
      Kaminari.config.page_method_name = :per_page_kaminari
      @abstract_model = RailsAdmin::AbstractModel.new('Player')
    end

    after do
      Kaminari.config.page_method_name = :page
    end

    it "supports pagination when Kaminari's page_method_name is customized" do
      expect(Player).to receive(:per_page_kaminari).once.and_return(@paged)
      @abstract_model.all(:sort => PK_COLUMN, :page => 1, :per => 2)
    end
  end
end


text:
const { environment } = require('@rails/webpacker')
const vue =  require('./loaders/vue')

environment.loaders.append('vue', vue)
module.exports = environment


text:
/* jshint asi:true */

'use strict'

var test = require('assertit')
var request = require('simple-get')
var generate = require('./index')

test('should throw when `username` not a string', function (done) {
  function fixture () {
    generate({one: 'two'}, {})
  }

  test.throws(fixture, TypeError)
  test.throws(fixture, /expect `credentials` be string/)
  done()
})

test('should throw when invalid `user:pass` pattern given', function (done) {
  function fixture () {
    generate('user and password')
  }

  test.throws(fixture, Error)
  test.throws(fixture, /invalid `credentials` given/)
  done()
})

test('should create token then delete it', function (done) {
  var creds = 'fake-user123:fakeuser123'
  var auth = new Buffer(creds).toString('base64')

  generate(creds, function (err, data) {
    test.ifError(err)
    request({
      method: 'delete',
      url: 'https://api.github.com/authorizations/' + data.id,
      headers: {
        'user-agent': 'tunnckoCore/github-generate-token',
        'authorization': 'Basic ' + auth
      }
    }, function (err) {
      test.ifError(err)
      done()
    })
  })
})

test('should work properly without options', function (done) {
  generate('udasdasdasdasser:fdsfsdf43fvdfgdg', function bad (err, data) {
    test.ifError(err)
    test.deepEqual(data, {
      message: 'Bad credentials',
      documentation_url: 'https://developer.github.com/v3'
    })
    done()
  })
})

test('should work properly with valid options given', function (done) {
  generate('udasdasdasdasser:fdsfsdf43fvdfgdg', {
    scopes: ['user'],
    note: 'some test'
  }, function bad (err, data) {
    test.ifError(err)
    test.deepEqual(data, {
      message: 'Bad credentials',
      documentation_url: 'https://developer.github.com/v3'
    })
    done()
  })
})

test('should normalize invalid options', function (done) {
  generate('udasdasdasdasser:fdsfsdf43fvdfgdg', {
    scopes: 'user',
    note: ['some test']
  }, function bad (err, data) {
    test.ifError(err)
    test.deepEqual(data, {
      message: 'Bad credentials',
      documentation_url: 'https://developer.github.com/v3'
    })
    done()
  })
})


text:
layout: page
title: About
permalink: /about/
---

Still just a test site.

### More Information

Adding binary files to the repo requires interacting with git - for that
I still prefer Mercurial. Note-to-self: In order to push to github,
change the `git@github.com/<user>/<repo>` by adding protocol prefix
`ssh+git://` - so that it becomes `ssh+git://<user>/<repo>`. Eg with:

`github = git+ssh://git@github.com:e12e/e12e.github.io.git` in the local
repo `.hg/hgrc`-file, I can simply `hg push github` to update this repo.


text:
[![Go Report Card](https://goreportcard.com/badge/github.com/periph/gohci)](https://goreportcard.com/report/github.com/periph/gohci)

- This doc:
  - [Genesis](#genesis)
  - [Pictures](#pictures)
  - [Design](#design)
  - [Features](#features)
- [Getting started and configuration](CONFIG.md): CONFIG.md
- [FAQ](FAQ.md): FAQ.md

## Genesis

All I wanted was to run `go test ./...` on a Raspberry Pi on both Pull Requests
and Pushes for a private repository. I realized that it is possible to store the
test's stdout to a [Github Gist](https://gist.github.com/) so I created a
_serverless_ CI.

The result is the distilled essence of a Continuous Integration service that
leans heavily toward testing Go projects on hardware, specifically low power
ones (Raspberry Pis, C.H.I.P., BeagleBone, ODROID, etc) but also works great on
Windows and macOS.

Part of the gohci lab testing https://periph.io:

![lab](https://raw.githubusercontent.com/wiki/periph/gohci/lab.jpg
"lab")

Here's how it looks like on a PR when the workers start to handle it:

![screen cast](https://raw.githubusercontent.com/wiki/periph/gohci/gohci.gif
"screen cast")

View of the status on commits:

![commits](https://raw.githubusercontent.com/wiki/periph/gohci/commits.png
"commits")

## Design

It hardly can get any simpler:

- Only support one specific use case: *Golang project hosted on Github*.
- There is no "server", only workers that you run yourself. Each worker must be
  internet accessible and HTTPS must be proxied down to HTTP.
  - [Caddy](https://caddyserver.com/) works great along its native
    [letsencrypt.org](https://letsencrypt.org) support.

## Features

- 100% free and open source.
  - Secure, you are in control. There's no third party service beside GitHub.
  - Enables free testing on macOS, Windows or single CPU ARM micro computer.
  - Low maintenance, run as systemd/launchd service.
- Each worker can test multiple repositories, each with custom checks.
- Each check's stdout is attached to the gist as they complete.
- The commit's status is updated "_live_" on Github. This is pretty cool to see
  in action on a GitHub PR.
- `gohci-worker` exits whenever the executable or `gohci.yml` is updated; making
  it easy to use an auto-updating mechanism.

Not convinced? Read the [FAQ.md](FAQ.md) for additional information.

Convinced? See [CONFIG.md](CONFIG.md) to get started!


text:
using BehaveAsSakura.Attributes;
using BehaveAsSakura.Events;
using BehaveAsSakura.Timers;
using BehaveAsSakura.Utils;
using BehaveAsSakura.Variables;

namespace BehaveAsSakura.Tasks
{
    [BehaveAsTable]
    [BehaveAsUnionInclude(typeof(ITaskDesc), 17)]
    [Task("Action/Wait Timer")]
    public class WaitTimerTaskDesc : ILeafTaskDesc
    {
        [BehaveAsField(1)]
        public VariableDesc Time { get; set; }

        void ITaskDesc.Validate()
        {
            Validation.NotNull(Time, nameof(Time));
            Time.ValidateType(VariableType.UInteger);
        }

        Task ITaskDesc.CreateTask(BehaviorTree tree, Task parentTask, uint id)
        {
            return new WaitTimerTask(tree, parentTask, id, this);
        }
    }

    [BehaveAsTable]
    [BehaveAsUnionInclude(typeof(ITaskProps), 6)]
    public class WaitTimerTaskProps : ITaskProps
    {
        [BehaveAsField(1)]
        public uint TimerId { get; set; }

        [BehaveAsField(2)]
        public bool IsTimerTriggered { get; set; }
    }

    class WaitTimerTask : LeafTask
    {
        private WaitTimerTaskDesc description;
        private WaitTimerTaskProps props;
        private Variable timeVariable;
        private Timer timer;

        public WaitTimerTask(BehaviorTree tree, Task parentTask, uint id, WaitTimerTaskDesc description)
            : base(tree, parentTask, id, description, new WaitTimerTaskProps())
        {
            this.description = description;
            props = (WaitTimerTaskProps)Props;
            timeVariable = new Variable(description.Time);
        }

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

            timer = StartTimer(timeVariable.GetUInt(this));
            SubscribeEvent<TimerTriggeredEvent>();

            props.TimerId = timer.Id;
            props.IsTimerTriggered = false;
        }

        protected override TaskResult OnUpdate()
        {
            return props.IsTimerTriggered ? TaskResult.Success : TaskResult.Running;
        }

        protected override void OnEnd()
        {
            if (!props.IsTimerTriggered && timer != null)
                CancelTimer(timer);

            UnsubscribeEvent<TimerTriggeredEvent>();

            props.TimerId = 0;

            base.OnEnd();
        }

        internal protected override void OnEventTriggered(IEvent @event)
        {
            base.OnEventTriggered(@event);

            if (!props.IsTimerTriggered)
            {
                var e = @event as TimerTriggeredEvent;
                if (e != null && e.TimerId == timer.Id)
                {
                    UnsubscribeEvent<TimerTriggeredEvent>();

                    props.IsTimerTriggered = true;

                    EnqueueForUpdate();
                }
            }
        }

        protected override void OnRestoreProps(ITaskProps props)
        {
            base.OnRestoreProps(props);

            this.props = (WaitTimerTaskProps)props;

            if (this.props.TimerId > 0)
                timer = FindTimer(this.props.TimerId);
            else
                timer = null;
        }
    }
}


text:
<?php

/* sample test payload */
$reqPayloadString = <<<XML
<soapenv:Envelope xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope">
   <soapenv:Header/>
   <soapenv:Body>
      <ns1:getFault xmlns:ns1="http://php.axis2.org/samples">
         <text>Hello World!</text>
      </ns1:getFault>
   </soapenv:Body></soapenv:Envelope>
XML;

function sendFault($inMessage) {
    throw new WSFault("Sender", "Testing WSFault","Role","This is a test");
}

$operations = array("getFault" => "sendFault");

$service = new WSService(array("operations" => $operations));

$service->reply();

?>


text:
package org.jetbrains.plugins.ipnb.editor.actions;

import com.intellij.icons.AllIcons;
import com.intellij.openapi.actionSystem.AnAction;
import com.intellij.openapi.actionSystem.AnActionEvent;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.plugins.ipnb.editor.IpnbFileEditor;
import org.jetbrains.plugins.ipnb.editor.panels.IpnbFilePanel;

public class IpnbCopyCellAction extends AnAction {
  private final IpnbFileEditor myFileEditor;

  public IpnbCopyCellAction(IpnbFileEditor fileEditor) {
    super("Copy Cell", "Copy Cell", AllIcons.Actions.Copy);
    myFileEditor = fileEditor;
  }

  @Override
  public void actionPerformed(@NotNull AnActionEvent event) {
    final IpnbFilePanel component = myFileEditor.getIpnbFilePanel();
    copyCell(component);
  }

  public static void copyCell(@NotNull final IpnbFilePanel ipnbFilePanel) {
    ipnbFilePanel.copyCell();
  }
}


text:
@interface DetailViewController : UIViewController <UISplitViewControllerDelegate> {
    AppDelegate *_appDelegate;
}

@property (strong, nonatomic) id detailItem;

@property (strong, nonatomic) IBOutlet UITextField *nameTextField;
@property (strong, nonatomic) IBOutlet UITextField *ageTextField;
@property (strong, nonatomic) IBOutlet UITextField *searchTextField;
@property (weak, nonatomic) IBOutlet UILabel *detailDescriptionLabel;

- (IBAction)insertButtonPressed:(id)sender;
- (IBAction)processButtonPressed:(id)sender;
- (IBAction)getLineNumberButtonPressed:(id)sender;

@end


text:
/*********************************************************************************
* (Generic binary search) Implement the following method using binary search.    *
*                                                                                *
* public static <E extends Comparable<E>>                                        *
*	int binarySearch(E[] list, E key)                                             *
*********************************************************************************/
public class Exercise_19_07 {

	/** Method performs a binary search
	  * to find the key in a list */
	public static <E extends Comparable<E>>
			int binarySearch(E[] list, E key) {
		int low = 0;
		int high = list.length - 1;

		while (high >= low) {
			int mid = (low + high / 2);
			if (key.compareTo(list[mid]) < 0)
				high = mid - 1;
			else if (key.compareTo(list[mid]) == 0)
				return mid;
			else
				low = mid + 1;
		}

		return -low - 1;
	}
}


text:
layout: post
date: 2016-09-11 13:14:43
header-img: "img/home-bg2.jpg"
comments: true
subtitle: "Exploring rvest"
category: Package Exploration
tags: [R, Scraping, rvest]
title: "Data Scientist with a wine hobby (Part I)"
author: "Hanjo Odendaal"
output: html_document
---

After high school I made my way from Johannesburg, situated in the northern part of South Africa, to the famous wine country known as Stellenbosch in the south. Here for the first time I got a ton of exposure to wine and the countless varietals that make up this "drink of the gods".

The one trick in wine tasting and exploring vini- and viticulture is the fact that the best way to learn about it all is going out to the farm and drinking the wine for yourself. Over the years I have become familiar with all the farms in the region and it can sometimes be a real prize when discovering a cellar which you have not visited.

As one can see from the map, there are quite a few farms that are 'officially' listed, but believe me there are a few hidden ones which one will never know of without some research.

<img src="/figures/Wine_review_fig/map_stellenbosch.jpg" title="center" alt="center" width="400px" style="display: block; margin: auto;" />

To ease this process I have used `R` in order to compile a sort of wine farm repository for myself as a go to guide whenever I visit the region. I did this as an exercise to explore Hadley Wickham's amazing `rvest` library which makes online data collection an ease.

The idea was to compile *wine review data* of the Stellenbosch wine region from [winemag.com](http://www.winemag.com)'s online database and use it to gain an analytical insight into this beautiful wine region in the Cape.

The first step in collecting the data was to deal with some housekeeping issues. First I assign the base URL to start the collecting from and collect the number of pages from the Stellenbosch search result as part of the `pagination` block in the html. Secondly I collect the information around the wine such as name, points and price. Lastly I use the information on this first page to create a function, `info_xtr()`, to extract information of each of the wines from their own specific page. Specifically I extract the written review of the wine, the date of review and also the alcohol content of the wine.

{% highlight r %}
library(dplyr)
library(rvest)
{% endhighlight %}

{% highlight r %}
site = read_html("http://www.winemag.com/?s=stellenbosch&drink_type=wine&page=1")
nr_pages <- html_nodes(site,".pagination li a") %>%
  html_text() %>% tail(.,1) %>% as.numeric

wine_href <- html_nodes(site,".review-listing") %>% html_attr("href")

info_xtr <- function(x){
  page <- read_html(x)
  review <- page %>% html_nodes("p.description") %>%
    html_text
  review_info <- page %>% html_nodes(".info.small-9.columns span span") %>%
    html_text()
  cbind(review, date = review_info[5], Alc = review_info[1])
}
{% endhighlight %}

The `info_xtr()` function returns a data.frame that contains the review, date of the specific review and the alcohol content:

{% highlight r %}
info_xtr(wine_href[1])
{% endhighlight %}

{% highlight text %}
##      review
## [1,] "A blend of 28% Cabernet Franc, 23% Cabernet Sauvignon, 21% Malbec, 18% Petit Verdot and 10% Merlot, this is a big, bold and powerful wine, with superb balance and a firm, concentrated structure that promises great long-term aging. Dense aromas and flavors of blackberry, boysenberry, cherry and fig are layered with notes of cocoa powder, roasted espresso bean and cigar tobacco. Ripe, rich and lush, but not overdone, hints of charred oak and black pepper linger on the finish. Drink 2018–2025."
##      date        Alc
## [1,] "12/1/2015" "14%"
{% endhighlight %}

The wine selection data from the page is collated in a nice `data.frame()` for ease of reading. With all the information I need, I start my scraper to run through the website and collect all the information surrounding the wines

{% highlight r %}
# Start the scraper ==============
Wine_cellar <- list()
for(i in 1:nr_pages)
{

  cat("Wine review, page: ", i,"\n")

  site = read_html(paste0("http://www.winemag.com/?s=stellenbosch&drink_type=wine&page=",i))

  wine <- html_nodes(site,".review-listing .title") %>%
    html_text()

  # extract specific information from title
  wine_farms <- gsub(" \\d.*$","",wine)
  wine_year <- gsub("[^0-9]","",wine)
  wine_name <- gsub("^.*\\d ","",wine) %>% gsub(" \\(Stellenbosch\\)","",.)

  # extract review points
  points <- html_nodes(site,".info .rating") %>%
    html_text() %>% gsub(" Points","",.)

  # extract review price
  price <- html_nodes(site,"span.price") %>%
    html_text()

  wine_href <- html_nodes(site,".review-listing") %>% html_attr("href")

  # here I go collect all the information from each of the wines seperately
  reviews <- sapply(wine_href, function(x) info_xtr(x))
  reviews <- t(reviews)
  row.names(reviews) <- NULL
  colnames(reviews) <- c("review", "review_date", "Alc")

  # bind all the information into a nicely formatted data.frame()
  Wine_cellar[[i]] <- data.frame(wine_farms, wine_year, wine_name, points, price, wine_href, reviews, stringsAsFactors = F)

  # as a rule I always save the already collected data, just in case the scraper stops unexpectedly
  saveRDS(Wine_cellar,"Wine_collection.RDS")

  # I add in a sleep as not the flood the website that I am scraping with requests
  Sys.sleep(runif(1,0,3))
}
{% endhighlight %}

With my scraper having completed its task in retrieving all the necessary information from the website, I bind the information from the `Wine_cellar` list object. For brevity I truncate my sample by removing the *href* and *review* columns which takes up a lot of space

{% highlight r %}
Wine_all <- bind_rows(Wine_cellar)
Wine_all %>% select(-c(wine_href, review)) %>% str()
{% endhighlight %}

{% highlight text %}
## 'data.frame':	1040 obs. of  7 variables:
##  $ wine_farms : chr  "Mvemve Raats" "Mvemve Raats" "De Toren" "De Toren" ...
##  $ wine_year  : chr  "2012" "2011" "2012" "2012" ...
##  $ wine_name  : chr  "MR de Compostella Red" "MR de Compostella Red" "Fusion V Red" "Z Red" ...
##  $ points     : chr  "94" "94" "94" "92" ...
##  $ price      : chr  "$65" "$65" "$60" "$50" ...
##  $ review_date: chr  "12/1/2015" "12/1/2015" "12/1/2015" "12/1/2015" ...
##  $ Alc        : chr  "14%" "14%" "14%" "14%" ...
{% endhighlight %}

As you can see from the information displayed, we now have a complete data-set of all reviews of the the wines in the Stellenbosch region. This information can now be used to analyse the traits of the wine region in a number of ways. I will explore this data in the next post and will see what interesting insights we can draw from it.

I am familiar with collecting online data using the `RCurl` package and have been wanting to see how I can integrate the `rvest` package into some of the work I do. I must admit, I love exploring online data with this package as the `html_node` function makes the collection a breeze. I would definitely recommend `rvest` as the go-to library for any online scraping needs.


text:
// ast.cs
//
// Copyright 2010 Microsoft Corporation
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//     http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Microsoft.NodejsTools.Parsing
{
    [Serializable]
    internal class EmptyStatement : Statement
    {
        public EmptyStatement(EncodedSpan context)
            : base(context)
        {
        }

        public override void Walk(AstVisitor visitor) {
            if (visitor.Walk(this)) {
            }
            visitor.PostWalk(this);
        }

    }
}


text:
using FrazzApps.Xamarin.Geolocator;
using FrazzApps.Xamarin.Geolocator.Abstractions;
using System;
using System.Collections.Generic;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using FrazzApps.Xamarin.Geolocator.WinU;
using Xamarin.Forms;

[assembly: Dependency(typeof(FrazzApps.Xamarin.Geolocator.WinU.Geolocator))]
namespace FrazzApps.Xamarin.Geolocator.WinU
{

    public class Geolocator : IGeolocator
    {
        /// <summary>
        /// Used for registration with dependency service
        /// </summary>
        public static void Init() { }

        Windows.Devices.Geolocation.Geolocator geolocator = new Windows.Devices.Geolocation.Geolocator();

        public double DesiredAccuracy { get { return (geolocator.DesiredAccuracyInMeters.HasValue) ? geolocator.DesiredAccuracyInMeters.Value : double.NaN; } set { geolocator.DesiredAccuracyInMeters = (uint)value; } }
        public bool IsGeolocationEnabled
        {
            get
            {
                if (geolocator == null) return false;
                switch (geolocator.LocationStatus)
                {
                    case Windows.Devices.Geolocation.PositionStatus.Disabled:
                    case Windows.Devices.Geolocation.PositionStatus.Initializing:
                    case Windows.Devices.Geolocation.PositionStatus.NoData:
                    case Windows.Devices.Geolocation.PositionStatus.NotAvailable:
                    case Windows.Devices.Geolocation.PositionStatus.NotInitialized:
                        return false;
                        break;
                    case Windows.Devices.Geolocation.PositionStatus.Ready:
                        return true;
                        break;
                }
                return false;
            }
        }
        public bool IsListening { get; private set; }
        public bool SupportsHeading { get; private set; } //TODO

        public event EventHandler<PositionEventArgs> PositionChanged;
        public event EventHandler<PositionErrorEventArgs> PositionError;

        public async Task<Position> GetPositionAsync(bool includeHeading)
        {
            var position = await geolocator.GetGeopositionAsync();

            return new Position()
            {
                Accuracy = position.Coordinate.Accuracy,
                Altitude = position.Coordinate.Altitude,
                AltitudeAccuracy = position.Coordinate.AltitudeAccuracy,
                Heading = (includeHeading) ? position.Coordinate.Heading : null,
                Latitude = position.Coordinate.Latitude,
                Longitude = position.Coordinate.Longitude,
                Speed = position.Coordinate.Speed,
                Timestamp = position.Coordinate.Timestamp.DateTime
            };
        }

        //
        // Summary:
        //     Start listening to location changes
        //
        // Parameters:
        //   minTime:
        //     Minimum interval in milliseconds
        //
        //   minDistance:
        //     Minimum distance in meters
        public void StartListening(uint minTime, double minDistance)
        { StartListening(minTime, minDistance, true); }
        //
        // Summary:
        //     Start listening to location changes
        //
        // Parameters:
        //   minTime:
        //     Minimum interval in milliseconds
        //
        //   minDistance:
        //     Minimum distance in meters
        //
        //   includeHeading:
        //     Include heading information
        public void StartListening(uint minTime, double minDistance, bool includeHeading)
        {
            if (!this.IsListening) {
                this.IsListening = true;

                geolocator.ReportInterval = minTime;
                geolocator.MovementThreshold = minDistance;

                geolocator.PositionChanged += geolocator_PositionChanged;
                geolocator.StatusChanged += geolocator_StatusChanged;
            }

        }

        void geolocator_StatusChanged(Windows.Devices.Geolocation.Geolocator sender, Windows.Devices.Geolocation.StatusChangedEventArgs args)
        {
            if (this.IsListening)
            {
                switch(args.Status)
                {
                    case Windows.Devices.Geolocation.PositionStatus.Disabled:
                    case Windows.Devices.Geolocation.PositionStatus.Initializing:
                        break;
                    case Windows.Devices.Geolocation.PositionStatus.NoData:
                    case Windows.Devices.Geolocation.PositionStatus.NotAvailable:
                        this.PositionError(sender, new PositionErrorEventArgs(GeolocationError.PositionUnavailable));
                        break;
                    case Windows.Devices.Geolocation.PositionStatus.NotInitialized:
                        this.PositionError(sender, new PositionErrorEventArgs(GeolocationError.Unauthorized));
                        break;
                    case Windows.Devices.Geolocation.PositionStatus.Ready:
                        break;
                }
            }
        }

        void geolocator_PositionChanged(Windows.Devices.Geolocation.Geolocator sender, Windows.Devices.Geolocation.PositionChangedEventArgs args)
        {
            if (this.IsListening)
            {
                var position = args.Position;
                Position p = new Position()
                {
                    Accuracy = position.Coordinate.Accuracy,
                    Altitude = position.Coordinate.Altitude,
                    AltitudeAccuracy = position.Coordinate.AltitudeAccuracy,
                    Heading = position.Coordinate.Heading,
                    Latitude = position.Coordinate.Latitude,
                    Longitude = position.Coordinate.Longitude,
                    Speed = position.Coordinate.Speed,
                    Timestamp = position.Coordinate.Timestamp.DateTime
                };
                this.PositionChanged(sender, new PositionEventArgs(p));
            }
        }
        //
        // Summary:
        //     Stop listening to location changes
        public void StopListening()
        {
            this.IsListening = false;
            geolocator.PositionChanged -= geolocator_PositionChanged;
        }
    }
}


text:
(function($){

  var DetailsPop = function(element){
    this.$element = $(element);
    this.res_uri = this.$element.data('res-uri');
    this.edit_uri = this.$element.data('edit-uri');
    this.obj_data = null;

    this.$element.on('click', $.proxy(this.click, this));
  };

  DetailsPop.prototype = {
      constructor: DetailsPop,

      click: function(e){
        e.stopPropagation();
        e.preventDefault();
        var modal = $('#detail-modal-id');
        var el = this.$element;
        if(!modal.length){
          modal = $('

'+
            '
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
'+
            el.attr('title') +'

'+
            '
<button class="btn btn-default" data-dismiss="modal" aria-hidden="true">'+gettext('Close')+'</button>'+
            ' '+gettext('Edit')+'

');
          $('body').append(modal);
        }
        modal.find('.modal-title').html(el.attr('title'));
        var edit_btn = modal.find('.edit-btn');
        if(this.edit_uri != ""){
          edit_btn.attr('href', this.edit_uri);
        }else{
          edit_btn.remove();
        }
        modal.find('.modal-body').html('

');
        modal.find('.modal-body').load(this.res_uri + '?_format=html', function(response, status, xhr) {
          if (status == "error") {
            var msg = "Sorry but there was an error: ";
            modal.find('.modal-body').html(msg + xhr.status + " " + (typeof xhr === 'string' ? xhr : xhr.responseText || xhr.statusText || 'Unknown error!'));
          }
        });
        modal.modal();
      }
  };

  $.fn.details = function () {
    return this.each(function () {
      var $this = $(this), data = $this.data('details');
      if (!data) {
          $this.data('details', (data = new DetailsPop(this)));
      }
    });
  };

  $(function(){
    $('.details-handler').details();
  });

})(jQuery);


text:
"""Proxy to handle account communication with Renault servers."""
from __future__ import annotations

import asyncio
from collections.abc import Awaitable, Callable
from dataclasses import dataclass
from datetime import timedelta
import logging
from typing import cast

from renault_api.kamereon import models
from renault_api.renault_vehicle import RenaultVehicle

from homeassistant.core import HomeAssistant
from homeassistant.helpers.entity import DeviceInfo

from .const import DOMAIN
from .renault_coordinator import RenaultDataUpdateCoordinator

LOGGER = logging.getLogger(__name__)

@dataclass
class RenaultCoordinatorDescription:
    """Class describing Renault coordinators."""

    endpoint: str
    key: str
    update_method: Callable[
        [RenaultVehicle],
        Callable[[], Awaitable[models.KamereonVehicleDataAttributes]],
    ]
    # Optional keys
    requires_electricity: bool = False

class RenaultVehicleProxy:
    """Handle vehicle communication with Renault servers."""

    def __init__(
        self,
        hass: HomeAssistant,
        vehicle: RenaultVehicle,
        details: models.KamereonVehicleDetails,
        scan_interval: timedelta,
    ) -> None:
        """Initialise vehicle proxy."""
        self.hass = hass
        self._vehicle = vehicle
        self._details = details
        self._device_info = DeviceInfo(
            identifiers={(DOMAIN, cast(str, details.vin))},
            manufacturer=(details.get_brand_label() or "").capitalize(),
            model=(details.get_model_label() or "").capitalize(),
            name=details.registrationNumber or "",
            sw_version=details.get_model_code() or "",
        )
        self.coordinators: dict[str, RenaultDataUpdateCoordinator] = {}
        self.hvac_target_temperature = 21
        self._scan_interval = scan_interval

    @property
    def details(self) -> models.KamereonVehicleDetails:
        """Return the specs of the vehicle."""
        return self._details

    @property
    def device_info(self) -> DeviceInfo:
        """Return a device description for device registry."""
        return self._device_info

    @property
    def vehicle(self) -> RenaultVehicle:
        """Return the underlying vehicle."""
        return self._vehicle

    async def async_initialise(self) -> None:
        """Load available coordinators."""
        self.coordinators = {
            coord.key: RenaultDataUpdateCoordinator(
                self.hass,
                LOGGER,
                # Name of the data. For logging purposes.
                name=f"{self.details.vin} {coord.key}",
                update_method=coord.update_method(self._vehicle),
                # Polling interval. Will only be polled if there are subscribers.
                update_interval=self._scan_interval,
            )
            for coord in COORDINATORS
            if (
                self.details.supports_endpoint(coord.endpoint)
                and (not coord.requires_electricity or self.details.uses_electricity())
            )
        }
        # Check all coordinators
        await asyncio.gather(
            *(
                coordinator.async_config_entry_first_refresh()
                for coordinator in self.coordinators.values()
            )
        )
        for key in list(self.coordinators):
            # list() to avoid Runtime iteration error
            coordinator = self.coordinators[key]
            if coordinator.not_supported:
                # Remove endpoint as it is not supported for this vehicle.
                LOGGER.info(
                    "Ignoring endpoint %s as it is not supported for this vehicle: %s",
                    coordinator.name,
                    coordinator.last_exception,
                )
                del self.coordinators[key]
            elif coordinator.access_denied:
                # Remove endpoint as it is denied for this vehicle.
                LOGGER.info(
                    "Ignoring endpoint %s as it is denied for this vehicle: %s",
                    coordinator.name,
                    coordinator.last_exception,
                )
                del self.coordinators[key]

COORDINATORS: tuple[RenaultCoordinatorDescription, ...] = (
    RenaultCoordinatorDescription(
        endpoint="cockpit",
        key="cockpit",
        update_method=lambda x: x.get_cockpit,
    ),
    RenaultCoordinatorDescription(
        endpoint="hvac-status",
        key="hvac_status",
        update_method=lambda x: x.get_hvac_status,
    ),
    RenaultCoordinatorDescription(
        endpoint="location",
        key="location",
        update_method=lambda x: x.get_location,
    ),
    RenaultCoordinatorDescription(
        endpoint="battery-status",
        key="battery",
        requires_electricity=True,
        update_method=lambda x: x.get_battery_status,
    ),
    RenaultCoordinatorDescription(
        endpoint="charge-mode",
        key="charge_mode",
        requires_electricity=True,
        update_method=lambda x: x.get_charge_mode,
    ),
    RenaultCoordinatorDescription(
        endpoint="lock-status",
        key="lock_status",
        update_method=lambda x: x.get_lock_status,
    ),
    RenaultCoordinatorDescription(
        endpoint="res-state",
        key="res_state",
        update_method=lambda x: x.get_res_state,
    ),
)


text:
'use strict';Object.defineProperty(exports,"__esModule",{value:true});var _extends=Object.assign||function(target){for(var i=1;i<arguments.length;i++){var source=arguments[i];for(var key in source){if(Object.prototype.hasOwnProperty.call(source,key)){target[key]=source[key];}}}return target;};exports.default=

function(navigation){
return _extends({},
navigation,{
goBack:function goBack(key){return navigation.dispatch(_NavigationActions2.default.back({
key:key===undefined?navigation.state.key:key}));},

navigate:function navigate(
routeName,
params,
action){return(
navigation.dispatch(_NavigationActions2.default.navigate({
routeName:routeName,
params:params,
action:action})));},

setParams:function setParams(params){return(
navigation.dispatch(_NavigationActions2.default.setParams({
params:params,
key:navigation.state.key})));}});

};var _NavigationActions=require('./NavigationActions');var _NavigationActions2=_interopRequireDefault(_NavigationActions);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}


text:
"""
Member forms for gunclub
"""

from django import forms
from django.contrib.auth.models import User
from django.contrib.sites.models import get_current_site
from django.utils.translation import ugettext_lazy as _
from registration.models import RegistrationProfile

from gunclub import settings
from member.models import Profile

class AddMemberForm(forms.ModelForm):
    ##member_id = forms.IntegerField(label=_('Member ID'))
    username = forms.RegexField(regex=r'^[\w.@+-]+$',
                                max_length=30,
                                label=_("Username"),
                                error_messages={'invalid': _("This value may "
                  "contain only letters, numbers and @/./+/-/_ characters.")})
    email = forms.EmailField(max_length=75, label=_("E-mail"), required=False)
    first_name = forms.CharField(max_length=30, label=_('first name'))
    last_name = forms.CharField(max_length=30, label=_('last name'))

    def save(self, request, *args, **kwargs):
        user = RegistrationProfile.objects.create_inactive_user(
            username=self.cleaned_data['username'],
            email=self.cleaned_data['email'],
            password='$up3rS3cr3t',
            site=get_current_site(request),
            send_email=settings.SEND_REGISTRATION_EMAIL,
        )
        ##user.pk = self.cleaned_data.get('member_id')
        user.first_name = self.cleaned_data.get('first_name')
        user.last_name = self.cleaned_data.get('last_name')
        user.save()
        profile = user.get_profile()
        profile.rg = self.cleaned_data.get('rg')
        profile.cpf = self.cleaned_data.get('cpf')
        profile.date_of_birth = self.cleaned_data.get('date_of_birth')
        profile.job_position = self.cleaned_data.get('job_position')
        profile.is_member = self.cleaned_data.get('is_member')
        profile.phone_home = self.cleaned_data.get('phone_home')
        profile.phone_mobile = self.cleaned_data.get('phone_mobile')
        profile.phone_work= self.cleaned_data.get('phone_work')
        profile.save()
        return profile

    def clean_username(self):
        """
        Validate that the username is alphanumeric and is not already
        in use.

        """
        existing = User.objects.filter(
            username__iexact=self.cleaned_data['username'])
        if existing.exists():
            error_msg = _("A user with that username already exists.")
            raise forms.ValidationError(error_msg)
        else:
            return self.cleaned_data['username']

    class Meta:
        exclude = ['user',]
        fields = [
            'username',
            'email',
            'first_name',
            'last_name',
            'rg',
            'cpf',
            'date_of_birth',
            'job_position',
            'is_member',
            'phone_home',
            'phone_mobile',
            'phone_work',
        ]
        model = Profile

class EditMemberForm(forms.ModelForm):
    first_name = forms.CharField(max_length=30, label=_('first name'))
    last_name = forms.CharField(max_length=30, label=_('last name'))
    email = forms.EmailField(max_length=75, label=_("E-mail"), required=False)

    def __init__(self, *args, **kwargs):
        super(EditMemberForm, self).__init__(*args, **kwargs)
        self.fields['first_name'].initial = self.instance.user.first_name
        self.fields['last_name'].initial = self.instance.user.last_name
        self.fields['email'].initial = self.instance.user.email

    def save(self, *args, **kwargs):
        super(EditMemberForm, self).save(*args, **kwargs)
        self.instance.user.first_name = self.cleaned_data.get('first_name')
        self.instance.user.last_name = self.cleaned_data.get('last_name')
        self.instance.user.email = self.cleaned_data.get('email')
        self.instance.user.save()
        return self.instance

    class Meta:
        exclude = ['user',]
        fields = [
            'email',
            'first_name',
            'last_name',
            'is_member',
            'job_position',
            'gender',
            'relationship',
            'spouse_name',
            'father_name',
            'mother_name',
            'date_of_birth',
            'place_of_birth',
            'cpf',
            'rg',
            'rg_issuing_institution',
            'rg_date_of_issue',
            'has_cr',
            'cr_valid_thru',
            'invoice_due_day',
            'street',
            'street2',
            'city',
            'postal_code',
            'state_province',
            'phone_home',
            'phone_mobile',
            'phone_work',
        ]
        model = Profile


text:
namespace EDDiscovery.UserControls
{
    partial class UserControlEngineering
    {
        /// <summary>
        /// Required designer variable.
        /// </summary>
        private System.ComponentModel.IContainer components = null;

        /// <summary>
        /// Clean up any resources being used.
        /// </summary>
        /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
        protected override void Dispose(bool disposing)
        {
            if (disposing && (components != null))
            {
                components.Dispose();
            }
            base.Dispose(disposing);
        }

        #region Component Designer generated code

        /// <summary>
        /// Required method for Designer support - do not modify
        /// the contents of this method with the code editor.
        /// </summary>
        private void InitializeComponent()
        {
            this.components = new System.ComponentModel.Container();
            this.dataViewScrollerPanel = new ExtendedControls.ExtPanelDataGridViewScroll();
            this.dataGridViewEngineering = new BaseUtils.DataGridViewColumnControl();
            this.vScrollBarCustomMC = new ExtendedControls.ExtScrollBar();
            this.toolTip = new System.Windows.Forms.ToolTip(this.components);
            this.buttonFilterUpgrade = new ExtendedControls.ExtButton();
            this.buttonFilterModule = new ExtendedControls.ExtButton();
            this.buttonFilterLevel = new ExtendedControls.ExtButton();
            this.buttonFilterEngineer = new ExtendedControls.ExtButton();
            this.buttonFilterMaterial = new ExtendedControls.ExtButton();
            this.buttonClear = new ExtendedControls.ExtButton();
            this.chkNotHistoric = new ExtendedControls.ExtCheckBox();
            this.extCheckBoxWordWrap = new ExtendedControls.ExtCheckBox();
            this.panelTop = new System.Windows.Forms.FlowLayoutPanel();
            this.UpgradeCol = new System.Windows.Forms.DataGridViewTextBoxColumn();
            this.ModuleCol = new System.Windows.Forms.DataGridViewTextBoxColumn();
            this.LevelCol = new System.Windows.Forms.DataGridViewTextBoxColumn();
            this.MaxCol = new System.Windows.Forms.DataGridViewTextBoxColumn();
            this.WantedCol = new System.Windows.Forms.DataGridViewTextBoxColumn();
            this.AvailableCol = new System.Windows.Forms.DataGridViewTextBoxColumn();
            this.PercentageCol = new System.Windows.Forms.DataGridViewTextBoxColumn();
            this.NotesCol = new System.Windows.Forms.DataGridViewTextBoxColumn();
            this.RecipeCol = new System.Windows.Forms.DataGridViewTextBoxColumn();
            this.EngineersCol = new System.Windows.Forms.DataGridViewTextBoxColumn();
            this.dataViewScrollerPanel.SuspendLayout();
            ((System.ComponentModel.ISupportInitialize)(this.dataGridViewEngineering)).BeginInit();
            this.panelTop.SuspendLayout();
            this.SuspendLayout();
            //
            // dataViewScrollerPanel
            //
            this.dataViewScrollerPanel.Controls.Add(this.dataGridViewEngineering);
            this.dataViewScrollerPanel.Controls.Add(this.vScrollBarCustomMC);
            this.dataViewScrollerPanel.Dock = System.Windows.Forms.DockStyle.Fill;
            this.dataViewScrollerPanel.InternalMargin = new System.Windows.Forms.Padding(0);
            this.dataViewScrollerPanel.Location = new System.Drawing.Point(0, 30);
            this.dataViewScrollerPanel.Name = "dataViewScrollerPanel";
            this.dataViewScrollerPanel.Size = new System.Drawing.Size(800, 542);
            this.dataViewScrollerPanel.TabIndex = 0;
            this.dataViewScrollerPanel.VerticalScrollBarDockRight = true;
            //
            // dataGridViewEngineering
            //
            this.dataGridViewEngineering.AllowDrop = true;
            this.dataGridViewEngineering.AllowUserToAddRows = false;
            this.dataGridViewEngineering.AllowUserToDeleteRows = false;
            this.dataGridViewEngineering.AllowUserToOrderColumns = true;
            this.dataGridViewEngineering.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill;
            this.dataGridViewEngineering.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
            this.dataGridViewEngineering.ColumnReorder = true;
            this.dataGridViewEngineering.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
            this.UpgradeCol,
            this.ModuleCol,
            this.LevelCol,
            this.MaxCol,
            this.WantedCol,
            this.AvailableCol,
            this.PercentageCol,
            this.NotesCol,
            this.RecipeCol,
            this.EngineersCol});
            this.dataGridViewEngineering.Location = new System.Drawing.Point(0, 0);
            this.dataGridViewEngineering.Name = "dataGridViewEngineering";
            this.dataGridViewEngineering.PerColumnWordWrapControl = true;
            this.dataGridViewEngineering.RowHeaderMenuStrip = null;
            this.dataGridViewEngineering.RowHeadersVisible = false;
            this.dataGridViewEngineering.RowHeadersWidth = 25;
            this.dataGridViewEngineering.ScrollBars = System.Windows.Forms.ScrollBars.None;
            this.dataGridViewEngineering.SingleRowSelect = true;
            this.dataGridViewEngineering.Size = new System.Drawing.Size(784, 542);
            this.dataGridViewEngineering.TabIndex = 1;
            this.dataGridViewEngineering.CellDoubleClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dataGridViewEngineering_CellDoubleClick);
            this.dataGridViewEngineering.CellEndEdit += new System.Windows.Forms.DataGridViewCellEventHandler(this.dataGridViewModules_CellEndEdit);
            this.dataGridViewEngineering.DragDrop += new System.Windows.Forms.DragEventHandler(this.dataGridViewEngineering_DragDrop);
            this.dataGridViewEngineering.DragOver += new System.Windows.Forms.DragEventHandler(this.dataGridViewEngineering_DragOver);
            this.dataGridViewEngineering.MouseDown += new System.Windows.Forms.MouseEventHandler(this.dataGridViewEngineering_MouseDown);
            this.dataGridViewEngineering.MouseMove += new System.Windows.Forms.MouseEventHandler(this.dataGridViewEngineering_MouseMove);
            //
            // vScrollBarCustomMC
            //
            this.vScrollBarCustomMC.ArrowBorderColor = System.Drawing.Color.LightBlue;
            this.vScrollBarCustomMC.ArrowButtonColor = System.Drawing.Color.LightGray;
            this.vScrollBarCustomMC.ArrowColorScaling = 0.5F;
            this.vScrollBarCustomMC.ArrowDownDrawAngle = 270F;
            this.vScrollBarCustomMC.ArrowUpDrawAngle = 90F;
            this.vScrollBarCustomMC.BorderColor = System.Drawing.Color.White;
            this.vScrollBarCustomMC.FlatStyle = System.Windows.Forms.FlatStyle.System;
            this.vScrollBarCustomMC.HideScrollBar = false;
            this.vScrollBarCustomMC.LargeChange = 0;
            this.vScrollBarCustomMC.Location = new System.Drawing.Point(784, 0);
            this.vScrollBarCustomMC.Maximum = -1;
            this.vScrollBarCustomMC.Minimum = 0;
            this.vScrollBarCustomMC.MouseOverButtonColor = System.Drawing.Color.Green;
            this.vScrollBarCustomMC.MousePressedButtonColor = System.Drawing.Color.Red;
            this.vScrollBarCustomMC.Name = "vScrollBarCustomMC";
            this.vScrollBarCustomMC.Size = new System.Drawing.Size(16, 542);
            this.vScrollBarCustomMC.SliderColor = System.Drawing.Color.DarkGray;
            this.vScrollBarCustomMC.SmallChange = 1;
            this.vScrollBarCustomMC.TabIndex = 0;
            this.vScrollBarCustomMC.ThumbBorderColor = System.Drawing.Color.Yellow;
            this.vScrollBarCustomMC.ThumbButtonColor = System.Drawing.Color.DarkBlue;
            this.vScrollBarCustomMC.ThumbColorScaling = 0.5F;
            this.vScrollBarCustomMC.ThumbDrawAngle = 0F;
            this.vScrollBarCustomMC.Value = -1;
            this.vScrollBarCustomMC.ValueLimited = -1;
            //
            // toolTip
            //
            this.toolTip.ShowAlways = true;
            //
            // buttonFilterUpgrade
            //
            this.buttonFilterUpgrade.Image = global::EDDiscovery.Icons.Controls.EngineerRecipe;
            this.buttonFilterUpgrade.Location = new System.Drawing.Point(8, 1);
            this.buttonFilterUpgrade.Margin = new System.Windows.Forms.Padding(8, 1, 4, 1);
            this.buttonFilterUpgrade.Name = "buttonFilterUpgrade";
            this.buttonFilterUpgrade.Size = new System.Drawing.Size(28, 28);
            this.buttonFilterUpgrade.TabIndex = 3;
            this.toolTip.SetToolTip(this.buttonFilterUpgrade, "Filter the table by upgrade type");
            this.buttonFilterUpgrade.UseVisualStyleBackColor = true;
            this.buttonFilterUpgrade.Click += new System.EventHandler(this.buttonFilterUpgrade_Click);
            //
            // buttonFilterModule
            //
            this.buttonFilterModule.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
            this.buttonFilterModule.Image = global::EDDiscovery.Icons.Controls.ModuleInfo;
            this.buttonFilterModule.Location = new System.Drawing.Point(48, 1);
            this.buttonFilterModule.Margin = new System.Windows.Forms.Padding(8, 1, 4, 1);
            this.buttonFilterModule.Name = "buttonFilterModule";
            this.buttonFilterModule.Size = new System.Drawing.Size(28, 28);
            this.buttonFilterModule.TabIndex = 0;
            this.toolTip.SetToolTip(this.buttonFilterModule, "Filter the table by module type");
            this.buttonFilterModule.UseVisualStyleBackColor = true;
            this.buttonFilterModule.Click += new System.EventHandler(this.buttonFilterModule_Click);
            //
            // buttonFilterLevel
            //
            this.buttonFilterLevel.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
            this.buttonFilterLevel.Image = global::EDDiscovery.Icons.Controls.Level;
            this.buttonFilterLevel.Location = new System.Drawing.Point(88, 1);
            this.buttonFilterLevel.Margin = new System.Windows.Forms.Padding(8, 1, 4, 1);
            this.buttonFilterLevel.Name = "buttonFilterLevel";
            this.buttonFilterLevel.Size = new System.Drawing.Size(28, 28);
            this.buttonFilterLevel.TabIndex = 2;
            this.toolTip.SetToolTip(this.buttonFilterLevel, "Filter the table by level");
            this.buttonFilterLevel.UseVisualStyleBackColor = true;
            this.buttonFilterLevel.Click += new System.EventHandler(this.buttonFilterLevel_Click);
            //
            // buttonFilterEngineer
            //
            this.buttonFilterEngineer.Image = global::EDDiscovery.Icons.Controls.EngineerCraft;
            this.buttonFilterEngineer.Location = new System.Drawing.Point(128, 1);
            this.buttonFilterEngineer.Margin = new System.Windows.Forms.Padding(8, 1, 4, 1);
            this.buttonFilterEngineer.Name = "buttonFilterEngineer";
            this.buttonFilterEngineer.Size = new System.Drawing.Size(28, 28);
            this.buttonFilterEngineer.TabIndex = 1;
            this.toolTip.SetToolTip(this.buttonFilterEngineer, "Filter the table by engineer");
            this.buttonFilterEngineer.UseVisualStyleBackColor = true;
            this.buttonFilterEngineer.Click += new System.EventHandler(this.buttonFilterEngineer_Click);
            //
            // buttonFilterMaterial
            //
            this.buttonFilterMaterial.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
            this.buttonFilterMaterial.Image = global::EDDiscovery.Icons.Controls.Materials;
            this.buttonFilterMaterial.Location = new System.Drawing.Point(168, 1);
            this.buttonFilterMaterial.Margin = new System.Windows.Forms.Padding(8, 1, 4, 1);
            this.buttonFilterMaterial.Name = "buttonFilterMaterial";
            this.buttonFilterMaterial.Size = new System.Drawing.Size(28, 28);
            this.buttonFilterMaterial.TabIndex = 4;
            this.toolTip.SetToolTip(this.buttonFilterMaterial, "Filter the table by material");
            this.buttonFilterMaterial.UseVisualStyleBackColor = true;
            this.buttonFilterMaterial.Click += new System.EventHandler(this.buttonFilterMaterial_Click);
            //
            // buttonClear
            //
            this.buttonClear.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
            this.buttonClear.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
            this.buttonClear.Image = global::EDDiscovery.Icons.Controls.Cross;
            this.buttonClear.Location = new System.Drawing.Point(208, 1);
            this.buttonClear.Margin = new System.Windows.Forms.Padding(8, 1, 4, 1);
            this.buttonClear.Name = "buttonClear";
            this.buttonClear.Size = new System.Drawing.Size(28, 28);
            this.buttonClear.TabIndex = 5;
            this.toolTip.SetToolTip(this.buttonClear, "Set all wanted values to zero");
            this.buttonClear.UseVisualStyleBackColor = true;
            this.buttonClear.Click += new System.EventHandler(this.buttonClear_Click);
            //
            // chkNotHistoric
            //
            this.chkNotHistoric.Appearance = System.Windows.Forms.Appearance.Button;
            this.chkNotHistoric.CheckBoxColor = System.Drawing.Color.Gray;
            this.chkNotHistoric.CheckBoxDisabledScaling = 0.5F;
            this.chkNotHistoric.CheckBoxInnerColor = System.Drawing.Color.White;
            this.chkNotHistoric.CheckColor = System.Drawing.Color.DarkBlue;
            this.chkNotHistoric.Image = global::EDDiscovery.Icons.Controls.CursorToTop;
            this.chkNotHistoric.ImageButtonDisabledScaling = 0.5F;
            this.chkNotHistoric.ImageIndeterminate = null;
            this.chkNotHistoric.ImageLayout = System.Windows.Forms.ImageLayout.Center;
            this.chkNotHistoric.ImageUnchecked = global::EDDiscovery.Icons.Controls.CursorStill;
            this.chkNotHistoric.Location = new System.Drawing.Point(248, 1);
            this.chkNotHistoric.Margin = new System.Windows.Forms.Padding(8, 1, 4, 1);
            this.chkNotHistoric.MouseOverColor = System.Drawing.Color.CornflowerBlue;
            this.chkNotHistoric.Name = "chkNotHistoric";
            this.chkNotHistoric.Size = new System.Drawing.Size(28, 28);
            this.chkNotHistoric.TabIndex = 6;
            this.chkNotHistoric.TickBoxReductionRatio = 0.75F;
            this.toolTip.SetToolTip(this.chkNotHistoric, "When red, use the materials at the cursor to estimate, when green always use the " +
        "latest materials.");
            this.chkNotHistoric.UseVisualStyleBackColor = true;
            this.chkNotHistoric.CheckedChanged += new System.EventHandler(this.chkHistoric_CheckedChanged);
            //
            // extCheckBoxWordWrap
            //
            this.extCheckBoxWordWrap.Appearance = System.Windows.Forms.Appearance.Button;
            this.extCheckBoxWordWrap.BackColor = System.Drawing.Color.Transparent;
            this.extCheckBoxWordWrap.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
            this.extCheckBoxWordWrap.CheckBoxColor = System.Drawing.Color.White;
            this.extCheckBoxWordWrap.CheckBoxDisabledScaling = 0.5F;
            this.extCheckBoxWordWrap.CheckBoxInnerColor = System.Drawing.Color.White;
            this.extCheckBoxWordWrap.CheckColor = System.Drawing.Color.DarkBlue;
            this.extCheckBoxWordWrap.Cursor = System.Windows.Forms.Cursors.Default;
            this.extCheckBoxWordWrap.FlatAppearance.BorderColor = System.Drawing.SystemColors.ControlDarkDark;
            this.extCheckBoxWordWrap.FlatAppearance.CheckedBackColor = System.Drawing.Color.Green;
            this.extCheckBoxWordWrap.FlatAppearance.MouseDownBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(192)))), ((int)(((byte)(0)))));
            this.extCheckBoxWordWrap.FlatAppearance.MouseOverBackColor = System.Drawing.Color.Silver;
            this.extCheckBoxWordWrap.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
            this.extCheckBoxWordWrap.Image = global::EDDiscovery.Icons.Controls.WordWrapOn;
            this.extCheckBoxWordWrap.ImageButtonDisabledScaling = 0.5F;
            this.extCheckBoxWordWrap.ImageIndeterminate = null;
            this.extCheckBoxWordWrap.ImageLayout = System.Windows.Forms.ImageLayout.Center;
            this.extCheckBoxWordWrap.ImageUnchecked = global::EDDiscovery.Icons.Controls.WordWrapOff;
            this.extCheckBoxWordWrap.Location = new System.Drawing.Point(288, 1);
            this.extCheckBoxWordWrap.Margin = new System.Windows.Forms.Padding(8, 1, 4, 1);
            this.extCheckBoxWordWrap.MouseOverColor = System.Drawing.Color.CornflowerBlue;
            this.extCheckBoxWordWrap.Name = "extCheckBoxWordWrap";
            this.extCheckBoxWordWrap.Size = new System.Drawing.Size(28, 28);
            this.extCheckBoxWordWrap.TabIndex = 31;
            this.extCheckBoxWordWrap.TickBoxReductionRatio = 0.75F;
            this.toolTip.SetToolTip(this.extCheckBoxWordWrap, "Enable or disable word wrap");
            this.extCheckBoxWordWrap.UseVisualStyleBackColor = false;
            //
            // panelTop
            //
            this.panelTop.AutoSize = true;
            this.panelTop.Controls.Add(this.buttonFilterUpgrade);
            this.panelTop.Controls.Add(this.buttonFilterModule);
            this.panelTop.Controls.Add(this.buttonFilterLevel);
            this.panelTop.Controls.Add(this.buttonFilterEngineer);
            this.panelTop.Controls.Add(this.buttonFilterMaterial);
            this.panelTop.Controls.Add(this.buttonClear);
            this.panelTop.Controls.Add(this.chkNotHistoric);
            this.panelTop.Controls.Add(this.extCheckBoxWordWrap);
            this.panelTop.Dock = System.Windows.Forms.DockStyle.Top;
            this.panelTop.Location = new System.Drawing.Point(0, 0);
            this.panelTop.Name = "panelTop";
            this.panelTop.Size = new System.Drawing.Size(800, 30);
            this.panelTop.TabIndex = 2;
            //
            // UpgradeCol
            //
            this.UpgradeCol.HeaderText = "Upgrade/Mat";
            this.UpgradeCol.MinimumWidth = 50;
            this.UpgradeCol.Name = "UpgradeCol";
            this.UpgradeCol.ReadOnly = true;
            this.UpgradeCol.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
            //
            // ModuleCol
            //
            this.ModuleCol.HeaderText = "Module";
            this.ModuleCol.MinimumWidth = 50;
            this.ModuleCol.Name = "ModuleCol";
            this.ModuleCol.ReadOnly = true;
            this.ModuleCol.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
            //
            // LevelCol
            //
            this.LevelCol.FillWeight = 25F;
            this.LevelCol.HeaderText = "Level";
            this.LevelCol.MinimumWidth = 50;
            this.LevelCol.Name = "LevelCol";
            this.LevelCol.ReadOnly = true;
            this.LevelCol.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
            //
            // MaxCol
            //
            this.MaxCol.FillWeight = 25F;
            this.MaxCol.HeaderText = "Max";
            this.MaxCol.MinimumWidth = 50;
            this.MaxCol.Name = "MaxCol";
            this.MaxCol.ReadOnly = true;
            this.MaxCol.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
            //
            // WantedCol
            //
            this.WantedCol.FillWeight = 25F;
            this.WantedCol.HeaderText = "Wanted";
            this.WantedCol.MinimumWidth = 50;
            this.WantedCol.Name = "WantedCol";
            this.WantedCol.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
            //
            // AvailableCol
            //
            this.AvailableCol.FillWeight = 25F;
            this.AvailableCol.HeaderText = "Avail.";
            this.AvailableCol.MinimumWidth = 50;
            this.AvailableCol.Name = "AvailableCol";
            this.AvailableCol.ReadOnly = true;
            this.AvailableCol.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
            //
            // PercentageCol
            //
            this.PercentageCol.FillWeight = 25F;
            this.PercentageCol.HeaderText = "%";
            this.PercentageCol.Name = "PercentageCol";
            this.PercentageCol.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
            //
            // NotesCol
            //
            this.NotesCol.FillWeight = 150F;
            this.NotesCol.HeaderText = "Notes";
            this.NotesCol.MinimumWidth = 50;
            this.NotesCol.Name = "NotesCol";
            this.NotesCol.ReadOnly = true;
            this.NotesCol.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
            //
            // RecipeCol
            //
            this.RecipeCol.FillWeight = 50F;
            this.RecipeCol.HeaderText = "Recipe";
            this.RecipeCol.MinimumWidth = 15;
            this.RecipeCol.Name = "RecipeCol";
            this.RecipeCol.ReadOnly = true;
            this.RecipeCol.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
            //
            // EngineersCol
            //
            this.EngineersCol.HeaderText = "Engineers";
            this.EngineersCol.MinimumWidth = 50;
            this.EngineersCol.Name = "EngineersCol";
            this.EngineersCol.ReadOnly = true;
            this.EngineersCol.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
            //
            // UserControlEngineering
            //
            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
            this.Controls.Add(this.dataViewScrollerPanel);
            this.Controls.Add(this.panelTop);
            this.Name = "UserControlEngineering";
            this.Size = new System.Drawing.Size(800, 572);
            this.dataViewScrollerPanel.ResumeLayout(false);
            ((System.ComponentModel.ISupportInitialize)(this.dataGridViewEngineering)).EndInit();
            this.panelTop.ResumeLayout(false);
            this.ResumeLayout(false);
            this.PerformLayout();

        }

        #endregion

        private ExtendedControls.ExtPanelDataGridViewScroll dataViewScrollerPanel;
        private BaseUtils.DataGridViewColumnControl dataGridViewEngineering;
        private ExtendedControls.ExtScrollBar vScrollBarCustomMC;
        private System.Windows.Forms.ToolTip toolTip;
        private ExtendedControls.ExtButton buttonFilterLevel;
        private ExtendedControls.ExtButton buttonFilterEngineer;
        private ExtendedControls.ExtButton buttonFilterModule;
        private ExtendedControls.ExtButton buttonFilterUpgrade;
        private ExtendedControls.ExtButton buttonFilterMaterial;
        private ExtendedControls.ExtButton buttonClear;
        private ExtendedControls.ExtCheckBox chkNotHistoric;
        private System.Windows.Forms.FlowLayoutPanel panelTop;
        private ExtendedControls.ExtCheckBox extCheckBoxWordWrap;
        private System.Windows.Forms.DataGridViewTextBoxColumn UpgradeCol;
        private System.Windows.Forms.DataGridViewTextBoxColumn ModuleCol;
        private System.Windows.Forms.DataGridViewTextBoxColumn LevelCol;
        private System.Windows.Forms.DataGridViewTextBoxColumn MaxCol;
        private System.Windows.Forms.DataGridViewTextBoxColumn WantedCol;
        private System.Windows.Forms.DataGridViewTextBoxColumn AvailableCol;
        private System.Windows.Forms.DataGridViewTextBoxColumn PercentageCol;
        private System.Windows.Forms.DataGridViewTextBoxColumn NotesCol;
        private System.Windows.Forms.DataGridViewTextBoxColumn RecipeCol;
        private System.Windows.Forms.DataGridViewTextBoxColumn EngineersCol;
    }
}


text:
<?php

namespace utest\event\unit;

use umi\event\Event;
use utest\event\EventTestCase;

/**
 * Тесты события
 *
 */
class EventTest extends EventTestCase
{

    public function testEvent()
    {
        $target = new \stdClass();
        $rel = 'rel';
        $param = 'param';
        $event = new Event('testEvent', $target, ['param' => $param, 'rel' => &$rel], ['tag1', 'tag2']);

        $this->assertEquals('testEvent', $event->getType(), 'Неверный тип события');
        $this->assertTrue($target === $event->getTarget(), 'Неверный объект, в котором произошло событие');
        $this->assertEquals(['tag1', 'tag2'], $event->getTags(), 'Неверные теги события');

        $this->assertEquals('param', $event->getParam('param'), 'Неверное значение параметра');
        $this->assertNull($event->getParam('no_param'), 'Ожидается null, если у события нет запрашиваемого параметра');

        $link = & $event->getParam('rel');
        $link = 'new_rel';
        $this->assertEquals('new_rel', $event->getParam('rel'), 'Параметр передан не по ссылке');

        $this->assertFalse($event->getPropagationIsStopped(), 'Ожидается, что по умолчанию событие не остановлено');
        $this->assertInstanceOf(
            'umi\event\IEvent',
            $event->stopPropagation(true),
            'Ожидается, что IEvent::stopPropagation() вернет себя'
        );
        $this->assertTrue($event->getPropagationIsStopped(), 'Ожидается, что событие было остановлено');

    }

}