text:
namespace TrueTypeConverter
{
    partial class MainForm
    {
        /// <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 Windows Form 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()
        {
            System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(MainForm));
            this.FontName = new System.Windows.Forms.ComboBox();
            this.FontStyle = new System.Windows.Forms.ComboBox();
            this.FontSize = new System.Windows.Forms.ComboBox();
            this.Antialias = new System.Windows.Forms.CheckBox();
            this.label1 = new System.Windows.Forms.Label();
            this.label2 = new System.Windows.Forms.Label();
            this.label3 = new System.Windows.Forms.Label();
            this.Sample = new System.Windows.Forms.Label();
            this.Export = new System.Windows.Forms.Button();
            this.MaxChar = new System.Windows.Forms.TextBox();
            this.MinChar = new System.Windows.Forms.TextBox();
            this.label4 = new System.Windows.Forms.Label();
            this.label5 = new System.Windows.Forms.Label();
            this.SuspendLayout();
            //
            // FontName
            //
            this.FontName.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.SuggestAppend;
            this.FontName.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.ListItems;
            this.FontName.DropDownStyle = System.Windows.Forms.ComboBoxStyle.Simple;
            this.FontName.FormattingEnabled = true;
            this.FontName.Location = new System.Drawing.Point(15, 30);
            this.FontName.Name = "FontName";
            this.FontName.Size = new System.Drawing.Size(189, 176);
            this.FontName.TabIndex = 1;
            this.FontName.SelectedIndexChanged += new System.EventHandler(this.FontName_SelectedIndexChanged);
            //
            // FontStyle
            //
            this.FontStyle.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.SuggestAppend;
            this.FontStyle.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.ListItems;
            this.FontStyle.DropDownStyle = System.Windows.Forms.ComboBoxStyle.Simple;
            this.FontStyle.FormattingEnabled = true;
            this.FontStyle.Items.AddRange(new object[] {
            "Regular",
            "Italic",
            "Bold",
            "Bold, Italic"});
            this.FontStyle.Location = new System.Drawing.Point(218, 30);
            this.FontStyle.Name = "FontStyle";
            this.FontStyle.Size = new System.Drawing.Size(80, 176);
            this.FontStyle.TabIndex = 3;
            this.FontStyle.Text = "Regular";
            this.FontStyle.SelectedIndexChanged += new System.EventHandler(this.FontStyle_SelectedIndexChanged);
            //
            // FontSize
            //
            this.FontSize.DropDownStyle = System.Windows.Forms.ComboBoxStyle.Simple;
            this.FontSize.FormattingEnabled = true;
            this.FontSize.Items.AddRange(new object[] {
            "8",
            "9",
            "10",
            "11",
            "12",
            "14",
            "16",
            "18",
            "20",
            "22",
            "23",
            "24",
            "26",
            "28",
            "36",
            "48",
            "72"});
            this.FontSize.Location = new System.Drawing.Point(312, 30);
            this.FontSize.Name = "FontSize";
            this.FontSize.Size = new System.Drawing.Size(49, 176);
            this.FontSize.TabIndex = 5;
            this.FontSize.Text = "23";
            this.FontSize.SelectedIndexChanged += new System.EventHandler(this.FontSize_SelectedIndexChanged);
            this.FontSize.TextUpdate += new System.EventHandler(this.FontSize_TextUpdate);
            //
            // Antialias
            //
            this.Antialias.AutoSize = true;
            this.Antialias.Checked = true;
            this.Antialias.CheckState = System.Windows.Forms.CheckState.Checked;
            this.Antialias.Location = new System.Drawing.Point(182, 234);
            this.Antialias.Name = "Antialias";
            this.Antialias.Size = new System.Drawing.Size(77, 17);
            this.Antialias.TabIndex = 10;
            this.Antialias.Text = "&Antialiased";
            this.Antialias.UseVisualStyleBackColor = true;
            //
            // label1
            //
            this.label1.AutoSize = true;
            this.label1.Location = new System.Drawing.Point(12, 215);
            this.label1.Name = "label1";
            this.label1.Size = new System.Drawing.Size(51, 13);
            this.label1.TabIndex = 6;
            this.label1.Text = "M&in char:";
            //
            // label2
            //
            this.label2.AutoSize = true;
            this.label2.Location = new System.Drawing.Point(215, 14);
            this.label2.Name = "label2";
            this.label2.Size = new System.Drawing.Size(55, 13);
            this.label2.TabIndex = 2;
            this.label2.Text = "Font s&tyle:";
            //
            // label3
            //
            this.label3.AutoSize = true;
            this.label3.Location = new System.Drawing.Point(310, 14);
            this.label3.Name = "label3";
            this.label3.Size = new System.Drawing.Size(30, 13);
            this.label3.TabIndex = 4;
            this.label3.Text = "&Size:";
            //
            // Sample
            //
            this.Sample.AutoEllipsis = true;
            this.Sample.Font = new System.Drawing.Font("Arial", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.Sample.Location = new System.Drawing.Point(12, 269);
            this.Sample.Name = "Sample";
            this.Sample.Size = new System.Drawing.Size(354, 172);
            this.Sample.TabIndex = 12;
            this.Sample.Text = "The quick brown fox jumped over the LAZY camel";
            this.Sample.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
            //
            // Export
            //
            this.Export.Location = new System.Drawing.Point(286, 228);
            this.Export.Name = "Export";
            this.Export.Size = new System.Drawing.Size(75, 23);
            this.Export.TabIndex = 11;
            this.Export.Text = "&Export";
            this.Export.UseVisualStyleBackColor = true;
            this.Export.Click += new System.EventHandler(this.Export_Click);
            //
            // MaxChar
            //
            this.MaxChar.Location = new System.Drawing.Point(97, 231);
            this.MaxChar.Name = "MaxChar";
            this.MaxChar.Size = new System.Drawing.Size(63, 20);
            this.MaxChar.TabIndex = 9;
            this.MaxChar.Text = "0x7F";
            //
            // MinChar
            //
            this.MinChar.Location = new System.Drawing.Point(15, 231);
            this.MinChar.Name = "MinChar";
            this.MinChar.Size = new System.Drawing.Size(63, 20);
            this.MinChar.TabIndex = 7;
            this.MinChar.Text = "0x20";
            //
            // label4
            //
            this.label4.AutoSize = true;
            this.label4.Location = new System.Drawing.Point(94, 215);
            this.label4.Name = "label4";
            this.label4.Size = new System.Drawing.Size(54, 13);
            this.label4.TabIndex = 8;
            this.label4.Text = "Ma&x char:";
            //
            // label5
            //
            this.label5.AutoSize = true;
            this.label5.Location = new System.Drawing.Point(12, 14);
            this.label5.Name = "label5";
            this.label5.Size = new System.Drawing.Size(31, 13);
            this.label5.TabIndex = 0;
            this.label5.Text = "&Font:";
            //
            // MainForm
            //
            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
            this.ClientSize = new System.Drawing.Size(378, 450);
            this.Controls.Add(this.MinChar);
            this.Controls.Add(this.MaxChar);
            this.Controls.Add(this.Export);
            this.Controls.Add(this.Sample);
            this.Controls.Add(this.label3);
            this.Controls.Add(this.label2);
            this.Controls.Add(this.label4);
            this.Controls.Add(this.label5);
            this.Controls.Add(this.label1);
            this.Controls.Add(this.Antialias);
            this.Controls.Add(this.FontSize);
            this.Controls.Add(this.FontStyle);
            this.Controls.Add(this.FontName);
            this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
            this.Name = "MainForm";
            this.Text = "ttf2bmp";
            this.ResumeLayout(false);
            this.PerformLayout();

        }

