text:
using System.Linq;
using Captura.Models;

namespace Captura.FFmpeg
{
    class CustomFFmpegVideoCodec : FFmpegVideoCodec
    {
        readonly FFmpegCodecSettings _codecSettings;

        public CustomFFmpegVideoCodec(FFmpegCodecSettings CodecSettings)
            : base("", "", "Custom Codec")
        {
            _codecSettings = CodecSettings;
        }

        public override string Name => _codecSettings.Name;

        public override string Extension => _codecSettings.Extension;

        public override FFmpegAudioArgsProvider AudioArgsProvider => FFmpegAudioItem.Items
                                                                         .FirstOrDefault(M => M.Name == _codecSettings.AudioFormat)
                                                                         ?.AudioArgsProvider ?? FFmpegAudioItem.Mp3;

        public override void Apply(FFmpegSettings Settings, VideoWriterArgs WriterArgs, FFmpegOutputArgs OutputArgs)
        {
            OutputArgs.AddArg(_codecSettings.Args);
        }
    }
}

repository: Xiamotir/Captura

repo_name: Xiamotir/Captura

gha_language: C#

extension: cs


text:
package types

import (
	"strings"

	"github.com/tendermint/tendermint/crypto/merkle"

	commitmenttypes "github.com/cosmos/cosmos-sdk/x/ibc/23-commitment/types"
	ibctypes "github.com/cosmos/cosmos-sdk/x/ibc/types"
)

// query routes supported by the IBC channel Querier
const (
	QueryAllChannels        = "channels"
	QueryChannel            = "channel"
	QueryConnectionChannels = "connection-channels"
)

type IdentifiedChannel struct {
	Channel           Channel `json:"channel_end" yaml:"channel_end"`
	PortIdentifier    string  `json:"port_identifier" yaml:"port_identifier"`
	ChannelIdentifier string  `json:"channel_identifier" yaml:"channel_identifier"`
}

// ChannelResponse defines the client query response for a channel which also
// includes a proof,its path and the height from which the proof was retrieved.
type ChannelResponse struct {
	Channel     IdentifiedChannel           `json:"channel" yaml:"channel"`
	Proof       commitmenttypes.MerkleProof `json:"proof,omitempty" yaml:"proof,omitempty"`
	ProofPath   commitmenttypes.MerklePath  `json:"proof_path,omitempty" yaml:"proof_path,omitempty"`
	ProofHeight uint64                      `json:"proof_height,omitempty" yaml:"proof_height,omitempty"`
}

// NewChannelResponse creates a new ChannelResponse instance
func NewChannelResponse(
	portID, channelID string, channel Channel, proof *merkle.Proof, height int64,
) ChannelResponse {
	return ChannelResponse{
		Channel:     IdentifiedChannel{Channel: channel, PortIdentifier: portID, ChannelIdentifier: channelID},
		Proof:       commitmenttypes.MerkleProof{Proof: proof},
		ProofPath:   commitmenttypes.NewMerklePath(strings.Split(ibctypes.ChannelPath(portID, channelID), "/")),
		ProofHeight: uint64(height),
	}
}

// QueryAllChannelsParams defines the parameters necessary for querying for all
// channels.
type QueryAllChannelsParams struct {
	Page  int `json:"page" yaml:"page"`
	Limit int `json:"limit" yaml:"limit"`
}

// NewQueryAllChannelsParams creates a new QueryAllChannelsParams instance.
func NewQueryAllChannelsParams(page, limit int) QueryAllChannelsParams {
	return QueryAllChannelsParams{
		Page:  page,
		Limit: limit,
	}
}

// QueryConnectionChannelsParams defines the parameters necessary for querying
// for all channels associated with a given connection.
type QueryConnectionChannelsParams struct {
	Connection string `json:"connection" yaml:"connection"`
	Page       int    `json:"page" yaml:"page"`
	Limit      int    `json:"limit" yaml:"limit"`
}

// NewQueryConnectionChannelsParams creates a new QueryConnectionChannelsParams instance.
func NewQueryConnectionChannelsParams(connection string, page, limit int) QueryConnectionChannelsParams {
	return QueryConnectionChannelsParams{
		Connection: connection,
		Page:       page,
		Limit:      limit,
	}
}

// PacketResponse defines the client query response for a packet which also
// includes a proof, its path and the height form which the proof was retrieved
type PacketResponse struct {
	Packet      Packet                      `json:"packet" yaml:"packet"`
	Proof       commitmenttypes.MerkleProof `json:"proof,omitempty" yaml:"proof,omitempty"`
	ProofPath   commitmenttypes.MerklePath  `json:"proof_path,omitempty" yaml:"proof_path,omitempty"`
	ProofHeight uint64                      `json:"proof_height,omitempty" yaml:"proof_height,omitempty"`
}

// NewPacketResponse creates a new PacketResponswe instance
func NewPacketResponse(
	portID, channelID string, sequence uint64, packet Packet, proof *merkle.Proof, height int64,
) PacketResponse {
	return PacketResponse{
		Packet:      packet,
		Proof:       commitmenttypes.MerkleProof{Proof: proof},
		ProofPath:   commitmenttypes.NewMerklePath(strings.Split(ibctypes.PacketCommitmentPath(portID, channelID, sequence), "/")),
		ProofHeight: uint64(height),
	}
}

// RecvResponse defines the client query response for the next receive sequence
// number which also includes a proof, its path and the height form which the
// proof was retrieved
type RecvResponse struct {
	NextSequenceRecv uint64                      `json:"next_sequence_recv" yaml:"next_sequence_recv"`
	Proof            commitmenttypes.MerkleProof `json:"proof,omitempty" yaml:"proof,omitempty"`
	ProofPath        commitmenttypes.MerklePath  `json:"proof_path,omitempty" yaml:"proof_path,omitempty"`
	ProofHeight      uint64                      `json:"proof_height,omitempty" yaml:"proof_height,omitempty"`
}

// NewRecvResponse creates a new RecvResponse instance
func NewRecvResponse(
	portID, channelID string, sequenceRecv uint64, proof *merkle.Proof, height int64,
) RecvResponse {
	return RecvResponse{
		NextSequenceRecv: sequenceRecv,
		Proof:            commitmenttypes.MerkleProof{Proof: proof},
		ProofPath:        commitmenttypes.NewMerklePath(strings.Split(ibctypes.NextSequenceRecvPath(portID, channelID), "/")),
		ProofHeight:      uint64(height),
	}
}

repository: engwarrior/cosmos-sdk

license_type: permissive

repo_name: engwarrior/cosmos-sdk

branch_name: refs/heads/master

extension: go


text:
package handler

import (
	"net/http"
	"strings"

	"github.com/airenas/go-app/pkg/goapp"
	"github.com/pkg/errors"
)

type fillHeader struct {
	next http.Handler
}

//FillHeader creates handler for filling header values from tags
func FillHeader(next http.Handler) http.Handler {
	res := &fillHeader{}
	res.next = next
	return res
}

func (h *fillHeader) ServeHTTP(w http.ResponseWriter, r *http.Request) {
	rn, ctx := customContext(r)
	for _, hs := range ctx.Tags {
		h, v, err := headerValue(hs)
		if err != nil {
			http.Error(w, "Service error", http.StatusInternalServerError)
			goapp.Log.Error("Can't parse header value from tag", err)
			return
		}
		if h != "" {
			rn.Header.Set(h, v)
		}
	}
	h.next.ServeHTTP(w, rn)
}

func headerValue(hs string) (string, string, error) {
	if idx := strings.IndexByte(hs, ':'); idx >= 0 {
		return strings.TrimSpace(hs[:idx]), strings.TrimSpace(hs[idx+1:]), nil
	}
	if (strings.TrimSpace(hs)) == "" {
		return "", "", nil
	}
	return "", "", errors.Errorf("Wrong header value, no ':' in '%s'", hs)
}

func (h *fillHeader) Info(pr string) string {
	return pr + "FillHeader\n" + GetInfo(LogShitf(pr), h.next)
}

repository: clubiriesouthbaya/api-doorman

repo_name: clubiriesouthbaya/api-doorman

branch_name: refs/heads/main


text:
#include <glad/glad.h>
#include <glfw/glfw3.h>

#include <glm/glm.hpp>
#include <glm/ext.hpp>

#include <glm/vec3.hpp>
#include <glm/mat3x3.hpp>
#include <glm/mat4x4.hpp>

#include <string>
#include <vector>
#include <iostream>
#include <fstream>
#include <sstream>
#include <algorithm>

// Global variables
bool BACKGROUND_STATE = false;

// Transformation matrices
glm::mat4 PROJECTION(1.0f);
glm::mat4 VIEW(1.0f);
glm::mat4 MODEL(1.0f);

// Light
struct Light {
    glm::vec3 position;
    glm::vec3 color;
} LIGHT;

// Camera
struct Camera {
    glm::vec3 position;
} CAMERA;

// Material
struct Material {
    glm::vec3 color;
    float exponent;
} MATERIAL;

// Read 8-bit RGB image from Netpbm binary file format (PPM)
// and convert to 32-bit linear RGB image
bool readImage(
        const std::string & filename,
        size_t & width, size_t & height,
        std::vector<glm::vec3> & pixels) {
    std::ifstream file(filename, std::ifstream::in | std::ifstream::binary);

    if (!file.is_open())
        return false;

    std::string magic, comment;
    size_t w, h, depth;

    file >> magic;

    file.ignore();

    if (file.peek() == '#')
        std::getline(file, comment);

    file >> w >> h >> depth;

    file.ignore();

    if (magic != "P6" || depth == 0) {
        file.close();
        return false;
    }

    float inverseDepth = 1.0f / depth;
    size_t size = w * h;

    width = w;
    height = h;

    pixels.resize(size);

    for (size_t i = 0; i < size; i++) {
        glm::vec3 & pixel = pixels[i];
        unsigned char data[3];

        file.read((char *)data, sizeof(data));

        pixel.r = glm::clamp((float)data[0] * inverseDepth, 0.0f, 1.0f);
        pixel.g = glm::clamp((float)data[1] * inverseDepth, 0.0f, 1.0f);
        pixel.b = glm::clamp((float)data[2] * inverseDepth, 0.0f, 1.0f);
    }

    file.close();

    return true;
}

// Load 32-bit linear RBG image to OpenGL
GLuint loadImage(size_t width, size_t height, const std::vector<glm::vec3> & pixels) {
    GLuint textureID;

    // Create and bind texture
    glGenTextures(1, &textureID);
    glBindTexture(GL_TEXTURE_2D, textureID);

    // Setup texture parameters
    glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT);
    glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT);
    glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR_MIPMAP_LINEAR);
    glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR_MIPMAP_LINEAR);

    // Copy pixel data to texture
    glTexImage2D(GL_TEXTURE_2D, 0, GL_RGB32F, width, height, 0, GL_RGB, GL_FLOAT, pixels.data());

    // Generate mipmap textures
    glGenerateMipmap(GL_TEXTURE_2D);

    return textureID;
}

// Read triangle mesh from Wavefront OBJ file format
bool readTriangleMesh(
        const std::string & filename,
        std::vector<glm::vec3> & positions,
        std::vector<glm::vec3> & normals,
        std::vector<glm::vec2> & textureCoordinates,
        std::vector<size_t> & positionIndices,
        std::vector<size_t> & normalIndices,
        std::vector<size_t> & textureCoordinateIndices) {
    std::ifstream file(filename, std::ifstream::in);

    if (!file.is_open())
        return false;

    std::string line;

    while (std::getline(file, line)) {
        std::istringstream attributes(line);

        std::string type;
        attributes >> type;

        if (type == "v") {
            glm::vec3 position;
            attributes >> position.x >> position.y >> position.z;

            positions.push_back(position);
        }
        else if (type == "vt") {
            glm::vec2 textureCoordinate;
            attributes >> textureCoordinate.x >> textureCoordinate.y;

            textureCoordinates.push_back(textureCoordinate);
        }
        else if (type == "vn") {
            glm::vec3 normal;
            attributes >> normal.x >> normal.y >> normal.z;

            normals.push_back(normal);
        }
        else if (type == "f") {
            for (size_t i = 0; i < 3; i++) {
                std::string tokens;
                attributes >> tokens;

                std::replace(tokens.begin(), tokens.end(), '/', ' ');

                std::istringstream indices(tokens);
                size_t index;

                indices >> index;
                positionIndices.push_back(index - 1);

                if (indices.peek() == ' ') {
                    indices.ignore();

                    if (indices.peek() == ' ') {
                        indices.ignore();

                        indices >> index;
                        normalIndices.push_back(index - 1);
                    }
                    else {
                        indices >> index;
                        textureCoordinateIndices.push_back(index - 1);

                        if (indices.peek() == ' ') {
                            indices.ignore();

                            indices >> index;
                            normalIndices.push_back(index - 1);
                        }
                    }
                }
            }
        }
    }

    file.close();

    return true;
}

