package org.vaadin.spring.i18n;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.Reader;
import java.io.UnsupportedEncodingException;
import java.text.MessageFormat;
import java.util.Locale;
import java.util.MissingResourceException;
import java.util.PropertyResourceBundle;
import java.util.ResourceBundle;

/**
 * Implementation of {@link org.vaadin.spring.i18n.MessageProvider} that reads messages
 * from {@link java.util.ResourceBundle}s with a specific base name.
 *
 * @author Petter Holmström (petter@vaadin.com)
 */
public class ResourceBundleMessageProvider implements MessageProvider {

    private static final Logger LOGGER = LoggerFactory.getLogger(ResourceBundleMessageProvider.class);

    private final String baseName;
    private final String encoding;

    /**
     * Creates a new {@code ResourceBundleMessageProvider} with the given base name and UTF-8 encoding.
     *
     * @param baseName the base name to use, must not be {@code null}.
     */
    public ResourceBundleMessageProvider(String baseName) {
        this(baseName, "UTF-8");
    }

    /**
     * Creates a new {@code ResourceBundleMessageProvider} with the given base name and encoding.
     *
     * @param baseName the base name to use, must not be {@code null}.
     * @param encoding the encoding to use when reading the resource bundle, must not be {@code null}.
     */
    public ResourceBundleMessageProvider(String baseName, String encoding) {
        this.baseName = baseName;
        this.encoding = encoding;
    }

    @Override
    public MessageFormat resolveCode(String s, Locale locale) {
        final ResourceBundle resourceBundle = getResourceBundle(locale);
        final String message = getString(resourceBundle, s);
        return getMessageFormat(message, locale);
    }

    private ResourceBundle getResourceBundle(Locale locale) {
        try {
            return ResourceBundle.getBundle(baseName, locale, new MessageControl());
        } catch (MissingResourceException ex) {
            LOGGER.warn("No message bundle with basename [{}] found for locale [{}]", baseName, locale);
            return null;
        }
    }

    private String getString(ResourceBundle bundle, String s) {
        if (bundle == null) {
            return null;
        }
        try {
            return bundle.getString(s);
        } catch (MissingResourceException ex) {
            return null;
        }
    }

    private MessageFormat getMessageFormat(String message, Locale locale) {
        if (message == null) {
            return null;
        }
        return new MessageFormat(message, locale);
    }

    private class MessageControl extends ResourceBundle.Control {
        @Override
        public ResourceBundle newBundle(String baseName, Locale locale, String format, ClassLoader loader, boolean reload) throws IllegalAccessException, InstantiationException, IOException {
            if ("java.properties".equals(format)) {
                final String resourceName = toResourceName(toBundleName(baseName, locale), "properties");
                final InputStream stream = loader.getResourceAsStream(resourceName);
                if (stream == null) {
                	return null; // Not found
                }
                Reader reader = null;
                try {
                	reader = new InputStreamReader(stream, encoding);
                	return new PropertyResourceBundle(reader);
                } catch (UnsupportedEncodingException ex) {
                	stream.close();
                	throw ex;
                } finally {
                	if (reader != null) {
                		reader.close();
                	}
                }
            } else {
                return super.newBundle(baseName, locale, format, loader, reload);
            }
        }
    }
}


#include "../Precompiled.h"

#include "../Math/MathDefs.h"
#include "../Math/StringHash.h"

#include <cstdio>

#include "../DebugNew.h"

namespace Urho3D
{

const StringHash StringHash::ZERO;

StringHash::StringHash(const char* str) noexcept :
    value_(Calculate(str))
{
}

StringHash::StringHash(const String& str) noexcept :
    value_(Calculate(str.CString()))
{
}

unsigned StringHash::Calculate(const char* str, unsigned hash)
{
    if (!str)
        return hash;

    while (*str)
    {
        // Perform the actual hashing as case-insensitive
        char c = *str;
        hash = SDBMHash(hash, (unsigned char)tolower(c));
        ++str;
    }

    return hash;
}

String StringHash::ToString() const
{
    char tempBuffer[CONVERSION_BUFFER_LENGTH];
    sprintf(tempBuffer, "%08X", value_);
    return String(tempBuffer);
}

}


//		This file was generated  by St4mpede.Poco 2016-06-08 22:18:52

/*
Reading xml C:\DATA\PROJEKT\St4mpede\St4mpede\St4mpede\RdbSchema\St4mpede.RdbSchema.xml.
Read database with tables: Customer, Project, User.
Included classes are:
Name=Customer
Name=Project
Name=User
Writing the output file C:\DATA\PROJEKT\St4mpede\St4mpede\St4mpede\Poco\PocoGenerator.xml.
Writing 3 classes in C:\DATA\PROJEKT\St4mpede\St4mpede\St4mpede\..\..\TheDAL\Poco.
*/

//
//
//
//
//
//
//
//


<!DOCTYPE html>

    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>classical-realizability: Not compatible</title>
    <link rel="shortcut icon" type="image/png" href="../../../../../favicon.png" />
    <link href="../../../../../bootstrap.min.css" rel="stylesheet">
    <link href="../../../../../bootstrap-custom.css" rel="stylesheet">
    <link href="//maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css" rel="stylesheet">

             Coq bench

clean / released

8.5.1 / classical-realizability - 8.7.0

            « Up

              classical-realizability

                8.7.0
                Not compatible

 (2020-07-19 14:21:56 UTC)

Context

# Packages matching: installed
# Name              # Installed # Synopsis
base-bigarray       base
base-num            base        Num library distributed with the OCaml compiler
base-threads        base
base-unix           base
camlp5              7.12        Preprocessor-pretty-printer of OCaml
conf-findutils      1           Virtual package relying on findutils
coq                 8.5.1       Formal proof management system.
num                 0           The Num library for arbitrary-precision integer and rational arithmetic
ocaml               4.05.0      The OCaml compiler (virtual package)
ocaml-base-compiler 4.05.0      Official 4.05.0 release
ocaml-config        1           OCaml Switch Configuration
# opam file:
opam-version: "2.0"
maintainer: "Hugo.Herbelin@inria.fr"
homepage: "https://github.com/coq-contribs/classical-realizability"
license: "BSD"
build: [make "-j%{jobs}%"]
install: [make "install"]
remove: ["rm" "-R" "%{lib}%/coq/user-contrib/ClassicalRealizability"]
depends: [
  "ocaml"
  "coq" {>= "8.7" & < "8.8~"}
]
tags: [ "keyword: classical realizability" "keyword: Krivine's realizability" "keyword: primitive datatype" "keyword: non determinism" "keyword: quote" "keyword: axiom of countable choice" "keyword: real numbers" "category: Mathematics/Logic/Foundations" ]
authors: [ "Lionel Rieg <lionel.rieg@ens-lyon.org>" ]
bug-reports: "https://github.com/coq-contribs/classical-realizability/issues"
dev-repo: "git+https://github.com/coq-contribs/classical-realizability.git"
synopsis: "Krivine's classical realizability"
description: """
The aim of this Coq library is to provide a framework for checking
proofs in Krivine's classical realizability for second-order Peano arithmetic.
It is designed to be as extensible as the original theory by Krivine and to
support on-the-fly extensions by new instructions with their evaluation
rules."""
flags: light-uninstall
url {
  src:
    "https://github.com/coq-contribs/classical-realizability/archive/v8.7.0.tar.gz"
  checksum: "md5=6299c2ee7d52c1535eece3376983263c"
}

Lint

Command

true

Return code

0

Dry install

Dry install with the current Coq version:

Command

opam install -y --show-action coq-classical-realizability.8.7.0 coq.8.5.1

Return code

5120

Output

[NOTE] Package coq is already installed (current version is 8.5.1).
The following dependencies couldn't be met:
  - coq-classical-realizability -> coq >= 8.7
Your request can't be satisfied:
  - No available version of coq satisfies the constraints
No solution found, exiting

Dry install without Coq/switch base, to test if the problem was incompatibility with the current Coq/OCaml version:

Command

opam remove -y coq; opam install -y --show-action --unlock-base coq-classical-realizability.8.7.0

Return code

0

Install dependencies

Command

true

Return code

0

Duration

0 s

Install

Command

true

Return code

0

Duration

0 s

Installation size

No files were installed.

Uninstall

Command

true

Return code

0

Missing removes

                none

Wrong removes

                none

          Sources are on GitHub. © Guillaume Claret.


import React from 'react'
import '!style!css!react-loading-bar/dist/index.css'
export default function Loading() {
  return (

      Loading...

  )
}


from __future__ import unicode_literals
from django.conf import settings
from django.contrib.contenttypes import generic
from django.contrib.contenttypes.models import ContentType
from django.db import models
from django.dispatch.dispatcher import receiver
from model_utils.models import TimeStampedModel
from registration.signals import user_registered

_all = ["Asset", "Profile", "user_registered_callback"]
__author__ = "pmeier82"

# PROFILE

class Profile(models.Model):
    """user profile model"""

    class Meta:
        app_label = "base"

    user = models.OneToOneField(
        settings.AUTH_USER_MODEL,
        unique=True)
    title = models.CharField(
        max_length=255,
        default="",
    )
    affiliation = models.CharField(
        max_length=255,
        default="",
    )
    research_area = models.TextField(
        default=""
    )
    # TODO: build a meaningful profile

    # special
    def __str__(self):
        return self.user.username

    def __unicode__(self):
        return unicode(self.__str__())

def user_registered_callback(user, request, **kwargs):
    profile, is_new = Profile.objects.get_or_create(user=user)
    profile.title = request.POST.get("title", "test")
    profile.save()

user_registered.connect(user_registered_callback)

# ASSET

def UPLOAD_TO_HANDLER(obj, fname):
    folder = getattr(obj, "kind", "default")
    return "{}/{}".format(folder, fname)

class Asset(TimeStampedModel):
    """generic file asset model"""

    class Meta:
        app_label = "base"

    UPLOAD_TO = "default"

    # fields
    name = models.CharField(max_length=255, unique=False)
    data_orig_name = models.CharField(max_length=255, unique=False)
    data = models.FileField(upload_to=UPLOAD_TO_HANDLER)
    kind = models.CharField(max_length=255, unique=False, null=False, default=UPLOAD_TO)

    # generic foreign key
    content_type = models.ForeignKey(ContentType, null=True)
    object_id = models.PositiveIntegerField(null=True)
    content_object = generic.GenericForeignKey()

    # special methods
    def __unicode__(self):
        return unicode("{}: {}".format(self.__class__.__name__, self.name))

    # django special methods
    @models.permalink
    def get_absolute_url(self):
        return "asset:serve", (self.pk,), {}

    @models.permalink
    def get_delete_url(self):
        return "asset:delete", (self.pk,), {}

    # interface
    def save(self, *args, **kwargs):
        super(Asset, self).save(*args, **kwargs)

    def delete(self, *args, **kwargs):
        super(Asset, self).delete(*args, **kwargs)

@receiver(models.signals.pre_delete, sender=Asset)
def asset_file_delete(sender, instance, **kwargs):
    instance.data.delete()

if __name__ == "__main__":
    pass


package org.eclipse.lsp4j;

import java.util.List;
import org.eclipse.lsp4j.Position;
import org.eclipse.lsp4j.TextDocumentIdentifier;
import org.eclipse.lsp4j.WorkDoneProgressAndPartialResultParams;
import org.eclipse.lsp4j.jsonrpc.validation.NonNull;
import org.eclipse.lsp4j.util.Preconditions;
import org.eclipse.xtext.xbase.lib.Pure;
import org.eclipse.xtext.xbase.lib.util.ToStringBuilder;

/**
 * A parameter literal used in selection range requests.
 * <p>
 * Since 3.15.0
 */
@SuppressWarnings("all")
public class SelectionRangeParams extends WorkDoneProgressAndPartialResultParams {
  /**
   * The text document.
   */
  @NonNull
  private TextDocumentIdentifier textDocument;

  /**
   * The positions inside the text document.
   */
  @NonNull
  private List<Position> positions;

  public SelectionRangeParams() {
  }