        #endregion

        private System.Windows.Forms.ComboBox FontName;
        private System.Windows.Forms.ComboBox FontStyle;
        private System.Windows.Forms.ComboBox FontSize;
        private System.Windows.Forms.CheckBox Antialias;
        private System.Windows.Forms.Label label1;
        private System.Windows.Forms.Label label2;
        private System.Windows.Forms.Label label3;
        private System.Windows.Forms.Label Sample;
        private System.Windows.Forms.Button Export;
        private System.Windows.Forms.TextBox MaxChar;
        private System.Windows.Forms.TextBox MinChar;
        private System.Windows.Forms.Label label4;
        private System.Windows.Forms.Label label5;
    }
}


text:
<!DOCTYPE html>

  <meta charset="utf-8">

  <meta name="viewport" content="width=device-width, initial-scale=1.0">

  <title>basics — Patrick's Docuhub a documentation</title>

  <link rel="stylesheet" href="../../../_static/css/theme.css" type="text/css" />
  <link rel="stylesheet" href="../../../_static/pygments.css" type="text/css" />
    <link rel="index" title="Index" href="../../../genindex.html" />
    <link rel="search" title="Search" href="../../../search.html" />
    <link rel="next" title="Connect to console" href="connect2console.html" />
    <link rel="prev" title="Routing/Switching" href="../inhoud.html" />
    <link href="../../../_static/mylayout.css" rel="stylesheet" type="text/css">

             Patrick's Docuhub

                2019-07-14

  <form id="rtd-search-form" class="wy-form" action="../../../search.html" method="get">
    <input type="text" name="q" placeholder="Search docs" />
    <input type="hidden" name="check_keywords" value="yes" />
    <input type="hidden" name="area" value="default" />
  </form>

Contents:

cheatsheets

commands

Scripting

Diagrams in Sphinx

python

cumulocity

debian server

workstation

VIM

GIT

Routing/Switching

basics

Connect to console

Routing Concepts

Static Routes

Dynamic Routing

switched networks

Switch Configuration

VLANS

ACLs

DHCP

NAT

Device Discovery Management & Maintenance

routing n switching basics finals

scaling networks

Open Daylight

Setting up a GNS3 server

Storage

          Patrick's Docuhub

Docs »

Routing/Switching »

basics

             View page source

basics¶

Connect to console

minicom

Routing Concepts

basic concepts

Router's 3 packet-forwarding mechanisms

Loopback interfaces

configure loopback interface

Filtering parameters

History commands

Show command examples

ARP - Neighbor Advertisement/Sollicitation

MAC addresses on Serial Interfaces

Packet Forwarding Decision Process

Routing BEST PATH selection

ADMINISTRATIVE DISTANCE

Changing Administrative Distance

example of changing AD for rip

Other applications of A.D.

Directly Connected n Remote Network Routes

The IP routing process

Static Routes

ipv4 syntax

combination of exit interface and next hop

When to Use Static Routes

Default static route

Summary static route

Floating static route

Fully Specified Static Route

ipv6 static routing

ipv6 default static route

verify a default static route

Troubleshooting a missing route

Solve a connectivity problem

Dynamic Routing

Dynamic Routing Protocols Components

Static Routing Uses

Dynamic Routing Uses

RIPv2

enable/disable

disable auto summarization

configure passive interfaces

propagate a default route

exercise example

Remote Networks in Routing table

Routing table terms

Route lookup process

IPv6 Routing Table Entries

QnA Chapter 3

switched networks

elements of a converged network

Hierarchy in the Borderless Switched Network

Access Layer

Distribution Layer

Core Layer

considerations switch

store n forward switching

Cut-Through Switching

Collision domains

QnA Ch4

Switch Configuration

Configure BOOT Environment variable

Switch boot sequence

Recover from System Crash

Configure Sw management ipv4

Setup a static MAC address

Duplex communication

Speed/auto-MDIX

Verify interface status

SSH Switch Setup

Disable unused ports

Port Security

QnA Chapter 5

VLANS

VLAN Benefits

VLAN Types

Voice VLANs

VLAN Trunks

802.1Q Frame

Native VLANS & 802.1Q Tagging

Voice VLAN Tagging

802.1Q tagging

VLAN Ranges

Configuring VLANS

deleting VLANs

verifying VLAN info

TRUNK Configuration

combination exercise

Troubleshooting VLANS

Troubleshooting Trunks

Troubleshooting vlan/trunk bullet points

VLAN Command Summary Table

Inter-VLAN Routing

Inter-VLAN Routing Challenge

Skills integration challenge

QnA Chapter 6

ACLs

ACL operation

ACL Wildcard Masking

Wildcard Mask Abbreviations

Rules for applying ACLs

ACL Placement

Applying standard ipv4 ACLs to interface

Named Standard ACLs

exercises

Editing Numbered ACLs

adding a line to NACL

verifying standard ACL interfaces

ACL VS IP ACL

Clearing ACL Statistics

Accesss-class command

The implicit Deny Any

The order of ACEs in an ACL

Sequencing considerations during configuration

ACL and Routing Processes

Troubleshooting StD IPv4 ACLs

Exercices

Ch7 QnA

DHCP

DHCPv4 Message Format

DHCPv4 Discover Message

DHCPv4 basic server configuration

Verifying DHCPv4

Configure DHCPv4 relay

DHCPv4 Exercises

Configuring a Router as DHCP Client

Troubleshooting DHCP

DHCPv4 Troubleshooting Tasks

SLAAC

DHCPv6 Operations

DHCPv6 Stateless Config

DHCPv6 Stateless Client

Verify Stateless dhcpv6

DHCPv6 Stateful Config

DHCPv6 Stateful Client

Verify Stateful dhcpv6

Configure DHCPv6 relay

DHCPv6 labs

DHCPv6 Troubleshooting Tasks

Ch8 Lab Troubleshooting DHCPv6

Ch8 8.3.1.2 Skills Integration Challenge DHCPv4

DHCPv6 conclusion

Ch8 QnA

Ch8 practice exam

NAT

NAT Border

Types of NAT Addresses

NAT Address Terminology

Static NAT

Dynamic NAT

PAT aka NAT Overload

NAT vs PAT

NAT Advantages

NAT Disadvantages

Configuring Static NAT

Static NAT Process

Configure Static NAT exercise

Dynamic NAT operation

Configuring Dynamic NAT

Dynamic NAT example

Dynamic NAT process

Clearing NAT Translations

Configure Dynamic NAT exercise

Configure Dynamic & Static NAT Lab

Configuring PAT (NAT overload)

PAT analysis

PT Implementing Static & Dynamic NAT

Configure PAT NAT Lab

Port Forwarding

NAT for IPv6?

IPv6 Unique Local Address ULA

NAT for IPv6

Troubleshooting NAT

PT Troubleshooting NAT ex1

LAB Troubleshooting NAT

Ch9 Skills Integration Test - assignment

Ch9 Skills Integration Test - when opened with PT 7.0 on windos

Ch9 practice exam

Device Discovery Management & Maintenance

Cisco Discovery Protocol Operation

cdp exercise 10.1.1.4

Link Layer Discovery Protocol

NTP

NTP Stratum Labels

Verify NTP Server Config

Syslog

Syslog intro

Syslog RFCs