// Load triangle mesh to OpenGL
// Normal and texture coordinate attributes are calculated by primitive when not available
// Vertex attributes are exported to shader program at locations:
// 0: position
// 1: normal
// 2: texture coordinate
size_t loadTriangleMesh(
        const std::vector<glm::vec3> & positions,
        const std::vector<glm::vec3> & normals,
        const std::vector<glm::vec2> & textureCoordinates,
        const std::vector<size_t> & positionIndices,
        const std::vector<size_t> & normalIndices,
        const std::vector<size_t> & textureCoordinateIndices,
        GLenum usage,
        GLuint & vao,
        GLuint & vbo) {
    // Duplicate and expand the triangle vertices in a flat array
    struct Vertex {
        glm::vec3 position;
        glm::vec3 normal;
        glm::vec2 textureCoordinate;
    };

    bool hasNormals = normalIndices.size() > 0;
    bool hasTextureCoordinates = textureCoordinateIndices.size() > 0;

    size_t vertexCount = positionIndices.size();
    size_t vertexSize = sizeof(Vertex);

    std::vector<Vertex> vertices;
    vertices.reserve(vertexCount);

    for (size_t i = 0; i < vertexCount / 3; i++) {
        Vertex triangleVertices[3];

        for (size_t j = 0; j < 3; j++) {
            Vertex & vertex = triangleVertices[j];
            vertex.position = positions[positionIndices[i * 3 + j]];
        }

        if (hasNormals) {
            for (size_t j = 0; j < 3; j++){
                Vertex & vertex = triangleVertices[j];
                vertex.normal = normals[normalIndices[i * 3 + j]];
            }
        }
        else {
            Vertex & vertex0 = triangleVertices[0];
            Vertex & vertex1 = triangleVertices[1];
            Vertex & vertex2 = triangleVertices[2];

            glm::vec3 u = vertex1.position - vertex0.position;
            glm::vec3 v = vertex2.position - vertex0.position;

            glm::vec3 n = glm::normalize(glm::cross(u, v));

            for (size_t j = 0; j < 3; j++) {
                Vertex & vertex = triangleVertices[j];
                vertex.normal = n;
            }
        }

        for (size_t j = 0; j < 3; j++) {
            Vertex & vertex = triangleVertices[j];

            if (hasTextureCoordinates)
                vertex.textureCoordinate = textureCoordinates[textureCoordinateIndices[i * 3 + j]];
            else
                vertex.textureCoordinate = glm::vec2((float)(j == 1), (float)(j == 2));
        }

        for (size_t j = 0; j < 3; j++)
            vertices.push_back(triangleVertices[j]);
    }

    // Create and bind vertex array object
    glGenVertexArrays(1, &vao);
    glBindVertexArray(vao);

    // Create and bind vertex buffer object
    glGenBuffers(1, &vbo);
    glBindBuffer(GL_ARRAY_BUFFER, vbo);

    // Copy vertex attribute data to vertex buffer object
    glBufferData(
        GL_ARRAY_BUFFER,
        vertices.size() * vertexSize,
        vertices.data(),
        usage);

    // Define position attribute to shader program
    glVertexAttribPointer(
        0,
        3,
        GL_FLOAT,
        GL_FALSE,
        vertexSize,
        (const GLvoid *)nullptr);

    // Enable position attribute to shader program
    glEnableVertexAttribArray(0);

    // Define normal attribute to shader program
    glVertexAttribPointer(
        1,
        3,
        GL_FLOAT,
        GL_FALSE,
        vertexSize,
        (const GLvoid *)(3 * sizeof(GLfloat)));

    // Enable normal attribute to shader program
    glEnableVertexAttribArray(1);

    // Define texture coordinate attribute to shader program
    glVertexAttribPointer(
        2,
        2,
        GL_FLOAT,
        GL_FALSE,
        vertexSize,
        (const GLvoid *)(6 * sizeof(GLfloat)));

    // Enable texture coordinate attribute to shader program
    glEnableVertexAttribArray(2);

    // Return vertex count or three times the triangle count
    return vertexCount;
}

// Compile shader source code from text file format
bool compileShader(const std::string & filename, GLenum type, GLuint & id) {
    // Read from text file to string
    std::ifstream file(filename, std::ifstream::in);

    if (!file.is_open())
        return false;

    std::stringstream buffer;
    std::string source;

    buffer << file.rdbuf();
    source = buffer.str();

    // Create shader
    GLuint shaderID = glCreateShader(type);

    // Setup shader source code
    const GLchar * src = source.data();
    glShaderSource(shaderID, 1, &src, nullptr);

    // Compile shader
    glCompileShader(shaderID);

    // Get compilation status
    GLint status;
    glGetShaderiv(shaderID, GL_COMPILE_STATUS, &status);

    // Check compilation errors
    if (status != GL_TRUE) {
        // Get log message size of the compilation process
        GLint size = 0;
        glGetShaderiv(shaderID, GL_INFO_LOG_LENGTH, &size);

        std::string message;
        message.resize(size);

        // Get log message of the compilation process
        glGetShaderInfoLog(shaderID, size, nullptr, (GLchar *)message.data());

        // Print log message
        std::cout << message << std::endl;

        // Delete shader
        glDeleteShader(shaderID);

        return false;
    }

    // Return shader id
    id = shaderID;

    return true;
}

// Create shader program
bool createProgram(const std::string & name, GLuint & id) {
    GLuint vertexShaderID, fragmentShaderID;

    // Load and compile vertex shader
    if (!compileShader(name + ".vert", GL_VERTEX_SHADER, vertexShaderID))
        return false;

    // Load and compile fragment shader
    if (!compileShader(name + ".frag", GL_FRAGMENT_SHADER, fragmentShaderID))
        return false;

    // Create shader program
    GLuint programID = glCreateProgram();

    // Attach compiled shaders to program
    glAttachShader(programID, vertexShaderID);
    glAttachShader(programID, fragmentShaderID);

    // Link attached shaders to create an executable
    glLinkProgram(programID);

    // Delete compiled shaders
    glDeleteShader(vertexShaderID);
    glDeleteShader(fragmentShaderID);

    // Get linkage status
    GLint status;
    glGetProgramiv(programID, GL_LINK_STATUS, &status);

    // Check linkage errors
    if (status != GL_TRUE) {
        // Get log message size of the linkage process
        GLint size = 0;
        glGetProgramiv(programID, GL_INFO_LOG_LENGTH, &size);

        std::string message;
        message.resize(size);

        // Get log message of the linkage process
        glGetProgramInfoLog(programID, size, nullptr, (GLchar *)message.data());

        // Print log message
        std::cout << message << std::endl;

        // Delete shader program
        glDeleteProgram(programID);

        return false;
    }

    // Return shader program id
    id = programID;

    return true;
}

// Resize event callback
void resize(GLFWwindow * window, int width, int height) {
    glViewport(0, 0, width, height);

    if (height > 0)
        PROJECTION = glm::perspective(45.0f, width / (float)height, 0.001f, 1000.0f);
}

// Keyboard event callback
void keyboard(
        GLFWwindow * window,
        int key, int scancode, int action, int modifier) {
    if (key == GLFW_KEY_A && action == GLFW_PRESS)
        BACKGROUND_STATE = !BACKGROUND_STATE;

    if (key == GLFW_KEY_LEFT && (action == GLFW_PRESS || action == GLFW_REPEAT))
        MODEL = glm::rotate(MODEL, 0.1f, glm::vec3(0.0f, 1.0f, 0.0f));
}

int main(int argc, char ** argv) {
    // GLM usage
    //
    // glm::vec3 u(1.0f, 0, 0);
    // glm::vec3 v(0, 1.0f, 0);
    //
    // glm::vec3 d = glm::dot(u, v);
    //
    // glm::mat3 m(0.0f, 1.0f, 2.0f,  // First column
    //			   3.0f, 4.0f, 5.0f,  // Second column
    //			   6.0f, 7.0f, 8.0f); // Third column
    //
    // Print GLM matrix
    // std::cout << glm::to_string(m) << std::endl;
    //
    // Access the first column as GLM vector
    // std::cout << glm::to_string(m[0]) << std::endl;
    //
    // Access the second element of the first column as float
    // std::cout << m[0][1] << std::endl;

    // Check GLFW initialization
    if (!glfwInit()) {
        std::cout << "Cannot initialize GLFW." << std::endl;
        return -1;
    }

    // Setup OpenGL context
    glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 3);
    glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 3);
    glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE);
    glfwWindowHint(GLFW_SAMPLES, 16);

    // Create window
    GLFWwindow * window = glfwCreateWindow(800, 600, "Window", nullptr, nullptr);

    // Check if cannot create window
    if (window == nullptr) {
        glfwTerminate();

        std::cout << "Cannot create window." << std::endl;
        return -1;
    }

    // Register event callbacks
    glfwSetFramebufferSizeCallback(window, resize);
    glfwSetKeyCallback(window, keyboard);

    // Setup window context
    glfwMakeContextCurrent(window);

    // Check if cannot load OpenGL procedures
    if (!gladLoadGLLoader((GLADloadproc)glfwGetProcAddress)) {
        glfwTerminate();

        std::cout << "Cannot load OpenGL procedures." << std::endl;
        return -1;
    }

    // Shader program ID
    GLuint programID;

    // Check if cannot create shader program
    if (!createProgram("../res/shaders/blinn_phong", programID)) {
        glfwTerminate();

        std::cout << "Cannot create shader program." << std::endl;
        return -1;
    }

    // Use shader program
    glUseProgram(programID);

    // Enable depth test
    glEnable(GL_DEPTH_TEST);

    // Read triangle mesh from Wavefront OBJ file format
    std::vector<glm::vec3> positions;
    std::vector<glm::vec3> normals;
    std::vector<glm::vec2> textureCoordinates;
    std::vector<size_t> positionIndices;
    std::vector<size_t> normalIndices;
    std::vector<size_t> textureCoordinateIndices;

    if (!readTriangleMesh(
            "../res/meshes/emily.obj",
            positions,
            normals,
            textureCoordinates,
            positionIndices,
            normalIndices,
            textureCoordinateIndices)) {
        glfwTerminate();

        std::cout << "Cannot read triangle mesh." << std::endl;
        return -1;
    };

    // Load triangle mesh to OpenGL
    GLuint vao, vbo;

    size_t vertexCount = loadTriangleMesh(
        positions,
        normals,
        textureCoordinates,
        positionIndices,
        normalIndices,
        textureCoordinateIndices,
        GL_STATIC_DRAW,
        vao,
        vbo);

    // Read 8-bit RGB image from Netpbm binary file format (PPM)
    size_t width, height;
    std::vector<glm::vec3> pixels;

    if (!readImage("../res/textures/diffuse.ppm", width, height, pixels)) {
        glfwTerminate();

        std::cout << "Cannot read image." << std::endl;
        return -1;
    };

    // Load 32-bit linear RGB image to OpenGL
    GLuint textureID = loadImage(width, height, pixels);

    // Initialize projection matrix and viewport
    resize(window, 800, 600);

    // Initialize light parameters
    LIGHT.position = glm::vec3(40.0f, 0.0f, 0.0f);
    LIGHT.color = glm::vec3(1.0f, 1.0f, 1.0f) * 500.0f;

    // Initialize camera parameters
    CAMERA.position = glm::vec3(40.0f, 0.0f, 0.0f);

    // Initialize material parameters
    MATERIAL.color = glm::vec3(1.0f, 1.0f, 1.0f);
    MATERIAL.exponent = 15.0f;

    // Setup view matrix
    VIEW = glm::lookAt(
        CAMERA.position,
        glm::vec3(0.0f),
        glm::vec3(0.0f, 1.0f, 0.0f));

    // Get model matrix location in shader program
    GLint modelLocationID = glGetUniformLocation(programID, "model");

    // Get view matrix location in shader program
    GLint viewLocationID = glGetUniformLocation(programID, "view");

    // Get projection matrix location in shader program
    GLint projectionLocationID = glGetUniformLocation(programID, "projection");

    // Get light position location in shader program
    GLint lightPositionLocationID = glGetUniformLocation(programID, "light.position");

    // Get light color location in shader program
    GLint lightColorLocationID = glGetUniformLocation(programID, "light.color");

    // Get camera position location in shader program
    GLint cameraPositionLocationID = glGetUniformLocation(programID, "camera.position");

    // Get material color location in shader program
    GLint materialColorLocationID = glGetUniformLocation(programID, "material.color");

    // Get image location in shader program
    GLint imageLocationID = glGetUniformLocation(programID, "image");

    // Render loop
    while (!glfwWindowShouldClose(window)) {
        // Setup color buffer
        if (BACKGROUND_STATE)
            glClearColor(1.0f, 0.0f, 0.0f, 1.0f);
        else
            glClearColor(0.0f, 0.0f, 0.0f, 1.0f);

        // Clear color buffer
        glClear(GL_COLOR_BUFFER_BIT);

        // Setup depth buffer
        glClearDepth(1.0f);

        // Clear depth buffer
        glClear(GL_DEPTH_BUFFER_BIT);

        // Load model matrix as parameter to shader program
        glUniformMatrix4fv(modelLocationID, 1, GL_FALSE, glm::value_ptr(MODEL));

        // Load view matrix as parameter to shader program
        glUniformMatrix4fv(viewLocationID, 1, GL_FALSE, glm::value_ptr(VIEW));

        // Load projection matrix as parameter to shader program
        glUniformMatrix4fv(projectionLocationID, 1, GL_FALSE, glm::value_ptr(PROJECTION));

        // Load light position as parameter to shader program
        glUniform3fv(lightPositionLocationID, 1, glm::value_ptr(LIGHT.position));

        // Load light color as parameter to shader program
        glUniform3fv(lightColorLocationID, 1, glm::value_ptr(LIGHT.color));

        // Load camera position as parameter to shader program
        glUniform3fv(cameraPositionLocationID, 1, glm::value_ptr(CAMERA.position));

        // Load material color as parameter to shader program
        glUniform3fv(materialColorLocationID, 1, glm::value_ptr(MATERIAL.color));

        // Bind texture to texture unit
        glActiveTexture(GL_TEXTURE0);

        // Load texture unit as sampler parameter to shader program
        glUniform1i(imageLocationID, 0);

        // Draw vertex array as triangles
        glDrawArrays(GL_TRIANGLES, 0, vertexCount);

        // Swap double buffer
        glfwSwapBuffers(window);

        // Process events and callbacks
        glfwPollEvents();
    }

    // Delete shader program
    glDeleteProgram(programID);

    // Delete vertex array object
    glDeleteVertexArrays(1, &vao);

    // Delete vertex buffer object
    glDeleteBuffers(1, &vbo);

    // Delete texture
    glDeleteTextures(1, &textureID);

    // Destroy window
    glfwDestroyWindow(window);

    // Deinitialize GLFW
    glfwTerminate();

    return 0;
}

extension: cpp


text:
require vte.inc
PR = "r2"

SRC_URI[archive.md5sum] = "9df3e35b81b209952ac1cf7904f7b620"
SRC_URI[archive.sha256sum] = "40cf321980d3139c8f084e818504e1366be81bed817eeeec9021257e04c1c0db"

license: MIT

repository: overo/overo-oe-natty

repo_name: overo/overo-oe-natty

branch_name: HEAD

extension: bb


text:
// --------------------------------------------------------------------------------------------------------------------
// <copyright file="PluginInitializationStatusDialog.xaml.cs" company="Adamand MUD">
//   Copyright (c) Adamant MUD
// </copyright>
// <summary>
//   Interaction logic for PluginInitializationStatusDialog.xaml
// </summary>
// --------------------------------------------------------------------------------------------------------------------

namespace Adan.Client.Dialogs
{
    using System;

    using Common.Model;

    using CSLib.Net.Annotations;
    using CSLib.Net.Diagnostics;
    using Adan.Client.Common.ViewModel;
    using System.Threading;

    /// <summary>
    /// Interaction logic for PluginInitializationStatusDialog.xaml
    /// </summary>
    public partial class PluginInitializationStatusDialog
    {
        private InitializationStatusModel _viewModel;

        /// <summary>
        /// Initializes a new instance of the <see cref="PluginInitializationStatusDialog"/> class.
        /// </summary>
        public PluginInitializationStatusDialog()
        {
            InitializeComponent();
        }

