text:
using System;
using System.Xml.Serialization;

namespace HoloXPLOR.Data.DataForge
{
    [XmlRoot(ElementName = "MissionObjective")]
    public partial class MissionObjective
    {
        [XmlAttribute(AttributeName = "Name")]
        public String Name { get; set; }

        [XmlAttribute(AttributeName = "ShortDesciption")]
        public String ShortDesciption { get; set; }

        [XmlAttribute(AttributeName = "LongDescription")]
        public String LongDescription { get; set; }

    }
}


text:
<!DOCTYPE html>

  <meta charset="utf-8">
  <title>Plato - components/explorer/file-list.js</title>

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

  <link href="../../assets/css/vendor/morris.css" rel="stylesheet">
  <link href="../../assets/css/vendor/bootstrap.css" rel="stylesheet">
  <link href="../../assets/css/vendor/font-awesome.css" rel="stylesheet">
  <link href="../../assets/css/vendor/codemirror.css" rel="stylesheet">
  <link href="../../assets/css/plato.css" rel="stylesheet">
  <link href="../../assets/css/plato-file.css" rel="stylesheet">

    Plato on Github

        Report Home

components/explorer/file-list.js

Maintainability

82.07

Lines of code

59

Difficulty

13.90

Estimated Errors

0.52

Function weight

By Complexity

By SLOC

    <textarea id="file-source" class="col-md-12">'use strict';

var
    React = require('react'),
    File = require('./file'),
    Folder = require('./folder'),
    _ = require('lodash'),
    cx = require('classnames');

module.exports = React.createClass({
    displayName: 'FileList',
    propTypes: {
        files: React.PropTypes.array.isRequired,
        allFiles: React.PropTypes.array.isRequired,
        opened: React.PropTypes.bool.isRequired
    },
    sort: function(files) {
        return _.sortBy(files, function(file) {
            return file.title;
        });
    },
    isFolder: function(file) {
        return file.mimeType === 'application/vnd.google-apps.folder';
    },
    renderFiles: function() {
        return this.getFiles().map(function(file) {
            return React.createElement(File, {file: file, key: file.id});
        });
    },
    renderFolders: function() {
        return this.getFolders().map(function(file) {
            return React.createElement(Folder, {folder: file,
                allFiles: this.props.allFiles,
                key: file.id,
                opened: false});
        }, this);
    },
    getFiles: function() {
        return _.reject(this.props.files, this.isFolder);
    },
    getFolders: function() {
        return _.filter(this.props.files, this.isFolder);
    },
    render: function() {
        if (_.isEmpty(this.props.files)) {
            return null;
        }
        var classes = cx('fileList', {
            hide: !this.props.opened
        });
        return (
            React.createElement("div", {className: classes},
                this.renderFolders(),
                this.renderFiles()
            )
        );
    }
});</textarea>

.

redpajama_set_name: RedPajamaGithub


text:
static size_t bytecode_malloced_size = 0;
#endif
static void *__malloc(size_t size) {
#if defined(PEGVM_COUNT_BYTECODE_MALLOCED_SIZE)
  bytecode_malloced_size += size;
#endif
  return malloc(size);
}

#include "lir.c"

static uint64_t timer() {
  struct timeval tv;
  gettimeofday(&tv, NULL);
  return tv.tv_sec * 1000 + tv.tv_usec / 1000;
}

void nez_PrintErrorInfo(const char *errmsg) {
  fprintf(stderr, "%s\n", errmsg);
  exit(EXIT_FAILURE);
}

static char *loadFile(const char *filename, size_t *length) {
  size_t len = 0;
  FILE *fp = fopen(filename, "rb");
  char *source;
  if (!fp) {
    nez_PrintErrorInfo("fopen error: cannot open file");
    return NULL;
  }
  fseek(fp, 0, SEEK_END);
  len = (size_t)ftell(fp);
  fseek(fp, 0, SEEK_SET);
  source = (char *)malloc(len + 1);
  if (len != fread(source, 1, len, fp)) {
    nez_PrintErrorInfo("fread error: cannot read file collectly");
  }
  source[len] = '\0';
  fclose(fp);
  *length = len;
  return source;
}

static const char *get_opname(uint8_t opcode) {
  switch (opcode) {
#define OP_DUMPCASE(OP) \
  case PEGVM_OP_##OP:   \
    return "" #OP;
    PEGVM_OP_EACH(OP_DUMPCASE);
  default:
    assert(0 && "UNREACHABLE");
    break;
#undef OP_DUMPCASE
  }
  return "";
}

static void dump_PegVMInstructions(PegVMInstruction *inst, uint64_t size) {
  int i;
  for (i = 0; i < (int)size; i++) {
    fprintf(stderr, "[%d] %s ", i, get_opname(inst[i].base.opcode));
    switch (inst[i].base.opcode) {
#define OP_DUMPCASE(OP) case PEGVM_OP_##OP:
      OP_DUMPCASE(CHARRANGE) {
        ICHARRANGE *ir = (ICHARRANGE *)inst + i;
        fprintf(stderr, "[%d-", ir->c1);
        fprintf(stderr, "%d] ", ir->c2);
        // fprintf(stderr, "%d ", inst[i].jump);
      }
      OP_DUMPCASE(CHARSET) {
        // fprintf(stderr, "%d ", inst[i].jump);
      }
    default:
      // fprintf(stderr, "%d ", inst[i].jump);
      break;
    }
    // if (inst[i].chardata) {
    //   fprintf(stderr, "%s", inst[i].chardata);
    // }
    fprintf(stderr, "\n");
  }
}

static void dump_byteCodeInfo(byteCodeInfo *info) {
  fprintf(stderr, "ByteCodeVersion:%u.%u\n", info->version0, info->version1);
  fprintf(stderr, "PEGFile:%s\n", info->filename);
  fprintf(stderr, "LengthOfByteCode:%zd\n", (size_t)info->bytecode_length);
  fprintf(stderr, "\n");
}

static PegVMInstruction *nez_VM_Prepare(ParsingContext, PegVMInstruction *);

typedef void (*convert_to_lir_func_t)(PegVMInstruction *, ByteCodeLoader *);
static convert_to_lir_func_t f_convert[] = {
#define DEFINE_CONVERT_FUNC(OP) Emit_##OP,
  PEGVM_OP_EACH(DEFINE_CONVERT_FUNC)
};

#if PEGVM_PROFILE
profileInst *profile;
char **rtable;
long *itable;
long ilength;
int rlength;
#endif

PegVMInstruction *nez_LoadMachineCode(ParsingContext context,
                                      const char *fileName,
                                      const char *nonTerminalName) {
  PegVMInstruction *inst = NULL;
  PegVMInstruction *head = NULL;
  size_t len;
  char *buf = loadFile(fileName, &len);
  byteCodeInfo info;
  info.pos = 0;

  info.version0 = buf[info.pos++];
  info.version1 = buf[info.pos++];
  info.filename_length = read32(buf, &info);
  info.filename = malloc(sizeof(uint8_t) * info.filename_length + 1);
  for (uint32_t i = 0; i < info.filename_length; i++) {
    info.filename[i] = buf[info.pos++];
  }
  info.filename[info.filename_length] = 0;
  info.pool_size_info = read32(buf, &info);

  int ruleSize = read32(buf, &info);
  char **ruleTable = (char **)malloc(sizeof(char *) * ruleSize);
#if PEGVM_PROFILE
  rlength = ruleSize;
  itable = (long *)malloc(sizeof(long) * ruleSize);
#endif
  for (int i = 0; i < ruleSize; i++) {
    int ruleNameLen = read32(buf, &info);
    ruleTable[i] = (char *)malloc(ruleNameLen);
    for (int j = 0; j < ruleNameLen; j++) {
      ruleTable[i][j] = buf[info.pos++];
    }
    long index = read64(buf, &info);
#if PEGVM_PROFILE
    itable[i] = index;
#endif
    if (nonTerminalName != NULL) {
      if (!strcmp(ruleTable[i], nonTerminalName)) {
        context->startPoint = index;
      }
    }
  }

  if (context->startPoint == 0) {
    context->startPoint = 1;
  }

  info.bytecode_length = read64(buf, &info);

  // dump byte code infomation
  dump_byteCodeInfo(&info);

  // free bytecode info
  free(info.filename);
#if PEGVM_PROFILE
  ilength = info.bytecode_length;
  rtable = ruleTable;
  profile = (profileInst *)malloc(sizeof(profileInst) * info.bytecode_length);
  for (int i = 0; i < ruleSize; i++) {
    if (i == ruleSize - 1) {
      for (long j = itable[i]; j < info.bytecode_length; j++) {
        profile[j].ruleName = ruleTable[i];
      }
    } else {
      for (long j = itable[i]; j < itable[i + 1]; j++) {
        profile[j].ruleName = ruleTable[i];
      }
    }
  }
#else
  for (int i = 0; i < ruleSize; i++) {
    free(ruleTable[i]);
  }
  free(ruleTable);
#endif

  head = inst = __malloc(sizeof(*inst) * info.bytecode_length);
  memset(inst, 0, sizeof(*inst) * info.bytecode_length);

  ByteCodeLoader loader;
  loader.input = buf;
  loader.info = &info;
  loader.head = head;

  for (uint64_t i = 0; i < info.bytecode_length; i++) {
    int opcode = buf[info.pos++];
#if PEGVM_PROFILE
    profile[i].opcode = opcode;
    profile[i].count = 0;
#endif
    f_convert[opcode](inst, &loader);
    inst++;
  }

  if (PEGVM_DEBUG) {
    dump_PegVMInstructions(inst, info.bytecode_length);
  }

  context->bytecode_length = info.bytecode_length;
  context->pool_size = info.pool_size_info;
#if defined(PEGVM_COUNT_BYTECODE_MALLOCED_SIZE)
  fprintf(stderr, "malloced_size=%zdKB, %zdKB\n",
          (sizeof(*inst) * info.bytecode_length) / 1024,
          bytecode_malloced_size / 1024);
#endif
  free(buf);
  return nez_VM_Prepare(context, head);
}

void nez_DisposeInstruction(PegVMInstruction *inst, long length) {
  for (long i = 0; i < length; i++) {
    int opcode = inst[i].base.opcode;
    switch (opcode) {
    case OPCODE_ICHARSET: {
      ICHARSET *ir = (ICHARSET *)inst;
      free(ir->set);
      break;
    }
    case OPCODE_ISTRING:
    case OPCODE_ISTRING1:
    case OPCODE_ISTRING2:
    case OPCODE_ISTRING4: {
      ISTRING4 *ir = (ISTRING4 *)inst;
      free(ir->chardata);
      break;
    }
    case OPCODE_ITAG: {
      ITAG *ir = (ITAG *)inst;
      free(ir->chardata);
      break;
    }
    case OPCODE_IVALUE: {
      IVALUE *ir = (IVALUE *)inst;
      free(ir->chardata);
      break;
    }
    case OPCODE_IMAPPEDCHOICE:
    case OPCODE_IMAPPEDCHOICE_8:
    case OPCODE_IMAPPEDCHOICE_16: {
      IMAPPEDCHOICE *ir = (IMAPPEDCHOICE *)inst;
      free(ir->ndata);
      break;
    }
    case OPCODE_INOTCHARSET: {
      INOTCHARSET *ir = (INOTCHARSET *)inst;
      free(ir->set);
      break;
    }
    case OPCODE_INOTSTRING: {
      INOTSTRING *ir = (INOTSTRING *)inst;
      free(ir->cdata);
      break;
    }
    case OPCODE_IOPTIONALCHARSET: {
      IOPTIONALCHARSET *ir = (IOPTIONALCHARSET *)inst;
      free(ir->set);
      break;
    }
    case OPCODE_IOPTIONALSTRING: {
      IOPTIONALSTRING *ir = (IOPTIONALSTRING *)inst;
      free(ir->cdata);
      break;
    }
    case OPCODE_IZEROMORECHARSET: {
      IZEROMORECHARSET *ir = (IZEROMORECHARSET *)inst;
      free(ir->set);
      break;
    }
    }
  }
  free(inst);
}

ParsingContext nez_CreateParsingContext(const char *filename) {
  ParsingContext ctx = (ParsingContext)malloc(sizeof(struct ParsingContext));
  ctx->pos = ctx->input_size = 0;
  ctx->startPoint = 0;
  ctx->mpool = (MemoryPool)malloc(sizeof(struct MemoryPool));
  ctx->inputs = loadFile(filename, &ctx->input_size);
  ctx->stackedSymbolTable =
      (SymbolTableEntry)malloc(sizeof(struct SymbolTableEntry) * 256);
  // P4D_setObject(ctx, &ctx->left, P4D_newObject(ctx, ctx->inputs + ctx->pos));
  ctx->stack_pointer_base =
      (long *)malloc(sizeof(long) * PARSING_CONTEXT_MAX_STACK_LENGTH);
  ctx->object_stack_pointer_base = (ParsingObject *)malloc(
      sizeof(ParsingObject) * PARSING_CONTEXT_MAX_STACK_LENGTH);
  ctx->call_stack_pointer_base = (PegVMInstruction **)malloc(
      sizeof(PegVMInstruction *) * PARSING_CONTEXT_MAX_STACK_LENGTH);
  ctx->stack_pointer = &ctx->stack_pointer_base[0];
  ctx->object_stack_pointer = &ctx->object_stack_pointer_base[0];
  ctx->call_stack_pointer = &ctx->call_stack_pointer_base[0];
  return ctx;
}