Severity level

Adding a timestamp to Syslog Messages

Default Logging Service Settings

Syslog configuration

Verifying Syslog

PT Configure Syslog & NTP

LAB Configuring syslog & NTP

Router File Systems

Backing up and restoring

Using USB ports

Password Recovery

Lab - Managing Device Configuration Files

IOS 15 System Image Packaging

IOS Image Filenames

boot system command

Technology Packages Licenses

Licensing Proces

Ch10 Skills Integration Challenge

Ch10 practice exam

Ch10 Quiz

routing n switching basics finals

RSE Practice Final

        Next

         Previous

        © Copyright 2019, Patrick Brunswyck

  Built with Sphinx using a theme provided by Read the Docs.

redpajama_set_name: RedPajamaGithub


text:
<GetAttachmentResponse xmlns:m="http://schemas.microsoft.com/exchange/services/2006/messages"
                       xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types">
    <m:ResponseMessages>
        <m:GetAttachmentResponseMessage ResponseClass="Success">
            <m:ResponseCode>NoError</m:ResponseCode>
            <m:Attachments>
                <t:ItemAttachment>
                    <t:AttachmentId Id="AAMkAGUyMzlhODA1LWJjNmMtNDA3Zi05MmMyLTY5YzhiMGUzOTZiZABGAAAAAACy333R3lBgQ4hf/BNYPWikBwA5VVNr9VuwRKflbHd457lbAAAAAAETAAA5VVNr9VuwRKflbHd457lbAAAP46s2AAABEgAQAOlUgQdLlC9DoqjmkkyLmFc="/>
                    <t:Name>This message</t:Name>
                    <t:Message>
                        <t:ItemClass>IPM.Note</t:ItemClass>
                        <t:Subject>Honorable Minister of Finance - Release Funds</t:Subject>
                        <t:Sensitivity>Normal</t:Sensitivity>
                        <t:Body BodyType="Text" IsTruncated="false"/>
                        <t:Size>3216</t:Size>
                        <t:Importance>Normal</t:Importance>
                        <t:IsSubmitted>false</t:IsSubmitted>
                        <t:IsDraft>true</t:IsDraft>
                        <t:IsFromMe>false</t:IsFromMe>
                        <t:IsResend>false</t:IsResend>
                        <t:IsUnmodified>false</t:IsUnmodified>
                        <t:InternetMessageHeaders>
                            <t:InternetMessageHeader HeaderName="Subject">Honorable Minister of Finance - Release Funds</t:InternetMessageHeader>
                            <t:InternetMessageHeader HeaderName="Thread-Topic">Honorable Minister of Finance - Release Funds</t:InternetMessageHeader>
                            <t:InternetMessageHeader HeaderName="Thread-Index">AQHQ/RHAUARM77uwH0uE2jyWfCrvSQ==</t:InternetMessageHeader>
                            <t:InternetMessageHeader HeaderName="Date">Fri, 2 Oct 2015 12:56:27 +0000</t:InternetMessageHeader>
                            <t:InternetMessageHeader HeaderName="Message-ID"><036f1a2d210a4352b623552f1e884ad5@duckburg2013.otris.de></t:InternetMessageHeader>
                            <t:InternetMessageHeader HeaderName="Content-Language">de-DE</t:InternetMessageHeader>
                            <t:InternetMessageHeader HeaderName="Content-Type">text/plain</t:InternetMessageHeader>
                            <t:InternetMessageHeader HeaderName="MIME-Version">1.0</t:InternetMessageHeader>
                        </t:InternetMessageHeaders>
                        <t:DateTimeSent>2015-10-02T12:56:27Z</t:DateTimeSent>
                        <t:DateTimeCreated>2015-10-02T12:56:27Z</t:DateTimeCreated>
                        <t:ResponseObjects>
                                <t:ForwardItem/>
                        </t:ResponseObjects>
                        <t:DisplayCc/>
                        <t:DisplayTo>udom.emmanuel@zenith-bank.com.ng</t:DisplayTo>
                        <t:HasAttachments>false</t:HasAttachments>
                        <t:Culture>de-DE</t:Culture>
                        <t:EffectiveRights>
                            <t:CreateAssociated>false</t:CreateAssociated>
                            <t:CreateContents>false</t:CreateContents>
                            <t:CreateHierarchy>false</t:CreateHierarchy>
                            <t:Delete>true</t:Delete>
                            <t:Modify>true</t:Modify>
                            <t:Read>true</t:Read>
                            <t:ViewPrivateItems>true</t:ViewPrivateItems>
                        </t:EffectiveRights>
                        <t:LastModifiedName>Donald Duck</t:LastModifiedName>
                        <t:LastModifiedTime>2015-10-02T12:56:27Z</t:LastModifiedTime>
                        <t:IsAssociated>false</t:IsAssociated>
                        <t:WebClientReadFormQueryString>?ItemID=AAMkAGUyMzlhODA1LWJjNmMtNDA3Zi05MmMyLTY5YzhiMGUzOTZiZAAAAA%3D%3D&exvsurl=1&viewmodel=ReadMessageItem</t:WebClientReadFormQueryString>
                        <t:ConversationId Id="AAQkAGUyMzlhODA1LWJjNmMtNDA3Zi05MmMyLTY5YzhiMGUzOTZiZAAQAFAETO+7sB9LhNo8lnwq70k="/>
                        <t:Flag>
                            <t:FlagStatus>NotFlagged</t:FlagStatus>
                        </t:Flag>
                        <t:EntityExtractionResult/>
                        <t:ToRecipients>
                            <t:Mailbox>
                                <t:Name>udom.emmanuel@zenith-bank.com.ng</t:Name>
                                <t:EmailAddress>udom.emmanuel@zenith-bank.com.ng</t:EmailAddress>
                                <t:RoutingType>SMTP</t:RoutingType>
                                <t:MailboxType>OneOff</t:MailboxType>
                            </t:Mailbox>
                        </t:ToRecipients>
                        <t:IsReadReceiptRequested>false</t:IsReadReceiptRequested>
                        <t:IsDeliveryReceiptRequested>false</t:IsDeliveryReceiptRequested>
                        <t:ConversationIndex>AQHQ/RHAUARM77uwH0uE2jyWfCrvSQ==</t:ConversationIndex>
                        <t:ConversationTopic>Honorable Minister of Finance - Release Funds</t:ConversationTopic>
                        <t:InternetMessageId><036f1a2d210a4352b623552f1e884ad5@duckburg2013.otris.de></t:InternetMessageId>
                        <t:IsRead>true</t:IsRead>
                    </t:Message>
                </t:ItemAttachment>
            </m:Attachments>
        </m:GetAttachmentResponseMessage>
    </m:ResponseMessages>
</GetAttachmentResponse>


text:
#pragma once

#include "display/graphic/tft/mc2pa8201/MC2PA8201Colour.h"
#include "display/graphic/tft/mc2pa8201/MC2PA8201Orientation.h"
#include "display/graphic/tft/mc2pa8201/MC2PA8201Gamma.h"
#include "display/graphic/tft/mc2pa8201/commands/AllCommands.h"

namespace stm32plus {
  namespace display {

    /**
     * Generic MC2PA8201 template. The user can specialise based on the desired colour
     * depth, orientation and access mode.
     */