        /// <summary>
        /// Gets or sets the view model.
        /// </summary>
        /// <value>
        /// The view model.
        /// </value>
        [NotNull]
        public InitializationStatusModel ViewModel
        {
            get
            {
                return _viewModel;
            }

            set
            {
                Assert.ArgumentNotNull(value, "value");

                _viewModel = value;
                _viewModel.PropertyChanged += (o, e) => Dispatcher.Invoke((Action)HandleStatusChange);
            }
        }

        private void HandleStatusChange()
        {
            txtPluginName.Text = _viewModel.CurrentPluginName;
            txtStatus.Text = _viewModel.PluginInitializationStatus;
        }
    }
}

repository: TagsRocks/mudclient

repo_name: TagsRocks/mudclient

gha_license_id: MIT


text:
###################################################################################
#
# FFV-C : Frontflow / violet Cartesian
#
# Copyright (c) 2007-2011 VCAD System Research Program, RIKEN.
# All rights reserved.
#
# Copyright (c) 2011-2015 Institute of Industrial Science, The University of Tokyo.
# All rights reserved.
#
# Copyright (c) 2012-2016 Advanced Institute for Computational Science, RIKEN.
# All rights reserved.
#
# Copyright (c) 2016-2020 Research Institute for Information Technology(RIIT),
# Kyushu University.
# All rights reserved.
#
###################################################################################

##
## Compile option selector
##

macro (AddOptimizeOption)
  if (TARGET_ARCH STREQUAL "INTEL_F_TCS")
    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Kfast,parallel,optmsg=2 -V -Nsrc -Xg -Nfjcex -std=c++11")
    set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Kfast,parallel,optmsg=2 -V -Nsrc -Xg")
    set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -Cpp -Kfast,parallel,optmsg=2 -V -Qt")
    # -Xg   : gcc compatible flag
    # -fPIC : PIC flag
    # -Nfjcex : to link PMlib

   elseif (USE_F_TCS STREQUAL "YES")
     set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Kfast,ocl,preex,simd=2,array_private,parallel,optmsg=2 -V -Nsrc -x0 -Xg -Nfjcex")
     set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Kfast,ocl,preex,simd=2,array_private,parallel,optmsg=2 -V -Nsrc -x0 -Xg")
     set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -Cpp -Kfast,ocl,preex,simd=2,array_private,parallel,optmsg=2 -V -Qt")

  elseif(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O3 -Wall -std=c++11")
    set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -O3 -Wall")
    set(CMAKE_Fortran_FLAGS "-O3 -cpp -Wall --free-line-length-none")

  elseif(CMAKE_CXX_COMPILER_ID STREQUAL "Intel")
    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -xHOST -O3 -qopt-report=5 -DMPICH_IGNORE_CXX_SEEK -std=c++11")
    set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -xHOST -O3 -qopt-report=5")
    set(CMAKE_Fortran_FLAGS "-xHOST -O3 -Warn unused -fpp -qopt-report=5")

  elseif(CMAKE_CXX_COMPILER_ID STREQUAL "PGI")
    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fast -Mipa=fast,inline -O4 -Minfo=intensity,vect -cpp=mm -std=c++11")
    set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fast -Mipa=fast,inline -O4 -Minfo=intensity,vect -cpp=mm")
    set(CMAKE_Fortran_FLAGS "-fast -Mipa=fast,inline -O4 -Minfo=intensity,vect -cpp=mm")

  else()
    message("using default option")
  endif()
endmacro()

macro (AddSSE)
  if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
    if(CMAKE_SYSTEM_NAME MATCHES "Darwin")
      set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -msse3")
    else()
      set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -march=native")
    endif()

  elseif(CMAKE_CXX_COMPILER_ID STREQUAL "Intel")
    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -xHost")

  elseif(CMAKE_CXX_COMPILER_ID STREQUAL "PGI")
    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fastsse")
  endif()
endmacro()

macro (FreeForm)
  if(CMAKE_Fortran_COMPILER MATCHES ".*frtpx$")
    #set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS}")

  elseif(TARGET_ARCH STREQUAL "INTEL_F_TCS")
    set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -Free")

  elseif(CMAKE_Fortran_COMPILER_ID STREQUAL "GNU")
    set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -ffree-form")

  elseif(CMAKE_Fortran_COMPILER_ID STREQUAL "Intel")
    set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -free")

  elseif(CMAKE_Fortran_COMPILER_ID STREQUAL "PGI")
    set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -Mfree")

  endif()
endmacro()

macro(C99)
  set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=c99")
endmacro()

macro(CPP11)
  include(CheckCXXCompilerFlag)
  CHECK_CXX_COMPILER_FLAG("-std=c++11" COMPILER_SUPPORTS_CXX11)
  CHECK_CXX_COMPILER_FLAG("-std=c++0x" COMPILER_SUPPORTS_CXX0X)
  if(COMPILER_SUPPORTS_CXX11)
    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
  elseif(COMPILER_SUPPORTS_CXX0X)
    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x")
  endif()
endmacro()

macro(checkOpenMP)
  if(enable_OPENMP)
    if(USE_F_TCS STREQUAL "YES")
      set(OpenMP_C_FLAGS "-Kopenmp")
      set(OpenMP_CXX_FLAGS "-Kopenmp")
      set(OpenMP_Fortran_FLAGS "-Kopenmp")
    elseif(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
      set(OpenMP_C_FLAGS "-fopenmp")
      set(OpenMP_CXX_FLAGS "-fopenmp")
      set(OpenMP_Fortran_FLAGS "-fopenmp")
    elseif(CMAKE_CXX_COMPILER_ID STREQUAL "Intel")
      set(OpenMP_C_FLAGS "-qopenmp")
      set(OpenMP_CXX_FLAGS "-qopenmp")
      set(OpenMP_Fortran_FLAGS "-qopenmp")
    elseif(CMAKE_CXX_COMPILER_ID STREQUAL "PGI")
      set(OpenMP_C_FLAGS "-mp")
      set(OpenMP_CXX_FLAGS "-mp")
      set(OpenMP_Fortran_FLAGS "-mp")
    else()
      find_package(OpenMP REQUIRED)
    endif()

    # OpenMP_*_FLAGSにはfind_package(OpenMP REQUIRED)でオプションフラグが設定される
    set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS}")
    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}")
    set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} ${OpenMP_Fortran_FLAGS}")
    set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${OpenMP_EXE_LINKER_FLAGS}")
  endif()
endmacro()

macro(precision)
  if(real_type STREQUAL "OFF")
  # nothing, default is float
  set(real_type "float")

  elseif(real_type STREQUAL "float")
  # nothing

  elseif(real_type STREQUAL "double")
    ADD_DEFINITIONS(-D_REAL_IS_DOUBLE_)
    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D_REAL_IS_DOUBLE_")

    if(CMAKE_Fortran_COMPILER MATCHES ".*frtpx$")
      set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -CcdRR8")
    elseif(CMAKE_Fortran_COMPILER MATCHES ".*frt$")
      set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -CcdRR8")

    elseif(CMAKE_Fortran_COMPILER_ID STREQUAL "GNU")
      set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -fdefault-real-8 -fdefault-double-8")

    elseif(CMAKE_Fortran_COMPILER_ID STREQUAL "Intel")
      set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -r8")

    elseif(CMAKE_Fortran_COMPILER_ID STREQUAL "PGI")
      set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -r8")
    endif()

  else() # neither 'float' nor 'double'
    message("@@@@@@@@@@@")
    message("FATAL ERROR : Invalid floating type : ${real_type}")
    message("@@@@@@@@@@@")
  ENDIF()
endmacro()

repository: avr-aics-riken/FFVC

repo_name: avr-aics-riken/FFVC

gha_language: C

extension: cmake


