text:
package yaorm

import (
	"fmt"
	"os"
	"reflect"
	"strings"
	"sync"

	"github.com/geoffreybauduin/yaorm/_vendor/github.com/loopfz/gadgeto/zesty/utils/rekordo"
	"github.com/geoffreybauduin/yaorm/tools"
	"github.com/geoffreybauduin/yaorm/yaormfilter"
	"github.com/juju/errors"
)

var (
	// ErrTableEmpty is returned when a registered model has no exported fields
	ErrTableEmpty = errors.Errorf("Table is empty")
	// ErrTableNotFound is returned when a table cannot be found
	ErrTableNotFound = errors.NotFoundf("Table")
	// ErrDbNotFound is returned when a database cannot be found
	ErrDbNotFound = errors.NotFoundf("Database")
	tables        map[string]map[string]*Table
	tableByType   map[reflect.Type]*Table
	tableMutex    sync.RWMutex
)

func init() {
	tables = map[string]map[string]*Table{}
	tableByType = map[reflect.Type]*Table{}
}

// Table is the type hosting all the table characteristics
type Table struct {
	name                string
	dbname              string
	model               Model
	reflectedType       reflect.Type
	fields              []string
	tm                  *rekordo.TableModel
	filter              yaormfilter.Filter
	keys                []string
	fieldsByDbKey       map[string]int
	filterFieldsByDbKey map[string]int
	schema              string
}

// NewTable registers a new table
func NewTable(dbName, tableName string, model Model) *Table {
	table := &Table{
		name:                tableName,
		dbname:              dbName,
		model:               model,
		reflectedType:       reflect.TypeOf(model).Elem(),
		fieldsByDbKey:       map[string]int{},
		filterFieldsByDbKey: map[string]int{},
		keys:                []string{},
		schema:              "",
	}
	err := table.retrieveFields()
	if err != nil {
		fmt.Fprintf(os.Stderr, "%s\n", err.Error())
	}
	table.tm = rekordo.RegisterTableModel(dbName, tableName, tools.GetNonPtrInterface(model))
	tableMutex.Lock()
	defer tableMutex.Unlock()
	if _, ok := tables[dbName]; !ok {
		tables[dbName] = map[string]*Table{}
	}
	tables[dbName][tableName] = table
	tableByType[reflect.TypeOf(model).Elem()] = table
	return table
}

// GetTable returns the table matching the parameters
func GetTable(dbName, tableName string) (*Table, error) {
	if _, ok := tables[dbName]; !ok {
		return nil, ErrDbNotFound
	}
	if _, ok := tables[dbName][tableName]; !ok {
		return nil, ErrTableNotFound
	}
	return tables[dbName][tableName], nil
}

// GetTableByModel returns the table registered for this model
func GetTableByModel(m Model) (*Table, error) {
	table, ok := tableByType[reflect.TypeOf(m).Elem()]
	if !ok {
		return nil, ErrTableNotFound
	}
	return table, nil
}

// GetTableByFilter returns the table using this filter
func GetTableByFilter(f yaormfilter.Filter) (*Table, error) {
	table, ok := tableByType[reflect.TypeOf(f).Elem()]
	if !ok {
		return nil, ErrTableNotFound
	}
	return table, nil
}

func (t *Table) retrieveFields() error {
	fields := []string{}
	st := reflect.TypeOf(reflect.ValueOf(t.model).Elem().Interface())
	for i := 0; i < st.NumField(); i++ {
		field := st.Field(i)
		dbFieldData, ok := field.Tag.Lookup("db")
		if !ok || dbFieldData == "-" {
			continue
		}
		tagData := strings.Split(dbFieldData, ",")
		fields = append(fields, tagData[0])
		t.fieldsByDbKey[tagData[0]] = i
		if tagData[0] == "id" {
			t.keys = []string{"id"}
		}
	}
	t.fields = fields
	if len(fields) == 0 {
		return ErrTableEmpty
	}
	return nil
}

func (t *Table) retrieveFilterFields() {
	t.filterFieldsByDbKey = map[string]int{}
	st := reflect.TypeOf(reflect.ValueOf(t.filter).Elem().Interface())
	for i := 0; i < st.NumField(); i++ {
		field := st.Field(i)
		dbFieldData, ok := field.Tag.Lookup("filter")
		if !ok || dbFieldData == "-" {
			continue
		}
		tagData := strings.Split(dbFieldData, ",")
		t.filterFieldsByDbKey[tagData[0]] = i
	}
}

func (t *Table) WithKeys(keys []string) *Table {
	t.keys = keys
	t.tm = t.tm.WithKeys(keys)
	return t
}

func (t *Table) WithSchema(schema string) *Table {
	t.schema = schema
	t.tm = t.tm.WithSchema(schema)
	return t
}

func (t *Table) WithFilter(f yaormfilter.Filter) *Table {
	if t.filter != nil {
		delete(tableByType, reflect.TypeOf(t.filter).Elem())
	}
	t.filter = f
	tableByType[reflect.TypeOf(t.filter).Elem()] = t
	t.retrieveFilterFields()
	return t
}

func (t *Table) WithAutoIncrement(v bool) *Table {
	t.tm = t.tm.WithAutoIncrement(v)
	return t
}

func (t *Table) WithSubqueryloading(fn SubqueryloadFunc, mapperField string) *Table {
	key := t.Name()
	if mapperField != "id" {
		key = fmt.Sprintf("%s_per_%s", key, mapperField)
	}
	subqueryloaders[key] = subqueryloader{
		fn:          fn,
		mapperField: mapperField,
	}
	return t
}

func (t Table) Fields() []string {
	return t.fields
}

func (t Table) Name() string {
	return t.name
}

func (t Table) Keys() []string {
	return t.keys
}

func (t Table) KeyFields() map[string]int {
	m := map[string]int{}
	for _, key := range t.Keys() {
		m[key] = t.fieldsByDbKey[key]
	}
	return m
}

func (t Table) FieldIndex(field string) int {
	idx, ok := t.fieldsByDbKey[field]
	if !ok {
		return -1
	}
	return idx
}

func (t Table) FieldsWithoutPK() []string {
	keys := t.KeyFields()
	fields := make([]string, 0)
	for _, f := range t.Fields() {
		if _, ok := keys[f]; ok {
			continue
		}
		fields = append(fields, f)
	}
	return fields
}

func (t Table) FilterFieldIndex(field string) int {
	idx, ok := t.filterFieldsByDbKey[field]
	if !ok {
		return -1
	}
	return idx
}

func (t Table) NewFilter() (yaormfilter.Filter, error) {
	f, ok := reflect.New(reflect.TypeOf(t.filter).Elem()).Interface().(yaormfilter.Filter)
	if !ok {
		return nil, errors.Errorf("Invalid filter format stored inside the Table instance")
	}
	return f, nil
}

func (t Table) NewModel() (Model, error) {
	m, ok := reflect.New(reflect.TypeOf(t.model).Elem()).Interface().(Model)
	if !ok {
		return nil, errors.Errorf("Invalid model format stored inside the Table instance")
	}
	return m, nil
}

func (t Table) NewSlice() (interface{}, error) {
	m, err := t.NewModel()
	if err != nil {
		return nil, err
	}
	sliceType := reflect.SliceOf(reflect.ValueOf(m).Type())
	slice := reflect.MakeSlice(sliceType, 1, 1)
	return slice.Interface(), nil
}

func (t Table) NewSlicePtr() (interface{}, error) {
	m, err := t.NewModel()
	if err != nil {
		return nil, err
	}
	sliceType := reflect.SliceOf(reflect.ValueOf(m).Type())
	slice := reflect.MakeSlice(sliceType, 1, 1)
	return reflect.New(slice.Type()).Interface(), nil
}

// NameForQuery returns the name that should be used for SQL queries
func (t Table) NameForQuery(dbp DBProvider) string {
	return dbp.getDialect().QuotedTableForQuery(t.schema, t.Name())
}


text:
require File.expand_path(File.join(File.dirname(__FILE__), "..", "transport", "json"))
require File.join(File.dirname(__FILE__), "configuration")
require File.join(File.dirname(__FILE__), "base")
require File.join(File.dirname(__FILE__), "view")
require 'yaml'

module CouchModel

  # The Design class acts as a wrapper for CouchDB design documents.
  class Design

    attr_reader   :database
    attr_reader   :model_class
    attr_accessor :id
    attr_reader   :rev
    attr_accessor :language
    attr_reader   :views

    def initialize(database, model_class, attributes = { })
      @database     = database
      @model_class  = model_class
      @language     = "javascript"
      @views        = [ ]

      load_file
      self.id       = attributes[:id]       if attributes.has_key?(:id)
      self.language = attributes[:language] if attributes.has_key?(:language)
      self.views    = attributes[:views]    if attributes.has_key?(:views)
    end

    def filename
      @filename ||= File.join(CouchModel::Configuration.design_directory, "#{@model_class.to_s.underscore}.design")
    end

    def load_file
      hash = YAML::load_file self.filename
      self.class.symbolize_hash_keys hash
      self.id, self.language, self.views = hash.values_at(:id, :language, :views)
      true
    rescue Errno::ENOENT
      false
    end

    def views=(view_hash)
      @views = [ ]
      view_hash.each do |view_name, view|
        @views << View.new(self, view.merge(:name => view_name.to_s)) if view.is_a?(Hash)
      end if view_hash.is_a?(Hash)
    end

    def generate_view(name, options = { })
      view = View.new self, options.merge(:name => name.to_s)
      @views.insert 0, view
      view
    end

    def to_hash
      rev = self.rev
      hash = {
        "_id"       => "_design/#{self.id}",
        "language"  => self.language,
        "views"     => { }
      }
      hash.merge! "_rev" => rev if rev
      @views.each { |view| hash["views"].merge! view.to_hash }
      hash
    end

    def exists?
      Transport::JSON.request :get, self.url, :expected_status_code => 200
      true
    rescue Transport::JSON::UnexpectedStatusCodeError
      false
    end

    def push
      url = self.url
      evaluate Transport::JSON.request(:get, url)

      Transport::JSON.request :put, url, :body => self.to_hash, :expected_status_code => 201
      true
    end

    def url
      "#{@database.url}/_design/#{self.id}"
    end

    private

    attr_writer :rev

    def evaluate(response)
      self.rev = response["_rev"] if response.has_key?("_rev")
    end

    def self.symbolize_hash_keys(hash)
      hash.keys.each do |key|
        value = hash.delete key
        symbolize_hash_keys value if value.is_a?(Hash)
        hash[(key.to_sym rescue key) || key] = value
      end
    end

  end

end

redpajama_set_name: RedPajamaGithub


text:
package de.uni_hildesheim.sse.smell.test.util;

import org.junit.Assert;
import org.junit.Test;

import de.uni_hildesheim.sse.smell.util.ConditionUtils;
import de.uni_hildesheim.sse.smell.util.ConstraintException;
import net.ssehub.easy.varModel.cst.ConstraintSyntaxTree;
import net.ssehub.easy.varModel.cst.OCLFeatureCall;
import net.ssehub.easy.varModel.cst.Variable;
import net.ssehub.easy.varModel.model.DecisionVariableDeclaration;
import net.ssehub.easy.varModel.model.datatypes.BooleanType;
import net.ssehub.easy.varModel.model.datatypes.OclKeyWords;

public class ConditionUtilsTest {

    @Test
    public void testParseCStringSimpleVariable() throws ConstraintException {
        String formula = "SOME_varIable";

        ConstraintSyntaxTree tree = ConditionUtils.parseCString(formula);

        checkVariable(tree, "SOME_varIable");
    }

    @Test
    public void testParseCStringSimpleOr() throws ConstraintException {
        String formula = "A || B";

        ConstraintSyntaxTree tree = ConditionUtils.parseCString(formula);

        OCLFeatureCall call = checkOclFeatureCall(tree, OclKeyWords.OR);
        checkVariable(call.getOperand(), "A");
        checkVariable(call.getParameter(0), "B");
    }

    @Test
    public void testParseCStringSimpleAnd() throws ConstraintException {
        String formula = "A && B";

        ConstraintSyntaxTree tree = ConditionUtils.parseCString(formula);

        OCLFeatureCall call = checkOclFeatureCall(tree, OclKeyWords.AND);
        checkVariable(call.getOperand(), "A");
        checkVariable(call.getParameter(0), "B");
    }

    @Test
    public void testParseCStringNestedNotInOr() throws ConstraintException {
        String formula = "A || !B";

        ConstraintSyntaxTree tree = ConditionUtils.parseCString(formula);

        OCLFeatureCall call = checkOclFeatureCall(tree, OclKeyWords.OR);
        checkVariable(call.getOperand(), "A");

        OCLFeatureCall notCall = checkOclFeatureCall(call.getParameter(0), OclKeyWords.NOT);
        checkVariable(notCall.getOperand(), "B");
    }