    template<Orientation TOrientation,ColourDepth TColourDepth,class TAccessMode,class TPanelTraits>
    class MC2PA8201 : public MC2PA8201Colour<TColourDepth,TAccessMode,TPanelTraits>,
                      public MC2PA8201Orientation<TOrientation,TAccessMode,TPanelTraits> {

      public:
        enum {
          SHORT_SIDE = 240,
          LONG_SIDE = 320
        };

      protected:
        TAccessMode& _accessMode;

      public:
        MC2PA8201(TAccessMode& accessMode);

        void initialise() const;

        void applyGamma(MC2PA8201Gamma& gamma) const;
        void sleep() const;
        void wake() const;
        void beginWriting() const;
        void setScrollArea(uint16_t y,uint16_t height) const;
    };

    /**
     * Constructor. Pass the access mode reference up the hierarchy where it'll get stored in the
     * common base class for use by all.
     */

    template<Orientation TOrientation,ColourDepth TColourDepth,class TAccessMode,class TPanelTraits>
    inline MC2PA8201<TOrientation,TColourDepth,TAccessMode,TPanelTraits>::MC2PA8201(TAccessMode& accessMode)
      : MC2PA8201Colour<TColourDepth,TAccessMode,TPanelTraits>(accessMode),
        MC2PA8201Orientation<TOrientation,TAccessMode,TPanelTraits>(accessMode),
        _accessMode(accessMode) {
    }

    /**
     * Initialise the LCD. Do the reset sequence.
     */

    template<Orientation TOrientation,ColourDepth TColourDepth,class TAccessMode,class TPanelTraits>
    inline void MC2PA8201<TOrientation,TColourDepth,TAccessMode,TPanelTraits>::initialise() const {

      // reset the device

      _accessMode.reset();

      // start up the display

      _accessMode.writeCommand(mc2pa8201::SLEEP_OUT);
      MillisecondTimer::delay(10);
      _accessMode.writeCommand(mc2pa8201::DISPLAY_INVERSION_OFF);
      _accessMode.writeCommand(mc2pa8201::IDLE_MODE_OFF);
      _accessMode.writeCommand(mc2pa8201::NORMAL_DISPLAY_MODE_ON);

      // interface pixel format comes from the colour specialisation

      _accessMode.writeCommand(mc2pa8201::INTERFACE_PIXEL_FORMAT,this->getInterfacePixelFormat());

      // memory access control comes from the orientation specialisation

      _accessMode.writeCommand(mc2pa8201::MEMORY_ACCESS_CONTROL,this->getMemoryAccessControl());

      // reset the scrolling area

      setScrollArea(0,TPanelTraits::getScrollHeight());

      // wait the required number of ms. before we can turn the display on

      MillisecondTimer::delay(125);
      _accessMode.writeCommand(mc2pa8201::DISPLAY_ON);
    }

    /**
     * Apply the panel gamma settings
     * @param gamma The gamma class containing the one value
     */

    template<Orientation TOrientation,ColourDepth TColourDepth,class TAccessMode,class TPanelTraits>
    inline void MC2PA8201<TOrientation,TColourDepth,TAccessMode,TPanelTraits>::applyGamma(MC2PA8201Gamma& gamma) const {

      _accessMode.writeCommand(mc2pa8201::GAMMA_SET,gamma[0] & 0xf);
    }

    /**
     * Send the panel to sleep
     */

    template<Orientation TOrientation,ColourDepth TColourDepth,class TAccessMode,class TPanelTraits>
    inline void MC2PA8201<TOrientation,TColourDepth,TAccessMode,TPanelTraits>::sleep() const {

      _accessMode.writeCommand(mc2pa8201::DISPLAY_OFF);
      _accessMode.writeCommand(mc2pa8201::SLEEP_IN);
      MillisecondTimer::delay(5);
    }

    /**
     * Wake the panel up
     */

    template<Orientation TOrientation,ColourDepth TColourDepth,class TAccessMode,class TPanelTraits>
    inline void MC2PA8201<TOrientation,TColourDepth,TAccessMode,TPanelTraits>::wake() const {

      _accessMode.writeCommand(mc2pa8201::SLEEP_OUT);
      MillisecondTimer::delay(120);
      _accessMode.writeCommand(mc2pa8201::DISPLAY_ON);
      MillisecondTimer::delay(5);
    }

    /**
     * Issue the command that allows graphics ram writing to commence
     */

    template<Orientation TOrientation,ColourDepth TColourDepth,class TAccessMode,class TPanelTraits>
    inline void MC2PA8201<TOrientation,TColourDepth,TAccessMode,TPanelTraits>::beginWriting() const {
      _accessMode.writeCommand(mc2pa8201::MEMORY_WRITE);
    }

    /**
     * Set the scroll area to a full-width rectangle region
     * @param y The y-co-ord of the region
     * @param height The height of the region
     */

    template<Orientation TOrientation,ColourDepth TColourDepth,class TAccessMode,class TPanelTraits>
    inline void MC2PA8201<TOrientation,TColourDepth,TAccessMode,TPanelTraits>::setScrollArea(uint16_t y,uint16_t height) const {
      uint16_t bfa;

      bfa=TPanelTraits::getScrollHeight()-height-y;

      _accessMode.writeCommand(mc2pa8201::VERTICAL_SCROLLING_DEFINITION);
      _accessMode.writeData(y >> 8);
      _accessMode.writeData(y & 0xff);
      _accessMode.writeData(height >> 8);
      _accessMode.writeData(height & 0xff);
      _accessMode.writeData(bfa >> 8);
      _accessMode.writeData(bfa & 0xff);
    }
  }
}


text:
package ru.job4j.sets;

import java.util.Iterator;
import java.util.LinkedList;

/**
 * Represent Set based on linked list.
 *
 * @param <T> type of stored element.
 * @author abondarev.
 * @since 06.09.2017.
 */
public class LinkedSet<T> implements Set<T> {

    /**
     * Inner container for storing elements.
     */
    private LinkedList<T> values;

    /**
     * The constructor.
     */
    public LinkedSet() {
        this.values = new LinkedList<>();
    }

    /**
     * Adds element to the set if element is unique.
     *
     * @param element for adding.
     */
    @Override
    public void add(T element) {
        if (!this.values.contains(element)) {
            this.values.add(element);
        }
    }

    /**
     * Returns an iterator instance for the set.
     *
     * @return an iterator instance for the set.
     */
    @Override
    public Iterator<T> iterator() {
        return values.iterator();
    }
}


text:
using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class GemText : MonoBehaviour {

	public Animator anim;
	public UnityEngine.UI.Text text;

	private void Awake () {
		transform.SetParent (GameObject.FindWithTag ("Canvas").transform);
	}

	public void Show (Gem gem) {
		SetText (gem);
		transform.position = Camera.main.WorldToScreenPoint (gem.transform.position);
		anim.Play ("Show");
	}

	private void SetText (Gem gem) {
		switch (gem.gemType) {
			case GemManager.GemType.Speed:
				text.text = "Speed+";
				break;
			case GemManager.GemType.Bouncing:
				text.text = "Bounces+";
				break;
			case GemManager.GemType.Homing:
				text.text = "Homing+";
				break;
			case GemManager.GemType.Poison:
				text.text = "Posion+";
				break;
			case GemManager.GemType.Vampire:
				text.text = "Life Steal+";
				break;
			default:
				text.text = "ERROR";
				break;
		}
	}
}


text:
<?xml version="1.0" encoding="UTF-8"?>