  public SelectionRangeParams(@NonNull final TextDocumentIdentifier textDocument, @NonNull final List<Position> positions) {
    this.textDocument = Preconditions.<TextDocumentIdentifier>checkNotNull(textDocument, "textDocument");
    this.positions = Preconditions.<List<Position>>checkNotNull(positions, "positions");
  }

  /**
   * The text document.
   */
  @Pure
  @NonNull
  public TextDocumentIdentifier getTextDocument() {
    return this.textDocument;
  }

  /**
   * The text document.
   */
  public void setTextDocument(@NonNull final TextDocumentIdentifier textDocument) {
    this.textDocument = Preconditions.checkNotNull(textDocument, "textDocument");
  }

  /**
   * The positions inside the text document.
   */
  @Pure
  @NonNull
  public List<Position> getPositions() {
    return this.positions;
  }

  /**
   * The positions inside the text document.
   */
  public void setPositions(@NonNull final List<Position> positions) {
    this.positions = Preconditions.checkNotNull(positions, "positions");
  }

  @Override
  @Pure
  public String toString() {
    ToStringBuilder b = new ToStringBuilder(this);
    b.add("textDocument", this.textDocument);
    b.add("positions", this.positions);
    b.add("workDoneToken", getWorkDoneToken());
    b.add("partialResultToken", getPartialResultToken());
    return b.toString();
  }

  @Override
  @Pure
  public boolean equals(final Object obj) {
    if (this == obj)
      return true;
    if (obj == null)
      return false;
    if (getClass() != obj.getClass())
      return false;
    if (!super.equals(obj))
      return false;
    SelectionRangeParams other = (SelectionRangeParams) obj;
    if (this.textDocument == null) {
      if (other.textDocument != null)
        return false;
    } else if (!this.textDocument.equals(other.textDocument))
      return false;
    if (this.positions == null) {
      if (other.positions != null)
        return false;
    } else if (!this.positions.equals(other.positions))
      return false;
    return true;
  }

  @Override
  @Pure
  public int hashCode() {
    final int prime = 31;
    int result = super.hashCode();
    result = prime * result + ((this.textDocument== null) ? 0 : this.textDocument.hashCode());
    return prime * result + ((this.positions== null) ? 0 : this.positions.hashCode());
  }
}


package com.github.mortido.extra.behavioral.nullObject;

public class NullUser extends User {
    @Override
    public String getName() {
        return "User doesn't exist";
    }

    @Override
    public int getId() {
        return -1;
    }
}


import { Arr, Optional } from '@ephox/katamari';
import { SugarElement } from '@ephox/sugar';

import * as Structs from '../api/Structs';
import * as GridRow from '../model/GridRow';
import { CellElement, CompElm } from '../util/TableTypes';

type Subst = () => SugarElement<HTMLTableCellElement>;

// substitution: () -> item
const merge = (grid: Structs.RowCells[], bounds: Structs.Bounds, comparator: CompElm, substitution: Subst): Structs.RowCells[] => {
  const rows = GridRow.extractGridDetails(grid).rows;
  // Mutating. Do we care about the efficiency gain?
  if (rows.length === 0) {
    return grid;
  }
  for (let i = bounds.startRow; i <= bounds.finishRow; i++) {
    for (let j = bounds.startCol; j <= bounds.finishCol; j++) {
      // We can probably simplify this again now that we aren't reusing merge.
      const row = rows[i];
      const isLocked = GridRow.getCell(row, j).isLocked;
      GridRow.mutateCell(row, j, Structs.elementnew(substitution(), false, isLocked));
    }
  }
  return grid;
};

// substitution: () -> item
const unmerge = (grid: Structs.RowCells[], target: SugarElement<HTMLElement>, comparator: CompElm, substitution: Subst): Structs.RowCells[] => {
  const rows = GridRow.extractGridDetails(grid).rows;
  // Mutating. Do we care about the efficiency gain?
  let first = true;
  // tslint:disable-next-line:prefer-for-of
  for (let i = 0; i < rows.length; i++) {
    for (let j = 0; j < GridRow.cellLength(rows[0]); j++) {
      const row = rows[i];
      const currentCell = GridRow.getCell(row, j);
      const currentCellElm = currentCell.element;
      const isToReplace = comparator(currentCellElm, target);

      if (isToReplace && !first) {
        GridRow.mutateCell(row, j, Structs.elementnew(substitution(), true, currentCell.isLocked));
      } else if (isToReplace) {
        first = false;
      }
    }
  }
  return grid;
};

const uniqueCells = <T extends CellElement>(row: Structs.ElementNew<T>[], comparator: CompElm): Structs.ElementNew<T>[] => {
  return Arr.foldl(row, (rest, cell) => {
    return Arr.exists(rest, (currentCell) => {
      return comparator(currentCell.element, cell.element);
    }) ? rest : rest.concat([ cell ]);
  }, [] as Structs.ElementNew<T>[]);
};

const splitCols = (grid: Structs.RowCells[], index: number, comparator: CompElm, substitution: Subst): Structs.RowCells[] => {
  // We don't need to split rows if we're inserting at the first or last row of the old table
  if (index > 0 && index < grid[0].cells.length) {
    Arr.each(grid, (row) => {
      const prevCell = row.cells[index - 1];
      let offset = 0;
      const substitute = substitution();

      while (row.cells.length > index + offset && comparator(prevCell.element, row.cells[index + offset].element)) {
        GridRow.mutateCell(row, index + offset, Structs.elementnew(substitute, true, row.cells[index + offset].isLocked));
        offset++;
      }
    });
  }

  return grid;
};

const splitRows = (grid: Structs.RowCells[], index: number, comparator: CompElm, substitution: Subst): Structs.RowCells[] => {
  // We don't need to split rows if we're inserting at the first or last row of the old table
  const rows = GridRow.extractGridDetails(grid).rows;
  if (index > 0 && index < rows.length) {
    const rowPrevCells = rows[index - 1].cells;
    const cells = uniqueCells(rowPrevCells, comparator);
    Arr.each(cells, (cell) => {
      // only make a sub when we have to
      let replacement = Optional.none<SugarElement<HTMLTableCellElement>>();
      for (let i = index; i < rows.length; i++) {
        for (let j = 0; j < GridRow.cellLength(rows[0]); j++) {
          const row = rows[i];
          const current = GridRow.getCell(row, j);
          const isToReplace = comparator(current.element, cell.element);

          if (isToReplace) {
            if (replacement.isNone()) {
              replacement = Optional.some(substitution());
            }
            replacement.each((sub) => {
              GridRow.mutateCell(row, j, Structs.elementnew(sub, true, current.isLocked));
            });
          }
        }
      }
    });
  }

  return grid;
};

export {
  merge,
  unmerge,
  splitCols,
  splitRows
};


<?xml version="1.0" encoding="utf-8"?>
<config version="1" xmlns="http://skynav.com/ns/ttv"/>


from __future__ import print_function
from __future__ import unicode_literals
from __future__ import division

import json

from django.conf import settings
from django.contrib.gis.geos import Polygon
from django.core.urlresolvers import reverse
from django.db import transaction
from django.db.models import Q
from django.http import HttpResponseRedirect, HttpResponseForbidden, Http404
from django.shortcuts import get_object_or_404
from django.utils.timezone import now

from libs.data import merge
from libs.formatters import humanize_bytes
from libs.pdf_maps import create_event_map_pdf
from libs.sql import get_group_tree_count

from apps.core.helpers import (user_is_group_admin,
                               user_is_eligible_to_become_trusted_mapper)
from apps.core.decorators import group_request
from apps.core.models import Group

from apps.mail.views import notify_group_mapping_approved

from apps.users.models import Follow, TrustedMapper
from apps.users.forms import GroupSettingsForm

from apps.survey.models import Territory, Survey, Blockface
from apps.survey.layer_context import (get_context_for_territory_layer,
                                       get_context_for_territory_admin_layer)

from apps.event.models import Event, EventRegistration
from apps.event.event_list import EventList

GROUP_EVENTS_ID = 'group-events'
GROUP_EDIT_EVENTS_TAB_ID = 'events'

def group_list_page(request):
    # TODO: pagination
    groups = Group.objects.filter(is_active=True).order_by('name')
    group_ids = Follow.objects.filter(user_id=request.user.id) \
        .values_list('group_id', flat=True)
    user_is_following = [group.id in group_ids for group in groups]

    group_infos = zip(groups, user_is_following)
    return {
        'groups': group_infos,
        'groups_count': len(group_infos),
    }

@group_request
def _group_events(request):
    qs = Event.objects.filter(group=request.group, is_private=False)
    user_can_edit_group = user_is_group_admin(request.user,
                                              request.group)
    extra_context = {'user_can_edit_group': user_can_edit_group,
                     'group_slug': request.group.slug}
    return qs, extra_context

group_detail_events = EventList(
    _group_events,
    name="group_detail_events",
    template_path='groups/partials/detail_event_list.html')

group_edit_events = EventList(
    _group_events,
    name="group_edit_events",
    template_path='groups/partials/edit_event_list.html')

def group_detail(request):
    user = request.user
    group = request.group

    if not user_is_group_admin(user, group) and not request.group.is_active:
        raise Http404('Must be a group admin to view an inactive group')

    event_list = (group_detail_events
                  .configure(chunk_size=2,
                             active_filter=EventList.Filters.CURRENT,
                             filterset_name=EventList.chronoFilters)
                  .as_context(request, group_slug=group.slug))
    user_is_following = Follow.objects.filter(user_id=request.user.id,
                                              group=group).exists()

    show_mapper_request = user_is_eligible_to_become_trusted_mapper(user,
                                                                    group)

    follow_count = Follow.objects.filter(group=group).count()
    tree_count = get_group_tree_count(group)

    group_blocks = Territory.objects \
        .filter(group=group) \
        .values_list('blockface_id', flat=True)

    group_blocks_count = group_blocks.count()

    if group_blocks_count > 0:
        completed_blocks = Survey.objects \
            .filter(blockface_id__in=group_blocks) \
            .distinct('blockface')
        block_percent = "{:.1%}".format(
            float(completed_blocks.count()) / float(group_blocks.count()))
    else:
        block_percent = "0.0%"

    events_held = Event.objects.filter(group=group, ends_at__lt=now())
    num_events_held = events_held.count()

    num_event_attendees = EventRegistration.objects \
        .filter(event__in=events_held) \
        .filter(did_attend=True) \
        .count()

    return {
        'group': group,
        'event_list': event_list,
        'user_is_following': user_is_following,
        'edit_url': reverse('group_edit', kwargs={'group_slug': group.slug}),
        'show_mapper_request': show_mapper_request,
        'counts': {
            'tree': tree_count,
            'block': block_percent,
            'event': num_events_held,
            'attendees': num_event_attendees,
            'follows': follow_count
        },
        'group_events_id': GROUP_EVENTS_ID,
        'layer': get_context_for_territory_layer(request, request.group.id),
        'territory_bounds': _group_territory_bounds(request.group),
        'render_follow_button_without_count': request.POST.get(
            'render_follow_button_without_count', False)
    }

def redirect_to_group_detail(request):
    return HttpResponseRedirect(
        reverse('group_detail', kwargs={
            'group_slug': request.group.slug
        }))

def _group_territory_bounds(group):
    blockfaces = Blockface.objects \
        .filter(territory__group=group) \
        .collect()

    if blockfaces:
        return list(blockfaces.extent)
    else:
        return None

def edit_group(request, form=None):
    group = request.group
    if not form:
        form = GroupSettingsForm(instance=request.group, label_suffix='')
    event_list = (group_edit_events
                  .configure(chunk_size=2,
                             active_filter=EventList.Filters.CURRENT,
                             filterset_name=EventList.chronoFilters)
                  .as_context(request, group_slug=group.slug))
    pending_mappers = TrustedMapper.objects.filter(group=request.group,
                                                   is_approved__isnull=True)
    all_mappers = TrustedMapper.objects.filter(group=request.group,
                                               is_approved__isnull=False)
    return {
        'group': group,
        'event_list': event_list,
        'form': form,
        'group_slug': group.slug,
        'max_image_size': humanize_bytes(
            settings.MAX_GROUP_IMAGE_SIZE_IN_BYTES, 0),
        'pending_mappers': pending_mappers,
        'all_mappers': all_mappers,
        'group_edit_events_tab_id': GROUP_EDIT_EVENTS_TAB_ID,
    }