    @Test
    public void testParseCStringNestedNotInAnd() throws ConstraintException {
        String formula = "!A && B";

        ConstraintSyntaxTree tree = ConditionUtils.parseCString(formula);

        OCLFeatureCall call = checkOclFeatureCall(tree, OclKeyWords.AND);
        checkVariable(call.getParameter(0), "B");

        OCLFeatureCall notCall = checkOclFeatureCall(call.getOperand(), OclKeyWords.NOT);
        checkVariable(notCall.getOperand(), "A");
    }

    @Test
    public void testParseCStringParenthesis1() throws ConstraintException {
        String formula = "(!(A) && (B))";

        ConstraintSyntaxTree tree = ConditionUtils.parseCString(formula);

        OCLFeatureCall call = checkOclFeatureCall(tree, OclKeyWords.AND);
        checkVariable(call.getParameter(0), "B");

        OCLFeatureCall notCall = checkOclFeatureCall(call.getOperand(), OclKeyWords.NOT);
        checkVariable(notCall.getOperand(), "A");
    }

    @Test
    public void testParseCStringParenthesis2() throws ConstraintException {
        String formula = "(A || !(B))";

        ConstraintSyntaxTree tree = ConditionUtils.parseCString(formula);

        OCLFeatureCall call = checkOclFeatureCall(tree, OclKeyWords.OR);
        checkVariable(call.getOperand(), "A");

        OCLFeatureCall notCall = checkOclFeatureCall(call.getParameter(0), OclKeyWords.NOT);
        checkVariable(notCall.getOperand(), "B");
    }

    @Test
    public void testParseCStringComplex() throws ConstraintException {
        String formula = "A || !(B && ((C || !D) || (E && A)))";

        ConstraintSyntaxTree tree = ConditionUtils.parseCString(formula);

        OCLFeatureCall firstOr = checkOclFeatureCall(tree, OclKeyWords.OR);
        checkVariable(firstOr.getOperand(), "A");
        OCLFeatureCall leftNot = checkOclFeatureCall(firstOr.getParameter(0), OclKeyWords.NOT);

        OCLFeatureCall outerAnd = checkOclFeatureCall(leftNot.getOperand(), OclKeyWords.AND);
        checkVariable(outerAnd.getOperand(), "B");

        OCLFeatureCall secondOr = checkOclFeatureCall(outerAnd.getParameter(0), OclKeyWords.OR);

        OCLFeatureCall leftOr = checkOclFeatureCall(secondOr.getOperand(), OclKeyWords.OR);
        checkVariable(leftOr.getOperand(), "C");
        OCLFeatureCall rightNot = checkOclFeatureCall(leftOr.getParameter(0), OclKeyWords.NOT);
        checkVariable(rightNot.getOperand(), "D");

        OCLFeatureCall innerAnd = checkOclFeatureCall(secondOr.getParameter(0), OclKeyWords.AND);
        checkVariable(innerAnd.getOperand(), "E");
        checkVariable(innerAnd.getParameter(0), "A");
    }

    private static void checkVariable(ConstraintSyntaxTree tree, String expectedName) {
        Assert.assertTrue(tree instanceof Variable);
        Variable var = (Variable) tree;
        Assert.assertEquals(expectedName, var.getVariable().getName());
    }

    private static OCLFeatureCall checkOclFeatureCall(ConstraintSyntaxTree tree, String expectedOperation) {
        Assert.assertTrue(tree instanceof OCLFeatureCall);
        OCLFeatureCall call = (OCLFeatureCall) tree;
        Assert.assertEquals(expectedOperation, call.getOperation());
        return call;
    }

    @Test
    public void testToCStringSimpleVariable() throws ConstraintException {
        Variable a = new Variable(new DecisionVariableDeclaration("A", BooleanType.TYPE, null));

        ConstraintSyntaxTree tree = a;

        String result = ConditionUtils.toCString(tree);

        Assert.assertEquals("A", result);
    }

    @Test
    public void testToCStringSimpleOr() throws ConstraintException {
        Variable a = new Variable(new DecisionVariableDeclaration("A", BooleanType.TYPE, null));
        Variable b = new Variable(new DecisionVariableDeclaration("B", BooleanType.TYPE, null));

        ConstraintSyntaxTree tree = new OCLFeatureCall(a, OclKeyWords.OR, b);

        String result = ConditionUtils.toCString(tree);

        Assert.assertEquals("A || B", result);
    }

    @Test
    public void testToCStringSimpleAnd() throws ConstraintException {
        Variable a = new Variable(new DecisionVariableDeclaration("A", BooleanType.TYPE, null));
        Variable b = new Variable(new DecisionVariableDeclaration("B", BooleanType.TYPE, null));

        ConstraintSyntaxTree tree = new OCLFeatureCall(a, OclKeyWords.AND, b);

        String result = ConditionUtils.toCString(tree);

        Assert.assertEquals("A && B", result);
    }

    @Test
    public void testToCStringNotInOr() throws ConstraintException {
        Variable a = new Variable(new DecisionVariableDeclaration("A", BooleanType.TYPE, null));
        Variable b = new Variable(new DecisionVariableDeclaration("B", BooleanType.TYPE, null));

        ConstraintSyntaxTree tree = new OCLFeatureCall(a, OclKeyWords.OR,
                new OCLFeatureCall(b, OclKeyWords.NOT));

        String result = ConditionUtils.toCString(tree);

        Assert.assertEquals("A || !B", result);
    }

    @Test
    public void testToCStringNotInAnd() throws ConstraintException {
        Variable a = new Variable(new DecisionVariableDeclaration("A", BooleanType.TYPE, null));
        Variable b = new Variable(new DecisionVariableDeclaration("B", BooleanType.TYPE, null));

        ConstraintSyntaxTree tree = new OCLFeatureCall(new OCLFeatureCall(a, OclKeyWords.NOT),
                OclKeyWords.AND, b);

        String result = ConditionUtils.toCString(tree);

        Assert.assertEquals("!A && B", result);
    }

    @Test
    public void testToCStringParenthesis() throws ConstraintException {
        Variable a = new Variable(new DecisionVariableDeclaration("A", BooleanType.TYPE, null));
        Variable b = new Variable(new DecisionVariableDeclaration("B", BooleanType.TYPE, null));
        Variable c = new Variable(new DecisionVariableDeclaration("C", BooleanType.TYPE, null));

        ConstraintSyntaxTree tree = new OCLFeatureCall(new OCLFeatureCall(a, OclKeyWords.OR, c),
                OclKeyWords.AND, b);

        String result = ConditionUtils.toCString(tree);

        Assert.assertEquals("(A || C) && B", result);
    }

    @Test
    public void testToCStringComplex() throws ConstraintException {
        Variable a = new Variable(new DecisionVariableDeclaration("A", BooleanType.TYPE, null));
        Variable b = new Variable(new DecisionVariableDeclaration("B", BooleanType.TYPE, null));
        Variable c = new Variable(new DecisionVariableDeclaration("C", BooleanType.TYPE, null));
        Variable d = new Variable(new DecisionVariableDeclaration("D", BooleanType.TYPE, null));
        Variable e = new Variable(new DecisionVariableDeclaration("E", BooleanType.TYPE, null));

        ConstraintSyntaxTree tree =
            new OCLFeatureCall(
                a,
            OclKeyWords.OR,
                new OCLFeatureCall(
                    new OCLFeatureCall(
                        b,
                    OclKeyWords.AND,
                        new OCLFeatureCall(
                            new OCLFeatureCall(
                                c,
                            OclKeyWords.OR,
                                new OCLFeatureCall(
                                    d,
                                OclKeyWords.NOT)
                            ),
                        OclKeyWords.OR,
                            new OCLFeatureCall(
                                e,
                            OclKeyWords.AND,
                                a)
                        )
                    ),
                OclKeyWords.NOT
                )
            );

        String result = ConditionUtils.toCString(tree);

        Assert.assertEquals("A || !(B && ((C || !D) || (E && A)))", result);
    }

}


text:
package javax.xml.ws.spi.http;

import javax.xml.ws.Endpoint;
import java.util.Set;

/**
 * HttpContext represents a mapping between the root URI path of a web
 * service to a {@link HttpHandler} which is invoked to handle requests
 * destined for that path on the associated container.
 *

 * Container provides the implementation for this and it matches
 * web service requests to corresponding HttpContext objects.
 *
 * @author Jitendra Kotamraju
 * @since JAX-WS 2.2
 */
public abstract class HttpContext {

    protected HttpHandler handler;

    /**
     * JAX-WS runtime sets its handler during
     * {@link Endpoint#publish(HttpContext)} to handle
     * HTTP requests for this context. Container or its extensions
     * use this handler to process the requests.
     *
     * @param handler the handler to set for this context
     */
    public void setHandler(HttpHandler handler) {
        this.handler = handler;
    }

    /**
     * Returns the path for this context. This path uniquely identifies
     * an endpoint inside an application and the path is relative to
     * application's context path. Container should give this
     * path based on how it matches request URIs to this HttpContext object.
     *
     *

     * For servlet container, this is typically a url-pattern for an endpoint.
     *
     *

     * Endpoint's address for this context can be computed as follows:
     *

     *  HttpExchange exch = ...;
     *  String endpointAddress =
     *      exch.getScheme() + "://"
     *      + exch.getLocalAddress().getHostName()
     *      + ":" + exch.getLocalAddress().getPort()
     *      + exch.getContextPath() + getPath();
     *

     *
     * @return this context's path
     */
    public abstract String getPath();

    /**
     * Returns an attribute value for container's configuration
     * and other data that can be used by jax-ws runtime.
     *
     * @param name attribute name
     * @return attribute value
     */
    public abstract Object getAttribute(String name);

    /**
     * Returns all attribute names for container's configuration
     * and other data that can be used by jax-ws runtime.
     *
     * @return set of all attribute names
     */
    public abstract Set<String> getAttributeNames();

}


text:
/***
* Inferno Engine v4 2015-2017
* Written by Tomasz "Rex Dex" Jonarski
*
* [# filter: input #]
***/

#pragma once

#include "inputContext.h"

namespace base
{
    namespace input
    {
        ///---

        /// Null input context
        class BASE_INPUT_API ContextNull : public IContext
        {
            RTTI_DECLARE_VIRTUAL_CLASS(ContextNull, IContext);

        public:
            ContextNull(Uint64 nativeWindow, Uint64 nativeDisplay);

            //--

            virtual void resetInput() override final;
            virtual void processState() override final;
            virtual void processMessage(const void* msg) override final;
        };

        ///---

    } // input
} // base


text:
/**
 * NOTE: This is an auto-generated file changes within may be overwritten
 * Run `npm run build --workspace @looker/icons` to update
 */

import React from 'react'
import type { StyledIcon, StyledIconProps } from '@styled-icons/styled-icon'
import { StyledIconBase } from '@styled-icons/styled-icon'

export const Flag: StyledIcon = React.forwardRef<
  SVGSVGElement,
  StyledIconProps
>((props, ref) => {
  const attrs: React.SVGProps<SVGSVGElement> = {
      "fill": "currentColor",
  "xmlns": "http://www.w3.org/2000/svg",
  }

  return (
    <StyledIconBase
      iconAttrs={attrs}
      iconVerticalAlign="middle"
      iconViewBox="0 0 24 24"
      {...props}
      ref={ref}
    >
      <path fillRule="evenodd" clipRule="evenodd" d="M17 8.5L21 3H3V14H21L17 8.5ZM17.0725 12L14.527 8.5L17.0725 5H5V12H17.0725Z" />

      <path fillRule="evenodd" clipRule="evenodd" d="M3 20L3 14H5L5 20H3Z" />

    </StyledIconBase>
  )
})

Flag.displayName = 'Flag'

export const FlagDimensions = {height: 24, width: 24}


text:
/////////////////////////////////////////////////////////////////////////////
// Name:        wx/effects.h
// Purpose:     wxEffects class
//              Draws 3D effects.
// Author:      Julian Smart et al
// Modified by:
// Created:     25/4/2000
// Copyright:   (c) Julian Smart
// Licence:     wxWindows licence
/////////////////////////////////////////////////////////////////////////////

#ifndef _WX_EFFECTS_H_
#define _WX_EFFECTS_H_

// this class is deprecated and will be removed in the next wx version
//
// please use wxRenderer::DrawBorder() instead of DrawSunkenEdge(); there is no
// replacement for TileBitmap() but it doesn't seem to be very useful anyhow
#if WXWIN_COMPATIBILITY_2_8

/*
 * wxEffects: various 3D effects
 */

#include "wx/object.h"
#include "wx/colour.h"
#include "wx/gdicmn.h"
#include "wx/dc.h"

class WXDLLIMPEXP_CORE wxEffectsImpl: public wxObject
{
public:
    // Assume system colours
    wxEffectsImpl() ;
    // Going from lightest to darkest
    wxEffectsImpl(const wxColour& highlightColour, const wxColour& lightShadow,
                  const wxColour& faceColour, const wxColour& mediumShadow,
                  const wxColour& darkShadow) ;

    // Accessors
    wxColour GetHighlightColour() const { return m_highlightColour; }
    wxColour GetLightShadow() const { return m_lightShadow; }
    wxColour GetFaceColour() const { return m_faceColour; }
    wxColour GetMediumShadow() const { return m_mediumShadow; }
    wxColour GetDarkShadow() const { return m_darkShadow; }