text:
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE eagle SYSTEM "eagle.dtd">
<eagle version="7.5.0">
<drawing>
<settings>
<setting alwaysvectorfont="yes"/>
<setting verticaltext="up"/>
</settings>
<grid distance="0.05" unitdist="inch" unit="mm" style="lines" multiple="1" display="yes" altdistance="0.025" altunitdist="inch" altunit="mm"/>
<layers>
<layer number="1" name="Top" color="4" fill="1" visible="yes" active="yes"/>
<layer number="16" name="Bottom" color="1" fill="1" visible="yes" active="yes"/>
<layer number="17" name="Pads" color="2" fill="1" visible="yes" active="yes"/>
<layer number="18" name="Vias" color="2" fill="1" visible="yes" active="yes"/>
<layer number="19" name="Unrouted" color="6" fill="1" visible="yes" active="yes"/>
<layer number="20" name="Dimension" color="15" fill="1" visible="yes" active="yes"/>
<layer number="21" name="tPlace" color="7" fill="1" visible="yes" active="yes"/>
<layer number="22" name="bPlace" color="7" fill="1" visible="yes" active="yes"/>
<layer number="23" name="tOrigins" color="15" fill="1" visible="yes" active="yes"/>
<layer number="24" name="bOrigins" color="15" fill="1" visible="yes" active="yes"/>
<layer number="25" name="tNames" color="7" fill="1" visible="yes" active="yes"/>
<layer number="26" name="bNames" color="7" fill="1" visible="yes" active="yes"/>
<layer number="27" name="tValues" color="7" fill="1" visible="yes" active="yes"/>
<layer number="28" name="bValues" color="7" fill="1" visible="yes" active="yes"/>
<layer number="29" name="tStop" color="7" fill="3" visible="yes" active="yes"/>
<layer number="30" name="bStop" color="7" fill="6" visible="yes" active="yes"/>
<layer number="31" name="tCream" color="7" fill="4" visible="yes" active="yes"/>
<layer number="32" name="bCream" color="7" fill="5" visible="yes" active="yes"/>
<layer number="33" name="tFinish" color="6" fill="3" visible="yes" active="yes"/>
<layer number="34" name="bFinish" color="6" fill="6" visible="yes" active="yes"/>
<layer number="35" name="tGlue" color="7" fill="4" visible="yes" active="yes"/>
<layer number="36" name="bGlue" color="7" fill="5" visible="yes" active="yes"/>
<layer number="37" name="tTest" color="7" fill="1" visible="yes" active="yes"/>
<layer number="38" name="bTest" color="7" fill="1" visible="yes" active="yes"/>
<layer number="39" name="tKeepout" color="4" fill="11" visible="yes" active="yes"/>
<layer number="40" name="bKeepout" color="1" fill="11" visible="yes" active="yes"/>
<layer number="41" name="tRestrict" color="4" fill="10" visible="yes" active="yes"/>
<layer number="42" name="bRestrict" color="1" fill="10" visible="yes" active="yes"/>
<layer number="43" name="vRestrict" color="2" fill="10" visible="yes" active="yes"/>
<layer number="44" name="Drills" color="7" fill="1" visible="yes" active="yes"/>
<layer number="45" name="Holes" color="7" fill="1" visible="yes" active="yes"/>
<layer number="46" name="Milling" color="3" fill="1" visible="yes" active="yes"/>
<layer number="47" name="Measures" color="7" fill="1" visible="yes" active="yes"/>
<layer number="48" name="Document" color="7" fill="1" visible="yes" active="yes"/>
<layer number="49" name="Reference" color="7" fill="1" visible="yes" active="yes"/>
<layer number="50" name="dxf" color="7" fill="1" visible="no" active="no"/>
<layer number="51" name="tDocu" color="7" fill="1" visible="yes" active="yes"/>
<layer number="52" name="bDocu" color="7" fill="1" visible="yes" active="yes"/>
<layer number="53" name="tGND_GNDA" color="7" fill="9" visible="no" active="no"/>
<layer number="54" name="bGND_GNDA" color="1" fill="9" visible="no" active="no"/>
<layer number="56" name="wert" color="7" fill="1" visible="no" active="no"/>
<layer number="57" name="tCAD" color="7" fill="1" visible="no" active="no"/>
<layer number="90" name="Modules" color="5" fill="1" visible="no" active="no"/>
<layer number="91" name="Nets" color="2" fill="1" visible="no" active="no"/>
<layer number="92" name="Busses" color="1" fill="1" visible="no" active="no"/>
<layer number="93" name="Pins" color="2" fill="1" visible="no" active="no"/>
<layer number="94" name="Symbols" color="4" fill="1" visible="no" active="no"/>
<layer number="95" name="Names" color="7" fill="1" visible="no" active="no"/>
<layer number="96" name="Values" color="7" fill="1" visible="no" active="no"/>
<layer number="97" name="Info" color="7" fill="1" visible="no" active="no"/>
<layer number="98" name="Guide" color="6" fill="1" visible="no" active="no"/>
<layer number="99" name="SpiceOrder" color="5" fill="1" visible="no" active="no"/>
<layer number="100" name="Muster" color="7" fill="1" visible="no" active="no"/>
<layer number="101" name="Patch_Top" color="12" fill="4" visible="yes" active="yes"/>
<layer number="102" name="Vscore" color="7" fill="1" visible="yes" active="yes"/>
<layer number="103" name="tMap" color="7" fill="1" visible="yes" active="yes"/>
<layer number="104" name="Name" color="16" fill="1" visible="yes" active="yes"/>
<layer number="105" name="tPlate" color="7" fill="1" visible="yes" active="yes"/>
<layer number="106" name="bPlate" color="7" fill="1" visible="yes" active="yes"/>
<layer number="107" name="Crop" color="7" fill="1" visible="yes" active="yes"/>
<layer number="108" name="tplace-old" color="10" fill="1" visible="yes" active="yes"/>
<layer number="109" name="ref-old" color="11" fill="1" visible="yes" active="yes"/>
<layer number="110" name="fp0" color="7" fill="1" visible="yes" active="yes"/>
<layer number="111" name="LPC17xx" color="7" fill="1" visible="yes" active="yes"/>
<layer number="112" name="tSilk" color="7" fill="1" visible="yes" active="yes"/>
<layer number="116" name="Patch_BOT" color="9" fill="4" visible="yes" active="yes"/>
<layer number="121" name="_tsilk" color="7" fill="1" visible="yes" active="yes"/>
<layer number="122" name="_bsilk" color="7" fill="1" visible="yes" active="yes"/>
<layer number="123" name="tTestmark" color="7" fill="1" visible="yes" active="yes"/>
<layer number="124" name="bTestmark" color="7" fill="1" visible="yes" active="yes"/>
<layer number="125" name="_tNames" color="7" fill="1" visible="yes" active="yes"/>
<layer number="126" name="_bNames" color="7" fill="1" visible="yes" active="yes"/>
<layer number="127" name="_tValues" color="7" fill="1" visible="yes" active="yes"/>
<layer number="128" name="_bValues" color="7" fill="1" visible="yes" active="yes"/>
<layer number="131" name="tAdjust" color="7" fill="1" visible="yes" active="yes"/>
<layer number="132" name="bAdjust" color="7" fill="1" visible="yes" active="yes"/>
<layer number="144" name="Drill_legend" color="7" fill="1" visible="yes" active="yes"/>
<layer number="150" name="Notes" color="7" fill="1" visible="yes" active="yes"/>
<layer number="151" name="HeatSink" color="7" fill="1" visible="yes" active="yes"/>
<layer number="152" name="_bDocu" color="7" fill="1" visible="yes" active="yes"/>
<layer number="153" name="FabDoc1" color="6" fill="1" visible="no" active="no"/>
<layer number="154" name="FabDoc2" color="2" fill="1" visible="no" active="no"/>
<layer number="155" name="FabDoc3" color="7" fill="15" visible="no" active="no"/>
<layer number="199" name="Contour" color="7" fill="1" visible="yes" active="yes"/>
<layer number="200" name="200bmp" color="1" fill="10" visible="yes" active="yes"/>
<layer number="201" name="201bmp" color="2" fill="10" visible="yes" active="yes"/>
<layer number="202" name="202bmp" color="3" fill="10" visible="yes" active="yes"/>
<layer number="203" name="203bmp" color="4" fill="10" visible="yes" active="yes"/>
<layer number="204" name="204bmp" color="5" fill="10" visible="yes" active="yes"/>
<layer number="205" name="205bmp" color="6" fill="10" visible="yes" active="yes"/>
<layer number="206" name="206bmp" color="7" fill="10" visible="yes" active="yes"/>
<layer number="207" name="207bmp" color="8" fill="10" visible="yes" active="yes"/>
<layer number="208" name="208bmp" color="9" fill="10" visible="yes" active="yes"/>
<layer number="209" name="209bmp" color="7" fill="1" visible="yes" active="yes"/>
<layer number="210" name="210bmp" color="7" fill="1" visible="yes" active="yes"/>
<layer number="211" name="211bmp" color="7" fill="1" visible="yes" active="yes"/>
<layer number="212" name="212bmp" color="7" fill="1" visible="yes" active="yes"/>
<layer number="213" name="213bmp" color="7" fill="1" visible="yes" active="yes"/>
<layer number="214" name="214bmp" color="7" fill="1" visible="yes" active="yes"/>
<layer number="215" name="215bmp" color="7" fill="1" visible="yes" active="yes"/>
<layer number="216" name="216bmp" color="7" fill="1" visible="yes" active="yes"/>
<layer number="217" name="217bmp" color="18" fill="1" visible="no" active="no"/>
<layer number="218" name="218bmp" color="19" fill="1" visible="no" active="no"/>
<layer number="219" name="219bmp" color="20" fill="1" visible="no" active="no"/>
<layer number="220" name="220bmp" color="21" fill="1" visible="no" active="no"/>
<layer number="221" name="221bmp" color="22" fill="1" visible="no" active="no"/>
<layer number="222" name="222bmp" color="23" fill="1" visible="no" active="no"/>
<layer number="223" name="223bmp" color="24" fill="1" visible="no" active="no"/>
<layer number="224" name="224bmp" color="25" fill="1" visible="no" active="no"/>
<layer number="248" name="Housing" color="7" fill="1" visible="yes" active="yes"/>
<layer number="249" name="Edge" color="7" fill="1" visible="yes" active="yes"/>
<layer number="250" name="Descript" color="3" fill="1" visible="no" active="no"/>
<layer number="251" name="SMDround" color="12" fill="11" visible="no" active="no"/>
<layer number="254" name="cooling" color="7" fill="1" visible="yes" active="yes"/>
</layers>
<board>
<plain>
<text x="47.62123125" y="13.731028125" size="1" layer="25" font="vector" rot="R270">20160229</text>
<text x="36.849196875" y="2.125621875" size="1" layer="22" font="vector" rot="MR0">License: http://goo.gl/3d71UJ</text>
<text x="28.843878125" y="3.10453125" size="1" layer="25" font="vector" rot="R180">OpenTRV.org.uk</text>
<text x="2.54" y="24.13" size="1" layer="25" rot="R270">SHT21</text>
<wire x1="0" y1="0" x2="0" y2="50" width="0.4064" layer="20"/>
<wire x1="0" y1="50" x2="50" y2="50" width="0.4064" layer="20"/>
<wire x1="50" y1="50" x2="50" y2="0" width="0.4064" layer="20"/>
<wire x1="50" y1="0" x2="0" y2="0" width="0.4064" layer="20"/>
<text x="11.43" y="24.13" size="1" layer="25">Pullup resistors are on MCU Board</text>
<text x="33.91" y="44.63" size="1" layer="25" rot="R90">DQ</text>
<text x="37.72" y="44.63" size="1" layer="25" rot="R90">SDA</text>
<text x="44.07" y="44.63" size="1" layer="25" rot="R90">Miso</text>
<text x="44.07" y="38.915" size="1" layer="25" rot="R90">VCC</text>
<text x="42.8" y="44.63" size="1" layer="25" rot="R90">SCK</text>
<text x="42.8" y="38.915" size="1" layer="25" rot="R90">Mosi</text>
<text x="41.53" y="44.63" size="1" layer="25" rot="R90">RST</text>
<text x="41.53" y="38.915" size="1" layer="25" rot="R90">GND</text>
<text x="36.45" y="44.63" size="1" layer="25" rot="R90">IRQ</text>
<text x="35.18" y="44.63" size="1" layer="25" rot="R90">NSS</text>
<text x="33.91" y="38.915" size="1" layer="25" rot="R90">RX</text>
<text x="38.99" y="44.63" size="1" layer="25" rot="R90">SCL</text>
<text x="35.18" y="38.915" size="1" layer="25" rot="R90">TX</text>
<wire x1="44.45" y1="43.18" x2="32.385" y2="43.18" width="0.4064" layer="25"/>
<text x="38.99" y="38.915" size="1" layer="25" rot="R90">GND</text>
<text x="37.72" y="38.915" size="1" layer="25" rot="R90">GND</text>
<circle x="45.72" y="44.45" radius="0.25" width="0.4064" layer="25"/>
<circle x="31.75" y="46.99" radius="0.25" width="0.4064" layer="25"/>
<text x="8.493971875" y="41.90623125" size="1" layer="25" font="vector">FTDI</text>
<circle x="15.24" y="42.545" radius="0.25" width="0.4064" layer="25"/>
</plain>
<libraries>
<library name="logo">
<description>Electronic logos
</description>
<packages>
<package name="TONNE">
<description>Logo: import from bit map with import-bmp.ulp</description>
<wire x1="-6.65" y1="-4.05" x2="6.95" y2="9.55" width="0.2" layer="21"/>
<wire x1="-6.6" y1="9.5" x2="6.9" y2="-4" width="0.2" layer="21"/>
<wire x1="-0.4" y1="6.975" x2="-0.525" y2="6.975" width="0.2" layer="21"/>
<wire x1="-0.525" y1="6.975" x2="-1.775" y2="6.9" width="0.2" layer="21" curve="6.867239"/>
<wire x1="-1.775" y1="6.9" x2="-2.075" y2="6.85" width="0.2" layer="21" curve="5.190047"/>
<wire x1="-2.075" y1="6.85" x2="-2.375" y2="6.75" width="0.2" layer="21" curve="12.757239"/>
<wire x1="-2.375" y1="6.75" x2="-2.5" y2="6.5" width="0.2" layer="21" curve="77.230266"/>
<wire x1="-1.925" y1="6.55" x2="-1.95" y2="6.8" width="0.2" layer="21"/>
<wire x1="-1.95" y1="6.8" x2="-1.95" y2="6.95" width="0.2" layer="21" curve="-11.421186"/>
<wire x1="-1.95" y1="6.95" x2="-1.825" y2="6.95" width="0.2" layer="21" curve="-168.488055"/>
<wire x1="-1.825" y1="6.95" x2="-1.825" y2="6.575" width="0.2" layer="21" curve="-11.512062"/>
<wire x1="0.775" y1="6.975" x2="1.25" y2="6.95" width="0.2" layer="21"/>
<wire x1="1.25" y1="6.95" x2="2.075" y2="6.85" width="0.2" layer="21" curve="-7.79739"/>
<wire x1="2.075" y1="6.85" x2="2.575" y2="6.725" width="0.2" layer="21" curve="-6.452528"/>
<wire x1="2.575" y1="6.725" x2="2.725" y2="6.65" width="0.2" layer="21" curve="-18.611886"/>
<wire x1="2.725" y1="6.65" x2="2.775" y2="6.5" width="0.2" layer="21" curve="-71.386238"/>
<wire x1="2.7" y1="6.5" x2="-2.475" y2="6.5" width="0.2" layer="21"/>
<wire x1="-2.8" y1="6.425" x2="-2.775" y2="6.425" width="0.2" layer="21"/>
<wire x1="-2.775" y1="6.425" x2="3.175" y2="6.425" width="0.2" layer="21"/>
<wire x1="3.175" y1="6.425" x2="3.175" y2="6.4" width="0.2" layer="21"/>
<wire x1="3.175" y1="6.4" x2="2.95" y2="6.175" width="0.2" layer="21" curve="-90"/>
<wire x1="2.95" y1="6.175" x2="1.75" y2="6.175" width="0.2" layer="21"/>
<wire x1="1.75" y1="6.175" x2="-0.3" y2="6.175" width="0.2" layer="21"/>
<wire x1="-0.3" y1="6.175" x2="-2.45" y2="6.175" width="0.2" layer="21"/>
<wire x1="-2.45" y1="6.175" x2="-2.85" y2="6.175" width="0.2" layer="21"/>
<wire x1="-2.85" y1="6.175" x2="-2.9" y2="6.225" width="0.2" layer="21" curve="-90"/>
<wire x1="-2.9" y1="6.225" x2="-2.9" y2="6.3" width="0.2" layer="21"/>
<wire x1="-2.9" y1="6.3" x2="-2.9" y2="6.35" width="0.2" layer="21"/>
<wire x1="-2.9" y1="6.35" x2="-2.825" y2="6.425" width="0.2" layer="21" curve="-90"/>
<wire x1="-2.825" y1="6.425" x2="-2.8" y2="6.425" width="0.2" layer="21"/>
<wire x1="-2.8" y1="6.425" x2="-2.775" y2="6.425" width="0.2" layer="21"/>
<wire x1="-2.5" y1="6.15" x2="-1.775" y2="-1.2" width="0.2" layer="21"/>
<wire x1="-1.775" y1="-1.2" x2="-1.575" y2="-1.4" width="0.2" layer="21" curve="78.727109"/>
<wire x1="-1.575" y1="-1.4" x2="-1.425" y2="-1.425" width="0.2" layer="21" curve="-7.653246"/>
<wire x1="-1.425" y1="-1.425" x2="1.1" y2="-1.4" width="0.2" layer="21"/>
<wire x1="-1.5" y1="-1.475" x2="-1.5" y2="-1.8" width="0.2" layer="21"/>
<wire x1="-1.5" y1="-1.8" x2="-1.35" y2="-1.95" width="0.2" layer="21" curve="90"/>
<wire x1="-1.35" y1="-1.95" x2="-1.3" y2="-1.95" width="0.2" layer="21"/>
<wire x1="-1.3" y1="-1.95" x2="-1.175" y2="-1.825" width="0.2" layer="21" curve="90"/>
<wire x1="-1.175" y1="-1.825" x2="-1.175" y2="-1.475" width="0.2" layer="21"/>
<wire x1="2.1" y1="-0.75" x2="2.8" y2="6.15" width="0.2" layer="21"/>
<wire x1="2.75" y1="5.1" x2="2.925" y2="5.1" width="0.2" layer="21"/>
<wire x1="2.925" y1="5.1" x2="3.175" y2="5.35" width="0.2" layer="21" curve="90"/>
<wire x1="3.175" y1="5.35" x2="3.175" y2="5.5" width="0.2" layer="21"/>
<wire x1="3.175" y1="5.5" x2="2.9" y2="5.725" width="0.2" layer="21" curve="101.421186"/>
<wire x1="2.9" y1="5.725" x2="2.8" y2="5.725" width="0.2" layer="21" curve="-22.86036"/>
<wire x1="-0.275" y1="4.275" x2="-0.275" y2="4.2" width="0.2" layer="21"/>
<wire x1="-0.275" y1="4.2" x2="-0.275" y2="4.125" width="0.2" layer="21"/>
<wire x1="-0.275" y1="4.125" x2="-0.125" y2="3.975" width="0.2" layer="21" curve="90"/>
<wire x1="-0.125" y1="3.975" x2="1.05" y2="3.975" width="0.2" layer="21"/>
<wire x1="1.05" y1="3.975" x2="1.15" y2="4.075" width="0.2" layer="21" curve="90"/>
<wire x1="1.15" y1="4.075" x2="1.15" y2="4.25" width="0.2" layer="21"/>
<wire x1="-0.4" y1="7.05" x2="0.75" y2="7.05" width="0.2" layer="21"/>
<wire x1="0.75" y1="7.05" x2="0.75" y2="6.85" width="0.2" layer="21"/>
<wire x1="0.75" y1="6.85" x2="-0.4" y2="6.85" width="0.2" layer="21"/>
<wire x1="-0.4" y1="6.85" x2="-0.4" y2="7.05" width="0.2" layer="21"/>
<circle x="1.775" y="-1.325" radius="0.65" width="0.2" layer="21"/>
<circle x="1.775" y="-1.325" radius="0.35" width="0.2" layer="21"/>
<circle x="2.9" y="6.425" radius="0.25" width="0.2" layer="21"/>
</package>
</packages>
</library>
<library name="ohw-logo">
<packages>
<package name="OSHW_10X200_NOTEXT">
<wire x1="2.4384" y1="1.4224" x2="1.9304" y2="0.2794" width="0.254" layer="21"/>
<wire x1="1.9304" y1="0.2794" x2="1.6764" y2="0.4318" width="0.254" layer="21"/>
<wire x1="1.6764" y1="0.4318" x2="1.0668" y2="0" width="0.254" layer="21"/>
<wire x1="1.0668" y1="0" x2="0.6096" y2="0.4826" width="0.254" layer="21"/>
<wire x1="0.6096" y1="0.4826" x2="1.016" y2="1.0922" width="0.254" layer="21"/>
<wire x1="0.762" y1="1.778" x2="0" y2="1.905" width="0.254" layer="21"/>
<wire x1="0" y1="1.905" x2="0" y2="2.5654" width="0.254" layer="21"/>
<wire x1="0" y1="2.5654" x2="0.762" y2="2.7178" width="0.254" layer="21"/>
<wire x1="1.0414" y1="3.3528" x2="0.5842" y2="4.0132" width="0.254" layer="21"/>
<wire x1="0.5842" y1="4.0132" x2="1.0668" y2="4.4704" width="0.254" layer="21"/>
<wire x1="1.0668" y1="4.4704" x2="1.7272" y2="4.0132" width="0.254" layer="21"/>
<wire x1="2.3622" y1="4.2672" x2="2.4892" y2="5.08" width="0.254" layer="21"/>
<wire x1="2.4892" y1="5.08" x2="3.175" y2="5.08" width="0.254" layer="21"/>
<wire x1="3.175" y1="5.08" x2="3.302" y2="4.2672" width="0.254" layer="21"/>
<wire x1="3.937" y1="4.0132" x2="4.5974" y2="4.4704" width="0.254" layer="21"/>
<wire x1="4.5974" y1="4.4704" x2="5.08" y2="4.0132" width="0.254" layer="21"/>
<wire x1="5.08" y1="4.0132" x2="4.6228" y2="3.3528" width="0.254" layer="21"/>
<wire x1="4.9022" y1="2.7178" x2="5.6642" y2="2.5654" width="0.254" layer="21"/>
<wire x1="5.6642" y1="2.5654" x2="5.6642" y2="1.905" width="0.254" layer="21"/>
<wire x1="5.6642" y1="1.905" x2="4.9022" y2="1.778" width="0.254" layer="21"/>
<wire x1="4.6482" y1="1.0922" x2="5.08" y2="0.4826" width="0.254" layer="21"/>
<wire x1="5.08" y1="0.4826" x2="4.5974" y2="0" width="0.254" layer="21"/>
<wire x1="4.5974" y1="0" x2="3.9878" y2="0.4318" width="0.254" layer="21"/>
<wire x1="3.9878" y1="0.4318" x2="3.7338" y2="0.2794" width="0.254" layer="21"/>
<wire x1="3.7338" y1="0.2794" x2="3.2512" y2="1.4224" width="0.254" layer="21"/>
<wire x1="2.4384" y1="1.4478" x2="3.2512" y2="1.4478" width="0.254" layer="21" curve="-308.267286"/>
<wire x1="1.0245" y1="1.1004" x2="0.7637" y2="1.774" width="0.254" layer="21" curve="-19.673848"/>
<wire x1="0.7779" y1="2.7179" x2="1.0435" y2="3.3392" width="0.254" layer="21" curve="-18.371859"/>
<wire x1="1.736" y1="4.0223" x2="2.3432" y2="4.2689" width="0.254" layer="21" curve="-17.83212"/>
<wire x1="3.3155" y1="4.2736" x2="3.9464" y2="4.0175" width="0.254" layer="21" curve="-18.449318"/>
<wire x1="4.6199" y1="3.3487" x2="4.8997" y2="2.7179" width="0.254" layer="21" curve="-19.303177"/>
<wire x1="4.9045" y1="1.7692" x2="4.6484" y2="1.0909" width="0.254" layer="21" curve="-20.344696"/>
</package>
</packages>
</library>
<library name="pinhead">
<description>Pin Header Connectors