def update_group_settings(request):
    form = GroupSettingsForm(request.POST, request.FILES,
                             instance=request.group)
    if form.is_valid():
        form.save()
        return HttpResponseRedirect(request.group.get_absolute_url())
    else:
        return edit_group(request, form=form)

def follow_group(request):
    Follow.objects.get_or_create(user_id=request.user.id, group=request.group)
    return group_detail(request)

def unfollow_group(request):
    Follow.objects.filter(user_id=request.user.id, group=request.group) \
        .delete()
    return group_detail(request)

def start_group_map_print_job(request):
    # TODO: implement
    pass

def give_user_mapping_priveleges(request, username):
    mapper_context = _grant_mapping_access(request.group, username,
                                           is_approved=True)
    mail_context = notify_group_mapping_approved(request, request.group,
                                                 username)
    return merge(mapper_context, mail_context)

def remove_user_mapping_priveleges(request, username):
    return _grant_mapping_access(request.group, username, is_approved=False)

def _grant_mapping_access(group, username, is_approved):
    mapper, created = TrustedMapper.objects.update_or_create(
        group=group,
        user__username=username,
        defaults={'is_approved': is_approved})
    return {
        'mapper': mapper
    }

def request_mapper_status(request):
    user, group = request.user, request.group
    if not user_is_eligible_to_become_trusted_mapper(user, group):
        return HttpResponseForbidden()
    mapper, created = TrustedMapper.objects.update_or_create(
        group=group, user=user)
    return {
        'success': True
    }

def group_unmapped_territory_geojson(request, group_id):
    # Get unmapped blockfaces
    blockfaces = Blockface.objects.filter(is_available=True)

    my_territory_q = Q(territory__group_id=group_id)

    if request.body:
        # Get potentially selectable blockfaces in polygon
        # (those in my territory or unclaimed)
        point_list = json.loads(request.body)
        point_list.append(point_list[0])  # Close the polygon
        polygon = Polygon((point_list))

        no_reservations_q = \
            Q(blockfacereservation__isnull=True) \
            | Q(blockfacereservation__canceled_at__isnull=False) \
            | Q(blockfacereservation__expires_at__lt=now())
        nobodys_territory_q = Q(territory__group_id=None)
        unclaimed_q = no_reservations_q & nobodys_territory_q

        blockfaces = blockfaces \
            .filter(geom__within=polygon) \
            .filter(my_territory_q | unclaimed_q) \
            .distinct()

        # Return just blockface data
        # (skipping expensive queries to make tiler URLs)
        return _make_blockface_data_result(blockfaces)

    else:
        # Get all blockfaces in group's territory
        blockfaces = blockfaces.filter(my_territory_q)
        return _make_blockface_and_tiler_urls_result(
            request, blockfaces, group_id)

def group_update_territory(request, group_id):
    group = get_object_or_404(Group, id=group_id)

    _update_territory(group, request)

    # Recreate PDF maps to show updated group territory
    _update_event_maps(request, group)

    result_blockfaces = Blockface.objects.filter(territory__group=group)
    return _make_blockface_and_tiler_urls_result(
        request, result_blockfaces, group_id)

@transaction.atomic
def _update_territory(group, request):
    new_block_ids = set([int(id) for id in json.loads(request.body)])
    old_block_ids = set(Territory.objects
                        .filter(group=group)
                        .values_list('blockface_id', flat=True))
    ids_to_add = new_block_ids - old_block_ids
    ids_to_kill = old_block_ids - new_block_ids
    # Make sure no unavailable or already-assigned blocks slipped in
    filtered_ids_to_add = Blockface.objects \
        .filter(id__in=ids_to_add) \
        .filter(is_available=True) \
        .filter(territory=None) \
        .values_list('id', flat=True)
    new_territory = [Territory(group=group, blockface_id=id)
                     for id in filtered_ids_to_add]
    Territory.objects.bulk_create(new_territory)
    Territory.objects \
        .filter(blockface_id__in=ids_to_kill) \
        .delete()

def _update_event_maps(request, group):
    events = Event.objects \
        .filter(group_id=group.id, begins_at__gt=now()) \
        .select_related('group')
    for event in events:
        create_event_map_pdf(request, event)

def _make_blockface_and_tiler_urls_result(request, blockfaces, group_id):
    result = {
        'blockDataList': _make_blockface_data_result(blockfaces),
        'tilerUrls': get_context_for_territory_admin_layer(request, group_id)
    }
    return result

def _make_blockface_data_result(blockfaces):
    block_data_list = [{'id': bf.id, 'geojson': bf.geom.json}
                       for bf in blockfaces]
    return block_data_list


function configure() {
    # List n-application using most space
    # @param    $1|size  number of biggest application to list
    # @return    void
    function du-app() {
        size="${1:-10}"
        dpkg-query --show --showformat="\${Package;-50}\t\${Installed-Size}\n" \
        | sort -k 2 -n \
        | grep -v deinstall \
        | awk '{printf "%.1f MB \t %s\n", $2/(1024), $1}' \
        | tail -n "$size"
    }

    # human-readable sizes
    function df() {
        command df \
            --human-readable \
            --print-type \
            --exclude-type squashfs \
            --exclude-type tmpfs \
            --exclude-type devtmpfs \
            "$@"
    }

     # show sizes in MB
    function free() { command free -m; }
}
configure


package org.ops4j.pax.exam.sample2.model;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Lob;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

@Entity
@Table(name = "rating")
public class Rating {

    @Id
    @GeneratedValue(strategy = GenerationType.AUTO)
    private int id;

    private int stars;

    @Lob
    private String comment;

    @ManyToOne
    private User user;
    @ManyToOne
    private Movie movie;

    /**
     * @return the id
     */
    public int getId() {
        return id;
    }

    /**
     * @param id
     *            the id to set
     */
    public void setId(int id) {
        this.id = id;
    }

    /**
     * @return the stars
     */
    public int getStars() {
        return stars;
    }

    /**
     * @param stars
     *            the stars to set
     */
    public void setStars(int stars) {
        this.stars = stars;
    }

    /**
     * @return the comment
     */
    public String getComment() {
        return comment;
    }

    /**
     * @param comment
     *            the comment to set
     */
    public void setComment(String comment) {
        this.comment = comment;
    }

    /**
     * @return the user
     */
    public User getUser() {
        return user;
    }

    /**
     * @param user
     *            the user to set
     */
    public void setUser(User user) {
        this.user = user;
    }

    /**
     * @return the movie
     */
    public Movie getMovie() {
        return movie;
    }

    /**
     * @param movie
     *            the movie to set
     */
    public void setMovie(Movie movie) {
        this.movie = movie;
    }
}


//
// MODULE: JdbcDebug.cpp
//
#include "org_apache_trafodion_jdbc_t2_JdbcDebug.h"
#include "Debug.h"

/*
 * Class:     org_apache_trafodion_jdbc_t2_JdbcDebug
 * Method:    getDebugHandle
 * Signature: (I)I
 */
JNIEXPORT jlong JNICALL Java_org_apache_trafodion_jdbc_t2_JdbcDebug_getDebugHandle(JNIEnv *jenv, jclass jcls,
																	  jlong method_name_handle)
{
	jlong handle = 0;
#if defined(_BENCHMARK)
	handle = (jlong) new Benchmark((const char *) method_name_handle);
#endif /* _BENCHMARK */
	return(handle);
}

/*
 * Class:     org_apache_trafodion_jdbc_t2_JdbcDebug
 * Method:    getMethodNameHandle
 * Signature: (Ljava/lang/String;)I
 */
JNIEXPORT jlong JNICALL Java_org_apache_trafodion_jdbc_t2_JdbcDebug_getMethodNameHandle(JNIEnv *jenv, jclass jcls,
																		   jstring method_name)
{
	jlong rc = 0;
#if defined(_DEBUG) || defined(_BENCHMARK)
	if (method_name) rc = (jlong) jenv->GetStringUTFChars(method_name,NULL);
	if (rc==0) rc = (jlong) "Unknown";
#endif /* _DEBUG || _BENCHMARK */
	return(rc);
}

/*
 * Class:     org_apache_trafodion_jdbc_t2_JdbcDebug
 * Method:    methodEntry
 * Signature: (III)V
 */
JNIEXPORT void JNICALL Java_org_apache_trafodion_jdbc_t2_JdbcDebug_methodEntry(JNIEnv *jenv, jclass jcls,
																   jlong debug_handle,
																   jint debug_level,
																   jlong method_name_handle)
{
#if defined(_DEBUG)
	DebugFunctionEntry((const char *) method_name_handle, debug_level, NULL , NULL, 0);
#endif /* _DEBUG */
#if defined(_BENCHMARK)
	((Benchmark *) debug_handle)->Entry();
#endif /* _BENCHMARK */
}

/*
 * Class:     org_apache_trafodion_jdbc_t2_JdbcDebug
 * Method:    methodReturn
 * Signature: (ILjava/lang/String;)V
 */
JNIEXPORT void JNICALL Java_org_apache_trafodion_jdbc_t2_JdbcDebug_methodReturn(JNIEnv *jenv, jclass jcls,
																	jlong debug_handle,
																	jstring comment)
{
#if defined(_DEBUG)
	const char *commentStr;
	if (comment) commentStr = jenv->GetStringUTFChars(comment,NULL);
	else commentStr = NULL;
	DebugFunctionReturn("JAVA", commentStr, false, "RETURNING", NULL, 0);
	if (commentStr) jenv->ReleaseStringUTFChars(comment,commentStr);
#endif /* _DEBUG */
}

/*
 * Class:     org_apache_trafodion_jdbc_t2_JdbcDebug
 * Method:    methodExit
 * Signature: (I)V
 */
JNIEXPORT void JNICALL Java_org_apache_trafodion_jdbc_t2_JdbcDebug_methodExit(JNIEnv *jenv, jclass jcls,
																  jlong debug_handle)
{
#if defined(_DEBUG)
	DebugFunctionReturn("JAVA", NULL, true, "EXITING", NULL, 0);
#endif /* _DEBUG */

#if defined(_BENCHMARK)
	((Benchmark *) debug_handle)->Exit();
#endif /* _BENCHMARK */
}

/*
 * Class:     org_apache_trafodion_jdbc_t2_JdbcDebug
 * Method:    traceOut
 * Signature: (IILjava/lang/String;)V
 */
JNIEXPORT void JNICALL Java_org_apache_trafodion_jdbc_t2_JdbcDebug_traceOut(JNIEnv *jenv, jclass jcls,
																	jlong debug_handle,
																	jint debug_level,
																	jstring comment)
{
#if defined(_DEBUG)
	const char *commentStr;
	if (comment) commentStr = jenv->GetStringUTFChars(comment,NULL);
	else commentStr = NULL;
	if (DebugActive(debug_level,NULL,0)) DebugOutput(commentStr , NULL, 0);
	if (commentStr) jenv->ReleaseStringUTFChars(comment,commentStr);
#endif /* _DEBUG */
}


package com.alibaba.dubbo.common.serialize.support.java;

import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;

import com.alibaba.dubbo.common.URL;
import com.alibaba.dubbo.common.serialize.ObjectInput;
import com.alibaba.dubbo.common.serialize.ObjectOutput;
import com.alibaba.dubbo.common.serialize.Serialization;

/**
 * @author ding.lid
 */
public class CompactedJavaSerialization implements Serialization {

    public byte getContentTypeId() {
        return 4;
    }

    public String getContentType() {
        return "x-application/compactedjava";
    }

    public ObjectOutput serialize(URL url, OutputStream out) throws IOException {
        return new JavaObjectOutput(out, true);
    }

    public ObjectInput deserialize(URL url, InputStream is) throws IOException {
        return new JavaObjectInput(is, true);
    }

}


package com.jxd.android.bookinventtory.bean;

import io.realm.RealmModel;
import io.realm.RealmObject;
import io.realm.annotations.RealmClass;