    void SetHighlightColour(const wxColour& c) { m_highlightColour = c; }
    void SetLightShadow(const wxColour& c) { m_lightShadow = c; }
    void SetFaceColour(const wxColour& c) { m_faceColour = c; }
    void SetMediumShadow(const wxColour& c) { m_mediumShadow = c; }
    void SetDarkShadow(const wxColour& c) { m_darkShadow = c; }

    void Set(const wxColour& highlightColour, const wxColour& lightShadow,
             const wxColour& faceColour, const wxColour& mediumShadow,
             const wxColour& darkShadow)
    {
        SetHighlightColour(highlightColour);
        SetLightShadow(lightShadow);
        SetFaceColour(faceColour);
        SetMediumShadow(mediumShadow);
        SetDarkShadow(darkShadow);
    }

    // Draw a sunken edge
    void DrawSunkenEdge(wxDC& dc, const wxRect& rect, int borderSize = 1);

    // Tile a bitmap
    bool TileBitmap(const wxRect& rect, wxDC& dc, const wxBitmap& bitmap);

protected:
    wxColour    m_highlightColour;  // Usually white
    wxColour    m_lightShadow;      // Usually light grey
    wxColour    m_faceColour;       // Usually grey
    wxColour    m_mediumShadow;     // Usually dark grey
    wxColour    m_darkShadow;       // Usually black

    wxDECLARE_CLASS(wxEffectsImpl);
};

// current versions of g++ don't generate deprecation warnings for classes
// declared deprecated, so define wxEffects as a typedef instead: this does
// generate warnings with both g++ and VC (which also has no troubles with
// directly deprecating the classes...)
//
// note that this g++ bug (16370) is supposed to be fixed in g++ 4.3.0
typedef wxEffectsImpl wxDEPRECATED(wxEffects);

#endif // WXWIN_COMPATIBILITY_2_8

#endif // _WX_EFFECTS_H_


text:
module Azure::SQL::Mgmt::V2015_05_01_preview
  module Models
    #
    # Defines values for ManagedInstanceLicenseType
    #
    module ManagedInstanceLicenseType
      LicenseIncluded = "LicenseIncluded"
      BasePrice = "BasePrice"
    end
  end
end


text:
module.exports = function (grunt) {
    'use strict';

    grunt.initConfig({
        mocha: {
            test: {
                src: ['tests.html']
            },
            options: {
                timeout: 5000,
                rowlOnSuccess: false,
            }
        },
        open: {
            tests: {
                path: 'tests.html'
            }
        },
        shell: {
            bower: { command: 'node_modules/.bin/bower install'}
        }
    });

    require('load-grunt-tasks')(grunt);
    require('time-grunt')(grunt);
    grunt.loadNpmTasks('grunt-mocha');
    grunt.loadNpmTasks('grunt-open');
    grunt.loadNpmTasks('grunt-shell');

    grunt.registerTask('mocha:browser', ['open:tests']);

    grunt.registerTask('travis', ['shell:bower', 'mocha']);
};


