#include <CGAL/Exact_integer.h>
#include<CGAL/Homogeneous.h>
#include<CGAL/Convex_decomposition_3/Edge_sorter.h>

typedef CGAL::Exact_integer  RT;
typedef CGAL::Homogeneous<RT> Kernel;
typedef Kernel::Point_3 Point_3;
typedef Kernel::FT FT;

class LVertex {
  Point_3 pnt;
public:
  LVertex() {}
  LVertex(Point_3 p) : pnt(p) {}
  Point_3 point() { return pnt; }
};

class LEdge {
  LVertex* v;
  LEdge* t;
public:
  LEdge(LVertex* v_) : v(v_) {}

  ~LEdge()
  {
    if(v != NULL)
      delete v;
    v = NULL;
  }

  LVertex* source() { return v; }
  LEdge* twin() { return t; }
  void set_twin(LEdge* t_) { t = t_; }
  void reset_source() { v = NULL; }
};

template<typename Edget, typename Vertext>
class Report_new_vertex {

public:
  Report_new_vertex() {}
  Edget* operator()(Edget* e, Point_3 ip) {
    Edget* x = new Edget(new Vertext(ip));
    Edget* y = new Edget(new Vertext(ip));
    x->set_twin(e->twin());
    y->set_twin(e);
    e->twin()->set_twin(x);
    e->set_twin(y);
    return x;
  }
};

template<typename Iterator, typename Compare>
bool check_sorting(Iterator begin, Iterator end, Compare& compare)
{
  if(begin == end) return true;
  Iterator next = begin;
  for(++next; next != end; ++begin, ++next) {
    if(compare((*next)->source()->point(), (*begin)->source()->point()))
      return false;
  }
  return true;
}

typedef CGAL::Need_to_split<Kernel, std::less<Point_3> > SplitTest;
typedef CGAL::Compare_halfedges_in_reflex_edge_sorter<LEdge*, std::less<Point_3> >
  Compare_edges;
typedef std::multiset<LEdge*, Compare_edges> Container;
typedef Container::const_iterator Container_iterator;
typedef CGAL::Generic_edge_sorter
  <Point_3, std::less<FT>, SplitTest, Report_new_vertex<LEdge, LVertex>,  Container>
  GesSM;

int main()
{
  Container edges;
  Container_iterator ci;
  LEdge* e0 = new LEdge(new LVertex(Point_3(-1,0,-1)));
  LEdge* t0 = new LEdge(new LVertex(Point_3(-1,0,1)));
  LEdge* e0b = new LEdge(new LVertex(Point_3(-1,0,-1)));
  LEdge* t0b = new LEdge(new LVertex(Point_3(-1,0,1)));
  LEdge* e1 = new LEdge(new LVertex(Point_3(-2,-1,0)));
  LEdge* t1 = new LEdge(new LVertex(Point_3(2,1,0)));
  LEdge* e2 = new LEdge(new LVertex(Point_3(2,-1,0)));
  LEdge* t2 = new LEdge(new LVertex(Point_3(2,1,0)));
  LEdge* e3 = new LEdge(new LVertex(Point_3(-2,-1,-1)));
  LEdge* t3 = new LEdge(new LVertex(Point_3(2,1,-1)));
  LEdge* e4 = new LEdge(new LVertex(Point_3(-2,-1,1)));
  LEdge* t4 = new LEdge(new LVertex(Point_3(2,1,1)));
  LEdge* e5 = new LEdge(new LVertex(Point_3(-1,-1,0)));
  LEdge* t5 = new LEdge(new LVertex(Point_3(3,1,0)));
  LEdge* e6 = new LEdge(e0->source());
  LEdge* t6 = new LEdge(new LVertex(Point_3(0,0,-10)));
  LEdge* e7 = new LEdge(new LVertex(Point_3(-1,0,-1)));
  LEdge* t7 = new LEdge(new LVertex(Point_3(3,0,1)));

  e0->set_twin(t0);
  t0->set_twin(e0);
  e0b->set_twin(t0b);
  t0b->set_twin(e0b);
  e1->set_twin(t1);
  t1->set_twin(e1);
  e2->set_twin(t2);
  t2->set_twin(e2);
  e3->set_twin(t3);
  t3->set_twin(e3);
  e4->set_twin(t4);
  t4->set_twin(e4);
  e5->set_twin(t5);
  t5->set_twin(e5);
  e6->set_twin(t6);
  t6->set_twin(e6);
  e7->set_twin(t7);
  t7->set_twin(e7);

  std::less<Point_3> Less;
  SplitTest st;
  Report_new_vertex<LEdge, LVertex> rnv;
  GesSM gesSM;

  edges.clear();
  edges.insert(e2);
  edges.insert(e0);
  gesSM(edges, st, rnv);
  assert(check_sorting(edges.begin(), edges.end(), Less));
  assert(edges.size() == 2);
  assert((*edges.begin())->source()->point() == Point_3(-1,0,-1));

  edges.clear();
  edges.insert(e3);
  edges.insert(e0);
  gesSM(edges, st, rnv);
  assert(check_sorting(edges.begin(), edges.end(), Less));
  assert(edges.size() == 2);
  assert((*edges.begin())->source()->point() == Point_3(-2,-1,-1));

  edges.clear();
  edges.insert(e0);
  edges.insert(e4);
  gesSM(edges, st, rnv);
  assert(check_sorting(edges.begin(), edges.end(), Less));
  assert(edges.size() == 2);
  assert((*edges.begin())->source()->point() == Point_3(-2,-1,1));

  edges.clear();
  edges.insert(e5);
  edges.insert(e1);
  gesSM(edges, st, rnv);
  assert(check_sorting(edges.begin(), edges.end(), Less));
  assert(edges.size() == 2);
  assert((*edges.begin())->source()->point() == Point_3(-2,-1,0));

  edges.clear();
  edges.insert(e6);
  edges.insert(e0);
  edges.insert(e1);
  gesSM(edges, st, rnv);
  assert(check_sorting(edges.begin(), edges.end(), Less));
  assert(edges.size() == 4);
  ci = edges.begin(); ++ci; ++ci;
  assert(*ci == e0);
  LEdge* en0 = (*ci)->twin();
  assert(en0->source()->point() == Point_3(-1,0,0));
  ++ci;
  LEdge* en1 = *ci;
  assert(en1->source()->point() == Point_3(-1,0,0));
  assert(en1->twin() == t0);

  edges.clear();
  edges.insert(e0b);
  edges.insert(e1);
  edges.insert(e6);
  gesSM(edges, st, rnv);
  assert(check_sorting(edges.begin(), edges.end(), Less));
  assert(edges.size() == 4);
  ci = edges.begin(); ++ci;
  LEdge* en2 = (*ci)->twin();
  assert(en2->source()->point() == Point_3(-1,0,0));
  ++ci; ++ci;
  LEdge* en3 = *ci;
  assert(en3->source()->point() == Point_3(-1,0,0));

  edges.clear();
  edges.insert(e1);
  edges.insert(e7);
  gesSM(edges, st, rnv);
  assert(check_sorting(edges.begin(), edges.end(), Less));
  assert(edges.size() == 2);
  assert((*edges.begin())->source()->point() == Point_3(-2,-1,0));

  delete e0;
  delete e0b;
  delete e1;
  delete e2;
  delete e3;
  delete e4;
  delete e5;
  e6->reset_source();
  delete e6;
  delete e7;
  delete t0;
  delete t0b;
  delete t1;
  delete t2;
  delete t3;
  delete t4;
  delete t5;
  delete t6;
  delete t7;
  delete en0;
  delete en1;
  delete en2;
  delete en3;
}


<Canvas>
    <Kind>40</Kind>
    <Name>LightSettings</Name>
    <IsMinified>0</IsMinified>
    <XPosition>218.000000000</XPosition>
    <YPosition>238.000000000</YPosition>
</Canvas>
<Widget>
    <Kind>2</Kind>
    <Name>ENABLE</Name>
    <Value>1</Value>
</Widget>
<Widget>
    <Kind>2</Kind>
    <Name>SMOOTH</Name>
    <Value>1</Value>
</Widget>
<Widget>
    <Kind>25</Kind>
    <Name>H</Name>
    <Value>1.000000000</Value>
</Widget>
<Widget>
    <Kind>25</Kind>
    <Name>S</Name>
    <Value>0.000000000</Value>
</Widget>
<Widget>
    <Kind>25</Kind>
    <Name>V</Name>
    <Value>0.500000000</Value>
</Widget>


Uncles functionality for Substrate.

License: GPL-3.0-or-later WITH Classpath-exception-2.0


#include "caffe/caffe.hpp"

int main(int argc, char** argv) {
  LOG(FATAL) << "Deprecated. Use caffe time --model=... "
             "[--iterations=50] [--gpu] [--device_id=0]";
  return 0;
}


/*
 * Licensed to the Apache Software Foundation (ASF) under one or more
 * contributor license agreements.  See the NOTICE file distributed with
 * this work for additional information regarding copyright ownership.
 * The ASF licenses this file to You under the Apache License, Version 2.0
 * (the "License"); you may not use this file except in compliance with
 * the License.  You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package org.apache.wicket.examples.linkomatic;

import org.apache.wicket.examples.WicketExamplePage;
import org.apache.wicket.request.mapper.parameter.PageParameters;

/**
 * Trivial bookmarkable page.
 *
 * @author Jonathan Locke
 */
public class Page1 extends WicketExamplePage
{

	/**
	 * Constructor
	 *
	 * @param parameters
	 */
	public Page1(PageParameters parameters)
	{
	}

}


[ContentBrowser]
ContentBrowserTab1.SelectedPaths=/Game/VirtualRealityBP/Maps/


class mapColoringProblem {
  constructor(variables, domains, neighbours, condition) {
      this.noAssignment = 'nc'
      this.variables = variables;
      this.domains = domains;
      this.neighbours = neighbours;
      this.condition = condition;
      this.assignment = {};
      this.emptyAssignment();
    }
    //Assigns value 'a' to variable 'A'

  assign(A, a) {
    this.assignment[A] = a;
  }

  isAssigned(A, a) {
    return (this.assignment[A] == a);
  }

  emptyAssignment() {
    for (let i = 0; i < this.variables.length; i++) {
      //'nc' represents No assignment
      this.assignment[this.variables[i]] = this.noAssignment;
    }
  }

  countUnassigned() {
    let answer = 0;
    for (let i = 0; i < this.variables.length; i++) {
      //'nc' represents No assignment
      if (this.assignment[this.variables[i]] == this.noAssignment) {
        answer++;
      };
    }
    return answer;
  }

  checkConsistency() {
    //'consistence' is true if the current assignment is correct
    //inconsistencies contains the list of neighbours that violate the condition
    let answer = {
      'consistent': true,
      'inconsistencies': []
    }

    for (let i = 0; i < this.variables.length; i++) {
      let variable = this.variables[i];
      for (let j = 0; j < this.neighbours[variable].length; j++) {
        let neighbour = this.neighbours[variable][j];
        if (!this.condition(variable, this.assignment[variable], neighbour, this.assignment[neighbour])) {
          answer['consistent'] = false;
          answer['inconsistencies'].push([variable, neighbour]);
        }
      }
    }
    return answer;
  }

  isInDomain(variable, value) {
    return this.domains[variable].includes(value);
  }

  removeFromDomain(variable, value) {
    this.domains[variable] = this.domains[variable].filter(e => e !== value);
  }

  addToDomain(variable, value) {
    this.domains[variable].push(value);
  }

  getAssignments() {
    let assignment = {};
    for (let variable in this.assignment) {
      assignment[variable] = this.assignment[variable];
    }
    return assignment;
  }
}


.. include:: ../../Includes.txt

=======================================================
Deprecation: #80491 - BackendController inclusion hooks
=======================================================

See :issue:`80491`

Description
===========

The hook within BackendController :php:`$TYPO3_CONF_VARS["typo3/backend.php"]["additionalBackendItems"]`
has been marked as deprecated.

Loading ExtJS module JS/CSS files via :php:`ExtensionManagementUtility::addExtJSModule()` inside
the module configuration has been deprecated.

Calling :php:`BackendController->addJavascriptFile()`, :php:`BackendController->addJavascript()`
and :php:`BackendController->addCssFile()` will trigger a deprecation log entry.

Impact
======

Registering a hook via :php:`$TYPO3_CONF_VARS["typo3/backend.php"]["additionalBackendItems"]` and then
calling the Backend main page will trigger a deprecation log warning.

Registering any backend module which should load a global CSS/JS file within a module configuration
will trigger a deprecation log warning.

Calling any of the methods above will trigger a deprecation log warning.

Affected Installations
======================

Any installation using the hook or PHP methods directly in a custom extension, or using any of
the public methods above in a custom PHP script.

Migration
=========

Use the "constructPostProcess" hook within BackendController to load additional resources to achieve
the same functionality.

.. index:: Backend, PHP-API


package jetbrains.mps.lang.plugin.typesystem;

/*Generated by MPS */

import jetbrains.mps.lang.typesystem.runtime.AbstractInferenceRule_Runtime;
import jetbrains.mps.lang.typesystem.runtime.InferenceRule_Runtime;
import org.jetbrains.mps.openapi.model.SNode;
import jetbrains.mps.typesystem.inference.TypeCheckingContext;
import jetbrains.mps.lang.typesystem.runtime.IsApplicableStatus;
import jetbrains.mps.typesystem.inference.EquationInfo;
import org.jetbrains.mps.openapi.language.SAbstractConcept;
import org.jetbrains.mps.openapi.persistence.PersistenceFacade;
import jetbrains.mps.smodel.builder.SNodeBuilder;
import jetbrains.mps.smodel.adapter.structure.MetaAdapterFactory;
import jetbrains.mps.smodel.SReference;
import org.jetbrains.mps.openapi.language.SConcept;