/**
 * 图书盘点
 * Created by Administrator on 2017/10/17.
 */
@RealmClass
public class ShelfBookScanBean implements RealmModel {

    private String title;
    private String barcode;
    private String shelfno;
    private String updatetime;
    private String uid;
    private String callno;
    private int inshelf;
    private String status;
    private String machine_mac;

    /**
     * 盘点状态
     */
    private String scanStatus;

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getBarcode() {
        return barcode;
    }

    public void setBarcode(String barcode) {
        this.barcode = barcode;
    }

    public String getShelfno() {
        return shelfno;
    }

    public void setShelfno(String shelfno) {
        this.shelfno = shelfno;
    }

    public String getUpdatetime() {
        return updatetime;
    }

    public void setUpdatetime(String updatetime) {
        this.updatetime = updatetime;
    }

    public String getUid() {
        return uid;
    }

    public void setUid(String uid) {
        this.uid = uid;
    }

    public String getCallno() {
        return callno;
    }

    public void setCallno(String callno) {
        this.callno = callno;
    }

    public int getInshelf() {
        return inshelf;
    }

    public void setInshelf(int inshelf) {
        this.inshelf = inshelf;
    }

    public String getMachine_mac() {
        return machine_mac;
    }

    public void setMachine_mac(String machine_mac) {
        this.machine_mac = machine_mac;
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    public String getScanStatus() {
        return scanStatus;
    }

    public void setScanStatus(String scanStatus) {
        this.scanStatus = scanStatus;
    }

    public void transfor(BookBean bookBean){
        this.setBarcode( bookBean.getBarcode() );
        this.setCallno(bookBean.getCallno());
        this.setInshelf(bookBean.getInshelf());
        this.setMachine_mac(bookBean.getMachine_mac());
        this.setTitle(bookBean.getTitle());
        this.setUid(bookBean.getUid());
        this.setShelfno(bookBean.getShelfno());
        this.setStatus( bookBean.getStatus() );
        this.setUpdatetime(bookBean.getUpdatetime());
    }

    @Override
    public int hashCode() {
        return super.hashCode();
    }

    @Override
    public boolean equals(Object obj) {
        return super.equals(obj);
    }
}


#include "../../inc/MarlinConfig.h"

#if HAS_M206_COMMAND

#include "../gcode.h"
#include "../../module/motion.h"
#include "../../lcd/marlinui.h"
#include "../../libs/buzzer.h"
#include "../../MarlinCore.h"

void M206_report() {
  SERIAL_ECHOLNPAIR_P(
    LIST_N(DOUBLE(LINEAR_AXES),
      PSTR("M206 X"), home_offset.x,
      SP_Y_STR, home_offset.y,
      SP_Z_STR, home_offset.z,
      SP_I_STR, home_offset.i,
      SP_J_STR, home_offset.j,
      SP_K_STR, home_offset.k,
    )
  );
}

/**
 * M206: Set Additional Homing Offset (X Y Z). SCARA aliases T=X, P=Y
 *
 * *** @thinkyhead: I recommend deprecating M206 for SCARA in favor of M665.
 * ***              M206 for SCARA will remain enabled in 1.1.x for compatibility.
 * ***              In the 2.0 release, it will simply be disabled by default.
 */
void GcodeSuite::M206() {
  LOOP_LINEAR_AXES(i)
    if (parser.seen(AXIS_CHAR(i)))
      set_home_offset((AxisEnum)i, parser.value_linear_units());

  #if ENABLED(MORGAN_SCARA)
    if (parser.seen('T')) set_home_offset(A_AXIS, parser.value_float()); // Theta
    if (parser.seen('P')) set_home_offset(B_AXIS, parser.value_float()); // Psi
  #endif

  if (!parser.seen(LINEAR_AXIS_GANG("X", "Y", "Z", "I", "J", "K")))
    M206_report();
  else
    report_current_position();
}

/**
 * M428: Set home_offset based on the distance between the
 *       current_position and the nearest "reference point."
 *       If an axis is past center its endstop position
 *       is the reference-point. Otherwise it uses 0. This allows
 *       the Z offset to be set near the bed when using a max endstop.
 *
 *       M428 can't be used more than 2cm away from 0 or an endstop.
 *
 *       Use M206 to set these values directly.
 */
void GcodeSuite::M428() {
  if (homing_needed_error()) return;

  xyz_float_t diff;
  LOOP_LINEAR_AXES(i) {
    diff[i] = base_home_pos((AxisEnum)i) - current_position[i];
    if (!WITHIN(diff[i], -20, 20) && home_dir((AxisEnum)i) > 0)
      diff[i] = -current_position[i];
    if (!WITHIN(diff[i], -20, 20)) {
      SERIAL_ERROR_MSG(STR_ERR_M428_TOO_FAR);
      LCD_ALERTMESSAGEPGM_P(PSTR("Err: Too far!"));
      BUZZ(200, 40);
      return;
    }
  }

  LOOP_LINEAR_AXES(i) set_home_offset((AxisEnum)i, diff[i]);
  report_current_position();
  LCD_MESSAGEPGM(MSG_HOME_OFFSETS_APPLIED);
  BUZZ(100, 659);
  BUZZ(100, 698);
}

#endif // HAS_M206_COMMAND


/*

    A helper function to diagram all routes in a `fluid.express` instance.

 */

"use strict";
var fluid = fluid || require("infusion");

fluid.registerNamespace("fluid.test.express");

/**
 *
 * Diagram all routes within an express instance.
 *
 * @param {Object} expressComponent - A `fluid.express` component.
 * @return {Object} A JSON Object representing all routes within a `fluid.express` instance.
 *
 */
fluid.test.express.diagramAllRoutes = function (expressComponent) {
    return fluid.test.express.diagramOneLevel(expressComponent, expressComponent.router._router);
};

/**
 *
 * Diagram the routes for a single component.  To preserve the routing order of the stack, each level's children
 * are represented in a `children` Array.
 *
 * @param {Object} component - A `fluid.express.middleware` component.
 * @param {Object} router - The router instance within the component (if there is one).
 * @return {Object} A JSON Object representing the routes from this level down as well as the method and path for this level.
 */
fluid.test.express.diagramOneLevel = function (component, router) {
    var thisLevel = fluid.filterKeys(component.options, ["method", "path"]);
    thisLevel.typeName = component.typeName;

    if (router) {
        thisLevel.children = fluid.transform(router.stack, function (layer) {
            // This is a `fluid.express.router` instance
            if (layer.handle && layer.handle.that) {
                return fluid.test.express.diagramOneLevel(layer.handle.that, layer.handle.that.router);
            }
            // This is a `fluid.express.middleware` instance
            else if (layer.route) {
                var wrapper = fluid.filterKeys(layer.route, ["path", "methods"]);
                wrapper.children = fluid.transform(layer.route.stack, function (middlewareLayer) {
                    return fluid.test.express.diagramOneLevel(middlewareLayer.handle.that, middlewareLayer.handle.that.router);
                });
                return wrapper;
            }
            // This is something outside of our scope (i.e. native middleware).
            else {
                return "Native middleware '" + (layer.name || "unknown") + "'";
            }
        });
    }

    return thisLevel;
};


package com.lru.memory.disk.cache;

/**
 *
 * @author sathayeg
 */
public interface DirLocate  {
    public String getPathToFile(String key) throws Exception;
    public boolean isDiskPersistent();
}


<!DOCTYPE html>

	<meta charset="UTF-8" />

<title>Класификација</title>

<button class="button button1">Почетна</button>
<button class="button button2">За канцерот</button>
<button class="button button3">Хемотерапија</button>
<button class="button button4">Рецепти</button>
<button class="button button5">Исхрана</button>
<button class="button button6">Совети</button>
<button class="button button7"><font  color="black"Болници</button>
<button class="button button8">Донации</button>
<button class="button button9">Лекови</button>

Видовите на рак се класифицираат според видот на клетки кои наликуваат на тумор, и според тоа,
	на ткивото за кое се претпоставува дека е зачеток на туморот. Подолу е хистологијата и местоположбата на видовите рак. Примери за неколку
	општи категории се: Карцином: Малигни тумори кои потекнуваат од епителни клетки. Во оваа група припаѓаат најчестите видови на рак,
	вклучувајќи ги ракот на дојката, простатата, белите дробови и дебелото црево. Сарком: Малигни тумори кои потекнуваат од сврзните ткива,
	 или мезенхималните клетки. Лимфом и леукемија: Малигноми кои потекнуваат од хематопоетските (крвотворните) клетки Бактериски рак:
	 Тумори кои потекнуваат од тотипотентните клетки. Кај возрасните најчесто може да се најде во тестисите и јајчниците, додека кај фетусите,
	 бебињата и малите деца најчесто се наоѓаат во средишниот дел на телото, на врвот на опашната коска, а кај коњите во основата на черепот.
	 Бластен тумор или бластом: Тумор (обично малигнен) кој наликува на незрело или ембрионско ткиво. Овие тумори се најчести кај децата.
 тумори (видови рак) обично се именуваат користејќи –карцином, -сарком или –бластом како суфикс, и латинскиот или грчкиот збор за органот
  од кој потекнуваат како корен на името. На пример, ракот на црниот дроб се нарекува хепатокарцином, ракот на масните клетки- липосарком
   итн. Бенигните тумори (кои не се рак) се именуваат користејќи –ом како суфикс, и името на органот како корен. На пример, бенигнен тумор
   на мазната мускулатура на матката се нарекува леиомиом (почест израз за овој вид тумор е фиброид). За жал,
	и некои видови рак го користат суфиксот –ом, како што е случајот со меланом и семином


Installing XFramework Generator

You don't need to download the source code from the repo, create  all the necessary files for the web app, writing two thousands line of code just to create a Hello world! app. XFramework Generator can make everything for you.

XF Generator has a number of dependencies such as:

node.js

NPM

Yeoman

To install first two of them on Mac OS X or Windows computers you just need to download a package from nodejs.org/download/. For other platforms see the readme.

After installing node.js and npm go to terminal and install Yeoman writing npm install -g yo (with sudo if necessary).

Almost there! After these steps you need to install XF Generator with npm install -g generator-xf.


namespace Azure.ResourceManager.EdgeOrder.Models
{
    /// <summary> Represents subscription registered features. </summary>
    public partial class CustomerSubscriptionRegisteredFeatures
    {
        /// <summary> Initializes a new instance of CustomerSubscriptionRegisteredFeatures. </summary>
        public CustomerSubscriptionRegisteredFeatures()
        {
        }