void nez_DisposeObject(ParsingObject pego) {
  ParsingObject *child;
#if 0
  assert(pego != NULL);
#endif
  child = pego->child;
  pego->child = NULL;
  if (child) {
    int child_size = pego->child_size;
    for (int i = 0; i < child_size; i++) {
      nez_DisposeObject(child[i]);
    }
    free(child);
  }
}

void nez_DisposeParsingContext(ParsingContext ctx) {
  free(ctx->inputs);
  free(ctx->mpool);
  free(ctx->stackedSymbolTable);
  free(ctx->call_stack_pointer_base);
  free(ctx->stack_pointer_base);
  free(ctx->object_stack_pointer_base);
  free(ctx);
  // dispose_pego(&ctx->unusedObject);
}

void nez_VM_PrintProfile(const char *file_type) {
#if PEGVM_PROFILE
  //  fprintf(stderr, "\ninstruction count \n");
  //  for (int i = 0; i < PEGVM_PROFILE_MAX; i++) {
  //    fprintf(stderr, "%llu %s\n", count[i], get_opname(i));
  //    // fprintf(stderr, "%s: %llu (%0.2f%%)\n", get_opname(i), count[i],
  //    // (double)count[i]*100/(double)count_all);
  //  }
  //  FILE *file;
  //  file = fopen("pegvm_profile.csv", "w");
  //  if (file == NULL) {
  //    assert(0 && "can not open file");
  //  }
  //  fprintf(file, ",");
  //  for (int i = 0; i < PEGVM_PROFILE_MAX; i++) {
  //    fprintf(file, "%s", get_opname(i));
  //    if (i != PEGVM_PROFILE_MAX - 1) {
  //      fprintf(file, ",");
  //    }
  //  }
  //  for (int i = 0; i < PEGVM_PROFILE_MAX; i++) {
  //    fprintf(file, "%s,", get_opname(i));
  //    for (int j = 0; j < PEGVM_PROFILE_MAX; j++) {
  //      fprintf(file, "%llu", conbination_count[i][j]);
  //      if (j != PEGVM_PROFILE_MAX - 1) {
  //        fprintf(file, ",");
  //      }
  //    }
  //    fprintf(file, "\n");
  //  }
  //  fclose(file);
  fprintf(stderr, "Print Profile\n\n");
  for (long i = 0; i < ilength; i++) {
    fprintf(stderr, "%d [%ld] %s rule:%s\n", profile[i].count, i,
            get_opname(profile[i].opcode), profile[i].ruleName);
  }
  for (int i = 0; i < rlength; i++) {
    free(profile[itable[i]].ruleName);
  }
  free(itable);
  free(rtable);
  free(profile);
#endif
}

#include "pegvm_core.c"

ParsingObject nez_Parse(ParsingContext context, PegVMInstruction *inst) {
  if (nez_VM_Execute(context, inst)) {
    nez_PrintErrorInfo("parse error");
  }
  dump_pego(&context->left, context->inputs, 0);
  return context->left;
}
#define PEGVM_STAT 5
void nez_ParseStat(ParsingContext context, PegVMInstruction *inst) {
  for (int i = 0; i < PEGVM_STAT; i++) {
    uint64_t start, end;
    MemoryPool_Reset(context->mpool);
    start = timer();
    if (nez_VM_Execute(context, inst)) {
      nez_PrintErrorInfo("parse error");
    }
    end = timer();
    fprintf(stderr, "ErapsedTime: %llu msec\n",
            (unsigned long long)end - start);
    nez_DisposeObject(context->left);
    context->pos = 0;
  }
}

void nez_Match(ParsingContext context, PegVMInstruction *inst) {
  uint64_t start, end;
  start = timer();
  if (nez_VM_Execute(context, inst)) {
    nez_PrintErrorInfo("parse error");
  }
  end = timer();
  fprintf(stderr, "ErapsedTime: %llu msec\n", (unsigned long long)end - start);
  fprintf(stdout, "match\n\n");
  nez_DisposeObject(context->left);
}

static PegVMInstruction *nez_VM_Prepare(ParsingContext context,
                                        PegVMInstruction *inst) {
  long i;
  const void **table = (const void **)nez_VM_Execute(context, NULL);
  PegVMInstruction *ip = inst;
  for (i = 0; i < context->bytecode_length; i++) {
    PegVMInstructionBase *pc = (PegVMInstructionBase *)ip;
    pc->addr = (const void *)table[pc->opcode];
    ++ip;
  }
  return inst;
}


text:
typedef struct __buffer_manager_t buffer_manager_t;

buffer_manager_t * buffer_manager_new(cmph_uint32 memory_avail, cmph_uint32 nentries);
void buffer_manager_open(buffer_manager_t * buffer_manager, cmph_uint32 index, char * filename);
cmph_uint8 * buffer_manager_read_key(buffer_manager_t * buffer_manager, cmph_uint32 index, cmph_uint32 * keylen);
void buffer_manager_destroy(buffer_manager_t * buffer_manager);
#endif


text:
<!DOCTYPE html>

        <meta charset="utf-8">
        <title>Themes Lab - Creative Laborator</title>
        <meta name="viewport" content="width=device-width, initial-scale=1">
        <meta content="" name="description" />
        <meta content="themes-lab" name="author" />
        <link rel="shortcut icon" href="../assets/global/images/favicon.png">

        <link href="../assets/global/css/style.css" rel="stylesheet">
        <link href="../assets/global/css/ui.css" rel="stylesheet">

Home

About

Contact

Welcome

Our new site is coming soon!

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Cras vulputate arcu sit amet sem venenatis dictum. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Suspendisse eu massa sed orci interdum lobortis. Vivamus rutrum.

More info »

About

Here's a little about what we're up to.

Nullam quis arcu a elit feugiat congue nec non orci. Pellentesque feugiat bibendum placerat. Nullam eu massa in ipsum varius laoreet. Ut tristique pretium egestas. Sed sed velit dolor. Nam rhoncus euismod lorem, id placerat ipsum placerat nec. Mauris ut eros a ligula tristique lacinia non blandit metus. Sed vitae velit lorem, et scelerisque diam.

Follow our updates on Twitter

Contact

Get in touch.

Email: info@avenir.com

                            Phone: 123.456.7890

123 East Main

                            New York, NY 12345

00 weeks 00 days
 00:00:00


text:
using FollowTheTask.BLL.Services.ActionType.ViewModels;
using FollowTheTask.BLL.Services.Model;
using FollowTheTask.DAL.Repositories.ActionType;
using FollowTheTask.TransferObjects.ActionType.DataObjects;

namespace FollowTheTask.BLL.Services.ActionType
{
    public class ActionTypeService : ModelService<ActionTypeDto, ActionTypeViewModel>, IActionTypeService
    {
        private readonly IActionTypeRepository _repository;

        public ActionTypeService(IActionTypeRepository repository) : base(repository)
        {
            _repository = repository;
        }
    }
}


text:
namespace Figlut.Server.Toolkit.Data.QueryRunners
{
    #region Using Directives

    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    using System.Threading.Tasks;

    #endregion //Using Directives

    public interface ISqlQueryRunner
    {
        #region Methods

        SqlQueryRunnerOutput ExecuteQuery(SqlQueryRunnerInput input);

        #endregion //Methods
    }
}


text:
<?php
/**
 * Lexicon Dutch lexicon topic
 *
 * @language nl
 * @package modx
 * @subpackage lexicon
 *
 * @author Bert Oost, <bertoost85@gmail.com>
 */
$_lang['duplicate'] = 'Dupliceer';
$_lang['entry'] = 'Item';
$_lang['entry_create'] = 'Item maken';
$_lang['entry_err_ae'] = 'Item bestaat reeds!';
$_lang['entry_err_nf'] = 'Item niet gevonden!';
$_lang['entry_err_ns'] = 'Item niet gespecificeerd.';
$_lang['entry_err_save'] = 'Er is een fout opgetreden tijdens het opslaan van het Lexicon item.';
$_lang['entry_revert'] = 'Draai Lexicon item terug.';
$_lang['language'] = 'Taal';
$_lang['languages'] = 'Talen';
$_lang['last_modified'] = 'Gewijzigd';
$_lang['lexicon'] = 'Lexicon';
$_lang['lexicon_export'] = 'Exporteer onderwerp';
$_lang['lexicon_export_desc'] = 'Hier kun je een Lexicon onderwerp selecteren om te exporteren naar een bestand.';
$_lang['lexicon_topics'] = 'Lexicon onderwerpen';
$_lang['lexicon_topics_desc'] = 'Hier kun je jouw Lexicon onderwerpen beheren.';
$_lang['lexicon_import'] = 'Importeer onderwerp';
$_lang['lexicon_import_desc'] = 'Je kunt een bestand importeren in een gespeficifeerde Lexicon onderwerp voor een namespace. Jouw bestand moet een $_lang associatieve array van strings returnen, gelijkwaardig aan de core/lexicon bestanden. Als het onderwerp in de namespace reeds bestaat, dan word het overschreven.';
$_lang['lexicon_import_err_ns'] = 'Lexicon onderwerp bestand niet gespecificeerd.';
$_lang['lexicon_import_err_upload'] = 'Er is een fout opgetreden tijdens het uploaden van het bestand voor het nieuwe Lexicon onderwerp. Controleer jouw server rechten door proberen te uploaden in de tmp map, en valideer het bestand wat je wilt uploaden of het een geldig bestand is.';
$_lang['lexicon_management'] = 'Lexicon Management';
$_lang['lexicon_management_desc'] = 'Hier kun je elk Lexicon item overschrijven in de namespaces en de respectievelijke onderwerpen. Enkel dubbelklik op een willekeurige waarde om deze te overschrijven. Om een nieuwe Lexicon items of onderwerpen toe te voegen, maak je simpel een onderwerp-bestand in de respectievelijke namespace map.';
$_lang['lexicon_rlfb_msg'] = 'Met succes [[+num]] nieuwe strings aangemaakt.';
$_lang['reload_from_base'] = 'Draai alle core items terug';
$_lang['reload_success'] = 'Met success [[+total]] strings teruggedraaid.';
$_lang['search_by_key'] = 'Sleutel zoeken:';
$_lang['topic'] = 'Onderwerp';


text:
/**
 * This is a layout that enables anchoring of contained elements relative to the container's dimensions.
 * If the container is resized, all anchored items are automatically rerendered according to their
 * `{@link #anchor}` rules.
 *
 * This class is intended to be extended or created via the {@link Ext.container.AbstractContainer#layout layout}: 'anchor'
 * config, and should generally not need to be created directly via the new keyword.
 *
 * AnchorLayout does not have any direct config options (other than inherited ones). By default,
 * AnchorLayout will calculate anchor measurements based on the size of the container itself. However, the
 * container using the AnchorLayout can supply an anchoring-specific config property of `anchorSize`.
 *
 * If anchorSize is specifed, the layout will use it as a virtual container for the purposes of calculating
 * anchor measurements based on it instead, allowing the container to be sized independently of the anchoring
 * logic if necessary.
 *
 *     @example
 *     Ext.create('Ext.Panel', {
 *         width: 500,
 *         height: 400,
 *         title: "AnchorLayout Panel",
 *         layout: 'anchor',
 *         renderTo: Ext.getBody(),
 *         items: [
 *             {
 *                 xtype: 'panel',
 *                 title: '75% Width and 20% Height',
 *                 anchor: '75% 20%'
 *             },
 *             {
 *                 xtype: 'panel',
 *                 title: 'Offset -300 Width & -200 Height',
 *                 anchor: '-300 -200'
 *             },
 *             {
 *                 xtype: 'panel',
 *                 title: 'Mixed Offset and Percent',
 *                 anchor: '-250 20%'
 *             }
 *         ]
 *     });
 */
