text:
from shm_tools.shmlog.parser import LogParser
import argparse
import sys
from datetime import datetime
from time import sleep, mktime
import os
import struct
import sys

'''
Utility to recover / rebuild incomplete log files.
This can happen if the log file is not properly finalized (i.e. the sub loses power).
It may also be able to partially reconstruct logfiles that have suffered data loss.
See logrebuild.py --help for details

Jeff Heidel 2012
'''

GROUP = 0xFFFF
END_STBL = 0xFFFFFFFFFFFFFFFF

ap = argparse.ArgumentParser(description='')
ap.add_argument('incomplete', type=str, help='filename of the incomplete log file')
ap.add_argument('new', type=str, help='filename of the new log to output')
args = vars(ap.parse_args())

filename = args['incomplete']

try:
    login = open(filename, 'r')
except IOError:
    print "Input filename " + filename + " not found."
    sys.exit(0)

if args['incomplete'] == args['new']:
    print "Your output file cannot be the same as your input file."
    sys.exit(0)

try:
    parse = LogParser(filename, parse_file_end=False)
except:
    print "There was a problem with the log header. This file cannot be rebuilt."
    sys.exit(0)

log_start_time = parse.get_starttime()
print "Log starts at: " + str(log_start_time)

logout = open(args['new'], 'w')

def copy_to(x):
    #copies login to logout up to position x
    while login.tell() != x:
        logout.write(login.read(1))

copy_to(parse.f.tell()) #copy start of the file including header information

snapshot_table = []

print "Rebuilding log. This may take a while..."

svarstrs = set(map(lambda x: x[1], parse.svars.values()))

def is_snapshot(vc):
    #Checks if the given variable change snapshot contains all variables
    vlist = set(map(lambda x: x[1], vc))
    return (svarstrs == vlist)

#Continue parsing and copying until an error occurs!
while True:
    try:
        global last_time, last_pos

        try: #XXX: Hack to bypass a python warning
            last_pos
        except NameError:
            last_pos = parse.f.tell()

        (dt, vc) = parse.parse_one_slice()

        #Parse of this slice succeeded, copy!
        copy_to(parse.f.tell())

        if is_snapshot(vc):
            snapshot_table.append((dt, last_pos - 2))

        last_time = dt
        last_pos = parse.f.tell()

    except:
        #This must be the point of failure
        break

print "Log build completed at index", str(hex(parse.f.tell()))

#Finalize variable change table with group seperator
logout.seek(-2,1)
logout.write(struct.pack("=H", GROUP))

def write_posix_time(timestamp):
    #Writes a timestamp to the output file in posix format
    (sec, usec) = (int(mktime(timestamp.timetuple())), timestamp.microsecond)
    logout.write(struct.pack("=ll", sec, usec))

print "Log ends at: " + str(last_time)

print "Finalizing log..."

#Write final timestamp
write_posix_time(last_time)

#Write "end" of snapshot table
logout.write(struct.pack("=Q", END_STBL))
logout.write(struct.pack("=Q", 0))

snapshot_table.reverse() #place these into the file in reverse order

#Snapshot table reconstruct
for (dt, fpos) in snapshot_table:
    logout.write(struct.pack("=Q", fpos))
    write_posix_time(dt)

print "Log rebuilt successfully. Written to", args['new']

redpajama_set_name: RedPajamaGithub


text:
/** @jsx React.DOM */

// __tests__/react-multiple-select-test.js

jest.dontMock('../lib/react-multiple-select.js');
jest.dontMock('lodash');

var React = require('react/addons');
var MultipleSelect = require('../lib/react-multiple-select.js');
var TestUtils = React.addons.TestUtils;

describe('MultipleSelect', function() {

  it('Should show the good options values and texts', function() {
    // Given
    var list = [{id:1, content:'one'},{id:2, content:'two'}];

    // When
    var select = TestUtils.renderIntoDocument(
      <MultipleSelect list={list} selected={[]}/>
    );

    // Then
    var options = TestUtils.scryRenderedDOMComponentsWithTag(select, 'option');
    expect(options.length).toBe(2);
    expect(options[0].getDOMNode().textContent).toEqual('one');
    expect(options[0].getDOMNode().value).toEqual('1');
    expect(options[1].getDOMNode().textContent).toEqual('two');
    expect(options[1].getDOMNode().value).toEqual('2');
  });

  it('Should select the selected list', function(){
    // Given
    var list = [{id:3, content:'three'},{id:4, content:'four'}];
    var selected = [{id:4, content:'four'}];

    //When
    var select = TestUtils.renderIntoDocument(
      <MultipleSelect list={list} selected={selected}/>
    );

    //Then
    var options = TestUtils.scryRenderedDOMComponentsWithTag(select, 'option');
    expect(options[0].getDOMNode().selected).toBeFalsy();
    expect(options[1].getDOMNode().selected).toBeTruthy();
  });

});


text:
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
	xmlns:tools="http://schemas.android.com/tools"
	android:layout_width="match_parent"
	android:layout_height="match_parent"
	android:paddingBottom="@dimen/activity_vertical_margin"
	android:paddingLeft="@dimen/activity_horizontal_margin"
	android:paddingRight="@dimen/activity_horizontal_margin"
	android:paddingTop="@dimen/activity_vertical_margin"
	tools:context=".AddNewAccount">

    <EditText
        android:id="@+id/password"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_below="@+id/username"
        android:layout_centerHorizontal="true"
        android:layout_marginTop="20dp"
        android:layout_alignLeft="@+id/username"
        android:layout_alignRight="@+id/username"
        android:ems="10"
        android:inputType="textPassword"
        android:hint="@string/hint_password"
        android:lines="1"
        android:imeOptions="actionDone"
        />

    <Button
    	android:id="@+id/createNewAccountButton"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
    	android:layout_alignLeft="@+id/password"
    	android:layout_alignRight="@+id/password"
    	android:layout_below="@+id/password"
    	android:layout_marginTop="24dp"
    	android:text="@string/create_new_account"/>

    <EditText
    	android:id="@+id/username"
    	android:layout_width="wrap_content"
    	android:layout_height="wrap_content"
    	android:layout_alignParentTop="true"
    	android:layout_centerHorizontal="true"
    	android:layout_marginTop="160dp"
    	android:ems="10"
    	android:hint="@string/hint_username"
    	android:imeOptions="actionNext"
    	android:lines="1" />

</RelativeLayout>


text:
local args = {...}
if #args < 1 then
  if shell then
    print("Syntax: edit <file> [line]\n", 9)
    return
  else
    error("Syntax: edit <file> [line]", 2)
  end
end

local running = true

local myPath = fs.getLastFile()
local workingDir = myPath:match(".+%/") .. "edit/"
addRequirePath(workingDir)

local editorTheme = {
  bg = 1,          -- black
  text = 16,       -- white
  selBar = 2,      -- dark blue
  selChar = 10,    -- yellow
  highlight = 3,   -- maroon
  scrollBar = 7,   -- light gray
  lineNumbers = 7, -- light gray
  caret = 9       -- orange
}
local syntaxTheme = {
  keyword = 13,        -- purple
  specialKeyword = 12, -- light blue
  func = 12,           -- light blue
  string = 8,          -- red
  stringEscape = 10,   -- yellow
  primitive = 9,       -- orange
  comment = 6,         -- dark gray
  catch = 16           -- everything else is white
}

local context = require("context").new()

context:set("mediator", context:get("mediator")())
local rif = require("rif")

local mposx, mposy = -5, -5

local cur, ibar
cur = rif.createImage(workingDir .. "curs.rif")
ibar = rif.createImage(workingDir .. "ibar.rif")

local filename = args[1]
if not fs.exists(filename) and not fs.isDir(filename) then
  if fs.exists(filename .. ".lua") then
    filename = filename .. ".lua"
  elseif fs.exists(filename .. ".rlua") then
    filename = filename .. ".rlua"
  elseif not filename:match("%..+$") then
    filename = filename .. ".rlua"
  end
end

if fs.isDir(filename) then
  print("'" .. filename .. "' is a directory", 8)
  return
end

local eventPriorityQueue
local insertionQueue = {}

local editor = context:get "editor"
editor.init({
  editorTheme = editorTheme,
  syntaxTheme = syntaxTheme,
  viewportWidth = gpu.width,
  viewportHeight = gpu.height - 10,
  initialLine = tonumber(args[2])
})