<author>Created by librarian@cadsoft.de</author></description>
<packages>
<package name="2X10">
<description>PIN HEADER</description>
<wire x1="-12.7" y1="-1.905" x2="-12.065" y2="-2.54" width="0.1524" layer="21"/>
<wire x1="-10.795" y1="-2.54" x2="-10.16" y2="-1.905" width="0.1524" layer="21"/>
<wire x1="-10.16" y1="-1.905" x2="-9.525" y2="-2.54" width="0.1524" layer="21"/>
<wire x1="-8.255" y1="-2.54" x2="-7.62" y2="-1.905" width="0.1524" layer="21"/>
<wire x1="-7.62" y1="-1.905" x2="-6.985" y2="-2.54" width="0.1524" layer="21"/>
<wire x1="-5.715" y1="-2.54" x2="-5.08" y2="-1.905" width="0.1524" layer="21"/>
<wire x1="-5.08" y1="-1.905" x2="-4.445" y2="-2.54" width="0.1524" layer="21"/>
<wire x1="-3.175" y1="-2.54" x2="-2.54" y2="-1.905" width="0.1524" layer="21"/>
<wire x1="-2.54" y1="-1.905" x2="-1.905" y2="-2.54" width="0.1524" layer="21"/>
<wire x1="-0.635" y1="-2.54" x2="0" y2="-1.905" width="0.1524" layer="21"/>
<wire x1="0" y1="-1.905" x2="0.635" y2="-2.54" width="0.1524" layer="21"/>
<wire x1="1.905" y1="-2.54" x2="2.54" y2="-1.905" width="0.1524" layer="21"/>
<wire x1="-12.7" y1="-1.905" x2="-12.7" y2="1.905" width="0.1524" layer="21"/>
<wire x1="-12.7" y1="1.905" x2="-12.065" y2="2.54" width="0.1524" layer="21"/>
<wire x1="-12.065" y1="2.54" x2="-10.795" y2="2.54" width="0.1524" layer="21"/>
<wire x1="-10.795" y1="2.54" x2="-10.16" y2="1.905" width="0.1524" layer="21"/>
<wire x1="-10.16" y1="1.905" x2="-9.525" y2="2.54" width="0.1524" layer="21"/>
<wire x1="-9.525" y1="2.54" x2="-8.255" y2="2.54" width="0.1524" layer="21"/>
<wire x1="-8.255" y1="2.54" x2="-7.62" y2="1.905" width="0.1524" layer="21"/>
<wire x1="-7.62" y1="1.905" x2="-6.985" y2="2.54" width="0.1524" layer="21"/>
<wire x1="-6.985" y1="2.54" x2="-5.715" y2="2.54" width="0.1524" layer="21"/>
<wire x1="-5.715" y1="2.54" x2="-5.08" y2="1.905" width="0.1524" layer="21"/>
<wire x1="-5.08" y1="1.905" x2="-4.445" y2="2.54" width="0.1524" layer="21"/>
<wire x1="-4.445" y1="2.54" x2="-3.175" y2="2.54" width="0.1524" layer="21"/>
<wire x1="-3.175" y1="2.54" x2="-2.54" y2="1.905" width="0.1524" layer="21"/>
<wire x1="-2.54" y1="1.905" x2="-1.905" y2="2.54" width="0.1524" layer="21"/>
<wire x1="-1.905" y1="2.54" x2="-0.635" y2="2.54" width="0.1524" layer="21"/>
<wire x1="-0.635" y1="2.54" x2="0" y2="1.905" width="0.1524" layer="21"/>
<wire x1="0" y1="1.905" x2="0.635" y2="2.54" width="0.1524" layer="21"/>
<wire x1="0.635" y1="2.54" x2="1.905" y2="2.54" width="0.1524" layer="21"/>
<wire x1="1.905" y1="2.54" x2="2.54" y2="1.905" width="0.1524" layer="21"/>
<wire x1="2.54" y1="1.905" x2="3.175" y2="2.54" width="0.1524" layer="21"/>
<wire x1="3.175" y1="2.54" x2="4.445" y2="2.54" width="0.1524" layer="21"/>
<wire x1="4.445" y1="2.54" x2="5.08" y2="1.905" width="0.1524" layer="21"/>
<wire x1="5.08" y1="1.905" x2="5.715" y2="2.54" width="0.1524" layer="21"/>
<wire x1="5.715" y1="2.54" x2="6.985" y2="2.54" width="0.1524" layer="21"/>
<wire x1="6.985" y1="2.54" x2="7.62" y2="1.905" width="0.1524" layer="21"/>
<wire x1="7.62" y1="1.905" x2="8.255" y2="2.54" width="0.1524" layer="21"/>
<wire x1="8.255" y1="2.54" x2="9.525" y2="2.54" width="0.1524" layer="21"/>
<wire x1="9.525" y1="2.54" x2="10.16" y2="1.905" width="0.1524" layer="21"/>
<wire x1="10.16" y1="-1.905" x2="9.525" y2="-2.54" width="0.1524" layer="21"/>
<wire x1="7.62" y1="-1.905" x2="8.255" y2="-2.54" width="0.1524" layer="21"/>
<wire x1="7.62" y1="-1.905" x2="6.985" y2="-2.54" width="0.1524" layer="21"/>
<wire x1="5.08" y1="-1.905" x2="5.715" y2="-2.54" width="0.1524" layer="21"/>
<wire x1="5.08" y1="-1.905" x2="4.445" y2="-2.54" width="0.1524" layer="21"/>
<wire x1="2.54" y1="-1.905" x2="3.175" y2="-2.54" width="0.1524" layer="21"/>
<wire x1="-10.16" y1="1.905" x2="-10.16" y2="-1.905" width="0.1524" layer="21"/>
<wire x1="-7.62" y1="1.905" x2="-7.62" y2="-1.905" width="0.1524" layer="21"/>
<wire x1="-5.08" y1="1.905" x2="-5.08" y2="-1.905" width="0.1524" layer="21"/>
<wire x1="-2.54" y1="1.905" x2="-2.54" y2="-1.905" width="0.1524" layer="21"/>
<wire x1="0" y1="1.905" x2="0" y2="-1.905" width="0.1524" layer="21"/>
<wire x1="2.54" y1="1.905" x2="2.54" y2="-1.905" width="0.1524" layer="21"/>
<wire x1="5.08" y1="1.905" x2="5.08" y2="-1.905" width="0.1524" layer="21"/>
<wire x1="7.62" y1="1.905" x2="7.62" y2="-1.905" width="0.1524" layer="21"/>
<wire x1="10.16" y1="1.905" x2="10.16" y2="-1.905" width="0.1524" layer="21"/>
<wire x1="8.255" y1="-2.54" x2="9.525" y2="-2.54" width="0.1524" layer="21"/>
<wire x1="5.715" y1="-2.54" x2="6.985" y2="-2.54" width="0.1524" layer="21"/>
<wire x1="3.175" y1="-2.54" x2="4.445" y2="-2.54" width="0.1524" layer="21"/>
<wire x1="0.635" y1="-2.54" x2="1.905" y2="-2.54" width="0.1524" layer="21"/>
<wire x1="-1.905" y1="-2.54" x2="-0.635" y2="-2.54" width="0.1524" layer="21"/>
<wire x1="-4.445" y1="-2.54" x2="-3.175" y2="-2.54" width="0.1524" layer="21"/>
<wire x1="-6.985" y1="-2.54" x2="-5.715" y2="-2.54" width="0.1524" layer="21"/>
<wire x1="-9.525" y1="-2.54" x2="-8.255" y2="-2.54" width="0.1524" layer="21"/>
<wire x1="-12.065" y1="-2.54" x2="-10.795" y2="-2.54" width="0.1524" layer="21"/>
<wire x1="10.16" y1="1.905" x2="10.795" y2="2.54" width="0.1524" layer="21"/>
<wire x1="10.795" y1="2.54" x2="12.065" y2="2.54" width="0.1524" layer="21"/>
<wire x1="12.065" y1="2.54" x2="12.7" y2="1.905" width="0.1524" layer="21"/>
<wire x1="12.7" y1="-1.905" x2="12.065" y2="-2.54" width="0.1524" layer="21"/>
<wire x1="10.16" y1="-1.905" x2="10.795" y2="-2.54" width="0.1524" layer="21"/>
<wire x1="12.7" y1="1.905" x2="12.7" y2="-1.905" width="0.1524" layer="21"/>
<wire x1="10.795" y1="-2.54" x2="12.065" y2="-2.54" width="0.1524" layer="21"/>
<pad name="1" x="-11.43" y="-1.27" drill="1.016" shape="square"/>
<pad name="2" x="-11.43" y="1.27" drill="1.016" shape="octagon"/>
<pad name="3" x="-8.89" y="-1.27" drill="1.016" shape="octagon"/>
<pad name="4" x="-8.89" y="1.27" drill="1.016" shape="octagon"/>
<pad name="5" x="-6.35" y="-1.27" drill="1.016" shape="octagon"/>
<pad name="6" x="-6.35" y="1.27" drill="1.016" shape="octagon"/>
<pad name="7" x="-3.81" y="-1.27" drill="1.016" shape="octagon"/>
<pad name="8" x="-3.81" y="1.27" drill="1.016" shape="octagon"/>
<pad name="9" x="-1.27" y="-1.27" drill="1.016" shape="octagon"/>
<pad name="10" x="-1.27" y="1.27" drill="1.016" shape="octagon"/>
<pad name="11" x="1.27" y="-1.27" drill="1.016" shape="octagon"/>
<pad name="12" x="1.27" y="1.27" drill="1.016" shape="octagon"/>
<pad name="13" x="3.81" y="-1.27" drill="1.016" shape="octagon"/>
<pad name="14" x="3.81" y="1.27" drill="1.016" shape="octagon"/>
<pad name="15" x="6.35" y="-1.27" drill="1.016" shape="octagon"/>
<pad name="16" x="6.35" y="1.27" drill="1.016" shape="octagon"/>
<pad name="17" x="8.89" y="-1.27" drill="1.016" shape="octagon"/>
<pad name="18" x="8.89" y="1.27" drill="1.016" shape="octagon"/>
<pad name="19" x="11.43" y="-1.27" drill="1.016" shape="octagon"/>
<pad name="20" x="11.43" y="1.27" drill="1.016" shape="octagon"/>
<text x="-12.7" y="3.175" size="1.27" layer="25" ratio="10">>NAME</text>
<text x="-12.7" y="-4.445" size="1.27" layer="27">>VALUE</text>
<rectangle x1="-11.684" y1="-1.524" x2="-11.176" y2="-1.016" layer="51"/>
<rectangle x1="-11.684" y1="1.016" x2="-11.176" y2="1.524" layer="51"/>
<rectangle x1="-9.144" y1="1.016" x2="-8.636" y2="1.524" layer="51"/>
<rectangle x1="-9.144" y1="-1.524" x2="-8.636" y2="-1.016" layer="51"/>
<rectangle x1="-6.604" y1="1.016" x2="-6.096" y2="1.524" layer="51"/>
<rectangle x1="-6.604" y1="-1.524" x2="-6.096" y2="-1.016" layer="51"/>
<rectangle x1="-4.064" y1="1.016" x2="-3.556" y2="1.524" layer="51"/>
<rectangle x1="-1.524" y1="1.016" x2="-1.016" y2="1.524" layer="51"/>
<rectangle x1="1.016" y1="1.016" x2="1.524" y2="1.524" layer="51"/>
<rectangle x1="-4.064" y1="-1.524" x2="-3.556" y2="-1.016" layer="51"/>
<rectangle x1="-1.524" y1="-1.524" x2="-1.016" y2="-1.016" layer="51"/>
<rectangle x1="1.016" y1="-1.524" x2="1.524" y2="-1.016" layer="51"/>
<rectangle x1="3.556" y1="1.016" x2="4.064" y2="1.524" layer="51"/>
<rectangle x1="3.556" y1="-1.524" x2="4.064" y2="-1.016" layer="51"/>
<rectangle x1="6.096" y1="1.016" x2="6.604" y2="1.524" layer="51"/>
<rectangle x1="6.096" y1="-1.524" x2="6.604" y2="-1.016" layer="51"/>
<rectangle x1="8.636" y1="1.016" x2="9.144" y2="1.524" layer="51"/>
<rectangle x1="8.636" y1="-1.524" x2="9.144" y2="-1.016" layer="51"/>
<rectangle x1="11.176" y1="1.016" x2="11.684" y2="1.524" layer="51"/>
<rectangle x1="11.176" y1="-1.524" x2="11.684" y2="-1.016" layer="51"/>
</package>
</packages>
</library>
<library name="TMP112_2">
<packages>
<package name="TMP112">
<description>SOT-563