        /// <summary> Name of subscription registered feature. </summary>
        public string Name { get; set; }
        /// <summary> State of subscription registered feature. </summary>
        public string State { get; set; }
    }
}


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Uses of Interface org.wildfly.swarm.config.messaging.activemq.server.BindingsDirectoryPathConsumer (BOM:  * : All 2.3.1.Final-SNAPSHOT API)</title>
<meta name="date" content="2019-03-16">
<link rel="stylesheet" type="text/css" href="../../../../../../../../stylesheet.css" title="Style">

JavaScript is disabled on your browser.

Skip navigation links

Overview

Package

Class

Use

Tree

Deprecated

Index

Help

Thorntail API, 2.3.1.Final-SNAPSHOT

Prev

Next

Frames

No Frames

All Classes

Uses of Interface
org.wildfly.swarm.config.messaging.activemq.server.BindingsDirectoryPathConsumer

Packages that use BindingsDirectoryPathConsumer

Package
Description

org.wildfly.swarm.config.messaging.activemq

org.wildfly.swarm.config.messaging.activemq.server

Uses of BindingsDirectoryPathConsumer in org.wildfly.swarm.config.messaging.activemq

Methods in org.wildfly.swarm.config.messaging.activemq with parameters of type BindingsDirectoryPathConsumer

Modifier and Type
Method and Description

T
Server.bindingsDirectoryPath(BindingsDirectoryPathConsumer consumer)

A filesystem path pointing to one of the locations where ActiveMQ stores
 persistent data.

Uses of BindingsDirectoryPathConsumer in org.wildfly.swarm.config.messaging.activemq.server

Methods in org.wildfly.swarm.config.messaging.activemq.server that return BindingsDirectoryPathConsumer

Modifier and Type
Method and Description

default BindingsDirectoryPathConsumer<T>
BindingsDirectoryPathConsumer.andThen(BindingsDirectoryPathConsumer<T> after)

Methods in org.wildfly.swarm.config.messaging.activemq.server with parameters of type BindingsDirectoryPathConsumer

Modifier and Type
Method and Description

default BindingsDirectoryPathConsumer<T>
BindingsDirectoryPathConsumer.andThen(BindingsDirectoryPathConsumer<T> after)

Skip navigation links

Overview

Package

Class

Use

Tree

Deprecated

Index

Help

Thorntail API, 2.3.1.Final-SNAPSHOT

Prev

Next

Frames

No Frames

All Classes

Copyright © 2019 JBoss by Red Hat. All rights reserved.


import ReactSharedInternals from 'shared/ReactSharedInternals';
import type {Transition} from './ReactFiberTracingMarkerComponent.new';

const {ReactCurrentBatchConfig} = ReactSharedInternals;

export const NoTransition = null;

export function requestCurrentTransition(): Transition | null {
  return ReactCurrentBatchConfig.transition;
}


/*!
 * Copyright (c) 2019 by Contributors
 * \file moments-inl.h
 * \brief Moments operator
 * \author Hao Jin
*/

#ifndef MXNET_OPERATOR_NN_MOMENTS_INL_H_
#define MXNET_OPERATOR_NN_MOMENTS_INL_H_

#include <vector>
#include "../tensor/broadcast_reduce_op.h"

namespace mxnet {
namespace op {

struct MomentsParam : public dmlc::Parameter<MomentsParam> {
  dmlc::optional<mxnet::TShape> axes;
  bool keepdims;
  DMLC_DECLARE_PARAMETER(MomentsParam) {
    DMLC_DECLARE_FIELD(axes).set_default(dmlc::optional<mxnet::TShape>())
      .describe("Array of ints. Axes along which to compute mean and variance.");
    DMLC_DECLARE_FIELD(keepdims).set_default(false)
      .describe("produce moments with the same dimensionality as the input.");
  }
};

inline bool MomentsShape(const nnvm::NodeAttrs& attrs,
                         mxnet::ShapeVector* in_attrs,
                         mxnet::ShapeVector* out_attrs) {
  const MomentsParam& param = nnvm::get<MomentsParam>(attrs.parsed);
  CHECK_EQ(in_attrs->size(), 1U);
  CHECK_EQ(out_attrs->size(), 2U);

  mxnet::TShape out_shape =
    ReduceAxesShapeImpl((*in_attrs)[0], param.axes, param.keepdims, false);
  if (!param.axes.has_value() || param.axes.value().ndim() == 0) {
    LOG(FATAL) << "Empty axes is not supported, if you would like to do global moments, "
               << "please pass all axes to axes argument";
  }
  SHAPE_ASSIGN_CHECK(*out_attrs, 0, out_shape);
  SHAPE_ASSIGN_CHECK(*out_attrs, 1, out_shape);
  return true;
}

inline bool MomentsType(const nnvm::NodeAttrs& attrs,
                        std::vector<int>* in_attrs,
                        std::vector<int>* out_attrs) {
  CHECK_EQ(in_attrs->size(), 1U);
  CHECK_EQ(out_attrs->size(), 2U);

  TYPE_ASSIGN_CHECK(*out_attrs, 0, in_attrs->at(0));
  TYPE_ASSIGN_CHECK(*out_attrs, 1, in_attrs->at(0));
  TYPE_ASSIGN_CHECK(*in_attrs, 0, out_attrs->at(0));
  TYPE_ASSIGN_CHECK(*in_attrs, 0, out_attrs->at(1));
  return out_attrs->at(0) != -1 && out_attrs->at(1) != -1;
}

struct VarBroadcastKernel {
  template<typename DType>
  MSHADOW_XINLINE static void Map(int i,
                                  DType *out,
                                  const DType *data,
                                  const DType *mean,
                                  mshadow::Shape<6> data_shape,
                                  mshadow::Shape<6> mean_shape) {
    size_t data_idx = i;
    size_t mean_idx = i;
    size_t data_stride = 1;
    size_t mean_stride = 1;
    for (int axis = 5; axis >= 0; --axis) {
      size_t axis_idx = data_idx % data_shape[axis];
      mean_idx -= axis_idx * data_stride;
      if (mean_shape[axis] != 1) {
        mean_idx += axis_idx * mean_stride;
      }
      data_idx /= data_shape[axis];
      data_stride *= data_shape[axis];
      mean_stride *= mean_shape[axis];
    }
    DType res = (data[i] - mean[mean_idx]);
    out[i] = res * res;
  }
};

template<typename xpu>
inline void MomentsForwardImpl(const OpContext& ctx,
                               const std::vector<TBlob>& inputs,
                               const std::vector<OpReqType>& req,
                               const std::vector<TBlob>& outputs,
                               const dmlc::optional<mxnet::TShape>& axes,
                               const bool keepdims) {
  using namespace mshadow;
  using namespace mshadow_op;
  using namespace mxnet_op;

  Stream<xpu> *s = ctx.get_stream<xpu>();

  const TBlob& data = inputs[0];
  const TBlob& mean = outputs[0];
  const TBlob& var = outputs[1];

  mxnet::TShape small;
  if (keepdims) {
    small = outputs[0].shape_;
  } else {
    small = ReduceAxesShapeImpl(inputs[0].shape_, axes, true, false);
  }

  ReduceAxesComputeImpl<xpu, mshadow_op::sum, true, true>(ctx, {data}, {req[0]}, {mean}, small);
  MSHADOW_TYPE_SWITCH(data.type_flag_, DType, {
    Shape<6> data_shape, mean_shape;
    for (int i = 0; i < 6; ++i) {
      data_shape[i] = (i < data.shape_.ndim()) ? data.shape_[i] : 1;
      mean_shape[i] = (i < small.ndim()) ? small[i] : 1;
    }
    Tensor<xpu, 1, DType> temp_data =
      ctx.requested[0].get_space_typed<xpu, 1, DType>(Shape1(data.shape_.Size()), s);;
    Kernel<VarBroadcastKernel, xpu>::Launch(s, data.shape_.Size(), temp_data.dptr_,
      data.dptr<DType>(), mean.dptr<DType>(), data_shape, mean_shape);
    ReduceAxesComputeImpl<xpu, mshadow_op::sum, true, true>(
      ctx, {TBlob(temp_data).reshape(data.shape_)}, {kWriteTo}, {var}, small);
  });
}

template<typename xpu>
inline void MomentsForward(const nnvm::NodeAttrs& attrs,
                           const OpContext& ctx,
                           const std::vector<TBlob>& inputs,
                           const std::vector<OpReqType>& req,
                           const std::vector<TBlob>& outputs) {
  using namespace mshadow;
  using namespace mshadow_op;
  using namespace mxnet_op;

  CHECK_EQ(inputs.size(), 1U);
  CHECK_EQ(outputs.size(), 2U);

  const MomentsParam& param = nnvm::get<MomentsParam>(attrs.parsed);

  MomentsForwardImpl<xpu>(ctx, inputs, req, outputs, param.axes, param.keepdims);
}

template<int req>
struct VarBackwardKernel {
  template<typename DType>
  MSHADOW_XINLINE static void Map(int i,
                                  DType *igrad,
                                  const DType *ograd,
                                  const DType *data,
                                  const DType *mean,
                                  mshadow::Shape<6> data_shape,
                                  mshadow::Shape<6> mean_shape,
                                  const float N,
                                  const float ddof = 0.0f) {
    size_t data_idx = i;
    size_t mean_idx = i;
    size_t data_stride = 1;
    size_t mean_stride = 1;
    for (int axis = 5; axis >= 0; --axis) {
      size_t axis_idx = data_idx % data_shape[axis];
      mean_idx -= axis_idx * data_stride;
      if (mean_shape[axis] != 1) {
        mean_idx += axis_idx * mean_stride;
      }
      data_idx /= data_shape[axis];
      data_stride *= data_shape[axis];
      mean_stride *= mean_shape[axis];
    }
    KERNEL_ASSIGN(igrad[i], req, ograd[mean_idx] * (data[i] - mean[mean_idx]) * 2 / (N - ddof));
  }
};

template<typename xpu>
inline void MomentsBackwardImpl(const nnvm::NodeAttrs& attrs,
                                const OpContext& ctx,
                                const std::vector<TBlob>& inputs,
                                const std::vector<OpReqType>& req,
                                const std::vector<TBlob>& outputs,
                                const dmlc::optional<mxnet::TShape>& axes) {
  using namespace mshadow;
  using namespace mshadow::expr;
  using namespace mshadow_op;
  using namespace mxnet_op;

  Stream<xpu> *s = ctx.get_stream<xpu>();

  const TBlob& mean_grad = inputs[0];
  const TBlob& var_grad = inputs[1];
  const TBlob& data = inputs[2];
  const TBlob& mean = inputs[3];
  const TBlob& var = inputs[4];
  const TBlob& data_grad = outputs[0];

  mxnet::TShape small = ReduceAxesShapeImpl(data.shape_, axes, true, false);
  BroadcastComputeImpl<xpu>(attrs, ctx, {mean_grad}, req, outputs, small);
  MSHADOW_TYPE_SWITCH(outputs[0].type_flag_, DType, {
    Tensor<xpu, 1, DType> igrad = outputs[0].FlatTo1D<xpu, DType>(s);
    igrad /= scalar<DType>(outputs[0].Size()/inputs[0].Size());
  });

  Shape<6> data_shape, var_shape;
  float N = data_grad.Size() / var.Size();
  for (int i = 0; i < 6; ++i) {
    data_shape[i] = (i < data.shape_.ndim()) ? data.shape_[i] : 1;
    var_shape[i] = (i < small.ndim()) ? small[i] : 1;
  }
  MSHADOW_TYPE_SWITCH(data_grad.type_flag_, DType, {
    Kernel<VarBackwardKernel<kAddTo>, xpu>::Launch(
      s, data_grad.shape_.Size(), data_grad.dptr<DType>(), var_grad.dptr<DType>(),
      data.dptr<DType>(), mean.dptr<DType>(), data_shape, var_shape, N);
  });
}

template<typename xpu>
inline void MomentsBackward(const nnvm::NodeAttrs& attrs,
                            const OpContext& ctx,
                            const std::vector<TBlob>& inputs,
                            const std::vector<OpReqType>& req,
                            const std::vector<TBlob>& outputs) {
  using namespace mshadow;
  using namespace mshadow_op;
  using namespace mxnet_op;

  CHECK_EQ(inputs.size(), 5U);
  CHECK_EQ(outputs.size(), 1U);

  const MomentsParam& param = nnvm::get<MomentsParam>(attrs.parsed);

  MomentsBackwardImpl<xpu>(attrs, ctx, inputs, req, outputs, param.axes);
}

}  // namespace op
}  // namespace mxnet
#endif  // MXNET_OPERATOR_NN_MOMENTS_INL_H_


class DeviceSettingListener < AsakusaSatellite::Hook::Listener
  render_on :account_setting_item, :partial => "device_setting"
end


require_relative '../../spec_helper'

VALID_UUID_REGEX    = /^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i
UUID_STRING1        = 'de305d54-75b4-431b-adb2-eb6b9e546014'
UUID_STRING2        = 'de305d54-75b4-431b-adb2-eb6b9e546020'
UUID_PACKED_STRING1 = "\xde\x30\x5d\x54\x75\xb4\x43\x1b\xad\xb2\xeb\x6b\x9e\x54\x60\x14"
UUID_PACKED_STRING2 = "\xde\x30\x5d\x54\x75\xb4\x43\x1b\xad\xb2\xeb\x6b\x9e\x54\x60\x20"

RSpec.describe Lobster::Uuid do

  describe '::DEFAULT' do
    subject { Lobster::Uuid::DEFAULT }

    it 'is all zeroes' do
      expect(subject).to eq("\x0" * 16)
    end

    it 'is frozen' do
      is_expected.to be_frozen
    end
  end