public class typeof_GroupAccessOperation_InferenceRule extends AbstractInferenceRule_Runtime implements InferenceRule_Runtime {
  public typeof_GroupAccessOperation_InferenceRule() {
  }
  public void applyRule(final SNode groupAccessOperation, final TypeCheckingContext typeCheckingContext, IsApplicableStatus status) {
    {
      SNode _nodeToCheck_1029348928467 = groupAccessOperation;
      EquationInfo _info_12389875345 = new EquationInfo(_nodeToCheck_1029348928467, null, "r:00000000-0000-4000-0000-011c89590364(jetbrains.mps.lang.plugin.typesystem)", "3205675194086686086", 0, null);
      typeCheckingContext.createEquation((SNode) typeCheckingContext.typeOf(_nodeToCheck_1029348928467, "r:00000000-0000-4000-0000-011c89590364(jetbrains.mps.lang.plugin.typesystem)", "3205675194086686091", true), (SNode) _quotation_createNode_uliakk_a1a0c0a0b(), _info_12389875345);
    }
  }
  public SAbstractConcept getApplicableConcept() {
    return CONCEPTS.GroupAccessOperation$EO;
  }
  public IsApplicableStatus isApplicableAndPattern(SNode argument) {
    return new IsApplicableStatus(argument.getConcept().isSubConceptOf(getApplicableConcept()), null);
  }
  public boolean overrides() {
    return false;
  }
  private static SNode _quotation_createNode_uliakk_a1a0c0a0b() {
    PersistenceFacade facade = PersistenceFacade.getInstance();
    SNode quotedNode_1 = null;
    quotedNode_1 = new SNodeBuilder(null, null).init(MetaAdapterFactory.getConcept(MetaAdapterFactory.getLanguage(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, "jetbrains.mps.baseLanguage"), 0x101de48bf9eL, "ClassifierType")).getResult();
    quotedNode_1.setReference(MetaAdapterFactory.getReferenceLink(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0x101de48bf9eL, 0x101de490babL, "classifier"), SReference.create(MetaAdapterFactory.getReferenceLink(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0x101de48bf9eL, 0x101de490babL, "classifier"), quotedNode_1, facade.createModelReference("742f6602-5a2f-4313-aa6e-ae1cd4ffdc61/java:jetbrains.mps.workbench.action(MPS.Platform/)"), facade.createNodeId("~BaseGroup")));
    return quotedNode_1;
  }

  private static final class CONCEPTS {
    /*package*/ static final SConcept GroupAccessOperation$EO = MetaAdapterFactory.getConcept(0x28f9e4973b424291L, 0xaeba0a1039153ab1L, 0x2c7cd89ac8d17d74L, "jetbrains.mps.lang.plugin.structure.GroupAccessOperation");
  }
}


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

#include <alloca.h>
#include <string.h>

#include <notify.h>
#include <gstFormat.h>
#include <gstDBFTable.h>
#include <gstRecord.h>

gstDBFTable::gstDBFTable(const char* n)
    : gstTable(n) {
}

gstDBFTable::~gstDBFTable() {
  Close();
}

gstStatus gstDBFTable::Open(gstReadMode read_mode) {
  if ((file_pointer_ = fopen(name(), "r")) <= 0)
    return GST_OPEN_FAIL;

  if (ReadHeader() != GST_OKAY) {
    notify(NFY_WARN, "Unable to read header of dbf file %s", name());
    fclose(file_pointer_);
    return GST_READ_FAIL;
  }

  if (ReadFieldDescriptors() != GST_OKAY) {
    notify(NFY_WARN, "Error parsing field descriptors of dbf file %s", name());
    fclose(file_pointer_);
    return GST_READ_FAIL;
  }

  notify(NFY_DEBUG, "Successfully opened DBF file: %s", name());
  return GST_OKAY;
}

gstStatus gstDBFTable::Close() {
  if (file_pointer_ && fclose(file_pointer_) != 0) {
    notify(NFY_WARN, "Problems closing dbf file");
    return GST_UNKNOWN;
  }

  file_pointer_ = 0;
  return GST_OKAY;
}

gstRecordHandle gstDBFTable::Row(std::uint32_t row) {
  if (row < 0 || row >= _fileHeader.RecordNum) {
    notify(NFY_WARN, "Row %d is outside the valid range of 0-%d for file %s",
           row, _fileHeader.RecordNum - 1, name());
    return gstRecordHandle();
  }

  if (fseek(file_pointer_, _fileHeader.HeaderLength +
            _fileHeader.RecordLength * row, 0) < 0) {
    notify(NFY_WARN, "Problems seeking in dbf file: %s", name());
    return gstRecordHandle();
  }

  char buff[_fileHeader.RecordLength];

  if (fread(buff, _fileHeader.RecordLength, 1, file_pointer_) != 1) {
    notify(NFY_WARN, "Error reading row %d of file %s", row, name());
    return gstRecordHandle();
  }

  gstRecordHandle rec = NewRecord();

  notify(NFY_VERBOSE, "-------");
  for (std::uint32_t jj = 0; jj < NumColumns(); ++jj) {
    int len = _fieldList[jj]->Length;
    char str[len + 1];
    strncpy(str, &buff[_fieldList[jj]->Offset], len);
    str[len] = 0;
    if (*str != '\0') {
      for (char *p = str + len - 1; *p == ' ' && p >= str; --p)
        *p = 0;
    }

    // record->addField(new Field(_fieldList[jj].Type, len, str));
    rec->Field(jj)->set(str);

    notify(NFY_VERBOSE, "%d: %s", jj, str);

#if 0
    fprintf(stderr, "                  : ");
    unsigned char* xout = static_cast<unsigned char*>(&str[0]);
    for (int x = 0; x < strlen(str); x++, xout++)
      fprintf(stderr, "%02x ", *xout);
    fprintf(stderr, "\n");
#endif
  }

  return rec;
}

gstStatus gstDBFTable::ReadHeader() {
  DBF_FileHeader hdr;

  memset(static_cast<void*>(&hdr), 0, sizeof(DBF_FileHeader));

  if (fread(&hdr, sizeof(DBF_FileHeader), 1, file_pointer_) != 1)
    return GST_READ_FAIL;

  notify(NFY_VERBOSE, "DBF_FileHeader...");
  notify(NFY_VERBOSE, "     HeaderLength[0] = %d", hdr.HeaderLength[0]);
  notify(NFY_VERBOSE, "     HeaderLength[1] = %d", hdr.HeaderLength[1]);
  notify(NFY_VERBOSE, "     RecordLength[0] = %d", hdr.RecordLength[0]);
  notify(NFY_VERBOSE, "     RecordLength[1] = %d", hdr.RecordLength[1]);

  _fileHeader.Version = GET_INT_B_LE(hdr.Version);
  notify(NFY_VERBOSE, "Version: %d", _fileHeader.Version);

  // Date must be the year since 1900
  _fileHeader.Year = hdr.Date[0] + 1900;
  _fileHeader.Month = hdr.Date[1];
  _fileHeader.Day = hdr.Date[2];

  if (_fileHeader.Month > 12 || _fileHeader.Day > 31)
    notify(NFY_WARN, "Bad Date: Year=%04d Month=%02d Day=%02d",
           _fileHeader.Year, _fileHeader.Month, _fileHeader.Day);
  else
    notify(NFY_VERBOSE, "Date: Year=%04d Month=%02d Day=%02d",
           _fileHeader.Year, _fileHeader.Month, _fileHeader.Day);

  _fileHeader.RecordNum = GET_INT_B_LE(hdr.RecordNum);
  notify(NFY_VERBOSE, "RecordNum: %d", _fileHeader.RecordNum);
  num_rows_ = _fileHeader.RecordNum;

  _fileHeader.HeaderLength = GET_INT_B_LE(hdr.HeaderLength);
  notify(NFY_VERBOSE, "HeaderLength: %d", _fileHeader.HeaderLength);

  _fileHeader.RecordLength = GET_INT_B_LE(hdr.RecordLength);
  notify(NFY_VERBOSE, "RecordLength: %d", _fileHeader.RecordLength);

  // HeaderLength is the total size of the header, which
  // includes the main header, and each field descriptor header.
  // Both of these header types are 32 bytes long.
  // So to calculate the number of fields in each record, take
  // the HeaderLength and divide it by 32 to get the number of
  // separate sub-headers.  The first is the main file header,
  // so subtract one from the quotent and this is the number of
  // fields.
  num_columns_ = (_fileHeader.HeaderLength / 32) - 1;

  return GST_OKAY;
}   // End gstDBFTable::ReadHeader()

gstStatus gstDBFTable::ReadFieldDescriptors() {
  _fieldList.init(NumColumns());

  DBF_FieldDescriptor* fields =
    static_cast<DBF_FieldDescriptor*>(alloca(sizeof(DBF_FieldDescriptor) *
                                             NumColumns()));

  notify(NFY_VERBOSE, "About to read %d field descriptors of length %llu",
         NumColumns(),
         static_cast<long long unsigned>(sizeof(DBF_FieldDescriptor)));

  if (static_cast<std::uint32_t>(fread(fields, sizeof(DBF_FieldDescriptor),
                                NumColumns(), file_pointer_)) != NumColumns()) {
    notify(NFY_WARN, "Unable to read field descriptions.");
    return GST_READ_FAIL;
  }

  // Data records are preceeded by one byte that is a space (20H) if the
  // record is not deleted and an asterisk (2AH) if it is deleted.
  int prevOffset = 1;
  int prevSize = 0;
  for (std::uint32_t ii = 0; ii < NumColumns(); ++ii, ++fields) {
    DBF_FieldDescriptor_i *ifield = new DBF_FieldDescriptor_i;
    GET_STR(fields->Name, ifield->Name);
    notify(NFY_VERBOSE, "   Field %d:\t%s", ii, ifield->Name);

    char type = *fields->Type;
    switch (type) {
      case 'C': case 'c':
      case 'D': case 'd':
        ifield->Type = gstTagString;
        break;
      case 'N': case 'n':
      case 'M': case 'm':
      case 'F': case 'f':
        ifield->Type = gstTagDouble;
        break;
      case 'L': case 'l':
        ifield->Type = gstTagBoolean;
        break;
      default:
        notify(NFY_WARN, "Invalid Data Type: %c", type);
        ifield->Type = gstTagDouble;
    }

    notify(NFY_VERBOSE, "      Type\t%s",
           gstValue::NameFromType(ifield->Type));

    // This field is defined as "set in memory".  Why is it in the file?
    ifield->Offset = prevOffset + prevSize;
    notify(NFY_VERBOSE, "      Addr\t%d", ifield->Offset);

    ifield->Length = GET_INT_B_LE(fields->Length);
    notify(NFY_VERBOSE, "      Length\t%d", ifield->Length);

    ifield->DecimalCount = GET_INT_B_LE(fields->DecimalCount);
    notify(NFY_VERBOSE, "      Dec Cnt\t%d", ifield->DecimalCount);

    _fieldList.append(ifield);

    prevOffset = ifield->Offset;
    prevSize = ifield->Length;

    header_->addSpec(ifield->Name, ifield->Type);
  }

  unsigned char term;
  if ((fread(&term, 1, 1, file_pointer_) != 1) || term != 0x0d) {
    notify(NFY_WARN, "Failed to read field descriptions properly."
           " No terminating 0x0d. (%02x)", term);
    return GST_UNKNOWN;
  }

  return GST_OKAY;
}


import ops.cmd
import util.ip
DATA_TYPES = ['all', 'browser', 'cache', 'expensive', 'icmp', 'ip', 'jobobject', 'jobobjectdetails', 'logicaldisk', 'memory', 'networkinterface', 'objects', 'pagingfile', 'physicaldisk', 'process', 'processor', 'system', 'tcp', 'telephony', 'terminalservices', 'thread', 'udp']

class PerformanceCommand(ops.cmd.DszCommand, ):

    def __init__(self, plugin='performance', data=None, objectNumber=None, initialBufferSize=None, bare=False, target=None, **optdict):
        self.data = data
        self.objectNumber = objectNumber
        self.initialBufferSize = initialBufferSize
        self.bare = bare
        self.target = target
        ops.cmd.DszCommand.__init__(self, plugin, **optdict)

    def _getInitialBufferSize(self):
        return self._opt_initial

    def _setInitialBufferSize(self, bufferSize):
        assert ((bufferSize is None) or ((type(bufferSize) is int) and (bufferSize > 0))), 'bufferSize must be an integer greater than zero; or None to clear this option.'
        self._opt_initial = bufferSize
    initialBufferSize = property(_getInitialBufferSize, _setInitialBufferSize)

    def _getObjectNumber(self):
        return self._opt_objectNumber

    def _setObjectNumber(self, objectNumber):
        assert ((objectNumber is None) or ((type(objectNumber) is int) and (objectNumber >= 0))), 'Object number must be a positive integer or zero; or None to clear this option.'
        self._opt_objectNumber = objectNumber
    objectNumber = property(_getObjectNumber, _setObjectNumber)

    def _getData(self):
        return self._opt_data

    def _setData(self, data):
        assert ((type(data) is str) or (type(data) is unicode) or (data is None)), 'Data must be a string value or None to clear this option.'
        assert ((data is None) or (data.lower() in DATA_TYPES)), 'Data must be one of the valid data type queries.'
        self._opt_data = data
    data = property(_getData, _setData)

    def _getBare(self):
        return self._opt_bare

    def _setBare(self, bare):
        assert (type(bare) is bool), 'Bare must be Boolean.'
        self._opt_bare = bare
    bare = property(_getBare, _setBare)

    def _getTarget(self):
        return self._opt_target

    def _setTarget(self, target):
        assert ((type(target) is str) or (type(target) is unicode) or (target is None)), 'Target must be a string representation or None to clear.'
        assert ((target is None) or util.ip.validate(target)), 'Target address must be a valid IPv4 or IPv6 address.'
        self._opt_target = target
    target = property(_getTarget, _setTarget)

    def validateInput(self):
        if ((self.data is not None) and (self.objectNumber is not None)):
            return False
        if ((self.data is None) and (self.objectNumber is None)):
            return False
        return True

    def __str__(self):
        cmdstr = u''
        for prefix in self.prefixes:
            cmdstr += ('%s ' % prefix)
        cmdstr += (self.plugin + ' ')
        if self.initialBufferSize:
            cmdstr += ('-initial %s ' % self.initalBufferSize)
        if self.objectNumber:
            cmdstr += ('-objectnum %s ' % self.objectNumber)
        if self.data:
            cmdstr += ('-data %s ' % self.data)
        if self.bare:
            cmdstr += '-bare '
        if self.target:
            cmdstr += ('-target %s ' % self.target)
        return ops.utf8(cmdstr)