Source: www.centralsemi.com ..SOT-563PD.pdf</description>
<wire x1="-1.016" y1="0.55" x2="-1.016" y2="-0.55" width="0.1016" layer="21"/>
<wire x1="1.016" y1="-0.55" x2="1.016" y2="0.55" width="0.1016" layer="21"/>
<wire x1="-1.016" y1="0.55" x2="1.016" y2="0.55" width="0.1016" layer="51"/>
<wire x1="-1.016" y1="-0.55" x2="1.016" y2="-0.55" width="0.1016" layer="51"/>
<smd name="1" x="-0.5" y="-0.825" dx="0.284759375" dy="0.7" layer="1"/>
<smd name="2" x="0" y="-0.825" dx="0.284759375" dy="0.7" layer="1"/>
<smd name="3" x="0.5" y="-0.825" dx="0.284759375" dy="0.7" layer="1"/>
<smd name="4" x="0.5" y="0.825" dx="0.284759375" dy="0.7" layer="1" rot="R180"/>
<smd name="5" x="0" y="0.825" dx="0.284759375" dy="0.7" layer="1" rot="R180"/>
<smd name="6" x="-0.5" y="0.825" dx="0.284759375" dy="0.7" layer="1" rot="R180"/>
<text x="-3.32490625" y="2.733478125" size="1.27" layer="25">>NAME</text>
<text x="-3.083590625" y="-3.907034375" size="1.27" layer="27">>VALUE</text>
<rectangle x1="-0.65" y1="-0.85" x2="-0.35" y2="-0.55" layer="51" rot="R180"/>
<rectangle x1="-0.15" y1="-0.85" x2="0.15" y2="-0.55" layer="51" rot="R180"/>
<rectangle x1="0.350834375" y1="-0.7991625" x2="0.650834375" y2="-0.4991625" layer="51" rot="R180"/>
<rectangle x1="0.35" y1="0.55" x2="0.65" y2="0.85" layer="51"/>
<rectangle x1="-0.15" y1="0.55" x2="0.15" y2="0.85" layer="51"/>
<rectangle x1="-0.65" y1="0.55" x2="-0.35" y2="0.85" layer="51"/>
<wire x1="-0.762" y1="0.55" x2="-0.762" y2="-0.55" width="0.1016" layer="21"/>
<smd name="7" x="0.776584375" y="-0.825" dx="0.284759375" dy="0.7" layer="1"/>
<smd name="8" x="1.324825" y="-0.824996875" dx="0.284759375" dy="0.7" layer="1"/>
<smd name="9" x="1.0495875" y="-0.825" dx="0.284759375" dy="0.7" layer="1"/>
<smd name="10" x="1.8675625" y="-0.82555625" dx="0.284759375" dy="0.7" layer="1"/>
<smd name="11" x="1.595453125" y="-0.825565625" dx="0.284759375" dy="0.7" layer="1"/>
<smd name="12" x="-1.862690625" y="-0.82461875" dx="0.284759375" dy="0.7" layer="1"/>
<smd name="13" x="-1.31445" y="-0.824615625" dx="0.284759375" dy="0.7" layer="1"/>
<smd name="14" x="-1.5896875" y="-0.82461875" dx="0.284759375" dy="0.7" layer="1"/>
<smd name="15" x="-0.7717125" y="-0.825175" dx="0.284759375" dy="0.7" layer="1"/>
<smd name="16" x="-1.043821875" y="-0.825184375" dx="0.284759375" dy="0.7" layer="1"/>
<smd name="17" x="-1.859884375" y="0.821653125" dx="0.284759375" dy="0.7" layer="1"/>
<smd name="18" x="-1.31164375" y="0.82165625" dx="0.284759375" dy="0.7" layer="1"/>
<smd name="19" x="-1.58688125" y="0.821653125" dx="0.284759375" dy="0.7" layer="1"/>
<smd name="20" x="-0.76890625" y="0.821096875" dx="0.284759375" dy="0.7" layer="1"/>
<smd name="21" x="-1.041015625" y="0.8210875" dx="0.284759375" dy="0.7" layer="1"/>
<smd name="22" x="0.766340625" y="0.823640625" dx="0.284759375" dy="0.7" layer="1"/>
<smd name="23" x="1.31458125" y="0.82364375" dx="0.284759375" dy="0.7" layer="1"/>
<smd name="24" x="1.03934375" y="0.823640625" dx="0.284759375" dy="0.7" layer="1"/>
<smd name="25" x="1.85731875" y="0.823084375" dx="0.284759375" dy="0.7" layer="1"/>
<smd name="26" x="1.585209375" y="0.823075" dx="0.284759375" dy="0.7" layer="1"/>
<smd name="27" x="-0.547759375" y="1.7973875" dx="0.284759375" dy="0.7" layer="1"/>
<smd name="28" x="0.00048125" y="1.797390625" dx="0.284759375" dy="0.7" layer="1"/>
<smd name="29" x="-0.27475625" y="1.7973875" dx="0.284759375" dy="0.7" layer="1"/>
<smd name="30" x="0.54321875" y="1.79683125" dx="0.284759375" dy="0.7" layer="1"/>
<smd name="31" x="0.271109375" y="1.796821875" dx="0.284759375" dy="0.7" layer="1"/>
<smd name="32" x="0.000553125" y="1.383109375" dx="0.284759375" dy="0.7" layer="1"/>
<smd name="33" x="-0.54779375" y="-1.798065625" dx="0.284759375" dy="0.7" layer="1"/>
<smd name="34" x="0.000446875" y="-1.7980625" dx="0.284759375" dy="0.7" layer="1"/>
<smd name="35" x="-0.274790625" y="-1.798065625" dx="0.284759375" dy="0.7" layer="1"/>
<smd name="36" x="0.543184375" y="-1.798621875" dx="0.284759375" dy="0.7" layer="1"/>
<smd name="37" x="0.271075" y="-1.79863125" dx="0.284759375" dy="0.7" layer="1"/>
<smd name="38" x="-0.00001875" y="-1.32179375" dx="0.284759375" dy="0.7" layer="1"/>
</package>
</packages>
</library>
<library name="SHT21">
<packages>
<package name="SHT21">
<wire x1="-1.435" y1="1" x2="1.435" y2="1" width="0.127" layer="19"/>
<wire x1="1.435" y1="-1" x2="-1.435" y2="-1" width="0.127" layer="19"/>
<circle x="-1.397" y="-0.8763" radius="0.1" width="0.127" layer="25"/>
<smd name="1" x="-1" y="-1.3" dx="0.4" dy="0.6" layer="1"/>
<smd name="2" x="0" y="-1.3" dx="0.4" dy="0.6" layer="1"/>
<smd name="3" x="1" y="-1.3" dx="0.4" dy="0.6" layer="1"/>
<smd name="4" x="1" y="1.3" dx="0.4" dy="0.6" layer="1"/>
<smd name="5" x="0" y="1.3" dx="0.4" dy="0.6" layer="1"/>
<smd name="6" x="-1" y="1.3" dx="0.4" dy="0.6" layer="1"/>
<smd name="P$1" x="0" y="0" dx="2.4" dy="1.5" layer="1" cream="no"/>
<rectangle x1="-0.55" y1="0.1" x2="-0.3" y2="0.35" layer="31"/>
<rectangle x1="0.3" y1="0.1" x2="0.55" y2="0.35" layer="31" rot="R270"/>
<rectangle x1="0.3" y1="-0.35" x2="0.55" y2="-0.1" layer="31" rot="R180"/>
<rectangle x1="-0.55" y1="-0.35" x2="-0.3" y2="-0.1" layer="31" rot="R90"/>
<rectangle x1="-0.15" y1="-0.35" x2="0.15" y2="-0.1" layer="31" rot="R180"/>
<rectangle x1="-0.15" y1="0.1" x2="0.15" y2="0.35" layer="31"/>
<wire x1="-1.435" y1="1" x2="-1.435" y2="-1" width="0.127" layer="21"/>
<wire x1="1.435" y1="-1" x2="1.435" y2="1" width="0.127" layer="21"/>
</package>
</packages>
</library>
<library name="DS1820">
<description>Dallas DS1820 (TO-92)

jayakody2000lk.wordpress.com</description>
<packages>
<package name="TO-92">
<wire x1="-2.095" y1="-1.651" x2="-0.7869" y2="2.5484" width="0.1524" layer="21" curve="-111.097684"/>
<wire x1="0.7869" y1="2.5484" x2="2.095" y2="-1.651" width="0.1524" layer="21" curve="-111.097684"/>
<wire x1="-2.095" y1="-1.651" x2="2.095" y2="-1.651" width="0.1524" layer="21"/>
<wire x1="-2.254" y1="-0.254" x2="-0.286" y2="-0.254" width="0.1524" layer="51"/>
<wire x1="-2.655" y1="-0.254" x2="-2.254" y2="-0.254" width="0.1524" layer="21"/>
<wire x1="-0.286" y1="-0.254" x2="0.286" y2="-0.254" width="0.1524" layer="21"/>
<wire x1="2.254" y1="-0.254" x2="2.655" y2="-0.254" width="0.1524" layer="21"/>
<wire x1="0.286" y1="-0.254" x2="2.254" y2="-0.254" width="0.1524" layer="51"/>
<wire x1="-0.7864" y1="2.5484" x2="0.7864" y2="2.5484" width="0.1524" layer="51" curve="-34.298964"/>
<pad name="1" x="-1.27" y="0" drill="0.8128" diameter="1.27" shape="octagon"/>
<pad name="2" x="0" y="1.905" drill="0.8128" diameter="1.27" shape="octagon"/>
<pad name="3" x="1.27" y="0" drill="0.8128" diameter="1.27" shape="octagon"/>
<text x="2.413" y="1.651" size="1.27" layer="25" ratio="10">>NAME</text>
<text x="2.921" y="-1.27" size="1.27" layer="27" ratio="10">>VALUE</text>
</package>
</packages>
</library>
</libraries>
<attributes>
</attributes>
<variantdefs>
</variantdefs>
<classes>
<class number="0" name="default" width="0.2032" drill="0">
</class>
<class number="1" name="supply" width="0.4064" drill="0">
<clearance class="1" value="0.2032"/>
</class>
<class number="2" name="ant" width="2.1844" drill="0">
</class>
</classes>
<designrules name="PMServicesStd *">
<description language="en">
P M Services Standard based on ITEADstudio