text:
.flag-icon-background {
  background-size: contain;
  background-position: 50%;
  background-repeat: no-repeat;
}
.flag-icon {
  background-size: contain;
  background-position: 50%;
  background-repeat: no-repeat;
  position: relative;
  display: inline-block;
  width: 1.33333333em;
  line-height: 1em;
}
.flag-icon:before {
  content: "\00a0";
}
.flag-icon.flag-icon-squared {
  width: 1em;
}
.flag-icon-ad {
  background-image: url(../flags/4x3/ad.svg) !important;
}
.flag-icon-ad.flag-icon-squared {
  background-image: url(../flags/1x1/ad.svg) !important;
}
.flag-icon-ae {
  background-image: url(../flags/4x3/ae.svg) !important;
}
.flag-icon-ae.flag-icon-squared {
  background-image: url(../flags/1x1/ae.svg) !important;
}
.flag-icon-af {
  background-image: url(../flags/4x3/af.svg) !important;
}
.flag-icon-af.flag-icon-squared {
  background-image: url(../flags/1x1/af.svg) !important;
}
.flag-icon-ag {
  background-image: url(../flags/4x3/ag.svg) !important;
}
.flag-icon-ag.flag-icon-squared {
  background-image: url(../flags/1x1/ag.svg) !important;
}
.flag-icon-ai {
  background-image: url(../flags/4x3/ai.svg) !important;
}
.flag-icon-ai.flag-icon-squared {
  background-image: url(../flags/1x1/ai.svg) !important;
}
.flag-icon-al {
  background-image: url(../flags/4x3/al.svg) !important;
}
.flag-icon-al.flag-icon-squared {
  background-image: url(../flags/1x1/al.svg) !important;
}
.flag-icon-am {
  background-image: url(../flags/4x3/am.svg) !important;
}
.flag-icon-am.flag-icon-squared {
  background-image: url(../flags/1x1/am.svg) !important;
}
.flag-icon-ao {
  background-image: url(../flags/4x3/ao.svg) !important;
}
.flag-icon-ao.flag-icon-squared {
  background-image: url(../flags/1x1/ao.svg) !important;
}
.flag-icon-aq {
  background-image: url(../flags/4x3/aq.svg) !important;
}
.flag-icon-aq.flag-icon-squared {
  background-image: url(../flags/1x1/aq.svg) !important;
}
.flag-icon-ar {
  background-image: url(../flags/4x3/ar.svg) !important;
}
.flag-icon-ar.flag-icon-squared {
  background-image: url(../flags/1x1/ar.svg) !important;
}
.flag-icon-as {
  background-image: url(../flags/4x3/as.svg) !important;
}
.flag-icon-as.flag-icon-squared {
  background-image: url(../flags/1x1/as.svg) !important;
}
.flag-icon-at {
  background-image: url(../flags/4x3/at.svg) !important;
}
.flag-icon-at.flag-icon-squared {
  background-image: url(../flags/1x1/at.svg) !important;
}
.flag-icon-au {
  background-image: url(../flags/4x3/au.svg) !important;
}
.flag-icon-au.flag-icon-squared {
  background-image: url(../flags/1x1/au.svg) !important;
}
.flag-icon-aw {
  background-image: url(../flags/4x3/aw.svg) !important;
}
.flag-icon-aw.flag-icon-squared {
  background-image: url(../flags/1x1/aw.svg) !important;
}
.flag-icon-ax {
  background-image: url(../flags/4x3/ax.svg) !important;
}
.flag-icon-ax.flag-icon-squared {
  background-image: url(../flags/1x1/ax.svg) !important;
}
.flag-icon-az {
  background-image: url(../flags/4x3/az.svg) !important;
}
.flag-icon-az.flag-icon-squared {
  background-image: url(../flags/1x1/az.svg) !important;
}
.flag-icon-ba {
  background-image: url(../flags/4x3/ba.svg) !important;
}
.flag-icon-ba.flag-icon-squared {
  background-image: url(../flags/1x1/ba.svg) !important;
}
.flag-icon-bb {
  background-image: url(../flags/4x3/bb.svg) !important;
}
.flag-icon-bb.flag-icon-squared {
  background-image: url(../flags/1x1/bb.svg) !important;
}
.flag-icon-bd {
  background-image: url(../flags/4x3/bd.svg) !important;
}
.flag-icon-bd.flag-icon-squared {
  background-image: url(../flags/1x1/bd.svg) !important;
}
.flag-icon-be {
  background-image: url(../flags/4x3/be.svg) !important;
}
.flag-icon-be.flag-icon-squared {
  background-image: url(../flags/1x1/be.svg) !important;
}
.flag-icon-bf {
  background-image: url(../flags/4x3/bf.svg) !important;
}
.flag-icon-bf.flag-icon-squared {
  background-image: url(../flags/1x1/bf.svg) !important;
}
.flag-icon-bg {
  background-image: url(../flags/4x3/bg.svg) !important;
}
.flag-icon-bg.flag-icon-squared {
  background-image: url(../flags/1x1/bg.svg) !important;
}
.flag-icon-bh {
  background-image: url(../flags/4x3/bh.svg) !important;
}
.flag-icon-bh.flag-icon-squared {
  background-image: url(../flags/1x1/bh.svg) !important;
}
.flag-icon-bi {
  background-image: url(../flags/4x3/bi.svg) !important;
}
.flag-icon-bi.flag-icon-squared {
  background-image: url(../flags/1x1/bi.svg) !important;
}
.flag-icon-bj {
  background-image: url(../flags/4x3/bj.svg) !important;
}
.flag-icon-bj.flag-icon-squared {
  background-image: url(../flags/1x1/bj.svg) !important;
}
.flag-icon-bl {
  background-image: url(../flags/4x3/bl.svg) !important;
}
.flag-icon-bl.flag-icon-squared {
  background-image: url(../flags/1x1/bl.svg) !important;
}
.flag-icon-bm {
  background-image: url(../flags/4x3/bm.svg) !important;
}
.flag-icon-bm.flag-icon-squared {
  background-image: url(../flags/1x1/bm.svg) !important;
}
.flag-icon-bn {
  background-image: url(../flags/4x3/bn.svg) !important;
}
.flag-icon-bn.flag-icon-squared {
  background-image: url(../flags/1x1/bn.svg) !important;
}
.flag-icon-bo {
  background-image: url(../flags/4x3/bo.svg) !important;
}
.flag-icon-bo.flag-icon-squared {
  background-image: url(../flags/1x1/bo.svg) !important;
}
.flag-icon-bq {
  background-image: url(../flags/4x3/bq.svg) !important;
}
.flag-icon-bq.flag-icon-squared {
  background-image: url(../flags/1x1/bq.svg) !important;
}
.flag-icon-br {
  background-image: url(../flags/4x3/br.svg) !important;
}
.flag-icon-br.flag-icon-squared {
  background-image: url(../flags/1x1/br.svg) !important;
}
.flag-icon-bs {
  background-image: url(../flags/4x3/bs.svg) !important;
}
.flag-icon-bs.flag-icon-squared {
  background-image: url(../flags/1x1/bs.svg) !important;
}
.flag-icon-bt {
  background-image: url(../flags/4x3/bt.svg) !important;
}
.flag-icon-bt.flag-icon-squared {
  background-image: url(../flags/1x1/bt.svg) !important;
}
.flag-icon-bv {
  background-image: url(../flags/4x3/bv.svg) !important;
}
.flag-icon-bv.flag-icon-squared {
  background-image: url(../flags/1x1/bv.svg) !important;
}
.flag-icon-bw {
  background-image: url(../flags/4x3/bw.svg) !important;
}
.flag-icon-bw.flag-icon-squared {
  background-image: url(../flags/1x1/bw.svg) !important;
}
.flag-icon-by {
  background-image: url(../flags/4x3/by.svg) !important;
}
.flag-icon-by.flag-icon-squared {
  background-image: url(../flags/1x1/by.svg) !important;
}
.flag-icon-bz {
  background-image: url(../flags/4x3/bz.svg) !important;
}
.flag-icon-bz.flag-icon-squared {
  background-image: url(../flags/1x1/bz.svg) !important;
}
.flag-icon-ca {
  background-image: url(../flags/4x3/ca.svg) !important;
}
.flag-icon-ca.flag-icon-squared {
  background-image: url(../flags/1x1/ca.svg) !important;
}
.flag-icon-cc {
  background-image: url(../flags/4x3/cc.svg) !important;
}
.flag-icon-cc.flag-icon-squared {
  background-image: url(../flags/1x1/cc.svg) !important;
}
.flag-icon-cd {
  background-image: url(../flags/4x3/cd.svg) !important;
}
.flag-icon-cd.flag-icon-squared {
  background-image: url(../flags/1x1/cd.svg) !important;
}
.flag-icon-cf {
  background-image: url(../flags/4x3/cf.svg) !important;
}
.flag-icon-cf.flag-icon-squared {
  background-image: url(../flags/1x1/cf.svg) !important;
}
.flag-icon-cg {
  background-image: url(../flags/4x3/cg.svg) !important;
}
.flag-icon-cg.flag-icon-squared {
  background-image: url(../flags/1x1/cg.svg) !important;
}
.flag-icon-ch {
  background-image: url(../flags/4x3/ch.svg) !important;
}
.flag-icon-ch.flag-icon-squared {
  background-image: url(../flags/1x1/ch.svg) !important;
}
.flag-icon-ci {
  background-image: url(../flags/4x3/ci.svg) !important;
}
.flag-icon-ci.flag-icon-squared {
  background-image: url(../flags/1x1/ci.svg) !important;
}
.flag-icon-ck {
  background-image: url(../flags/4x3/ck.svg) !important;
}
.flag-icon-ck.flag-icon-squared {
  background-image: url(../flags/1x1/ck.svg) !important;
}
.flag-icon-cl {
  background-image: url(../flags/4x3/cl.svg) !important;
}
.flag-icon-cl.flag-icon-squared {
  background-image: url(../flags/1x1/cl.svg) !important;
}
.flag-icon-cm {
  background-image: url(../flags/4x3/cm.svg) !important;
}
.flag-icon-cm.flag-icon-squared {
  background-image: url(../flags/1x1/cm.svg) !important;
}
.flag-icon-cn {
  background-image: url(../flags/4x3/cn.svg) !important;
}
.flag-icon-cn.flag-icon-squared {
  background-image: url(../flags/1x1/cn.svg) !important;
}
.flag-icon-co {
  background-image: url(../flags/4x3/co.svg) !important;
}
.flag-icon-co.flag-icon-squared {
  background-image: url(../flags/1x1/co.svg) !important;
}
.flag-icon-cr {
  background-image: url(../flags/4x3/cr.svg) !important;
}
.flag-icon-cr.flag-icon-squared {
  background-image: url(../flags/1x1/cr.svg) !important;
}
.flag-icon-cu {
  background-image: url(../flags/4x3/cu.svg) !important;
}
.flag-icon-cu.flag-icon-squared {
  background-image: url(../flags/1x1/cu.svg) !important;
}
.flag-icon-cv {
  background-image: url(../flags/4x3/cv.svg) !important;
}
.flag-icon-cv.flag-icon-squared {
  background-image: url(../flags/1x1/cv.svg) !important;
}
.flag-icon-cw {
  background-image: url(../flags/4x3/cw.svg) !important;
}
.flag-icon-cw.flag-icon-squared {
  background-image: url(../flags/1x1/cw.svg) !important;
}
.flag-icon-cx {
  background-image: url(../flags/4x3/cx.svg) !important;
}
.flag-icon-cx.flag-icon-squared {
  background-image: url(../flags/1x1/cx.svg) !important;
}
.flag-icon-cy {
  background-image: url(../flags/4x3/cy.svg) !important;
}
.flag-icon-cy.flag-icon-squared {
  background-image: url(../flags/1x1/cy.svg) !important;
}
.flag-icon-cz {
  background-image: url(../flags/4x3/cz.svg) !important;
}
.flag-icon-cz.flag-icon-squared {
  background-image: url(../flags/1x1/cz.svg) !important;
}
.flag-icon-de {
  background-image: url(../flags/4x3/de.svg) !important;
}
.flag-icon-de.flag-icon-squared {
  background-image: url(../flags/1x1/de.svg) !important;
}
.flag-icon-dj {
  background-image: url(../flags/4x3/dj.svg) !important;
}
.flag-icon-dj.flag-icon-squared {
  background-image: url(../flags/1x1/dj.svg) !important;
}
.flag-icon-dk {
  background-image: url(../flags/4x3/dk.svg) !important;
}
.flag-icon-dk.flag-icon-squared {
  background-image: url(../flags/1x1/dk.svg) !important;
}
.flag-icon-dm {
  background-image: url(../flags/4x3/dm.svg) !important;
}
.flag-icon-dm.flag-icon-squared {
  background-image: url(../flags/1x1/dm.svg) !important;
}
.flag-icon-do {
  background-image: url(../flags/4x3/do.svg) !important;
}
.flag-icon-do.flag-icon-squared {
  background-image: url(../flags/1x1/do.svg) !important;
}
.flag-icon-dz {
  background-image: url(../flags/4x3/dz.svg) !important;
}
.flag-icon-dz.flag-icon-squared {
  background-image: url(../flags/1x1/dz.svg) !important;
}
.flag-icon-ec {
  background-image: url(../flags/4x3/ec.svg) !important;
}
.flag-icon-ec.flag-icon-squared {
  background-image: url(../flags/1x1/ec.svg) !important;
}
.flag-icon-ee {
  background-image: url(../flags/4x3/ee.svg) !important;
}
.flag-icon-ee.flag-icon-squared {
  background-image: url(../flags/1x1/ee.svg) !important;
}
.flag-icon-eg {
  background-image: url(../flags/4x3/eg.svg) !important;
}
.flag-icon-eg.flag-icon-squared {
  background-image: url(../flags/1x1/eg.svg) !important;
}
.flag-icon-eh {
  background-image: url(../flags/4x3/eh.svg) !important;
}
.flag-icon-eh.flag-icon-squared {
  background-image: url(../flags/1x1/eh.svg) !important;
}
.flag-icon-er {
  background-image: url(../flags/4x3/er.svg) !important;
}
.flag-icon-er.flag-icon-squared {
  background-image: url(../flags/1x1/er.svg) !important;
}
.flag-icon-es {
  background-image: url(../flags/4x3/es.svg) !important;
}
.flag-icon-es.flag-icon-squared {
  background-image: url(../flags/1x1/es.svg) !important;
}
.flag-icon-et {
  background-image: url(../flags/4x3/et.svg) !important;
}
.flag-icon-et.flag-icon-squared {
  background-image: url(../flags/1x1/et.svg) !important;
}
.flag-icon-fi {
  background-image: url(../flags/4x3/fi.svg) !important;
}
.flag-icon-fi.flag-icon-squared {
  background-image: url(../flags/1x1/fi.svg) !important;
}
.flag-icon-fj {
  background-image: url(../flags/4x3/fj.svg) !important;
}
.flag-icon-fj.flag-icon-squared {
  background-image: url(../flags/1x1/fj.svg) !important;
}
.flag-icon-fk {
  background-image: url(../flags/4x3/fk.svg) !important;
}
.flag-icon-fk.flag-icon-squared {
  background-image: url(../flags/1x1/fk.svg) !important;
}
.flag-icon-fm {
  background-image: url(../flags/4x3/fm.svg) !important;
}
.flag-icon-fm.flag-icon-squared {
  background-image: url(../flags/1x1/fm.svg) !important;
}
.flag-icon-fo {
  background-image: url(../flags/4x3/fo.svg) !important;
}
.flag-icon-fo.flag-icon-squared {
  background-image: url(../flags/1x1/fo.svg) !important;
}
.flag-icon-fr {
  background-image: url(../flags/4x3/fr.svg) !important;
}
.flag-icon-fr.flag-icon-squared {
  background-image: url(../flags/1x1/fr.svg) !important;
}
.flag-icon-ga {
  background-image: url(../flags/4x3/ga.svg) !important;
}
.flag-icon-ga.flag-icon-squared {
  background-image: url(../flags/1x1/ga.svg) !important;
}
.flag-icon-gb {
  background-image: url(../flags/4x3/gb.svg) !important;
}
.flag-icon-gb.flag-icon-squared {
  background-image: url(../flags/1x1/gb.svg) !important;
}
.flag-icon-gd {
  background-image: url(../flags/4x3/gd.svg) !important;
}
.flag-icon-gd.flag-icon-squared {
  background-image: url(../flags/1x1/gd.svg) !important;
}
.flag-icon-ge {
  background-image: url(../flags/4x3/ge.svg) !important;
}
.flag-icon-ge.flag-icon-squared {
  background-image: url(../flags/1x1/ge.svg) !important;
}
.flag-icon-gf {
  background-image: url(../flags/4x3/gf.svg) !important;
}
.flag-icon-gf.flag-icon-squared {
  background-image: url(../flags/1x1/gf.svg) !important;
}
.flag-icon-gg {
  background-image: url(../flags/4x3/gg.svg) !important;
}
.flag-icon-gg.flag-icon-squared {
  background-image: url(../flags/1x1/gg.svg) !important;
}
.flag-icon-gh {
  background-image: url(../flags/4x3/gh.svg) !important;
}
.flag-icon-gh.flag-icon-squared {
  background-image: url(../flags/1x1/gh.svg) !important;
}
.flag-icon-gi {
  background-image: url(../flags/4x3/gi.svg) !important;
}
.flag-icon-gi.flag-icon-squared {
  background-image: url(../flags/1x1/gi.svg) !important;
}
.flag-icon-gl {
  background-image: url(../flags/4x3/gl.svg) !important;
}
.flag-icon-gl.flag-icon-squared {
  background-image: url(../flags/1x1/gl.svg) !important;
}
.flag-icon-gm {
  background-image: url(../flags/4x3/gm.svg) !important;
}
.flag-icon-gm.flag-icon-squared {
  background-image: url(../flags/1x1/gm.svg) !important;
}
.flag-icon-gn {
  background-image: url(../flags/4x3/gn.svg) !important;
}
.flag-icon-gn.flag-icon-squared {
  background-image: url(../flags/1x1/gn.svg) !important;
}
.flag-icon-gp {
  background-image: url(../flags/4x3/gp.svg) !important;
}
.flag-icon-gp.flag-icon-squared {
  background-image: url(../flags/1x1/gp.svg) !important;
}
.flag-icon-gq {
  background-image: url(../flags/4x3/gq.svg) !important;
}
.flag-icon-gq.flag-icon-squared {
  background-image: url(../flags/1x1/gq.svg) !important;
}
.flag-icon-gr {
  background-image: url(../flags/4x3/gr.svg) !important;
}
.flag-icon-gr.flag-icon-squared {
  background-image: url(../flags/1x1/gr.svg) !important;
}
.flag-icon-gs {
  background-image: url(../flags/4x3/gs.svg) !important;
}
.flag-icon-gs.flag-icon-squared {
  background-image: url(../flags/1x1/gs.svg) !important;
}
.flag-icon-gt {
  background-image: url(../flags/4x3/gt.svg) !important;
}
.flag-icon-gt.flag-icon-squared {
  background-image: url(../flags/1x1/gt.svg) !important;
}
.flag-icon-gu {
  background-image: url(../flags/4x3/gu.svg) !important;
}
.flag-icon-gu.flag-icon-squared {
  background-image: url(../flags/1x1/gu.svg) !important;
}
.flag-icon-gw {
  background-image: url(../flags/4x3/gw.svg) !important;
}
.flag-icon-gw.flag-icon-squared {
  background-image: url(../flags/1x1/gw.svg) !important;
}
.flag-icon-gy {
  background-image: url(../flags/4x3/gy.svg) !important;
}
.flag-icon-gy.flag-icon-squared {
  background-image: url(../flags/1x1/gy.svg) !important;
}
.flag-icon-hk {
  background-image: url(../flags/4x3/hk.svg) !important;
}
.flag-icon-hk.flag-icon-squared {
  background-image: url(../flags/1x1/hk.svg) !important;
}
.flag-icon-hm {
  background-image: url(../flags/4x3/hm.svg) !important;
}
.flag-icon-hm.flag-icon-squared {
  background-image: url(../flags/1x1/hm.svg) !important;
}
.flag-icon-hn {
  background-image: url(../flags/4x3/hn.svg) !important;
}
.flag-icon-hn.flag-icon-squared {
  background-image: url(../flags/1x1/hn.svg) !important;
}
.flag-icon-hr {
  background-image: url(../flags/4x3/hr.svg) !important;
}
.flag-icon-hr.flag-icon-squared {
  background-image: url(../flags/1x1/hr.svg) !important;
}
.flag-icon-ht {
  background-image: url(../flags/4x3/ht.svg) !important;
}
.flag-icon-ht.flag-icon-squared {
  background-image: url(../flags/1x1/ht.svg) !important;
}
.flag-icon-hu {
  background-image: url(../flags/4x3/hu.svg) !important;
}
.flag-icon-hu.flag-icon-squared {
  background-image: url(../flags/1x1/hu.svg) !important;
}
.flag-icon-id {
  background-image: url(../flags/4x3/id.svg) !important;
}
.flag-icon-id.flag-icon-squared {
  background-image: url(../flags/1x1/id.svg) !important;
}
.flag-icon-ie {
  background-image: url(../flags/4x3/ie.svg) !important;
}
.flag-icon-ie.flag-icon-squared {
  background-image: url(../flags/1x1/ie.svg) !important;
}
.flag-icon-il {
  background-image: url(../flags/4x3/il.svg) !important;
}
.flag-icon-il.flag-icon-squared {
  background-image: url(../flags/1x1/il.svg) !important;
}
.flag-icon-im {
  background-image: url(../flags/4x3/im.svg) !important;
}
.flag-icon-im.flag-icon-squared {
  background-image: url(../flags/1x1/im.svg) !important;
}
.flag-icon-in {
  background-image: url(../flags/4x3/in.svg) !important;
}
.flag-icon-in.flag-icon-squared {
  background-image: url(../flags/1x1/in.svg) !important;
}
.flag-icon-io {
  background-image: url(../flags/4x3/io.svg) !important;
}
.flag-icon-io.flag-icon-squared {
  background-image: url(../flags/1x1/io.svg) !important;
}
.flag-icon-iq {
  background-image: url(../flags/4x3/iq.svg) !important;
}
.flag-icon-iq.flag-icon-squared {
  background-image: url(../flags/1x1/iq.svg) !important;
}
.flag-icon-ir {
  background-image: url(../flags/4x3/ir.svg) !important;
}
.flag-icon-ir.flag-icon-squared {
  background-image: url(../flags/1x1/ir.svg) !important;
}
.flag-icon-is {
  background-image: url(../flags/4x3/is.svg) !important;
}
.flag-icon-is.flag-icon-squared {
  background-image: url(../flags/1x1/is.svg) !important;
}
.flag-icon-it {
  background-image: url(../flags/4x3/it.svg) !important;
}
.flag-icon-it.flag-icon-squared {
  background-image: url(../flags/1x1/it.svg) !important;
}
.flag-icon-je {
  background-image: url(../flags/4x3/je.svg) !important;
}
.flag-icon-je.flag-icon-squared {
  background-image: url(../flags/1x1/je.svg) !important;
}
.flag-icon-jm {
  background-image: url(../flags/4x3/jm.svg) !important;
}
.flag-icon-jm.flag-icon-squared {
  background-image: url(../flags/1x1/jm.svg) !important;
}
.flag-icon-jo {
  background-image: url(../flags/4x3/jo.svg) !important;
}
.flag-icon-jo.flag-icon-squared {
  background-image: url(../flags/1x1/jo.svg) !important;
}
.flag-icon-jp {
  background-image: url(../flags/4x3/jp.svg) !important;
}
.flag-icon-jp.flag-icon-squared {
  background-image: url(../flags/1x1/jp.svg) !important;
}
.flag-icon-ke {
  background-image: url(../flags/4x3/ke.svg) !important;
}
.flag-icon-ke.flag-icon-squared {
  background-image: url(../flags/1x1/ke.svg) !important;
}
.flag-icon-kg {
  background-image: url(../flags/4x3/kg.svg) !important;
}
.flag-icon-kg.flag-icon-squared {
  background-image: url(../flags/1x1/kg.svg) !important;
}
.flag-icon-kh {
  background-image: url(../flags/4x3/kh.svg) !important;
}
.flag-icon-kh.flag-icon-squared {
  background-image: url(../flags/1x1/kh.svg) !important;
}
.flag-icon-ki {
  background-image: url(../flags/4x3/ki.svg) !important;
}
.flag-icon-ki.flag-icon-squared {
  background-image: url(../flags/1x1/ki.svg) !important;
}
.flag-icon-km {
  background-image: url(../flags/4x3/km.svg) !important;
}
.flag-icon-km.flag-icon-squared {
  background-image: url(../flags/1x1/km.svg) !important;
}
.flag-icon-kn {
  background-image: url(../flags/4x3/kn.svg) !important;
}
.flag-icon-kn.flag-icon-squared {
  background-image: url(../flags/1x1/kn.svg) !important;
}
.flag-icon-kp {
  background-image: url(../flags/4x3/kp.svg) !important;
}
.flag-icon-kp.flag-icon-squared {
  background-image: url(../flags/1x1/kp.svg) !important;
}
.flag-icon-kr {
  background-image: url(../flags/4x3/kr.svg) !important;
}
.flag-icon-kr.flag-icon-squared {
  background-image: url(../flags/1x1/kr.svg) !important;
}
.flag-icon-kw {
  background-image: url(../flags/4x3/kw.svg) !important;
}
.flag-icon-kw.flag-icon-squared {
  background-image: url(../flags/1x1/kw.svg) !important;
}
.flag-icon-ky {
  background-image: url(../flags/4x3/ky.svg) !important;
}
.flag-icon-ky.flag-icon-squared {
  background-image: url(../flags/1x1/ky.svg) !important;
}
.flag-icon-kz {
  background-image: url(../flags/4x3/kz.svg) !important;
}
.flag-icon-kz.flag-icon-squared {
  background-image: url(../flags/1x1/kz.svg) !important;
}
.flag-icon-la {
  background-image: url(../flags/4x3/la.svg) !important;
}
.flag-icon-la.flag-icon-squared {
  background-image: url(../flags/1x1/la.svg) !important;
}
.flag-icon-lb {
  background-image: url(../flags/4x3/lb.svg) !important;
}
.flag-icon-lb.flag-icon-squared {
  background-image: url(../flags/1x1/lb.svg) !important;
}
.flag-icon-lc {
  background-image: url(../flags/4x3/lc.svg) !important;
}
.flag-icon-lc.flag-icon-squared {
  background-image: url(../flags/1x1/lc.svg) !important;
}
.flag-icon-li {
  background-image: url(../flags/4x3/li.svg) !important;
}
.flag-icon-li.flag-icon-squared {
  background-image: url(../flags/1x1/li.svg) !important;
}
.flag-icon-lk {
  background-image: url(../flags/4x3/lk.svg) !important;
}
.flag-icon-lk.flag-icon-squared {
  background-image: url(../flags/1x1/lk.svg) !important;
}
.flag-icon-lr {
  background-image: url(../flags/4x3/lr.svg) !important;
}
.flag-icon-lr.flag-icon-squared {
  background-image: url(../flags/1x1/lr.svg) !important;
}
.flag-icon-ls {
  background-image: url(../flags/4x3/ls.svg) !important;
}
.flag-icon-ls.flag-icon-squared {
  background-image: url(../flags/1x1/ls.svg) !important;
}
.flag-icon-lt {
  background-image: url(../flags/4x3/lt.svg) !important;
}
.flag-icon-lt.flag-icon-squared {
  background-image: url(../flags/1x1/lt.svg) !important;
}
.flag-icon-lu {
  background-image: url(../flags/4x3/lu.svg) !important;
}
.flag-icon-lu.flag-icon-squared {
  background-image: url(../flags/1x1/lu.svg) !important;
}
.flag-icon-lv {
  background-image: url(../flags/4x3/lv.svg) !important;
}
.flag-icon-lv.flag-icon-squared {
  background-image: url(../flags/1x1/lv.svg) !important;
}
.flag-icon-ly {
  background-image: url(../flags/4x3/ly.svg) !important;
}
.flag-icon-ly.flag-icon-squared {
  background-image: url(../flags/1x1/ly.svg) !important;
}
.flag-icon-ma {
  background-image: url(../flags/4x3/ma.svg) !important;
}
.flag-icon-ma.flag-icon-squared {
  background-image: url(../flags/1x1/ma.svg) !important;
}
.flag-icon-mc {
  background-image: url(../flags/4x3/mc.svg) !important;
}
.flag-icon-mc.flag-icon-squared {
  background-image: url(../flags/1x1/mc.svg) !important;
}
.flag-icon-md {
  background-image: url(../flags/4x3/md.svg) !important;
}
.flag-icon-md.flag-icon-squared {
  background-image: url(../flags/1x1/md.svg) !important;
}
.flag-icon-me {
  background-image: url(../flags/4x3/me.svg) !important;
}
.flag-icon-me.flag-icon-squared {
  background-image: url(../flags/1x1/me.svg) !important;
}
.flag-icon-mf {
  background-image: url(../flags/4x3/mf.svg) !important;
}
.flag-icon-mf.flag-icon-squared {
  background-image: url(../flags/1x1/mf.svg) !important;
}
.flag-icon-mg {
  background-image: url(../flags/4x3/mg.svg) !important;
}
.flag-icon-mg.flag-icon-squared {
  background-image: url(../flags/1x1/mg.svg) !important;
}
.flag-icon-mh {
  background-image: url(../flags/4x3/mh.svg) !important;
}
.flag-icon-mh.flag-icon-squared {
  background-image: url(../flags/1x1/mh.svg) !important;
}
.flag-icon-mk {
  background-image: url(../flags/4x3/mk.svg) !important;
}
.flag-icon-mk.flag-icon-squared {
  background-image: url(../flags/1x1/mk.svg) !important;
}
.flag-icon-ml {
  background-image: url(../flags/4x3/ml.svg) !important;
}
.flag-icon-ml.flag-icon-squared {
  background-image: url(../flags/1x1/ml.svg) !important;
}
.flag-icon-mm {
  background-image: url(../flags/4x3/mm.svg) !important;
}
.flag-icon-mm.flag-icon-squared {
  background-image: url(../flags/1x1/mm.svg) !important;
}
.flag-icon-mn {
  background-image: url(../flags/4x3/mn.svg) !important;
}
.flag-icon-mn.flag-icon-squared {
  background-image: url(../flags/1x1/mn.svg) !important;
}
.flag-icon-mo {
  background-image: url(../flags/4x3/mo.svg) !important;
}
.flag-icon-mo.flag-icon-squared {
  background-image: url(../flags/1x1/mo.svg) !important;
}
.flag-icon-mp {
  background-image: url(../flags/4x3/mp.svg) !important;
}
.flag-icon-mp.flag-icon-squared {
  background-image: url(../flags/1x1/mp.svg) !important;
}
.flag-icon-mq {
  background-image: url(../flags/4x3/mq.svg) !important;
}
.flag-icon-mq.flag-icon-squared {
  background-image: url(../flags/1x1/mq.svg) !important;
}
.flag-icon-mr {
  background-image: url(../flags/4x3/mr.svg) !important;
}
.flag-icon-mr.flag-icon-squared {
  background-image: url(../flags/1x1/mr.svg) !important;
}
.flag-icon-ms {
  background-image: url(../flags/4x3/ms.svg) !important;
}
.flag-icon-ms.flag-icon-squared {
  background-image: url(../flags/1x1/ms.svg) !important;
}
.flag-icon-mt {
  background-image: url(../flags/4x3/mt.svg) !important;
}
.flag-icon-mt.flag-icon-squared {
  background-image: url(../flags/1x1/mt.svg) !important;
}
.flag-icon-mu {
  background-image: url(../flags/4x3/mu.svg) !important;
}
.flag-icon-mu.flag-icon-squared {
  background-image: url(../flags/1x1/mu.svg) !important;
}
.flag-icon-mv {
  background-image: url(../flags/4x3/mv.svg) !important;
}
.flag-icon-mv.flag-icon-squared {
  background-image: url(../flags/1x1/mv.svg) !important;
}
.flag-icon-mw {
  background-image: url(../flags/4x3/mw.svg) !important;
}
.flag-icon-mw.flag-icon-squared {
  background-image: url(../flags/1x1/mw.svg) !important;
}
.flag-icon-mx {
  background-image: url(../flags/4x3/mx.svg) !important;
}
.flag-icon-mx.flag-icon-squared {
  background-image: url(../flags/1x1/mx.svg) !important;
}
.flag-icon-my {
  background-image: url(../flags/4x3/my.svg) !important;
}
.flag-icon-my.flag-icon-squared {
  background-image: url(../flags/1x1/my.svg) !important;
}
.flag-icon-mz {
  background-image: url(../flags/4x3/mz.svg) !important;
}
.flag-icon-mz.flag-icon-squared {
  background-image: url(../flags/1x1/mz.svg) !important;
}
.flag-icon-na {
  background-image: url(../flags/4x3/na.svg) !important;
}
.flag-icon-na.flag-icon-squared {
  background-image: url(../flags/1x1/na.svg) !important;
}
.flag-icon-nc {
  background-image: url(../flags/4x3/nc.svg) !important;
}
.flag-icon-nc.flag-icon-squared {
  background-image: url(../flags/1x1/nc.svg) !important;
}
.flag-icon-ne {
  background-image: url(../flags/4x3/ne.svg) !important;
}
.flag-icon-ne.flag-icon-squared {
  background-image: url(../flags/1x1/ne.svg) !important;
}
.flag-icon-nf {
  background-image: url(../flags/4x3/nf.svg) !important;
}
.flag-icon-nf.flag-icon-squared {
  background-image: url(../flags/1x1/nf.svg) !important;
}
.flag-icon-ng {
  background-image: url(../flags/4x3/ng.svg) !important;
}
.flag-icon-ng.flag-icon-squared {
  background-image: url(../flags/1x1/ng.svg) !important;
}
.flag-icon-ni {
  background-image: url(../flags/4x3/ni.svg) !important;
}
.flag-icon-ni.flag-icon-squared {
  background-image: url(../flags/1x1/ni.svg) !important;
}
.flag-icon-nl {
  background-image: url(../flags/4x3/nl.svg) !important;
}
.flag-icon-nl.flag-icon-squared {
  background-image: url(../flags/1x1/nl.svg) !important;
}
.flag-icon-no {
  background-image: url(../flags/4x3/no.svg) !important;
}
.flag-icon-no.flag-icon-squared {
  background-image: url(../flags/1x1/no.svg) !important;
}
.flag-icon-np {
  background-image: url(../flags/4x3/np.svg) !important;
}
.flag-icon-np.flag-icon-squared {
  background-image: url(../flags/1x1/np.svg) !important;
}
.flag-icon-nr {
  background-image: url(../flags/4x3/nr.svg) !important;
}
.flag-icon-nr.flag-icon-squared {
  background-image: url(../flags/1x1/nr.svg) !important;
}
.flag-icon-nu {
  background-image: url(../flags/4x3/nu.svg) !important;
}
.flag-icon-nu.flag-icon-squared {
  background-image: url(../flags/1x1/nu.svg) !important;
}
.flag-icon-nz {
  background-image: url(../flags/4x3/nz.svg) !important;
}
.flag-icon-nz.flag-icon-squared {
  background-image: url(../flags/1x1/nz.svg) !important;
}
.flag-icon-om {
  background-image: url(../flags/4x3/om.svg) !important;
}
.flag-icon-om.flag-icon-squared {
  background-image: url(../flags/1x1/om.svg) !important;
}
.flag-icon-pa {
  background-image: url(../flags/4x3/pa.svg) !important;
}
.flag-icon-pa.flag-icon-squared {
  background-image: url(../flags/1x1/pa.svg) !important;
}
.flag-icon-pe {
  background-image: url(../flags/4x3/pe.svg) !important;
}
.flag-icon-pe.flag-icon-squared {
  background-image: url(../flags/1x1/pe.svg) !important;
}
.flag-icon-pf {
  background-image: url(../flags/4x3/pf.svg) !important;
}
.flag-icon-pf.flag-icon-squared {
  background-image: url(../flags/1x1/pf.svg) !important;
}
.flag-icon-pg {
  background-image: url(../flags/4x3/pg.svg) !important;
}
.flag-icon-pg.flag-icon-squared {
  background-image: url(../flags/1x1/pg.svg) !important;
}
.flag-icon-ph {
  background-image: url(../flags/4x3/ph.svg) !important;
}
.flag-icon-ph.flag-icon-squared {
  background-image: url(../flags/1x1/ph.svg) !important;
}
.flag-icon-pk {
  background-image: url(../flags/4x3/pk.svg) !important;
}
.flag-icon-pk.flag-icon-squared {
  background-image: url(../flags/1x1/pk.svg) !important;
}
.flag-icon-pl {
  background-image: url(../flags/4x3/pl.svg) !important;
}
.flag-icon-pl.flag-icon-squared {
  background-image: url(../flags/1x1/pl.svg) !important;
}
.flag-icon-pm {
  background-image: url(../flags/4x3/pm.svg) !important;
}
.flag-icon-pm.flag-icon-squared {
  background-image: url(../flags/1x1/pm.svg) !important;
}
.flag-icon-pn {
  background-image: url(../flags/4x3/pn.svg) !important;
}
.flag-icon-pn.flag-icon-squared {
  background-image: url(../flags/1x1/pn.svg) !important;
}
.flag-icon-pr {
  background-image: url(../flags/4x3/pr.svg) !important;
}
.flag-icon-pr.flag-icon-squared {
  background-image: url(../flags/1x1/pr.svg) !important;
}
.flag-icon-ps {
  background-image: url(../flags/4x3/ps.svg) !important;
}
.flag-icon-ps.flag-icon-squared {
  background-image: url(../flags/1x1/ps.svg) !important;
}
.flag-icon-pt {
  background-image: url(../flags/4x3/pt.svg) !important;
}
.flag-icon-pt.flag-icon-squared {
  background-image: url(../flags/1x1/pt.svg) !important;
}
.flag-icon-pw {
  background-image: url(../flags/4x3/pw.svg) !important;
}
.flag-icon-pw.flag-icon-squared {
  background-image: url(../flags/1x1/pw.svg) !important;
}
.flag-icon-py {
  background-image: url(../flags/4x3/py.svg) !important;
}
.flag-icon-py.flag-icon-squared {
  background-image: url(../flags/1x1/py.svg) !important;
}
.flag-icon-qa {
  background-image: url(../flags/4x3/qa.svg) !important;
}
.flag-icon-qa.flag-icon-squared {
  background-image: url(../flags/1x1/qa.svg) !important;
}
.flag-icon-re {
  background-image: url(../flags/4x3/re.svg) !important;
}
.flag-icon-re.flag-icon-squared {
  background-image: url(../flags/1x1/re.svg) !important;
}
.flag-icon-ro {
  background-image: url(../flags/4x3/ro.svg) !important;
}
.flag-icon-ro.flag-icon-squared {
  background-image: url(../flags/1x1/ro.svg) !important;
}
.flag-icon-rs {
  background-image: url(../flags/4x3/rs.svg) !important;
}
.flag-icon-rs.flag-icon-squared {
  background-image: url(../flags/1x1/rs.svg) !important;
}
.flag-icon-ru {
  background-image: url(../flags/4x3/ru.svg) !important;
}
.flag-icon-ru.flag-icon-squared {
  background-image: url(../flags/1x1/ru.svg) !important;
}
.flag-icon-rw {
  background-image: url(../flags/4x3/rw.svg) !important;
}
.flag-icon-rw.flag-icon-squared {
  background-image: url(../flags/1x1/rw.svg) !important;
}
.flag-icon-sa {
  background-image: url(../flags/4x3/sa.svg) !important;
}
.flag-icon-sa.flag-icon-squared {
  background-image: url(../flags/1x1/sa.svg) !important;
}
.flag-icon-sb {
  background-image: url(../flags/4x3/sb.svg) !important;
}
.flag-icon-sb.flag-icon-squared {
  background-image: url(../flags/1x1/sb.svg) !important;
}
.flag-icon-sc {
  background-image: url(../flags/4x3/sc.svg) !important;
}
.flag-icon-sc.flag-icon-squared {
  background-image: url(../flags/1x1/sc.svg) !important;
}
.flag-icon-sd {
  background-image: url(../flags/4x3/sd.svg) !important;
}
.flag-icon-sd.flag-icon-squared {
  background-image: url(../flags/1x1/sd.svg) !important;
}
.flag-icon-se {
  background-image: url(../flags/4x3/se.svg) !important;
}
.flag-icon-se.flag-icon-squared {
  background-image: url(../flags/1x1/se.svg) !important;
}
.flag-icon-sg {
  background-image: url(../flags/4x3/sg.svg) !important;
}
.flag-icon-sg.flag-icon-squared {
  background-image: url(../flags/1x1/sg.svg) !important;
}
.flag-icon-sh {
  background-image: url(../flags/4x3/sh.svg) !important;
}
.flag-icon-sh.flag-icon-squared {
  background-image: url(../flags/1x1/sh.svg) !important;
}
.flag-icon-si {
  background-image: url(../flags/4x3/si.svg) !important;
}
.flag-icon-si.flag-icon-squared {
  background-image: url(../flags/1x1/si.svg) !important;
}
.flag-icon-sj {
  background-image: url(../flags/4x3/sj.svg) !important;
}
.flag-icon-sj.flag-icon-squared {
  background-image: url(../flags/1x1/sj.svg) !important;
}
.flag-icon-sk {
  background-image: url(../flags/4x3/sk.svg) !important;
}
.flag-icon-sk.flag-icon-squared {
  background-image: url(../flags/1x1/sk.svg) !important;
}
.flag-icon-sl {
  background-image: url(../flags/4x3/sl.svg) !important;
}
.flag-icon-sl.flag-icon-squared {
  background-image: url(../flags/1x1/sl.svg) !important;
}
.flag-icon-sm {
  background-image: url(../flags/4x3/sm.svg) !important;
}
.flag-icon-sm.flag-icon-squared {
  background-image: url(../flags/1x1/sm.svg) !important;
}
.flag-icon-sn {
  background-image: url(../flags/4x3/sn.svg) !important;
}
.flag-icon-sn.flag-icon-squared {
  background-image: url(../flags/1x1/sn.svg) !important;
}
.flag-icon-so {
  background-image: url(../flags/4x3/so.svg) !important;
}
.flag-icon-so.flag-icon-squared {
  background-image: url(../flags/1x1/so.svg) !important;
}
.flag-icon-sr {
  background-image: url(../flags/4x3/sr.svg) !important;
}
.flag-icon-sr.flag-icon-squared {
  background-image: url(../flags/1x1/sr.svg) !important;
}
.flag-icon-ss {
  background-image: url(../flags/4x3/ss.svg) !important;
}
.flag-icon-ss.flag-icon-squared {
  background-image: url(../flags/1x1/ss.svg) !important;
}
.flag-icon-st {
  background-image: url(../flags/4x3/st.svg) !important;
}
.flag-icon-st.flag-icon-squared {
  background-image: url(../flags/1x1/st.svg) !important;
}
.flag-icon-sv {
  background-image: url(../flags/4x3/sv.svg) !important;
}
.flag-icon-sv.flag-icon-squared {
  background-image: url(../flags/1x1/sv.svg) !important;
}
.flag-icon-sx {
  background-image: url(../flags/4x3/sx.svg) !important;
}
.flag-icon-sx.flag-icon-squared {
  background-image: url(../flags/1x1/sx.svg) !important;
}
.flag-icon-sy {
  background-image: url(../flags/4x3/sy.svg) !important;
}
.flag-icon-sy.flag-icon-squared {
  background-image: url(../flags/1x1/sy.svg) !important;
}
.flag-icon-sz {
  background-image: url(../flags/4x3/sz.svg) !important;
}
.flag-icon-sz.flag-icon-squared {
  background-image: url(../flags/1x1/sz.svg) !important;
}
.flag-icon-tc {
  background-image: url(../flags/4x3/tc.svg) !important;
}
.flag-icon-tc.flag-icon-squared {
  background-image: url(../flags/1x1/tc.svg) !important;
}
.flag-icon-td {
  background-image: url(../flags/4x3/td.svg) !important;
}
.flag-icon-td.flag-icon-squared {
  background-image: url(../flags/1x1/td.svg) !important;
}
.flag-icon-tf {
  background-image: url(../flags/4x3/tf.svg) !important;
}
.flag-icon-tf.flag-icon-squared {
  background-image: url(../flags/1x1/tf.svg) !important;
}
.flag-icon-tg {
  background-image: url(../flags/4x3/tg.svg) !important;
}
.flag-icon-tg.flag-icon-squared {
  background-image: url(../flags/1x1/tg.svg) !important;
}
.flag-icon-th {
  background-image: url(../flags/4x3/th.svg) !important;
}
.flag-icon-th.flag-icon-squared {
  background-image: url(../flags/1x1/th.svg) !important;
}
.flag-icon-tj {
  background-image: url(../flags/4x3/tj.svg) !important;
}
.flag-icon-tj.flag-icon-squared {
  background-image: url(../flags/1x1/tj.svg) !important;
}
.flag-icon-tk {
  background-image: url(../flags/4x3/tk.svg) !important;
}
.flag-icon-tk.flag-icon-squared {
  background-image: url(../flags/1x1/tk.svg) !important;
}
.flag-icon-tl {
  background-image: url(../flags/4x3/tl.svg) !important;
}
.flag-icon-tl.flag-icon-squared {
  background-image: url(../flags/1x1/tl.svg) !important;
}
.flag-icon-tm {
  background-image: url(../flags/4x3/tm.svg) !important;
}
.flag-icon-tm.flag-icon-squared {
  background-image: url(../flags/1x1/tm.svg) !important;
}
.flag-icon-tn {
  background-image: url(../flags/4x3/tn.svg) !important;
}
.flag-icon-tn.flag-icon-squared {
  background-image: url(../flags/1x1/tn.svg) !important;
}
.flag-icon-to {
  background-image: url(../flags/4x3/to.svg) !important;
}
.flag-icon-to.flag-icon-squared {
  background-image: url(../flags/1x1/to.svg) !important;
}
.flag-icon-tr {
  background-image: url(../flags/4x3/tr.svg) !important;
}
.flag-icon-tr.flag-icon-squared {
  background-image: url(../flags/1x1/tr.svg) !important;
}
.flag-icon-tt {
  background-image: url(../flags/4x3/tt.svg) !important;
}
.flag-icon-tt.flag-icon-squared {
  background-image: url(../flags/1x1/tt.svg) !important;
}
.flag-icon-tv {
  background-image: url(../flags/4x3/tv.svg) !important;
}
.flag-icon-tv.flag-icon-squared {
  background-image: url(../flags/1x1/tv.svg) !important;
}
.flag-icon-tw {
  background-image: url(../flags/4x3/tw.svg) !important;
}
.flag-icon-tw.flag-icon-squared {
  background-image: url(../flags/1x1/tw.svg) !important;
}
.flag-icon-tz {
  background-image: url(../flags/4x3/tz.svg) !important;
}
.flag-icon-tz.flag-icon-squared {
  background-image: url(../flags/1x1/tz.svg) !important;
}
.flag-icon-ua {
  background-image: url(../flags/4x3/ua.svg) !important;
}
.flag-icon-ua.flag-icon-squared {
  background-image: url(../flags/1x1/ua.svg) !important;
}
.flag-icon-ug {
  background-image: url(../flags/4x3/ug.svg) !important;
}
.flag-icon-ug.flag-icon-squared {
  background-image: url(../flags/1x1/ug.svg) !important;
}
.flag-icon-um {
  background-image: url(../flags/4x3/um.svg) !important;
}
.flag-icon-um.flag-icon-squared {
  background-image: url(../flags/1x1/um.svg) !important;
}
.flag-icon-us {
  background-image: url(../flags/4x3/us.svg) !important;
}
.flag-icon-us.flag-icon-squared {
  background-image: url(../flags/1x1/us.svg) !important;
}
.flag-icon-uy {
  background-image: url(../flags/4x3/uy.svg) !important;
}
.flag-icon-uy.flag-icon-squared {
  background-image: url(../flags/1x1/uy.svg) !important;
}
.flag-icon-uz {
  background-image: url(../flags/4x3/uz.svg) !important;
}
.flag-icon-uz.flag-icon-squared {
  background-image: url(../flags/1x1/uz.svg) !important;
}
.flag-icon-va {
  background-image: url(../flags/4x3/va.svg) !important;
}
.flag-icon-va.flag-icon-squared {
  background-image: url(../flags/1x1/va.svg) !important;
}
.flag-icon-vc {
  background-image: url(../flags/4x3/vc.svg) !important;
}
.flag-icon-vc.flag-icon-squared {
  background-image: url(../flags/1x1/vc.svg) !important;
}
.flag-icon-ve {
  background-image: url(../flags/4x3/ve.svg) !important;
}
.flag-icon-ve.flag-icon-squared {
  background-image: url(../flags/1x1/ve.svg) !important;
}
.flag-icon-vg {
  background-image: url(../flags/4x3/vg.svg) !important;
}
.flag-icon-vg.flag-icon-squared {
  background-image: url(../flags/1x1/vg.svg) !important;
}
.flag-icon-vi {
  background-image: url(../flags/4x3/vi.svg) !important;
}
.flag-icon-vi.flag-icon-squared {
  background-image: url(../flags/1x1/vi.svg) !important;
}
.flag-icon-vn {
  background-image: url(../flags/4x3/vn.svg) !important;
}
.flag-icon-vn.flag-icon-squared {
  background-image: url(../flags/1x1/vn.svg) !important;
}
.flag-icon-vu {
  background-image: url(../flags/4x3/vu.svg) !important;
}
.flag-icon-vu.flag-icon-squared {
  background-image: url(../flags/1x1/vu.svg) !important;
}
.flag-icon-wf {
  background-image: url(../flags/4x3/wf.svg) !important;
}
.flag-icon-wf.flag-icon-squared {
  background-image: url(../flags/1x1/wf.svg) !important;
}
.flag-icon-ws {
  background-image: url(../flags/4x3/ws.svg) !important;
}
.flag-icon-ws.flag-icon-squared {
  background-image: url(../flags/1x1/ws.svg) !important;
}
.flag-icon-ye {
  background-image: url(../flags/4x3/ye.svg) !important;
}
.flag-icon-ye.flag-icon-squared {
  background-image: url(../flags/1x1/ye.svg) !important;
}
.flag-icon-yt {
  background-image: url(../flags/4x3/yt.svg) !important;
}
.flag-icon-yt.flag-icon-squared {
  background-image: url(../flags/1x1/yt.svg) !important;
}
.flag-icon-za {
  background-image: url(../flags/4x3/za.svg) !important;
}
.flag-icon-za.flag-icon-squared {
  background-image: url(../flags/1x1/za.svg) !important;
}
.flag-icon-zm {
  background-image: url(../flags/4x3/zm.svg) !important;
}
.flag-icon-zm.flag-icon-squared {
  background-image: url(../flags/1x1/zm.svg) !important;
}
.flag-icon-zw {
  background-image: url(../flags/4x3/zw.svg) !important;
}
.flag-icon-zw.flag-icon-squared {
  background-image: url(../flags/1x1/zw.svg) !important;
}
.flag-icon-es-ct {
  background-image: url(../flags/4x3/es-ct.svg) !important;
}
.flag-icon-es-ct.flag-icon-squared {
  background-image: url(../flags/1x1/es-ct.svg) !important;
}
.flag-icon-eu {
  background-image: url(../flags/4x3/eu.svg) !important;
}
.flag-icon-eu.flag-icon-squared {
  background-image: url(../flags/1x1/eu.svg) !important;
}
.flag-icon-gb-eng {
  background-image: url(../flags/4x3/gb-eng.svg) !important;
}
.flag-icon-gb-eng.flag-icon-squared {
  background-image: url(../flags/1x1/gb-eng.svg) !important;
}
.flag-icon-gb-nir {
  background-image: url(../flags/4x3/gb-nir.svg) !important;
}
.flag-icon-gb-nir.flag-icon-squared {
  background-image: url(../flags/1x1/gb-nir.svg) !important;
}
.flag-icon-gb-sct {
  background-image: url(../flags/4x3/gb-sct.svg) !important;
}
.flag-icon-gb-sct.flag-icon-squared {
  background-image: url(../flags/1x1/gb-sct.svg) !important;
}
.flag-icon-gb-wls {
  background-image: url(../flags/4x3/gb-wls.svg) !important;
}
.flag-icon-gb-wls.flag-icon-squared {
  background-image: url(../flags/1x1/gb-wls.svg) !important;
}
.flag-icon-un {
  background-image: url(../flags/4x3/un.svg) !important;
}
.flag-icon-un.flag-icon-squared {
  background-image: url(../flags/1x1/un.svg) !important;
}
.flag-icon-default {
  background-image: url(../flags/4x3/default.svg);
}
.flag-icon-default.flag-icon-squared {
  background-image: url(../flags/1x1/default.svg);
}