Ext.define('Ext.layout.container.Anchor', {

    /* Begin Definitions */

    alias: 'layout.anchor',
    extend: 'Ext.layout.container.Auto',
    alternateClassName: 'Ext.layout.AnchorLayout',

    /* End Definitions */

    type: 'anchor',

    /**
     * @cfg {String} anchor
     *
     * This configuation option is to be applied to **child `items`** of a container managed by
     * this layout (ie. configured with `layout:'anchor'`).
     *
     * This value is what tells the layout how an item should be anchored to the container. `items`
     * added to an AnchorLayout accept an anchoring-specific config property of **anchor** which is a string
     * containing two values: the horizontal anchor value and the vertical anchor value (for example, '100% 50%').
     * The following types of anchor values are supported:
     *
     * - **Percentage** : Any value between 1 and 100, expressed as a percentage.
     *
     *   The first anchor is the percentage width that the item should take up within the container, and the
     *   second is the percentage height.  For example:
     *
     *       // two values specified
     *       anchor: '100% 50%' // render item complete width of the container and
     *                          // 1/2 height of the container
     *       // one value specified
     *       anchor: '100%'     // the width value; the height will default to auto
     *
     * - **Offsets** : Any positive or negative integer value.
     *
     *   This is a raw adjustment where the first anchor is the offset from the right edge of the container,
     *   and the second is the offset from the bottom edge. For example:
     *
     *       // two values specified
     *       anchor: '-50 -100' // render item the complete width of the container
     *                          // minus 50 pixels and
     *                          // the complete height minus 100 pixels.
     *       // one value specified
     *       anchor: '-50'      // anchor value is assumed to be the right offset value
     *                          // bottom offset will default to 0
     *
     * - **Sides** : Valid values are `right` (or `r`) and `bottom` (or `b`).
     *
     *   Either the container must have a fixed size or an anchorSize config value defined at render time in
     *   order for these to have any effect.
     *
     * - **Mixed** :
     *
     *   Anchor values can also be mixed as needed.  For example, to render the width offset from the container
     *   right edge by 50 pixels and 75% of the container's height use:
     *
     *       anchor:   '-50 75%'
     */

    /**
     * @cfg {String} defaultAnchor
     * Default anchor for all child **container** items applied if no anchor or specific width is set on the child item.
     */
    defaultAnchor: '100%',

    parseAnchorRE: /^(r|right|b|bottom)$/i,

    manageOverflow: true,

    beginLayoutCycle: function (ownerContext) {
        var me = this,
            dimensions = 0,
            anchorSpec, childContext, childItems, i, length, target;

        me.callParent(arguments);

        childItems = ownerContext.childItems; // populated by callParent
        length = childItems.length;

        for (i = 0; i < length; ++i) {
            childContext = childItems[i];
            anchorSpec = childContext.target.anchorSpec;

            if (anchorSpec) {
                if (childContext.widthModel.calculated && anchorSpec.right) {
                    dimensions |= 1;
                }
                if (childContext.heightModel.calculated && anchorSpec.bottom) {
                    dimensions |= 2;
                }

                if (dimensions == 3) { // if (both dimensions in play)
                    break;
                }
            }
        }

        ownerContext.anchorDimensions = dimensions;

        //<debug>
        me.sanityCheck(ownerContext);
        //</debug>
    },

    calculateItems: function (ownerContext, containerSize) {
        var me = this,
            childItems = ownerContext.childItems,
            length = childItems.length,
            gotHeight = containerSize.gotHeight,
            gotWidth = containerSize.gotWidth,
            ownerHeight = containerSize.height,
            ownerWidth = containerSize.width,
            knownDimensions = (gotWidth ? 1 : 0) | (gotHeight ? 2 : 0),
            anchorDimensions = ownerContext.anchorDimensions,
            anchorSpec, childContext, childMargins, height, i, width;

        if (!anchorDimensions) {
            return true;
        }

        for (i = 0; i < length; i++) {
            childContext = childItems[i];
            childMargins = childContext.getMarginInfo();
            anchorSpec = childContext.target.anchorSpec;

            // Check widthModel in case "defaults" has applied an anchor to a component
            // that also has width (which must win). If we did not make this check in this
            // way, we would attempt to calculate a width where it had been configured.
            //
            if (gotWidth && childContext.widthModel.calculated) {
                width = anchorSpec.right(ownerWidth) - childMargins.width;
                width = me.adjustWidthAnchor(width, childContext);

                childContext.setWidth(width);
            }

            // Repeat for height
            if (gotHeight && childContext.heightModel.calculated) {
                height = anchorSpec.bottom(ownerHeight) - childMargins.height;
                height = me.adjustHeightAnchor(height, childContext);

                childContext.setHeight(height);
            }
        }

        // If all required dimensions are known, we're done
        return (knownDimensions & anchorDimensions) === anchorDimensions;
    },

    //<debug>
    sanityCheck: function (ownerContext) {
        var shrinkWrapWidth = ownerContext.widthModel.shrinkWrap,
            shrinkWrapHeight = ownerContext.heightModel.shrinkWrap,
            children = ownerContext.childItems,
            anchorSpec, comp, childContext,
            i, length;

        for (i = 0, length = children.length; i < length; ++i) {
            childContext = children[i];
            comp = childContext.target;
            anchorSpec = comp.anchorSpec;

            if (anchorSpec) {
                if (childContext.widthModel.calculated && anchorSpec.right) {
                    if (shrinkWrapWidth) {
                        Ext.log({
                            level: 'warn',
                            msg: 'Right anchor on '+comp.id+' in shrinkWrap width container'
                        });
                    }
                }

                if (childContext.heightModel.calculated && anchorSpec.bottom) {
                    if (shrinkWrapHeight) {
                        Ext.log({
                            level: 'warn',
                            msg: 'Bottom anchor on '+comp.id+' in shrinkWrap height container'
                        });
                    }
                }
            }
        }
    },
    //</debug>

    // private
    anchorFactory: {
        offset: function (delta) {
            return function(v) {
                return v + delta;
            };
        },
        ratio: function (ratio) {
            return function(v) {
                return Math.floor(v * ratio);
            };
        },
        standard: function (diff) {
            return function(v) {
                return v - diff;
            };
        }
    },

    parseAnchor: function(a, start, cstart) {
        if (a && a != 'none') {
            var factory = this.anchorFactory,
                delta;

            if (this.parseAnchorRE.test(a)) {
                return factory.standard(cstart - start);
            }
            if (a.indexOf('%') != -1) {
                return factory.ratio(parseFloat(a.replace('%', '')) * 0.01);
            }
            delta = parseInt(a, 10);
            if (!isNaN(delta)) {
                return factory.offset(delta);
            }
        }
        return null;
    },

    // private
    adjustWidthAnchor: function(value, childContext) {
        return value;
    },

    // private
    adjustHeightAnchor: function(value, childContext) {
        return value;
    },

    configureItem: function(item) {
        var me = this,
            owner = me.owner,
            anchor= item.anchor,
            anchorsArray,
            anchorWidth,
            anchorHeight;

        me.callParent(arguments);

        if (!item.anchor && item.items && !Ext.isNumber(item.width) && !(Ext.isIE6 && Ext.isStrict)) {
            item.anchor = anchor = me.defaultAnchor;
        }

        /**
         * @cfg {Number/Object} anchorSize
         * Defines the anchoring size of container.
         * Either a number to define the width of the container or an object with `width` and `height` fields.
         * @member Ext.container.Container
         */
        if (owner.anchorSize) {
            if (typeof owner.anchorSize == 'number') {
                anchorWidth = owner.anchorSize;
            } else {
                anchorWidth = owner.anchorSize.width;
                anchorHeight = owner.anchorSize.height;
            }
        } else {
            anchorWidth = owner.initialConfig.width;
            anchorHeight = owner.initialConfig.height;
        }

        if (anchor) {
            // cache all anchor values
            anchorsArray = anchor.split(' ');
            item.anchorSpec = {
                right: me.parseAnchor(anchorsArray[0], item.initialConfig.width, anchorWidth),
                bottom: me.parseAnchor(anchorsArray[1], item.initialConfig.height, anchorHeight)
            };
        }
    },

    sizePolicy: {
        $: {
            readsWidth: 1,
            readsHeight: 1,
            setsWidth: 0,
            setsHeight: 0
        },
        b: {
            readsWidth: 1,
            readsHeight: 0,
            setsWidth: 0,
            setsHeight: 1
        },
        r: {
            $: {
                readsWidth: 0,
                readsHeight: 1,
                setsWidth: 1,
                setsHeight: 0
            },
            b: {
                readsWidth: 0,
                readsHeight: 0,
                setsWidth: 1,
                setsHeight: 1
            }
        }
    },

    getItemSizePolicy: function (item) {
        var anchorSpec = item.anchorSpec,
            key = '$',
            policy = this.sizePolicy,
            sizeModel;

        if (anchorSpec) {
            sizeModel = this.owner.getSizeModel();
            if (anchorSpec.right && !sizeModel.width.shrinkWrap) {
                policy = policy.r;
            }
            if (anchorSpec.bottom && !sizeModel.height.shrinkWrap) {
                key = 'b';
            }
        }

        return policy[key];
    }
});


text:
/*
  Vertical position is controlled by using full-width block-elements, e.g., .formRow.
  These elements should have a definite height, expressed relative to the font (e.g., ex or em).
  All these block-elements should be set to a heigth that includes all there children effectively.

  Horizontal positioning is done with absolute positioning, on px basis, within the block-elements
  that control vertical positioning. The absolute positioning anchor is the semantic object pane,
  or LayoutContainer children used in the semantic object pane. This will have a definite width.

  Tabs are imagined at 10px and 90px, and a right tab at -10px from the right.
*/

/* fields */

.SemanticObjectPane div.formRow {
  /*position: relative;*/
  padding-top: 0;
  padding-bottom: 0;
  height: 3.4ex;
}

.SemanticObjectPane .dijitTextBoxReadOnly,
.SemanticObjectPane .dijitValidationTextBoxReadOnly,
.SemanticObjectPane .dijitSelectReadOnly {
  border: 1px solid transparent !important;
  background-color: transparent !important;
}