  describe '#new' do
    context 'with a valid value' do
      subject(:uuid) { Lobster::Uuid.new(UUID_PACKED_STRING1) }

      describe 'the value' do
        subject { uuid.value }

        it 'is stored' do
          is_expected.to eq UUID_PACKED_STRING1
        end
      end
    end

    context 'with an invalid value' do
      it 'rejects a malformed string' do
        expect { Lobster::Uuid.new('foobar') }.to raise_error(ArgumentError)
      end
    end

  end

  context '.generate' do
    subject(:uuid) { Lobster::Uuid.generate }

    describe 'the value' do
      subject { uuid.value }

      # The chances of a randomly generated empty UUID is virtually impossible.
      # Besides, the UUID standards don't allow generated UUID to be all zeroes.
      it 'is random' do
        is_expected.not_to eq("\x0" * 16)
      end
    end

    describe 'the string' do
      subject { uuid.to_s }

      it 'is valid' do
        is_expected.to match VALID_UUID_REGEX
      end
    end
  end

  describe '.parse' do

    context 'with a valid UUID' do
      subject { Lobster::Uuid.parse(UUID_STRING1) }

      it 'parses correctly' do
        expect(subject.to_s).to eq(UUID_STRING1)
      end
    end

    context 'with a malformed string' do
      it 'returns nil' do
        expect(Lobster::Uuid.parse('foobar')).to be_nil
      end
    end

    context 'with an invalid argument' do
      it 'rejects a non-string' do
        expect { Lobster::Uuid.parse(5) }.to raise_error(ArgumentError)
      end
    end
  end

  describe '#value' do
    subject(:uuid) { Lobster::Uuid.new(UUID_PACKED_STRING1).value }

    it 'is a string' do
      is_expected.to be_a(String)
    end

    it 'is frozen' do
      is_expected.to be_frozen
    end

    describe '.length' do
      subject { uuid.length }

      it 'is 16 bytes' do
        is_expected.to be 16
      end
    end
  end

  describe '#eql?' do
    subject(:uuid) { Lobster::Uuid.new(UUID_PACKED_STRING1) }
    subject { uuid.eql?(other) }

    context 'with two identical UUIDs' do
      let(:other) { Lobster::Uuid.new(UUID_PACKED_STRING1) }

      it 'returns true' do
        is_expected.to eq true
      end
    end

    context 'with two different UUIDs' do
      let(:other) { Lobster::Uuid.new(UUID_PACKED_STRING2) }

      it 'returns false' do
        is_expected.to eq false
      end
    end

    context 'without a UUID' do
      let(:other) { 'foobar' }

      it 'returns false' do
        is_expected.to eq false
      end
    end
  end

  describe '#==' do
    subject { first == second }
    let(:first) { Lobster::Uuid.new(UUID_PACKED_STRING1) }

    context 'with equal UUIDs' do
      let(:second) { Lobster::Uuid.new(UUID_PACKED_STRING1) }
      it 'is true' do
        is_expected.to be true
      end
    end

    context 'with the same instance' do
      let(:second) { first }
      it 'is true' do
        is_expected.to be true
      end
    end

    context 'with unequal UUIDs' do
      let(:second) { Lobster::Uuid.new(UUID_PACKED_STRING2) }
      it 'is false' do
        is_expected.to be false
      end
    end

    context 'with nil' do
      let(:second) { nil }
      it 'is false' do
        is_expected.to be false
      end
    end

    context 'with a malformed string' do
      let(:second) { 'foobar' }
      it 'is false' do
        is_expected.to be false
      end
    end

    context 'with a non-string' do
      let(:second) { 5 }
      it 'is false' do
        is_expected.to be false
      end
    end

    context 'with identical value' do
      let(:second) { first.value }
      it 'is true' do
        is_expected.to be true
      end
    end

    context 'with identical string' do
      let(:second) { first.to_s }
      it 'is true' do
        is_expected.to be true
      end
    end
  end

  describe '#<=>' do
    subject { first <=> second }

    context 'with an equal UUID' do
      let(:first)  { Lobster::Uuid.new(UUID_PACKED_STRING1) }
      let(:second) { Lobster::Uuid.new(UUID_PACKED_STRING1) }
      it 'is 0' do
        is_expected.to eq 0
      end
    end

    context 'with the same instance' do
      let(:first)  { Lobster::Uuid.new(UUID_PACKED_STRING1) }
      let(:second) { first }
      it 'is 0' do
        is_expected.to eq 0
      end
    end

    context 'with a lesser UUID' do
      let(:first)  { Lobster::Uuid.new(UUID_PACKED_STRING2) }
      let(:second) { Lobster::Uuid.new(UUID_PACKED_STRING1) }
      it 'is 1' do
        is_expected.to eq 1
      end
    end

    context 'with a greater UUID' do
      let(:first)  { Lobster::Uuid.new(UUID_PACKED_STRING1) }
      let(:second) { Lobster::Uuid.new(UUID_PACKED_STRING2) }
      it 'is -1' do
        is_expected.to eq(-1)
      end
    end

    context 'with nil' do
      let(:first)  { Lobster::Uuid.new(UUID_PACKED_STRING1) }
      let(:second) { nil }
      it 'is nil' do
        is_expected.to be_nil
      end
    end

    context 'with a number' do
      let(:first)  { Lobster::Uuid.new(UUID_PACKED_STRING1) }
      let(:second) { 500 }
      it 'is nil' do
        is_expected.to be_nil
      end
    end

    context 'with an identical value' do
      let(:first)  { Lobster::Uuid.new(UUID_PACKED_STRING1) }
      let(:second) { UUID_PACKED_STRING1 }
      it 'is 0' do
        is_expected.to eq 0
      end
    end

    context 'with a lesser value' do
      let(:first)  { Lobster::Uuid.new(UUID_PACKED_STRING2) }
      let(:second) { UUID_PACKED_STRING1 }
      it 'is 1' do
        is_expected.to eq 1
      end
    end

    context 'with a greater value' do
      let(:first)  { Lobster::Uuid.new(UUID_PACKED_STRING1) }
      let(:second) { UUID_PACKED_STRING2 }
      it 'is -1' do
        is_expected.to eq(-1)
      end
    end

    context 'with an equal string' do
      let(:first)  { Lobster::Uuid.new(UUID_PACKED_STRING1) }
      let(:second) { UUID_STRING1 }
      it 'is 0' do
        is_expected.to eq 0
      end
    end

    context 'with a lesser string' do
      let(:first)  { Lobster::Uuid.new(UUID_PACKED_STRING2) }
      let(:second) { UUID_STRING1 }
      it 'is 1' do
        is_expected.to eq 1
      end
    end

    context 'with a greater string' do
      let(:first)  { Lobster::Uuid.new(UUID_PACKED_STRING1) }
      let(:second) { UUID_STRING2 }
      it 'is -1' do
        is_expected.to eq(-1)
      end
    end

    context 'with an invalid string' do
      let(:first)  { Lobster::Uuid.new(UUID_PACKED_STRING2) }
      let(:second) { 'foobar' }
      it 'is nil' do
        is_expected.to be_nil
      end
    end
  end

  describe '#hash' do
    subject { Lobster::Uuid.new(UUID_PACKED_STRING1).hash }

    it 'is a Fixnum' do
      is_expected.to be_a(Fixnum)
    end

    context 'with identical UUIDs' do
      let(:first)  { Lobster::Uuid.new(UUID_PACKED_STRING1).hash }
      let(:second) { Lobster::Uuid.new(UUID_PACKED_STRING1).hash }

      it 'returns identical values' do
        expect(first).to eq(second)
      end
    end

    context 'with different UUIDs' do
      let(:first)  { Lobster::Uuid.new(UUID_PACKED_STRING1).hash }
      let(:second) { Lobster::Uuid.new(UUID_PACKED_STRING2).hash }

      it 'returns different values' do
        expect(first).to_not eq(second)
      end
    end
  end

  describe '#to_s' do
    subject { Lobster::Uuid.new(UUID_PACKED_STRING1).to_s }

    it 'is a String' do
      is_expected.to be_a String
    end

    it 'is a valid UUID string' do
      is_expected.to match(VALID_UUID_REGEX)
    end

    it 'equals the initial value' do
      is_expected.to eq(UUID_STRING1)
    end

    context 'with bytes less than 16' do
      subject { Lobster::Uuid.new("\x05\x30\x5d\x54\x75\x02\x43\x1b\xad\xb2\xeb\x6b\x9e\x54\x60\x00").to_s }

      it 'pads with zeroes' do
        is_expected.to eq('05305d54-7502-431b-adb2-eb6b9e546000')
      end
    end
  end

end


package com.asksunny.schema.parser;

import java.util.HashMap;
import java.util.Map;
import java.util.Set;

public class KeywordDictionary extends HashMap<String, Keyword> {

	/**
	 *
	 */
	private static final long serialVersionUID = 1L;

	public KeywordDictionary() {
		this.put("CREATE", Keyword.CREATE);
		this.put("TABLE", Keyword.TABLE);
		this.put("NOT", Keyword.NOT);
		this.put("NULL", Keyword.NULL);
		this.put("PRIMARY", Keyword.PRIMARY);
		this.put("KEY", Keyword.KEY);
		this.put("VARCHAR", Keyword.VARCHAR);
		this.put("NUMBER", Keyword.NUMBER);
		this.put("INT", Keyword.INT);
		this.put("BIGINT", Keyword.BIGINT);
		this.put("INTEGER", Keyword.INTEGER);
		this.put("DOUBLE", Keyword.DOUBLE);
		this.put("VARCHAR2", Keyword.VARCHAR);
		this.put("BINARY", Keyword.BINARY);
		this.put("LONG", Keyword.LONG);
		this.put("DATE", Keyword.DATE);
		this.put("TIME", Keyword.TIME);
		this.put("TIMESTAMP", Keyword.TIMESTAMP);
		this.put("ALTER", Keyword.ALTER);
		this.put("ADD", Keyword.ADD);
		this.put("CHAR", Keyword.CHAR);
		this.put("CONSTRAINT", Keyword.CONSTRAINT);
		this.put("FOREIGN", Keyword.FOREIGN);
		this.put("REFERENCES", Keyword.REFERENCES);
		this.put("UNIQUE", Keyword.UNIQUE);
		this.put("INDEX", Keyword.INDEX);
		this.put("BYTE", Keyword.BYTE);
		this.put("NOPARALLELCREATE", Keyword.CREATE);
		this.put("NOPARALLEL", Keyword.NOPARALLEL);
		this.put("PARALLEL", Keyword.PARALLEL);
		this.put("*", Keyword.ASTERISK);
		this.put("IMAGE", Keyword.IMAGE);
		this.put("TEXT", Keyword.TEXT);
		this.put("IDENTITY", Keyword.IDENTITY);
		this.put("AUTOINCREMENT", Keyword.IDENTITY);
		this.put("AUTO_INCREMENT", Keyword.IDENTITY);
		this.put("DEFAULT", Keyword.DEFAULT);
		this.put("COLUMN_FORMAT", Keyword.FORMAT);
		this.put("FORMAT", Keyword.FORMAT);
	}

	@Override
	public Keyword get(Object key) {

		return super.get(key.toString().toUpperCase());
	}

	@Override
	public Keyword put(String key, Keyword value) {
		return super.put(key.toUpperCase(), value);
	}

	@Override
	public void putAll(Map<? extends String, ? extends Keyword> m) {
		Set<? extends String> keys = m.keySet();
		for (String string : keys) {
			super.put(string.toUpperCase(), m.get(string));
		}
	}