</description>
<param name="layerSetup" value="(1*16)"/>
<param name="mtCopper" value="0.035mm 0.035mm 0.035mm 0.035mm 0.035mm 0.035mm 0.035mm 0.035mm 0.035mm 0.035mm 0.035mm 0.035mm 0.035mm 0.035mm 0.035mm 0.035mm"/>
<param name="mtIsolate" value="1.5mm 0.15mm 0.2mm 0.15mm 0.2mm 0.15mm 0.2mm 0.15mm 0.2mm 0.15mm 0.2mm 0.15mm 0.2mm 0.15mm 0.2mm"/>
<param name="mdWireWire" value="8mil"/>
<param name="mdWirePad" value="8mil"/>
<param name="mdWireVia" value="8mil"/>
<param name="mdPadPad" value="8mil"/>
<param name="mdPadVia" value="8mil"/>
<param name="mdViaVia" value="8mil"/>
<param name="mdSmdPad" value="0mil"/>
<param name="mdSmdVia" value="0mil"/>
<param name="mdSmdSmd" value="0mil"/>
<param name="mdViaViaSameLayer" value="8mil"/>
<param name="mnLayersViaInSmd" value="2"/>
<param name="mdCopperDimension" value="10mil"/>
<param name="mdDrill" value="10mil"/>
<param name="mdSmdStop" value="0mil"/>
<param name="msWidth" value="8mil"/>
<param name="msDrill" value="0.5mm"/>
<param name="msMicroVia" value="0.5mm"/>
<param name="msBlindViaRatio" value="0.5"/>
<param name="rvPadTop" value="0.25"/>
<param name="rvPadInner" value="0.25"/>
<param name="rvPadBottom" value="0.25"/>
<param name="rvViaOuter" value="0.25"/>
<param name="rvViaInner" value="0.25"/>
<param name="rvMicroViaOuter" value="0.25"/>
<param name="rvMicroViaInner" value="0.25"/>
<param name="rlMinPadTop" value="10mil"/>
<param name="rlMaxPadTop" value="20mil"/>
<param name="rlMinPadInner" value="10mil"/>
<param name="rlMaxPadInner" value="20mil"/>
<param name="rlMinPadBottom" value="10mil"/>
<param name="rlMaxPadBottom" value="20mil"/>
<param name="rlMinViaOuter" value="6mil"/>
<param name="rlMaxViaOuter" value="20mil"/>
<param name="rlMinViaInner" value="6mil"/>
<param name="rlMaxViaInner" value="20mil"/>
<param name="rlMinMicroViaOuter" value="4mil"/>
<param name="rlMaxMicroViaOuter" value="20mil"/>
<param name="rlMinMicroViaInner" value="4mil"/>
<param name="rlMaxMicroViaInner" value="20mil"/>
<param name="psTop" value="-1"/>
<param name="psBottom" value="-1"/>
<param name="psFirst" value="0"/>
<param name="psElongationLong" value="100"/>
<param name="psElongationOffset" value="100"/>
<param name="mvStopFrame" value="1"/>
<param name="mvCreamFrame" value="0"/>
<param name="mlMinStopFrame" value="2mil"/>
<param name="mlMaxStopFrame" value="2mil"/>
<param name="mlMinCreamFrame" value="0mil"/>
<param name="mlMaxCreamFrame" value="0mil"/>
<param name="mlViaStopLimit" value="100mil"/>
<param name="srRoundness" value="0"/>
<param name="srMinRoundness" value="0mil"/>
<param name="srMaxRoundness" value="0mil"/>
<param name="slThermalIsolate" value="10mil"/>
<param name="slThermalsForVias" value="0"/>
<param name="dpMaxLengthDifference" value="10mm"/>
<param name="dpGapFactor" value="2.5"/>
<param name="checkGrid" value="0"/>
<param name="checkAngle" value="0"/>
<param name="checkFont" value="1"/>
<param name="checkRestrict" value="0"/>
<param name="useDiameter" value="13"/>
<param name="maxErrors" value="50"/>
</designrules>
<autorouter>
<pass name="Default">
<param name="RoutingGrid" value="0.02mm"/>
<param name="AutoGrid" value="1"/>
<param name="Efforts" value="2"/>
<param name="TopRouterVariant" value="1"/>
<param name="tpViaShape" value="round"/>
<param name="PrefDir.1" value="a"/>
<param name="PrefDir.2" value="0"/>
<param name="PrefDir.3" value="0"/>
<param name="PrefDir.4" value="0"/>
<param name="PrefDir.5" value="0"/>
<param name="PrefDir.6" value="0"/>
<param name="PrefDir.7" value="0"/>
<param name="PrefDir.8" value="0"/>
<param name="PrefDir.9" value="0"/>
<param name="PrefDir.10" value="0"/>
<param name="PrefDir.11" value="0"/>
<param name="PrefDir.12" value="0"/>
<param name="PrefDir.13" value="0"/>
<param name="PrefDir.14" value="0"/>
<param name="PrefDir.15" value="0"/>
<param name="PrefDir.16" value="a"/>
<param name="cfVia" value="8"/>
<param name="cfNonPref" value="5"/>
<param name="cfChangeDir" value="2"/>
<param name="cfOrthStep" value="2"/>
<param name="cfDiagStep" value="3"/>
<param name="cfExtdStep" value="0"/>
<param name="cfBonusStep" value="1"/>
<param name="cfMalusStep" value="1"/>
<param name="cfPadImpact" value="4"/>
<param name="cfSmdImpact" value="4"/>
<param name="cfBusImpact" value="0"/>
<param name="cfHugging" value="3"/>
<param name="cfAvoid" value="4"/>
<param name="cfPolygon" value="10"/>
<param name="cfBase.1" value="0"/>
<param name="cfBase.2" value="1"/>
<param name="cfBase.3" value="1"/>
<param name="cfBase.4" value="1"/>
<param name="cfBase.5" value="1"/>
<param name="cfBase.6" value="1"/>
<param name="cfBase.7" value="1"/>
<param name="cfBase.8" value="1"/>
<param name="cfBase.9" value="1"/>
<param name="cfBase.10" value="1"/>
<param name="cfBase.11" value="1"/>
<param name="cfBase.12" value="1"/>
<param name="cfBase.13" value="1"/>
<param name="cfBase.14" value="1"/>
<param name="cfBase.15" value="1"/>
<param name="cfBase.16" value="0"/>
<param name="mnVias" value="20"/>
<param name="mnSegments" value="9999"/>
<param name="mnExtdSteps" value="9999"/>
<param name="mnRipupLevel" value="10"/>
<param name="mnRipupSteps" value="100"/>
<param name="mnRipupTotal" value="100"/>
</pass>
<pass name="Follow-me" refer="Default" active="yes">
</pass>
<pass name="Busses" refer="Default" active="yes">
<param name="cfNonPref" value="4"/>
<param name="cfBusImpact" value="4"/>
<param name="cfHugging" value="0"/>
<param name="mnVias" value="0"/>
</pass>
<pass name="Route" refer="Default" active="yes">
</pass>
<pass name="Optimize1" refer="Default" active="yes">
<param name="cfVia" value="99"/>
<param name="cfExtdStep" value="10"/>
<param name="cfHugging" value="1"/>
<param name="mnExtdSteps" value="1"/>
<param name="mnRipupLevel" value="0"/>
</pass>
<pass name="Optimize2" refer="Optimize1" active="yes">
<param name="cfNonPref" value="0"/>
<param name="cfChangeDir" value="6"/>
<param name="cfExtdStep" value="0"/>
<param name="cfBonusStep" value="2"/>
<param name="cfMalusStep" value="2"/>
<param name="cfPadImpact" value="2"/>
<param name="cfSmdImpact" value="2"/>
<param name="cfHugging" value="0"/>
</pass>
<pass name="Optimize3" refer="Optimize2" active="yes">
<param name="cfChangeDir" value="8"/>
<param name="cfPadImpact" value="0"/>
<param name="cfSmdImpact" value="0"/>
</pass>
<pass name="Optimize4" refer="Optimize3" active="yes">
<param name="cfChangeDir" value="25"/>
</pass>
</autorouter>
<elements>
<element name="U$2" library="logo" package="TONNE" value="" x="36.695" y="13.11711875"/>
<element name="U$1" library="ohw-logo" package="OSHW_10X200_NOTEXT" value="" x="22.294165625" y="7.13610625"/>
<element name="I2C_EXT" library="pinhead" package="2X10" value="" x="18.05" y="45.905" smashed="yes" rot="R180">
<attribute name="NAME" x="32.02" y="41.46" size="1.27" layer="25" ratio="10" rot="R180"/>
<attribute name="VALUE" x="30.75" y="50.35" size="1.27" layer="27" rot="R180"/>
</element>
<element name="TMP112" library="TMP112_2" package="TMP112" value="TMP1" x="3.81" y="35.56" smashed="yes" rot="R270">
<attribute name="NAME" x="6.543478125" y="38.88490625" size="1.27" layer="25" rot="R270"/>
</element>
<element name="U$4" library="SHT21" package="SHT21" value="SHT21" x="3.81" y="26.67" smashed="yes" rot="R270"/>
<element name="IC1" library="DS1820" package="TO-92" value="DS1820" x="3.81" y="15.24" smashed="yes" rot="R270">
<attribute name="VALUE" x="7.62" y="18.669" size="1.27" layer="27" ratio="10" rot="R270"/>
</element>
</elements>
<signals>
<signal name="VCC" class="1">
<contactref element="I2C_EXT" pad="2"/>
<contactref element="TMP112" pad="5"/>
<contactref element="U$4" pad="5"/>
<wire x1="4.635" y1="35.56" x2="7.0104" y2="35.56" width="0.4064" layer="1"/>
<wire x1="5.4864" y1="27.0256" x2="5.1816" y2="26.7208" width="0.4064" layer="1"/>
<wire x1="5.588" y1="27.0256" x2="5.4864" y2="27.0256" width="0.4064" layer="1"/>
<wire x1="20.6248" y1="42.0624" x2="10.5664" y2="32.004" width="0.4064" layer="1"/>
<wire x1="10.5664" y1="32.004" x2="5.588" y2="27.0256" width="0.4064" layer="1"/>
<wire x1="5.1816" y1="26.7208" x2="5.11" y2="26.67" width="0.4064" layer="1"/>
<wire x1="8.0264" y1="34.544" x2="7.0104" y2="35.56" width="0.4064" layer="1"/>
<wire x1="9.0424" y1="33.528" x2="8.0264" y2="34.544" width="0.4064" layer="16"/>
<wire x1="10.5664" y1="32.004" x2="9.0424" y2="33.528" width="0.4064" layer="1"/>
<via x="8.0264" y="34.544" extent="1-16" drill="0.5"/>
<via x="9.0424" y="33.528" extent="1-16" drill="0.5"/>
<contactref element="IC1" pad="3"/>
<wire x1="3.8608" y1="15.0368" x2="3.8608" y2="14.0208" width="0.4064" layer="1"/>
<wire x1="5.8928" y1="17.0688" x2="3.8608" y2="15.0368" width="0.4064" layer="1"/>
<wire x1="5.8928" y1="26.0096" x2="5.8928" y2="17.0688" width="0.4064" layer="1"/>
<wire x1="5.2832" y1="26.6192" x2="5.8928" y2="26.0096" width="0.4064" layer="1"/>
<wire x1="3.8608" y1="14.0208" x2="3.81" y2="13.97" width="0.4064" layer="1"/>
<wire x1="5.2832" y1="26.6192" x2="5.11" y2="26.67" width="0.4064" layer="1"/>
<wire x1="28.6512" y1="44.6024" x2="29.464" y2="44.6024" width="0.4064" layer="1"/>
<wire x1="26.1112" y1="42.0624" x2="28.6512" y2="44.6024" width="0.4064" layer="1"/>
<wire x1="20.6248" y1="42.0624" x2="26.1112" y2="42.0624" width="0.4064" layer="1"/>
<wire x1="29.464" y1="44.6024" x2="29.48" y2="44.635" width="0.4064" layer="1"/>
</signal>
<signal name="GND" class="1">
<polygon width="0.4064" layer="16">
<vertex x="0" y="50"/>
<vertex x="0" y="0"/>
<vertex x="50" y="0"/>
<vertex x="50" y="50"/>
</polygon>
<polygon width="0.4064" layer="1">
<vertex x="0" y="50"/>
<vertex x="0" y="0"/>
<vertex x="50" y="0"/>
<vertex x="50" y="50"/>
</polygon>
<via x="2.160921875" y="47.814996875" extent="1-16" drill="3.2"/>
<via x="47.832378125" y="47.8194875" extent="1-16" drill="3.2"/>
<via x="47.832378125" y="2.0994875" extent="1-16" drill="3.2"/>
<via x="2.112378125" y="2.0994875" extent="1-16" drill="3.2"/>
<contactref element="I2C_EXT" pad="6"/>
<contactref element="I2C_EXT" pad="10"/>
<contactref element="I2C_EXT" pad="12"/>
<contactref element="TMP112" pad="2"/>
<contactref element="TMP112" pad="4"/>
<contactref element="U$4" pad="2"/>
<contactref element="U$4" pad="P$1"/>
<contactref element="IC1" pad="1"/>
<wire x1="4.635" y1="35.06" x2="4.635" y2="33.1216" width="0.4064" layer="1"/>
<wire x1="4.635" y1="33.1216" x2="4.635" y2="33.06" width="0.4064" layer="1"/>
<wire x1="2.985" y1="35.56" x2="1.27" y2="35.56" width="0.4064" layer="1"/>
<wire x1="1.2192" y1="34.3408" x2="1.2192" y2="35.4584" width="0.4064" layer="1"/>
<wire x1="2.4384" y1="33.1216" x2="1.2192" y2="34.3408" width="0.4064" layer="1"/>
<wire x1="4.635" y1="33.1216" x2="2.4384" y2="33.1216" width="0.4064" layer="1"/>
<wire x1="1.2192" y1="35.4584" x2="1.27" y2="35.56" width="0.4064" layer="1"/>
<via x="8.89" y="40.64" extent="1-16" drill="0.5"/>
<via x="12.065" y="39.37" extent="1-16" drill="0.5"/>
<via x="13.97" y="36.83" extent="1-16" drill="0.5"/>
<via x="7.62" y="31.115" extent="1-16" drill="0.5"/>
<via x="17.78" y="33.02" extent="1-16" drill="0.5"/>
</signal>
<signal name="32KHZ">
</signal>
<signal name="NC4">
</signal>
<signal name="1HZ">
</signal>
<signal name="N$2">
</signal>
<signal name="N$106">
</signal>
<signal name="N$111">
</signal>
<signal name="N$23">
</signal>
<signal name="N$9">
</signal>
<signal name="N$10">
</signal>
<signal name="N$18">
</signal>
<signal name="N$27">
</signal>
<signal name="N$29">
</signal>
<signal name="SDA">
<contactref element="TMP112" pad="6"/>
<contactref element="U$4" pad="1"/>
<contactref element="I2C_EXT" pad="11"/>
<wire x1="4.635" y1="36.06" x2="4.635" y2="37.8968" width="0.4064" layer="1"/>
<wire x1="4.635" y1="37.8968" x2="4.635" y2="37.965" width="0.4064" layer="1"/>
<wire x1="2.54" y1="30.1752" x2="2.54" y2="27.7368" width="0.2032" layer="1"/>
<wire x1="6.604" y1="34.2392" x2="2.54" y2="30.1752" width="0.2032" layer="1"/>
<wire x1="6.604" y1="34.7472" x2="6.604" y2="34.2392" width="0.2032" layer="1"/>
<wire x1="6.604" y1="36.3728" x2="6.604" y2="34.7472" width="0.2032" layer="16"/>
<wire x1="5.08" y1="37.8968" x2="6.604" y2="36.3728" width="0.2032" layer="1"/>
<wire x1="4.635" y1="37.8968" x2="5.08" y2="37.8968" width="0.2032" layer="1"/>
<wire x1="2.54" y1="27.7368" x2="2.51" y2="27.67" width="0.2032" layer="1"/>
<wire x1="6.604" y1="36.4744" x2="7.62" y2="36.4744" width="0.2032" layer="1"/>
<wire x1="6.604" y1="36.4744" x2="6.604" y2="36.3728" width="0.2032" layer="1"/>
<via x="6.604" y="34.7472" extent="1-16" drill="0.5"/>
<via x="6.604" y="36.3728" extent="1-16" drill="0.5"/>
<wire x1="16.764" y1="46.228" x2="16.764" y2="47.1424" width="0.2032" layer="1"/>
<wire x1="15.3416" y1="44.8056" x2="16.764" y2="46.228" width="0.2032" layer="1"/>
<wire x1="15.3416" y1="44.196" x2="15.3416" y2="44.8056" width="0.2032" layer="1"/>
<wire x1="7.62" y1="36.4744" x2="15.3416" y2="44.196" width="0.2032" layer="1"/>
<wire x1="16.764" y1="47.1424" x2="16.78" y2="47.175" width="0.2032" layer="1"/>
</signal>
<signal name="SCL">
<contactref element="TMP112" pad="1"/>
<contactref element="U$4" pad="6"/>
<contactref element="I2C_EXT" pad="9"/>
<wire x1="2.985" y1="36.06" x2="2.985" y2="37.965" width="0.4064" layer="1"/>
<wire x1="5.1816" y1="30.6832" x2="5.1816" y2="27.7368" width="0.2032" layer="1"/>
<wire x1="5.1816" y1="27.7368" x2="5.11" y2="27.67" width="0.2032" layer="1"/>
<wire x1="3.8608" y1="37.9984" x2="3.1496" y2="37.9984" width="0.2032" layer="1"/>
<wire x1="3.1496" y1="37.9984" x2="2.985" y2="37.965" width="0.2032" layer="1"/>
<wire x1="9.3472" y1="43.4848" x2="3.8608" y2="37.9984" width="0.2032" layer="1"/>
<wire x1="12.0904" y1="43.4848" x2="9.3472" y2="43.4848" width="0.2032" layer="1"/>
<wire x1="13.1064" y1="44.5008" x2="12.0904" y2="43.4848" width="0.2032" layer="1"/>
<wire x1="13.1064" y1="45.1104" x2="13.1064" y2="44.5008" width="0.2032" layer="1"/>
<wire x1="14.0208" y1="46.0248" x2="13.1064" y2="45.1104" width="0.2032" layer="1"/>
<wire x1="14.6304" y1="46.0248" x2="14.0208" y2="46.0248" width="0.2032" layer="1"/>
<wire x1="15.6464" y1="47.0408" x2="14.6304" y2="46.0248" width="0.2032" layer="1"/>
<wire x1="15.6464" y1="47.6504" x2="15.6464" y2="47.0408" width="0.2032" layer="1"/>
<wire x1="16.256" y1="48.26" x2="15.6464" y2="47.6504" width="0.2032" layer="1"/>
<wire x1="18.288" y1="48.26" x2="16.256" y2="48.26" width="0.2032" layer="1"/>
<wire x1="19.304" y1="47.244" x2="18.288" y2="48.26" width="0.2032" layer="1"/>
<wire x1="19.304" y1="47.244" x2="19.32" y2="47.175" width="0.2032" layer="1"/>
<wire x1="18.1864" y1="43.688" x2="5.1816" y2="30.6832" width="0.2032" layer="1"/>
<wire x1="18.1864" y1="46.0248" x2="18.1864" y2="43.688" width="0.2032" layer="1"/>
<wire x1="19.304" y1="47.1424" x2="18.1864" y2="46.0248" width="0.2032" layer="1"/>
<wire x1="19.304" y1="47.1424" x2="19.32" y2="47.175" width="0.2032" layer="1"/>
</signal>
<signal name="DQ">
<contactref element="I2C_EXT" pad="17"/>
<contactref element="IC1" pad="2"/>
<wire x1="5.7912" y1="16.1544" x2="5.7912" y2="15.24" width="0.2032" layer="1"/>
<wire x1="30.5816" y1="40.9448" x2="5.7912" y2="16.1544" width="0.2032" layer="1"/>
<wire x1="5.7912" y1="15.24" x2="5.715" y2="15.24" width="0.2032" layer="1"/>
<wire x1="10.16" y1="47.244" x2="9.2456" y2="47.244" width="0.2032" layer="1"/>
<wire x1="11.5824" y1="48.6664" x2="10.16" y2="47.244" width="0.2032" layer="1"/>
<wire x1="24.4856" y1="48.6664" x2="11.5824" y2="48.6664" width="0.2032" layer="1"/>
<wire x1="25.8064" y1="47.3456" x2="24.4856" y2="48.6664" width="0.2032" layer="1"/>
<wire x1="25.8064" y1="46.736" x2="25.8064" y2="47.3456" width="0.2032" layer="1"/>
<wire x1="26.8224" y1="45.72" x2="25.8064" y2="46.736" width="0.2032" layer="1"/>
<wire x1="29.972" y1="45.72" x2="26.8224" y2="45.72" width="0.2032" layer="1"/>
<wire x1="30.5816" y1="45.1104" x2="29.972" y2="45.72" width="0.2032" layer="1"/>
<wire x1="30.5816" y1="40.9448" x2="30.5816" y2="45.1104" width="0.2032" layer="1"/>
<wire x1="9.2456" y1="47.244" x2="9.16" y2="47.175" width="0.2032" layer="1"/>
</signal>
</signals>
<errors>
<approved hash="3,1,65fd8a1b8a1b65fd"/>
<approved hash="3,1,6ffd0a1b0d846862"/>
<approved hash="3,1,e2038de58c82e364"/>
<approved hash="18,29,48358d1c3fe87e9e"/>
<approved hash="18,29,c31e9e9f9e9ec31f"/>
<approved hash="18,29,b09f079e0798b099"/>
<approved hash="18,29,399af51bf51b399a"/>
<approved hash="18,29,9a22c5a1c5a29a21"/>
<approved hash="18,29,d7a05ea35ebcd7bf"/>
<approved hash="18,29,60beac3dac3e60bd"/>
<approved hash="18,29,222bcd37efdc5632"/>
<approved hash="18,29,f7f9e6844a5b0dd4"/>
<approved hash="18,29,a2344e29304213ad"/>
<approved hash="18,29,74e6669a01c5dc4b"/>
<approved hash="18,29,b850b34aad5c6250"/>
<approved hash="18,29,d7e5cead6f71b8c8"/>
<approved hash="18,29,0a37ed21cec9e72e"/>
<approved hash="19,1,dd5334ea34eddd54"/>
<approved hash="19,1,8a14efadefaf8a16"/>
<approved hash="19,1,222187b087b22223"/>
<approved hash="19,1,dcf93504351bdce6"/>
<approved hash="19,1,8880e939e93b8882"/>
<approved hash="5,1,dc24fc9cd580a4b2"/>
<approved hash="19,1,50c0b17fb17850c7"/>
<approved hash="19,1,fd876438643afd85"/>
<approved hash="19,1,a5b20c2d0c2fa5b0"/>
<approved hash="19,1,506eb195b18a5071"/>
<approved hash="19,1,fc1365ac65aefc11"/>
<approved hash="5,1,38ee10718f9cef5b"/>
<approved hash="19,1,3f7fc35dc35c3f7e"/>
<approved hash="19,1,b6fb0935e93456fa"/>
<approved hash="19,1,687515471c496971"/>
<approved hash="19,1,6605d12332258505"/>
<approved hash="19,1,2c51b07910a89c5c"/>
<approved hash="19,1,0405080f39ded430"/>
<approved hash="19,1,fb6843cd46b7f67e"/>
<approved hash="19,1,7f38fa8581f36432"/>
<approved hash="19,1,a7e3137572a2f4bc"/>
<approved hash="19,1,60a0626e16617693"/>
<approved hash="19,1,687fee36e637607e"/>
<approved hash="19,1,1404f3fcebfd0c05"/>
<approved hash="19,1,26d625e5cdf3c6df"/>
<approved hash="19,1,8fdb87d1503cd4a3"/>
<approved hash="19,1,9e7736a239ad6172"/>
<approved hash="19,1,41def859c02c61eb"/>
<approved hash="19,1,194a2eca0fcf0049"/>
<approved hash="19,1,178f1cfccc214216"/>
<approved hash="19,1,445e1fff3ffd645c"/>
<approved hash="19,1,c4569c208422dc54"/>
<approved hash="19,1,620ace6fee1a4a3b"/>
<approved hash="5,1,c3eb80b9e19ce568"/>
<approved hash="19,1,699f6ff84ffa499d"/>
<approved hash="19,1,c28bf9a501a73a89"/>
<approved hash="19,1,60dca877806648d1"/>
<approved hash="19,1,75f543ab57957df3"/>
<approved hash="19,1,a6a546ae578e1561"/>
<approved hash="19,1,3d993176a6522b39"/>
<approved hash="19,1,a2f4a3e1c1ad82f0"/>
<approved hash="19,1,06e9d01b3c4b1a9a"/>
<approved hash="19,1,db13c5e699143ad1"/>
<approved hash="19,1,c0095634f263445a"/>
<approved hash="19,1,046ce787d21b6a34"/>
<approved hash="19,1,6e8af2b5fd8d6192"/>
<approved hash="19,1,a86a51235c35ad90"/>
<approved hash="19,1,8325e6bae6b4832b"/>
<approved hash="19,1,28eb8974897728e8"/>
<approved hash="19,1,d0fd31023104d0fb"/>
<approved hash="19,1,82b3e6c8e6ce82b5"/>
<approved hash="19,1,2f578ae88aeb2f54"/>
<approved hash="19,1,f7794b558d1a2902"/>
<approved hash="19,1,124b8f2fb72f2a4b"/>
<approved hash="19,1,90ad1dd33dd3b0ad"/>
<approved hash="19,1,b00e30e608e4880c"/>
<approved hash="19,1,3ce0a4a687a31fe3"/>
<approved hash="19,1,61f78b6faa7258f0"/>
<approved hash="19,1,8da24e9c62cc8e76"/>
<approved hash="19,1,43a4f6b92295a7c4"/>
<approved hash="19,1,b90635b73ea0b23d"/>
<approved hash="19,1,65ccd685c38c58d9"/>
<approved hash="4,16,88664789aabaf46d"/>
<approved hash="4,16,21de6d3f7a3ca515"/>
<approved hash="5,16,31b74693f9b7aeaa"/>
<approved hash="5,16,c93ee743e34e7635"/>
</errors>
</board>
</drawing>
</eagle>