ops.cmd.command_classes['performance'] = PerformanceCommand


hsl(0, 100%, 50%)
hsl(60, 100%, 50%)
hsl(120, 100%, 50%)
hsl(180, 100%, 50%)
hsl(240, 100%, 50%)
hsl(300, 100%, 50%)
====
rgb(255, 0, 0)
rgb(255, 255, 0)
rgb(0, 255, 0)
rgb(0, 255, 255)
rgb(0, 0, 255)
rgb(255, 0, 255)

hsl(-360, 100%, 50%)
hsl(-300, 100%, 50%)
hsl(-240, 100%, 50%)
hsl(-180, 100%, 50%)
hsl(-120, 100%, 50%)
hsl(-60, 100%, 50%)
====
rgb(255, 0, 0)
rgb(255, 255, 0)
rgb(0, 255, 0)
rgb(0, 255, 255)
rgb(0, 0, 255)
rgb(255, 0, 255)

hsl(360, 100%, 50%)
hsl(420, 100%, 50%)
hsl(480, 100%, 50%)
hsl(540, 100%, 50%)
hsl(600, 100%, 50%)
hsl(660, 100%, 50%)
====
rgb(255, 0, 0)
rgb(255, 255, 0)
rgb(0, 255, 0)
rgb(0, 255, 255)
rgb(0, 0, 255)
rgb(255, 0, 255)

hsl(6120, 100%, 50%)
hsl(-9660, 100%, 50%)
hsl(99840, 100%, 50%)
hsl(-900, 100%, 50%)
hsl(-104880, 100%, 50%)
hsl(2820, 100%, 50%)
====
rgb(255, 0, 0)
rgb(255, 255, 0)
rgb(0, 255, 0)
rgb(0, 255, 255)
rgb(0, 0, 255)
rgb(255, 0, 255)

hsl(0, 100%, 50%)
hsl(12, 100%, 50%)
hsl(24, 100%, 50%)
hsl(36, 100%, 50%)
hsl(48, 100%, 50%)
hsl(60, 100%, 50%)
hsl(72, 100%, 50%)
hsl(84, 100%, 50%)
hsl(96, 100%, 50%)
hsl(108, 100%, 50%)
hsl(120, 100%, 50%)
====
rgb(255, 0, 0)
rgb(255, 51, 0)
rgb(255, 102, 0)
rgb(255, 153, 0)
rgb(255, 204, 0)
rgb(255, 255, 0)
rgb(204, 255, 0)
rgb(153, 255, 0)
rgb(102, 255, 0)
rgb(51, 255, 0)
rgb(0, 255, 0)

hsl(120, 100%, 50%)
hsl(132, 100%, 50%)
hsl(144, 100%, 50%)
hsl(156, 100%, 50%)
hsl(168, 100%, 50%)
hsl(180, 100%, 50%)
hsl(192, 100%, 50%)
hsl(204, 100%, 50%)
hsl(216, 100%, 50%)
hsl(228, 100%, 50%)
hsl(240, 100%, 50%)
====
rgb(0, 255, 0)
rgb(0, 255, 51)
rgb(0, 255, 102)
rgb(0, 255, 153)
rgb(0, 255, 204)
rgb(0, 255, 255)
rgb(0, 204, 255)
rgb(0, 153, 255)
rgb(0, 102, 255)
rgb(0, 51, 255)
rgb(0, 0, 255)

hsl(240, 100%, 50%)
hsl(252, 100%, 50%)
hsl(264, 100%, 50%)
hsl(276, 100%, 50%)
hsl(288, 100%, 50%)
hsl(300, 100%, 50%)
hsl(312, 100%, 50%)
hsl(324, 100%, 50%)
hsl(336, 100%, 50%)
hsl(348, 100%, 50%)
hsl(360, 100%, 50%)
====
rgb(0, 0, 255)
rgb(51, 0, 255)
rgb(102, 0, 255)
rgb(153, 0, 255)
rgb(204, 0, 255)
rgb(255, 0, 255)
rgb(255, 0, 204)
rgb(255, 0, 153)
rgb(255, 0, 102)
rgb(255, 0, 51)
rgb(255, 0, 0)

hsl(0, 20%, 50%)
hsl(0, 60%, 50%)
hsl(0, 100%, 50%)
====
rgb(153, 102, 102)
rgb(204, 51, 51)
rgb(255, 0, 0)

hsl(60, 20%, 50%)
hsl(60, 60%, 50%)
hsl(60, 100%, 50%)
====
rgb(153, 153, 102)
rgb(204, 204, 51)
rgb(255, 255, 0)

hsl(120, 20%, 50%)
hsl(120, 60%, 50%)
hsl(120, 100%, 50%)
====
rgb(102, 153, 102)
rgb(51, 204, 51)
rgb(0, 255, 0)

hsl(180, 20%, 50%)
hsl(180, 60%, 50%)
hsl(180, 100%, 50%)
====
rgb(102, 153, 153)
rgb(51, 204, 204)
rgb(0, 255, 255)

hsl(240, 20%, 50%)
hsl(240, 60%, 50%)
hsl(240, 100%, 50%)
====
rgb(102, 102, 153)
rgb(51, 51, 204)
rgb(0, 0, 255)

hsl(300, 20%, 50%)
hsl(300, 60%, 50%)
hsl(300, 100%, 50%)
====
rgb(153, 102, 153)
rgb(204, 51, 204)
rgb(255, 0, 255)

hsl(0, 100%, 0%)
hsl(0, 100%, 10%)
hsl(0, 100%, 20%)
hsl(0, 100%, 30%)
hsl(0, 100%, 40%)
hsl(0, 100%, 50%)
hsl(0, 100%, 60%)
hsl(0, 100%, 70%)
hsl(0, 100%, 80%)
hsl(0, 100%, 90%)
hsl(0, 100%, 100%)
====
rgb(0, 0, 0)
rgb(51, 0, 0)
rgb(102, 0, 0)
rgb(153, 0, 0)
rgb(204, 0, 0)
rgb(255, 0, 0)
rgb(255, 51, 51)
rgb(255, 102, 102)
rgb(255, 153, 153)
rgb(255, 204, 204)
rgb(255, 255, 255)

hsl(60, 100%, 0%)
hsl(60, 100%, 10%)
hsl(60, 100%, 20%)
hsl(60, 100%, 30%)
hsl(60, 100%, 40%)
hsl(60, 100%, 50%)
hsl(60, 100%, 60%)
hsl(60, 100%, 70%)
hsl(60, 100%, 80%)
hsl(60, 100%, 90%)
hsl(60, 100%, 100%)
====
rgb(0, 0, 0)
rgb(51, 51, 0)
rgb(102, 102, 0)
rgb(153, 153, 0)
rgb(204, 204, 0)
rgb(255, 255, 0)
rgb(255, 255, 51)
rgb(255, 255, 102)
rgb(255, 255, 153)
rgb(255, 255, 204)
rgb(255, 255, 255)

hsl(120, 100%, 0%)
hsl(120, 100%, 10%)
hsl(120, 100%, 20%)
hsl(120, 100%, 30%)
hsl(120, 100%, 40%)
hsl(120, 100%, 50%)
hsl(120, 100%, 60%)
hsl(120, 100%, 70%)
hsl(120, 100%, 80%)
hsl(120, 100%, 90%)
hsl(120, 100%, 100%)
====
rgb(0, 0, 0)
rgb(0, 51, 0)
rgb(0, 102, 0)
rgb(0, 153, 0)
rgb(0, 204, 0)
rgb(0, 255, 0)
rgb(51, 255, 51)
rgb(102, 255, 102)
rgb(153, 255, 153)
rgb(204, 255, 204)
rgb(255, 255, 255)

hsl(180, 100%, 0%)
hsl(180, 100%, 10%)
hsl(180, 100%, 20%)
hsl(180, 100%, 30%)
hsl(180, 100%, 40%)
hsl(180, 100%, 50%)
hsl(180, 100%, 60%)
hsl(180, 100%, 70%)
hsl(180, 100%, 80%)
hsl(180, 100%, 90%)
hsl(180, 100%, 100%)
====
rgb(0, 0, 0)
rgb(0, 51, 51)
rgb(0, 102, 102)
rgb(0, 153, 153)
rgb(0, 204, 204)
rgb(0, 255, 255)
rgb(51, 255, 255)
rgb(102, 255, 255)
rgb(153, 255, 255)
rgb(204, 255, 255)
rgb(255, 255, 255)

hsl(240, 100%, 0%)
hsl(240, 100%, 10%)
hsl(240, 100%, 20%)
hsl(240, 100%, 30%)
hsl(240, 100%, 40%)
hsl(240, 100%, 50%)
hsl(240, 100%, 60%)
hsl(240, 100%, 70%)
hsl(240, 100%, 80%)
hsl(240, 100%, 90%)
hsl(240, 100%, 100%)
====
rgb(0, 0, 0)
rgb(0, 0, 51)
rgb(0, 0, 102)
rgb(0, 0, 153)
rgb(0, 0, 204)
rgb(0, 0, 255)
rgb(51, 51, 255)
rgb(102, 102, 255)
rgb(153, 153, 255)
rgb(204, 204, 255)
rgb(255, 255, 255)

hsl(300, 100%, 0%)
hsl(300, 100%, 10%)
hsl(300, 100%, 20%)
hsl(300, 100%, 30%)
hsl(300, 100%, 40%)
hsl(300, 100%, 50%)
hsl(300, 100%, 60%)
hsl(300, 100%, 70%)
hsl(300, 100%, 80%)
hsl(300, 100%, 90%)
hsl(300, 100%, 100%)
====
rgb(0, 0, 0)
rgb(51, 0, 51)
rgb(102, 0, 102)
rgb(153, 0, 153)
rgb(204, 0, 204)
rgb(255, 0, 255)
rgb(255, 51, 255)
rgb(255, 102, 255)
rgb(255, 153, 255)
rgb(255, 204, 255)
rgb(255, 255, 255)


// +build freebsd

package initwd

import (
	"fmt"
	"os"
	"syscall"
)

// lookup the inode of a file on posix systems
func inode(path string) (uint64, error) {
	stat, err := os.Stat(path)
	if err != nil {
		return 0, err
	}
	if st, ok := stat.Sys().(*syscall.Stat_t); ok {
		return uint64(st.Ino), nil
	}
	return 0, fmt.Errorf("could not determine file inode")
}