	@Override
	public boolean containsKey(Object key) {

		return super.containsKey(key.toString().toUpperCase());
	}

}


#include "arm_math.h"

/**
 * @ingroup groupMath
 */

/**
 * @defgroup offset Vector Offset
 *
 * Adds a constant offset to each element of a vector.
 *
 * <pre>
 *     pDst[n] = pSrc[n] + offset,   0 <= n < blockSize.
 * </pre>
 *
 * There are separate functions for floating-point, Q7, Q15, and Q31 data types.
 */

/**
 * @addtogroup offset
 * @{
 */

/**
 * @brief  Adds a constant offset to a floating-point vector.
 * @param[in]  *pSrc points to the input vector
 * @param[in]  offset is the offset to be added
 * @param[out]  *pDst points to the output vector
 * @param[in]  blockSize number of samples in the vector
 * @return none.
 */

void arm_offset_f32(
  float32_t * pSrc,
  float32_t offset,
  float32_t * pDst,
  uint32_t blockSize)
{
  uint32_t blkCnt;                               /* loop counter */

#ifndef ARM_MATH_CM0

/* Run the below code for Cortex-M4 and Cortex-M3 */
  float32_t in1, in2, in3, in4;

  /*loop Unrolling */
  blkCnt = blockSize >> 2u;

  /* First part of the processing with loop unrolling.  Compute 4 outputs at a time.
   ** a second loop below computes the remaining 1 to 3 samples. */
  while(blkCnt > 0u)
  {
    /* C = A + offset */
    /* Add offset and then store the results in the destination buffer. */
    /* read samples from source */
    in1 = *pSrc;
    in2 = *(pSrc + 1);

    /* add offset to input */
    in1 = in1 + offset;

    /* read samples from source */
    in3 = *(pSrc + 2);

    /* add offset to input */
    in2 = in2 + offset;

    /* read samples from source */
    in4 = *(pSrc + 3);

    /* add offset to input */
    in3 = in3 + offset;

    /* store result to destination */
    *pDst = in1;

    /* add offset to input */
    in4 = in4 + offset;

    /* store result to destination */
    *(pDst + 1) = in2;

    /* store result to destination */
    *(pDst + 2) = in3;

    /* store result to destination */
    *(pDst + 3) = in4;

    /* update pointers to process next samples */
    pSrc += 4u;
    pDst += 4u;

    /* Decrement the loop counter */
    blkCnt--;
  }

  /* If the blockSize is not a multiple of 4, compute any remaining output samples here.
   ** No loop unrolling is used. */
  blkCnt = blockSize % 0x4u;

#else

  /* Run the below code for Cortex-M0 */

  /* Initialize blkCnt with number of samples */
  blkCnt = blockSize;

#endif /* #ifndef ARM_MATH_CM0 */

  while(blkCnt > 0u)
  {
    /* C = A + offset */
    /* Add offset and then store the result in the destination buffer. */
    *pDst++ = (*pSrc++) + offset;

    /* Decrement the loop counter */
    blkCnt--;
  }
}

/**
 * @} end of offset group
 */


package javassist.bytecode.stackmap;

import javassist.bytecode.*;
import java.util.HashMap;
import java.util.ArrayList;

/**
 * A basic block is a sequence of bytecode that does not contain jump/branch
 * instructions except at the last bytecode.
 * Since Java7 or later does not allow JSR, this class throws an exception when
 * it finds JSR.
 */
public class BasicBlock {
    static class JsrBytecode extends BadBytecode {
        JsrBytecode() { super("JSR"); }
    }

    protected int position, length;
    protected int incoming;        // the number of incoming branches.
    protected BasicBlock[] exit;   // null if the block is a leaf.
    protected boolean stop;        // true if the block ends with an unconditional jump.
    protected Catch toCatch;

    protected BasicBlock(int pos) {
        position = pos;
        length = 0;
        incoming = 0;
    }

    public static BasicBlock find(BasicBlock[] blocks, int pos)
        throws BadBytecode
    {
        for (int i = 0; i < blocks.length; i++) {
            int iPos = blocks[i].position;
            if (iPos <= pos && pos < iPos + blocks[i].length)
                return blocks[i];
        }

        throw new BadBytecode("no basic block at " + pos);
    }

    public static class Catch {
        public Catch next;
        public BasicBlock body;
        public int typeIndex;
        Catch(BasicBlock b, int i, Catch c) {
            body = b;
            typeIndex = i;
            next = c;
        }
    }

    public String toString() {
        StringBuffer sbuf = new StringBuffer();
        String cname = this.getClass().getName();
        int i = cname.lastIndexOf('.');
        sbuf.append(i < 0 ? cname : cname.substring(i + 1));
        sbuf.append("[");
        toString2(sbuf);
        sbuf.append("]");
        return sbuf.toString();
    }

    protected void toString2(StringBuffer sbuf) {
        sbuf.append("pos=").append(position).append(", len=")
            .append(length).append(", in=").append(incoming)
            .append(", exit{");
        if (exit != null) {
            for (int i = 0; i < exit.length; i++)
                sbuf.append(exit[i].position).append(",");
        }

        sbuf.append("}, {");
        Catch th = toCatch;
        while (th != null) {
            sbuf.append("(").append(th.body.position).append(", ")
                .append(th.typeIndex).append("), ");
            th = th.next;
        }

        sbuf.append("}");
    }

    static class Mark implements Comparable {
        int position;
        BasicBlock block;
        BasicBlock[] jump;
        boolean alwaysJmp;     // true if an unconditional branch.
        int size;       // 0 unless the mark indicates RETURN etc.
        Catch catcher;

        Mark(int p) {
            position = p;
            block = null;
            jump = null;
            alwaysJmp = false;
            size = 0;
            catcher = null;
        }

        public int compareTo(Object obj) {
            if (obj instanceof Mark) {
                int pos = ((Mark)obj).position;
                return position - pos;
            }

            return -1;
        }

        void setJump(BasicBlock[] bb, int s, boolean always) {
            jump = bb;
            size = s;
            alwaysJmp = always;
        }
    }

    public static class Maker {
        /* Override these two methods if a subclass of BasicBlock must be
         * instantiated.
         */
        protected BasicBlock makeBlock(int pos) {
            return new BasicBlock(pos);
        }

        protected BasicBlock[] makeArray(int size) {
            return new BasicBlock[size];
        }

        private BasicBlock[] makeArray(BasicBlock b) {
            BasicBlock[] array = makeArray(1);
            array[0] = b;
            return array;
        }

        private BasicBlock[] makeArray(BasicBlock b1, BasicBlock b2) {
            BasicBlock[] array = makeArray(2);
            array[0] = b1;
            array[1] = b2;
            return array;
        }

        public BasicBlock[] make(MethodInfo minfo) throws BadBytecode {
            CodeAttribute ca = minfo.getCodeAttribute();
            if (ca == null)
                return null;

            CodeIterator ci = ca.iterator();
            return make(ci, 0, ci.getCodeLength(), ca.getExceptionTable());
        }

        public BasicBlock[] make(CodeIterator ci, int begin, int end,
                                 ExceptionTable et)
            throws BadBytecode
        {
            HashMap marks = makeMarks(ci, begin, end, et);
            BasicBlock[] bb = makeBlocks(marks);
            addCatchers(bb, et);
            return bb;
        }

        /* Branch target
         */
        private Mark makeMark(HashMap table, int pos) {
            return makeMark0(table, pos, true, true);
        }

        /* Branch instruction.
         * size > 0
         */
        private Mark makeMark(HashMap table, int pos, BasicBlock[] jump,
                              int size, boolean always) {
            Mark m = makeMark0(table, pos, false, false);
            m.setJump(jump, size, always);
            return m;
        }

        private Mark makeMark0(HashMap table, int pos,
                               boolean isBlockBegin, boolean isTarget) {
            Integer p = new Integer(pos);
            Mark m = (Mark)table.get(p);
            if (m == null) {
                m = new Mark(pos);
                table.put(p, m);
            }

            if (isBlockBegin) {
                if (m.block == null)
                    m.block = makeBlock(pos);

                if (isTarget)
                    m.block.incoming++;
            }

            return m;
        }

        private HashMap makeMarks(CodeIterator ci, int begin, int end,
                                  ExceptionTable et)
            throws BadBytecode
        {
            ci.begin();
            ci.move(begin);
            HashMap marks = new HashMap();
            while (ci.hasNext()) {
                int index = ci.next();
                if (index >= end)
                    break;

                int op = ci.byteAt(index);
                if ((Opcode.IFEQ <= op && op <= Opcode.IF_ACMPNE)
                        || op == Opcode.IFNULL || op == Opcode.IFNONNULL) {
                    Mark to = makeMark(marks, index + ci.s16bitAt(index + 1));
                    Mark next = makeMark(marks, index + 3);
                    makeMark(marks, index, makeArray(to.block, next.block), 3, false);
                }
                else if (Opcode.GOTO <= op && op <= Opcode.LOOKUPSWITCH)
                    switch (op) {
                    case Opcode.GOTO :
                        makeGoto(marks, index, index + ci.s16bitAt(index + 1), 3);
                        break;
                    case Opcode.JSR :
                        makeJsr(marks, index, index + ci.s16bitAt(index + 1), 3);
                        break;
                    case Opcode.RET :
                        makeMark(marks, index, null, 2, true);
                        break;
                    case Opcode.TABLESWITCH : {
                        int pos = (index & ~3) + 4;
                        int low = ci.s32bitAt(pos + 4);
                        int high = ci.s32bitAt(pos + 8);
                        int ncases = high - low + 1;
                        BasicBlock[] to = makeArray(ncases + 1);
                        to[0] = makeMark(marks, index + ci.s32bitAt(pos)).block;   // default branch target
                        int p = pos + 12;
                        int n = p + ncases * 4;
                        int k = 1;
                        while (p < n) {
                            to[k++] = makeMark(marks, index + ci.s32bitAt(p)).block;
                            p += 4;
                        }
                        makeMark(marks, index, to, n - index, true);
                        break; }
                    case Opcode.LOOKUPSWITCH : {
                        int pos = (index & ~3) + 4;
                        int ncases = ci.s32bitAt(pos + 4);
                        BasicBlock[] to = makeArray(ncases + 1);
                        to[0] = makeMark(marks, index + ci.s32bitAt(pos)).block;   // default branch target
                        int p = pos + 8 + 4;
                        int n = p + ncases * 8 - 4;
                        int k = 1;
                        while (p < n) {
                            to[k++] = makeMark(marks, index + ci.s32bitAt(p)).block;
                            p += 8;
                        }
                        makeMark(marks, index, to, n - index, true);
                        break; }
                    }
                else if ((Opcode.IRETURN <= op && op <= Opcode.RETURN) || op == Opcode.ATHROW)
                    makeMark(marks, index, null, 1, true);
                else if (op == Opcode.GOTO_W)
                    makeGoto(marks, index, index + ci.s32bitAt(index + 1), 5);
                else if (op == Opcode.JSR_W)
                    makeJsr(marks, index, index + ci.s32bitAt(index + 1), 5);
                else if (op == Opcode.WIDE && ci.byteAt(index + 1) == Opcode.RET)
                    makeMark(marks, index, null, 4, true);
            }

            if (et != null) {
                int i = et.size();
                while (--i >= 0) {
                    makeMark0(marks, et.startPc(i), true, false);
                    makeMark(marks, et.handlerPc(i));
                }
            }

            return marks;
        }

        private void makeGoto(HashMap marks, int pos, int target, int size) {
            Mark to = makeMark(marks, target);
            BasicBlock[] jumps = makeArray(to.block);
            makeMark(marks, pos, jumps, size, true);
        }

        /*
         * We could ignore JSR since Java 7 or later does not allow it.
         * See The JVM Spec. Sec. 4.10.2.5.
         */
        protected void makeJsr(HashMap marks, int pos, int target, int size) throws BadBytecode {
            /*
            Mark to = makeMark(marks, target);
            Mark next = makeMark(marks, pos + size);
            BasicBlock[] jumps = makeArray(to.block, next.block);
            makeMark(marks, pos, jumps, size, false);
            */
            throw new JsrBytecode();
        }