extension: brd


text:
/*
Copyright 2018 The Knative Authors

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/

package utils

import (
	"fmt"
	"strings"
	"testing"

	"k8s.io/apimachinery/pkg/types"

	corev1 "k8s.io/api/core/v1"
	metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
	"k8s.io/apimachinery/pkg/runtime/schema"
	v1 "knative.dev/eventing/pkg/apis/eventing/v1"
)

func TestGenerateFixedName(t *testing.T) {
	testCases := map[string]struct {
		uid      string
		prefix   string
		expected string
	}{
		"standard": {
			uid:      "2d6c09e1-aa54-11e9-9d6a-42010a8a0062",
			prefix:   "default-text-extractor",
			expected: "default-text-extractor-2d6c09e1-aa54-11e9-9d6a-42010a8a0062",
		},
		"too long": {
			uid:      "2d6c09e1-aa54-11e9-9d6a-42010a8a0062",
			prefix:   "this-is-an-extremely-long-prefix-which-will-make-the-generated-name-too-long-",
			expected: "this-is-an-extremely-long--2d6c09e1-aa54-11e9-9d6a-42010a8a0062",
		},
		"uid starts with dash": {
			uid:      "-2d6c09e1-aa54-11e9-9d6a-42010a8a0062",
			prefix:   "this-is-an-extremely-long-prefix-which-will-make-the-generated-name-too-long-",
			expected: "this-is-an-extremely-long--2d6c09e1-aa54-11e9-9d6a-42010a8a0062",
		},
		"prefix ends with dash": {
			uid:      "2d6c09e1-aa54-11e9-9d6a-42010a8a0062",
			prefix:   "default-text-extractor-",
			expected: "default-text-extractor-2d6c09e1-aa54-11e9-9d6a-42010a8a0062",
		},
		"dot in prefix": {
			uid:      "2d6c09e1-aa54-11e9-9d6a-42010a8a0062",
			prefix:   "default-text-extractor.",
			expected: "default-text-extractor-2d6c09e1-aa54-11e9-9d6a-42010a8a0062",
		},
		"too long and dot in prefix": {
			uid:      "2d6c09e1-aa54-11e9-9d6a-42010a8a0062",
			prefix:   "this-is-an-extremely-long.prefix-and-it-will-be-cut-at-the-dot",
			expected: "this-is-an-extremely-long-2d6c09e1-aa54-11e9-9d6a-42010a8a0062",
		},
	}
	for n, tc := range testCases {
		t.Run(n, func(t *testing.T) {
			owner := &v1.Broker{
				ObjectMeta: metav1.ObjectMeta{
					UID: types.UID(tc.uid),
				},
			}
			if actual := GenerateFixedName(owner, tc.prefix); actual != tc.expected {
				t.Errorf("Expected %q, actual %q", tc.expected, actual)
			}
		})
	}
}

func TestObjectRef(t *testing.T) {
	testCases := map[string]struct {
		obj metav1.Object
		gvk schema.GroupVersionKind
	}{
		"Service": {
			obj: &corev1.Service{
				ObjectMeta: metav1.ObjectMeta{
					Namespace: "my-ns",
					Name:      "my-name",
				},
			},
			gvk: schema.GroupVersionKind{
				Group:   "",
				Version: "v1",
				Kind:    "Service",
			},
		},
		"Broker": {
			obj: &v1.Broker{
				ObjectMeta: metav1.ObjectMeta{
					Namespace: "broker-ns",
					Name:      "my-broker",
				},
			},
			gvk: schema.GroupVersionKind{
				Group:   "eventing.knative.dev",
				Version: "v1",
				Kind:    "Broker",
			},
		},
	}
	for n, tc := range testCases {
		t.Run(n, func(t *testing.T) {
			or := ObjectRef(tc.obj, tc.gvk)

			expectedApiVersion := fmt.Sprintf("%s/%s", tc.gvk.Group, tc.gvk.Version)
			// Special case for v1.
			if tc.gvk.Group == "" {
				expectedApiVersion = tc.gvk.Version
			}

			if api, _ := tc.gvk.ToAPIVersionAndKind(); api != expectedApiVersion {
				t.Errorf("Expected APIVersion %q, actually %q", expectedApiVersion, api)
			}
			if kind := or.Kind; kind != tc.gvk.Kind {
				t.Errorf("Expected kind %q, actually %q", tc.gvk.Kind, kind)
			}
			if ns := or.Namespace; ns != tc.obj.GetNamespace() {
				t.Errorf("Expected namespace %q, actually %q", tc.obj.GetNamespace(), ns)
			}
			if n := or.Name; n != tc.obj.GetName() {
				t.Errorf("Expected name %q, actually %q", tc.obj.GetName(), n)
			}
		})
	}
}

func TestToDNS1123Subdomain(t *testing.T) {
	testCases := map[string]struct {
		name     string
		expected string
	}{
		"short": {
			name:     "abc",
			expected: "abc",
		},
		"too long": {
			name:     strings.Repeat("a", 300),
			expected: strings.Repeat("a", 243),
		},
		"surrounded by dashes": {
			name:     "-foo-",
			expected: "foo",
		},
		"illegal characters": {
			name:     "a$b",
			expected: "ab",
		},
	}
	for n, tc := range testCases {
		t.Run(n, func(t *testing.T) {
			a := ToDNS1123Subdomain(tc.name)
			if a != tc.expected {
				t.Errorf("Expected %q, actually %q", tc.expected, a)
			}
		})
	}
}

repository: knative/eventing

repo_name: knative/eventing

gha_language: Go


text:
package streamseeder

import "github.com/Fantom-foundation/lachesis-base/utils/cachescale"

type Config struct {
	SenderThreads           int
	MaxSenderTasks          int
	MaxPendingResponsesSize int32
	MaxResponseChunks       uint32
}

func DefaultConfig(scale cachescale.Func) Config {
	return Config{
		SenderThreads:           8,
		MaxPendingResponsesSize: scale.I32(64 * 1024 * 1024),
		MaxSenderTasks:          128,
		MaxResponseChunks:       12,
	}
}