.SemanticObjectPane .dijitTextBoxReadOnly input,
.SemanticObjectPane .dijitValidationTextBoxReadOnly input {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.SemanticObjectPane .formRow .dijitCheckBox {
  padding-top: 1.1ex;
  margin-left: 3px;
}

.SemanticObjectPane .identifyingField {
  font-weight: bold;
  font-size: 150%;
  width: 99.5%;
  margin-bottom: 0.5ex;
}

.SemanticObjectPane .secondary,
.miniWidget .secondary {
  float: right;
  color: gray;
  font-size: 75%;
  /*padding-right: 2px allow space for italic last letter */
}

.SemanticObjectPane .fillToLeft,
.SemanticObjectPane .afterLabel,
.SemanticObjectPane .fillToRight,
/* extra mentions necessary to force text boxes to listen */
.SemanticObjectPane .dijitTextBox.fillToLeft,
.SemanticObjectPane .dijitTextBox.afterLabel,
.SemanticObjectPane .dijitTextBox.fillToRight {
  position: absolute;
  width: inherit !important;
  line-height: 3.2ex;
}

.SemanticObjectPane .fillToLeft,
.SemanticObjectPane .afterLabel,
.SemanticObjectPane .fillToRight,
  /* extra mentions necessary to force text boxes to listen */
.SemanticObjectPane .dijitTextBox.fillToLeft,
.SemanticObjectPane .dijitTextBox.afterLabel,
.SemanticObjectPane .dijitTextBox.fillToRight {
  width: inherit !important;
}

.SemanticObjectPane .fillToLeft,
/* extra mentions necessary to force text boxes to listen */
.SemanticObjectPane .dijitTextBox.fillToLeft,
.SemanticObjectPane label.fixedLabel {
  left: 10px;
}

.SemanticObjectPane .afterLabel,
/* extra mentions necessary to force text boxes to listen */
.SemanticObjectPane .dijitTextBox.afterLabel {
  left: 90px !important; /* see fixedLabel */
}

.SemanticObjectPane .fillToRight,
/* extra mentions necessary to force text boxes to listen */
.SemanticObjectPane .dijitTextBox.fillToRight {
  right: 10px;
}

.SemanticObjectPane .dojoxCheckedMultiSelectHidden {
  display: none;
}

/* labels */

.SemanticObjectPane label {
  color: darkslategrey;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.SemanticObjectPane label.fixedLabel {
  position: absolute;
  width: 75px; /* see .dijitTextBox.afterLabel */
  display: inline-block;
  font-weight: bold;
  font-size: 90%;
  padding-top: 0.3ex;
}

.SemanticObjectPane fieldset {
  border-style: solid;
  border-color: gray;
  border-width: 1px;
  padding: 5px;
  margin-top: 10px;
  margin-bottom: 10px;
}

/* mini-widgets */

.miniWidget {
}

/* layout */

.SemanticObjectPane .fields.dijitLayoutContainerPane {
  padding: 0; /* override dijit ContentPane setting */
}

.SemanticObjectPane .dijitBorderContainer-child {
  border-style: none;
  border-width: 0;
}

.SemanticObjectPane .dijitGutterV {
  width: 10px;
}

.SemanticObjectPane .dijitTabPaneWrapper,
.SemanticObjectPane .dijitTabContainerTop-child {
  padding: 0;
  background-color: transparent;
}

.SemanticObjectPane .dijitAccordionContainer .dijitAccordionChildWrapper,
.SemanticObjectPane .dijitAccordionContainer .dijitAccordionContainer-child,
.SemanticObjectPane .dijitAccordionContainer .dijitAccordionInnerContainerSelected {
  padding: 0;
  background-color: transparent;
}

.SemanticObjectPane .dijitAccordionContainer .dijitAccordionChildWrapper {
  margin: 0;
  border-style: none;
  border-width: 0;
}

/* lists */

/*.SemanticObjectPane .dgrid-grid.list,*/
/*.SemanticObjectPane .dgrid-grid.grdComposition,*/
/*.SemanticObjectPane .dgrid-grid.grdSingularProperties {*/
  /*position: absolute;*/
  /*left: 10px;*/
  /*right: 10px;*/
  /*border: none;*/
  /*background-color: transparent;*/
  /*min-height: 250px;*/
  /*height: inherit;*/
/*}*/

/*.SemanticObjectPane .dgrid-grid.grdComposition,*/
/*.SemanticObjectPane .dgrid-grid.grdSingularProperties {*/
  /*border-radius: 3px;*/
  /*border-color: gray;*/
  /*border-width: 1px;*/
  /*border-style: solid;*/
/*}*/

.SemanticObjectPane .dgrid-no-data,
.SemanticObjectPane .dgrid-loading {
  width: 100%;
  text-align: center;
  font-style: italic;
  font-size: 75%;
  color: gray;
}

/*.SemanticObjectPane .dgrid-grid.list .dgrid-scroller,*/
/*.SemanticObjectPane .dgrid-grid.grdComposition .dgrid-scroller,*/
/*.SemanticObjectPane .dgrid-grid.grdSingularProperties .dgrid-scroller {*/
  /*margin-top: 0 !important;*/
  /*overflow-y: auto;*/
/*}*/

/*.SemanticObjectPane .dgrid-grid.grdComposition .dgrid-row,*/
/*.SemanticObjectPane .dgrid-grid.grdSingularProperties .dgrid-row {*/
  /*background-color: transparent;*/
/*}*/

/*.SemanticObjectPane .dgrid-grid.grdComposition .dgrid-cell.field-component,*/
/*.SemanticObjectPane .dgrid-grid.grdSingularProperties .dgrid-cell.field-propertyName {*/
  /*color: gray;*/
  /*font-weight: bold;*/
  /*font-size: 90%;*/
  /*text-align: right;*/
  /*width: 7em;*/
/*}*/

.SemanticObjectPane .properties .propertiesTop {
  height: 36px;  /* icon button + padding */
  padding: 0;
}

.SemanticObjectPane .properties .propertiesTop label {
  font-size: 90%;
  line-height: 35px;
  font-weight: bold;
}

.SemanticObjectPane .properties .propertiesTop .dijitButton,
.SemanticObjectPane .properties .propertiesTop .dijitDropDownButton {
  position: absolute;
  right: 0;
  bottom: 5px;
  margin-right: 0;
}

.SemanticObjectPane .properties .dgrid.dgrid-grid{
  margin-left: 0;
  margin-right: 0;
  border-style: none !important;
  border-width: 0! important;
  border-color: transparent !important;
  background-color: transparent !important;
}

.extraButtons.dijitContentPane {
  padding: 0;
}

.extraButtons .dijitButton,
.extraButtons .dijitDropDownButton,
.extraButtons .dijitToggleButton{
  float: right;
}

/* dgrid list rows */

.SemanticObjectPane .listRow {
  padding: 5px;
  margin-bottom: 3px;
  margin-top: 3px;
  margin-left: 0;
  margin-right: 4px;
  border-style: solid;
  border-color: gray;
  border-width: 1px;
  border-radius: 3px;
}

.claro .SemanticObjectPane .listRow.ui-state-default:hover {
  background-color: #e9f2fe !important;
}

.claro .SemanticObjectPane .listRow.ui-state-active {
  background-color: #cee6fa !important;
}

.claro .SemanticObjectPane .listRow.ui-state-active:hover {
  background-color: #9bc6f2 !important;
}

.claro .listRow.ui-state-highlight {
  background-color: #ff6 !important;
}

.SemanticObjectPane .listRow label {
  display: block;
  margin-top: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.SemanticObjectPane .listRow label.listRowIdentifyingField {
  font-weight: bolder;
}

.SemanticObjectPane .listRow label.listRowBottomRightMinor {
  margin-top: 4px;
  padding-right: 2px;  /*allow space for italic last letter*/
  color: gray;
  font-style: italic;
  font-size: 75%;
  text-align: right;
}

.dijitMenuItem.dangerousOperation {
  color: #000000;
  background-color: #ffff00;
  border-style: solid;
  border-width: 4px;
  border-color: #000000;
  font-weight: bold;
}

.dijitMenuItem.dangerousOperation.dijitMenuItemSelected,
.dijitMenuItem.dangerousOperation.dijitMenuItemSelected .dijitMenuItemLabel,
.dijitMenuItem.dangerousOperation.dijitMenuItemSelected .dijitMenuItemIconCell,
.dijitMenuItem.dangerousOperation.dijitMenuItemSelected .dijitMenuItemAccelKey,
.dijitMenuItem.dangerousOperation.dijitMenuItemSelected .dijitMenuArrowCell {
  color: white !important;
  background-color: red !important;
  border-color: white !important;
}

.warningIcon {
  background-image: url('img/warning.png');
  background-repeat: no-repeat;
  width: 18px;
  height: 18px;
  text-align: center;
}


text:
import * as tf from '@tensorflow/tfjs-core';
import { NetInput, TNetInput } from '../dom';
import { NeuralNetwork } from '../NeuralNetwork';
import { TinyXceptionParams } from './types';
export declare class TinyXception extends NeuralNetwork<TinyXceptionParams> {
    private _numMainBlocks;
    constructor(numMainBlocks: number);
    forwardInput(input: NetInput): tf.Tensor4D;
    forward(input: TNetInput): Promise<tf.Tensor4D>;
    protected getDefaultModelName(): string;
    protected extractParamsFromWeigthMap(weightMap: tf.NamedTensorMap): {
        params: TinyXceptionParams;
        paramMappings: import("../common").ParamMapping[];
    };
    protected extractParams(weights: Float32Array): {
        params: TinyXceptionParams;
        paramMappings: import("../common").ParamMapping[];
    };
}


text:
/* eslint-disable jsdoc/require-jsdoc */
import { useState, useMemo } from 'react'
import PropTypes from 'prop-types'

import {
  InfoEmpty as IconIcon,
  Settings as SettingsIcon,
  Page as LogIcon,
  Calendar as ActionsIcons,
} from 'iconoir-react'

import { AppBar, Tabs, Tab, Box } from '@mui/material'

import CustomDialog from 'client/containers/ApplicationsInstances/DialogInfo/dialog'
import InfoTab from 'client/containers/ApplicationsInstances/DialogInfo/info'
import TiersTab from 'client/containers/ApplicationsInstances/DialogInfo/tiers'

const TABS = [
  { name: 'info', icon: IconIcon, content: InfoTab },
  { name: 'tiers', icon: SettingsIcon, content: TiersTab },
  { name: 'log', icon: LogIcon },
  { name: 'actions', icon: ActionsIcons },
]

const DialogInfo = ({ info, handleClose }) => {
  const [tabSelected, setTab] = useState(0)
  const { name } = info?.TEMPLATE?.BODY

  const renderTabs = useMemo(
    () => (
      <AppBar position="static">
        <Tabs
          value={tabSelected}
          variant="scrollable"
          scrollButtons="auto"
          onChange={(_, tab) => setTab(tab)}
        >
          {TABS.map(({ name: tabName, icon: Icon }, idx) => (
            <Tab
              key={`tab-${tabName}`}
              id={`tab-${tabName}`}
              icon={<Icon />}
              value={idx}
              label={String(tabName).toUpperCase()}
            />
          ))}
        </Tabs>
      </AppBar>
    ),
    [tabSelected]
  )

  return (
    <CustomDialog title={name} handleClose={handleClose}>
      {renderTabs}
      {useMemo(
        () =>
          TABS.map(({ name: tabName, content: Content }, idx) => (
            <Box
              p={2}
              height={1}
              overflow="auto"
              key={`tab-${tabName}`}
              hidden={tabSelected !== idx}
            >
              {Content !== undefined ? (
                <Content info={info} />
              ) : (
                <h1>{tabName}</h1>
              )}
            </Box>
          )),
        [tabSelected]
      )}
    </CustomDialog>
  )
}

DialogInfo.propTypes = {
  info: PropTypes.object.isRequired,
  handleClose: PropTypes.func,
}

DialogInfo.defaultProps = {
  info: {},
  handleClose: undefined,
}

export default DialogInfo


text:
//-----------------------------------------------------------------------
//   Copyright 2017 Roman Tumaykin
//
//   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.
//-----------------------------------------------------------------------

using System.Xml;

namespace SsisBuild.Core.ProjectManagement.Helpers
{
    public static class XmlHelpers
    {
        public static class Schemas
        {
            public static string SSIS = "www.microsoft.com/SqlServer/SSIS";
            public static string DTS = "www.microsoft.com/SqlServer/Dts";
        }
        public static XmlNamespaceManager GetNameSpaceManager(this XmlNode node)
        {
            var ownerDocument = node.GetDocument();

            var namespaceManager = new XmlNamespaceManager(ownerDocument.NameTable);
            namespaceManager.AddNamespace("SSIS", Schemas.SSIS);
            namespaceManager.AddNamespace("DTS", Schemas.DTS);
            return namespaceManager;
        }

        public static XmlDocument GetDocument(this XmlNode node)
            => node.NodeType == XmlNodeType.Document ? node as XmlDocument : node.OwnerDocument;

        public static XmlAttribute GetAttributeNode(this XmlNode rootNode, string name) => (rootNode.Attributes?.GetNamedItem(name, Schemas.SSIS) as XmlAttribute ??
                                                                                rootNode.Attributes?.GetNamedItem(name) as XmlAttribute) ??
                                                                                rootNode.Attributes?.GetNamedItem(name, Schemas.DTS) as XmlAttribute;

    }
}


text:
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
	<modelVersion>4.0.0</modelVersion>

	<groupId>com.balidao</groupId>
	<artifactId>transreport</artifactId>
	<version>1.0-SNAPSHOT</version>
	<packaging>war</packaging>

	<distributionManagement>
		<repository>
			<id>releases</id>
			<url>http://nexus.otms.cn/content/repositories/releases</url>
		</repository>
	</distributionManagement>

	<!-- 集中定义依赖版本号 -->
	<properties>
		<junit.version>4.12</junit.version>
		<postgresql.version>8.4-702.jdbc4</postgresql.version>
		<spring.version>4.2.5.RELEASE</spring.version>
		<hibernate.version>4.3.11.Final</hibernate.version>
		<mysql.version>5.1.32</mysql.version>
		<slf4j.version>1.6.4</slf4j.version>
		<jackson.version>2.7.2</jackson.version>
		<druid.version>1.0.9</druid.version>
		<httpclient.version>4.3.5</httpclient.version>
		<servlet-api.version>2.5</servlet-api.version>
		<joda-time.version>2.0</joda-time.version>
		<commons-lang3.version>3.3.2</commons-lang3.version>
		<commons-net.version>3.3</commons-net.version>
		<commons-fileupload.version>1.3.1</commons-fileupload.version>
		<jedis.version>2.6.2</jedis.version>
		<spring-data-redis.version>1.4.2.RELEASE</spring-data-redis.version>
		<jadira.usertype.version>5.0.0.GA</jadira.usertype.version>
	</properties>

	<!-- dependencyManagement只定义依赖的版本,并不实际依赖,这并不会将jar包引入进来 -->
	<dependencies>
		<!-- 时间操作组件 -->
		<dependency>
			<groupId>joda-time</groupId>
			<artifactId>joda-time</artifactId>
			<version>${joda-time.version}</version>
		</dependency>
		<dependency>
			<groupId>org.jadira.usertype</groupId>
			<artifactId>usertype.core</artifactId>
			<version>${jadira.usertype.version}</version>
		</dependency>
		<!-- Apache工具组件 -->
		<dependency>
			<groupId>org.apache.commons</groupId>
			<artifactId>commons-lang3</artifactId>
			<version>${commons-lang3.version}</version>
		</dependency>
		<dependency>
			<groupId>commons-net</groupId>
			<artifactId>commons-net</artifactId>
			<version>${commons-net.version}</version>
		</dependency>
		<!-- Jackson Json处理工具包 -->
		<dependency>
			<groupId>com.fasterxml.jackson.core</groupId>
			<artifactId>jackson-databind</artifactId>
			<version>${jackson.version}</version>
		</dependency>
		<!-- httpclient -->
		<dependency>
			<groupId>org.apache.httpcomponents</groupId>
			<artifactId>httpclient</artifactId>
			<version>${httpclient.version}</version>
		</dependency>
	 	<dependency>
			<groupId>javax.servlet</groupId>
			<artifactId>servlet-api</artifactId>
			<version> ${servlet-api.version}</version>
			 <scope>provided</scope>
		</dependency>
		<!-- 单元测试 -->
		<dependency>
			<groupId>junit</groupId>
			<artifactId>junit</artifactId>
			<version>${junit.version}</version>
			<scope>test</scope>
		</dependency>
		<!-- 日志处理 -->
		<dependency>
			<groupId>org.slf4j</groupId>
			<artifactId>slf4j-log4j12</artifactId>
			<version>${slf4j.version}</version>
		</dependency>
		<!-- MySql -->
		<dependency>
			<groupId>mysql</groupId>
			<artifactId>mysql-connector-java</artifactId>
			<version>${mysql.version}</version>
		</dependency>
		<!-- 连接池 -->
		<dependency>
			<groupId>com.alibaba</groupId>
			<artifactId>druid</artifactId>
			<version>${druid.version}</version>
		</dependency>
		<!-- hibernate -->
		<dependency>
			<groupId>org.hibernate</groupId>
			<artifactId>hibernate-core</artifactId>
			<version>${hibernate.version}</version>
		</dependency>
		<!-- Spring -->
		<dependency>
			<groupId>org.springframework</groupId>
			<artifactId>spring-context</artifactId>
			<version>${spring.version}</version>
		</dependency>
		<dependency>
			<groupId>org.springframework</groupId>
			<artifactId>spring-beans</artifactId>
			<version>${spring.version}</version>
		</dependency>
		<dependency>
			<groupId>org.springframework</groupId>
			<artifactId>spring-orm</artifactId>
			<version>${spring.version}</version>
		</dependency>
		<dependency>
			<groupId>org.springframework</groupId>
			<artifactId>spring-aop</artifactId>
			<version>${spring.version}</version>
		</dependency>
		<dependency>
			<groupId>org.springframework</groupId>
			<artifactId>spring-webmvc</artifactId>
			<version>${spring.version}</version>
		</dependency>
		<dependency>
			<groupId>org.springframework</groupId>
			<artifactId>spring-core</artifactId>
			<version>${spring.version}</version>
		</dependency>
		<dependency>
			<groupId>org.springframework</groupId>
			<artifactId>spring-jdbc</artifactId>
			<version>${spring.version}</version>
		</dependency>
		<dependency>
			<groupId>org.springframework</groupId>
			<artifactId>spring-aspects</artifactId>
			<version>${spring.version}</version>
		</dependency>
		<dependency>
			<groupId>postgresql</groupId>
			<artifactId>postgresql</artifactId>
			<version>${postgresql.version}</version>
		</dependency>
		<!-- 文件上传组件 -->
		<dependency>
			<groupId>commons-fileupload</groupId>
			<artifactId>commons-fileupload</artifactId>
			<version>${commons-fileupload.version}</version>
		</dependency>
		<dependency>
			<groupId>redis.clients</groupId>
			<artifactId>jedis</artifactId>
			<version>${jedis.version}</version>
		</dependency>
		<dependency>
			<groupId>org.springframework.data</groupId>
			<artifactId>spring-data-redis</artifactId>
			<version>${spring-data-redis.version}</version>
			<exclusions></exclusions>
		</dependency>
	</dependencies>

	<!--build构建一些插件 -->
	<build>
		<finalName>${project.artifactId}</finalName>
		<plugins>
			<!-- 资源文件拷贝插件 -->
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-resources-plugin</artifactId>
				<version>2.7</version>
				<configuration>
					<encoding>UTF-8</encoding>
				</configuration>
			</plugin>
			<!-- java编译插件,设置maven编译的时候jdk的版本 -->
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-compiler-plugin</artifactId>
				<version>3.2</version>
				<configuration>
					<source>1.7</source>
					<target>1.7</target>
					<encoding>UTF-8</encoding>
				</configuration>
			</plugin>
			<!-- 配置Tomcat插件 -->
			<plugin>
				<groupId>org.apache.tomcat.maven</groupId>
				<artifactId>tomcat7-maven-plugin</artifactId>
				<version>2.2</version>
				<configuration>
					<port>8082</port>
					<path>/</path>
				</configuration>
			</plugin>
		</plugins>
	</build>
</project>


text:
A ridiculously simple Go database/sql wrapper that supports automatic schema
migrations. It is mainly intented to reduce boilerplate database setup for
simple projects, NOT for multi-database setups, complex migrations, dependency
management, etc.

[![GoDoc](https://godoc.org/github.com/pbnjay/db?status.svg)](http://godoc.org/github.com/pbnjay/db)

DDL statements are appended to a .go file containing your schema creation
statements in an array. This array should be though of as append-only once DDL
statements are committed to version control.

Although the interface remains simple, this package forces you to think about
your database migrations during development, in addition to keeping code and
database DDL in sync in the same source repository.

## Example Usage

To use this package, you'd simply define your schema in an imported init()
function like this:

```go
func init() {
  db.Schema = []string{
    `CREATE TABLE hotels (
        id serial primary key,
        name varchar
     );`,
    `CREATE TABLE rooms (
        id serial primary key,
        number integer,
        hotel int references hotels(id)
     );`,
  }
}

func main() {
  db.MustInit("dbname=hotels")
  db.DB.Exec(`INSERT INTO hotels (name) VALUES ($1)`, "Hello World Hotel")
}
```

Then after future development occurs, schema migration statements are
appended to the init() function's db.Schema array. For example, to add an
address to the hotels table above:

```diff
         number integer,
         hotel int references hotels(id)
      );`,
+    `ALTER TABLE hotels ADD COLUMN address varchar;`,
   }
 }

 func main() {
   db.MustInit("dbname=hotels")
-  db.DB.Exec(`INSERT INTO hotels (name) VALUES ($1)`, "Hello World Hotel")
+  db.DB.Exec(`INSERT INTO hotels (name, address) VALUES ($1, $2)`,
+      "Hello World Hotel", "123 Main St")
 }
```

## TODOs

 - Create a git hook command to verify immutable db.Schema updates. Issue #1
 - Create (optional) reverse migration DDL and interface methods. Issue #2

## License

MIT


text:
using namespace llvm;

//===----------------------------------------------------------------------===//
// FoldingSetNodeIDRef Implementation

/// ComputeHash - Compute a strong hash value for this FoldingSetNodeIDRef,
/// used to lookup the node in the FoldingSetImpl.
unsigned FoldingSetNodeIDRef::ComputeHash() const {
  return static_cast<unsigned>(hash_combine_range(Data, Data+Size));
}

bool FoldingSetNodeIDRef::operator==(FoldingSetNodeIDRef RHS) const {
  if (Size != RHS.Size) return false;
  return memcmp(Data, RHS.Data, Size*sizeof(*Data)) == 0;
}

/// Used to compare the "ordering" of two nodes as defined by the
/// profiled bits and their ordering defined by memcmp().
bool FoldingSetNodeIDRef::operator<(FoldingSetNodeIDRef RHS) const {
  if (Size != RHS.Size)
    return Size < RHS.Size;
  return memcmp(Data, RHS.Data, Size*sizeof(*Data)) < 0;
}

//===----------------------------------------------------------------------===//
// FoldingSetNodeID Implementation

/// Add* - Add various data types to Bit data.
///
void FoldingSetNodeID::AddPointer(const void *Ptr) {
  // Note: this adds pointers to the hash using sizes and endianness that
  // depend on the host. It doesn't matter, however, because hashing on
  // pointer values is inherently unstable. Nothing should depend on the
  // ordering of nodes in the folding set.
  Bits.append(reinterpret_cast<unsigned *>(&Ptr),
              reinterpret_cast<unsigned *>(&Ptr+1));
}
void FoldingSetNodeID::AddInteger(signed I) {
  Bits.push_back(I);
}
void FoldingSetNodeID::AddInteger(unsigned I) {
  Bits.push_back(I);
}
void FoldingSetNodeID::AddInteger(long I) {
  AddInteger((unsigned long)I);
}
void FoldingSetNodeID::AddInteger(unsigned long I) {
  if (sizeof(long) == sizeof(int))
    AddInteger(unsigned(I));
  else if (sizeof(long) == sizeof(long long)) {
    AddInteger((unsigned long long)I);
  } else {
    llvm_unreachable("unexpected sizeof(long)");
  }
}
void FoldingSetNodeID::AddInteger(long long I) {
  AddInteger((unsigned long long)I);
}
void FoldingSetNodeID::AddInteger(unsigned long long I) {
  AddInteger(unsigned(I));
  if ((uint64_t)(unsigned)I != I)
    Bits.push_back(unsigned(I >> 32));
}

void FoldingSetNodeID::AddString(StringRef String) {
  unsigned Size =  String.size();
  Bits.push_back(Size);
  if (!Size) return;

  unsigned Units = Size / 4;
  unsigned Pos = 0;
  const unsigned *Base = (const unsigned*) String.data();

  // If the string is aligned do a bulk transfer.
  if (!((intptr_t)Base & 3)) {
    Bits.append(Base, Base + Units);
    Pos = (Units + 1) * 4;
  } else {
    // Otherwise do it the hard way.
    // To be compatible with above bulk transfer, we need to take endianness
    // into account.
    static_assert(sys::IsBigEndianHost || sys::IsLittleEndianHost,
                  "Unexpected host endianness");
    if (sys::IsBigEndianHost) {
      for (Pos += 4; Pos <= Size; Pos += 4) {
        unsigned V = ((unsigned char)String[Pos - 4] << 24) |
                     ((unsigned char)String[Pos - 3] << 16) |
                     ((unsigned char)String[Pos - 2] << 8) |
                      (unsigned char)String[Pos - 1];
        Bits.push_back(V);
      }
    } else {  // Little-endian host
      for (Pos += 4; Pos <= Size; Pos += 4) {
        unsigned V = ((unsigned char)String[Pos - 1] << 24) |
                     ((unsigned char)String[Pos - 2] << 16) |
                     ((unsigned char)String[Pos - 3] << 8) |
                      (unsigned char)String[Pos - 4];
        Bits.push_back(V);
      }
    }
  }

  // With the leftover bits.
  unsigned V = 0;
  // Pos will have overshot size by 4 - #bytes left over.
  // No need to take endianness into account here - this is always executed.
  switch (Pos - Size) {
  case 1: V = (V << 8) | (unsigned char)String[Size - 3]; // Fall thru.
  case 2: V = (V << 8) | (unsigned char)String[Size - 2]; // Fall thru.
  case 3: V = (V << 8) | (unsigned char)String[Size - 1]; break;
  default: return; // Nothing left.
  }

  Bits.push_back(V);
}

// AddNodeID - Adds the Bit data of another ID to *this.
void FoldingSetNodeID::AddNodeID(const FoldingSetNodeID &ID) {
  Bits.append(ID.Bits.begin(), ID.Bits.end());
}

/// ComputeHash - Compute a strong hash value for this FoldingSetNodeID, used to
/// lookup the node in the FoldingSetImpl.
unsigned FoldingSetNodeID::ComputeHash() const {
  return FoldingSetNodeIDRef(Bits.data(), Bits.size()).ComputeHash();
}

/// operator== - Used to compare two nodes to each other.
///
bool FoldingSetNodeID::operator==(const FoldingSetNodeID &RHS) const {
  return *this == FoldingSetNodeIDRef(RHS.Bits.data(), RHS.Bits.size());
}

/// operator== - Used to compare two nodes to each other.
///
bool FoldingSetNodeID::operator==(FoldingSetNodeIDRef RHS) const {
  return FoldingSetNodeIDRef(Bits.data(), Bits.size()) == RHS;
}

/// Used to compare the "ordering" of two nodes as defined by the
/// profiled bits and their ordering defined by memcmp().
bool FoldingSetNodeID::operator<(const FoldingSetNodeID &RHS) const {
  return *this < FoldingSetNodeIDRef(RHS.Bits.data(), RHS.Bits.size());
}

bool FoldingSetNodeID::operator<(FoldingSetNodeIDRef RHS) const {
  return FoldingSetNodeIDRef(Bits.data(), Bits.size()) < RHS;
}

/// Intern - Copy this node's data to a memory region allocated from the
/// given allocator and return a FoldingSetNodeIDRef describing the
/// interned data.
FoldingSetNodeIDRef
FoldingSetNodeID::Intern(BumpPtrAllocator &Allocator) const {
  unsigned *New = Allocator.Allocate<unsigned>(Bits.size());
  std::uninitialized_copy(Bits.begin(), Bits.end(), New);
  return FoldingSetNodeIDRef(New, Bits.size());
}

//===----------------------------------------------------------------------===//
/// Helper functions for FoldingSetImpl.

/// GetNextPtr - In order to save space, each bucket is a
/// singly-linked-list. In order to make deletion more efficient, we make
/// the list circular, so we can delete a node without computing its hash.
/// The problem with this is that the start of the hash buckets are not
/// Nodes.  If NextInBucketPtr is a bucket pointer, this method returns null:
/// use GetBucketPtr when this happens.
static FoldingSetImpl::Node *GetNextPtr(void *NextInBucketPtr) {
  // The low bit is set if this is the pointer back to the bucket.
  if (reinterpret_cast<intptr_t>(NextInBucketPtr) & 1)
    return nullptr;

  return static_cast<FoldingSetImpl::Node*>(NextInBucketPtr);
}

/// testing.
static void **GetBucketPtr(void *NextInBucketPtr) {
  intptr_t Ptr = reinterpret_cast<intptr_t>(NextInBucketPtr);
  assert((Ptr & 1) && "Not a bucket pointer");
  return reinterpret_cast<void**>(Ptr & ~intptr_t(1));
}

/// GetBucketFor - Hash the specified node ID and return the hash bucket for
/// the specified ID.
static void **GetBucketFor(unsigned Hash, void **Buckets, unsigned NumBuckets) {
  // NumBuckets is always a power of 2.
  unsigned BucketNum = Hash & (NumBuckets-1);
  return Buckets + BucketNum;
}

/// AllocateBuckets - Allocated initialized bucket memory.
static void **AllocateBuckets(unsigned NumBuckets) {
  void **Buckets = static_cast<void**>(calloc(NumBuckets+1, sizeof(void*)));
  // Set the very last bucket to be a non-null "pointer".
  Buckets[NumBuckets] = reinterpret_cast<void*>(-1);
  return Buckets;
}

//===----------------------------------------------------------------------===//
// FoldingSetImpl Implementation

void FoldingSetImpl::anchor() {}

FoldingSetImpl::FoldingSetImpl(unsigned Log2InitSize) {
  assert(5 < Log2InitSize && Log2InitSize < 32 &&
         "Initial hash table size out of range");
  NumBuckets = 1 << Log2InitSize;
  Buckets = AllocateBuckets(NumBuckets);
  NumNodes = 0;
}

FoldingSetImpl::FoldingSetImpl(FoldingSetImpl &&Arg)
    : Buckets(Arg.Buckets), NumBuckets(Arg.NumBuckets), NumNodes(Arg.NumNodes) {
  Arg.Buckets = nullptr;
  Arg.NumBuckets = 0;
  Arg.NumNodes = 0;
}

FoldingSetImpl &FoldingSetImpl::operator=(FoldingSetImpl &&RHS) {
  free(Buckets); // This may be null if the set is in a moved-from state.
  Buckets = RHS.Buckets;
  NumBuckets = RHS.NumBuckets;
  NumNodes = RHS.NumNodes;
  RHS.Buckets = nullptr;
  RHS.NumBuckets = 0;
  RHS.NumNodes = 0;
  return *this;
}

FoldingSetImpl::~FoldingSetImpl() {
  free(Buckets);
}

void FoldingSetImpl::clear() {
  // Set all but the last bucket to null pointers.
  memset(Buckets, 0, NumBuckets*sizeof(void*));

  // Set the very last bucket to be a non-null "pointer".
  Buckets[NumBuckets] = reinterpret_cast<void*>(-1);

  // Reset the node count to zero.
  NumNodes = 0;
}

/// GrowHashTable - Double the size of the hash table and rehash everything.
///
void FoldingSetImpl::GrowHashTable() {
  void **OldBuckets = Buckets;
  unsigned OldNumBuckets = NumBuckets;
  NumBuckets <<= 1;

  // Clear out new buckets.
  Buckets = AllocateBuckets(NumBuckets);
  NumNodes = 0;

  // Walk the old buckets, rehashing nodes into their new place.
  FoldingSetNodeID TempID;
  for (unsigned i = 0; i != OldNumBuckets; ++i) {
    void *Probe = OldBuckets[i];
    if (!Probe) continue;
    while (Node *NodeInBucket = GetNextPtr(Probe)) {
      // Figure out the next link, remove NodeInBucket from the old link.
      Probe = NodeInBucket->getNextInBucket();
      NodeInBucket->SetNextInBucket(nullptr);

      // Insert the node into the new bucket, after recomputing the hash.
      InsertNode(NodeInBucket,
                 GetBucketFor(ComputeNodeHash(NodeInBucket, TempID),
                              Buckets, NumBuckets));
      TempID.clear();
    }
  }

  free(OldBuckets);
}

/// FindNodeOrInsertPos - Look up the node specified by ID.  If it exists,
/// return it.  If not, return the insertion token that will make insertion
/// faster.
FoldingSetImpl::Node
*FoldingSetImpl::FindNodeOrInsertPos(const FoldingSetNodeID &ID,
                                     void *&InsertPos) {
  unsigned IDHash = ID.ComputeHash();
  void **Bucket = GetBucketFor(IDHash, Buckets, NumBuckets);
  void *Probe = *Bucket;

  InsertPos = nullptr;

  FoldingSetNodeID TempID;
  while (Node *NodeInBucket = GetNextPtr(Probe)) {
    if (NodeEquals(NodeInBucket, ID, IDHash, TempID))
      return NodeInBucket;
    TempID.clear();

    Probe = NodeInBucket->getNextInBucket();
  }

  // Didn't find the node, return null with the bucket as the InsertPos.
  InsertPos = Bucket;
  return nullptr;
}

/// InsertNode - Insert the specified node into the folding set, knowing that it
/// is not already in the map.  InsertPos must be obtained from
/// FindNodeOrInsertPos.
void FoldingSetImpl::InsertNode(Node *N, void *InsertPos) {
  assert(!N->getNextInBucket());
  // Do we need to grow the hashtable?
  if (NumNodes+1 > NumBuckets*2) {
    GrowHashTable();
    FoldingSetNodeID TempID;
    InsertPos = GetBucketFor(ComputeNodeHash(N, TempID), Buckets, NumBuckets);
  }

  ++NumNodes;

  /// The insert position is actually a bucket pointer.
  void **Bucket = static_cast<void**>(InsertPos);

  void *Next = *Bucket;

  // If this is the first insertion into this bucket, its next pointer will be
  // null.  Pretend as if it pointed to itself, setting the low bit to indicate
  // that it is a pointer to the bucket.
  if (!Next)
    Next = reinterpret_cast<void*>(reinterpret_cast<intptr_t>(Bucket)|1);

  // Set the node's next pointer, and make the bucket point to the node.
  N->SetNextInBucket(Next);
  *Bucket = N;
}

/// RemoveNode - Remove a node from the folding set, returning true if one was
/// removed or false if the node was not in the folding set.
bool FoldingSetImpl::RemoveNode(Node *N) {
  // Because each bucket is a circular list, we don't need to compute N's hash
  // to remove it.
  void *Ptr = N->getNextInBucket();
  if (!Ptr) return false;  // Not in folding set.

  --NumNodes;
  N->SetNextInBucket(nullptr);

  // Remember what N originally pointed to, either a bucket or another node.
  void *NodeNextPtr = Ptr;

  // Chase around the list until we find the node (or bucket) which points to N.
  while (true) {
    if (Node *NodeInBucket = GetNextPtr(Ptr)) {
      // Advance pointer.
      Ptr = NodeInBucket->getNextInBucket();

      // We found a node that points to N, change it to point to N's next node,
      // removing N from the list.
      if (Ptr == N) {
        NodeInBucket->SetNextInBucket(NodeNextPtr);
        return true;
      }
    } else {
      void **Bucket = GetBucketPtr(Ptr);
      Ptr = *Bucket;

      // If we found that the bucket points to N, update the bucket to point to
      // whatever is next.
      if (Ptr == N) {
        *Bucket = NodeNextPtr;
        return true;
      }
    }
  }
}

/// GetOrInsertNode - If there is an existing simple Node exactly
/// equal to the specified node, return it.  Otherwise, insert 'N' and it
/// instead.
FoldingSetImpl::Node *FoldingSetImpl::GetOrInsertNode(FoldingSetImpl::Node *N) {
  FoldingSetNodeID ID;
  GetNodeProfile(N, ID);
  void *IP;
  if (Node *E = FindNodeOrInsertPos(ID, IP))
    return E;
  InsertNode(N, IP);
  return N;
}

//===----------------------------------------------------------------------===//
// FoldingSetIteratorImpl Implementation

FoldingSetIteratorImpl::FoldingSetIteratorImpl(void **Bucket) {
  // Skip to the first non-null non-self-cycle bucket.
  while (*Bucket != reinterpret_cast<void*>(-1) &&
         (!*Bucket || !GetNextPtr(*Bucket)))
    ++Bucket;

  NodePtr = static_cast<FoldingSetNode*>(*Bucket);
}

void FoldingSetIteratorImpl::advance() {
  // If there is another link within this bucket, go to it.
  void *Probe = NodePtr->getNextInBucket();

  if (FoldingSetNode *NextNodeInBucket = GetNextPtr(Probe))
    NodePtr = NextNodeInBucket;
  else {
    // Otherwise, this is the last link in this bucket.
    void **Bucket = GetBucketPtr(Probe);

    // Skip to the next non-null non-self-cycle bucket.
    do {
      ++Bucket;
    } while (*Bucket != reinterpret_cast<void*>(-1) &&
             (!*Bucket || !GetNextPtr(*Bucket)));

    NodePtr = static_cast<FoldingSetNode*>(*Bucket);
  }
}

//===----------------------------------------------------------------------===//
// FoldingSetBucketIteratorImpl Implementation

FoldingSetBucketIteratorImpl::FoldingSetBucketIteratorImpl(void **Bucket) {
  Ptr = (!*Bucket || !GetNextPtr(*Bucket)) ? (void*) Bucket : *Bucket;
}


text:
package Google::Ads::AdWords::v201406::ExperimentOperation;
use strict;
use warnings;

__PACKAGE__->_set_element_form_qualified(1);

sub get_xmlns { 'https://adwords.google.com/api/adwords/cm/v201406' };

our $XML_ATTRIBUTE_CLASS;
undef $XML_ATTRIBUTE_CLASS;

sub __get_attr_class {
    return $XML_ATTRIBUTE_CLASS;
}

use base qw(Google::Ads::AdWords::v201406::Operation);
# Variety: sequence
use Class::Std::Fast::Storable constructor => 'none';
use base qw(Google::Ads::SOAP::Typelib::ComplexType);

{ # BLOCK to scope variables

my %operator_of :ATTR(:get<operator>);
my %Operation__Type_of :ATTR(:get<Operation__Type>);
my %operand_of :ATTR(:get<operand>);

__PACKAGE__->_factory(
    [ qw(        operator
        Operation__Type
        operand

    ) ],
    {
        'operator' => \%operator_of,
        'Operation__Type' => \%Operation__Type_of,
        'operand' => \%operand_of,
    },
    {
        'operator' => 'Google::Ads::AdWords::v201406::Operator',
        'Operation__Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
        'operand' => 'Google::Ads::AdWords::v201406::Experiment',
    },
    {

        'operator' => 'operator',
        'Operation__Type' => 'Operation.Type',
        'operand' => 'operand',
    }
);

} # end BLOCK

1;

=pod

=head1 NAME

Google::Ads::AdWords::v201406::ExperimentOperation

=head1 DESCRIPTION

Perl data type class for the XML Schema defined complexType
ExperimentOperation from the namespace https://adwords.google.com/api/adwords/cm/v201406.

Operation for adding, updating or removing operations. For removing, use SET and mark status as REMOVED.

=head2 PROPERTIES

The following properties may be accessed using get_PROPERTY / set_PROPERTY
methods:

=over

=item * operand

=back

=head1 METHODS

=head2 new

Constructor. The following data structure may be passed to new():

=head1 AUTHOR

Generated by SOAP::WSDL

=cut


text:
package uk.gov.gds.ier.form

import uk.gov.gds.ier.validation.FormKeys
import uk.gov.gds.ier.validation.ErrorTransformForm
import uk.gov.gds.ier.transaction.ordinary.InprogressOrdinary
import uk.gov.gds.ier.validation.constants.NationalityConstants

trait OrdinaryFormImplicits {
  self: FormKeys =>

  implicit class OrdinaryImprovedForm(form: ErrorTransformForm[InprogressOrdinary]) {
    def obtainOtherCountriesList: List[String] = {
      val otherCountries = (
        for (i <- 0 until NationalityConstants.numberMaxOfOtherCountries
             if (form(otherCountriesKey(i)).value.isDefined)
               && !form(otherCountriesKey(i)).value.get.isEmpty)
        yield form(otherCountriesKey(i)).value.get
      )
      otherCountries.toList
    }

    private def otherCountriesKey(i:Int) = keys.nationality.otherCountries.item(i)
  }
}


text:
package com.touchgraph.graphlayout.graphelements;

import  com.touchgraph.graphlayout.Node;
import  com.touchgraph.graphlayout.Edge;
import  com.touchgraph.graphlayout.TGException;

import  java.util.Vector;

/**  Locality:  A way of representing a subset of a larger set of nodes.
  *  Allows for both manipulation of the subset, and manipulation of the
  *  larger set.  For instance, one can call removeNode to delete it from
  *  the subset, or deleteNode to remove it from the larger set.
  *
  *  Locality is used in conjunction with LocalityUtils, which handle
  *  locality shift animations.
  *
  *  More synchronization will almost definitely be required.
  *
  * @author   Alexander Shapiro
  * @version  1.21  $Id: Locality.java,v 1.1.1.1 2007/01/07 07:58:19 andrew Exp $
  */
public class Locality extends GraphEltSet {

    protected GraphEltSet completeEltSet;

  // ............

  /** Constructor with GraphEltSet <tt>ges</tt>.
    */
    public Locality(GraphEltSet ges) {
        super();
        completeEltSet = ges;
    }

    public GraphEltSet getCompleteEltSet() {
        return completeEltSet;
    }

    public void addNode( Node n ) throws TGException {
        if (!contains(n)) {
            super.addNode(n);
            //If a new Node is created, and then added to Locality, then add the new edge
            //to completeEltSet as well.
            if (!completeEltSet.contains(n)) completeEltSet.addNode(n);
        }
    }

    public void addEdge( Edge e ) {
        if(!contains(e)) {
            edges.addElement(e);
            //If a new Edge is created, and then added to Locality, then add the new edge
            //to completeEltSet as well.
            if (!completeEltSet.contains(e)) completeEltSet.addEdge(e);
        }
    }

    public void addNodeWithEdges( Node n ) throws TGException {
        addNode(n);
        for (int i = 0 ; i < n.edgeCount(); i++) {
            Edge e=n.edgeAt(i);
            if(contains(e.getOtherEndpt(n))) addEdge(e);
        }

    }

    public synchronized void addAll() throws TGException {
        synchronized (completeEltSet) {
            for (int i = 0 ; i<completeEltSet.nodeCount(); i++) {
                addNode(completeEltSet.nodeAt(i));
            }
            for (int i = 0 ; i<completeEltSet.edgeCount(); i++) {
                addEdge(completeEltSet.edgeAt(i));
            }
        }
    }

    public Edge findEdge( Node from, Node to ) {
        Edge foundEdge=super.findEdge(from,to);
        if (foundEdge!=null && edges.contains(foundEdge)) return foundEdge;
        else return null;
    }

    public boolean deleteEdge( Edge e ) {
        if (e == null) return false;
        else {
            removeEdge(e);
            return completeEltSet.deleteEdge(e);
        }
    }

    public synchronized void deleteEdges( Vector edgesToDelete ) {
        removeEdges(edgesToDelete);
        completeEltSet.deleteEdges(edgesToDelete);
    }

    public boolean removeEdge( Edge e ) {
        if (e == null) return false;
            else {
                if(edges.removeElement(e)) {
                    return true;
                }
            return false;
        }
    }

    public synchronized void removeEdges( Vector edgesToRemove ) {
        for (int i=0;i<edgesToRemove.size();i++) {
            removeEdge((Edge) edgesToRemove.elementAt(i));
        }
    }

    public boolean deleteNode( Node node ) {
        if ( node == null ) return false;
        else {
            removeNode(node);
            return completeEltSet.deleteNode(node);
        }
    }

    public synchronized void deleteNodes( Vector nodesToDelete ) {
        removeNodes(nodesToDelete);
        completeEltSet.deleteNodes(nodesToDelete);
    }

    public boolean removeNode( Node node ) {
          if (node == null) return false;
          if (!nodes.removeElement(node)) return false;

		  String id = node.getID();
          if ( id != null ) nodeIDRegistry.remove(id); // remove from registry

          for (int i = 0 ; i < node.edgeCount(); i++) {
             removeEdge(node.edgeAt(i));
         }

         return true;
    }

    public synchronized void removeNodes( Vector nodesToRemove ) {
        for (int i=0;i<nodesToRemove.size();i++) {
            removeNode((Node) nodesToRemove.elementAt(i));
        }
    }

    public synchronized void removeAll() {
        super.clearAll();
    }

    public synchronized void clearAll() {
        removeAll();
        completeEltSet.clearAll();
    }

} // end com.touchgraph.graphlayout.graphelements.Locality


text:
<#
The MIT License (MIT)

Copyright (c) 2015 Objectivity Bespoke Software Specialists

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
#>

function Deploy-SSISPackage {

    <#
        .SYNOPSIS
            Deploys SSIS packages on local server.

        .PARAMETER  PackageName
            Name of the package to be deployed.

        .PARAMETER  ConfigurationPath
            Path of the SSIS packages configurations.

        .PARAMETER  PackagePath
            Path of the package.

        .PARAMETER  DeleteExistingPackages
            If $true then delete existing SSIS packages before deploying new ones.

        .PARAMETER  PackagesToDeploy
            If $null all SSIS packages will be deleted and deployed, when not null (list of packages names) then only specified packages will be deployed.

        .PARAMETER  Tokens
            Hashtable with tokens that will be used to replace placeholders in packages configuration files located in $ConfigurationPath.

        .PARAMETER  FolderPath
            Path on the localhost where SSIS packages will be deployed .

        .EXAMPLE
            PS C:\> Deploy-SSISPackage -PackageName 'MyPackage' -ConfigurationPath 'C:\MyPackages\Config\'
    #>
    [CmdletBinding()]
    [OutputType([void])]
    param(

        [Parameter(Mandatory=$true)]
        [string]
        $PackageName,

        [Parameter(Mandatory=$true)]
        [string]
        $ConfigurationPath,

        [Parameter(Mandatory=$false)]
        [string]
        $PackagePath,

        [Parameter(Mandatory=$false)]
        [bool]
        $DeleteExistingPackages = $true,

        [Parameter(Mandatory=$false)]
        [string]
        $PackagesToDeploy,

        [Parameter(Mandatory=$false)]
        [hashtable]
        $Tokens,

        [Parameter(Mandatory=$false)]
        [string]
        $FolderPath = '\'
    )

    $configPaths = Get-ConfigurationPaths

    $PackagePath = Resolve-PathRelativeToProjectRoot `
                    -Path $PackagePath `
                    -DefaultPath (Join-Path -Path (Join-Path -Path $configPaths.PackagesPath -ChildPath $PackageName) -ChildPath "Package") `
                    -ErrorMsg "Cannot find file '{0}' required for deployment of package '$PackageName'. Please ensure you have run the build and the package exists."

    $ConfigurationSourcePath = Join-Path -Path ($PackagePath | Split-Path -Parent) -ChildPath "Config"
    Update-TokensInAllFiles -BaseDir $ConfigurationSourcePath -Tokens $Tokens -TokenWildcard "*.dtsConfig"

    Import-SQLPSXSSIS
    if ($DeleteExistingPackages) {

        Write-Log -Info "Deleting existing packages"

        if (!$PackagesToDeploy) {
            Write-Log -Info "Removing all existing packages"
            $packagesToRemove = Get-IsItem -Path $FolderPath -TopLevelFolder 'msdb' -ServerName localhost |
                Where-Object { $_.Flags -eq [Microsoft.SqlServer.Dts.Runtime.DTSPackageInfoFlags]::Package }
        } else {
            Write-Log -Info "Removing custom list of existing packages"
            $packagesToRemove = Get-IsItem -Path $FolderPath -TopLevelFolder 'msdb' -ServerName localhost |
                Where-Object { $_.name -match $PackagesToDeploy }
        }

        foreach ($package in $packagesToRemove) {
            Write-Log -Info "Removing $($package.LiteralPath)"
            Remove-ISItem -PInfo $package
        }
    }

    Write-Log -Info "Copying configuration from $ConfigurationSourcePath\*.* to $ConfigurationPath..."
    Copy-Item -Path "$ConfigurationSourcePath\*.*" -Destination $ConfigurationPath -Recurse -Force

    if (!$PackagesToDeploy) {
        Write-Log -Info "Deploying all packages..."
        $pkgs = Get-ChildItem -Path $PackagePath
    } else {
        Write-Log -Info "Deploying custom list of packages..."
        $pkgs = Get-ChildItem -Path $PackagePath | Where-Object { $_.name -match $PackagesToDeploy }
    }
    foreach ($pkgName in $pkgs) {
        $PackageFilePath = Join-Path -Path $PackagePath -ChildPath $pkgName
        $SSISPackageName = [io.path]::GetFileNameWithoutExtension($pkgName)
        $destinationPath = Join-Path -Path '\msdb' -ChildPath $FolderPath | Join-Path -ChildPath $SSISPackageName

        Write-Log -Info "Deploying $PackageFilePath to $destinationPath on localhost."
        $ssisPackage = Get-IsPackage -Path $PackageFilePath
        Set-ISPackage -Package $ssisPackage -Path $destinationPath -ServerName localhost
    }
}


text:
require "forwardable"

module Jekyll
  module RpLogs
    # Holds arc information
    class Arc
      extend Forwardable
      include Comparable

      def_delegator :@name, :hash

      attr_accessor :name, :rps

      def initialize(name)
        # inspect types
        name.strip!
        @name = name

        @rps = []
        # potential future idea: directories for each arc
      end

      def <<(rp_page)
        @rps << rp_page
      end

      def start_date
        @rps.map { |rp_page| rp_page[:time_line] || rp_page[:start_date] }.min
      end

      def end_date
        @rps.map { |rp_page| rp_page[:last_post_time] }.max
      end

      def arc?
        true
      end

      def to_s
        name
      end

      def eql?(other)
        self.class == other.class &&
          name == other.name &&
          rps == other.rps
      end

      # actually by... start.. date?
      def <=>(other)
        name <=> other.name if self.class == other.class
      end

      def inspect
        self.class.name + "[" + @name + "]"
      end

      def to_liquid
        # Liquid wants a hash, not an object.

        { "name" => @name, "rps" => @rps }
      end
    end
  end
end


text:
#ifndef GrProcessorDataManager_DEFINED
#define GrProcessorDataManager_DEFINED

// TODO this class is just an empty stub for now

class GrProcessorDataManager {
};

#endif


text:
.fc {
	direction: ltr;
	text-align: left;
}

.fc-rtl {
	text-align: right;
}

body .fc { /* extra precedence to overcome jqui */
	font-size: 1em;
}

/* Colors
--------------------------------------------------------------------------------------------------*/

.fc-unthemed th,
.fc-unthemed td,
.fc-unthemed thead,
.fc-unthemed tbody,
.fc-unthemed .fc-divider,
.fc-unthemed .fc-row,
.fc-unthemed .fc-popover {
	border-color: #ddd;
}

.fc-unthemed .fc-popover {
	background-color: #fff;
}

.fc-unthemed .fc-divider,
.fc-unthemed .fc-popover .fc-header {
	background: #eee;
}

.fc-unthemed .fc-popover .fc-header .fc-close {
	color: #666;
}

.fc-unthemed .fc-today {
	background: #fcf8e3;
}

.fc-highlight { /* when user is selecting cells */
	background: #bce8f1;
	opacity: .3;
	filter: alpha(opacity=30); /* for IE */
}

.fc-bgevent { /* default look for background events */
	background: rgb(143, 223, 130);
	opacity: .3;
	filter: alpha(opacity=30); /* for IE */
}

.fc-nonbusiness { /* default look for non-business-hours areas */
	/* will inherit .fc-bgevent's styles */
	background: #d7d7d7;
}

/* Icons (inline elements with styled text that mock arrow icons)
--------------------------------------------------------------------------------------------------*/

.fc-icon {
	display: inline-block;
	width: 1em;
	height: 1em;
	line-height: 1em;
	font-size: 1em;
	text-align: center;
	overflow: hidden;
	font-family: "Courier New", Courier, monospace;
}

/*
Acceptable font-family overrides for individual icons:
	"Arial", sans-serif
	"Times New Roman", serif

NOTE: use percentage font sizes or else old IE chokes
*/

.fc-icon:after {
	position: relative;
	margin: 0 -1em; /* ensures character will be centered, regardless of width */
}

.fc-icon-left-single-arrow:after {
	content: "\02039";
	font-weight: bold;
	font-size: 200%;
	top: -7%;
	left: 3%;
}

.fc-icon-right-single-arrow:after {
	content: "\0203A";
	font-weight: bold;
	font-size: 200%;
	top: -7%;
	left: -3%;
}

.fc-icon-left-double-arrow:after {
	content: "\000AB";
	font-size: 160%;
	top: -7%;
}

.fc-icon-right-double-arrow:after {
	content: "\000BB";
	font-size: 160%;
	top: -7%;
}

.fc-icon-left-triangle:after {
	content: "\25C4";
	font-size: 125%;
	top: 3%;
	left: -2%;
}

.fc-icon-right-triangle:after {
	content: "\25BA";
	font-size: 125%;
	top: 3%;
	left: 2%;
}

.fc-icon-down-triangle:after {
	content: "\25BC";
	font-size: 125%;
	top: 2%;
}

.fc-icon-x:after {
	content: "\000D7";
	font-size: 200%;
	top: 6%;
}

/* Buttons (styled <button> tags, normalized to work cross-browser)
--------------------------------------------------------------------------------------------------*/

.fc button {
	/* force height to include the border and padding */
	-moz-box-sizing: border-box;
	-webkit-box-sizing: border-box;
	box-sizing: border-box;

	/* dimensions */
	margin: 0;
	height: 2.1em;
	padding: 0 .6em;

	/* text & cursor */
	font-size: 1em; /* normalize */
	white-space: nowrap;
	cursor: pointer;
}

/* Firefox has an annoying inner border */
.fc button::-moz-focus-inner { margin: 0; padding: 0; }

.fc-state-default { /* non-theme */
	border: 1px solid;
}

.fc-state-default.fc-corner-left { /* non-theme */
	border-top-left-radius: 4px;
	border-bottom-left-radius: 4px;
}

.fc-state-default.fc-corner-right { /* non-theme */
	border-top-right-radius: 4px;
	border-bottom-right-radius: 4px;
}

/* icons in buttons */

.fc button .fc-icon { /* non-theme */
	position: relative;
	top: -0.05em; /* seems to be a good adjustment across browsers */
	margin: 0 .2em;
	vertical-align: middle;
}

/*
  button states
  borrowed from twitter bootstrap (http://twitter.github.com/bootstrap/)
*/

.fc-state-default {
	background-color: #f5f5f5;
	background-image: -moz-linear-gradient(top, #ffffff, #e6e6e6);
	background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#ffffff), to(#e6e6e6));
	background-image: -webkit-linear-gradient(top, #ffffff, #e6e6e6);
	background-image: -o-linear-gradient(top, #ffffff, #e6e6e6);
	background-image: linear-gradient(to bottom, #ffffff, #e6e6e6);
	background-repeat: repeat-x;
	border-color: #e6e6e6 #e6e6e6 #bfbfbf;
	border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
	color: #333;
	text-shadow: 0 1px 1px rgba(255, 255, 255, 0.75);
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);
}

.fc-state-hover,
.fc-state-down,
.fc-state-active,
.fc-state-disabled {
	color: #333333;
	background-color: #e6e6e6;
}

.fc-state-hover {
	color: #333333;
	text-decoration: none;
	background-position: 0 -15px;
	-webkit-transition: background-position 0.1s linear;
	   -moz-transition: background-position 0.1s linear;
	     -o-transition: background-position 0.1s linear;
	        transition: background-position 0.1s linear;
}

.fc-state-down,
.fc-state-active {
	background-color: #cccccc;
	background-image: none;
	box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05);
}

.fc-state-disabled {
	cursor: default;
	background-image: none;
	opacity: 0.65;
	filter: alpha(opacity=65);
	box-shadow: none;
}

/* Buttons Groups
--------------------------------------------------------------------------------------------------*/

.fc-button-group {
	display: inline-block;
}

/*
every button that is not first in a button group should scootch over one pixel and cover the
previous button's border...
*/

.fc .fc-button-group > * { /* extra precedence b/c buttons have margin set to zero */
	float: left;
	margin: 0 0 0 -1px;
}

.fc .fc-button-group > :first-child { /* same */
	margin-left: 0;
}

/* Popover
--------------------------------------------------------------------------------------------------*/

.fc-popover {
	position: absolute;
	box-shadow: 0 2px 6px rgba(0,0,0,.15);
}

.fc-popover .fc-header { /* TODO: be more consistent with fc-head/fc-body */
	padding: 2px 4px;
}

.fc-popover .fc-header .fc-title {
	margin: 0 2px;
}

.fc-popover .fc-header .fc-close {
	cursor: pointer;
}

.fc-ltr .fc-popover .fc-header .fc-title,
.fc-rtl .fc-popover .fc-header .fc-close {
	float: left;
}

.fc-rtl .fc-popover .fc-header .fc-title,
.fc-ltr .fc-popover .fc-header .fc-close {
	float: right;
}

/* unthemed */

.fc-unthemed .fc-popover {
	border-width: 1px;
	border-style: solid;
}

.fc-unthemed .fc-popover .fc-header .fc-close {
	font-size: .9em;
	margin-top: 2px;
}

/* jqui themed */

.fc-popover > .ui-widget-header + .ui-widget-content {
	border-top: 0; /* where they meet, let the header have the border */
}

/* Misc Reusable Components
--------------------------------------------------------------------------------------------------*/

.fc-divider {
	border-style: solid;
	border-width: 1px;
}

hr.fc-divider {
	height: 0;
	margin: 0;
	padding: 0 0 2px; /* height is unreliable across browsers, so use padding */
	border-width: 1px 0;
}

.fc-clear {
	clear: both;
}

.fc-bg,
.fc-bgevent-skeleton,
.fc-highlight-skeleton,
.fc-helper-skeleton {
	/* these element should always cling to top-left/right corners */
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
}

.fc-bg {
	bottom: 0; /* strech bg to bottom edge */
}

.fc-bg table {
	height: 100%; /* strech bg to bottom edge */
}

/* Tables
--------------------------------------------------------------------------------------------------*/

.fc table {
	width: 100%;
	table-layout: fixed;
	border-collapse: collapse;
	border-spacing: 0;
	font-size: 1em; /* normalize cross-browser */
}

.fc th {
	text-align: center;
}

.fc th,
.fc td {
	border-style: solid;
	border-width: 1px;
	padding: 0;
	vertical-align: top;
}

.fc td.fc-today {
	border-style: double; /* overcome neighboring borders */
}

/* Fake Table Rows
--------------------------------------------------------------------------------------------------*/

.fc .fc-row { /* extra precedence to overcome themes w/ .ui-widget-content forcing a 1px border */
	/* no visible border by default. but make available if need be (scrollbar width compensation) */
	border-style: solid;
	border-width: 0;
}

.fc-row table {
	/* don't put left/right border on anything within a fake row.
	   the outer tbody will worry about this */
	border-left: 0 hidden transparent;
	border-right: 0 hidden transparent;

	/* no bottom borders on rows */
	border-bottom: 0 hidden transparent;
}

.fc-row:first-child table {
	border-top: 0 hidden transparent; /* no top border on first row */
}

/* Day Row (used within the header and the DayGrid)
--------------------------------------------------------------------------------------------------*/

.fc-row {
	position: relative;
}

.fc-row .fc-bg {
	z-index: 1;
}

/* highlighting cells & background event skeleton */

.fc-row .fc-bgevent-skeleton,
.fc-row .fc-highlight-skeleton {
	bottom: 0; /* stretch skeleton to bottom of row */
}

.fc-row .fc-bgevent-skeleton table,
.fc-row .fc-highlight-skeleton table {
	height: 100%; /* stretch skeleton to bottom of row */
}

.fc-row .fc-highlight-skeleton td,
.fc-row .fc-bgevent-skeleton td {
	border-color: transparent;
}

.fc-row .fc-bgevent-skeleton {
	z-index: 2;

}

.fc-row .fc-highlight-skeleton {
	z-index: 3;
}

/*
row content (which contains day/week numbers and events) as well as "helper" (which contains
temporary rendered events).
*/

.fc-row .fc-content-skeleton {
	position: relative;
	z-index: 4;
	padding-bottom: 2px; /* matches the space above the events */
}

.fc-row .fc-helper-skeleton {
	z-index: 5;
}

.fc-row .fc-content-skeleton td,
.fc-row .fc-helper-skeleton td {
	/* see-through to the background below */
	background: none; /* in case <td>s are globally styled */
	border-color: transparent;

	/* don't put a border between events and/or the day number */
	border-bottom: 0;
}

.fc-row .fc-content-skeleton tbody td, /* cells with events inside (so NOT the day number cell) */
.fc-row .fc-helper-skeleton tbody td {
	/* don't put a border between event cells */
	border-top: 0;
}

/* Scrolling Container
--------------------------------------------------------------------------------------------------*/

.fc-scroller { /* this class goes on elements for guaranteed vertical scrollbars */
	overflow-y: scroll;
	overflow-x: hidden;
}

.fc-scroller > * { /* we expect an immediate inner element */
	position: relative; /* re-scope all positions */
	width: 100%; /* hack to force re-sizing this inner element when scrollbars appear/disappear */
	overflow: hidden; /* don't let negative margins or absolute positioning create further scroll */
}

/* Global Event Styles
--------------------------------------------------------------------------------------------------*/

.fc-event {
	position: relative; /* for resize handle and other inner positioning */
	display: block; /* make the <a> tag block */
	font-size: .85em;
	line-height: 1.3;
	border-radius: 3px;
	border: 1px solid #3a87ad; /* default BORDER color */
	background-color: #3a87ad; /* default BACKGROUND color */
	font-weight: normal; /* undo jqui's ui-widget-header bold */
}

/* overpower some of bootstrap's and jqui's styles on <a> tags */
.fc-event,
.fc-event:hover,
.ui-widget .fc-event {
	color: #fff; /* default TEXT color */
	text-decoration: none; /* if <a> has an href */
}

.fc-event[href],
.fc-event.fc-draggable {
	cursor: pointer; /* give events with links and draggable events a hand mouse pointer */
}

.fc-not-allowed, /* causes a "warning" cursor. applied on body */
.fc-not-allowed .fc-event { /* to override an event's custom cursor */
	cursor: not-allowed;
}

.fc-event .fc-bg { /* the generic .fc-bg already does position */
	z-index: 1;
	background: #fff;
	opacity: .25;
	filter: alpha(opacity=25); /* for IE */
}

.fc-event .fc-content {
	position: relative;
	z-index: 2;
}

.fc-event .fc-resizer {
	position: absolute;
	z-index: 3;
}

/* Horizontal Events
--------------------------------------------------------------------------------------------------*/

/* events that are continuing to/from another week. kill rounded corners and butt up against edge */

.fc-ltr .fc-h-event.fc-not-start,
.fc-rtl .fc-h-event.fc-not-end {
	margin-left: 0;
	border-left-width: 0;
	padding-left: 1px; /* replace the border with padding */
	border-top-left-radius: 0;
	border-bottom-left-radius: 0;
}

.fc-ltr .fc-h-event.fc-not-end,
.fc-rtl .fc-h-event.fc-not-start {
	margin-right: 0;
	border-right-width: 0;
	padding-right: 1px; /* replace the border with padding */
	border-top-right-radius: 0;
	border-bottom-right-radius: 0;
}

/* resizer */

.fc-h-event .fc-resizer { /* positioned it to overcome the event's borders */
	top: -1px;
	bottom: -1px;
	left: -1px;
	right: -1px;
	width: 5px;
}

/* left resizer  */
.fc-ltr .fc-h-event .fc-start-resizer,
.fc-ltr .fc-h-event .fc-start-resizer:before,
.fc-ltr .fc-h-event .fc-start-resizer:after,
.fc-rtl .fc-h-event .fc-end-resizer,
.fc-rtl .fc-h-event .fc-end-resizer:before,
.fc-rtl .fc-h-event .fc-end-resizer:after {
	right: auto; /* ignore the right and only use the left */
	cursor: w-resize;
}

/* right resizer */
.fc-ltr .fc-h-event .fc-end-resizer,
.fc-ltr .fc-h-event .fc-end-resizer:before,
.fc-ltr .fc-h-event .fc-end-resizer:after,
.fc-rtl .fc-h-event .fc-start-resizer,
.fc-rtl .fc-h-event .fc-start-resizer:before,
.fc-rtl .fc-h-event .fc-start-resizer:after {
	left: auto; /* ignore the left and only use the right */
	cursor: e-resize;
}

/* DayGrid events
----------------------------------------------------------------------------------------------------
We use the full "fc-day-grid-event" class instead of using descendants because the event won't
be a descendant of the grid when it is being dragged.
*/

.fc-day-grid-event {
	margin: 1px 2px 0; /* spacing between events and edges */
	padding: 0 1px;
}

.fc-day-grid-event .fc-content { /* force events to be one-line tall */
	white-space: nowrap;
	overflow: hidden;
}

.fc-day-grid-event .fc-time {
	font-weight: bold;
}

.fc-day-grid-event .fc-resizer { /* enlarge the default hit area */
	left: -3px;
	right: -3px;
	width: 7px;
}

/* Event Limiting
--------------------------------------------------------------------------------------------------*/

/* "more" link that represents hidden events */

a.fc-more {
	margin: 1px 3px;
	font-size: .85em;
	cursor: pointer;
	text-decoration: none;
}

a.fc-more:hover {
	text-decoration: underline;
}

.fc-limited { /* rows and cells that are hidden because of a "more" link */
	display: none;
}

/* popover that appears when "more" link is clicked */

.fc-day-grid .fc-row {
	z-index: 1; /* make the "more" popover one higher than this */
}

.fc-more-popover {
	z-index: 2;
	width: 220px;
}

.fc-more-popover .fc-event-container {
	padding: 10px;
}