@font-face {
  font-family: 'simple-line-icons';
  src: url('../fonts/Simple-Line-Icons.eot?v=2.4.0');
  src: url('../fonts/Simple-Line-Icons.eot?v=2.4.0#iefix') format('embedded-opentype'), url('../fonts/Simple-Line-Icons.woff2?v=2.4.0') format('woff2'), url('../fonts/Simple-Line-Icons.ttf?v=2.4.0') format('truetype'), url('../fonts/Simple-Line-Icons.woff?v=2.4.0') format('woff'), url('../fonts/Simple-Line-Icons.svg?v=2.4.0#simple-line-icons') format('svg');
  font-weight: normal;
  font-style: normal;
}
/*
 Use the following CSS code if you want to have a class per icon.
 Instead of a list of all class selectors, you can use the generic [class*="icon-"] selector, but it's slower:
*/
.icon-user,
.icon-people,
.icon-user-female,
.icon-user-follow,
.icon-user-following,
.icon-user-unfollow,
.icon-login,
.icon-logout,
.icon-emotsmile,
.icon-phone,
.icon-call-end,
.icon-call-in,
.icon-call-out,
.icon-map,
.icon-location-pin,
.icon-direction,
.icon-directions,
.icon-compass,
.icon-layers,
.icon-menu,
.icon-list,
.icon-options-vertical,
.icon-options,
.icon-arrow-down,
.icon-arrow-left,
.icon-arrow-right,
.icon-arrow-up,
.icon-arrow-up-circle,
.icon-arrow-left-circle,
.icon-arrow-right-circle,
.icon-arrow-down-circle,
.icon-check,
.icon-clock,
.icon-plus,
.icon-minus,
.icon-close,
.icon-event,
.icon-exclamation,
.icon-organization,
.icon-trophy,
.icon-screen-smartphone,
.icon-screen-desktop,
.icon-plane,
.icon-notebook,
.icon-mustache,
.icon-mouse,
.icon-magnet,
.icon-energy,
.icon-disc,
.icon-cursor,
.icon-cursor-move,
.icon-crop,
.icon-chemistry,
.icon-speedometer,
.icon-shield,
.icon-screen-tablet,
.icon-magic-wand,
.icon-hourglass,
.icon-graduation,
.icon-ghost,
.icon-game-controller,
.icon-fire,
.icon-eyeglass,
.icon-envelope-open,
.icon-envelope-letter,
.icon-bell,
.icon-badge,
.icon-anchor,
.icon-wallet,
.icon-vector,
.icon-speech,
.icon-puzzle,
.icon-printer,
.icon-present,
.icon-playlist,
.icon-pin,
.icon-picture,
.icon-handbag,
.icon-globe-alt,
.icon-globe,
.icon-folder-alt,
.icon-folder,
.icon-film,
.icon-feed,
.icon-drop,
.icon-drawer,
.icon-docs,
.icon-doc,
.icon-diamond,
.icon-cup,
.icon-calculator,
.icon-bubbles,
.icon-briefcase,
.icon-book-open,
.icon-basket-loaded,
.icon-basket,
.icon-bag,
.icon-action-undo,
.icon-action-redo,
.icon-wrench,
.icon-umbrella,
.icon-trash,
.icon-tag,
.icon-support,
.icon-frame,
.icon-size-fullscreen,
.icon-size-actual,
.icon-shuffle,
.icon-share-alt,
.icon-share,
.icon-rocket,
.icon-question,
.icon-pie-chart,
.icon-pencil,
.icon-note,
.icon-loop,
.icon-home,
.icon-grid,
.icon-graph,
.icon-microphone,
.icon-music-tone-alt,
.icon-music-tone,
.icon-earphones-alt,
.icon-earphones,
.icon-equalizer,
.icon-like,
.icon-dislike,
.icon-control-start,
.icon-control-rewind,
.icon-control-play,
.icon-control-pause,
.icon-control-forward,
.icon-control-end,
.icon-volume-1,
.icon-volume-2,
.icon-volume-off,
.icon-calendar,
.icon-bulb,
.icon-chart,
.icon-ban,
.icon-bubble,
.icon-camrecorder,
.icon-camera,
.icon-cloud-download,
.icon-cloud-upload,
.icon-envelope,
.icon-eye,
.icon-flag,
.icon-heart,
.icon-info,
.icon-key,
.icon-link,
.icon-lock,
.icon-lock-open,
.icon-magnifier,
.icon-magnifier-add,
.icon-magnifier-remove,
.icon-paper-clip,
.icon-paper-plane,
.icon-power,
.icon-refresh,
.icon-reload,
.icon-settings,
.icon-star,
.icon-symbol-female,
.icon-symbol-male,
.icon-target,
.icon-credit-card,
.icon-paypal,
.icon-social-tumblr,
.icon-social-twitter,
.icon-social-facebook,
.icon-social-instagram,
.icon-social-linkedin,
.icon-social-pinterest,
.icon-social-github,
.icon-social-google,
.icon-social-reddit,
.icon-social-skype,
.icon-social-dribbble,
.icon-social-behance,
.icon-social-foursqare,
.icon-social-soundcloud,
.icon-social-spotify,
.icon-social-stumbleupon,
.icon-social-youtube,
.icon-social-dropbox,
.icon-social-vkontakte,
.icon-social-steam {
  font-family: 'simple-line-icons';
  speak: none;
  font-style: normal;
  font-weight: normal;
  font-variant: normal;
  text-transform: none;
  line-height: 1;
  /* Better Font Rendering =========== */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
.icon-user:before {
  content: "\e005";
}
.icon-people:before {
  content: "\e001";
}
.icon-user-female:before {
  content: "\e000";
}
.icon-user-follow:before {
  content: "\e002";
}
.icon-user-following:before {
  content: "\e003";
}
.icon-user-unfollow:before {
  content: "\e004";
}
.icon-login:before {
  content: "\e066";
}
.icon-logout:before {
  content: "\e065";
}
.icon-emotsmile:before {
  content: "\e021";
}
.icon-phone:before {
  content: "\e600";
}
.icon-call-end:before {
  content: "\e048";
}
.icon-call-in:before {
  content: "\e047";
}
.icon-call-out:before {
  content: "\e046";
}
.icon-map:before {
  content: "\e033";
}
.icon-location-pin:before {
  content: "\e096";
}
.icon-direction:before {
  content: "\e042";
}
.icon-directions:before {
  content: "\e041";
}
.icon-compass:before {
  content: "\e045";
}
.icon-layers:before {
  content: "\e034";
}
.icon-menu:before {
  content: "\e601";
}
.icon-list:before {
  content: "\e067";
}
.icon-options-vertical:before {
  content: "\e602";
}
.icon-options:before {
  content: "\e603";
}
.icon-arrow-down:before {
  content: "\e604";
}
.icon-arrow-left:before {
  content: "\e605";
}
.icon-arrow-right:before {
  content: "\e606";
}
.icon-arrow-up:before {
  content: "\e607";
}
.icon-arrow-up-circle:before {
  content: "\e078";
}
.icon-arrow-left-circle:before {
  content: "\e07a";
}
.icon-arrow-right-circle:before {
  content: "\e079";
}
.icon-arrow-down-circle:before {
  content: "\e07b";
}
.icon-check:before {
  content: "\e080";
}
.icon-clock:before {
  content: "\e081";
}
.icon-plus:before {
  content: "\e095";
}
.icon-minus:before {
  content: "\e615";
}
.icon-close:before {
  content: "\e082";
}
.icon-event:before {
  content: "\e619";
}
.icon-exclamation:before {
  content: "\e617";
}
.icon-organization:before {
  content: "\e616";
}
.icon-trophy:before {
  content: "\e006";
}
.icon-screen-smartphone:before {
  content: "\e010";
}
.icon-screen-desktop:before {
  content: "\e011";
}
.icon-plane:before {
  content: "\e012";
}
.icon-notebook:before {
  content: "\e013";
}
.icon-mustache:before {
  content: "\e014";
}
.icon-mouse:before {
  content: "\e015";
}
.icon-magnet:before {
  content: "\e016";
}
.icon-energy:before {
  content: "\e020";
}
.icon-disc:before {
  content: "\e022";
}
.icon-cursor:before {
  content: "\e06e";
}
.icon-cursor-move:before {
  content: "\e023";
}
.icon-crop:before {
  content: "\e024";
}
.icon-chemistry:before {
  content: "\e026";
}
.icon-speedometer:before {
  content: "\e007";
}
.icon-shield:before {
  content: "\e00e";
}
.icon-screen-tablet:before {
  content: "\e00f";
}
.icon-magic-wand:before {
  content: "\e017";
}
.icon-hourglass:before {
  content: "\e018";
}
.icon-graduation:before {
  content: "\e019";
}
.icon-ghost:before {
  content: "\e01a";
}
.icon-game-controller:before {
  content: "\e01b";
}
.icon-fire:before {
  content: "\e01c";
}
.icon-eyeglass:before {
  content: "\e01d";
}
.icon-envelope-open:before {
  content: "\e01e";
}
.icon-envelope-letter:before {
  content: "\e01f";
}
.icon-bell:before {
  content: "\e027";
}
.icon-badge:before {
  content: "\e028";
}
.icon-anchor:before {
  content: "\e029";
}
.icon-wallet:before {
  content: "\e02a";
}
.icon-vector:before {
  content: "\e02b";
}
.icon-speech:before {
  content: "\e02c";
}
.icon-puzzle:before {
  content: "\e02d";
}
.icon-printer:before {
  content: "\e02e";
}
.icon-present:before {
  content: "\e02f";
}
.icon-playlist:before {
  content: "\e030";
}
.icon-pin:before {
  content: "\e031";
}
.icon-picture:before {
  content: "\e032";
}
.icon-handbag:before {
  content: "\e035";
}
.icon-globe-alt:before {
  content: "\e036";
}
.icon-globe:before {
  content: "\e037";
}
.icon-folder-alt:before {
  content: "\e039";
}
.icon-folder:before {
  content: "\e089";
}
.icon-film:before {
  content: "\e03a";
}
.icon-feed:before {
  content: "\e03b";
}
.icon-drop:before {
  content: "\e03e";
}
.icon-drawer:before {
  content: "\e03f";
}
.icon-docs:before {
  content: "\e040";
}
.icon-doc:before {
  content: "\e085";
}
.icon-diamond:before {
  content: "\e043";
}
.icon-cup:before {
  content: "\e044";
}
.icon-calculator:before {
  content: "\e049";
}
.icon-bubbles:before {
  content: "\e04a";
}
.icon-briefcase:before {
  content: "\e04b";
}
.icon-book-open:before {
  content: "\e04c";
}
.icon-basket-loaded:before {
  content: "\e04d";
}
.icon-basket:before {
  content: "\e04e";
}
.icon-bag:before {
  content: "\e04f";
}
.icon-action-undo:before {
  content: "\e050";
}
.icon-action-redo:before {
  content: "\e051";
}
.icon-wrench:before {
  content: "\e052";
}
.icon-umbrella:before {
  content: "\e053";
}
.icon-trash:before {
  content: "\e054";
}
.icon-tag:before {
  content: "\e055";
}
.icon-support:before {
  content: "\e056";
}
.icon-frame:before {
  content: "\e038";
}
.icon-size-fullscreen:before {
  content: "\e057";
}
.icon-size-actual:before {
  content: "\e058";
}
.icon-shuffle:before {
  content: "\e059";
}
.icon-share-alt:before {
  content: "\e05a";
}
.icon-share:before {
  content: "\e05b";
}
.icon-rocket:before {
  content: "\e05c";
}
.icon-question:before {
  content: "\e05d";
}
.icon-pie-chart:before {
  content: "\e05e";
}
.icon-pencil:before {
  content: "\e05f";
}
.icon-note:before {
  content: "\e060";
}
.icon-loop:before {
  content: "\e064";
}
.icon-home:before {
  content: "\e069";
}
.icon-grid:before {
  content: "\e06a";
}
.icon-graph:before {
  content: "\e06b";
}
.icon-microphone:before {
  content: "\e063";
}
.icon-music-tone-alt:before {
  content: "\e061";
}
.icon-music-tone:before {
  content: "\e062";
}
.icon-earphones-alt:before {
  content: "\e03c";
}
.icon-earphones:before {
  content: "\e03d";
}
.icon-equalizer:before {
  content: "\e06c";
}
.icon-like:before {
  content: "\e068";
}
.icon-dislike:before {
  content: "\e06d";
}
.icon-control-start:before {
  content: "\e06f";
}
.icon-control-rewind:before {
  content: "\e070";
}
.icon-control-play:before {
  content: "\e071";
}
.icon-control-pause:before {
  content: "\e072";
}
.icon-control-forward:before {
  content: "\e073";
}
.icon-control-end:before {
  content: "\e074";
}
.icon-volume-1:before {
  content: "\e09f";
}
.icon-volume-2:before {
  content: "\e0a0";
}
.icon-volume-off:before {
  content: "\e0a1";
}
.icon-calendar:before {
  content: "\e075";
}
.icon-bulb:before {
  content: "\e076";
}
.icon-chart:before {
  content: "\e077";
}
.icon-ban:before {
  content: "\e07c";
}
.icon-bubble:before {
  content: "\e07d";
}
.icon-camrecorder:before {
  content: "\e07e";
}
.icon-camera:before {
  content: "\e07f";
}
.icon-cloud-download:before {
  content: "\e083";
}
.icon-cloud-upload:before {
  content: "\e084";
}
.icon-envelope:before {
  content: "\e086";
}
.icon-eye:before {
  content: "\e087";
}
.icon-flag:before {
  content: "\e088";
}
.icon-heart:before {
  content: "\e08a";
}
.icon-info:before {
  content: "\e08b";
}
.icon-key:before {
  content: "\e08c";
}
.icon-link:before {
  content: "\e08d";
}
.icon-lock:before {
  content: "\e08e";
}
.icon-lock-open:before {
  content: "\e08f";
}
.icon-magnifier:before {
  content: "\e090";
}
.icon-magnifier-add:before {
  content: "\e091";
}
.icon-magnifier-remove:before {
  content: "\e092";
}
.icon-paper-clip:before {
  content: "\e093";
}
.icon-paper-plane:before {
  content: "\e094";
}
.icon-power:before {
  content: "\e097";
}
.icon-refresh:before {
  content: "\e098";
}
.icon-reload:before {
  content: "\e099";
}
.icon-settings:before {
  content: "\e09a";
}
.icon-star:before {
  content: "\e09b";
}
.icon-symbol-female:before {
  content: "\e09c";
}
.icon-symbol-male:before {
  content: "\e09d";
}
.icon-target:before {
  content: "\e09e";
}
.icon-credit-card:before {
  content: "\e025";
}
.icon-paypal:before {
  content: "\e608";
}
.icon-social-tumblr:before {
  content: "\e00a";
}
.icon-social-twitter:before {
  content: "\e009";
}
.icon-social-facebook:before {
  content: "\e00b";
}
.icon-social-instagram:before {
  content: "\e609";
}
.icon-social-linkedin:before {
  content: "\e60a";
}
.icon-social-pinterest:before {
  content: "\e60b";
}
.icon-social-github:before {
  content: "\e60c";
}
.icon-social-google:before {
  content: "\e60d";
}
.icon-social-reddit:before {
  content: "\e60e";
}
.icon-social-skype:before {
  content: "\e60f";
}
.icon-social-dribbble:before {
  content: "\e00d";
}
.icon-social-behance:before {
  content: "\e610";
}
.icon-social-foursqare:before {
  content: "\e611";
}
.icon-social-soundcloud:before {
  content: "\e612";
}
.icon-social-spotify:before {
  content: "\e613";
}
.icon-social-stumbleupon:before {
  content: "\e614";
}
.icon-social-youtube:before {
  content: "\e008";
}
.icon-social-dropbox:before {
  content: "\e00c";
}
.icon-social-vkontakte:before {
  content: "\e618";
}
.icon-social-steam:before {
  content: "\e620";
}


//
//     Generated by class-dump 3.5 (64 bit) (Debug version compiled Sep 17 2017 16:24:48).
//
//     class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2015 by Steve Nygard.
//

#import <MMCommon/MMObject.h>

@class NSMutableDictionary, PublicWifiDB;

@interface PublicWifiCache : MMObject
{
    NSMutableDictionary *_notRegisterDict;
    PublicWifiDB *_db;
}

+ (id)getInstance;
@property(retain, nonatomic) PublicWifiDB *db; // @synthesize db=_db;
@property(retain, nonatomic) NSMutableDictionary *notRegisterDict; // @synthesize notRegisterDict=_notRegisterDict;
- (void).cxx_destruct;
- (id)getAPCheckConfig;
- (void)saveAPCheckConfig:(id)arg1;
- (_Bool)isApCheckNotRegisterIn12hSinceLastTryWithMac:(id)arg1;
- (void)saveApcheckNotRegisterTime:(double)arg1 mac:(id)arg2;
- (id)retrivalApAuthForSsid:(id)arg1;
- (_Bool)removeApBase:(id)arg1;
- (id)retrivalApBaseForMac:(id)arg1;
- (_Bool)saveApBase:(id)arg1;
- (void)cleanCache;
- (void)closeDB;
- (void)initDB;
- (_Bool)shouldUserConfirm;
- (void)userConfirm;
- (id)convertAPBase:(id)arg1;
- (id)init;
- (void)dealloc;

@end


use crate::run::{ComparisonError, Editor, RenameError};
use crate::{Run, Segment};

#[test]
fn adding_a_new_comparison_works() {
    let mut run = Run::new();
    run.push_segment(Segment::new("s"));
    let mut editor = Editor::new(run).unwrap();
    let c = editor.add_comparison("My Comparison");
    assert_eq!(c, Ok(()));
}

#[test]
fn adding_a_duplicate_fails() {
    let mut run = Run::new();
    run.push_segment(Segment::new("s"));
    let mut editor = Editor::new(run).unwrap();
    let c = editor.add_comparison("Best Segments");
    assert_eq!(c, Err(ComparisonError::DuplicateName));
}

#[test]
fn renaming_works() {
    let mut run = Run::new();
    run.push_segment(Segment::new("s"));
    run.add_custom_comparison("Custom").ok();
    let mut editor = Editor::new(run).unwrap();
    let c = editor.rename_comparison("Custom", "My Comparison");
    assert_eq!(c, Ok(()));
}

#[test]
fn renaming_a_missing_comparison_fails() {
    let mut run = Run::new();
    run.push_segment(Segment::new("s"));
    run.add_custom_comparison("Custom").ok();
    let mut editor = Editor::new(run).unwrap();
    let c = editor.rename_comparison("Bad", "My Comparison");
    assert_eq!(c, Err(RenameError::OldNameNotFound));
}

#[test]
fn renaming_to_a_race_name_fails() {
    let mut run = Run::new();
    run.push_segment(Segment::new("s"));
    run.add_custom_comparison("Custom").ok();
    let mut editor = Editor::new(run).unwrap();
    let c = editor.rename_comparison("Custom", "[Race]Custom");
    assert_eq!(
        c,
        Err(RenameError::InvalidName {
            source: ComparisonError::NameStartsWithRace
        })
    );
}

#[test]
fn renaming_to_an_existing_name_fails() {
    let mut run = Run::new();
    run.push_segment(Segment::new("s"));
    run.add_custom_comparison("Custom").ok();
    run.add_custom_comparison("Custom2").ok();
    let mut editor = Editor::new(run).unwrap();
    let c = editor.rename_comparison("Custom2", "Custom");
    assert_eq!(
        c,
        Err(RenameError::InvalidName {
            source: ComparisonError::DuplicateName
        })
    );
}

#[test]
fn reordering_works() {
    let mut run = Run::new();
    let segment = Segment::new("");
    run.push_segment(segment);
    run.add_custom_comparison("A").unwrap();
    run.add_custom_comparison("B").unwrap();
    run.add_custom_comparison("C").unwrap();
    run.add_custom_comparison("D").unwrap();
    let mut editor = Editor::new(run).unwrap();

    editor.move_comparison(3, 1).unwrap();
    assert_eq!(
        &editor.run().custom_comparisons()[1..],
        ["A", "D", "B", "C"]
    );
    editor.move_comparison(0, 2).unwrap();
    assert_eq!(
        &editor.run().custom_comparisons()[1..],
        ["D", "B", "A", "C"]
    );
    editor.move_comparison(1, 3).unwrap();
    assert_eq!(
        &editor.run().custom_comparisons()[1..],
        ["D", "A", "C", "B"]
    );
    editor.move_comparison(3, 0).unwrap();
    assert_eq!(
        &editor.run().custom_comparisons()[1..],
        ["B", "D", "A", "C"]
    );
    editor.move_comparison(0, 3).unwrap();
    assert_eq!(
        &editor.run().custom_comparisons()[1..],
        ["D", "A", "C", "B"]
    );
}


<!DOCTYPE html>

	<link href="../../css/font-awesome.min.css" rel="stylesheet" type="text/css">
	<link href="../../css/froala_editor.min.css" rel="stylesheet" type="text/css">

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec facilisis diam in odio iaculis blandit. Nunc eu mauris sit amet purus viverra gravida ut a dui. Vivamus nec rutrum augue, pharetra faucibus purus. Maecenas non orci sagittis, vehicula lorem et, dignissim nunc. Suspendisse suscipit, diam non varius facilisis, enim libero tincidunt magna, sit amet iaculis eros libero sit amet eros. Vestibulum a rhoncus felis. Nam lacus nulla, consequat ac lacus sit amet, accumsan pellentesque risus. Aenean viverra mi at urna mattis fermentum. Curabitur porta metus in tortor elementum, in semper nulla ullamcorper. Vestibulum mattis tempor tortor quis gravida. In rhoncus risus nibh. Nullam condimentum dapibus massa vel fringilla. Sed hendrerit sed est quis facilisis. Ut sit amet nibh sem. Pellentesque imperdiet mollis libero.

Aenean sed hendrerit velit. Nullam eu mi dolor. Maecenas et erat risus. Nulla ac auctor diam, non aliquet ante. Fusce ullamcorper, ipsum id tempor lacinia, sem tellus malesuada libero, quis ornare sem massa in orci. Sed dictum dictum tristique. Proin eros turpis, ultricies eu sapien eget, ornare rutrum ipsum. Pellentesque eros nisl, ornare nec ipsum sed, aliquet sollicitudin erat. Nulla tincidunt porta vehicula.

Nullam laoreet imperdiet orci ac euismod. Curabitur vel lectus nisi. Phasellus accumsan aliquet augue, eu rutrum tellus iaculis in. Nunc viverra ultrices mollis. Curabitur malesuada nunc massa, ut imperdiet arcu lobortis sed. Cras ac arcu mauris. Maecenas id lectus nisl. Donec consectetur scelerisque quam at ultricies. Nam quis magna iaculis, condimentum metus ut, elementum metus. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vivamus id tempus nisi.


;; Common Lisp Script
;; Manoel Vilela

(defun sum-digits (number &optional (base 10))
  (loop for n = number then q
        for (q r) = (multiple-value-list (truncate n base))
        sum r until (zerop q)))

(defun solution ()
  (loop for a from 1 to 100
        maximize (loop for b from 1 to 100
                       maximize (sum-digits (expt a b)))))

(format t "~a~%" (solution))


//
//  MTIImageViewProtocol.swift
//  MetalPetal
//
//  Created by Yu Ao on 2019/7/5.
//

import Metal

#if SWIFT_PACKAGE
import MetalPetalObjectiveC.Core
#endif

public protocol MTIImageViewProtocol: class {

    var automaticallyCreatesContext: Bool { get set }

    var colorPixelFormat: MTLPixelFormat { get set }

    var clearColor: MTLClearColor { get set }

    var resizingMode: MTIDrawableRenderingResizingMode { get set }

    var context: MTIContext? { get set }

    var image: MTIImage? { get set }
}

extension MTIImageViewProtocol {
    public var inputPort: Port<Self, MTIImage?, ReferenceWritableKeyPath<Self, MTIImage?>> {
        return Port(self, \.image)
    }
}

#if canImport(UIKit)

extension MTIImageView: MTIImageViewProtocol {

}

extension MTIThreadSafeImageView: MTIImageViewProtocol {

}

extension MTIImageView: InputPortProvider {

}

extension MTIThreadSafeImageView: InputPortProvider {

}

#endif


Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 2013
VisualStudioVersion = 12.0.40629.0
MinimumVisualStudioVersion = 10.0.40219.1
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "PluginManager", "pluginManager\projects\2015\PluginManager.vcxproj", "{0A9F9D63-C282-4AE8-9F80-A6D5F541AD12}"
	ProjectSection(ProjectDependencies) = postProject
		{C83E2A6F-9747-4855-9D61-A88359450ED6} = {C83E2A6F-9747-4855-9D61-A88359450ED6}
		{F8F0B077-8778-4CB9-9B54-EC67A3D2C750} = {F8F0B077-8778-4CB9-9B54-EC67A3D2C750}
		{E3DCABE9-3953-4A81-8B71-DEF9AD21753B} = {E3DCABE9-3953-4A81-8B71-DEF9AD21753B}
		{69CC76EB-0183-4622-929C-02E860A66A23} = {69CC76EB-0183-4622-929C-02E860A66A23}
	EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libinstall", "libinstall\projects\2015\libinstall.vcxproj", "{F8F0B077-8778-4CB9-9B54-EC67A3D2C750}"
	ProjectSection(ProjectDependencies) = postProject
		{C83E2A6F-9747-4855-9D61-A88359450ED6} = {C83E2A6F-9747-4855-9D61-A88359450ED6}
		{E3DCABE9-3953-4A81-8B71-DEF9AD21753B} = {E3DCABE9-3953-4A81-8B71-DEF9AD21753B}
		{69CC76EB-0183-4622-929C-02E860A66A23} = {69CC76EB-0183-4622-929C-02E860A66A23}
	EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TinyXml", "TinyXml\projects\2015\TinyXml.vcxproj", "{C83E2A6F-9747-4855-9D61-A88359450ED6}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "unzip", "unzip\projects\2015\unzip.vcxproj", "{E3DCABE9-3953-4A81-8B71-DEF9AD21753B}"
	ProjectSection(ProjectDependencies) = postProject
		{745DEC58-EBB3-47A9-A9B8-4C6627C01BF8} = {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}
	EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "NppPlugin", "NppPlugin\projects\2015\NppPlugin.vcxproj", "{69CC76EB-0183-4622-929C-02E860A66A23}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gpup", "gpup\projects\2015\gpup.vcxproj", "{182656A0-B2AE-4955-9A2D-D8705FA52B27}"
	ProjectSection(ProjectDependencies) = postProject
		{C83E2A6F-9747-4855-9D61-A88359450ED6} = {C83E2A6F-9747-4855-9D61-A88359450ED6}
		{F8F0B077-8778-4CB9-9B54-EC67A3D2C750} = {F8F0B077-8778-4CB9-9B54-EC67A3D2C750}
		{E3DCABE9-3953-4A81-8B71-DEF9AD21753B} = {E3DCABE9-3953-4A81-8B71-DEF9AD21753B}
	EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "EncryptionTest", "EncryptionTest\EncryptionTest.vcxproj", "{31C6B295-C108-407E-9FB8-80662B8A248B}"
	ProjectSection(ProjectDependencies) = postProject
		{0A9F9D63-C282-4AE8-9F80-A6D5F541AD12} = {0A9F9D63-C282-4AE8-9F80-A6D5F541AD12}
	EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Tests", "Tests\Tests.vcxproj", "{73B76907-0287-47CB-BA4F-2E9D3669CD30}"
	ProjectSection(ProjectDependencies) = postProject
		{C8F6C172-56F2-4E76-B5FA-C3B423B31BE7} = {C8F6C172-56F2-4E76-B5FA-C3B423B31BE7}
	EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gtest", "submodule\gtest.vcxproj", "{C8F6C172-56F2-4E76-B5FA-C3B423B31BE7}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "zlibstat", "submodule\zlibstat.vcxproj", "{745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}"
EndProject
Global
	GlobalSection(SolutionConfigurationPlatforms) = preSolution
		Debug|Win32 = Debug|Win32
		Debug|x64 = Debug|x64
		Debug-xml-test|Win32 = Debug-xml-test|Win32
		Debug-xml-test|x64 = Debug-xml-test|x64
		Release|Win32 = Release|Win32
		Release|x64 = Release|x64
	EndGlobalSection
	GlobalSection(ProjectConfigurationPlatforms) = postSolution
		{0A9F9D63-C282-4AE8-9F80-A6D5F541AD12}.Debug|Win32.ActiveCfg = Debug|Win32
		{0A9F9D63-C282-4AE8-9F80-A6D5F541AD12}.Debug|Win32.Build.0 = Debug|Win32
		{0A9F9D63-C282-4AE8-9F80-A6D5F541AD12}.Debug|x64.ActiveCfg = Debug|x64
		{0A9F9D63-C282-4AE8-9F80-A6D5F541AD12}.Debug|x64.Build.0 = Debug|x64
		{0A9F9D63-C282-4AE8-9F80-A6D5F541AD12}.Debug-xml-test|Win32.ActiveCfg = Debug-xml-test|Win32
		{0A9F9D63-C282-4AE8-9F80-A6D5F541AD12}.Debug-xml-test|Win32.Build.0 = Debug-xml-test|Win32
		{0A9F9D63-C282-4AE8-9F80-A6D5F541AD12}.Debug-xml-test|x64.ActiveCfg = Debug-xml-test|x64
		{0A9F9D63-C282-4AE8-9F80-A6D5F541AD12}.Debug-xml-test|x64.Build.0 = Debug-xml-test|x64
		{0A9F9D63-C282-4AE8-9F80-A6D5F541AD12}.Release|Win32.ActiveCfg = Release|Win32
		{0A9F9D63-C282-4AE8-9F80-A6D5F541AD12}.Release|Win32.Build.0 = Release|Win32
		{0A9F9D63-C282-4AE8-9F80-A6D5F541AD12}.Release|x64.ActiveCfg = Release|x64
		{0A9F9D63-C282-4AE8-9F80-A6D5F541AD12}.Release|x64.Build.0 = Release|x64
		{F8F0B077-8778-4CB9-9B54-EC67A3D2C750}.Debug|Win32.ActiveCfg = Debug|Win32
		{F8F0B077-8778-4CB9-9B54-EC67A3D2C750}.Debug|Win32.Build.0 = Debug|Win32
		{F8F0B077-8778-4CB9-9B54-EC67A3D2C750}.Debug|x64.ActiveCfg = Debug|x64
		{F8F0B077-8778-4CB9-9B54-EC67A3D2C750}.Debug|x64.Build.0 = Debug|x64
		{F8F0B077-8778-4CB9-9B54-EC67A3D2C750}.Debug-xml-test|Win32.ActiveCfg = Debug-xml-test|Win32
		{F8F0B077-8778-4CB9-9B54-EC67A3D2C750}.Debug-xml-test|Win32.Build.0 = Debug-xml-test|Win32
		{F8F0B077-8778-4CB9-9B54-EC67A3D2C750}.Debug-xml-test|x64.ActiveCfg = Debug-xml-test|x64
		{F8F0B077-8778-4CB9-9B54-EC67A3D2C750}.Debug-xml-test|x64.Build.0 = Debug-xml-test|x64
		{F8F0B077-8778-4CB9-9B54-EC67A3D2C750}.Release|Win32.ActiveCfg = Release|Win32
		{F8F0B077-8778-4CB9-9B54-EC67A3D2C750}.Release|Win32.Build.0 = Release|Win32
		{F8F0B077-8778-4CB9-9B54-EC67A3D2C750}.Release|x64.ActiveCfg = Release|x64
		{F8F0B077-8778-4CB9-9B54-EC67A3D2C750}.Release|x64.Build.0 = Release|x64
		{C83E2A6F-9747-4855-9D61-A88359450ED6}.Debug|Win32.ActiveCfg = Debug|Win32
		{C83E2A6F-9747-4855-9D61-A88359450ED6}.Debug|Win32.Build.0 = Debug|Win32
		{C83E2A6F-9747-4855-9D61-A88359450ED6}.Debug|x64.ActiveCfg = Debug|x64
		{C83E2A6F-9747-4855-9D61-A88359450ED6}.Debug|x64.Build.0 = Debug|x64
		{C83E2A6F-9747-4855-9D61-A88359450ED6}.Debug-xml-test|Win32.ActiveCfg = Debug-xml-test|Win32
		{C83E2A6F-9747-4855-9D61-A88359450ED6}.Debug-xml-test|Win32.Build.0 = Debug-xml-test|Win32
		{C83E2A6F-9747-4855-9D61-A88359450ED6}.Debug-xml-test|x64.ActiveCfg = Debug-xml-test|x64
		{C83E2A6F-9747-4855-9D61-A88359450ED6}.Debug-xml-test|x64.Build.0 = Debug-xml-test|x64
		{C83E2A6F-9747-4855-9D61-A88359450ED6}.Release|Win32.ActiveCfg = Release|Win32
		{C83E2A6F-9747-4855-9D61-A88359450ED6}.Release|Win32.Build.0 = Release|Win32
		{C83E2A6F-9747-4855-9D61-A88359450ED6}.Release|x64.ActiveCfg = Release|x64
		{C83E2A6F-9747-4855-9D61-A88359450ED6}.Release|x64.Build.0 = Release|x64
		{E3DCABE9-3953-4A81-8B71-DEF9AD21753B}.Debug|Win32.ActiveCfg = Debug|Win32
		{E3DCABE9-3953-4A81-8B71-DEF9AD21753B}.Debug|Win32.Build.0 = Debug|Win32
		{E3DCABE9-3953-4A81-8B71-DEF9AD21753B}.Debug|x64.ActiveCfg = Debug|x64
		{E3DCABE9-3953-4A81-8B71-DEF9AD21753B}.Debug|x64.Build.0 = Debug|x64
		{E3DCABE9-3953-4A81-8B71-DEF9AD21753B}.Debug-xml-test|Win32.ActiveCfg = Debug-xml-test|Win32
		{E3DCABE9-3953-4A81-8B71-DEF9AD21753B}.Debug-xml-test|Win32.Build.0 = Debug-xml-test|Win32
		{E3DCABE9-3953-4A81-8B71-DEF9AD21753B}.Debug-xml-test|x64.ActiveCfg = Debug-xml-test|x64
		{E3DCABE9-3953-4A81-8B71-DEF9AD21753B}.Debug-xml-test|x64.Build.0 = Debug-xml-test|x64
		{E3DCABE9-3953-4A81-8B71-DEF9AD21753B}.Release|Win32.ActiveCfg = Release|Win32
		{E3DCABE9-3953-4A81-8B71-DEF9AD21753B}.Release|Win32.Build.0 = Release|Win32
		{E3DCABE9-3953-4A81-8B71-DEF9AD21753B}.Release|x64.ActiveCfg = Release|x64
		{E3DCABE9-3953-4A81-8B71-DEF9AD21753B}.Release|x64.Build.0 = Release|x64
		{69CC76EB-0183-4622-929C-02E860A66A23}.Debug|Win32.ActiveCfg = Debug|Win32
		{69CC76EB-0183-4622-929C-02E860A66A23}.Debug|Win32.Build.0 = Debug|Win32
		{69CC76EB-0183-4622-929C-02E860A66A23}.Debug|x64.ActiveCfg = Debug|x64
		{69CC76EB-0183-4622-929C-02E860A66A23}.Debug|x64.Build.0 = Debug|x64
		{69CC76EB-0183-4622-929C-02E860A66A23}.Debug-xml-test|Win32.ActiveCfg = Debug-xml-test|Win32
		{69CC76EB-0183-4622-929C-02E860A66A23}.Debug-xml-test|Win32.Build.0 = Debug-xml-test|Win32
		{69CC76EB-0183-4622-929C-02E860A66A23}.Debug-xml-test|x64.ActiveCfg = Debug-xml-test|x64
		{69CC76EB-0183-4622-929C-02E860A66A23}.Debug-xml-test|x64.Build.0 = Debug-xml-test|x64
		{69CC76EB-0183-4622-929C-02E860A66A23}.Release|Win32.ActiveCfg = Release|Win32
		{69CC76EB-0183-4622-929C-02E860A66A23}.Release|Win32.Build.0 = Release|Win32
		{69CC76EB-0183-4622-929C-02E860A66A23}.Release|x64.ActiveCfg = Release|x64
		{69CC76EB-0183-4622-929C-02E860A66A23}.Release|x64.Build.0 = Release|x64
		{182656A0-B2AE-4955-9A2D-D8705FA52B27}.Debug|Win32.ActiveCfg = Debug|Win32
		{182656A0-B2AE-4955-9A2D-D8705FA52B27}.Debug|Win32.Build.0 = Debug|Win32
		{182656A0-B2AE-4955-9A2D-D8705FA52B27}.Debug|x64.ActiveCfg = Debug|x64
		{182656A0-B2AE-4955-9A2D-D8705FA52B27}.Debug|x64.Build.0 = Debug|x64
		{182656A0-B2AE-4955-9A2D-D8705FA52B27}.Debug-xml-test|Win32.ActiveCfg = Debug-xml-test|Win32
		{182656A0-B2AE-4955-9A2D-D8705FA52B27}.Debug-xml-test|Win32.Build.0 = Debug-xml-test|Win32
		{182656A0-B2AE-4955-9A2D-D8705FA52B27}.Debug-xml-test|x64.ActiveCfg = Debug-xml-test|x64
		{182656A0-B2AE-4955-9A2D-D8705FA52B27}.Debug-xml-test|x64.Build.0 = Debug-xml-test|x64
		{182656A0-B2AE-4955-9A2D-D8705FA52B27}.Release|Win32.ActiveCfg = Release|Win32
		{182656A0-B2AE-4955-9A2D-D8705FA52B27}.Release|Win32.Build.0 = Release|Win32
		{182656A0-B2AE-4955-9A2D-D8705FA52B27}.Release|x64.ActiveCfg = Release|x64
		{182656A0-B2AE-4955-9A2D-D8705FA52B27}.Release|x64.Build.0 = Release|x64
		{31C6B295-C108-407E-9FB8-80662B8A248B}.Debug|Win32.ActiveCfg = Debug|Win32
		{31C6B295-C108-407E-9FB8-80662B8A248B}.Debug|Win32.Build.0 = Debug|Win32
		{31C6B295-C108-407E-9FB8-80662B8A248B}.Debug|x64.ActiveCfg = Debug|x64
		{31C6B295-C108-407E-9FB8-80662B8A248B}.Debug|x64.Build.0 = Debug|x64
		{31C6B295-C108-407E-9FB8-80662B8A248B}.Debug-xml-test|Win32.ActiveCfg = Debug|Win32
		{31C6B295-C108-407E-9FB8-80662B8A248B}.Debug-xml-test|Win32.Build.0 = Debug|Win32
		{31C6B295-C108-407E-9FB8-80662B8A248B}.Debug-xml-test|x64.ActiveCfg = Debug|x64
		{31C6B295-C108-407E-9FB8-80662B8A248B}.Debug-xml-test|x64.Build.0 = Debug|x64
		{31C6B295-C108-407E-9FB8-80662B8A248B}.Release|Win32.ActiveCfg = Release|Win32
		{31C6B295-C108-407E-9FB8-80662B8A248B}.Release|Win32.Build.0 = Release|Win32
		{31C6B295-C108-407E-9FB8-80662B8A248B}.Release|x64.ActiveCfg = Release|x64
		{31C6B295-C108-407E-9FB8-80662B8A248B}.Release|x64.Build.0 = Release|x64
		{73B76907-0287-47CB-BA4F-2E9D3669CD30}.Debug|Win32.ActiveCfg = Debug|Win32
		{73B76907-0287-47CB-BA4F-2E9D3669CD30}.Debug|Win32.Build.0 = Debug|Win32
		{73B76907-0287-47CB-BA4F-2E9D3669CD30}.Debug|x64.ActiveCfg = Debug|x64
		{73B76907-0287-47CB-BA4F-2E9D3669CD30}.Debug|x64.Build.0 = Debug|x64
		{73B76907-0287-47CB-BA4F-2E9D3669CD30}.Debug-xml-test|Win32.ActiveCfg = Debug|Win32
		{73B76907-0287-47CB-BA4F-2E9D3669CD30}.Debug-xml-test|Win32.Build.0 = Debug|Win32
		{73B76907-0287-47CB-BA4F-2E9D3669CD30}.Debug-xml-test|x64.ActiveCfg = Debug|x64
		{73B76907-0287-47CB-BA4F-2E9D3669CD30}.Debug-xml-test|x64.Build.0 = Debug|x64
		{73B76907-0287-47CB-BA4F-2E9D3669CD30}.Release|Win32.ActiveCfg = Release|Win32
		{73B76907-0287-47CB-BA4F-2E9D3669CD30}.Release|Win32.Build.0 = Release|Win32
		{73B76907-0287-47CB-BA4F-2E9D3669CD30}.Release|x64.ActiveCfg = Release|x64
		{73B76907-0287-47CB-BA4F-2E9D3669CD30}.Release|x64.Build.0 = Release|x64
		{C8F6C172-56F2-4E76-B5FA-C3B423B31BE7}.Debug|Win32.ActiveCfg = Debug|Win32
		{C8F6C172-56F2-4E76-B5FA-C3B423B31BE7}.Debug|Win32.Build.0 = Debug|Win32
		{C8F6C172-56F2-4E76-B5FA-C3B423B31BE7}.Debug|x64.ActiveCfg = Debug|x64
		{C8F6C172-56F2-4E76-B5FA-C3B423B31BE7}.Debug|x64.Build.0 = Debug|x64
		{C8F6C172-56F2-4E76-B5FA-C3B423B31BE7}.Debug-xml-test|Win32.ActiveCfg = Debug|Win32
		{C8F6C172-56F2-4E76-B5FA-C3B423B31BE7}.Debug-xml-test|Win32.Build.0 = Debug|Win32
		{C8F6C172-56F2-4E76-B5FA-C3B423B31BE7}.Debug-xml-test|x64.ActiveCfg = Debug|x64
		{C8F6C172-56F2-4E76-B5FA-C3B423B31BE7}.Debug-xml-test|x64.Build.0 = Debug|x64
		{C8F6C172-56F2-4E76-B5FA-C3B423B31BE7}.Release|Win32.ActiveCfg = Release|Win32
		{C8F6C172-56F2-4E76-B5FA-C3B423B31BE7}.Release|Win32.Build.0 = Release|Win32
		{C8F6C172-56F2-4E76-B5FA-C3B423B31BE7}.Release|x64.ActiveCfg = Release|x64
		{C8F6C172-56F2-4E76-B5FA-C3B423B31BE7}.Release|x64.Build.0 = Release|x64
		{745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Debug|Win32.ActiveCfg = Debug|Win32
		{745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Debug|Win32.Build.0 = Debug|Win32
		{745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Debug|x64.ActiveCfg = Debug|x64
		{745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Debug|x64.Build.0 = Debug|x64
		{745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Debug-xml-test|Win32.ActiveCfg = Debug|Win32
		{745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Debug-xml-test|Win32.Build.0 = Debug|Win32
		{745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Debug-xml-test|x64.ActiveCfg = Debug|x64
		{745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Debug-xml-test|x64.Build.0 = Debug|x64
		{745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Release|Win32.ActiveCfg = ReleaseWithoutAsm|Win32
		{745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Release|Win32.Build.0 = ReleaseWithoutAsm|Win32
		{745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Release|x64.ActiveCfg = ReleaseWithoutAsm|x64
		{745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Release|x64.Build.0 = ReleaseWithoutAsm|x64
	EndGlobalSection
	GlobalSection(SolutionProperties) = preSolution
		HideSolutionNode = FALSE
	EndGlobalSection
EndGlobal


apiVersion: v1
kind: ConfigMap
metadata:
  name: ironic-bin
  labels:
    system: openstack
    type: configuration
    component: ironic
data:
{{- if .Values.tempest_enabled }}
  ironic-tempest-start: |
{{ .Files.Get "bin/ironic-tempest-start" | indent 4 }}
{{- end }}


<?php
namespace Goetas\Twital\Attribute;

use Goetas\Twital\Attribute;
use Goetas\Twital\Compiler;
use Goetas\Twital\Helper\ParserHelper;

/**
 *
 * @author Asmir Mustafic <goetas@gmail.com>
 *
 */
class SetAttribute implements Attribute
{
    public function visit(\DOMAttr $att, Compiler $context)
    {
        $node = $att->ownerElement;

        $sets = ParserHelper::staticSplitExpression(html_entity_decode($att->value), ",");
        foreach ($sets as $set) {
            $pi = $context->createControlNode("set " . $set);
            $node->parentNode->insertBefore($pi, $node);
        }

        $node->removeAttributeNode($att);
    }
}


import torch.nn as nn
import torch
import torch.nn.functional as F

class Basic_CNN(nn.Module):
    def __init__(self, in_channels, num_classes):
        super(Basic_CNN, self).__init__()

        self.in_channels = in_channels
        self.num_classes = num_classes

        self.conv1_1 = nn.Conv2d(self.in_channels, 32, kernel_size=3, padding=1)
        self.conv1_2 = nn.Conv2d(32, 32, kernel_size=3, padding=1)

        self.maxpool1 = nn.MaxPool2d(kernel_size=2)

        self.conv2_1 = nn.Conv2d(32, 64, kernel_size=3, padding=1)
        self.conv2_2 = nn.Conv2d(64, 64, kernel_size=3, padding=1)

        self.maxpool2 = nn.MaxPool2d(kernel_size=2)

        self.fc1 = nn.Linear(7*7*64, 200)
        self.fc2 = nn.Linear(200, self.num_classes)

    def forward(self, x):

        x = F.relu(self.conv1_1(x))
        x = F.relu(self.conv1_2(x))

        x = self.maxpool1(x)

        x = F.relu(self.conv2_1(x))
        x = F.relu(self.conv2_2(x))

        x = self.maxpool2(x)

        x = x.view(x.size(0), -1)
        x = F.relu(self.fc1(x))
        x = self.fc2(x)

        return x

if __name__ == '__main__':
    saved = torch.load('9920.pth.tar', map_location='cpu')
    model = Basic_CNN(1, 10)

    model.load_state_dict(saved['state_dict'])


// +build linux
// +build !appengine

package isatty

import (
	"syscall"
	"unsafe"
)

const ioctlReadTermios = syscall.TCGETS

// IsTerminal return true if the file descriptor is terminal.
func IsTerminal(fd uintptr) bool {
	var termios syscall.Termios
	_, _, err := syscall.Syscall6(syscall.SYS_IOCTL, fd, ioctlReadTermios, uintptr(unsafe.Pointer(&termios)), 0, 0, 0)
	return err == 0
}


using System;
using System.Collections.Generic;
using System.Collections.Immutable;
using System.Composition;
using System.Linq;
using System.Threading;
using System.Threading.Tasks;
using Microsoft.CodeAnalysis;
using Microsoft.CodeAnalysis.CodeFixes;
using Microsoft.CodeAnalysis.CodeActions;
using Microsoft.CodeAnalysis.CSharp;
using Microsoft.CodeAnalysis.CSharp.Syntax;
using Microsoft.CodeAnalysis.Rename;
using Microsoft.CodeAnalysis.Text;
using Microsoft.CodeAnalysis.Formatting;
using Microsoft.CodeAnalysis.Simplification;

namespace MakeConst
{
    [ExportCodeFixProvider(LanguageNames.CSharp, Name = nameof(MakeConstCodeFixProvider)), Shared]
    public class MakeConstCodeFixProvider : CodeFixProvider
    {
        // <SnippetCodeFixTitle>
        private const string title = "Make constant";
        // </SnippetCodeFixTitle>

        public sealed override ImmutableArray<string> FixableDiagnosticIds
        {
            get { return ImmutableArray.Create(MakeConstAnalyzer.DiagnosticId); }
        }

        public sealed override FixAllProvider GetFixAllProvider()
        {
            // See https://github.com/dotnet/roslyn/blob/master/docs/analyzers/FixAllProvider.md for more information on Fix All Providers
            return WellKnownFixAllProviders.BatchFixer;
        }

        public sealed override async Task RegisterCodeFixesAsync(CodeFixContext context)
        {
            var root = await context.Document.GetSyntaxRootAsync(context.CancellationToken).ConfigureAwait(false);

            // TODO: Replace the following code with your own analysis, generating a CodeAction for each fix to suggest
            var diagnostic = context.Diagnostics.First();
            var diagnosticSpan = diagnostic.Location.SourceSpan;

            // Find the type declaration identified by the diagnostic.
            // <SnippetFindDeclarationNode>
            var declaration = root.FindToken(diagnosticSpan.Start).Parent.AncestorsAndSelf().OfType<LocalDeclarationStatementSyntax>().First();
            // </SnippetFindDeclarationNode>

            // <SnippetRegisterCodeFix>
            // Register a code action that will invoke the fix.
            context.RegisterCodeFix(
                CodeAction.Create(
                    title: title,
                    createChangedDocument: c => MakeConstAsync(context.Document, declaration, c),
                    equivalenceKey: title),
                diagnostic);
            // </SnippetRegisterCodeFix>
        }

        private async Task<Document> MakeConstAsync(Document document, LocalDeclarationStatementSyntax localDeclaration, CancellationToken cancellationToken)
        {
            // <SnippetCreateConstToken>
            // Remove the leading trivia from the local declaration.
            var firstToken = localDeclaration.GetFirstToken();
            var leadingTrivia = firstToken.LeadingTrivia;
            var trimmedLocal = localDeclaration.ReplaceToken(
                firstToken, firstToken.WithLeadingTrivia(SyntaxTriviaList.Empty));

            // Create a const token with the leading trivia.
            var constToken = SyntaxFactory.Token(leadingTrivia, SyntaxKind.ConstKeyword, SyntaxFactory.TriviaList(SyntaxFactory.ElasticMarker));
            // </SnippetCreateConstToken>

            // Insert the const token into the modifiers list, creating a new modifiers list.
            var newModifiers = trimmedLocal.Modifiers.Insert(0, constToken);

            //<SnippetReplaceVar>
            // If the type of the declaration is 'var', create a new type name
            // for the inferred type.
            var variableDeclaration = localDeclaration.Declaration;
            var variableTypeName = variableDeclaration.Type;
            if (variableTypeName.IsVar)
            {
                var semanticModel = await document.GetSemanticModelAsync(cancellationToken);

                // Special case: Ensure that 'var' isn't actually an alias to another type
                // (e.g. using var = System.String).
                var aliasInfo = semanticModel.GetAliasInfo(variableTypeName);
                if (aliasInfo == null)
                {
                    // Retrieve the type inferred for var.
                    var type = semanticModel.GetTypeInfo(variableTypeName).ConvertedType;

                    // Special case: Ensure that 'var' isn't actually a type named 'var'.
                    if (type.Name != "var")
                    {
                        // Create a new TypeSyntax for the inferred type. Be careful
                        // to keep any leading and trailing trivia from the var keyword.
                        var typeName = SyntaxFactory.ParseTypeName(type.ToDisplayString())
                            .WithLeadingTrivia(variableTypeName.GetLeadingTrivia())
                            .WithTrailingTrivia(variableTypeName.GetTrailingTrivia());

                        // Add an annotation to simplify the type name.
                        var simplifiedTypeName = typeName.WithAdditionalAnnotations(Simplifier.Annotation);

                        // Replace the type in the variable declaration.
                        variableDeclaration = variableDeclaration.WithType(simplifiedTypeName);
                    }
                }
            }
            // Produce the new local declaration.
            var newLocal = trimmedLocal.WithModifiers(newModifiers)
                                       .WithDeclaration(variableDeclaration);
            //</SnippetReplaceVar>

            // <SnippetFormatLocal>
            // Add an annotation to format the new local declaration.
            var formattedLocal = newLocal.WithAdditionalAnnotations(Formatter.Annotation);
            // </SnippetFormatLocal>

            // <SnippetReplaceDocument>
            // Replace the old local declaration with the new local declaration.
            var oldRoot = await document.GetSyntaxRootAsync(cancellationToken);
            var newRoot = oldRoot.ReplaceNode(localDeclaration, formattedLocal);

            // Return document with transformed tree.
            return document.WithSyntaxRoot(newRoot);
            // </SnippetReplaceDocument>
        }
    }
}


'use strict';

var path   = require('path');
var assert = require('assert');
var jsyaml = require('../../lib/js-yaml');
var helper = require('../support/helper');

var TEST_SCHEMA   = require('../support/schema');
var YAMLException = require('../../lib/js-yaml/exception');

helper.generateTests({
  description: 'Errors on loading a series of documents.',
  directory: path.join(__dirname, 'errors'),
  files: ['.loader-error'],
  test: function (errorFile) {
    assert.throws(
      function () {
        jsyaml.loadAll(
          errorFile.content,
          function () {},
          { filename: errorFile.path,
            schema: TEST_SCHEMA,
            strict: true });
      },
      YAMLException,
      'In file "' + errorFile.path + '"');
  }
});


/*
 * This program is Copyright © 2002 Bryan L Blackburn.  All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *
 * 1. Redistributions of source code must retain the above copyright notice,
 *    this list of conditions and the following disclaimer.
 * 2. Redistributions in binary form must reproduce the above copyright notice,
 *    this list of conditions and the following disclaimer in the documentation
 *    and/or other materials provided with the distribution.
 * 3. Neither the names Bryan L Blackburn, Withay.com, nor the names of any
 *    contributors may be used to endorse or promote products derived from this
 *    software without specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY BRYAN L BLACKBURN ``AS IS'' AND ANY EXPRESSED OR
 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO
 * EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
 * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
 * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 *
 * Initial version, 27 October, 2002
 */

/* NSFont_OpenGL.m */

#import "NSFont_OpenGL.h"
#import "N2Debug.h"

#define MAXCOUNT 256

@interface NSFont (withay_OpenGL_InternalMethods)
+ (unsigned char*) createCharacterWithImage:(NSBitmapImageRep *)bitmap;
+ (void) doOpenGLLog:(NSString *)format, ...;
@end

@implementation NSFont (withay_OpenGL)

static  BOOL					openGLLoggingEnabled = YES;
static  NSMutableArray			*imageArray = nil, *imageArrayPreview = nil,  *imageArrayROI = nil;
static  NSMutableArray			*imageArrayScale2 = nil, *imageArrayPreviewScale2 = nil,  *imageArrayROIScale2 = nil;

static	BOOL					fontOpenGLInitialized = NO;
static  long					charSizeArray[ MAXCOUNT], charSizeArrayPreview[ MAXCOUNT], charSizeArrayROI[ MAXCOUNT];
static  unsigned char			*charPtrArray[ MAXCOUNT], *charPtrArrayPreview[ MAXCOUNT], *charPtrArrayROI[ MAXCOUNT];

static  long					charSizeArrayScale2[ MAXCOUNT], charSizeArrayPreviewScale2[ MAXCOUNT], charSizeArrayROIScale2[ MAXCOUNT];
static  unsigned char			*charPtrArrayScale2[ MAXCOUNT], *charPtrArrayPreviewScale2[ MAXCOUNT], *charPtrArrayROIScale2[ MAXCOUNT];
/*
 * Enable/disable logging, class-wide, not object-wide
 */
+ (void) setOpenGLLogging:(BOOL)logEnabled
{
   openGLLoggingEnabled = logEnabled;
}

+ (void) resetFont: (int) fontType
{
	int i;

	if( fontOpenGLInitialized == NO)
	{
		for( i = 0; i < MAXCOUNT; i++) charPtrArrayPreview[ i] = 0;
		for( i = 0; i < MAXCOUNT; i++) charPtrArray[ i] = 0;
		for( i = 0; i < MAXCOUNT; i++) charPtrArrayROI[ i] = 0;

        for( i = 0; i < MAXCOUNT; i++) charPtrArrayPreviewScale2[ i] = 0;
		for( i = 0; i < MAXCOUNT; i++) charPtrArrayScale2[ i] = 0;
		for( i = 0; i < MAXCOUNT; i++) charPtrArrayROIScale2[ i] = 0;

		fontOpenGLInitialized = YES;
	}

	switch( fontType)
	{
		case 0:
			if( imageArray)
			{
				for( i = 0; i < MAXCOUNT; i++)
				{
					if( charPtrArray[ i]) free( charPtrArray[ i]);
					charPtrArray[ i] = 0L;
				}
				[imageArray release];
				imageArray = nil;
			}
            if( imageArrayScale2)
			{
				for( i = 0; i < MAXCOUNT; i++)
				{
					if( charPtrArrayScale2[ i]) free( charPtrArrayScale2[ i]);
					charPtrArrayScale2[ i] = 0L;
				}
				[imageArrayScale2 release];
				imageArrayScale2 = nil;
			}
		break;

		case 1:
			if( imageArrayPreview)
			{
				for( i = 0; i < MAXCOUNT; i++)
				{
					if( charPtrArrayPreview[ i]) free( charPtrArrayPreview[ i]);
					charPtrArrayPreview[ i] = 0L;
				}
				[imageArrayPreview release];
				imageArrayPreview = nil;
			}
            if( imageArrayPreviewScale2)
			{
				for( i = 0; i < MAXCOUNT; i++)
				{
					if( charPtrArrayPreviewScale2[ i]) free( charPtrArrayPreviewScale2[ i]);
					charPtrArrayPreviewScale2[ i] = 0L;
				}
				[imageArrayPreviewScale2 release];
				imageArrayPreviewScale2 = nil;
			}
		break;

		case 2:
			if( imageArrayROI)
			{
				for( i = 0; i < MAXCOUNT; i++)
				{
					if( charPtrArrayROI[ i]) free( charPtrArrayROI[ i]);
					charPtrArrayROI[ i] = 0L;
				}
				[imageArrayROI release];
				imageArrayROI = nil;
			}
            if( imageArrayROIScale2)
			{
				for( i = 0; i < MAXCOUNT; i++)
				{
					if( charPtrArrayROIScale2[ i]) free( charPtrArrayROIScale2[ i]);
					charPtrArrayROIScale2[ i] = 0L;
				}
				[imageArrayROIScale2 release];
				imageArrayROIScale2 = nil;
			}
		break;
	}
}

+ (void) initFontImage:(unichar)first count:(int)count font:(NSFont*) font fontType:(int) fontType scaling: (float) scaling
{
	NSColor				*blackColor;
	NSDictionary		*attribDict;
	NSString			*currentChar;
	unichar				currentUnichar;
	NSSize				charSize;
	NSRect				charRect;
	NSImage				*theImage;
	BOOL				retval;
	NSBitmapImageRep	*bitmap;
	NSMutableArray		*curArray;
	long				*curSizeArray, i;

	if( fontOpenGLInitialized == NO)
	{
		for( i = 0; i < MAXCOUNT; i++) charPtrArrayPreview[ i] = 0;
		for( i = 0; i < MAXCOUNT; i++) charPtrArray[ i] = 0;
		for( i = 0; i < MAXCOUNT; i++) charPtrArrayROI[ i] = 0;

        for( i = 0; i < MAXCOUNT; i++) charPtrArrayPreviewScale2[ i] = 0;
		for( i = 0; i < MAXCOUNT; i++) charPtrArrayScale2[ i] = 0;
		for( i = 0; i < MAXCOUNT; i++) charPtrArrayROIScale2[ i] = 0;

		fontOpenGLInitialized = YES;
	}

    if( scaling != 1.0 && scaling != 2.0)
    {
        NSLog( @"******* ******* ******* ******* ******* *******");
        NSLog( @"******* UNKNOW scaling factor: %f", scaling);
        NSLog( @"******* ******* ******* ******* ******* *******");
        scaling = [[NSScreen mainScreen] backingScaleFactor];
    }

    unsigned char **curPtrArray = nil;

    if( scaling == 2.0)
    {
        switch( fontType)
        {
            case 1:
                curArray = imageArrayPreviewScale2;
                curSizeArray = charSizeArrayPreviewScale2;
                curPtrArray = charPtrArrayPreviewScale2;
                break;

            case 0:
                curArray = imageArrayScale2;
                curSizeArray = charSizeArrayScale2;
                curPtrArray = charPtrArrayScale2;
                break;

            case 2:
                curArray = imageArrayROIScale2;
                curSizeArray = charSizeArrayROIScale2;
                curPtrArray = charPtrArrayROIScale2;
                break;
        }
    }
    else
    {
        switch( fontType)
        {
            case 1:
                curArray = imageArrayPreview;
                curSizeArray = charSizeArrayPreview;
                curPtrArray = charPtrArrayPreview;
            break;

            case 0:
                curArray = imageArray;
                curSizeArray = charSizeArray;
                curPtrArray = charPtrArray;
            break;

            case 2:
                curArray = imageArrayROI;
                curSizeArray = charSizeArrayROI;
                curPtrArray = charPtrArrayROI;
            break;
        }
    }

    for( i = 0; i < MAXCOUNT; i++)
    {
        if( curPtrArray[ i]) free( curPtrArray[ i]);
        curPtrArray[ i] = 0;
    }

	if( curArray == nil) curArray = [[NSMutableArray alloc] initWithCapacity:0];
	else [curArray removeAllObjects];

    blackColor = [ NSColor blackColor ];
	attribDict = [ NSDictionary dictionaryWithObjectsAndKeys: font, NSFontAttributeName, [ NSColor whiteColor ], NSForegroundColorAttributeName, blackColor, NSBackgroundColorAttributeName, nil ];
	charRect.origin.x = charRect.origin.y = 0;
	retval = TRUE;
	for( currentUnichar = first; currentUnichar < first + count; currentUnichar++ )
	{
		@try
		{
			currentChar = [NSString stringWithCharacters:&currentUnichar length:1];
			charSize = [currentChar sizeWithAttributes: attribDict];
			charRect.size = charSize;

			charRect = NSIntegralRect( charRect);
			if( charRect.size.width <= 0 && charRect.size.height <= 0 ) // character with no glyph in the current font
			{
				currentChar = @"?";
				charSize = [currentChar sizeWithAttributes: attribDict];

				charRect.size = charSize;
				charRect = NSIntegralRect( charRect );
			}
			theImage = [[NSImage alloc] initWithSize:NSMakeSize( 0, 0)];

			[theImage setSize: charRect.size];

			if([theImage size].width > 0 && [theImage size].height > 0)
			{
				[theImage lockFocus];

                if( scaling == 1) // On Retina system, this will cancel the default 2x resolution in the NSImage "world"
                    [[NSAffineTransform transform] set];

				[blackColor set];
				[NSBezierPath fillRect:charRect];
				[[NSGraphicsContext currentContext] setShouldAntialias: NO];
				[currentChar drawInRect:charRect withAttributes:attribDict];
				[theImage unlockFocus];
			}

			bitmap = [NSBitmapImageRep imageRepWithData:[theImage TIFFRepresentationUsingCompression:NSTIFFCompressionNone factor:0]];

			if( bitmap)
			{
                if( scaling == 1 && bitmap.pixelsWide / charRect.size.width == 2) //We dont want a Retina image, on a Retina OS...
                    curSizeArray[currentUnichar] = bitmap.pixelsWide/2;
                else
                    curSizeArray[currentUnichar] = bitmap.pixelsWide;

				[curArray addObject: bitmap];
				[theImage release];

				curPtrArray[ currentUnichar] = [NSFont createCharacterWithImage:[curArray objectAtIndex: currentUnichar - first]];
			}
		}
		@catch (NSException * e)
		{
            N2LogExceptionWithStackTrace(e);
		}
	}

    if( scaling == 2.0)
    {
        switch( fontType)
        {
            case 1:     imageArrayPreviewScale2 = curArray; break;
            case 0:     imageArrayScale2 = curArray;    break;
            case 2:     imageArrayROIScale2 = curArray; break;
        }
    }
    else
    {
        switch( fontType)
        {
            case 1: imageArrayPreview = curArray;   break;
            case 0: imageArray = curArray;  break;
            case 2: imageArrayROI = curArray;   break;
        }
    }
}

/*
 * Create the set of display lists for the bitmaps
 */
- (BOOL) makeGLDisplayListFirst:(unichar)first count:(int)count base:(GLint)base :(long*) charSizeArrayIn :(int) fontType :(float) scaling
{
	GLint curListIndex;
	GLint dListNum;
	unichar currentUnichar;
	BOOL retval;

	NSMutableArray *curArray = nil;
	long *curSizeArray = nil;
	unsigned char **curPtrArray = nil;

    if( scaling == 2.0)
    {
        switch( fontType)
        {
            case 0:
                if( imageArrayScale2 == nil)
                    [NSFont initFontImage:' ' count:150 font:self fontType: fontType scaling: scaling];

                curArray = imageArrayScale2;
                curSizeArray = charSizeArrayScale2;
                curPtrArray = charPtrArrayScale2;
                break;

            case 1:
                if( imageArrayPreviewScale2 == nil)
                    [NSFont initFontImage:' ' count:150 font:self fontType: fontType scaling: scaling];

                curArray = imageArrayPreviewScale2;
                curSizeArray = charSizeArrayPreviewScale2;
                curPtrArray = charPtrArrayPreviewScale2;
                break;

            case 2:
                if( imageArrayROIScale2 == nil)
                    [NSFont initFontImage:' ' count:150 font:self fontType: fontType scaling: scaling];

                curArray = imageArrayROIScale2;
                curSizeArray = charSizeArrayROIScale2;
                curPtrArray = charPtrArrayROIScale2;
                break;
        }
    }
    else
    {
        switch( fontType)
        {
            case 0:
                if( imageArray == nil)
                    [NSFont initFontImage:' ' count:150 font:self fontType: fontType scaling: scaling];

                curArray = imageArray;
                curSizeArray = charSizeArray;
                curPtrArray = charPtrArray;
            break;

            case 1:
                if( imageArrayPreview == nil)
                    [NSFont initFontImage:' ' count:150 font:self fontType: fontType scaling: scaling];

                curArray = imageArrayPreview;
                curSizeArray = charSizeArrayPreview;
                curPtrArray = charPtrArrayPreview;
            break;

            case 2:
                if( imageArrayROI == nil)
                    [NSFont initFontImage:' ' count:150 font:self fontType: fontType scaling: scaling];

                curArray = imageArrayROI;
                curSizeArray = charSizeArrayROI;
                curPtrArray = charPtrArrayROI;
            break;
        }
	}

   // Make sure a list isn't already under construction
   glGetIntegerv( GL_LIST_INDEX, &curListIndex );
   if( curListIndex != 0 )
   {
      [ NSFont doOpenGLLog:@"Display list already under construction" ];
      return FALSE;
   }

   // Save pixel unpacking state
   glPushClientAttrib( GL_CLIENT_PIXEL_STORE_BIT );

   glPixelStorei( GL_UNPACK_SWAP_BYTES, GL_FALSE );
   glPixelStorei( GL_UNPACK_LSB_FIRST, GL_FALSE );
   glPixelStorei( GL_UNPACK_SKIP_ROWS, 0 );
   glPixelStorei( GL_UNPACK_SKIP_PIXELS, 0 );
   glPixelStorei( GL_UNPACK_ROW_LENGTH, 0 );
   glPixelStorei( GL_UNPACK_ALIGNMENT, 1 );

   glPixelStorei (GL_UNPACK_CLIENT_STORAGE_APPLE, 1);
   glTexParameteri (GL_TEXTURE_RECTANGLE_EXT, GL_TEXTURE_STORAGE_HINT_APPLE, GL_STORAGE_CACHED_APPLE);

   retval = TRUE;
   for( dListNum = base, currentUnichar = first; currentUnichar < first + count;
        dListNum++, currentUnichar++ )
   {
	   charSizeArrayIn[ currentUnichar] = curSizeArray[ currentUnichar];

	   if( currentUnichar - first < curArray.count)
		{
			NSBitmapImageRep *bitmap = [curArray objectAtIndex: currentUnichar - first];

            if( bitmap)
            {
                glNewList( dListNum, GL_COMPILE);

                if( curPtrArray[ currentUnichar])
                    glBitmap( [bitmap pixelsWide], [bitmap pixelsHigh], 0, 0, curSizeArray[currentUnichar], 0, curPtrArray[ currentUnichar]);

                glEndList();
            }
		}
   }

   glPopClientAttrib();

   return retval;
}

/*
 * Create one display list based on the given image.  This assumes the image
 * uses 8-bit chunks to represent a sample
 */
+ (unsigned char*) createCharacterWithImage:(NSBitmapImageRep *)bitmap
{
   int				bytesPerRow, pixelsHigh, pixelsWide, samplesPerPixel;
   unsigned char	*bitmapBytes;
   int				currentBit, byteValue;
   unsigned char	*newBuffer, *movingBuffer;
   int				rowIndex, colIndex;

   pixelsHigh = [bitmap pixelsHigh];
   pixelsWide = [bitmap pixelsWide];
   bitmapBytes = [bitmap bitmapData];
   bytesPerRow = [bitmap bytesPerRow];
   samplesPerPixel = [bitmap samplesPerPixel];

   newBuffer = calloc( ceil( (float) bytesPerRow / 8.0 ), pixelsHigh);
   if( newBuffer == NULL )
   {
		NSLog(@"Failed to calloc() memory in");
		return nil;
   }

   movingBuffer = newBuffer;
   /*
    * Convert the color bitmap into a true bitmap, ie, one bit per pixel.  We
    * read at last row, write to first row as Cocoa and OpenGL have opposite
    * y origins
    */
   for( rowIndex = pixelsHigh - 1; rowIndex >= 0; rowIndex --)
   {
      currentBit = 0x80;
      byteValue = 0;
      for( colIndex = 0; colIndex < pixelsWide; colIndex ++)
      {
         if( bitmapBytes[ rowIndex * bytesPerRow + colIndex * samplesPerPixel]) byteValue |= currentBit;
         currentBit >>= 1;
         if( currentBit == 0)
         {
            *movingBuffer++ = byteValue;
            currentBit = 0x80;
            byteValue = 0;
         }
      }
      if( currentBit != 0x80)
         *movingBuffer++ = byteValue;
   }

	return newBuffer;
}

/*
 * Log the warning/error, if logging is enabled
 */
+ (void) doOpenGLLog:(NSString *)format, ...
{
   va_list args;

   if( openGLLoggingEnabled )
   {
      va_start( args, format );
      NSLogv( [ NSString stringWithFormat:@"NSFont_OpenGL: %@\n", format ],
              args );
      va_end( args );
   }
}

@end


#ifdef NALL_STREAM_INTERNAL_HPP

namespace nall {

struct gzipstream : memorystream {
  inline gzipstream(const stream &stream) {
    unsigned size = stream.size();
    uint8_t *data = new uint8_t[size];
    stream.read(data, size);

    gzip archive;
    bool result = archive.decompress(data, size);
    delete[] data;
    if(result == false) return;

    psize = archive.size;
    pdata = new uint8_t[psize];
    memcpy(pdata, archive.data, psize);
  }

  inline ~gzipstream() {
    if(pdata) delete[] pdata;
  }
};

}

#endif