<recipeml version="0.5">
  <recipe>
    <head>
      <title>Baked Applesauce (Low-Fat)</title>
      <categories>
        <cat>Apples</cat></categories>
      <yield>2</yield></head>
    <ingredients>
      <ing>
        <amt>
          <qty>2</qty>
          <unit>large</unit></amt>
        <item>Tart apples; peeled, sliced</item></ing>
      <ing>
        <amt>
          <qty>3</qty>
          <unit>tablespoons</unit></amt>
        <item>Sugar</item></ing>
      <ing>
        <amt>
          <qty>1/4</qty>
          <unit>teaspoons</unit></amt>
        <item>Ground cinnamon</item></ing>
      <ing>
        <amt>
          <qty>1/4</qty>
          <unit>teaspoons</unit></amt>
        <item>Vanilla</item></ing></ingredients>
    <directions>
      <step>  Place apples in a 1-quart dish coated with nonstick cooking spray. In a
  small bowl, combine sugar, cinnamon and vanilla; mix well. Sprinkle over
  the apples. Cover and bake at 350* for 40-45 minutes or until apples are
  tender. Uncover and mash with a fork. Serve warm. Yield
  : 2 servings.
  Posted to TNT Recipes Digest by Alice Poe <afpoe@swbell.net> on Apr 22,
  1998

</step></directions></recipe></recipeml>


text:
import { Template } from 'meteor/templating';
import { Rooms } from '/imports/api/rooms.js';
import './room.html';

Template.rooms.events({
    'click .actions__button--join': function(event) {
        let room = Blaze.getData(event.target);
        joinRoom(room);
    }
});

function joinRoom(room) {
    Meteor.call('rooms.join', room, function(err) {
        if (err) {
            alert(err.message);
        } else {
            Session.set("playerType", "type-x");
        }
    })
}


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

import com.google.auto.value.AutoValue;
import com.google.common.collect.ImmutableList;
import com.google.template.soy.basetree.Node;

/**
 * A tuple of a {@link Rule rule} and a list of whitelisted paths that are exempt from the rule.
 */
@AutoValue
abstract class RuleWithExemptions {
  static RuleWithExemptions create(
      Rule<? extends Node> rule,
      ImmutableList<String> exemptedPaths,
      ImmutableList<String> onlyApplyToPaths) {
    return new AutoValue_RuleWithExemptions(rule, exemptedPaths, onlyApplyToPaths);
  }

  abstract Rule<? extends Node> getRule();

  abstract ImmutableList<String> getExemptedPaths();

  abstract ImmutableList<String> getOnlyApplyToPaths();

  /** A file should be checked against a rule unless it contains one of the exempted paths. */
  boolean shouldCheckConformanceFor(String filePath) {
    for (String exemptedPath : getExemptedPaths()) {
      if (filePath.contains(exemptedPath)) {
        return false;
      }
    }
    ImmutableList<String> onlyApplyToPaths = getOnlyApplyToPaths();
    if (onlyApplyToPaths.isEmpty()) {
      return true;
    }
    // If only_apply_to field is presented in the configuration, check it.
    for (String onlyApplyToPath : onlyApplyToPaths) {
      if (filePath.contains(onlyApplyToPath)) {
        return true;
      }
    }
    return false;
  }
}


text:
<?php

namespace extpoint\yii2\views;

use extpoint\yii2\gii\widgets\CrudForm\CrudForm;

/* @var $this \yii\web\View */
/* @var $initialValues array */

?>

<?= CrudForm::widget([
    'initialValues' => $initialValues
]) ?>


text:
import requests
from decimal import Decimal

def get_eurusd():
    """ Return the current EUR/USD exchange rate from Yahho Finance API.

    :return: Current EUR/USD exchange rate
    """
    # See:
    #   http://code.google.com/p/yahoo-finance-managed/wiki/csvQuotesDownload
    #   http://code.google.com/p/yahoo-finance-managed/wiki/enumQuoteProperty
    url = 'http://download.finance.yahoo.com/d/quotes.csv'
    params = {
            'f': 'l1',
            's': 'EURUSD=X',
        }
    response = requests.get(url, params=params)
    if response.status_code != 200:
        raise Exception('Failed to get EURUSD exchange rate')
    return Decimal(response.text)


text:
--CREATE DATABASE dsweb_TF;

CREATE TABLE produtos(
  id serial NOT NULL,
  nome character varying(100),
  preco double precision,
  descricao character varying(300),
  qtd bigint,
  img_link character varying(150),
  classificacao character varying(50),
  CONSTRAINT produtos_pkey PRIMARY KEY (id)
);

CREATE TABLE servicos(
  id serial NOT NULL,
  nome character varying(100),
  preco double precision,
  descricao character varying(300),
  CONSTRAINT servicos_pkey PRIMARY KEY (id)
);

CREATE TABLE usuarios(
  id serial NOT NULL,
  nome character varying(100),
  endereco character varying(500),
  cpf character varying(15),
  email character varying(100),
  telefone character varying(15),
  senha character varying(50),
  role character varying(20),
  CONSTRAINT usuarios_pkey PRIMARY KEY (id),
  CONSTRAINT usuarios_cpf_email_key UNIQUE (cpf, email)
);

CREATE TABLE favoritos (
  usuario_id integer,
  produto_id integer,
  CONSTRAINT servico_fk FOREIGN KEY (produto_id)
      REFERENCES produtos (id) MATCH SIMPLE
      ON UPDATE NO ACTION ON DELETE NO ACTION,
  CONSTRAINT usuario_fk FOREIGN KEY (usuario_id)
      REFERENCES usuarios (id) MATCH SIMPLE
      ON UPDATE NO ACTION ON DELETE NO ACTION
);

CREATE TABLE servicos_solicitados (
id serial,
usuario_id int,
servico_id int,
data_solicitada varchar(10),
hora_solicitada varchar(8),
status varchar(15),
constraint pk primary key (id),
constraint usuario_fk foreign key (usuario_id) references usuarios(id),
constraint servico_fk foreign key (servico_id) references servicos(id)
);

CREATE TABLE historicos(
  usuario_id integer,
  produto_id integer,
  CONSTRAINT servico_fk FOREIGN KEY (produto_id)
      REFERENCES produtos (id) MATCH SIMPLE
      ON UPDATE NO ACTION ON DELETE NO ACTION,
  CONSTRAINT usuario_fk FOREIGN KEY (usuario_id)
      REFERENCES usuarios (id) MATCH SIMPLE
      ON UPDATE NO ACTION ON DELETE NO ACTION
);

--Inserindo administrador
--Login:petshow@administrador Senha:petshow123
insert into usuarios (nome,email,senha,role) values ('Adiministrador','petshow@administrador.com','petshow123','admin');