text:
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using Villermen.RuneScapeCacheTools.Cache.JavaClient;
using Villermen.RuneScapeCacheTools.Exception;
using Villermen.RuneScapeCacheTools.Model;
using Villermen.RuneScapeCacheTools.Utility;

namespace Villermen.RuneScapeCacheTools.Cache
{
    /// <summary>
    /// Can read and write files to the "virtual filesystem" format that is used by the Java client consisting of a
    /// single data (.dat2) file and some index (.id#) files. This class is thread-safe to quickly process files in
    /// parallel.
    /// </summary>
    public class JavaClientCache : ReferenceTableCache
    {
        public static string DefaultCacheDirectory => Environment.GetFolderPath(Environment.SpecialFolder.UserProfile) + "/jagexcache/runescape/LIVE/";

        private const int IndexPointerSize = 6; // filesize + firstSectorPosition

        /// <summary>
        /// The directory where the cache is located.
        /// </summary>
        public string CacheDirectory { get; }

        public bool ReadOnly { get; }

        private Stream _dataStream;

        private readonly Dictionary<CacheIndex, Stream> _indexStreams = new Dictionary<CacheIndex, Stream>();

        /// <summary>
        /// Lock that is used for reading from and writing to the streams.
        /// </summary>
        private readonly object _ioLock = new object();