local menu = context:get "menu"
menu.init({
  editorTheme = editorTheme,
  filename = filename,
  quitFunc = function()
    running = false
  end,
  attacher = function(obj)
    insertionQueue[#insertionQueue + 1] = obj
  end,
  detacher = function(obj)
    for i = 1, #eventPriorityQueue do
      if eventPriorityQueue[i] == obj then
        table.remove(eventPriorityQueue, i)
        break
      end
    end
  end
})

local function fsLines(fn)
  local handle = fs.open(fn, "rb")
  local i = 1

  return function()
    local c = handle:read("*l")
    i = i + 1

    if c then
      return c
    else
      handle:close()
      return nil
    end
  end
end

do
  local content = {}
  if fs.exists(filename) then
    for line in fsLines(filename) do
      if line then
        content[#content + 1] = line
      end
    end
  end

  if #content == 0 then
    content[#content + 1] = ""
  end

  editor.setText(content)
end

local eventModifiers = {
  key = {
    ctrl = false,
    shift = false,
    alt = false
  }
}

eventPriorityQueue = {
  editor,
  menu
}

local function drawContent()
  gpu.clear(editorTheme.bg)

  editor.draw()
  menu.draw()

  local cursorName = "default"
  for i = 1, #eventPriorityQueue do
    local eventTarget = eventPriorityQueue[i]
    if eventTarget.assignMouseIcon then
      cursorName = eventTarget.assignMouseIcon(mposx, mposy) or cursorName
    end
  end

  if cursorName == "default" then
    cur:render(mposx, mposy)
  elseif cursorName == "ibar" then
    ibar:render(mposx, mposy - 4)
  end
end

local function update(dt)
  menu.update(dt)
end

local function capitalize(str)
  return str:sub(1, 1):upper() .. str:sub(2)
end

local function processEvent(e, p1, p2)
  if e == "key" then
    if p1 == "leftCtrl" or p1 == "rightCtrl" then
      eventModifiers.key.ctrl = true
    elseif p1 == "leftShift" or p1 == "rightShift" then
      eventModifiers.key.shift = true
    elseif p1 == "leftAlt" or p1 == "rightAlt" then
      eventModifiers.key.alt = true
    end
  elseif e == "keyUp" then
    if p1 == "leftCtrl" or p1 == "rightCtrl" then
      eventModifiers.key.ctrl = false
    elseif p1 == "leftShift" or p1 == "rightShift" then
      eventModifiers.key.shift = false
    elseif p1 == "leftAlt" or p1 == "rightAlt" then
      eventModifiers.key.alt = false
    end
  end

  local propName = "on" .. capitalize(e)
  for i = 1, #eventPriorityQueue do
    local eventTarget = eventPriorityQueue[i]
    if eventTarget[propName] then
      local capture, promote = eventTarget[propName](eventTarget, eventModifiers or {}, p1, p2)

      if promote ~= nil then
        table.remove(eventPriorityQueue, i)
        if promote then
          table.insert(eventPriorityQueue, 1, eventTarget)
        else
          local newIndex = i + 1
          newIndex = (newIndex - 1 > #eventPriorityQueue) and newIndex - 1 or newIndex
          table.insert(eventPriorityQueue, newIndex, eventTarget)
        end

        break
      end

      if capture then
        break
      end
    end
  end

  for i = #insertionQueue, 1, -1 do
    table.insert(eventPriorityQueue, 1, insertionQueue[i])
    insertionQueue[i] = nil
  end

  if e == "mouseMoved" then
    mposx, mposy = p1, p2
  end
end

local eventQueue = {}

local lastTime = os.clock()
drawContent()
while running do
  while true do
    local e, p1, p2 = coroutine.yield()
    if not e then break end
    table.insert(eventQueue, {e, p1, p2})
  end

  while #eventQueue > 0 do
    processEvent(unpack(eventQueue[1]))
    table.remove(eventQueue, 1)
  end

  if not running then break end

  update(os.clock() - lastTime)
  lastTime = os.clock()

  gpu.clear()

  drawContent()

  gpu.swap()
end


text:
<?xml version="1.0" encoding="utf-8"?>
<androidx.coordinatorlayout.widget.CoordinatorLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    android:background="?android:colorBackground"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    tools:viewBindingIgnore="true">

    <FrameLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        app:layout_behavior="@string/appbar_scrolling_view_behavior">

        <include layout="@layout/progress_bar_on_empty_screen"/>

        <include layout="@layout/error_no_connection"/>

        <include layout="@layout/empty_login"/>

        <androidx.viewpager.widget.ViewPager
            android:id="@+id/notification_viewpager"
            android:layout_width="match_parent"
            android:layout_height="match_parent"/>

    </FrameLayout>

    <com.google.android.material.appbar.AppBarLayout
        android:id="@+id/notification_appbar"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:elevation="?appBarElevation">

        <include layout="@layout/view_centered_toolbar"/>

        <com.google.android.material.tabs.TabLayout
            android:id="@+id/notification_tabs"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:clipToPadding="false"
            android:overScrollMode="never"
            app:tabContentStart="@dimen/left_padding_tablayout_scrollable"
            app:tabMode="scrollable" />
    </com.google.android.material.appbar.AppBarLayout>

</androidx.coordinatorlayout.widget.CoordinatorLayout>


text:
CREATE TABLE BINARYOBJECT (
  id                  BIGINT NOT NULL IDENTITY(10,1),
  modificationCounter INTEGER NOT NULL,
  content             varbinary(max),
  filesize            BIGINT NOT NULL,
  mimeType            VARCHAR(255),
  PRIMARY KEY (ID)
);


text:
<!DOCTYPE html>

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

    <link href="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.0/css/bootstrap.min.css" rel="stylesheet">

The Greatest Cat Website Ever


text:
package org.elasticsearch.xpack.sql.session;

import org.elasticsearch.action.ActionListener;
import org.elasticsearch.xpack.ql.expression.Attribute;
import org.elasticsearch.xpack.sql.session.Cursor.Page;
import org.elasticsearch.xpack.sql.util.Check;

import java.util.List;

import static java.util.Collections.emptyList;

public class SingletonExecutable implements Executable {

    private final List<Attribute> output;
    private final Object[] values;

    public SingletonExecutable() {
        this(emptyList());
    }

    public SingletonExecutable(List<Attribute> output, Object... values) {
        Check.isTrue(output.size() == values.length, "Attributes {} and values {} are out of sync", output, values);
        this.output = output;
        this.values = values;
    }

    @Override
    public List<Attribute> output() {
        return output;
    }

    @Override
    public void execute(Session session, ActionListener<Page> listener) {
        listener.onResponse(Page.last(Rows.singleton(output, values)));
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        for (int i = 0; i < values.length; i++) {
            sb.append(output.get(i));
            sb.append("=");
            sb.append(values[i]);
        }
        return sb.toString();
    }
}


text:
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
    android:shape="oval">
    <size
        android:width="56dp"
        android:height="56dp" />
    <solid android:color="@color/progress_background_color" />
</shape>


text:
const warnInDevelopment = process.env.NODE_ENV === 'production' ? 'error' : 'warn';

module.exports = {
  parser: '@typescript-eslint/parser',

  parserOptions: {
    tsconfigRootDir: __dirname,
    project: 'tsconfig.json',
  },

  root: true,
  extends: ['airbnb', 'prettier', 'prettier/react'],

  plugins: ['@typescript-eslint', 'prettier', 'import', 'jsx-a11y', 'react', 'react-hooks'],

  settings: {
    'import/resolver': {
      webpack: {
        config: 'webpack/webpack.config.common.js',
      },
    },
    'import/parsers': {
      '@typescript-eslint/parser': ['.ts', '.tsx'],
    },
  },

  rules: {
    'prettier/prettier': warnInDevelopment,

    // Allow debugger and console statement in development
    'no-debugger': warnInDevelopment,
    'no-console': warnInDevelopment,

    'import/extensions': [
      warnInDevelopment,
      'always',
      {
        js: 'never',
        jsx: 'never',
        ts: 'never',
        tsx: 'never',
      },
    ],

    // Enable i++ in for loops
    'no-plusplus': ['error', { allowForLoopAfterthoughts: true }],

    'react/no-unescaped-entities': 'off',

    'react/no-array-index-key': 'off',

    // Enables typing to be placed above lifecycle
    'react/sort-comp': [
      warnInDevelopment,
      {
        order: [
          'type-annotations',
          'instance-variables',
          'static-methods',
          'lifecycle',
          '/^on.+$/',
          'everything-else',
          'render',
        ],
      },
    ],

    // These lints are not useful
    'react/jsx-props-no-spreading': 'off',
    'react/state-in-constructor': 'off',

    // Defaults to outside, which is pretty ugly
    'react/static-property-placement': ['error', 'static public field'],

    'react/jsx-filename-extension': ['error', { extensions: ['.tsx', '.jsx'] }],
    'react/default-props-match-prop-types': ['error', { allowRequiredDefaults: true }],

    // TypeScript lints this for us
    'react/prop-types': 'off',

    // Too verbose, creates too many variables
    'react/destructuring-assignment': 'off',

    'react-hooks/rules-of-hooks': 'error', // Checks rules of Hooks
    'react-hooks/exhaustive-deps': 'warn', // Checks effect dependencies

    // Unnecessary with JSX transform
    'react/react-in-jsx-scope': 'off',

    // TODO: Replace divs with buttons, but remove all button styling.
    'jsx-a11y/no-static-element-interactions': 'off',

    // Seem to be triggering on th, so setting to warn for now
    // TODO: Wait for https://github.com/evcohen/eslint-plugin-jsx-a11y/issues/637
    'jsx-a11y/control-has-associated-label': 'warn',

    // The default option requires BOTH id and nesting, which is excessive,
    // especially with checkboxes and radiobuttons. This changes it to EITHER
    'jsx-a11y/label-has-for': [
      'error',
      {
        required: {
          some: ['nesting', 'id'],
        },
      },
    ],

    // Link fails this rule as it has no "href" prop.
    'jsx-a11y/anchor-is-valid': [
      'error',
      {
        components: ['Link'],
        specialLink: ['to'],
      },
    ],

    // Rule appear to be buggy when used with @typescript-eslint/parser
    'jsx-a11y/label-has-associated-control': 'off',

    // For use with immer
    'no-param-reassign': [
      'error',
      { props: true, ignorePropertyModificationsFor: ['draft', 'draftState'] },
    ],

    // Let git handle the linebreaks instead.
    'linebreak-style': 'off',
  },
};


text:
<?xml version="1.0" encoding="UTF-8"?>
<spirit:component xmlns:xilinx="http://www.xilinx.com" xmlns:spirit="http://www.spiritconsortium.org/XMLSchema/SPIRIT/1685-2009" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <spirit:vendor>xilinx.com</spirit:vendor>
  <spirit:library>ip</spirit:library>
  <spirit:name>axi_servo_ctl</spirit:name>
  <spirit:version>1.0</spirit:version>
  <spirit:busInterfaces>
    <spirit:busInterface>
      <spirit:name>s_axi</spirit:name>
      <spirit:busType spirit:vendor="xilinx.com" spirit:library="interface" spirit:name="aximm" spirit:version="1.0"/>
      <spirit:abstractionType spirit:vendor="xilinx.com" spirit:library="interface" spirit:name="aximm_rtl" spirit:version="1.0"/>
      <spirit:slave>
        <spirit:memoryMapRef spirit:memoryMapRef="s_axi"/>
      </spirit:slave>
      <spirit:portMaps>
        <spirit:portMap>
          <spirit:logicalPort>
            <spirit:name>AWADDR</spirit:name>
          </spirit:logicalPort>
          <spirit:physicalPort>
            <spirit:name>s_axi_awaddr</spirit:name>
          </spirit:physicalPort>
        </spirit:portMap>
        <spirit:portMap>
          <spirit:logicalPort>
            <spirit:name>AWPROT</spirit:name>
          </spirit:logicalPort>
          <spirit:physicalPort>
            <spirit:name>s_axi_awprot</spirit:name>
          </spirit:physicalPort>
        </spirit:portMap>
        <spirit:portMap>
          <spirit:logicalPort>
            <spirit:name>AWVALID</spirit:name>
          </spirit:logicalPort>
          <spirit:physicalPort>
            <spirit:name>s_axi_awvalid</spirit:name>
          </spirit:physicalPort>
        </spirit:portMap>
        <spirit:portMap>
          <spirit:logicalPort>
            <spirit:name>AWREADY</spirit:name>
          </spirit:logicalPort>
          <spirit:physicalPort>
            <spirit:name>s_axi_awready</spirit:name>
          </spirit:physicalPort>
        </spirit:portMap>
        <spirit:portMap>
          <spirit:logicalPort>
            <spirit:name>WDATA</spirit:name>
          </spirit:logicalPort>
          <spirit:physicalPort>
            <spirit:name>s_axi_wdata</spirit:name>
          </spirit:physicalPort>
        </spirit:portMap>
        <spirit:portMap>
          <spirit:logicalPort>
            <spirit:name>WVALID</spirit:name>
          </spirit:logicalPort>
          <spirit:physicalPort>
            <spirit:name>s_axi_wvalid</spirit:name>
          </spirit:physicalPort>
        </spirit:portMap>
        <spirit:portMap>
          <spirit:logicalPort>
            <spirit:name>WREADY</spirit:name>
          </spirit:logicalPort>
          <spirit:physicalPort>
            <spirit:name>s_axi_wready</spirit:name>
          </spirit:physicalPort>
        </spirit:portMap>
        <spirit:portMap>
          <spirit:logicalPort>
            <spirit:name>BRESP</spirit:name>
          </spirit:logicalPort>
          <spirit:physicalPort>
            <spirit:name>s_axi_bresp</spirit:name>
          </spirit:physicalPort>
        </spirit:portMap>
        <spirit:portMap>
          <spirit:logicalPort>
            <spirit:name>BVALID</spirit:name>
          </spirit:logicalPort>
          <spirit:physicalPort>
            <spirit:name>s_axi_bvalid</spirit:name>
          </spirit:physicalPort>
        </spirit:portMap>
        <spirit:portMap>
          <spirit:logicalPort>
            <spirit:name>BREADY</spirit:name>
          </spirit:logicalPort>
          <spirit:physicalPort>
            <spirit:name>s_axi_bready</spirit:name>
          </spirit:physicalPort>
        </spirit:portMap>
        <spirit:portMap>
          <spirit:logicalPort>
            <spirit:name>ARADDR</spirit:name>
          </spirit:logicalPort>
          <spirit:physicalPort>
            <spirit:name>s_axi_araddr</spirit:name>
          </spirit:physicalPort>
        </spirit:portMap>
        <spirit:portMap>
          <spirit:logicalPort>
            <spirit:name>ARPROT</spirit:name>
          </spirit:logicalPort>
          <spirit:physicalPort>
            <spirit:name>s_axi_arprot</spirit:name>
          </spirit:physicalPort>
        </spirit:portMap>
        <spirit:portMap>
          <spirit:logicalPort>
            <spirit:name>ARVALID</spirit:name>
          </spirit:logicalPort>
          <spirit:physicalPort>
            <spirit:name>s_axi_arvalid</spirit:name>
          </spirit:physicalPort>
        </spirit:portMap>
        <spirit:portMap>
          <spirit:logicalPort>
            <spirit:name>ARREADY</spirit:name>
          </spirit:logicalPort>
          <spirit:physicalPort>
            <spirit:name>s_axi_arready</spirit:name>
          </spirit:physicalPort>
        </spirit:portMap>
        <spirit:portMap>
          <spirit:logicalPort>
            <spirit:name>RDATA</spirit:name>
          </spirit:logicalPort>
          <spirit:physicalPort>
            <spirit:name>s_axi_rdata</spirit:name>
          </spirit:physicalPort>
        </spirit:portMap>
        <spirit:portMap>
          <spirit:logicalPort>
            <spirit:name>RRESP</spirit:name>
          </spirit:logicalPort>
          <spirit:physicalPort>
            <spirit:name>s_axi_rresp</spirit:name>
          </spirit:physicalPort>
        </spirit:portMap>
        <spirit:portMap>
          <spirit:logicalPort>
            <spirit:name>RVALID</spirit:name>
          </spirit:logicalPort>
          <spirit:physicalPort>
            <spirit:name>s_axi_rvalid</spirit:name>
          </spirit:physicalPort>
        </spirit:portMap>
        <spirit:portMap>
          <spirit:logicalPort>
            <spirit:name>RREADY</spirit:name>
          </spirit:logicalPort>
          <spirit:physicalPort>
            <spirit:name>s_axi_rready</spirit:name>
          </spirit:physicalPort>
        </spirit:portMap>
      </spirit:portMaps>
    </spirit:busInterface>
    <spirit:busInterface>
      <spirit:name>s_axi_signal_reset</spirit:name>
      <spirit:busType spirit:vendor="xilinx.com" spirit:library="signal" spirit:name="reset" spirit:version="1.0"/>
      <spirit:abstractionType spirit:vendor="xilinx.com" spirit:library="signal" spirit:name="reset_rtl" spirit:version="1.0"/>
      <spirit:slave/>
      <spirit:portMaps>
        <spirit:portMap>
          <spirit:logicalPort>
            <spirit:name>RST</spirit:name>
          </spirit:logicalPort>
          <spirit:physicalPort>
            <spirit:name>s_axi_aresetn</spirit:name>
          </spirit:physicalPort>
        </spirit:portMap>
      </spirit:portMaps>
      <spirit:parameters>
        <spirit:parameter>
          <spirit:name>POLARITY</spirit:name>
          <spirit:value spirit:format="string" spirit:resolve="immediate" spirit:id="BUSIFPARAM_VALUE.S_AXI_SIGNAL_RESET.POLARITY" spirit:choiceRef="choices_0">ACTIVE_LOW</spirit:value>
        </spirit:parameter>
      </spirit:parameters>
    </spirit:busInterface>
    <spirit:busInterface>
      <spirit:name>s_axi_signal_clock</spirit:name>
      <spirit:busType spirit:vendor="xilinx.com" spirit:library="signal" spirit:name="clock" spirit:version="1.0"/>
      <spirit:abstractionType spirit:vendor="xilinx.com" spirit:library="signal" spirit:name="clock_rtl" spirit:version="1.0"/>
      <spirit:slave/>
      <spirit:portMaps>
        <spirit:portMap>
          <spirit:logicalPort>
            <spirit:name>CLK</spirit:name>
          </spirit:logicalPort>
          <spirit:physicalPort>
            <spirit:name>s_axi_aclk</spirit:name>
          </spirit:physicalPort>
        </spirit:portMap>
      </spirit:portMaps>
      <spirit:parameters>
        <spirit:parameter>
          <spirit:name>ASSOCIATED_BUSIF</spirit:name>
          <spirit:value spirit:format="string" spirit:resolve="immediate" spirit:id="BUSIFPARAM_VALUE.S_AXI_SIGNAL_CLOCK.ASSOCIATED_BUSIF">s_axi</spirit:value>
        </spirit:parameter>
        <spirit:parameter>
          <spirit:name>ASSOCIATED_RESET</spirit:name>
          <spirit:value spirit:format="string" spirit:resolve="immediate" spirit:id="BUSIFPARAM_VALUE.S_AXI_SIGNAL_CLOCK.ASSOCIATED_RESET">s_axi_aresetn</spirit:value>
        </spirit:parameter>
      </spirit:parameters>
    </spirit:busInterface>
  </spirit:busInterfaces>
  <spirit:memoryMaps>
    <spirit:memoryMap>
      <spirit:name>s_axi</spirit:name>
      <spirit:addressBlock>
        <spirit:name>reg0</spirit:name>
        <spirit:baseAddress spirit:format="bitString" spirit:resolve="user" spirit:bitStringLength="32">0</spirit:baseAddress>
        <spirit:range spirit:format="long" spirit:resolve="dependent" spirit:dependency="pow(2,(spirit:decode(id('MODELPARAM_VALUE.C_AXI_ADDR_WIDTH')) - 1) + 1)">4294967296</spirit:range>
        <spirit:width spirit:format="long" spirit:resolve="dependent" spirit:dependency="(spirit:decode(id('MODELPARAM_VALUE.C_AXI_DATA_WIDTH')) - 1) + 1">32</spirit:width>
        <spirit:usage>register</spirit:usage>
      </spirit:addressBlock>
    </spirit:memoryMap>
  </spirit:memoryMaps>
  <spirit:model>
    <spirit:views>
      <spirit:view>
        <spirit:name>xilinx_verilogsynthesis</spirit:name>
        <spirit:displayName>Verilog Synthesis</spirit:displayName>
        <spirit:envIdentifier>verilogSource:vivado.xilinx.com:synthesis</spirit:envIdentifier>
        <spirit:language>verilog</spirit:language>
        <spirit:modelName>axi_servo_ctl</spirit:modelName>
        <spirit:fileSetRef>
          <spirit:localName>xilinx_verilogsynthesis_view_fileset</spirit:localName>
        </spirit:fileSetRef>
        <spirit:parameters>
          <spirit:parameter>
            <spirit:name>viewChecksum</spirit:name>
            <spirit:value>f2b6cb72</spirit:value>
          </spirit:parameter>
        </spirit:parameters>
      </spirit:view>
      <spirit:view>
        <spirit:name>xilinx_verilogbehavioralsimulation</spirit:name>
        <spirit:displayName>Verilog Simulation</spirit:displayName>
        <spirit:envIdentifier>verilogSource:vivado.xilinx.com:simulation</spirit:envIdentifier>
        <spirit:language>verilog</spirit:language>
        <spirit:modelName>axi_servo_ctl</spirit:modelName>
        <spirit:fileSetRef>
          <spirit:localName>xilinx_verilogbehavioralsimulation_view_fileset</spirit:localName>
        </spirit:fileSetRef>
        <spirit:parameters>
          <spirit:parameter>
            <spirit:name>viewChecksum</spirit:name>
            <spirit:value>f2b6cb72</spirit:value>
          </spirit:parameter>
        </spirit:parameters>
      </spirit:view>
      <spirit:view>
        <spirit:name>xilinx_xpgui</spirit:name>
        <spirit:displayName>UI Layout</spirit:displayName>
        <spirit:envIdentifier>:vivado.xilinx.com:xgui.ui</spirit:envIdentifier>
        <spirit:fileSetRef>
          <spirit:localName>xilinx_xpgui_view_fileset</spirit:localName>
        </spirit:fileSetRef>
        <spirit:parameters>
          <spirit:parameter>
            <spirit:name>viewChecksum</spirit:name>
            <spirit:value>50d8d3b0</spirit:value>
          </spirit:parameter>
        </spirit:parameters>
      </spirit:view>
    </spirit:views>
    <spirit:ports>
      <spirit:port>
        <spirit:name>servo_ctl</spirit:name>
        <spirit:wire>
          <spirit:direction>out</spirit:direction>
          <spirit:vector>
            <spirit:left spirit:format="long" spirit:resolve="dependent" spirit:dependency="(spirit:decode(id('MODELPARAM_VALUE.C_NUM_SERVOS')) - 1)">7</spirit:left>
            <spirit:right spirit:format="long" spirit:resolve="immediate">0</spirit:right>
          </spirit:vector>
          <spirit:wireTypeDefs>
            <spirit:wireTypeDef>
              <spirit:typeName>wire</spirit:typeName>
              <spirit:viewNameRef>xilinx_verilogsynthesis</spirit:viewNameRef>
              <spirit:viewNameRef>xilinx_verilogbehavioralsimulation</spirit:viewNameRef>
            </spirit:wireTypeDef>
          </spirit:wireTypeDefs>
        </spirit:wire>
      </spirit:port>
      <spirit:port>
        <spirit:name>s_axi_aclk</spirit:name>
        <spirit:wire>
          <spirit:direction>in</spirit:direction>
          <spirit:wireTypeDefs>
            <spirit:wireTypeDef>
              <spirit:typeName>wire</spirit:typeName>
              <spirit:viewNameRef>xilinx_verilogsynthesis</spirit:viewNameRef>
              <spirit:viewNameRef>xilinx_verilogbehavioralsimulation</spirit:viewNameRef>
            </spirit:wireTypeDef>
          </spirit:wireTypeDefs>
        </spirit:wire>
      </spirit:port>
      <spirit:port>
        <spirit:name>s_axi_aresetn</spirit:name>
        <spirit:wire>
          <spirit:direction>in</spirit:direction>
          <spirit:wireTypeDefs>
            <spirit:wireTypeDef>
              <spirit:typeName>wire</spirit:typeName>
              <spirit:viewNameRef>xilinx_verilogsynthesis</spirit:viewNameRef>
              <spirit:viewNameRef>xilinx_verilogbehavioralsimulation</spirit:viewNameRef>
            </spirit:wireTypeDef>
          </spirit:wireTypeDefs>
        </spirit:wire>
      </spirit:port>
      <spirit:port>
        <spirit:name>s_axi_awaddr</spirit:name>
        <spirit:wire>
          <spirit:direction>in</spirit:direction>
          <spirit:vector>
            <spirit:left spirit:format="long" spirit:resolve="dependent" spirit:dependency="(spirit:decode(id('MODELPARAM_VALUE.C_AXI_ADDR_WIDTH')) - 1)">31</spirit:left>
            <spirit:right spirit:format="long" spirit:resolve="immediate">0</spirit:right>
          </spirit:vector>
          <spirit:wireTypeDefs>
            <spirit:wireTypeDef>
              <spirit:typeName>wire</spirit:typeName>
              <spirit:viewNameRef>xilinx_verilogsynthesis</spirit:viewNameRef>
              <spirit:viewNameRef>xilinx_verilogbehavioralsimulation</spirit:viewNameRef>
            </spirit:wireTypeDef>
          </spirit:wireTypeDefs>
          <spirit:driver>
            <spirit:defaultValue>0</spirit:defaultValue>
          </spirit:driver>
        </spirit:wire>
      </spirit:port>
      <spirit:port>
        <spirit:name>s_axi_awprot</spirit:name>
        <spirit:wire>
          <spirit:direction>in</spirit:direction>
          <spirit:vector>
            <spirit:left spirit:format="long" spirit:resolve="immediate">2</spirit:left>
            <spirit:right spirit:format="long" spirit:resolve="immediate">0</spirit:right>
          </spirit:vector>
          <spirit:wireTypeDefs>
            <spirit:wireTypeDef>
              <spirit:typeName>wire</spirit:typeName>
              <spirit:viewNameRef>xilinx_verilogsynthesis</spirit:viewNameRef>
              <spirit:viewNameRef>xilinx_verilogbehavioralsimulation</spirit:viewNameRef>
            </spirit:wireTypeDef>
          </spirit:wireTypeDefs>
          <spirit:driver>
            <spirit:defaultValue>0</spirit:defaultValue>
          </spirit:driver>
        </spirit:wire>
      </spirit:port>
      <spirit:port>
        <spirit:name>s_axi_awvalid</spirit:name>
        <spirit:wire>
          <spirit:direction>in</spirit:direction>
          <spirit:wireTypeDefs>
            <spirit:wireTypeDef>
              <spirit:typeName>wire</spirit:typeName>
              <spirit:viewNameRef>xilinx_verilogsynthesis</spirit:viewNameRef>
              <spirit:viewNameRef>xilinx_verilogbehavioralsimulation</spirit:viewNameRef>
            </spirit:wireTypeDef>
          </spirit:wireTypeDefs>
          <spirit:driver>
            <spirit:defaultValue>0</spirit:defaultValue>
          </spirit:driver>
        </spirit:wire>
      </spirit:port>
      <spirit:port>
        <spirit:name>s_axi_awready</spirit:name>
        <spirit:wire>
          <spirit:direction>out</spirit:direction>
          <spirit:wireTypeDefs>
            <spirit:wireTypeDef>
              <spirit:typeName>reg</spirit:typeName>
              <spirit:viewNameRef>xilinx_verilogsynthesis</spirit:viewNameRef>
              <spirit:viewNameRef>xilinx_verilogbehavioralsimulation</spirit:viewNameRef>
            </spirit:wireTypeDef>
          </spirit:wireTypeDefs>
        </spirit:wire>
      </spirit:port>
      <spirit:port>
        <spirit:name>s_axi_wdata</spirit:name>
        <spirit:wire>
          <spirit:direction>in</spirit:direction>
          <spirit:vector>
            <spirit:left spirit:format="long" spirit:resolve="dependent" spirit:dependency="(spirit:decode(id('MODELPARAM_VALUE.C_AXI_DATA_WIDTH')) - 1)">31</spirit:left>
            <spirit:right spirit:format="long" spirit:resolve="immediate">0</spirit:right>
          </spirit:vector>
          <spirit:wireTypeDefs>
            <spirit:wireTypeDef>
              <spirit:typeName>wire</spirit:typeName>
              <spirit:viewNameRef>xilinx_verilogsynthesis</spirit:viewNameRef>
              <spirit:viewNameRef>xilinx_verilogbehavioralsimulation</spirit:viewNameRef>
            </spirit:wireTypeDef>
          </spirit:wireTypeDefs>
          <spirit:driver>
            <spirit:defaultValue>0</spirit:defaultValue>
          </spirit:driver>
        </spirit:wire>
      </spirit:port>
      <spirit:port>
        <spirit:name>s_axi_wvalid</spirit:name>
        <spirit:wire>
          <spirit:direction>in</spirit:direction>
          <spirit:wireTypeDefs>
            <spirit:wireTypeDef>
              <spirit:typeName>wire</spirit:typeName>
              <spirit:viewNameRef>xilinx_verilogsynthesis</spirit:viewNameRef>
              <spirit:viewNameRef>xilinx_verilogbehavioralsimulation</spirit:viewNameRef>
            </spirit:wireTypeDef>
          </spirit:wireTypeDefs>
          <spirit:driver>
            <spirit:defaultValue>0</spirit:defaultValue>
          </spirit:driver>
        </spirit:wire>
      </spirit:port>
      <spirit:port>
        <spirit:name>s_axi_wready</spirit:name>
        <spirit:wire>
          <spirit:direction>out</spirit:direction>
          <spirit:wireTypeDefs>
            <spirit:wireTypeDef>
              <spirit:typeName>reg</spirit:typeName>
              <spirit:viewNameRef>xilinx_verilogsynthesis</spirit:viewNameRef>
              <spirit:viewNameRef>xilinx_verilogbehavioralsimulation</spirit:viewNameRef>
            </spirit:wireTypeDef>
          </spirit:wireTypeDefs>
        </spirit:wire>
      </spirit:port>
      <spirit:port>
        <spirit:name>s_axi_bresp</spirit:name>
        <spirit:wire>
          <spirit:direction>out</spirit:direction>
          <spirit:vector>
            <spirit:left spirit:format="long" spirit:resolve="immediate">1</spirit:left>
            <spirit:right spirit:format="long" spirit:resolve="immediate">0</spirit:right>
          </spirit:vector>
          <spirit:wireTypeDefs>
            <spirit:wireTypeDef>
              <spirit:typeName>reg</spirit:typeName>
              <spirit:viewNameRef>xilinx_verilogsynthesis</spirit:viewNameRef>
              <spirit:viewNameRef>xilinx_verilogbehavioralsimulation</spirit:viewNameRef>
            </spirit:wireTypeDef>
          </spirit:wireTypeDefs>
        </spirit:wire>
      </spirit:port>
      <spirit:port>
        <spirit:name>s_axi_bvalid</spirit:name>
        <spirit:wire>
          <spirit:direction>out</spirit:direction>
          <spirit:wireTypeDefs>
            <spirit:wireTypeDef>
              <spirit:typeName>reg</spirit:typeName>
              <spirit:viewNameRef>xilinx_verilogsynthesis</spirit:viewNameRef>
              <spirit:viewNameRef>xilinx_verilogbehavioralsimulation</spirit:viewNameRef>
            </spirit:wireTypeDef>
          </spirit:wireTypeDefs>
        </spirit:wire>
      </spirit:port>
      <spirit:port>
        <spirit:name>s_axi_bready</spirit:name>
        <spirit:wire>
          <spirit:direction>in</spirit:direction>
          <spirit:wireTypeDefs>
            <spirit:wireTypeDef>
              <spirit:typeName>wire</spirit:typeName>
              <spirit:viewNameRef>xilinx_verilogsynthesis</spirit:viewNameRef>
              <spirit:viewNameRef>xilinx_verilogbehavioralsimulation</spirit:viewNameRef>
            </spirit:wireTypeDef>
          </spirit:wireTypeDefs>
          <spirit:driver>
            <spirit:defaultValue>0</spirit:defaultValue>
          </spirit:driver>
        </spirit:wire>
      </spirit:port>
      <spirit:port>
        <spirit:name>s_axi_araddr</spirit:name>
        <spirit:wire>
          <spirit:direction>in</spirit:direction>
          <spirit:vector>
            <spirit:left spirit:format="long" spirit:resolve="dependent" spirit:dependency="(spirit:decode(id('MODELPARAM_VALUE.C_AXI_ADDR_WIDTH')) - 1)">31</spirit:left>
            <spirit:right spirit:format="long" spirit:resolve="immediate">0</spirit:right>
          </spirit:vector>
          <spirit:wireTypeDefs>
            <spirit:wireTypeDef>
              <spirit:typeName>wire</spirit:typeName>
              <spirit:viewNameRef>xilinx_verilogsynthesis</spirit:viewNameRef>
              <spirit:viewNameRef>xilinx_verilogbehavioralsimulation</spirit:viewNameRef>
            </spirit:wireTypeDef>
          </spirit:wireTypeDefs>
          <spirit:driver>
            <spirit:defaultValue>0</spirit:defaultValue>
          </spirit:driver>
        </spirit:wire>
      </spirit:port>
      <spirit:port>
        <spirit:name>s_axi_arprot</spirit:name>
        <spirit:wire>
          <spirit:direction>in</spirit:direction>
          <spirit:vector>
            <spirit:left spirit:format="long" spirit:resolve="immediate">2</spirit:left>
            <spirit:right spirit:format="long" spirit:resolve="immediate">0</spirit:right>
          </spirit:vector>
          <spirit:wireTypeDefs>
            <spirit:wireTypeDef>
              <spirit:typeName>wire</spirit:typeName>
              <spirit:viewNameRef>xilinx_verilogsynthesis</spirit:viewNameRef>
              <spirit:viewNameRef>xilinx_verilogbehavioralsimulation</spirit:viewNameRef>
            </spirit:wireTypeDef>
          </spirit:wireTypeDefs>
          <spirit:driver>
            <spirit:defaultValue>0</spirit:defaultValue>
          </spirit:driver>
        </spirit:wire>
      </spirit:port>
      <spirit:port>
        <spirit:name>s_axi_arvalid</spirit:name>
        <spirit:wire>
          <spirit:direction>in</spirit:direction>
          <spirit:wireTypeDefs>
            <spirit:wireTypeDef>
              <spirit:typeName>wire</spirit:typeName>
              <spirit:viewNameRef>xilinx_verilogsynthesis</spirit:viewNameRef>
              <spirit:viewNameRef>xilinx_verilogbehavioralsimulation</spirit:viewNameRef>
            </spirit:wireTypeDef>
          </spirit:wireTypeDefs>
          <spirit:driver>
            <spirit:defaultValue>0</spirit:defaultValue>
          </spirit:driver>
        </spirit:wire>
      </spirit:port>
      <spirit:port>
        <spirit:name>s_axi_arready</spirit:name>
        <spirit:wire>
          <spirit:direction>out</spirit:direction>
          <spirit:wireTypeDefs>
            <spirit:wireTypeDef>
              <spirit:typeName>reg</spirit:typeName>
              <spirit:viewNameRef>xilinx_verilogsynthesis</spirit:viewNameRef>
              <spirit:viewNameRef>xilinx_verilogbehavioralsimulation</spirit:viewNameRef>
            </spirit:wireTypeDef>
          </spirit:wireTypeDefs>
        </spirit:wire>
      </spirit:port>
      <spirit:port>
        <spirit:name>s_axi_rdata</spirit:name>
        <spirit:wire>
          <spirit:direction>out</spirit:direction>
          <spirit:vector>
            <spirit:left spirit:format="long" spirit:resolve="dependent" spirit:dependency="(spirit:decode(id('MODELPARAM_VALUE.C_AXI_DATA_WIDTH')) - 1)">31</spirit:left>
            <spirit:right spirit:format="long" spirit:resolve="immediate">0</spirit:right>
          </spirit:vector>
          <spirit:wireTypeDefs>
            <spirit:wireTypeDef>
              <spirit:typeName>reg</spirit:typeName>
              <spirit:viewNameRef>xilinx_verilogsynthesis</spirit:viewNameRef>
              <spirit:viewNameRef>xilinx_verilogbehavioralsimulation</spirit:viewNameRef>
            </spirit:wireTypeDef>
          </spirit:wireTypeDefs>
        </spirit:wire>
      </spirit:port>
      <spirit:port>
        <spirit:name>s_axi_rresp</spirit:name>
        <spirit:wire>
          <spirit:direction>out</spirit:direction>
          <spirit:vector>
            <spirit:left spirit:format="long" spirit:resolve="immediate">1</spirit:left>
            <spirit:right spirit:format="long" spirit:resolve="immediate">0</spirit:right>
          </spirit:vector>
          <spirit:wireTypeDefs>
            <spirit:wireTypeDef>
              <spirit:typeName>reg</spirit:typeName>
              <spirit:viewNameRef>xilinx_verilogsynthesis</spirit:viewNameRef>
              <spirit:viewNameRef>xilinx_verilogbehavioralsimulation</spirit:viewNameRef>
            </spirit:wireTypeDef>
          </spirit:wireTypeDefs>
        </spirit:wire>
      </spirit:port>
      <spirit:port>
        <spirit:name>s_axi_rvalid</spirit:name>
        <spirit:wire>
          <spirit:direction>out</spirit:direction>
          <spirit:wireTypeDefs>
            <spirit:wireTypeDef>
              <spirit:typeName>reg</spirit:typeName>
              <spirit:viewNameRef>xilinx_verilogsynthesis</spirit:viewNameRef>
              <spirit:viewNameRef>xilinx_verilogbehavioralsimulation</spirit:viewNameRef>
            </spirit:wireTypeDef>
          </spirit:wireTypeDefs>
        </spirit:wire>
      </spirit:port>
      <spirit:port>
        <spirit:name>s_axi_rready</spirit:name>
        <spirit:wire>
          <spirit:direction>in</spirit:direction>
          <spirit:wireTypeDefs>
            <spirit:wireTypeDef>
              <spirit:typeName>wire</spirit:typeName>
              <spirit:viewNameRef>xilinx_verilogsynthesis</spirit:viewNameRef>
              <spirit:viewNameRef>xilinx_verilogbehavioralsimulation</spirit:viewNameRef>
            </spirit:wireTypeDef>
          </spirit:wireTypeDefs>
          <spirit:driver>
            <spirit:defaultValue>0</spirit:defaultValue>
          </spirit:driver>
        </spirit:wire>
      </spirit:port>
    </spirit:ports>
    <spirit:modelParameters>
      <spirit:modelParameter xsi:type="spirit:nameValueTypeType" spirit:dataType="integer">
        <spirit:name>C_AXI_DATA_WIDTH</spirit:name>
        <spirit:displayName>C Axi Data Width</spirit:displayName>
        <spirit:value spirit:format="long" spirit:resolve="generated" spirit:id="MODELPARAM_VALUE.C_AXI_DATA_WIDTH">32</spirit:value>
      </spirit:modelParameter>
      <spirit:modelParameter spirit:dataType="integer">
        <spirit:name>C_CLK_FREQ_HZ</spirit:name>
        <spirit:displayName>C Clk Freq Hz</spirit:displayName>
        <spirit:value spirit:format="long" spirit:resolve="generated" spirit:id="MODELPARAM_VALUE.C_CLK_FREQ_HZ">100000000</spirit:value>
      </spirit:modelParameter>
      <spirit:modelParameter spirit:dataType="integer">
        <spirit:name>C_AXI_ADDR_WIDTH</spirit:name>
        <spirit:displayName>C Axi Addr Width</spirit:displayName>
        <spirit:value spirit:format="long" spirit:resolve="generated" spirit:id="MODELPARAM_VALUE.C_AXI_ADDR_WIDTH">32</spirit:value>
      </spirit:modelParameter>
      <spirit:modelParameter spirit:dataType="integer">
        <spirit:name>C_NUM_SERVOS</spirit:name>
        <spirit:displayName>C Num Servos</spirit:displayName>
        <spirit:value spirit:format="long" spirit:resolve="generated" spirit:id="MODELPARAM_VALUE.C_NUM_SERVOS">8</spirit:value>
      </spirit:modelParameter>
      <spirit:modelParameter spirit:dataType="integer">
        <spirit:name>C_PERIOD_US</spirit:name>
        <spirit:displayName>C Period Us</spirit:displayName>
        <spirit:value spirit:format="long" spirit:resolve="generated" spirit:id="MODELPARAM_VALUE.C_PERIOD_US">20000</spirit:value>
      </spirit:modelParameter>
      <spirit:modelParameter spirit:dataType="integer">
        <spirit:name>C_DUTY_MIN_US</spirit:name>
        <spirit:displayName>C Duty Min Us</spirit:displayName>
        <spirit:value spirit:format="long" spirit:resolve="generated" spirit:id="MODELPARAM_VALUE.C_DUTY_MIN_US">500</spirit:value>
      </spirit:modelParameter>
      <spirit:modelParameter spirit:dataType="integer">
        <spirit:name>C_DUTY_MAX_US</spirit:name>
        <spirit:displayName>C Duty Max Us</spirit:displayName>
        <spirit:value spirit:format="long" spirit:resolve="generated" spirit:id="MODELPARAM_VALUE.C_DUTY_MAX_US">1800</spirit:value>
      </spirit:modelParameter>
    </spirit:modelParameters>
  </spirit:model>
  <spirit:choices>
    <spirit:choice>
      <spirit:name>choices_0</spirit:name>
      <spirit:enumeration>ACTIVE_HIGH</spirit:enumeration>
      <spirit:enumeration>ACTIVE_LOW</spirit:enumeration>
    </spirit:choice>
    <spirit:choice>
      <spirit:name>choices_1</spirit:name>
      <spirit:enumeration>32</spirit:enumeration>
      <spirit:enumeration>64</spirit:enumeration>
    </spirit:choice>
  </spirit:choices>
  <spirit:fileSets>
    <spirit:fileSet>
      <spirit:name>xilinx_verilogsynthesis_view_fileset</spirit:name>
      <spirit:file>
        <spirit:name>src/axi_servo_pwm.sv</spirit:name>
        <spirit:fileType>systemVerilogSource</spirit:fileType>
        <spirit:userFileType>IMPORTED_FILE</spirit:userFileType>
      </spirit:file>
      <spirit:file>
        <spirit:name>src/axi_servo_ctl.sv</spirit:name>
        <spirit:fileType>systemVerilogSource</spirit:fileType>
        <spirit:userFileType>IMPORTED_FILE</spirit:userFileType>
        <spirit:userFileType>CHECKSUM_554d45d4</spirit:userFileType>
      </spirit:file>
    </spirit:fileSet>
    <spirit:fileSet>
      <spirit:name>xilinx_verilogbehavioralsimulation_view_fileset</spirit:name>
      <spirit:file>
        <spirit:name>src/axi_servo_pwm.sv</spirit:name>
        <spirit:fileType>systemVerilogSource</spirit:fileType>
        <spirit:userFileType>IMPORTED_FILE</spirit:userFileType>
      </spirit:file>
      <spirit:file>
        <spirit:name>src/axi_servo_ctl.sv</spirit:name>
        <spirit:fileType>systemVerilogSource</spirit:fileType>
        <spirit:userFileType>IMPORTED_FILE</spirit:userFileType>
      </spirit:file>
    </spirit:fileSet>
    <spirit:fileSet>
      <spirit:name>xilinx_xpgui_view_fileset</spirit:name>
      <spirit:file>
        <spirit:name>xgui/axi_servo_ctl_v1_0.tcl</spirit:name>
        <spirit:fileType>tclSource</spirit:fileType>
        <spirit:userFileType>XGUI_VERSION_2</spirit:userFileType>
        <spirit:userFileType>CHECKSUM_da8efedd</spirit:userFileType>
      </spirit:file>
    </spirit:fileSet>
  </spirit:fileSets>
  <spirit:description>AXI servo controller</spirit:description>
  <spirit:parameters>
    <spirit:parameter>
      <spirit:name>C_AXI_DATA_WIDTH</spirit:name>
      <spirit:displayName>AXI Data Width</spirit:displayName>
      <spirit:value spirit:format="long" spirit:resolve="user" spirit:id="PARAM_VALUE.C_AXI_DATA_WIDTH" spirit:choiceRef="choices_1">32</spirit:value>
      <spirit:vendorExtensions>
        <xilinx:parameterInfo>
          <xilinx:enablement>
            <xilinx:presence>required</xilinx:presence>
            <xilinx:isEnabled xilinx:resolve="generated">true</xilinx:isEnabled>
          </xilinx:enablement>
        </xilinx:parameterInfo>
      </spirit:vendorExtensions>
    </spirit:parameter>
    <spirit:parameter>
      <spirit:name>C_CLK_FREQ_HZ</spirit:name>
      <spirit:displayName>Clock Frequency (Hz)</spirit:displayName>
      <spirit:value spirit:format="long" spirit:resolve="user" spirit:id="PARAM_VALUE.C_CLK_FREQ_HZ">100000000</spirit:value>
    </spirit:parameter>
    <spirit:parameter>
      <spirit:name>C_AXI_ADDR_WIDTH</spirit:name>
      <spirit:displayName>AXI Address Width</spirit:displayName>
      <spirit:value spirit:format="long" spirit:resolve="user" spirit:id="PARAM_VALUE.C_AXI_ADDR_WIDTH">32</spirit:value>
    </spirit:parameter>
    <spirit:parameter>
      <spirit:name>C_NUM_SERVOS</spirit:name>
      <spirit:displayName>Servo Count</spirit:displayName>
      <spirit:value spirit:format="long" spirit:resolve="user" spirit:id="PARAM_VALUE.C_NUM_SERVOS" spirit:minimum="1" spirit:maximum="32" spirit:rangeType="long">8</spirit:value>
    </spirit:parameter>
    <spirit:parameter>
      <spirit:name>C_PERIOD_US</spirit:name>
      <spirit:displayName>Period (us)</spirit:displayName>
      <spirit:value spirit:format="long" spirit:resolve="user" spirit:id="PARAM_VALUE.C_PERIOD_US">20000</spirit:value>
    </spirit:parameter>
    <spirit:parameter>
      <spirit:name>C_DUTY_MIN_US</spirit:name>
      <spirit:displayName>Minimum Duty Cycle (us)</spirit:displayName>
      <spirit:value spirit:format="long" spirit:resolve="user" spirit:id="PARAM_VALUE.C_DUTY_MIN_US">500</spirit:value>
    </spirit:parameter>
    <spirit:parameter>
      <spirit:name>C_DUTY_MAX_US</spirit:name>
      <spirit:displayName>Max Duty Cycle (us)</spirit:displayName>
      <spirit:value spirit:format="long" spirit:resolve="user" spirit:id="PARAM_VALUE.C_DUTY_MAX_US">1800</spirit:value>
    </spirit:parameter>
    <spirit:parameter>
      <spirit:name>Component_Name</spirit:name>
      <spirit:value spirit:resolve="user" spirit:id="PARAM_VALUE.Component_Name" spirit:order="1">axi_servo_ctl_v1_0</spirit:value>
    </spirit:parameter>
  </spirit:parameters>
  <spirit:vendorExtensions>
    <xilinx:coreExtensions>
      <xilinx:supportedFamilies>
        <xilinx:family xilinx:lifeCycle="Production">zynq</xilinx:family>
      </xilinx:supportedFamilies>
      <xilinx:taxonomies>
        <xilinx:taxonomy>/BaseIP</xilinx:taxonomy>
      </xilinx:taxonomies>
      <xilinx:displayName>axi_servo_ctl_v1_0</xilinx:displayName>
      <xilinx:coreRevision>2</xilinx:coreRevision>
      <xilinx:coreCreationDateTime>2015-03-27T17:28:07Z</xilinx:coreCreationDateTime>
      <xilinx:tags>
        <xilinx:tag xilinx:name="xilinx.com:ip:axi_servo_ctl:1.0_ARCHIVE_LOCATION">C:/Work/IP/Vivado/Mine</xilinx:tag>
      </xilinx:tags>
    </xilinx:coreExtensions>
    <xilinx:packagingInfo>
      <xilinx:xilinxVersion>2014.4</xilinx:xilinxVersion>
      <xilinx:checksum xilinx:scope="busInterfaces" xilinx:value="9b0049f7"/>
      <xilinx:checksum xilinx:scope="memoryMaps" xilinx:value="c9fe4264"/>
      <xilinx:checksum xilinx:scope="fileGroups" xilinx:value="410bde24"/>
      <xilinx:checksum xilinx:scope="ports" xilinx:value="c9462251"/>
      <xilinx:checksum xilinx:scope="hdlParameters" xilinx:value="6c2ae05c"/>
      <xilinx:checksum xilinx:scope="parameters" xilinx:value="994e9fbf"/>
    </xilinx:packagingInfo>
  </spirit:vendorExtensions>
</spirit:component>


text:
from __future__ import absolute_import, division, print_function

import os

import setuptools

base_dir = os.path.dirname(__file__)

with open(os.path.join(base_dir, "readme", "__about__.py")) as f:
    about = {}
    exec(f.read(), about)

with open(os.path.join(base_dir, "README.rst")) as f:
    long_description = f.read()

setuptools.setup(
    name=about["__title__"],
    version=about["__version__"],

    description=about["__summary__"],
    long_description=long_description,
    license=about["__license__"],
    url=about["__uri__"],

    author=about["__author__"],
    author_email=about["__email__"],

    classifiers=[
        "Intended Audience :: Developers",
        "License :: OSI Approved :: Apache Software License",
        "Natural Language :: English",
        "Operating System :: MacOS :: MacOS X",
        "Operating System :: POSIX",
        "Operating System :: POSIX :: BSD",
        "Operating System :: POSIX :: Linux",
        "Operating System :: Microsoft :: Windows",
        "Programming Language :: Python",
        "Programming Language :: Python :: 2",
        "Programming Language :: Python :: 2.6",
        "Programming Language :: Python :: 2.7",
        "Programming Language :: Python :: 3",
        "Programming Language :: Python :: 3.2",
        "Programming Language :: Python :: 3.3",
        "Programming Language :: Python :: Implementation :: CPython",
        "Programming Language :: Python :: Implementation :: PyPy",
    ],

    install_requires=[
        "bleach",
        "docutils",
        "Pygments",
        "six",
    ],

    packages=setuptools.find_packages(exclude=["tests", "tests.*"]),
)


text:
'use strict';

var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();

var _three = require('three');

var _three2 = _interopRequireDefault(_three);

var _ReactPropTypes = require('react/lib/ReactPropTypes');

var _ReactPropTypes2 = _interopRequireDefault(_ReactPropTypes);

var _GeometryDescriptorBase = require('./GeometryDescriptorBase');

var _GeometryDescriptorBase2 = _interopRequireDefault(_GeometryDescriptorBase);

var _propTypeInstanceOf = require('../../utils/propTypeInstanceOf');

var _propTypeInstanceOf2 = _interopRequireDefault(_propTypeInstanceOf);

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }

function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }

var GeometryDescriptor = function (_GeometryDescriptorBa) {
  _inherits(GeometryDescriptor, _GeometryDescriptorBa);

  function GeometryDescriptor(react3RendererInstance) {
    _classCallCheck(this, GeometryDescriptor);

    var _this = _possibleConstructorReturn(this, (GeometryDescriptor.__proto__ || Object.getPrototypeOf(GeometryDescriptor)).call(this, react3RendererInstance));

    _this.hasProp('vertices', {
      override: true,
      type: _ReactPropTypes2.default.arrayOf((0, _propTypeInstanceOf2.default)(_three2.default.Vector3)).isRequired,
      update: function update(threeObject, vertices) {
        if (threeObject.vertices !== vertices) {
          threeObject.vertices = vertices;

          threeObject.verticesNeedUpdate = true;
        }
      },

      updateInitial: true,
      default: []
    });
    return _this;
  }

  _createClass(GeometryDescriptor, [{
    key: 'construct',
    value: function construct() {
      return new _three2.default.Geometry();
    }
  }]);

  return GeometryDescriptor;
}(_GeometryDescriptorBase2.default);

module.exports = GeometryDescriptor;


text:
import * as React from "react";

import { dropHandler, DropCallbackInfo } from "../utils/drop-handler";

import { tr } from "../utils/translate";

interface DropZoneViewProps {
  header: string;
  dropped: (file: DropCallbackInfo) => void; // TODO: get concrete type
}

interface DropZoneViewState {
  canDrop: boolean;
}

export class DropZoneView extends React.Component<DropZoneViewProps, DropZoneViewState> {
  public static displayName = "DropZone";

  public state: DropZoneViewState = {canDrop: false};

  public render() {
    const className = `dropzone ${this.state.canDrop ? "can-drop" : ""}`;
    return (

{this.props.header || tr("~DROPZONE.DROP_IMAGES_HERE")}

{tr("~DROPZONE.SQUARES_LOOK_BEST")}

    );
  }

  private handleOnDragOver = (e) => {
    if (!this.state.canDrop) {
      this.setState({canDrop: true});
    }
    e.preventDefault();
  }

  private handleOnDragLeave = (e) => {
    this.setState({canDrop: false});
    e.preventDefault();
  }

  private handleOnDrop = (e) => {
    this.setState({canDrop: false});
    e.preventDefault();

    // get the files
    dropHandler({allow: "onlyImages"}, e, file => {
      this.props.dropped(file);
    });
  }
}


text:
<?php  if ( ! defined('BASEPATH')) exit('No direct script access allowed');

/*
*
* Filename:		teams_lang.php
* Language:		dutch
* Author:		John Schop
* 		  		john.schop@gmail.com
* Created:		2017.03.30
*
* Description:  Dutch language file for admin/teams controller
*
*/

$lang['teams_no_access'] = 'Geen toegang.';
$lang['all_users'] = 'All users';
$lang['create_team'] = 'Nieuw Team Aanmaken';
$lang['edit_team'] = 'Team %s bewerken';
$lang['error_saving_team'] = 'Er is een fout opgetreden, gegevens zijn niet opgeslagen';
$lang['team_saved'] = 'Team %s opgeslagen';
$lang['team_created'] = 'Team %s opgeslagen';
$lang['team_identifier'] = 'Team Code';
$lang['team_name'] = 'Naam';
$lang['team_shortname'] = 'Afkorting';
$lang['ID'] = 'ID';
$lang['team_flag'] = 'Vlag';
$lang['operations'] = 'Acties';
$lang['cancel'] = 'Afbreken';
$lang['save'] = 'Opslaan';


text:
package main

import (
	"github.com/afg984/thegame/server/go/thegame/pb"
)

type ProtoEntity interface {
	ID() int
	Position() complex128
	Radius() float64
	Velocity() complex128
	Health() int
	BodyDamage() int
	RewardingExperience() int
	MaxHealth() int
}

func EntityToProto(e ProtoEntity) *pb.Entity {
	return &pb.Entity{
		Id: int32(e.ID()),
		Position: &pb.Vector{
			X: real(e.Position()),
			Y: imag(e.Position()),
		},
		Radius: e.Radius(),
		Velocity: &pb.Vector{
			X: real(e.Velocity()),
			Y: imag(e.Velocity()),
		},
		Health:              int32(e.Health()),
		BodyDamage:          int32(e.BodyDamage()),
		RewardingExperience: int32(e.RewardingExperience()),
		MaxHealth:           int32(e.MaxHealth()),
	}
}


text:
module Karafka
  # Karafka framework Cli
  class Cli
    # Console Karafka Cli action
    class Console < Base
      self.desc = 'Start the Karafka console (short-cut alias: "c")'
      self.options = { aliases: 'c' }

      # @return [String] Console executing command
      # @example
      #   Karafka::Cli::Console.command #=> 'KARAFKA_CONSOLE=true bundle exec irb...'
      def self.command
        "KARAFKA_CONSOLE=true bundle exec irb -r #{Karafka.boot_file}"
      end

      # Start the Karafka console
      def call
        cli.info
        system self.class.command
      end
    end
  end
end


text:
<!DOCTYPE html>

    <meta charset="UTF-8">
    <meta name="copyright" content="stewart allen [stewart@neuron.com]">
    <meta name="description" content="3d block modeler">
    <meta name="keywords" content="gridspace,meta,metamoto,3d,block,builder,modeler,modeling">
    <meta name="author" content="Stewart Allen">
    <meta name="robots" content="noindex, nofollow">
    <title>Meta:Moto</title>
    <link rel="icon" href="/meta/favicon.ico">
    <link rel="apple-touch-icon" href="/meta/favicon-mobile.png">
    <link rel="stylesheet" type="text/css" href="/moto/style.css">
    <link rel="stylesheet" type="text/css" href="/meta/style.css">

grid:space

meta:moto


text:
\documentclass[12pt, a4paper]{article}
\usepackage{enumitem}
\usepackage{fancyhdr}

\pagestyle{fancy}
\fancyhf{}
\lhead{COSI105b}
\chead{nanoTwitter v0.2 update}
\rhead{Team Reptile Splash}

\begin{document}
\begin{enumerate}
	\item[1.]
	The work on v0.2 has generally been going well, each member finished their part very promptly, well before the due date.
	\item[2.]
	We had some problems implementing the log in/log out feature. Initially we tried to follow the instructions and use Rack::Auth:Basic, but we couldn't figure out how to incorporate it into our application, which uses HTML forms for logging in. We ended up using Sinatra's Sessions feature, which solved our initial problem, and also made logging out very easy to implement.\\
	We also had some trouble trying to make our code work in the Github-Codeship-Heroku pipeline, but we eventually made it work, our app can now be accessed from Heroku.
	\item[3.]
	In terms of remaining problems, getting and storing user password as plain text could be troublesome, we might need to improve on that at a certain point.
\end{enumerate}
\end{document}


text:
"""EasyEngine MySQL core classes."""
import pymysql
import configparser
from os.path import expanduser
import sys
import os
from ee.core.logging import Log
from ee.core.variables import EEVariables

class EEMysql():
    """Method for MySQL connection"""

    def execute(self, statement, errormsg='', log=True):
        """Get login details from ~/.my.cnf & Execute MySQL query"""
        config = configparser.RawConfigParser()
        cnfpath = expanduser("~")+"/.my.cnf"
        if [cnfpath] == config.read(cnfpath):
            user = config.get('client', 'user')
            passwd = config.get('client', 'password')
            try:
                host = config.get('client', 'host')
            except configparser.NoOptionError as e:
                host = 'localhost'

            try:
                port = config.get('client', 'port')
            except configparser.NoOptionError as e:
                port = '3306'

            try:
                conn = pymysql.connect(host=host, port=int(port),
                                       user=user, passwd=passwd)
                cur = conn.cursor()
            except Exception as e:
                if errormsg:
                    Log.debug(self, '{0}'
                              .format(e))
                    Log.error(self, '{0}'
                              .format(errormsg))
                else:
                    Log.debug(self, '{0}'
                              .format(e))
                    Log.error(self, 'Unable to connect to database: {0}'
                              .format(e))

            try:
                if log:
                    Log.debug(self, "Executing MySQL statement: {0}"
                              .format(statement))

                cur.execute(statement)
                cur.close()
                conn.close()

            except Exception as e:
                cur.close()
                conn.close()
                Log.debug(self, "{0}".format(e))
                if not errormsg:
                    Log.error(self, 'Unable to execute statement')
                else:
                    Log.error(self, '{0}'.format(errormsg))

    def backupAll(self):
        import subprocess
        try:
            Log.info(self, "Backing up database at location: "
                     "/var/ee-mysqlbackup")
            # Setup Nginx common directory
            if not os.path.exists('/var/ee-mysqlbackup'):
                Log.debug(self, 'Creating directory'
                          '/var/ee-mysqlbackup')
                os.makedirs('/var/ee-mysqlbackup')

            db = subprocess.check_output(["mysql -Bse \'show databases\'"],
                                         universal_newlines=True,
                                         shell=True).split('\n')
            for dbs in db:
                if dbs == "":
                    continue
                Log.info(self, "Backing up {0} database".format(dbs))
                p1 = subprocess.Popen("mysqldump {0}"
                                      " --max_allowed_packet=1024M"
                                      " --single-transaction".format(dbs),
                                      stdout=subprocess.PIPE,
                                      stderr=subprocess.PIPE, shell=True)
                p2 = subprocess.Popen("gzip -c > /var/ee-mysqlbackup/{0}{1}.s"
                                      "ql.gz".format(dbs, EEVariables.ee_date),
                                      stdin=p1.stdout,
                                      shell=True)

                # Allow p1 to receive a SIGPIPE if p2 exits
                p1.stdout.close()
                output = p1.stderr.read()
                p1.wait()
                if p1.returncode == 0:
                    Log.debug(self, "done")
                else:
                    Log.error(self, output.decode("utf-8"))
        except Exception as e:
            Log.error(self, "Error: process exited with status %s"
                            % e)


text:
/*
 * duplicate_handler.h
 *
 *  Created on: 11.01.2010
 *      Author: henning
 */

#ifndef DUPLICATE_HANDLER_H_
#define DUPLICATE_HANDLER_H_

#include "defs.h"
#include "olsr.h"
#include "common/list.h"

#ifndef NO_DUPLICATE_DETECTION_HANDLER
#define MAX_SYSLOG_EACH_HOUR 10

struct duplicate_handler {
  struct list_node node;

  void (*originator_collision)(uint8_t msgType);
  void (*hna_collision)(union olsr_ip_addr *hna, union olsr_ip_addr *orig);
  void (*mid_collision)(union olsr_ip_addr *mid, union olsr_ip_addr *orig);
};

void olsr_duplicate_handler_init(void);

void olsr_add_duplicate_handler(struct duplicate_handler *);
void olsr_remove_duplicate_handler(struct duplicate_handler *);

void olsr_test_originator_collision(uint8_t msgType, uint16_t seqno);
void olsr_handle_hna_collision(union olsr_ip_addr *hna, union olsr_ip_addr *orig);
void olsr_handle_mid_collision(union olsr_ip_addr *mid, union olsr_ip_addr *orig);
#endif
#endif /* DUPLICATE_HANDLER_H_ */


text:
namespace gpdxl
{
	using namespace gpos;

	// fwd decl
	class CXMLSerializer;

	//---------------------------------------------------------------------------
	//	@class:
	//		CDXLDatumInt2
	//
	//	@doc:
	//		Class for representing DXL short integer datums
	//
	//---------------------------------------------------------------------------
	class CDXLDatumInt2 : public CDXLDatum
	{
		private:
			// int2 value
			SINT m_sVal;

			// private copy ctor
			CDXLDatumInt2(const CDXLDatumInt2 &);

		public:
			// ctor
			CDXLDatumInt2
				(
				IMemoryPool *pmp,
				IMDId *pmdidType,
				BOOL fNull,
				SINT sVal
				);

			// dtor
			virtual
			~CDXLDatumInt2(){};

			// accessor of int value
			SINT SValue() const;

			// serialize the datum as the given element
			virtual
			void Serialize(CXMLSerializer *pxmlser);

			// datum type
			virtual
			EdxldatumType Edxldt() const
			{
				return CDXLDatum::EdxldatumInt2;
			}

			// is type passed by value
			virtual
			BOOL FByValue() const
			{
				return true;
			}

			// conversion function
			static
			CDXLDatumInt2 *PdxldatumConvert
				(
				CDXLDatum *pdxldatum
				)
			{
				GPOS_ASSERT(NULL != pdxldatum);
				GPOS_ASSERT(CDXLDatum::EdxldatumInt2 == pdxldatum->Edxldt());

				return dynamic_cast<CDXLDatumInt2*>(pdxldatum);
			}
	};
}

#endif // !GPDXL_CDXLDatumInt2_H

// EOF


text:
import { shallow } from "enzyme";
import Immutable from "immutable";

import DatasetsSearch from "./DatasetsSearch";

describe("DatasetsSearch-spec", () => {
  let commonProps;
  beforeEach(() => {
    commonProps = {
      searchData: Immutable.fromJS([
        {
          fullPath: ["@test_user", "business_review"],
          displayFullPath: ["@test_user", "business_review"],
          context: ["@test_user"],
          parents: [
            {
              datasetPathList: ["@test_user", "business_review"],
              type: "VIRTUAL_DATASET",
            },
          ],
          fields: [
            { name: "A", type: "BIGINT" },
            { name: "B", type: "BIGINT" },
          ],
          datasetType: "VIRTUAL_DATASET",
          links: {
            edit: '/space/"@test_user"/"business_review"?mode=edit',
            self: '/space/"@test_user"/"business_review"',
          },
        },
        {
          fullPath: ["@test_user", "foo"],
          displayFullPath: ["@test_user", "foo"],
          context: ["@test_user"],
          parents: [
            {
              datasetPathList: ["@test_user", "foo"],
              type: "VIRTUAL_DATASET",
            },
          ],
          fields: [
            { name: "A", type: "BIGINT" },
            { name: "B", type: "BIGINT" },
          ],
          datasetType: "VIRTUAL_DATASET",
          links: {
            self: '/space/"@test_user"/"foo"',
            edit: '/space/"@test_user"/"foo"?mode=edit',
          },
        },
      ]),
      visible: true,
      globalSearch: true,
      searchViewState: Immutable.fromJS({ isInProgress: false }),
      inputValue: "foo",
      handleSearchHide: () => {},
    };
  });

  it("render elements", () => {
    const wrapper = shallow(<DatasetsSearch {...commonProps} />);
    expect(wrapper.find(".datasets-search")).have.length(1);
    expect(wrapper.find(".dataset-wrapper")).have.length(1);
    expect(
      wrapper.find(".dataset-wrapper").find("Connect(ViewStateWrapper)")
    ).to.have.length(1);
  });

  it("renders bad data without exploding", () => {
    const wrapper = shallow(
      <DatasetsSearch {...commonProps} searchData={Immutable.List()} />
    );
    expect(wrapper.find(".datasets-search")).have.length(1);
  });

  it("check content", () => {
    const wrapper = shallow(<DatasetsSearch {...commonProps} />);
    const dataset = wrapper.find(".dataset-wrapper").find(".dataset");
    const mainSettingsBtn = dataset.at(1).find(".main-settings-btn");

    expect(dataset).have.length(2);

    expect(dataset.at(0).prop("to")).equal(
      commonProps.searchData.get(0).getIn(["links", "self"])
    );
    expect(dataset.at(1).prop("to")).equal(
      commonProps.searchData.get(1).getIn(["links", "self"])
    );
    expect(mainSettingsBtn.childAt(0).prop("to")).equal(
      commonProps.searchData.get(1).getIn(["links", "edit"])
    );
    expect(mainSettingsBtn.childAt(1).prop("to")).equal(
      commonProps.searchData.get(1).getIn(["links", "self"])
    );
  });
});


text:
<!DOCTYPE html>

    <meta charset="utf-8">
    <title>Color.Harmony - YUI 3</title>
    <link rel="stylesheet" href="http://yui.yahooapis.com/3.9.1/build/cssgrids/cssgrids-min.css">
    <link rel="stylesheet" href="../assets/vendor/prettify/prettify-min.css">
    <link rel="stylesheet" href="../assets/css/main.css" id="site_styles">
    <link rel="shortcut icon" type="image/png" href="../assets/favicon.png">

            API Docs for: 3.17.2

APIs

Classes

Modules

            <input type="search" id="api-filter" placeholder="Type to filter APIs">

Anim

App

App.Base

App.Content

App.Transitions

App.TransitionsNative

AreaSeries

AreaSplineSeries

Array

ArrayList

ArraySort

AsyncQueue

Attribute

AttributeCore

AttributeEvents

AttributeExtras

AttributeLite

AttributeObservable

AutoComplete

AutoCompleteBase

AutoCompleteFilters

AutoCompleteHighlighters

AutoCompleteList

Axis

AxisBase

BarSeries

Base

BaseCore

BaseObservable

BottomAxisLayout

Button

ButtonCore

ButtonGroup

Cache

CacheOffline

Calendar

CalendarBase

CandlestickSeries

CanvasCircle

CanvasDrawing

CanvasEllipse

CanvasGraphic

CanvasPath

CanvasPieSlice

CanvasRect

CanvasShape

CartesianChart

CartesianSeries

CategoryAxis

CategoryAxisBase

CategoryImpl

Chart

ChartBase

ChartLegend

Circle

CircleGroup

ClassNameManager

ClickableRail

Color

Color.Harmony

Color.HSL

Color.HSV

ColumnSeries

ComboSeries

ComboSplineSeries

config

Console

ContentEditable

Controller

Cookie

CurveUtil

CustomEvent

DataSchema.Array

DataSchema.Base

DataSchema.JSON

DataSchema.Text

DataSchema.XML

DataSource.Function

DataSource.Get

DataSource.IO

DataSource.Local

DataSourceArraySchema

DataSourceCache

DataSourceCacheExtension

DataSourceJSONSchema

DataSourceTextSchema

DataSourceXMLSchema

DataTable

DataTable.Base

DataTable.BodyView

DataTable.BodyView.Formatters

DataTable.Column

DataTable.ColumnWidths

DataTable.Core

DataTable.HeaderView

DataTable.Highlight

DataTable.KeyNav

DataTable.Message

DataTable.Mutable

DataTable.Paginator

DataTable.Paginator.Model

DataTable.Paginator.View

DataTable.Scrollable

DataTable.Sortable

DataTable.TableView

Date

DD.DDM

DD.Delegate

DD.Drag

DD.Drop

DD.Scroll

Dial

Do

Do.AlterArgs

Do.AlterReturn

Do.Error

Do.Halt

Do.Method

Do.Prevent

DOM

DOMEventFacade

Drawing

Easing

EditorBase

EditorSelection

Ellipse

EllipseGroup

Escape

Event

EventFacade

EventHandle

EventTarget

Features

File

FileFlash

FileHTML5

Fills

Frame

Get

Get.Transaction

GetNodeJS

Graph

Graphic

GraphicBase

Gridlines

GroupDiamond

GroupRect

Handlebars

Highlight

Histogram

HistoryBase

HistoryHash

HistoryHTML5

HorizontalLegendLayout

ImgLoadGroup

ImgLoadImgObj

InlineEditor

Intl

IO

JSON

JSONPRequest

Lang

LazyModelList

LeftAxisLayout

Lines

LineSeries

Loader

MarkerSeries

Matrix

MatrixUtil

Model

ModelList

ModelSync.Local

ModelSync.REST

Node

NodeList

Number

NumericAxis

NumericAxisBase

NumericImpl

Object

OHLCSeries

Overlay

Paginator

Paginator.Core

Paginator.Url

Panel

Parallel

Path

PieChart

PieSeries

Pjax

PjaxBase

PjaxContent

Plots

Plugin.Align

Plugin.AutoComplete

Plugin.Base

Plugin.Button

Plugin.Cache

Plugin.CalendarNavigator

Plugin.ConsoleFilters

Plugin.CreateLinkBase

Plugin.DataTableDataSource

Plugin.DDConstrained

Plugin.DDNodeScroll

Plugin.DDProxy

Plugin.DDWindowScroll

Plugin.Drag

Plugin.Drop

Plugin.EditorBidi

Plugin.EditorBR

Plugin.EditorLists

Plugin.EditorPara

Plugin.EditorParaBase

Plugin.EditorParaIE

Plugin.EditorTab

Plugin.ExecCommand

Plugin.ExecCommand.COMMANDS

Plugin.Flick

Plugin.Host

plugin.NodeFocusManager

Plugin.NodeFX

plugin.NodeMenuNav

Plugin.Pjax

Plugin.Resize

Plugin.ResizeConstrained

Plugin.ResizeProxy

Plugin.ScrollInfo

Plugin.ScrollViewList

Plugin.ScrollViewPaginator

Plugin.ScrollViewScrollbars

Plugin.Shim

Plugin.SortScroll

Plugin.Tree.Lazy

Plugin.WidgetAnim

Pollable

Promise

Promise.Resolver

QueryString

Queue

RangeSeries

Record

Recordset

RecordsetFilter

RecordsetIndexer

RecordsetSort

Rect

Renderer

Resize

RightAxisLayout

Router

ScrollView

Selector

SeriesBase

Shape

ShapeGroup

Slider

SliderBase

SliderValueRange

Sortable

SplineSeries

StackedAreaSeries

StackedAreaSplineSeries

StackedAxis

StackedAxisBase

StackedBarSeries

StackedColumnSeries

StackedComboSeries

StackedComboSplineSeries

StackedImpl

StackedLineSeries

StackedMarkerSeries

StackedSplineSeries

StackingUtil

State

StyleSheet

Subscriber

SVGCircle

SVGDrawing

SVGEllipse

SVGGraphic

SVGPath

SVGPieSlice

SVGRect

SVGShape

SWF

SWFDetect

SyntheticEvent

SyntheticEvent.Notifier

SynthRegistry

Tab

TabView

Template

Template.Micro

Test.ArrayAssert

Test.Assert

Test.AssertionError

Test.ComparisonFailure

Test.Console

Test.CoverageFormat

Test.DateAssert

Test.EventTarget

Test.Mock

Test.Mock.Value

Test.ObjectAssert

Test.Reporter

Test.Results

Test.Runner

Test.ShouldError

Test.ShouldFail

Test.TestCase

Test.TestFormat

Test.TestNode

Test.TestRunner

Test.TestSuite

Test.UnexpectedError

Test.UnexpectedValue

Test.Wait

Text.AccentFold

Text.WordBreak

TimeAxis

TimeAxisBase

TimeImpl

ToggleButton

TopAxisLayout

Transition

Tree

Tree.Labelable

Tree.Node

Tree.Node.Labelable

Tree.Node.Openable

Tree.Node.Selectable

Tree.Node.Sortable

Tree.Openable

Tree.Selectable

Tree.Sortable

UA

Uploader

Uploader.Queue

UploaderFlash

UploaderHTML5

ValueChange

VerticalLegendLayout

View

View.NodeMap

VMLCircle

VMLDrawing

VMLEllipse

VMLGraphic

VMLPath

VMLPieSlice

VMLRect

VMLShape

Widget

WidgetAutohide

WidgetButtons

WidgetChild

WidgetModality

WidgetParent

WidgetPosition

WidgetPositionAlign

WidgetPositionConstrain

WidgetStack

WidgetStdMod

XML

YQL

YQLRequest

YUI

YUI~substitute

align-plugin

anim

anim-base

anim-color

anim-curve

anim-easing

anim-node-plugin

anim-scroll

anim-shape

anim-shape-transform

anim-xy

app

app-base

app-content

app-transitions

app-transitions-native

array-extras

array-invoke

arraylist

arraylist-add

arraylist-filter

arraysort

async-queue

attribute

attribute-base

attribute-complex

attribute-core

attribute-extras

attribute-observable

autocomplete

autocomplete-base

autocomplete-filters

autocomplete-filters-accentfold

autocomplete-highlighters

autocomplete-highlighters-accentfold

autocomplete-list

autocomplete-list-keys

autocomplete-plugin

autocomplete-sources

axis

axis-base

axis-category

axis-category-base

axis-numeric

axis-numeric-base

axis-stacked

axis-stacked-base

axis-time

axis-time-base

base

base-base

base-build

base-core

base-observable

base-pluginhost

button

button-core

button-group

button-plugin

cache

cache-base

cache-offline

cache-plugin

calendar

calendar-base

calendarnavigator

charts

charts-base

charts-legend

classnamemanager

clickable-rail

collection

color

color-base

color-harmony

color-hsl

color-hsv

console

console-filters

content-editable

cookie

createlink-base

dataschema

dataschema-array

dataschema-base

dataschema-json

dataschema-text

dataschema-xml

datasource

datasource-arrayschema

datasource-cache

datasource-function

datasource-get

datasource-io

datasource-jsonschema

datasource-local

datasource-polling

datasource-textschema

datasource-xmlschema

datatable

datatable-base

datatable-body

datatable-column-widths

datatable-core

datatable-datasource

datatable-foot

datatable-formatters

datatable-head

datatable-highlight

datatable-keynav

datatable-message

datatable-mutable

datatable-paginator

datatable-scroll

datatable-sort

datatable-table

datatype

datatype-date

datatype-date-format

datatype-date-math

datatype-date-parse

datatype-number

datatype-number-format

datatype-number-parse

datatype-xml

datatype-xml-format

datatype-xml-parse

dd

dd-constrain

dd-ddm

dd-ddm-base

dd-ddm-drop

dd-delegate

dd-drag

dd-drop

dd-drop-plugin

dd-gestures

dd-plugin

dd-proxy

dd-scroll

dial

dom

dom-base

dom-screen

dom-style

dump

editor

editor-base

editor-bidi

editor-br

editor-inline

editor-lists

editor-para

editor-para-base

editor-para-ie

editor-tab

escape

event

event-base

event-contextmenu

event-custom

event-custom-base

event-custom-complex

event-delegate

event-flick

event-focus

event-gestures

event-hover

event-key

event-mouseenter

event-mousewheel

event-move

event-outside

event-resize

event-simulate

event-synthetic

event-tap

event-touch

event-valuechange

exec-command

features

file

file-flash

file-html5

frame

gesture-simulate

get

get-nodejs

graphics

graphics-group

handlebars

handlebars-base

handlebars-compiler

highlight

highlight-accentfold

highlight-base

history

history-base

history-hash

history-hash-ie

history-html5

imageloader

intl

io

io-base

io-form

io-nodejs

io-queue

io-upload-iframe

io-xdr

json

json-parse

json-stringify

jsonp

jsonp-url

lazy-model-list

loader

loader-base

loader-yui3

matrix

model

model-list

model-sync-rest

node

node-base

node-core

node-data

node-event-delegate

node-event-html5

node-event-simulate

node-flick

node-focusmanager

node-load

node-menunav

node-pluginhost

node-screen

node-scroll-info

node-style

oop

overlay

paginator

paginator-core

paginator-url

panel

parallel

pjax

pjax-base

pjax-content

pjax-plugin

plugin

pluginhost

pluginhost-base

pluginhost-config

promise

querystring

querystring-parse

querystring-parse-simple

querystring-stringify

querystring-stringify-simple

queue-promote

range-slider

recordset

recordset-base

recordset-filter

recordset-indexer

recordset-sort

resize

resize-contrain

resize-plugin

resize-proxy

rollup

router

scrollview

scrollview-base

scrollview-base-ie

scrollview-list

scrollview-paginator

scrollview-scrollbars

selection

selector-css2

selector-css3

selector-native

series-area

series-area-stacked

series-areaspline

series-areaspline-stacked

series-bar

series-bar-stacked

series-base

series-candlestick

series-cartesian

series-column

series-column-stacked

series-combo

series-combo-stacked

series-combospline

series-combospline-stacked

series-curve-util

series-fill-util

series-histogram

series-line

series-line-stacked

series-line-util

series-marker

series-marker-stacked

series-ohlc

series-pie

series-plot-util

series-range

series-spline

series-spline-stacked

series-stacked

shim-plugin

slider

slider-base

slider-value-range

sortable

sortable-scroll

stylesheet

substitute

swf

swfdetect

tabview

template

template-base

template-micro

test

test-console

text

text-accentfold

text-wordbreak

timers

transition

transition-timer

tree

tree-labelable

tree-lazy

tree-node

tree-openable

tree-selectable

tree-sortable

uploader

uploader-flash

uploader-html5

uploader-queue

view

view-node-map

widget

widget-anim

widget-autohide

widget-base

widget-base-ie

widget-buttons

widget-child

widget-htmlparser

widget-modality

widget-parent

widget-position

widget-position-align

widget-position-constrain

widget-skin

widget-stack

widget-stdmod

widget-uievents

yql

yql-jsonp

yql-nodejs

yql-winjs

yui

yui-base

yui-later

yui-log

yui-throttle

        Show:

            <input type="checkbox" id="api-show-inherited" checked>
            Inherited

            <input type="checkbox" id="api-show-protected">
            Protected

            <input type="checkbox" id="api-show-private">
            Private

            <input type="checkbox" id="api-show-deprecated">
            Deprecated

Color.Harmony Class

            Defined in: color/js/color-harmony.js:1

            Module: color-harmony

            Parent Module: color

Color Harmony provides methods useful for color combination discovery.

Index

Methods

Properties

Item Index

Methods

                                _adjustOffsetAndFinish

                                _constrainHue

                                _finish

                                _searchLuminanceForBrightness

                                _start

                                _toAdditive

                                _toSubtractive

                                getAnalogous

                                getBrightness

                                getComplementary

                                getMonochrome

                                getOffset

                                getSimilar

                                getSimilarBrightness

                                getSplit

                                getSquare

                                getTetrad

                                getTriad

Properties

                                _brightnessWeights

Methods

_adjustOffsetAndFinish

            (

                        color

                        offsets

                        to

)

            Array

        private

                Defined in

        color/js/color-harmony.js:529

Available since 3.8.0

Takes an HSL array, and an array of offsets and returns and array
    of colors that have been adjusted. The returned colors will
    match the array of offsets provided. If you wish you have the
    same color value returned, you can provide null or an empty
    object to the offsets. The returned array will contain color
    value strings that have been adjusted from subtractive to
    additive.

Parameters:

                        color
                        Array

                        offsets
                        Array

                        to
                        String

Returns:

                        Array:

_constrainHue

            (

                        hue

                        [precision]

)

            Number

        private

                Defined in

        color/js/color-harmony.js:461

Available since 3.8.0

Contrain the hue to a value between 0 and 360 for calculations
    and real color wheel value space. Provide a precision value
    to round return value to a decimal place

Parameters:

                        hue
                        Number

                        [precision]
                        Number
                        optional

Returns:

                        Number:

Constrained hue value

_finish

            (

                        hsla

                        [to]

)

            String

        private

                Defined in

        color/js/color-harmony.js:400

Available since 3.8.0

Converts the provided HSLA values from subtractive to additive
  returning a converted color string

Parameters:

                        hsla
                        Array

                        [to]
                        String
                        optional

Returns:

                        String:

_searchLuminanceForBrightness

            (

                        color

                        brightness

                        min

                        max

)

            Number

        private

                Defined in

        color/js/color-harmony.js:501

Available since 3.8.0

Calculates the luminance as a mid range between the min and max
  to match the brightness level provided

Parameters:

                        color
                        Array

HSLA values

                        brightness
                        Number

Brightness to be matched

                        min
                        Number

Minimum range for luminance

                        max
                        Number

Maximum range for luminance

Returns:

                        Number:

Found luminance to achieve requested brightness

_start

            (

                        str

)

            Array

        private

                Defined in

        color/js/color-harmony.js:384

Available since 3.8.0

Converts the provided color from additive to subtractive returning
  an Array of HSLA values

Parameters:

                        str
                        String

Returns:

                        Array:

_toAdditive

            (

                        hue

)

            Number

        private

                Defined in

        color/js/color-harmony.js:421

Available since 3.8.0

Adjusts the hue degree from subtractive to additive

Parameters:

                        hue
                        Number

Returns:

                        Number:

Converted additive hue

_toSubtractive

            (

                        hue

)

            Number

        private

                Defined in

        color/js/color-harmony.js:441

Available since 3.8.0

Adjusts the hue degree from additive to subtractive

Parameters:

                        hue
                        Number

Returns:

                        Number:

Converted subtractive hue

getAnalogous

            (

                        str

                        [offset]

                        [to]

)

            String

        public

                Defined in

        color/js/color-harmony.js:77

Available since 3.8.0

Returns an Array of five colors. The first color in the Array
  will be the color passed in. The remaining four will be
  analogous colors two in either direction from the initially
  provided color.

Parameters:

                        str
                        String

                        [offset]
                        Number
                        optional

                        [to]
                        String
                        optional

Returns:

                        String:

getBrightness

            (

                        str

)

            Number

        public

                Defined in

        color/js/color-harmony.js:328

Available since 3.8.0

Returns 0 - 100 percentage of brightness from 0 (black) being the
  darkest to 100 (white) being the brightest.

Parameters:

                        str
                        String

Returns:

                        Number:

getComplementary

            (

                        str

                        [to]

)

            Array

        public

                Defined in

        color/js/color-harmony.js:27

Available since 3.8.0

Returns an Array of two colors. The first color in the Array
  will be the color passed in. The second will be the
  complementary color of the color provided

Parameters:

                        str
                        String

                        [to]
                        String
                        optional

Returns:

                        Array:

getMonochrome

            (

                        str

                        [count]

                        [to]

)

            String

        public

                Defined in

        color/js/color-harmony.js:182

Available since 3.8.0

Calculates lightness offsets resulting in a monochromatic Array
  of values.

Parameters:

                        str
                        String

                        [count]
                        Number
                        optional

                        [to]
                        String
                        optional

Returns:

                        String:

getOffset

            (

                        str

                        adjust

                        [to]

)

            String

        public

                Defined in

        color/js/color-harmony.js:280

Available since 3.8.0

Adjusts the provided color by the offset(s) given. You may
  adjust hue, saturation, and/or luminance in one step.

Parameters:

                        str
                        String

                        adjust
                        Object

                                    [h]
                                    Number
                                    optional

                                    [s]
                                    Number
                                    optional

                                    [l]
                                    Number
                                    optional

                        [to]
                        String
                        optional

Returns:

                        String:

getSimilar

            (

                        str

                        [offset]

                        [count]

                        [to]

)

            String

        public

                Defined in

        color/js/color-harmony.js:226

Available since 3.8.0

Creates an Array of similar colors. Returned Array is prepended
   with the color provided followed a number of colors decided
   by count

Parameters:

                        str
                        String

                        [offset]
                        Number
                        optional

                        [count]
                        Number
                        optional

                        [to]
                        String
                        optional

Returns:

                        String:

getSimilarBrightness

            (

                        str

                        match

                        [to]

)

            String

        public

                Defined in

        color/js/color-harmony.js:352

Available since 3.8.0

Returns a new color value with adjusted luminance so that the
  brightness of the return color matches the perceived brightness
  of the match color provided.

Parameters:

                        str
                        String

                        match
                        String

                        [to]
                        String
                        optional

Returns:

                        String:

getSplit

            (

                        str

                        [offset]

                        [to]

)

            String

        public

                Defined in

        color/js/color-harmony.js:50

Available since 3.8.0

Returns an Array of three colors. The first color in the Array
  will be the color passed in. The second two will be split
  complementary colors.

Parameters:

                        str
                        String

                        [offset]
                        Number
                        optional

                        [to]
                        String
                        optional

Returns:

                        String:

getSquare

            (

                        str

                        [to]

)

            String

        public

                Defined in

        color/js/color-harmony.js:157

Available since 3.8.0

Returns an Array of four colors. The first color in the Array
  will be the color passed in. The remaining three colors are
  equidistant offsets from the starting color and each other.

Parameters:

                        str
                        String

                        [to]
                        String
                        optional

Returns:

                        String:

getTetrad

            (

                        str

                        [offset]

                        [to]

)

            String

        public

                Defined in

        color/js/color-harmony.js:130

Available since 3.8.0

Returns an Array of four colors. The first color in the Array
  will be the color passed in. The remaining three colors are
  equidistant offsets from the starting color and each other.

Parameters:

                        str
                        String

                        [offset]
                        Number
                        optional

                        [to]
                        String
                        optional

Returns:

                        String:

getTriad

            (

                        str

                        [to]

)

            String

        public

                Defined in

        color/js/color-harmony.js:106

Available since 3.8.0

Returns an Array of three colors. The first color in the Array
  will be the color passed in. The second two will be equidistant
  from the start color and each other.

Parameters:

                        str
                        String

                        [to]
                        String
                        optional

Returns:

                        String:

Properties

_brightnessWeights

    Unknown

        private

                Defined in

        color/js/color-harmony.js:485

Available since 3.8.0

Brightness weight factors for perceived brightness calculations

"standard" values are listed as R: 0.241, G: 0.691, B: 0.068
These values were changed based on grey scale comparison of hsl
  to new hsl where brightness is said to be within plus or minus 0.01.