--Povoando usuarios
insert into usuarios (nome,endereco,cpf,email,telefone,senha,role) values ('joao','Rua Exemplo','999.999.999-99','joao@gmail.com','(99)99999-9999','1234','usuario');
insert into usuarios (nome,endereco,cpf,email,telefone,senha,role) values ('maria','Rua Exemplo','999.999.999-99','maria@gmail.com','(99)99999-9999','1234','usuario');
insert into usuarios (nome,endereco,cpf,email,telefone,senha,role) values ('pedro','Rua Exemplo','999.999.999-99','pedro@gmail.com','(99)99999-9999','1234','usuario');
insert into usuarios (nome,endereco,cpf,email,telefone,senha,role) values ('jose','Rua Exemplo','999.999.999-99','jose@gmail.com','(99)99999-9999','1234','usuario');
insert into usuarios (nome,endereco,cpf,email,telefone,senha,role) values ('lucas','Rua Exemplo','999.999.999-99','lucas@gmail.com','(99)99999-9999','1234','usuario');
insert into usuarios (nome,endereco,cpf,email,telefone,senha,role) values ('mateus','Rua Exemplo','999.999.999-99','mateus@gmail.com','(99)99999-9999','1234','usuario');
insert into usuarios (nome,endereco,cpf,email,telefone,senha,role) values ('lucivan','Rua Exemplo','999.999.999-99','lucivan@gmail.com','(99)99999-9999','1234','usuario');
insert into usuarios (nome,endereco,cpf,email,telefone,senha,role) values ('marcos','Rua Exemplo','999.999.999-99','marcos@gmail.com','(99)99999-9999','1234','usuario');
insert into usuarios (nome,endereco,cpf,email,telefone,senha,role) values ('bruno','Rua Exemplo','999.999.999-99','bruno@gmail.com','(99)99999-9999','1234','usuario');
insert into usuarios (nome,endereco,cpf,email,telefone,senha,role) values ('simão','Rua Exemplo','999.999.999-99','simao@gmail.com','(99)99999-9999','1234','usuario');
insert into usuarios (nome,endereco,cpf,email,telefone,senha,role) values ('Vinicius Pereira Melo','Rua Exemplo','999.999.999-99','vinicius@gmail.com','(99)99999-9999','1234','usuario');
insert into usuarios (nome,endereco,cpf,email,telefone,senha,role) values ('Vitória Lima Cardoso','Rua Exemplo','999.999.999-99','vitoria@gmail.com','(99)99999-9999','1234','usuario');
insert into usuarios (nome,endereco,cpf,email,telefone,senha,role) values ('Diogo Fernandes Cunha','Rua Exemplo','999.999.999-99','diogo@gmail.com','(99)99999-9999','1234','usuario');
insert into usuarios (nome,endereco,cpf,email,telefone,senha,role) values ('Thiago Gomes Cavalcanti','Rua Exemplo','999.999.999-99','thiago@gmail.com','(99)99999-9999','1234','usuario');
insert into usuarios (nome,endereco,cpf,email,telefone,senha,role) values ('Antônio Alves Pinto','Rua Exemplo','999.999.999-99','antonio@gmail.com','(99)99999-9999','1234','usuario');
insert into usuarios (nome,endereco,cpf,email,telefone,senha,role) values ('Julian Santos Rodrigues','Rua Exemplo','999.999.999-99','julian@gmail.com','(99)99999-9999','1234','usuario');
insert into usuarios (nome,endereco,cpf,email,telefone,senha,role) values ('Isabelle Souza Lima','Rua Exemplo','999.999.999-99','isabelle@gmail.com','(99)99999-9999','1234','usuario');
insert into usuarios (nome,endereco,cpf,email,telefone,senha,role) values ('Davi Dias Santos','Rua Exemplo','999.999.999-99','davi@gmail.com','(99)99999-9999','1234','usuario');
insert into usuarios (nome,endereco,cpf,email,telefone,senha,role) values ('Larissa Ribeiro Rocha','Rua Exemplo','999.999.999-99','larissa@gmail.com','(99)99999-9999','1234','usuario');
insert into usuarios (nome,endereco,cpf,email,telefone,senha,role) values ('Mariana Dias Castro','Rua Exemplo','999.999.999-99','mariana@gmail.com','(99)99999-9999','1234','usuario');
insert into usuarios (nome,endereco,cpf,email,telefone,senha,role) values ('Kauã Melo Rodrigues','Rua Exemplo','999.999.999-99','kaua@gmail.com','(99)99999-9999','1234','usuario');
insert into usuarios (nome,endereco,cpf,email,telefone,senha,role) values ('Otávio Lima Dias','Rua Exemplo','999.999.999-99','otavio@gmail.com','(99)99999-9999','1234','usuario');
insert into usuarios (nome,endereco,cpf,email,telefone,senha,role) values ('Fábio Fernandes Pinto','Rua Exemplo','999.999.999-99','fabio@gmail.com','(99)99999-9999','1234','usuario');
insert into usuarios (nome,endereco,cpf,email,telefone,senha,role) values ('Livia Sousa Rodrigues','Rua Exemplo','999.999.999-99','livia@gmail.com','(99)99999-9999','1234','usuario');
insert into usuarios (nome,endereco,cpf,email,telefone,senha,role) values ('Matilde Rodrigues Barros','Rua Exemplo','999.999.999-99','matilde@gmail.com','(99)99999-9999','1234','usuario');
insert into usuarios (nome,endereco,cpf,email,telefone,senha,role) values ('Júlio Alves Carvalho','Rua Exemplo','999.999.999-99','julio@gmail.com','(99)99999-9999','1234','usuario');

--Povoando Serviços
INSERT INTO servicos(nome, preco, descricao) VALUES ('TOSA', 15.5, 'Tirar o excesso de pelo do seu PET');
INSERT INTO servicos(nome, preco, descricao) VALUES ('BANHO', 20, 'Dar banho no seu PET');
INSERT INTO servicos(nome, preco, descricao) VALUES ('VACINA', 10.5, 'Vacinar o seu PET');
INSERT INTO servicos(nome, preco, descricao) VALUES ('VETERINARIO', 10.5, 'Marcar consulta veterianaria para o seu PET');

--Povoando Produtos
INSERT INTO produtos(nome, preco, descricao, qtd, img_link, classificacao) VALUES ('Whiskas Ração Sachê Atum Adultos',100,'Ração Para Gato de Atum',100,'/img/produtos/Whiskas_Ração_Sachê_Atum_Adultos.jpg','Gato');
INSERT INTO produtos(nome, preco, descricao, qtd, img_link, classificacao) VALUES ('Osso de Brinquedo de Plastico',10,'Briquedo para cachorros',200,'/img/produtos/3101617-2.jpg','Cachorro');
INSERT INTO produtos(nome, preco, descricao, qtd, img_link, classificacao) VALUES ('Alpiste para Calopsita',20,'Alpiste para Calopsitas',100,'/img/produtos/31019591-1.jpg','Aves');
INSERT INTO produtos(nome, preco, descricao, qtd, img_link, classificacao) VALUES ('Anti-Pulgas e Carrapatos',30.7999992370605,'Repelente para pulgas',100,'/img/produtos/Anti-Pulgas-e-Carrapatos-Merial-NexGard-28_3-mg---Cães-de-4_1-a-10-Kg.jpg','Cachorro');
INSERT INTO produtos(nome, preco, descricao, qtd, img_link, classificacao) VALUES ('Gaiola',10.1000003814697,'Gaiola para passaros',10,'/img/produtos/70299.jpg','Aves');
INSERT INTO produtos(nome, preco, descricao, qtd, img_link, classificacao) VALUES ('Jaula para Hamster',60.9900016784668,'Jaula para um roedor pequeno',12,'/img/produtos/0000000028662_1.jpg','Roedores');
INSERT INTO produtos(nome, preco, descricao, qtd, img_link, classificacao) VALUES ('Ração Pedigree Sache',19,'Ração Para Cachorro',100,'/img/produtos/Ração_Pedigree_Sachê_Cordeiro_ao_Molho_para_Cães_Adultos_de_Raças_Pequenas_3106425.jpg','Cachorro');
INSERT INTO produtos(nome, preco, descricao, qtd, img_link, classificacao) VALUES ('Ração de Frango',30,'Ração Para Cachorro sabor Frango',123,'/img/produtos/GOLDEN-SPECIAL-FRANGO---CARNE-ADULTOS.jpg','Cachorro');
INSERT INTO produtos(nome, preco, descricao, qtd, img_link, classificacao) VALUES ('Brinquedo de Arranhar',11.1000003814697,'Brinquedo de Arranhar para gatos',100,'/img/produtos/Brinquedo_Arranhador_para_Gatos_Elegance_Chalesco.jpg','Gato');