        /// <summary>
        /// Creates an interface on the cache stored in the given directory.
        /// </summary>
        /// <param name="cacheDirectory"></param>
        /// <param name="readOnly"></param>
        public JavaClientCache(string? cacheDirectory = null, bool readOnly = true) : base(new RuneTek5CacheFileDecoder())
        {
            this.CacheDirectory = PathExtensions.FixDirectory(cacheDirectory ?? JavaClientCache.DefaultCacheDirectory);
            this.ReadOnly = readOnly;

            // Create the cache directory if writing is allowed.
            if (!this.ReadOnly)
            {
                Directory.CreateDirectory(this.CacheDirectory);
            }

            this.OpenStreams();
        }

        public override IEnumerable<CacheIndex> GetAvailableIndexes()
        {
            return this._indexStreams.Keys.Where(index => index != CacheIndex.ReferenceTables);
        }

        public override void Dispose()
        {
            this.CloseStreams();
        }

        public override byte[] GetFileData(CacheIndex index, int fileId, CacheFileInfo? info)
        {
            // Read the sectors and take their payload data up to the size of the contained file.
            return this
                .GetFileSectors(index, fileId, out var filesize)
                .Aggregate(new List<byte>(), (bytes, sector) =>
                {
                    bytes.AddRange(sector.Payload);
                    return bytes;
                })
                .Take(filesize)
                .ToArray();
        }