        private BasicBlock[] makeBlocks(HashMap markTable) {
            Mark[] marks = (Mark[])markTable.values()
                                            .toArray(new Mark[markTable.size()]);
            java.util.Arrays.sort(marks);
            ArrayList blocks = new ArrayList();
            int i = 0;
            BasicBlock prev;
            if (marks.length > 0 && marks[0].position == 0 && marks[0].block != null)
                prev = getBBlock(marks[i++]);
            else
                prev = makeBlock(0);

            blocks.add(prev);
            while (i < marks.length) {
                Mark m = marks[i++];
                BasicBlock bb = getBBlock(m);
                if (bb == null) {
                    // the mark indicates a branch instruction
                    if (prev.length > 0) {
                        // the previous mark already has exits.
                        prev = makeBlock(prev.position + prev.length);
                        blocks.add(prev);
                    }

                    prev.length = m.position + m.size - prev.position;
                    prev.exit = m.jump;
                    prev.stop = m.alwaysJmp;
                }
                else {
                    // the mark indicates a branch target
                    if (prev.length == 0) {
                        prev.length = m.position - prev.position;
                        bb.incoming++;
                        prev.exit = makeArray(bb);
                    }
                    else {
                        // the previous mark already has exits.
                        int prevPos = prev.position;
                        if (prevPos + prev.length < m.position) {
                            prev = makeBlock(prevPos + prev.length);
                            prev.length = m.position - prevPos;
                            // the incoming flow from dead code is not counted
                            // bb.incoming++;
                            prev.exit = makeArray(bb);
                        }
                    }

                    blocks.add(bb);
                    prev = bb;
                }
            }

            return (BasicBlock[])blocks.toArray(makeArray(blocks.size()));
        }

        private static BasicBlock getBBlock(Mark m) {
            BasicBlock b = m.block;
            if (b != null && m.size > 0) {
                b.exit = m.jump;
                b.length = m.size;
                b.stop = m.alwaysJmp;
            }

            return b;
        }

        private void addCatchers(BasicBlock[] blocks, ExceptionTable et)
            throws BadBytecode
        {
            if (et == null)
                return;

            int i = et.size();
            while (--i >= 0) {
                BasicBlock handler = find(blocks, et.handlerPc(i));
                int start = et.startPc(i);
                int end = et.endPc(i);
                int type = et.catchType(i);
                handler.incoming--;
                for (int k = 0; k < blocks.length; k++) {
                    BasicBlock bb = blocks[k];
                    int iPos = bb.position;
                    if (start <= iPos && iPos < end) {
                        bb.toCatch = new Catch(handler, type, bb.toCatch);
                        handler.incoming++;
                    }
                }
            }
        }
    }
}


/* System calls. */
#define SEND		   1	/* function code for sending messages */
#define RECEIVE		   2	/* function code for receiving messages */
#define BOTH		   3	/* function code for SEND + RECEIVE */
#define ANY   (NR_PROCS+100)	/* receive(ANY, buf) accepts from any source */

/* Task numbers, function codes and reply codes. */

#define TTY         -NR_TASKS	/* terminal I/O class */
#	define TTY_READ	    3	/* fcn code for reading from tty */
#	define TTY_WRITE    4	/* fcn code for writing to tty */
#	define TTY_IOCTL    5	/* fcn code for ioctl */
#	define TTY_SETPGRP  6	/* fcn code for setpgrp */
#	define TTY_OPEN     7	/* fcn code for opening tty */
#	define TTY_CLOSE    8	/* fcn code for closing tty */
#	define SUSPEND	 -998	/* used in interrupts when tty has no data */

#ifdef AM_KERNEL
#define	AMOEBA
#endif

#ifdef AMOEBA

/* There are AM_NTASK copies of the amoeba kernel task.
 * If you change AM_NTASKS be sure to adjust kernel/table.c and fs/table.c
 */
#define AM_NTASKS	   4	/* number of kernel tasks of this class */

#define	AMINT_CLASS	    (TTY+1)	/* Amoeba event handler */
#define AMOEBA_CLASS 	    (AMINT_CLASS+AM_NTASKS) /* transaction handlers */
#	define ETHER_ARRIV   1	/* fcn code for packet arrival */
#	define AM_TRANS      2	/* amoeba transaction */
#	define AM_GETREQ     3	/* amoeba getrequest */
#	define AM_PUTREP     4	/* amoeba putrep */
#	define AM_REVIVE     6	/* used by kernel task to revive luser task */
#	define AM_TIMEOUT    8	/* used to talk to clock task */
#	define AM_PUTSIG     9	/* when the luser hits the DEL ! */
#	define AM_TASK_DIED 10  /* sent if task died during a transaction */

#else	/* if AMOEBA not defined */

#define	AMOEBA_CLASS	TTY

#endif /* AMOEBA */

/*
 * New class definitions should go here and should be defined relative
 * to AMOEBA_CLASS  (ie. as AMOEBA_CLASS+n, for the nth task added).
 */

#define IDLE (AMOEBA_CLASS+1)	/* task to run when there's nothing to run */

#define PRINTER           -7		/* printer  I/O class */
/* The printer uses the same commands as TTY. */

#define WINCHESTER        -6	/* winchester (hard) disk class */
#define FLOPPY            -5	/* floppy disk class */
#	define DISK_READ   3	/* fcn code to DISK (must equal TTY_READ) */
#	define DISK_WRITE  4	/* fcn code to DISK (must equal TTY_WRITE) */
#	define DISK_IOCTL  5	/* fcn code for setting up RAM disk */
#	define SCATTERED_IO 6	/* fcn code for multiple reads/writes */
#	define OPTIONAL_IO 16	/* modifier to DISK_* codes within vector */

#define MEM               -4	/* /dev/ram, /dev/(k)mem and /dev/null class */
#	define RAM_DEV     0	/* minor device for /dev/ram */
#	define MEM_DEV     1	/* minor device for /dev/mem */
#	define KMEM_DEV    2	/* minor device for /dev/kmem */
#	define NULL_DEV    3	/* minor device for /dev/null */
#if (CHIP == INTEL)
#	define PORT_DEV    4	/* minor device for /dev/port */
#endif

#define CLOCK             -3	/* clock class */
#	define SET_ALARM   1	/* fcn code to CLOCK, set up alarm */
#	define GET_TIME	   3	/* fcn code to CLOCK, get real time */
#	define SET_TIME	   4	/* fcn code to CLOCK, set real time */
#	define REAL_TIME   1	/* reply from CLOCK: here is real time */

#define SYSTASK           -2	/* internal functions */
#	define SYS_XIT     1	/* fcn code for sys_xit(parent, proc) */
#	define SYS_GETSP   2	/* fcn code for sys_sp(proc, &new_sp) */
#	define SYS_SIG     3	/* fcn code for sys_sig(proc, sig) */
#	define SYS_FORK    4	/* fcn code for sys_fork(parent, child) */
#	define SYS_NEWMAP  5	/* fcn code for sys_newmap(procno, map_ptr) */
#	define SYS_COPY    6	/* fcn code for sys_copy(ptr) */
#	define SYS_EXEC    7	/* fcn code for sys_exec(procno, new_sp) */
#	define SYS_TIMES   8	/* fcn code for sys_times(procno, bufptr) */
#	define SYS_ABORT   9	/* fcn code for sys_abort() */
#	define SYS_FRESH  10	/* fcn code for sys_fresh()  (Atari only) */
#	define SYS_KILL   11	/* fcn code for sys_kill(proc, sig) */
#	define SYS_GBOOT  12	/* fcn code for sys_gboot(procno, bootptr) */
#	define SYS_UMAP   13	/* fcn code for sys_umap(procno, etc) */
#	define SYS_MEM    14	/* fcn code for sys_mem() */
#	define SYS_TRACE  15	/* fcn code for sys_trace(req,pid,addr,data) */

#define HARDWARE          -1	/* used as source on interrupt generated msgs*/

/* Names of message fields for messages to CLOCK task. */
#define DELTA_TICKS    m6_l1	/* alarm interval in clock ticks */
#define FUNC_TO_CALL   m6_f1	/* pointer to function to call */
#define NEW_TIME       m6_l1	/* value to set clock to (SET_TIME) */
#define CLOCK_PROC_NR  m6_i1	/* which proc (or task) wants the alarm? */
#define SECONDS_LEFT   m6_l1	/* how many seconds were remaining */

/* Names of message fields used for messages to block and character tasks. */
#define DEVICE         m2_i1	/* major-minor device */
#define PROC_NR        m2_i2	/* which (proc) wants I/O? */
#define COUNT          m2_i3	/* how many bytes to transfer */
#define POSITION       m2_l1	/* file offset */
#define ADDRESS        m2_p1	/* core buffer address */

/* Names of message fields for messages to TTY task. */
#define TTY_LINE       m2_i1	/* message parameter: terminal line */
#define TTY_REQUEST    m2_i3	/* message parameter: ioctl request code */
#define TTY_SPEK       m2_l1	/* message parameter: ioctl speed, erasing */
#define TTY_FLAGS      m2_l2	/* message parameter: ioctl tty mode */
#define TTY_PGRP       m2_i3    /* message parameter: process group */

/* Names of messages fields used in reply messages from tasks. */
#define REP_PROC_NR    m2_i1	/* # of proc on whose behalf I/O was done */
#define REP_STATUS     m2_i2	/* bytes transferred or error number */

/* Names of fields for copy message to SYSTASK. */
#define SRC_SPACE      m5_c1	/* T or D space (stack is also D) */
#define SRC_PROC_NR    m5_i1	/* process to copy from */
#define SRC_BUFFER     m5_l1	/* virtual address where data come from */
#define DST_SPACE      m5_c2	/* T or D space (stack is also D) */
#define DST_PROC_NR    m5_i2	/* process to copy to */
#define DST_BUFFER     m5_l2	/* virtual address where data go to */
#define COPY_BYTES     m5_l3	/* number of bytes to copy */

/* Field names for accounting, SYSTASK and miscellaneous. */
#define USER_TIME      m4_l1	/* user time consumed by process */
#define SYSTEM_TIME    m4_l2	/* system time consumed by process */
#define CHILD_UTIME    m4_l3	/* user time consumed by process' children */
#define CHILD_STIME    m4_l4	/* sys time consumed by process' children */

#define PROC1          m1_i1	/* indicates a process */
#define PROC2          m1_i2	/* indicates a process */
#define PID            m1_i3	/* process id passed from MM to kernel */
#define STACK_PTR      m1_p1	/* used for stack ptr in sys_exec, sys_getsp */
#define PR             m6_i1	/* process number for sys_sig */
#define SIGNUM         m6_i2	/* signal number for sys_sig */
#define FUNC           m6_f1	/* function pointer for sys_sig */
#define MEM_PTR        m1_p1	/* tells where memory map is for sys_newmap */
#define CANCEL             0    /* general request to force a task to cancel */
#define SIG_MAP        m1_i2	/* used by kernel for passing signal bit map */

#ifdef AMOEBA

/* Names of message fields for amoeba tasks */
#define	AM_OP		m2_i1	/* one of the above operators */
#define	AM_PROC_NR	m2_i2	/* process # of proc doing operation */
#define	AM_COUNT	m2_i3	/* size of buffer for operation */
#define	AM_ADDRESS	m2_p1	/* address of buffer for operation */

/* For communication between MM and AMOEBA_CLASS kernel tasks */
#define	AM_STATUS	m2_i3	/* same use as REP_STATUS but for amoeba */
#define	AM_FREE_IT	m2_l1	/* 1=not a getreq, 0=is a getreq */

/* Special for passing a physical address from the ethernet driver */
#define	AM_PADDR	m2_l1	/* to the transaction layer */

#endif /* AMOEBA */

#define HARD_INT           2	/* fcn code for all hardware interrupts */


<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
    <item android:color="@color/colorAccent">
        <shape android:shape="rectangle">
            <corners android:radius="4dp"/>
            <solid android:color="@android:color/white"/>
        </shape>
    </item>
</selector>


#region Mr. Advice MVVM
// // Mr. Advice MVVM
// // A simple MVVM package using Mr. Advice aspect weaver
// // https://github.com/ArxOne/MrAdvice.MVVM
// // Released under MIT license http://opensource.org/licenses/mit-license.php
#endregion

namespace ArxOne.MrAdvice.MVVM.Properties
{
    /// <summary>
    /// Marks a simple auto property to be bound to a DependencyProperty
    /// Note: use <see cref="Dependency"/>, this class will be deprecated soon
    /// </summary>
    public class DependencyProperty : Dependency
    {
    }
}