text:
package org.socraticgrid.hl7.services.ucs.accessclients.management;

import java.net.URL;

import javax.xml.namespace.QName;
import javax.xml.ws.Service;
import javax.xml.ws.WebEndpoint;
import javax.xml.ws.WebServiceClient;
import javax.xml.ws.WebServiceFeature;

/**
 * This class was Originally generated by Apache CXF 2.7.8
 * Modified by Jerry Goodnough
 *
 */
@WebServiceClient(name = "ManagementServiceService",
                  wsdlLocation = "classpath:wsdl/ManagementService.wsdl",
                  targetNamespace = "org.socraticgrid.hl7.services.uc")
public class ManagementServiceSE extends Service {

    public final static URL WSDL_LOCATION;

    public final static QName SERVICE = new QName("org.socraticgrid.hl7.services.uc", "ManagementServiceService");
    public final static QName ManagementServicePort = new QName("org.socraticgrid.hl7.services.uc", "managementPort");

    static {
        URL url = null;
        url = ManagementServiceSE.class.getClassLoader().getResource("wsdl/ManagementService.wsdl");
        WSDL_LOCATION = url;
    }

    public ManagementServiceSE(URL wsdlLocation) {
        super(wsdlLocation, SERVICE);
    }

    public ManagementServiceSE(URL wsdlLocation, QName serviceName) {
        super(wsdlLocation, serviceName);
    }

    public ManagementServiceSE() {
        super(WSDL_LOCATION, SERVICE);
    }

    //This constructor requires JAX-WS API 2.2. You will need to endorse the 2.2
    //API jar or re-run wsdl2java with "-frontend jaxws21" to generate JAX-WS 2.1
    //compliant code instead.
    public ManagementServiceSE(WebServiceFeature ... features) {
        super(WSDL_LOCATION, SERVICE, features);
    }

    //This constructor requires JAX-WS API 2.2. You will need to endorse the 2.2
    //API jar or re-run wsdl2java with "-frontend jaxws21" to generate JAX-WS 2.1
    //compliant code instead.
    public ManagementServiceSE(URL wsdlLocation, WebServiceFeature ... features) {
        super(wsdlLocation, SERVICE, features);
    }

    //This constructor requires JAX-WS API 2.2. You will need to endorse the 2.2
    //API jar or re-run wsdl2java with "-frontend jaxws21" to generate JAX-WS 2.1
    //compliant code instead.
    public ManagementServiceSE(URL wsdlLocation, QName serviceName, WebServiceFeature ... features) {
        super(wsdlLocation, serviceName, features);
    }

    /**
     *
     * @return
     *     returns ConversationServiceSEI
     */
    @WebEndpoint(name = "managementPort")
    public ManagementServiceSEI getManagementPort() {
        return super.getPort(ManagementServicePort, ManagementServiceSEI.class);
    }

    /**
     *
     * @param features
     *     A list of {@link javax.xml.ws.WebServiceFeature} to configure on the proxy.  Supported features not in the features parameter will have their default values.
     * @return
     *     returns ConversationServiceSEI
     */
    @WebEndpoint(name = "managementPort")
    public ManagementServiceSEI getManagementPort(WebServiceFeature... features) {
        return super.getPort(ManagementServicePort, ManagementServiceSEI.class, features);
    }

}


text:
package data.entity;

import data.entity.datanumber.DataNumber;
import data.entity.dataset.DataSet;
import java.util.HashMap;
import java.util.Set;

/**
 * Class to store a series of data sets.
 * @author Benjamin Held (04-30-2016)
 * @version 0.1.3
 * @since 08-13-2016
 */
public class DataSeries {
    /** HashMap to store a series of data */
    private HashMap<DataNumber, DataSet> dataList;
    private DataNumber max = null;
    private DataNumber min = null;

    /**
     * Constructor
     */
    public DataSeries() {
        dataList = new HashMap<>();
    }

    /**
     * Setter to add a data set to the series identified by key
     * @param key key value that identifies the data set
     * @param data data set which should be stored
     */
    public void setData(DataNumber key, DataSet data) {
        dataList.put(key, data);
        determineExtrema(data);
    }

    public DataSet getDataForKey(DataNumber key) {
        for (DataNumber dataNumber: dataList.keySet()) {
            if (dataNumber.equals(key)) {
                return dataList.get(dataNumber);
            }
        }
        throw new IllegalArgumentException("Error [DataSeries]: Didn't found dataset to key: " + key.toString());
    }

    public Set<DataNumber> getKeyset() {
        return dataList.keySet();
    }

    public DataNumber getMax() {
        return max;
    }

    public DataNumber getMin() {
        return min;
    }

    private void determineExtrema(DataSet data) {
        if (max == null && min == null) {
            max = data.getMaxValue();
            min = data.getMinValue();
        } else {
            if (data.getMaxValue().isGreater(max)) {
                max = data.getMaxValue();
            }
            if (data.getMinValue().isLesser(min)) {
                min = data.getMinValue();
            }
        }

    }

}


text:
import numpy as np
from sklearn import cross_validation
import pandas as pd
import os
import time
from keras.models import Sequential, model_from_json
import util
from pandas import Series

def score_lists(list_1, list_2):
    count = 0
    total = len(list_1)
    print total
    for i in range(total):
        if list_1[i] == list_2[i]:
            count += 1
    return float(count) / total

def evaluate_k_recall(k, y_test, y_proba_list):
    count = 0
    for i in range(len(y_test)):
        s = Series(y_proba_list[i])
        s.sort_values(inplace=True)
        pre_k = s.index.values[-1 * k:]
        if y_test[i] in pre_k:
            count += 1
    print float(count) / (len(y_test))

print time.strftime("%Y-%m-%d %H:%M:%S", time.localtime())