        protected override void PutFileData(CacheIndex index, int fileId, byte[] data, CacheFileInfo? info)
        {
            if (this.ReadOnly)
            {
                throw new CacheException("Can't write data in readonly mode.");
            }

            // Obtain existing sectors to overwrite in case the file already exists.
            var existingSectorPositions = new int[0];
            try
            {
                existingSectorPositions = this
                    .GetFileSectors(index, fileId, out _)
                    .Select(sector => sector.Position)
                    .ToArray();
            }
            catch (CacheFileNotFoundException)
            {
            }

            lock (this._ioLock)
            {
                var dataWriter = new BinaryWriter(this._dataStream);
                var sectors = Sector.FromData(data, index, fileId).ToArray();
                foreach (var sector in sectors)
                {
                    // Overwrite existing sector data if available, otherwise append to file.
                    sector.Position = sector.ChunkIndex < existingSectorPositions.Length
                        ? existingSectorPositions[sector.ChunkIndex]
                        : (int)(dataWriter.BaseStream.Length / Sector.Size);

                    // Set position of next sector
                    sector.NextSectorPosition = sector.ChunkIndex + 1 < existingSectorPositions.Length
                        ? existingSectorPositions[sector.ChunkIndex + 1]
                        : (int)(dataWriter.BaseStream.Length / Sector.Size);

                    // If both positions point toward the end of the stream, increase the next sector position to come after
                    // the current one.
                    if (sector.NextSectorPosition == sector.Position)
                    {
                        sector.NextSectorPosition++;
                    }

                    // Write the encoded sector
                    dataWriter.BaseStream.Position = sector.Position * Sector.Size;
                    dataWriter.Write(sector.Encode());
                }

                // Create or overwrite the entry to the file in the index file.

                // Create index file if it does not exist yet.
                if (!this._indexStreams.ContainsKey(index))
                {
                    var indexStream = System.IO.File.Open(
                        Path.Combine(this.CacheDirectory, "main_file_cache.idx" + (int)index),
                        FileMode.OpenOrCreate,
                        FileAccess.ReadWrite
                    );
                    this._indexStreams.Add(index, indexStream);
                }

                var indexWriter = new BinaryWriter(this._indexStreams[index]);
                var pointerPosition = fileId * JavaClientCache.IndexPointerSize;

                // Write zeroes up to the desired position of the index stream if it is larger than its size.
                if (indexWriter.BaseStream.Length < pointerPosition)
                {
                    indexWriter.BaseStream.Position = indexWriter.BaseStream.Length;
                    indexWriter.Write(Enumerable.Repeat((byte)0, (int)(pointerPosition - indexWriter.BaseStream.Length)).ToArray());
                }

                indexWriter.BaseStream.Position = pointerPosition;
                indexWriter.WriteUInt24BigEndian(data.Length);
                indexWriter.WriteUInt24BigEndian(sectors[0].Position);
            }
        }

        /// <exception cref="IOException"></exception>
        private void OpenStreams()
        {
            var fileAccess = (this.ReadOnly ? FileAccess.Read : FileAccess.ReadWrite);
            var dataFileMode = (this.ReadOnly ? FileMode.Open : FileMode.OpenOrCreate);
            var dataFilePath = Path.Combine(this.CacheDirectory, "main_file_cache.dat2");

            this._dataStream = System.IO.File.Open(dataFilePath, dataFileMode, fileAccess);

            // Open existing index files.
            for (var indexId = 0; indexId <= 255; indexId++)
            {
                var indexFile = Path.Combine(this.CacheDirectory, "main_file_cache.idx" + indexId);

                if (!System.IO.File.Exists(indexFile))
                {
                    continue;
                }

                this._indexStreams.Add((CacheIndex)indexId, System.IO.File.Open(indexFile, FileMode.Open, fileAccess));
            }
        }

        private void CloseStreams()
        {
            this._dataStream.Close();
            this._dataStream = null;

            foreach (var indexStream in this._indexStreams.Values)
            {
                indexStream.Close();
            }
            this._indexStreams.Clear();
        }

        /// <summary>
        /// Reads the sectors that make up the requested file.
        /// </summary>
        /// <param name="fileId"></param>
        /// <param name="filesize">Contains the size of the file contained in the sectors</param>
        /// <param name="index"></param>
        private IEnumerable<Sector> GetFileSectors(CacheIndex index, int fileId, out int filesize)
        {
            if (!this._indexStreams.ContainsKey(index))
            {
                throw new CacheFileNotFoundException($"Cannot read from index {(int)index} as it does not exist.");
            }

            lock (this._ioLock)
            {
                var indexReader = new BinaryReader(this._indexStreams[index]);
                var indexPosition = (long)fileId * JavaClientCache.IndexPointerSize;
                if (indexPosition < 0 || indexPosition >= indexReader.BaseStream.Length)
                {
                    throw new CacheFileNotFoundException($"File {fileId} is outside of index {(int)index}'s file bounds.");
                }

                var sectors = new List<Sector>();
                indexReader.BaseStream.Position = indexPosition;

                filesize = indexReader.ReadUInt24BigEndian();
                var firstSectorPosition = indexReader.ReadUInt24BigEndian();
                if (filesize <= 0)
                {
                    throw new CacheFileNotFoundException(
                        $"File {fileId} in index {(int)index} has no size meaning it is not stored in the cache."
                    );
                }

                var chunkId = 0;
                var remaining = filesize;
                var dataReader = new BinaryReader(this._dataStream);
                var sectorPosition = firstSectorPosition;
                do
                {
                    dataReader.BaseStream.Position = sectorPosition * Sector.Size;

                    var sectorBytes = dataReader.ReadBytesExactly(Sector.Size);
                    var sector = Sector.Decode(sectorPosition, sectorBytes, index, fileId, chunkId++);

                    var bytesRead = Math.Min(sector.Payload.Length, remaining);

                    remaining -= bytesRead;

                    sectors.Add(sector);

                    sectorPosition = sector.NextSectorPosition.Value;
                }
                while (remaining > 0);

                return sectors;
            }
        }
    }
}


text: First non-zero natural number.


text:
public abstract class Product {
}

public class ConcreteProductA extends Product {

	public ConcreteProductA() {
		System.out.println("ConcreteProductA constructor");
	}

}

public class ConcreteProductB extends Product {

	public ConcreteProductB() {
		System.out.println("ConcreteProductB constructor");
	}

}

public abstract class Creator {
	public abstract Product factoryMethod();
}

public class ConcreteCreatorA extends Creator {

	@Override
	public Product factoryMethod() {
		return new ConcreteProductA();
	}

}

public class ConcreteCreatorB extends Creator {

	@Override
	public Product factoryMethod() {
		return new ConcreteProductB();
	}

}

public class Client {

	public static void main(String[] args) {

		Creator creatorA = new ConcreteCreatorA();
		Creator creatorB = new ConcreteCreatorB();

		Product product1 = creatorA.factoryMethod();
		// ConcreteProductA constructor

		Product product2 = creatorB.factoryMethod();
		// ConcreteProductB constructor
	}
}


text:
``catkin build`` -- Build Packages
==================================

The ``build`` verb is used to build one or more packages in a catkin workspace.
Like most verbs, ``build`` is context-aware and can be executed from within any directory contained by an initialized workspace.
If a workspace is not yet initialized, ``build`` can initialize it with the default configuration, but only if it is called from the workspace root.
Specific workspaces can also be built from arbitrary working directories  with the ``--workspace`` option.

.. note::

    To set up a workspace and clone the repositories used in the following examples, you can use `rosinstall_generator <http://wiki.ros.org/rosinstall_generator>`_ and `wstool <http://wiki.ros.org/wstool>`_.
    The following clones all of the ROS packages necessary for building the introductory ROS tutorials:

    .. literalinclude:: ../examples/ros_tutorials_ws/0_checkout.bash
        :language: bash

Basic Usage
^^^^^^^^^^^

Previewing The Build
--------------------

Before actually building anything in the workspace, it is useful to preview which packages will be built and in what order.
This can be done with the ``--dry-run`` option:

.. literalinclude:: ../examples/ros_tutorials_ws/2_dry_run.bash
   :language: bash

In addition to the listing the package names and in which order they would be built, it also displays the build type of each package.

.. raw:: html

Building a Workspace
--------------------

When no packages are given as arguments, ``catkin build`` builds the entire workspace.
It automatically creates directories for a **build space** and a **devel space**:

.. literalinclude:: ../examples/ros_tutorials_ws/3_build.bash
   :language: bash

.. raw:: html

After the build finishes, the **build space** contains directories containing the intermediate build products for each package, and the **devel space** contains an FHS layout into which all the final build products are written.

.. note::

    The products of ``catkin build`` differ significantly from the behavior of ``catkin_make``, for example, which would have all of the build files and intermediate build products in a combined **build space** or ``catkin_make_isolated`` which would have an isolated FHS directory for each package in the **devel space**.

Status Line
-----------

When running ``catkin build`` with default options, it displays a "live" status line similar to the following:

.. code-block:: none

    [build - 20.2] [18/34 complete] [4/4 jobs] [1 queued] [xmlrpcpp:make (66%) - 4.9] ...

The status line stays at the bottom of the screen and displays the continuously-updated progress of the entire build as well as the active build jobs which are still running. It is composed of the following information:

 * ``[build - <T>]`` -- The first block on the left indicates the total elapsed build time ``<T>`` in seconds thus far.
 * ``[<M>/<N> complete]``  --  The second block from the left indicates the build progress in terms of the number of completed packages, ``<M>`` out of the total number of packages to be built ``<N>``.
 * ``[<M>/<N> jobs]`` --  The third block from the left indicates the number of active total low-level jobs ``<M>`` out of the total number of low-level workers ``<N>``.
 * ``[<N> queued]`` --  The fourth block from the left indicates the number of jobs ``<N>`` whose dependencies have already been satisfied and are ready to be built.
 * ``[<N> failed]`` --  The fifth block from the left indicates the number of jobs ``<N>`` which have failed.
   This block only appears once one or more jobs has failed.
 * ``[<package>:<stage> (
%) - <T>]`` -- The remaining blocks show details on the active jobs.
   These include the percent complete, ``
``, of the stage, if available, as well as the time elapsed building the package, ``<T>``.

When necessary, the status line can be disabled by passing the ``--no-status`` option to ``catkin build``.
This is sometimes required when running ``catkin build`` from within a program that doesn't support the ASCII escape sequences required to reset and re-write the status line.

Console Messages
----------------

Normally, unless an error occurs, the output from each package's build process is collected but not printed to the console.
All that is printed is a pair of messages designating the start and end of a package's build.
This is formatted like the following for the ``genmsg`` package:

.. code-block:: none

    ...
    Starting  >>> {JOB}
    ...
    Finished  <<< {JOB}   [ {TIME} seconds ]
    ...

Error messages are printed whenever a build job writes to ``stderr``.
In such cases, the ``build`` verb will automatically print the captured ``stderr`` buffer under a ``Warnings`` header once the job has completed, similarly to below:

.. code-block:: none

    ____________________________________________________________________________
    Warnings   << {JOB}:{STAGE} {LOGFILE PATH}
    {WARNINGS}
    {REPRODUCTION COMMAND}
    ............................................................................
    Finished   << {JOB}            [ {TIME} seconds ]

.. raw:: html

Note that the first line displays the path to the interleaved log file, which persists until the build space is cleaned.
Additionally, if a package fails, the output to ``stderr`` is printed under the ``Errors`` header.

.. code-block:: none

    ____________________________________________________________________________
    Errors     << {JOB}:{STAGE} {LOGFILE PATH}
    {ERRORS}
    {REPRODUCTION COMMAND}
    ............................................................................
    Failed     << {JOB}:{STAGE}    [ Exited with code {EXIT CODE} ]
    Failed     << {JOB}            [ {TIME} seconds ]

.. raw:: html

All of the messages from the underlying jobs can be shown when using the ``-v`` or ``--verbose`` option.
This will print the normal messages when a build job starts and finishes as well as the interleaved output to ``stdout`` and ``stderr`` from each build command in a block.

.. raw:: html

All output can be printed interleaved with the ``--interleave`` option.
In this case, each line is prefixed with the job and stage from which it came.

.. raw:: html

Build Summary
-------------

At the end of each build, a brief build summary is printed to guarantee that anomalies aren't missed.
This summary displays the total run-time, the number of successful jobs, the number of jobs which produced warnings, and the number of jobs which weren't attempted due to failed dependencies.

.. code-block:: none

    [build] Runtime: 1.9 seconds total.
    [build] Summary: 4 of 7 jobs completed.
    [build]   Warnings:  None.
    [build]   Abandoned: 1 jobs were abandoned.
    [build]   Failed:    2 jobs failed.

A more detailed summary can also be printed with the ``--summarize`` command, which lists the result for each package in the workspace.

Building Subsets of Packages
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Consider a Catkin workspace with a **source space** populated with the following Catkin packages which have yet to be built:

.. code-block:: bash

    $ pwd
    /tmp/path/to/my_catkin_ws

    $ ls ./*
    ./src:
    catkin             console_bridge     genlisp            genpy
    message_runtime    ros_comm           roscpp_core        std_msgs
    common_msgs        gencpp             genmsg             message_generation
    ros                ros_tutorials      rospack

Building Specific Packages
--------------------------

Specific packages can also be built by specifying them as positional arguments after the ``build`` verb:

.. literalinclude:: ../examples/ros_tutorials_ws/6_build_partial.bash
   :language: bash

.. raw:: html

As shown above, only 4 packages (``roslib`` and its dependencies), of the total 36 packages would be built.

Context-Aware Building
----------------------

In addition to building all packages or specified packages with various dependency requirements, ``catkin build`` can also determine the package containing the current working directory.
This is equivalent to specifying the name of the package on the command line, and is done by passing the ``--this`` option to ``catkin build`` like the following:

.. literalinclude:: ../examples/ros_tutorials_ws/7_build_this.bash
   :language: bash

.. raw:: html

Skipping Packages
-----------------

Suppose you built every package up to ``roslib``, but that package had a build error.
After fixing the error, you could run the same build command again, but the ``build`` verb provides an option to save time in this situation.
If re-started from the beginning, none of the products of the dependencies of ``roslib`` would be re-built, but it would still take some time for the underlying build system to verify that for each package.

Those checks could be skipped, however, by jumping directly to a given package.
You could use the ``--start-with`` option to continue the build where you left off after fixing the problem.

.. literalinclude:: ../examples/ros_tutorials_ws/8_build_start_with.bash
   :language: bash

.. raw:: html

.. note::

  ``catkin build`` will assume that all dependencies leading up to the package
  specified with the ``--start-with`` option have already been successfully
  built.

Building Single Packages
------------------------

If you're only interested in building a *single* package in a workspace, you can also use the ``--no-deps`` option along with a package name.
This will skip all of the package's dependencies, build the given package, and then exit.

.. literalinclude:: ../examples/ros_tutorials_ws/9_build_no_deps.bash
   :language: bash

.. raw:: html

Building and Running Tests
^^^^^^^^^^^^^^^^^^^^^^^^^^

Running tests for a given package typically is done by invoking a special ``make`` target like ``test`` or ``run_tests``.
catkin packages all define the ``run_tests`` target which aggregates all types of tests and runs them together.
So in order to get tests to build and run for your packages you need to pass them this additional ``run_tests`` or ``test`` target as a command line option to ``make``.

To run catkin tests for all catkin packages in the workspace, use the following:

.. code-block:: bash

    $ catkin run_tests

Or the longer version:

.. code-block:: bash

    $ catkin build [...] --catkin-make-args run_tests

To run a catkin test for a specific catkin package, from a directory within that package:

.. code-block:: bash

    $ catkin run_tests --no-deps --this

For non-catkin packages which define a ``test`` target, you can do this:

.. code-block:: bash

    $ catkin build [...] --make-args test

If you want to run tests for just one package, then you should build that package and this narrow down the build to just that package with the additional make argument:

.. code-block:: bash

    $ # First build the package
    $ catkin build package
    ...
    $ # Then run its tests
    $ catkin build package --no-deps --catkin-make-args run_tests
    $ # Or for non-catkin packages
    $ catkin build package --no-deps --make-args test

For catkin packages and the ``run_tests`` target, failing tests will not result in an non-zero exit code.
So if you want to check for failing tests, use the ``catkin_test_results`` command like this:

.. code-block:: bash

    $ catkin_test_results build/<package name>

The result code will be non-zero unless all tests passed.

Advanced Options
^^^^^^^^^^^^^^^^

Temporarily Changing Build Flags
--------------------------------

While the build configuration flags are set and stored in the build context, it's possible to temporarily override or augment them when using the ``build`` verb.

.. code-block:: bash

    $ catkin build --cmake-args -DCMAKE_C_FLAGS="-Wall -W -Wno-unused-parameter"

Building With Warnings
----------------------

It can sometimes be useful to compile with additional warnings enabled across your whole catkin workspace.
To achieve this, use a command similar to this:

.. code-block:: bash

    $ catkin build -v --cmake-args -DCMAKE_C_FLAGS="-Wall -W -Wno-unused-parameter"

This command passes the ``-DCMAKE_C_FLAGS=...`` argument to all invocations of ``cmake``.

Configuring Build Jobs
----------------------

By default ``catkin build`` on a computer with ``N`` cores will build up to ``N`` packages in parallel and will distribute ``N`` ``make`` jobs among them using an internal job server.
If your platform doesn't support job server scheduling, ``catkin build`` will pass ``-jN -lN`` to ``make`` for each package.

You can control the maximum number of packages allowed to build in parallel by using the ``-p`` or ``--parallel-packages`` option and you can change the number of ``make`` jobs available with the ``-j`` or ``--jobs`` option.

By default, these jobs options aren't passed to the underlying ``make`` command.
To disable the job server, you can use the ``--no-jobserver`` option, and you can pass flags directly to ``make`` with the ``--make-args`` option.

.. note::

    Jobs flags (``-jN`` and/or ``-lN``) can be passed directly to ``make`` by
    giving them to ``catkin build``, but other ``make`` arguments need to be
    passed to the ``--make-args`` option.

Configuring Memory Use
----------------------

In addition to CPU and load limits, ``catkin build`` can also limit the number of running jobs based on the available memory, using the hidden ``--mem-limit`` flag.
This flag requires installing the Python ``psutil`` module and is useful on systems without swap partitions or other situations where memory use needs to be limited.

Memory is specified either by percent or by the number of bytes.

For example, to specify that ``catkin build`` should not start additional parallel jobs when 50% of the available memory is used, you could run:

.. code-block:: bash

    $ catkin build --mem-limit 50%

Alternatively, if it should not start additional jobs when over 4GB of memory is used, you can specify:

.. code-block:: bash

    $ catkin build --mem-limit 4G

Full Command-Line Interface
^^^^^^^^^^^^^^^^^^^^^^^^^^^

.. literalinclude:: cli/catkin_build.txt
   :language: text