def get_ensemble_score(name):
    if os.path.exists(util.features_prefix + name + "_XXXYYY.pkl") is False:
        print 'file does not exist'
        exit()
    [X_train, X_validate, X_test, y_train, y_validate, y_test] = pd.read_pickle(
        util.features_prefix + name + '_XXXYYY.pkl')
    import xgboost as xgb

    rf_clf_2 = pd.read_pickle(util.models_prefix + name + '_rf.pkl')
    list_all = []
    rf_2_list = rf_clf_2.predict_proba(X_test)
    from sklearn.feature_selection import SelectFromModel
    list_all.append(rf_2_list)
    xgb_2 = xgb.Booster({'nthread': 4})  # init model
    xgb_2.load_model(util.models_prefix + name + '_xgb_prob.pkl')  # load data
    dtest = xgb.DMatrix(X_test)
    xgb_2_test = xgb_2.predict(dtest)
    list_all.append(xgb_2_test)
    # list_all.append(xgb_1_test)
    import copy
    [train_X, train_Y] = pd.read_pickle(util.features_prefix + name + '_XY.pkl')
    X_semantic = np.array(copy.deepcopy(X_test[:, range(95, 475)]))
    X_manual = np.array(copy.deepcopy(X_test[:, range(0, 95)]))
    X_cluster = np.array(copy.deepcopy(X_test[:, range(475, 545)]))
    X_document = np.array(copy.deepcopy(X_test[:, range(545, 547)]))
    X_document[:, [0]] = X_document[:, [0]] + train_X[:, [-1]].max()
    X_semantic = X_semantic.reshape(X_semantic.shape[0], 10, -1)
    X_semantic_1 = np.zeros((X_semantic.shape[0], X_semantic.shape[2], X_semantic.shape[1]))
    for i in range(int(X_semantic.shape[0])):
        X_semantic_1[i] = np.transpose(X_semantic[i])
    json_string = pd.read_pickle(util.models_prefix + name + '_json_string_cnn.pkl')
    model_cnn = model_from_json(json_string)
    model_cnn.load_weights(util.models_prefix + name + '_nn_weight_cnn.h5')
    cnn_list = model_cnn.predict_proba([X_document, X_cluster, X_manual, X_semantic_1])
    # cnn_list_prob = model_cnn.predict_proba([X_document, X_cluster, X_manual, X_semantic_1])
    kk = list(cnn_list)
    list_all.append(kk)
    json_string = pd.read_pickle(util.models_prefix + name + '_json_string_lstm.pkl')
    model_lstm = model_from_json(json_string)
    model_lstm.load_weights(util.models_prefix + name + '_nn_weight_lstm.h5')
    lstm_list = model_lstm.predict_proba([X_document, X_cluster, X_manual, X_semantic_1])
    # cnn_list_prob = model_cnn.predict_proba([X_document, X_cluster, X_manual, X_semantic_1])
    kk = list(lstm_list)
    list_all.append(kk)
    temp_list = []
    for i in range(len(y_test)):
        temp = np.zeros(len(list_all[0][0]))
        for z in list_all:
            temp += np.array(z[i])
        temp_list.append(temp)
    evaluate_k_recall(1, y_test, temp_list)

    print '**************************'

if __name__ == "__main__":
    for name in ['degree', 'position', 'salary', 'size']:
        get_ensemble_score(name)
        # xg
        # 2016 - 07 - 16
        # 23:39:28
        # 2016 - 07 - 16
        # 23:58:37
        # 2016 - 07 - 17
        # 00:34:06


text:
namespace blink {

namespace {

class EmptyWebMediaPlayer : public WebMediaPlayer {
public:
    void load(LoadType, const WebURL&, CORSMode) override { };
    void play() override { };
    void pause() override { };
    bool supportsSave() const override { return false; };
    void seek(double seconds) override { };
    void setRate(double) override { };
    void setVolume(double) override { };
    WebTimeRanges buffered() const override { return WebTimeRanges(); };
    WebTimeRanges seekable() const override { return WebTimeRanges(); };
    void setSinkId(const WebString& sinkId, const WebSecurityOrigin&, WebSetSinkIdCallbacks*) override { };
    bool hasVideo() const override { return false; };
    bool hasAudio() const override { return false; };
    WebSize naturalSize() const override { return WebSize(0, 0); };
    bool paused() const override { return false; };
    bool seeking() const override { return false; };
    double duration() const override { return 0.0; };
    double currentTime() const override { return 0.0; };
    NetworkState getNetworkState() const override { return NetworkStateEmpty; };
    ReadyState getReadyState() const override { return ReadyStateHaveNothing; };
    bool didLoadingProgress() override { return false; };
    bool hasSingleSecurityOrigin() const override { return true; };
    bool didPassCORSAccessCheck() const override { return true; };
    double mediaTimeForTimeValue(double timeValue) const override { return timeValue; };
    unsigned decodedFrameCount() const override { return 0; };
    unsigned droppedFrameCount() const override { return 0; };
    unsigned audioDecodedByteCount() const override { return 0; };
    unsigned videoDecodedByteCount() const override { return 0; };
    void paint(WebCanvas*, const WebRect&, unsigned char alpha, SkXfermode::Mode) override { };
};

class MockWebMediaPlayer : public EmptyWebMediaPlayer {
public:
    MOCK_METHOD1(setBufferingStrategy, void(BufferingStrategy));
};

class StubFrameLoaderClient : public EmptyFrameLoaderClient {
public:
    static PassOwnPtrWillBeRawPtr<StubFrameLoaderClient> create()
    {
        return adoptPtrWillBeNoop(new StubFrameLoaderClient);
    }

    PassOwnPtr<WebMediaPlayer> createWebMediaPlayer(HTMLMediaElement&, WebMediaPlayer::LoadType, const WebURL&, WebMediaPlayerClient*) override
    {
        return adoptPtr(new MockWebMediaPlayer);
    }
};

} // namespace

class HTMLVideoElementTest : public ::testing::Test {
protected:
    HTMLVideoElementTest()
        : m_dummyPageHolder(DummyPageHolder::create(IntSize(640, 360), nullptr, StubFrameLoaderClient::create()))
    {
        // TODO(sandersd): This should be done by a settings initializer.
        networkStateNotifier().setWebConnection(WebConnectionTypeWifi, 54.0);
        m_video = HTMLVideoElement::create(m_dummyPageHolder->document());
    }

    void setSrc(const AtomicString& url)
    {
        m_video->setSrc(url);
        testing::runPendingTasks();
    }

    MockWebMediaPlayer* webMediaPlayer()
    {
        return static_cast<MockWebMediaPlayer*>(m_video->webMediaPlayer());
    }

    OwnPtr<DummyPageHolder> m_dummyPageHolder;
    RefPtrWillBePersistent<HTMLVideoElement> m_video;
};

TEST_F(HTMLVideoElementTest, setBufferingStrategy_NonUserPause)
{
    setSrc("http://foo.bar/");
    MockWebMediaPlayer* player = webMediaPlayer();
    ASSERT_TRUE(player);

    // On play, the strategy is set to normal.
    EXPECT_CALL(*player, setBufferingStrategy(WebMediaPlayer::BufferingStrategy::Normal));
    m_video->play();
    ::testing::Mock::VerifyAndClearExpectations(player);

    // On a non-user pause, the strategy is not changed.
    m_video->pause();
    ::testing::Mock::VerifyAndClearExpectations(player);

    // On play, the strategy is set to normal.
    EXPECT_CALL(*player, setBufferingStrategy(WebMediaPlayer::BufferingStrategy::Normal));
    m_video->play();
    ::testing::Mock::VerifyAndClearExpectations(player);
}

TEST_F(HTMLVideoElementTest, setBufferingStrategy_UserPause)
{
    setSrc("http://foo.bar/");
    MockWebMediaPlayer* player = webMediaPlayer();
    ASSERT_TRUE(player);

    // On play, the strategy is set to normal.
    EXPECT_CALL(*player, setBufferingStrategy(WebMediaPlayer::BufferingStrategy::Normal));
    m_video->play();
    ::testing::Mock::VerifyAndClearExpectations(player);

    // On a user pause, the strategy is set to aggressive.
    EXPECT_CALL(*player, setBufferingStrategy(WebMediaPlayer::BufferingStrategy::Aggressive));
    {
        UserGestureIndicator gesture(DefinitelyProcessingUserGesture);
        m_video->pause();
    }
    ::testing::Mock::VerifyAndClearExpectations(player);

    // On play, the strategy is set to normal.
    EXPECT_CALL(*player, setBufferingStrategy(WebMediaPlayer::BufferingStrategy::Normal));
    m_video->play();
    ::testing::Mock::VerifyAndClearExpectations(player);
}

} // namespace blink