text:
<?xml version="1.0" encoding="utf-8"?>
<!--

-->
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.antew.redditinpictures.pro">

    <application
        android:icon="@drawable/ic_launcher"
        android:name="com.antew.redditinpictures.library.RedditInPicturesApplication" />

</manifest>

redpajama_set_name: RedPajamaGithub


text:
use warnings;
use strict;
use feature qw/switch say/;

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

use Term::ReadKey qw/ReadMode ReadKey/;
use File::Temp qw/tempfile/;
use POSIX qw/ctermid/;

my $SVN = $ENV{SVN} || 'svn'; # passed unquoted to sh
my $VIM = 'vim';
my $STATUS = './STATUS';
my $BRANCHES = '^/subversion/branches';

my $YES = $ENV{YES}; # batch mode: eliminate prompts, add sleeps
my $WET_RUN = qw[false true][1]; # don't commit
my $DEBUG = qw[false true][0]; # 'set -x', etc

# derived values
my $SVNq;

$SVN .= " --non-interactive" if $YES or not defined ctermid;
$SVNq = "$SVN -q ";
$SVNq =~ s/-q// if $DEBUG eq 'true';

sub usage {
  my $basename = $0;
  $basename =~ s#.*/##;
  print <<EOF;
Run this from the root of your release branch (e.g., 1.6.x) working copy.

For each entry in STATUS, you will be prompted whether to merge it.

WARNING:
If you accept the prompt, $basename will revert all local changes and will
commit the merge immediately.

The 'svn' binary defined by the environment variable \$SVN, or otherwise the
'svn' found in \$PATH, will be used to manage the working copy.
EOF
}

sub prompt {
  local $\; # disable 'perl -l' effects
  print "Go ahead? ";

  # TODO: this part was written by trial-and-error
  ReadMode 'cbreak';
  my $answer = (ReadKey 0);
  print $answer, "\n";
  return ($answer =~ /^y/i) ? 1 : 0;
}

sub merge {
  my %entry = @_;

  my ($logmsg_fh, $logmsg_filename) = tempfile();
  my ($mergeargs, $pattern);

  my $backupfile = "backport_pl.$$.tmp";

  if ($entry{branch}) {
    # NOTE: This doesn't escape the branch into the pattern.
    $pattern = sprintf '\V\(%s branch(es)?\|branches\/%s\|Branch(es)?:\n *%s\)', $entry{branch}, $entry{branch}, $entry{branch};
    $mergeargs = "--reintegrate $BRANCHES/$entry{branch}";
    print $logmsg_fh "Reintegrate the $entry{header}:";
    print $logmsg_fh "";
  } elsif (@{$entry{revisions}}) {
    $pattern = '^ [*] \V' . 'r' . $entry{revisions}->[0];
    $mergeargs = join " ", (map { "-c$_" } @{$entry{revisions}}), '^/subversion/trunk';
    if (@{$entry{revisions}} > 1) {
      print $logmsg_fh "Merge the $entry{header} from trunk:";
      print $logmsg_fh "";
    } else {
      print $logmsg_fh "Merge r$entry{revisions}->[0] from trunk:";
      print $logmsg_fh "";
    }
  } else {
    die "Don't know how to call $entry{header}";
  }
  print $logmsg_fh $_ for @{$entry{entry}};
  close $logmsg_fh or die "Can't close $logmsg_filename: $!";

  my $script = <<"EOF";
#!/bin/sh
set -e
if $DEBUG; then
  set -x
fi
$SVN diff > $backupfile
$SVNq revert -R .
$SVNq up
$SVNq merge $mergeargs
$VIM -e -s -n -N -i NONE -u NONE -c '/$pattern/normal! dap' -c wq $STATUS
if $WET_RUN; then
  if [ -n "\$PRINT_SOMETHING_BETWEEN_PROMPTS" ]; then
    # hack for pw-driver.pl to see some output between prompts
    head -n1 $logmsg_filename
  fi
  $SVNq commit -F $logmsg_filename
else
  echo "Committing:"
  $SVN status -q
  cat $logmsg_filename
fi
EOF

  $script .= <<"EOF" if $entry{branch};
reinteg_rev=\`$SVN info $STATUS | sed -ne 's/Last Changed Rev: //p'\`
if $WET_RUN; then
  # Sleep to avoid out-of-order commit notifications
  if [ -n "$YES" ]; then sleep 15; fi
  $SVNq rm $BRANCHES/$entry{branch} -m "Remove the '$entry{branch}' branch, reintegrated in r\$reinteg_rev."
  if [ -n "$YES" ]; then sleep 1; fi
else
  echo "Removing reintegrated '$entry{branch}' branch"
fi
EOF

  open SHELL, '|-', qw#/bin/sh# or die $!;
  print SHELL $script;
  close SHELL or warn "$0: sh($?): $!";

  unlink $backupfile if -z $backupfile;
  unlink $logmsg_filename unless $? or $!;
}

sub sanitize_branch {
  local $_ = shift;
  s#.*/##;
  s/^\s*//;
  s/\s*$//;
  return $_;
}

# TODO: may need to parse other headers too?
sub parse_entry {
  my @lines = @_;
  my (@revisions, @logsummary, $branch, @votes);
  # @lines = @_;

  # strip first three spaces
  $_[0] =~ s/^ \* /   /;
  s/^   // for @_;

  # revisions
  $branch = sanitize_branch $1 if $_[0] =~ /^(\S*) branch$/;
  while ($_[0] =~ /^r/) {
    while ($_[0] =~ s/^r(\d+)(?:$|[,; ]+)//) {
      push @revisions, $1;
    }
    shift;
  }

  # summary
  push @logsummary, shift until $_[0] =~ /^\s*\w+:/ or not defined $_[0];

  # votes
  unshift @votes, pop until $_[-1] =~ /^\s*Votes:/ or not defined $_[-1];
  pop;

  # branch
  while (@_) {
    shift and next unless $_[0] =~ s/^\s*Branch(es)?:\s*//;
    $branch = sanitize_branch (shift || shift || die "Branch header found without value");
  }

  # Compute a header.
  my $header;
  $header = "r$revisions[0] group" if @revisions;
  $header = "$branch branch" if $branch;
  warn "No header for [@lines]" unless $header;

  return (
    revisions => [@revisions],
    logsummary => [@logsummary],
    branch => $branch,
    header => $header,
    votes => [@votes],
    entry => [@lines],
  );
}

sub handle_entry {
  my %entry = parse_entry @_;
  my @vetoes = grep { /^  -1:/ } @{$entry{votes}};

  if ($YES) {
    merge %entry unless @vetoes;
  } else {
    print "";
    print "\n>>> The $entry{header}:";
    print join ", ", map { "r$_" } @{$entry{revisions}};
    print "$BRANCHES/$entry{branch}" if $entry{branch};
    print "";
    print for @{$entry{logsummary}};
    print "";
    print for @{$entry{votes}};
    print "";
    print "Vetoes found!" if @vetoes;

    merge %entry if prompt;
  }

  # TODO: merge() changes ./STATUS, which we're reading below, but
  #       on my system the loop in main() doesn't seem to care.

  1;
}

sub main {
  usage, exit 0 if @ARGV;
  usage, exit 1 unless -r $STATUS;

  @ARGV = $STATUS;

  # Skip most of the file
  while (<>) {
    last if /^Approved changes/;
  }
  while (<>) {
    last unless /^=+$/;
  }
  $/ = ""; # paragraph mode

  while (<>) {
    my @lines = split /\n/;

    given ($lines[0]) {
      # Section header
      when (/^[A-Z].*:$/i) {
        print "\n\n=== $lines[0]" unless $YES;
      }
      # Separator after section header
      when (/^=+$/i) {
        break;
      }
      # Backport entry?
      when (/^ \*/) {
        handle_entry @lines;
      }
      default {
        warn "Unknown entry '$lines[0]' at $ARGV:$.\n";
      }
    }
  }
}

&main


text:
#ifndef CORE_DATATYPES_VFIELD_H
#define CORE_DATATYPES_VFIELD_H 1

#include <Core/Datatypes/Legacy/Field/VMesh.h>
#include <Core/Datatypes/Legacy/Field/VFData.h>
#include <Core/Datatypes/Legacy/Base/PropertyManager.h>

#include <Core/Datatypes/Legacy/Field/share.h>

namespace SCIRun {

// Define a handle to the virtual interface

class SCISHARE VField {
/// The FieldTypeInformation call introduces functions to check type of the field
/// Like is_pointcloudmesh() is_lineardata() is_vector() etc.
/// Check FieldInformation.h for a full list

public:

  VField() :
    field_(nullptr),
    mesh_(nullptr),
    pm_(nullptr),
    vmesh_(nullptr),
    vfdata_(nullptr),
    basis_order_(0),
    number_of_nodes_(0),
    number_of_enodes_(0),
    element_dim_(0),
    element_dofs_(0),
    is_scalar_(false),
    is_pair_(false),
    is_vector_(false),
    is_tensor_(false)
  {
    DEBUG_CONSTRUCTOR("VField")
  }

  virtual ~VField()
  {
    DEBUG_DESTRUCTOR("VField")
  }

  /// Import a couple of useful typedefs from VMesh
  typedef VMesh::index_type           index_type;
  typedef VMesh::size_type            size_type;
  typedef VMesh::coords_type          coords_type;
  typedef VMesh::weight_type          weight_type;

  typedef VMesh::index_array_type     index_array_type;
  typedef VMesh::weight_array_type    weight_array_type;
  typedef VMesh::dimension_type       dimension_type;

  /// mesh() and vmesh() get the handle to the mesh and its virtual interface
  inline MeshHandle mesh()  { return (MeshHandle(mesh_)); }
  inline VMesh*     vmesh() { return (vmesh_); }

  /// get a handle to the field
  inline FieldHandle field() { return (FieldHandle(field_)); }
  /// for completeness get a pointer to itself
  inline VField* vfield() { return (this); }

  /// Get the basis_order of the field data, -1 = nodata, 0 = constant, 1 = linear
  /// 2 = quadratic 3 = cubic
  inline int basis_order() { return (basis_order_); }

  /// get the number of values in the field (data at corner nodes of the elements)
  inline VMesh::size_type num_values() { return (vfdata_->fdata_size()); }
  /// get the number of edge values in the field (for quadratic approximation)
  inline VMesh::size_type num_evalues() { return (vfdata_->efdata_size()); }

  /// resize the data fields to match the number of nodes/edges in the mesh
  inline void resize_fdata()
  {
    if (basis_order_ == -1)
    {
      VMesh::dimension_type dim;
      dim.resize(1); dim[0] = 0;
      vfdata_->resize_fdata(dim);
      // do nothing
    }
    else if (basis_order_ == 0)
    {
      VMesh::dimension_type dim;
      vmesh_->get_elem_dimensions(dim);
      vfdata_->resize_fdata(dim);
    }
    else if (basis_order_ == 1)
    {
      VMesh::dimension_type dim;
      vmesh_->get_dimensions(dim);
      vfdata_->resize_fdata(dim);
    }
    else if (basis_order_ == 2)
    {
      VMesh::dimension_type dim;
      vmesh_->get_dimensions(dim);
      vfdata_->resize_fdata(dim);
      vfdata_->resize_efdata(dim);
    }
  }

  /// same function but now uses the systematic naming
  /// (resize_fdata is the old call, SCIRun was using)
  inline void resize_values() { resize_fdata(); }

  inline void get_values_dimension(dimension_type& dims)
  {
    if (basis_order_ == -1) { dims.clear(); }
    else if (basis_order_ == 0) { vmesh_->get_elem_dimensions(dims); }
    else { vmesh_->get_dimensions(dims); }
  }

  inline bool get_center(Core::Geometry::Point& p, index_type idx)
  {
    if (basis_order_ == -1) return (false);
    if (basis_order_ == 0)
    {
      vmesh_->get_center(p,VMesh::Elem::index_type(idx));
      return (true);
    }
    else
    {
      vmesh_->get_center(p,VMesh::Node::index_type(idx));
      return (true);
    }
  }

  /// Get values from field (different varieties for different index types)
  /// Unlike the direct interface, we do not check index_type here
  /// all calls are rerouted to the same function call

  /// NOTE THE FOLLOWING TEMPLATES WILL COMPILE
  /// Template T can be of the following types:
  /// char, unsigned char, short, unsigned short, int, unsigned int, long,
  /// unsigned long, long long, unsigned long long, float, double,
  /// Vector, and Tensor

  template<class T> inline void get_value(T& val, index_type idx) const
  { vfdata_->get_value(val,idx); }
  /// evalue stands for edge value used in quadratic approximation, the latter
  /// can be accessed using direct indices or ENode::index_type
  template<class T> inline void get_evalue(T& val, index_type idx) const
  { vfdata_->get_evalue(val,idx); }
  template<class T>  inline void get_value(T& val, VMesh::Node::index_type idx) const
  { vfdata_->get_value(val,static_cast<VMesh::index_type>(idx)); }
  template<class T>  inline void get_value(T& val, VMesh::Edge::index_type idx) const
  { vfdata_->get_value(val,static_cast<VMesh::index_type>(idx)); }
  template<class T>  inline void get_value(T& val, VMesh::Face::index_type idx) const
  { vfdata_->get_value(val,static_cast<VMesh::index_type>(idx)); }
  template<class T>  inline void get_value(T& val, VMesh::Cell::index_type idx) const
  { vfdata_->get_value(val,static_cast<VMesh::index_type>(idx)); }
  template<class T>  inline void get_value(T& val, VMesh::Elem::index_type idx) const
  { vfdata_->get_value(val,static_cast<VMesh::index_type>(idx)); }
  template<class T>  inline void get_value(T& val, VMesh::DElem::index_type idx) const
  { vfdata_->get_value(val,static_cast<VMesh::index_type>(idx)); }
  template<class T>  inline void get_value(T& val, VMesh::ENode::index_type idx) const
  { vfdata_->get_evalue(val,static_cast<VMesh::index_type>(idx)); }

  /// Ensure compatibility with old field class, these are equivalent with get_value()
  /// unlike the direct interface we do not use ASSERTs to check bounds and this function
  /// calls are thus exactly the same. They are provided for compatibility with the old
  /// classes
  template<class T> inline bool value(T& val, index_type idx) const
  { vfdata_->get_value(val,idx); return (true); }
  template<class T>  inline bool value(T& val, VMesh::Node::index_type idx) const
  { vfdata_->get_value(val,static_cast<VMesh::index_type>(idx));return (true); }
  template<class T>  inline bool value(T& val, VMesh::Edge::index_type idx) const
  { vfdata_->get_value(val,static_cast<VMesh::index_type>(idx));return (true); }
  template<class T>  inline bool value(T& val, VMesh::Face::index_type idx) const
  { vfdata_->get_value(val,static_cast<VMesh::index_type>(idx));return (true); }
  template<class T>  inline bool value(T& val, VMesh::Cell::index_type idx) const
  { vfdata_->get_value(val,static_cast<VMesh::index_type>(idx));return (true); }
  template<class T>  inline bool value(T& val, VMesh::Elem::index_type idx) const
  { vfdata_->get_value(val,static_cast<VMesh::index_type>(idx));return (true); }
  template<class T>  inline bool value(T& val, VMesh::DElem::index_type idx) const
  { vfdata_->get_value(val,static_cast<VMesh::index_type>(idx));return (true); }

  /// Functions for getting a weighted value
  template<class T> inline void get_weighted_value(T& val, const index_type* idx, const weight_type* w, size_type sz) const
  { vfdata_->get_weighted_value(val,idx,w,sz); }
  template<class T> inline void get_weighted_value(T& val, index_array_type idx, weight_array_type w) const
  { vfdata_->get_weighted_value(val,&(idx[0]),&(w[0]),idx.size()); }
  template<class T> inline void get_weighted_evalue(T& val, const index_type* idx, const weight_type* w, size_type sz) const
  { vfdata_->get_weighted_evalue(val,idx,w,sz); }
  template<class T> inline void get_weighted_evalue(T& val, index_array_type idx, weight_array_type w) const
  { vfdata_->get_weighted_value(val,&(idx[0]),&(w[0]),idx.size()); }

  /// Insert values into field, for every get_value there is an equivalent set_value
  /// likewise get_evalue is replaced by set set_evalue
  template<class T> inline void set_value(const T& val, index_type idx)
  { vfdata_->set_value(val,idx); }
  template<class T> inline void set_evalue(const T& val, index_type idx)
  { vfdata_->set_evalue(val,idx); }
  template<class T>  inline void set_value(const T& val, VMesh::Node::index_type idx)
  { vfdata_->set_value(val,static_cast<VMesh::index_type>(idx)); }
  template<class T>  inline void set_value(const T& val, VMesh::Edge::index_type idx)
  { vfdata_->set_value(val,static_cast<VMesh::index_type>(idx)); }
  template<class T>  inline void set_value(const T& val, VMesh::Face::index_type idx)
  { vfdata_->set_value(val,static_cast<VMesh::index_type>(idx)); }
  template<class T>  inline void set_value(const T& val, VMesh::Cell::index_type idx)
  { vfdata_->set_value(val,static_cast<VMesh::index_type>(idx)); }
  template<class T>  inline void set_value(const T& val, VMesh::Elem::index_type idx)
  { vfdata_->set_value(val,static_cast<VMesh::index_type>(idx)); }
  template<class T>  inline void set_value(const T& val, VMesh::DElem::index_type idx)
  { vfdata_->set_value(val,static_cast<VMesh::index_type>(idx)); }
  template<class T>  inline void set_value(const T& val, VMesh::ENode::index_type idx)
  { vfdata_->set_evalue(val,static_cast<VMesh::index_type>(idx)); }

  /// Get/Set all values at once
  template<class T> inline void set_values(const std::vector<T>& values)
  { if (!values.empty()) vfdata_->set_values(&(values[0]),values.size(),0); }
  template<class T> inline void set_values(const T* data, size_type sz, index_type offset = 0)
  { vfdata_->set_values(data,sz,offset); }
  template<class T> inline void get_values(std::vector<T>& values) const
  { values.resize(vfdata_->fdata_size()); if (values.size()) vfdata_->get_values(&(values[0]),values.size(),0); }
  template<class T> inline void get_values(T* data, size_type sz, index_type offset = 0) const
  { vfdata_->get_values(data,sz,offset); }

  // Set/Get values per element array or node array
  template<class T> inline void set_values(const std::vector<T>& values, VMesh::Node::array_type nodes)
  { if (values.size() > 0) vfdata_->set_values(&(values[0]),nodes); }
  template<class T> inline void set_values(const std::vector<T>& values, VMesh::Elem::array_type elems)
  { if (values.size() > 0) vfdata_->set_values(&(values[0]),elems); }
  template<class T,class ARRAY> inline void set_values(const std::vector<T>& values, ARRAY& idx)
  { if (values.size() > 0) vfdata_->set_values(&(values[0]),&(idx[0]),static_cast<size_type>(idx.size())); }
  template<class T> inline void set_values(const T* values, VMesh::Node::array_type nodes)
  { vfdata_->set_values(values,nodes); }
  template<class T> inline void set_values(const T* values, VMesh::Elem::array_type elems)
  { vfdata_->set_values(values,elems); }
  template<class T,class ARRAY> inline void set_values(const T* values, ARRAY& idx)
  { vfdata_->set_values(values,&(idx[0]),static_cast<size_type>(idx.size())); }

  template<class T> inline void get_values(std::vector<T>& values, VMesh::Node::array_type nodes) const
  { values.resize(nodes.size()); if (values.size() > 0) vfdata_->get_values(&(values[0]),nodes); }
  template<class T> inline void get_values(std::vector<T>& values, VMesh::Elem::array_type elems) const
  { values.resize(elems.size()); if (values.size() > 0) vfdata_->get_values(&(values[0]),elems); }
  template<class T,class ARRAY> inline void get_values(std::vector<T>& values, ARRAY& idx) const
  { values.resize(idx.size()); if (values.size() > 0) vfdata_->get_values(&(values[0]),&(idx[0]),idx.size()); }
  template<class T> inline void get_values(T* values, VMesh::Node::array_type nodes) const
  { vfdata_->get_values(values,nodes); }
  template<class T> inline void get_values(T* values, VMesh::Elem::array_type elems) const
  { vfdata_->get_values(values,elems); }
  template<class T,class ARRAY> inline void get_values(T* values, ARRAY& idx) const
  { vfdata_->get_values(values,&(idx[0]),idx.size()); }

  /// Set all values to a specific value
  template<class T> inline void set_all_values(const T& val)
  { vfdata_->set_all_values(val); }

  /// Functions for getting a weighted value
  template<class INDEX> inline void copy_weighted_value(VField* field, const index_type* idx, const weight_type* w, size_type sz, INDEX i) const
  { vfdata_->copy_weighted_value(field->vfdata_,idx,w,sz,index_type(i)); }
  template<class INDEX, class ARRAY> inline void copy_weighted_value(VField* field, ARRAY idx, weight_array_type w, INDEX i) const
  { vfdata_->copy_weighted_value(field->vfdata_,&(idx[0]),&(w[0]),idx.size(),index_type(i)); }
  template<class INDEX> inline void copy_weighted_evalue(VField* field, const index_type* idx, const weight_type* w, size_type sz, INDEX i) const
  { vfdata_->copy_weighted_evalue(field->vfdata_,idx,w,sz,index_type(i)); }
  template<class INDEX, class ARRAY> inline void copy_weighted_evalue(VField* field, ARRAY idx, weight_array_type w, INDEX i) const
  { vfdata_->copy_weighted_value(field->vfdata_,&(idx[0]),&(w[0]),idx.size(),index_type(i)); }

  /// Set all values to zero or its equivalent, all none double data will be casted
  /// to the proper value automatically. This way we do not need an additional
  /// virtual function call
  inline void clear_all_values()
  { vfdata_->set_all_values(static_cast<double>(0)); }

  /// The following cases are more specialized cases for copying entiry sets of
  /// data. These functions need to know the size of the inserted data as they
  /// perform a safety check on the length of the fdata array.
  template<class T> inline void set_evalues(const std::vector<T>& values)
  { vfdata_->set_evalues(&(values[0]),values.size(),0); }
  template<class T> inline void set_evalues(const T* data, size_type sz, index_type offset=0)
  { vfdata_->set_evalues(data,sz,offset); }

  template<class T> inline void get_evalues(std::vector<T>& values) const
  {
    values.resize(vfdata_->efdata_size());
    if (values.size())
      vfdata_->get_evalues(&(values[0]),values.size(),0);
  }
  template<class T> inline void get_evalues(T* data, size_type sz, index_type offset = 0) const
  { vfdata_->get_evalues(data,sz,offset); }

  /// Copy a value from one vfdata container to another, without having to know
  /// its type. Often for geometric operations one only has to copy the data.
  /// in tota this function will do to virtual function calls to move data from
  /// one container to the next. It however does direct casting between types.
  /// call these functions from the destination field to import data from another field
  template<class INDEX1, class INDEX2>
  inline void copy_value(VField* field, INDEX1 idx1, INDEX2 idx2)
  {
    vfdata_->copy_value(field->vfdata_,index_type(idx1),index_type(idx2));
  }

  /// Same for edge values
  template<class INDEX1, class INDEX2>
  inline void copy_evalue(VField* field, INDEX1 idx1, INDEX2 idx2)
  {
    vfdata_->copy_evalue(field->vfdata_,index_type(idx1),index_type(idx2));
  }

  template<class INDEX1, class INDEX2>
  inline void copy_values(VField* field, INDEX1 idx1, INDEX2 idx2, size_type sz)
  {
    if (sz > 0)
      vfdata_->copy_values(field->vfdata_,index_type(idx1),index_type(idx2),sz);
  }

  /// Same for edge values
  template<class INDEX1, class INDEX2>
  inline void copy_evalues(VField* field, INDEX1 idx1, INDEX2 idx2, size_type sz)
  {
    if (sz > 0)
      vfdata_->copy_evalues(field->vfdata_,index_type(idx1),index_type(idx2),sz);
  }

  /// Copy all the values from one container to another container
  /// call these functions from the destination field to import data from another field
  inline void copy_values(VField* field)
  { vfdata_->copy_values(field->vfdata_); }

  inline void copy_evalues(VField* field)
  { vfdata_->copy_evalues(field->vfdata_); }

  /// Maximum and minimum of values (with index to see where maximum is located)
  inline bool min(double& mn,index_type& idx)
  { mn = 0.0; return(vfdata_->min(mn,idx)); }

  inline bool min(double& mn)
  { mn = 0.0; index_type idx; return(vfdata_->min(mn,idx)); }

  inline bool max(double& mx,index_type& idx) const
  { mx = 0.0; return(vfdata_->max(mx,idx)); }
  inline bool max(double& mx) const
  { index_type idx; mx =0.0; return(vfdata_->max(mx,idx)); }

  /// Combined min max for efficiency
  inline bool minmax(double& mn, index_type& idxmn,
                     double& mx, index_type idxmx) const
  {
    mn = 0.0;
    mx = 0.0;
    return(vfdata_->minmax(mn,idxmn,mx,idxmx));
  }

  /// version of minmax without indices
  inline bool minmax(double& mn, double& mx) const
  {
    index_type idxmn;
    index_type idxmx;
    mn = 0.0;
    mx = 0.0;
    return(vfdata_->minmax(mn,idxmn,mx,idxmx));
  }

  inline void size(VMesh::Node::size_type& sz) { sz = number_of_nodes_; }
  inline void size(VMesh::ENode::size_type& sz) { sz = number_of_enodes_; }

  /// dimensions of the element 0 .. 3
  inline int dimension() { return(element_dim_); }
  /// number of degree of freedoms in each element type in the mesh
  inline int dofs() { return(element_dofs_); }

  /// NOTE FOR INTERPOLATE AND GRADIENT
  /// Interpolate and Gradient functions are only available for the following
  /// datatypes: double, Vector, and Tensor

  /// General interpolation function. This function does at most two virtual
  /// function calls per call. It first will retrieve proper interpolation
  /// weights from the mesh and then will apply it to the data inside the
  /// data container. All objects needed for interpolation are reserved on
  /// the stack for efficiency.
  /// Note that different data orders have different implementations as non linear
  /// interpolation requires far more data, these are handled in separate classes

  template<class ARRAY, class DATA>
  inline void minterpolate(ARRAY& val,
                           const VMesh::coords_array_type &coords,
                           VMesh::index_type idx,
                           DATA def_value) const
  {
    VMesh::MultiElemInterpolate ei;
    vmesh_->get_minterpolate_weights(coords,idx,ei,basis_order_);
    vfdata_->minterpolate(val,ei, static_cast<typename ARRAY::value_type>(def_value));
  }

  template<class ARRAY>
  inline void minterpolate(ARRAY& val,
                           const VMesh::coords_array_type &coords,
                           VMesh::index_type idx) const
  {
    VMesh::MultiElemInterpolate ei;
    vmesh_->get_minterpolate_weights(coords,idx,ei,basis_order_);
    vfdata_->minterpolate(val,ei, typename ARRAY::value_type(0));
  }

  template<class T>
  inline void interpolate(T& val,
                          const  VMesh::coords_type &coords,
                          VMesh::index_type idx,
                          T def_value = (static_cast<T>(0))) const
  {
    VMesh::ElemInterpolate ei;
    vmesh_->get_interpolate_weights(coords,idx,ei,basis_order_);
    vfdata_->interpolate(val,ei,def_value);
  }

  template<class ARRAY, class DATA>
  inline void minterpolate(ARRAY& val,
                           const std::vector<Core::Geometry::Point>& points,
                           DATA def_value = (static_cast<DATA>(0))) const
  {
    VMesh::MultiElemInterpolate ei;
    vmesh_->get_minterpolate_weights(points,ei,basis_order_);
    vfdata_->minterpolate(val,ei, static_cast<typename ARRAY::value_type>(def_value));
  }

  template<class ARRAY, class DATA>
  inline void minterpolate(ARRAY& val,
                           const std::vector<Core::Geometry::Point>& points,
                           DATA def_value,
                           VMesh::MultiElemInterpolate& ei) const
  {
    vmesh_->get_minterpolate_weights(points,ei,basis_order_);
    vfdata_->minterpolate(val,ei, static_cast<typename ARRAY::value_type>(def_value));
  }

  template<class T>
  inline bool interpolate(T& val,const  Core::Geometry::Point& point, T def_value = (static_cast<T>(0))) const
  {
    VMesh::ElemInterpolate ei;
    vmesh_->get_interpolate_weights(point,ei,basis_order_);

    if (ei.elem_index >= 0)
    {
      vfdata_->interpolate(val,ei,def_value);
      return (true);
    }
    val = def_value;
    return (false);
  }

  template<class T>
  inline bool interpolate(T& val,const  Core::Geometry::Point& point,
                          T def_value, VMesh::ElemInterpolate& ei) const
  {
    vmesh_->get_interpolate_weights(point,ei,basis_order_);
    if (ei.elem_index >= 0)
    {
      vfdata_->interpolate(val,ei,def_value);
      return (true);
    }
    val = def_value;
    return (false);
  }

  inline void interpolate(Core::Geometry::Point& val,const  VMesh::coords_type &coords, VMesh::index_type idx) const
  {
    vmesh_->interpolate(val,coords,idx);
  }

  // inline conversion using other index types.
  template<class T>  inline void interpolate(T& val, const VMesh::coords_type &coords, VMesh::Edge::index_type idx) const
  { interpolate(val, coords, static_cast<VMesh::index_type>(idx)); }
  template<class T>  inline void interpolate(T& val, const VMesh::coords_type &coords, VMesh::Face::index_type idx) const
  { interpolate(val, coords, static_cast<VMesh::index_type>(idx)); }
  template<class T>  inline void interpolate(T& val, const VMesh::coords_type &coords, VMesh::Cell::index_type idx) const
  { interpolate(val, coords, static_cast<VMesh::index_type>(idx)); }
  template<class T>  inline void interpolate(T& val, const VMesh::coords_type &coords, VMesh::Elem::index_type idx) const
  { interpolate(val, coords, static_cast<VMesh::index_type>(idx)); }
  template<class T>  inline void interpolate(T& val, const VMesh::coords_type &coords, VMesh::DElem::index_type idx) const
  { interpolate(val, coords, static_cast<VMesh::index_type>(idx)); }

  template<class ARRAY> inline void minterpolate(ARRAY& val, const  VMesh::coords_array_type &coords, VMesh::Edge::index_type idx) const
  { minterpolate(val, coords, static_cast<VMesh::index_type>(idx)); }
  template<class ARRAY> inline void minterpolate(ARRAY& val, const  VMesh::coords_array_type &coords, VMesh::Face::index_type idx) const
  { minterpolate(val, coords, static_cast<VMesh::index_type>(idx)); }
  template<class ARRAY> inline void minterpolate(ARRAY& val, const  VMesh::coords_array_type &coords, VMesh::Cell::index_type idx) const
  { minterpolate(val, coords, static_cast<VMesh::index_type>(idx)); }
  template<class ARRAY> inline void minterpolate(ARRAY& val, const  VMesh::coords_array_type &coords, VMesh::Elem::index_type idx) const
  { minterpolate(val, coords, static_cast<VMesh::index_type>(idx)); }
  template<class ARRAY> inline void minterpolate(ARRAY& val, const  VMesh::coords_array_type &coords, VMesh::DElem::index_type idx) const
  { minterpolate(val, coords, static_cast<VMesh::index_type>(idx)); }

  /// Similar to interpolation, but now this one derives the first derivative of
  /// the field (i.e. the gradient). Again the implementation is similar to the
  /// implementation of interpolate
  template<class T>  inline void gradient(StackVector<T,3>& val, const VMesh::coords_type &coords, VMesh::index_type idx,T def_value = (static_cast<T>(0))) const
  {
    VMesh::ElemGradient eg;
    vmesh_->get_gradient_weights(coords,idx,eg,basis_order_);
    vfdata_->gradient(val,eg,def_value);
  }

  template<class T>  inline void mgradient(std::vector<StackVector<T,3> >& val, const VMesh::coords_array_type &coords, VMesh::index_type idx,T def_value = (static_cast<T>(0))) const
  {
    VMesh::MultiElemGradient eg;
    vmesh_->get_mgradient_weights(coords,idx,eg,basis_order_);
    vfdata_->mgradient(val,eg,def_value);
  }

  template<class T>  inline bool gradient(StackVector<T,3>& val, const Core::Geometry::Point& point,T def_value = (static_cast<T>(0))) const
  {
    VMesh::ElemGradient eg;
    vmesh_->get_gradient_weights(point,eg,basis_order_);
    if (eg.elem_index >= 0)
    {
      vfdata_->gradient(val,eg,def_value);
      return (true);
    }
    val[0] = def_value;
    val[1] = def_value;
    val[2] = def_value;
    return (false);
  }

  template<class T>  inline bool gradient(StackVector<T,3>& val, const Core::Geometry::Point& point,T def_value,VMesh::ElemGradient& eg) const
  {
    vmesh_->get_gradient_weights(point,eg,basis_order_);
    if (eg.elem_index >= 0)
    {
      vfdata_->gradient(val,eg,def_value);
      return (true);
    }
    val[0] = def_value;
    val[1] = def_value;
    val[2] = def_value;
    return (false);
  }

  template<class T>  inline void mgradient(std::vector<StackVector<T,3> >& val, const std::vector<Core::Geometry::Point>& points,T def_value = (static_cast<T>(0))) const
  {
    VMesh::MultiElemGradient eg;
    vmesh_->get_mgradient_weights(points,eg,basis_order_);
    vfdata_->mgradient(val,eg,def_value);
  }

  template<class T>  inline void mgradient(std::vector<StackVector<T,3> >& val, const std::vector<Core::Geometry::Point>& points,T def_value, VMesh::MultiElemGradient& eg) const
  {
    vmesh_->get_mgradient_weights(points,eg,basis_order_);
    vfdata_->mgradient(val,eg,def_value);
  }

  /// Different versions for different index types
  template<class T>  inline void gradient(StackVector<T,3>& val, const VMesh::coords_type &coords, VMesh::Edge::index_type idx) const
  { gradient(val, coords, static_cast<VMesh::index_type>(idx)); }
  template<class T>  inline void gradient(StackVector<T,3>& val, const VMesh::coords_type &coords, VMesh::Face::index_type idx) const
  { gradient(val, coords, static_cast<VMesh::index_type>(idx)); }
  template<class T>  inline void gradient(StackVector<T,3>& val, const VMesh::coords_type &coords, VMesh::Cell::index_type idx) const
  { gradient(val, coords, static_cast<VMesh::index_type>(idx)); }
  template<class T>  inline void gradient(StackVector<T,3>& val, const VMesh::coords_type &coords, VMesh::Elem::index_type idx) const
  { gradient(val, coords, static_cast<VMesh::index_type>(idx)); }
  template<class T>  inline void gradient(StackVector<T,3>& val, const VMesh::coords_type &coords, VMesh::DElem::index_type idx) const
  { gradient(val, coords, static_cast<VMesh::index_type>(idx)); }

  /// internal function - this one may change in the future
  void update_mesh_pointer(Mesh* mesh)
  {
    vmesh_ = mesh->vmesh();
    mesh_ = mesh;
  }

  // Use these two functions with extra care, as they can cause segmentation
  // errors if the type of the data is not taken into account
  inline void* get_values_pointer()   { return (vfdata_->fdata_pointer()); }
  inline void* get_evalues_pointer()   { return (vfdata_->efdata_pointer()); }

  inline void* fdata_pointer()   { return (vfdata_->fdata_pointer()); }
  inline void* efdata_pointer()   { return (vfdata_->efdata_pointer()); }

  inline bool is_nodata()        { return (basis_order_ == -1); }
  inline bool is_constantdata()  { return (basis_order_ == 0); }
  inline bool is_lineardata()    { return (basis_order_ == 1); }
  inline bool is_nonlineardata() { return (basis_order_ > 1); }
  inline bool is_quadraticdata() { return (basis_order_ == 2); }
  inline bool is_cubicdata()     { return (basis_order_ == 3); }

  inline bool is_constantmesh()  { return (vmesh_->basis_order() == 0); }
  inline bool is_linearmesh()    { return (vmesh_->basis_order() == 1); }
  inline bool is_nonlinearmesh() { return (vmesh_->basis_order() > 1); }
  inline bool is_quadraticmesh() { return (vmesh_->basis_order() == 2); }
  inline bool is_cubicmesh()     { return (vmesh_->basis_order() == 3); }

  inline bool is_isomorphic()    { return (basis_order_ == vmesh_->basis_order()); }

  inline bool is_scalar()        { return (is_scalar_); }
  inline bool is_pair()          { return (is_pair_); }
  inline bool is_vector()        { return (is_vector_); }
  inline bool is_tensor()        { return (is_tensor_); }

  inline bool is_char()                { return ((data_type_=="char")||(data_type_=="signed char")); }
  inline bool is_unsigned_char()       { return ((data_type_=="unsigned char")); }
  inline bool is_short()               { return ((data_type_=="short")||(data_type_=="signed short")); }
  inline bool is_unsigned_short()      { return (data_type_=="unsigned short"); }
  inline bool is_int()                 { return ((data_type_=="int")||(data_type_=="signed int")); }
  inline bool is_unsigned_int()        { return (data_type_=="unsigned int"); }
  inline bool is_long()                { return ((data_type_=="long")||(data_type_=="signed long")); }
  inline bool is_unsigned_long()       { return (data_type_=="unsigned long"); }
  inline bool is_longlong()            { return ((data_type_=="long long")||(data_type_=="signed long long")); }
  inline bool is_unsigned_longlong()   { return (data_type_=="unsigned long long"); }
  inline bool is_float()               { return (data_type_=="float"); }
  inline bool is_double()              { return (data_type_=="double"); }
  inline bool is_complex_double()      { return (data_type_=="complex"); }

  inline bool is_type(char* )               { return (is_char()); }
  inline bool is_type(unsigned char* )      { return (is_unsigned_char()); }
  inline bool is_type(short* )              { return (is_short()); }
  inline bool is_type(unsigned short* )     { return (is_unsigned_short()); }
  inline bool is_type(int* )                { return (is_int()); }
  inline bool is_type(unsigned int* )       { return (is_unsigned_int()); }
  inline bool is_type(long* )               { return (is_long()); }
  inline bool is_type(unsigned long* )      { return (is_unsigned_long()); }
  inline bool is_type(long long* )          { return (is_longlong()); }
  inline bool is_type(unsigned long long* ) { return (is_unsigned_longlong()); }
  inline bool is_type(double* )             { return (is_double()); }
  inline bool is_type(float* )              { return (is_float()); }
  inline bool is_type(Core::Geometry::Vector* )             { return (is_vector()); }
  inline bool is_type(Core::Geometry::Tensor* )             { return (is_tensor()); }
  template<class T> bool is_type(T*)        { return (false); }

  inline std::string get_data_type()          { return (data_type_); }
  // check whether it is of integer class
  inline bool is_signed_integer()     { return (is_char()||is_short()||is_int()); }
  inline bool is_unsigned_integer()   { return (is_unsigned_char()||is_unsigned_short()||is_unsigned_int()); }
  inline bool is_integer()            { return (is_signed_integer()||is_unsigned_integer()); }

#ifdef SCIRUN4_CODE_TO_BE_ENABLED_LATER
  // Shortcuts to property manager
  inline void copy_properties(VField* ifield)
  {
    if (pm_)
      pm_->copy_properties(ifield->pm_);
  }

  template<class T>
  inline void set_property(const std::string &name, const T &val, bool is_transient)
  {
    if (pm_)
      pm_->set_property(name,val,is_transient);
  }

  template<class T>
  inline bool get_property( const std::string &name, T &val)
  {
    if (pm_)
      return(pm_->get_property(name,val));
    return false;
  }

  inline bool is_property( const std::string &name)
  {
    if (pm_)
      return(pm_->is_property(name));
    return false;
  }
#endif
protected:

  // Pointers to structures to access the data virtually

  // Interface to Field
  Field*        field_;
  Mesh*         mesh_;

  // Add this one separately to avoid circular dependencies
  PropertyManager* pm_;

  // Interface to the data in the field
  VMesh*        vmesh_;
  VFData*       vfdata_;

  // Information from the basis
  int           basis_order_;
  int           number_of_nodes_;
  int           number_of_enodes_;
  int           element_dim_;
  int           element_dofs_;

  bool          is_scalar_;
  bool          is_pair_;
  bool          is_vector_;
  bool          is_tensor_;
  bool          is_time_;

  std::string   data_type_;

};

}

#endif


text:
module GBTiles
  module GBT
    module MODData
      class Pattern

        attr_accessor :rows

        def initialize
          @rows = []
        end

      end
    end
  end
end


text:
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
	xmlns:android="http://schemas.android.com/apk/res/android"
	android:layout_width="match_parent"
	android:layout_height="wrap_content"
	android:orientation="vertical">

	<ImageView
		android:id="@id/imageView"
		android:layout_width="match_parent"
		android:layout_height="wrap_content"
		android:layout_alignBottom="@+id/titleLayout"
		android:layout_alignTop="@+id/titleLayout"
		android:scaleType="centerCrop"
		android:background="@color/black"
		/>

	<LinearLayout
		android:id="@+id/titleLayout"
		android:layout_width="match_parent"
		android:layout_height="wrap_content"
		android:layout_centerInParent="true"
		android:background="@drawable/custom_ripple_transparent"
		android:orientation="vertical"
		android:paddingBottom="30dp"
		android:paddingTop="25dp"
		>

		<TextView
			android:id="@+id/textView"
			android:layout_width="match_parent"
			android:layout_height="wrap_content"
			android:gravity="center_horizontal"
			android:textColor="@color/white"
			android:textSize="30sp"
			/>

		<View
			android:layout_width="100dp"
			android:layout_height="4dp"
			android:layout_gravity="center_horizontal"
			android:layout_marginTop="9dp"
			android:background="@color/white"
			/>
	</LinearLayout>

</RelativeLayout>


text:
package org.kie.workbench.common.stunner.lienzo.toolbox;

public interface Item<T extends Item> {

    public T show();

    public T hide();

    public void destroy();
}


text:
external help file: Rubrik-help.xml
Module Name: Rubrik
online version: https://rubrik.gitbook.io/rubrik-sdk-for-powershell/command-documentation/reference/get-rubrikmount
schema: 2.0.0
---

# Get-RubrikMount

## SYNOPSIS
Connects to Rubrik and retrieves details on mounts for a VM

## SYNTAX

```
Get-RubrikMount [[-id] <String>] [[-VMID] <String>] [-DetailedObject] [[-Server] <String>] [[-api] <String>]
 [<CommonParameters>]
```

## DESCRIPTION
The Get-RubrikMount cmdlet will accept a VM id and return details on any mount operations that are active within Rubrik
Due to the nature of names not being unique
Note that this function requires the VM ID value, not the name of the virtual machine, since virtual machine names are not unique.
It is suggested that you first use Get-RubrikVM to narrow down the one or more virtual machines you wish to query, and then pipe the results to Get-RubrikMount.

## EXAMPLES

### EXAMPLE 1
```
Get-RubrikMount
```

This will return details on all mounted virtual machines.

### EXAMPLE 2
```
Get-RubrikMount -DetailedObject
```

This will retrieve all mounted virtual machines with additional details

### EXAMPLE 3
```
Get-RubrikMount -id '11111111-2222-3333-4444-555555555555'
```

This will return details on mount id "11111111-2222-3333-4444-555555555555".

### EXAMPLE 4
```
Get-RubrikMount -VMID (Get-RubrikVM -VM 'Server1').id
```

This will return details for any mounts found using the id value from a virtual machine named "Server1" as a base reference.

### EXAMPLE 5
```
Get-RubrikMount -VMID 'VirtualMachine:::aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee-vm-12345'
```

This will return details for any mounts found using the virtual machine id of 'VirtualMachine:::aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee-vm-12345' as a base reference.

## PARAMETERS

### -id
Rubrik's id of the mount

```yaml
Type: String
Parameter Sets: (All)
Aliases:

Required: False
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
```

### -VMID
Filters live mounts by VM ID

```yaml
Type: String
Parameter Sets: (All)
Aliases: vm_id

Required: False
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```

### -DetailedObject
DetailedObject will retrieved the detailed VM Mount object, the default behavior of the API is to only retrieve a subset of the full VM Mount object unless we query directly by ID.
Using this parameter does affect performance as more data will be retrieved and more API-queries will be performed.

```yaml
Type: SwitchParameter
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
```

### -Server
Rubrik server IP or FQDN

```yaml
Type: String
Parameter Sets: (All)
Aliases:

Required: False
Position: 3
Default value: $global:RubrikConnection.server
Accept pipeline input: False
Accept wildcard characters: False
```

### -api
API version

```yaml
Type: String
Parameter Sets: (All)
Aliases:

Required: False
Position: 4
Default value: $global:RubrikConnection.api
Accept pipeline input: False
Accept wildcard characters: False
```

### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).

## INPUTS

## OUTPUTS

## NOTES
Written by Chris Wahl for community usage
Twitter: @ChrisWahl
GitHub: chriswahl

## RELATED LINKS

[https://rubrik.gitbook.io/rubrik-sdk-for-powershell/command-documentation/reference/get-rubrikmount](https://rubrik.gitbook.io/rubrik-sdk-for-powershell/command-documentation/reference/get-rubrikmount)


text:
.selecttext{
	border-bottom-width: 1px;
	border-color: #000000;
	border-left-width: 1px;
	border-top-width: 1px;
	border-style: solid;
	height: 19;
	border-right-width: 0px;
}
.selectbutton{
	font-family:webdings;
	font-size:10px;
	height: 19;
	width: 19;
	line-height:0px;
	padding-bottom:3px;
	border: 1px solid #000000;
	background-color: #eaf2ff;
}
.selecttable{
	font-family:arial;
	font-size:12px;
	cursor:default;
}
.selectcontent
{
	position: absolute;
	top:0;
	left:0;
	overflow:auto;
	border:1px solid #000000
}

.selectdiv
{
	position: absolute;
	width:100;
	overflow:hidden;
}
.select{
	border-collapse: collapse;
	border-width: 0px;
	margin: 0px;
	padding: 0px;
}
.dtee{
	height: 100px;
	overflow: scroll
}


text:
/*******************************************************************************
  POWER Peripheral Library Template Implementation

  File Name:
    power_HLVDLimitSelection_Unsupported.h

  Summary:
    POWER PLIB Template Implementation

  Description:
    This header file contains template implementations
    For Feature : HLVDLimitSelection
    and its Variant : Unsupported
    For following APIs :
        PLIB_POWER_ExistsHLVDLimitSelection
        PLIB_POWER_HLVDLimitSelect

*******************************************************************************/

//DOM-IGNORE-BEGIN
/*******************************************************************************
Copyright (c) 2013-2014 released Microchip Technology Inc.  All rights reserved.

Microchip licenses to you the right to use, modify, copy and distribute
Software only when embedded on a Microchip microcontroller or digital signal
controller that is integrated into your product or third party product
(pursuant to the sublicense terms in the accompanying license agreement).

You should refer to the license agreement accompanying this Software for
additional information regarding your rights and obligations.

SOFTWARE AND DOCUMENTATION ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND,
EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF
MERCHANTABILITY, TITLE, NON-INFRINGEMENT AND FITNESS FOR A PARTICULAR PURPOSE.
IN NO EVENT SHALL MICROCHIP OR ITS LICENSORS BE LIABLE OR OBLIGATED UNDER
CONTRACT, NEGLIGENCE, STRICT LIABILITY, CONTRIBUTION, BREACH OF WARRANTY, OR
OTHER LEGAL EQUITABLE THEORY ANY DIRECT OR INDIRECT DAMAGES OR EXPENSES
INCLUDING BUT NOT LIMITED TO ANY INCIDENTAL, SPECIAL, INDIRECT, PUNITIVE OR
CONSEQUENTIAL DAMAGES, LOST PROFITS OR LOST DATA, COST OF PROCUREMENT OF
SUBSTITUTE GOODS, TECHNOLOGY, SERVICES, OR ANY CLAIMS BY THIRD PARTIES
(INCLUDING BUT NOT LIMITED TO ANY DEFENSE THEREOF), OR OTHER SIMILAR COSTS.
*******************************************************************************/

//DOM-IGNORE-END

#ifndef _POWER_HLVDLIMITSELECTION_UNSUPPORTED_H
#define _POWER_HLVDLIMITSELECTION_UNSUPPORTED_H

//******************************************************************************
/* Function :  POWER_ExistsHLVDLimitSelection_Unsupported

  Summary:
    Implements Unsupported variant of PLIB_POWER_ExistsHLVDLimitSelection

  Description:
    This template implements the Unsupported variant of the PLIB_POWER_ExistsHLVDLimitSelection function.
*/

PLIB_TEMPLATE bool POWER_ExistsHLVDLimitSelection_Unsupported( POWER_MODULE_ID index )
{
    return false;
}

//******************************************************************************
/* Function :  POWER_HLVDLimitSelect_Unsupported

  Summary:
    Implements Unsupported variant of PLIB_POWER_HLVDLimitSelect

  Description:
    This template implements the Unsupported variant of the PLIB_POWER_HLVDLimitSelect function.
*/

PLIB_TEMPLATE void POWER_HLVDLimitSelect_Unsupported( POWER_MODULE_ID index , HLVD_LIMIT limit )
{
    PLIB_ASSERT(false, "The device selected does not implement PLIB_POWER_HLVDLimitSelect");
}

#endif /*_POWER_HLVDLIMITSELECTION_UNSUPPORTED_H*/

/******************************************************************************
 End of File
*/


text:
namespace glm
{
	/// @addtogroup ext_quaternion_trigonometric
	/// @{

	/// Returns the quaternion rotation angle.
	///
	/// @tparam T A floating-point scalar type
	/// @tparam Q A value from qualifier enum
	template<typename T, qualifier Q>
	GLM_FUNC_DECL T angle(qua<T, Q> const& x);

	/// Returns the q rotation axis.
	///
	/// @tparam T A floating-point scalar type
	/// @tparam Q A value from qualifier enum
	template<typename T, qualifier Q>
	GLM_FUNC_DECL vec<3, T, Q> axis(qua<T, Q> const& x);

	/// Build a quaternion from an angle and a normalized axis.
	///
	/// @param angle Angle expressed in radians.
	/// @param axis Axis of the quaternion, must be normalized.
	///
	/// @tparam T A floating-point scalar type
	/// @tparam Q A value from qualifier enum
	template<typename T, qualifier Q>
	GLM_FUNC_DECL qua<T, Q> angleAxis(T const& angle, vec<3, T, Q> const& axis);

	/// @}
} //namespace glm

#include "quaternion_trigonometric.inl"


text:
#ifndef _ESEXTCTESSELLATIONSHADERTESTS_HPP
#define _ESEXTCTESSELLATIONSHADERTESTS_HPP
 /*!
 * \file
 * \brief
 */ /*-------------------------------------------------------------------*/

#include "../esextcTestCaseBase.hpp"
#include "gluShaderUtil.hpp"
#include "tcuDefs.hpp"

namespace glcts
{

class TessellationShaderTests : public glcts::TestCaseGroupBase
{
public:
	/* Public methods */
	TessellationShaderTests(glcts::Context& context, const ExtParameters& extParams);

	virtual ~TessellationShaderTests(void)
	{
	}

	void init(void);

private:
	/* Private methods */
	TessellationShaderTests(const TessellationShaderTests& other);
	TessellationShaderTests& operator=(const TessellationShaderTests& other);
};

} // namespace glcts

#endif // _ESEXTCTESSELLATIONSHADERTESTS_HPP


text:
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.

using osu.Framework.Bindables;

namespace osu.Framework.Configuration.Tracking
{
    /// <summary>
    /// An <see cref="IConfigManager"/> that provides a way to track its config settings.
    /// </summary>
    public interface ITrackableConfigManager : IConfigManager
    {
        /// <summary>
        /// Retrieves all the settings of this <see cref="ConfigManager{T}"/> that are to be tracked for changes.
        /// </summary>
        /// <returns>A list of <see cref="ITrackedSetting"/>.</returns>
        TrackedSettings CreateTrackedSettings();

        /// <summary>
        /// Loads <see cref="Bindable{T}"/>s into <see cref="TrackedSettings"/>.
        /// </summary>
        /// <param name="settings">The settings to load into.</param>
        void LoadInto(TrackedSettings settings);
    }
}


text:
from base_module import RealEstate

class Perla(RealEstate):
    raise NotImplementedError()


text:
#region License
// Copyright (c) Amos Voron. All rights reserved.
// Licensed under the Apache 2.0 License. See LICENSE in the project root for license information.
#endregion

using System;
using QueryTalk.Wall;

namespace QueryTalk
{
    /// <summary>
    /// Encapsulates the public static members of the QueryTalk's designer.
    /// </summary>
    public abstract partial class Designer
    {

        #region Cast

        /// <summary>
        /// <para>CAST AS built-in function.</para>
        /// <para>Converts an expression of one data type to another.</para>
        /// </summary>
        /// <param name="column">A column expression.</param>
        /// <param name="dataType">The target data type definition.</param>
        public static SysFn Cast(Column column, DataType dataType)
        {
            column = column ?? Designer.Null;

            return new SysFn((buildContext, buildArgs) =>
            {
                if (dataType == null)
                {
                    throw new QueryTalkException("Cast",
                        QueryTalkExceptionType.ArgumentNull, "dataTypeDef = null", Wall.Text.Method.SysConvert);
                }

                var sql = String.Format(
                    "CAST({0} AS {1})",
                    column.Build(buildContext, buildArgs),
                    dataType.Build());
                buildContext.TryTakeException(column.Exception, "Sys.Cast");
                return sql;

            });
        }

        /// <summary>
        /// <para>CAST AS built-in function.</para>
        /// <para>Converts an expression of one data type to another.</para>
        /// </summary>
        /// <param name="argument">A scalar expression.</param>
        /// <param name="dataTypeDef">A data type definition.</param>
        public static SysFn Cast(IScalar argument, DataType dataTypeDef)
        {
            argument = argument ?? Designer.Null;

            return new SysFn((buildContext, buildArgs) =>
            {
                if (dataTypeDef == null)
                {
                    throw new QueryTalkException("Cast",
                        QueryTalkExceptionType.ArgumentNull, "dataTypeDef = null", Wall.Text.Method.SysConvert);
                }

                var sql = String.Format(
                    "CAST({0} AS {1})",
                    ((Chainer)argument).Build(buildContext, buildArgs),
                    dataTypeDef.Build());
                buildContext.TryTakeException(((Chainer)argument).Exception, "Sys.Cast");
                return sql;
            });
        }

        #endregion

        #region Convert

        /// <summary>
        /// <para>CONVERT built-in function.</para>
        /// <para>Converts an expression of one data type to another.</para>
        /// </summary>
        /// <param name="argument">Any expression argument.</param>
        /// <param name="dataTypeDef">The target data type definition.</param>
        /// <param name="style">Is an integer expression that specifies how the CONVERT function is to translate expression. If style is NULL, NULL is returned. The range is determined by dataTypeDef.</param>
        public static SysFn Convert(FunctionArgument argument, DataType dataTypeDef, int style = 0)
        {
            var convert = new ConvertChainer(null, argument, dataTypeDef, style);
            return convert.GetSys();
        }

        #endregion

    }
}


text:
import Typography from 'typography';

const typography = new Typography({
  baseFontSize: '22px',
  baseLineHeight: 1.6,
  blockMarginBottom: 0.75,
  bodyFontFamily: ['Nunito', 'Helvetica Neue', 'Helvetica', 'sans-serif'],
  bodyWeight: 400,
  boldWeight: 700,
  scaleRatio: 1.6,
});

export const { rhythm } = typography;
export default typography;


text: <input type="text" data-bind="value: fire_time" data-timeset="true" class="form-control input-small" />


text:
title: Playlists
permalink: "playlists/index.html"
layout: "post"
---

I maintain several different playlists for different moods and sounds, building them up over time as I hear new tunes that fit. You can see the tracklist by clicking the icon in the top right of each box (even if you don't have a Spotify account).

Instrumental Indian Classical

A variety of pieces with different ragas, talas, and instruments.

Featuring Amjad Ali Khan, Shivkumar Sharma, Zakir Hussain and more.

Modern Jazz Sounds

My favorite jazz tunes from the year 2000–present.

Featuring Kamasi Washington, Mammal Hands, Makaya McCraven and more.

Modern/Minimal

Quiet & thoughtful music with space to breathe.

Featuring Nils Frahm, Max Richter, Poppy Ackroyd and more.

Noir

Raymond Chandler, eat your heart out.

Featuring Miles Davis, Bohren & der Club of Gore, Black Chamber and more.

Rain

Music for rainstorms and open windows.

Featuring Susumu Yokota, Kaitlyn Aurelia Smith, Triosk and more.

Work Metal

Riffs to work to. Not too technical, not too heavy, not too light.

Featuring Mastodon, Scale the Summit, Elder and more.


text:
namespace OpenPGP {

DetachedSignature::DetachedSignature()
    : PGP()
{
    type = SIGNATURE;
}

DetachedSignature::DetachedSignature(const PGP & copy)
    : PGP(copy)
{}

DetachedSignature::DetachedSignature(const DetachedSignature & copy)
    : PGP(copy)
{
    type = SIGNATURE;
}

DetachedSignature::DetachedSignature(const std::string & data)
    : PGP(data)
{
    type = SIGNATURE;

    // warn if packet sequence is not meaningful
    if (!meaningful()){
        throw std::runtime_error("Error: Data does not form a meaningful PGP Detached Signature");
    }
}

DetachedSignature::DetachedSignature(std::istream & stream)
    : PGP(stream)
{
    type = SIGNATURE;

    // warn if packet sequence is not meaningful
    if (!meaningful()){
        throw std::runtime_error("Error: Data does not form a meaningful PGP Detached Signature");
    }
}

DetachedSignature::~DetachedSignature(){}

bool DetachedSignature::meaningful(const PGP & pgp){
    if (pgp.get_type() != SIGNATURE){
        // "Error: ASCII Armor type is not SIGNATURE.\n";
        return false;
    }

    if (pgp.get_packets().size() != 1){
        // "Error: Wrong number of packets.\n";
        return false;
    }

    // if (pgp.get_packets()[0] -> get_tag() != Packet::SIGNATURE){
        // // "Error: Packet is not a signature packet.\n";
        // return false;
    // }

    // if (!Signature_Type::is_signed_document(std::static_pointer_cast <Packet::Tag2> (pgp.get_packets()[0]) -> get_type())){
        // // "Error: Signature type is not over a document.\n";
        // return false;
    // }

    return true;
}

bool DetachedSignature::meaningful() const{
    return meaningful(*this);
}

PGP::Ptr DetachedSignature::clone() const{
    return std::make_shared <DetachedSignature> (*this);
}

}


text:
layout: page
title: About
permalink: /about/
---

Hi, My name is Haoting Zhuang. I'm an aspiring Data Scientist who currently live in Greater Seattle area. I am passionate about data analysis & interpretation and am always earger to learn new knowledge and techniques in this area.

I would love to connect and talk to people who share the same interest with me.  Feel free to connect with me on LinkedIn or email me directly.

### More Information

Before getting into the field of Data Science, I had worked 6 years in Engineering Construction company as a Control Systems Engineer and a Project Controls Engineer. I spent most of my time on engineering design and project management for projects of building LNG (Liquefied Natural Gas) plants around the world.

### Contact me

[daphnezht@gmail.com](mailto:daphnezht@gmail.com)


text:
import os
import sys
try:
    import simplejson as json
except ImportError:
    import json # Python >= 2.6

from w3testrunner.browsers.browser import BrowserLin, BrowserWin, BrowserMac

class ChromeMixin(object):
    name = "chrome"
    needs_temporary_profile_dir = True

    def initialize_profile(self):
        first_run_file = os.path.join(self.profile_dir, "First Run")
        with open(first_run_file, "w") as f:
            f.write("")

        preferences = {
            "browser": {
                "check_default_browser": False
            }
        }

        default_dir = os.path.join(self.profile_dir, "Default")
        os.mkdir(default_dir)
        preferences_file = os.path.join(default_dir, "Preferences")
        with open(preferences_file, "w") as p:
            p.write(json.dumps(preferences, indent=2))

    def prepare_launch(self):
        super(ChromeMixin, self).prepare_launch()
        self.cmd = [
            self.browser_info.path,
            # This makes the maximize code useless, but it shouldn't hurt to
            # maximize the window twice.
            "--start-maximized",
            "--user-data-dir=" + self.profile_dir,
        ]

if sys.platform == "win32":
    from win32com.shell import shellcon
    from win32com.shell import shell

class ChromeWin(ChromeMixin, BrowserWin):
    @classmethod
    def discover_path(cls, browser_info):
        appdata = shell.SHGetFolderPath(0, shellcon.CSIDL_LOCAL_APPDATA, 0, 0)
        default_path = os.path.join(appdata, "Google", "Chrome", "Application",
                                    "chrome.exe")
        if os.path.isfile(default_path):
            return default_path

class ChromeLin(ChromeMixin, BrowserLin):
    executable = "google-chrome"
    appname = "google-chrome"

class ChromeMac(ChromeMixin, BrowserMac):
    # TODO: what about the "Google Chrome Helper" process?
    process_name = "Google Chrome"
    directory = "Google Chrome"
    executable = "Google Chrome"


text:
package com.gerken.xaa.mpe.editor;

import com.gerken.xaa.mpe.core.AbstractTextSection;
import com.gerken.xaa.mpe.core.AbstractFormPage;

import org.eclipse.swt.widgets.Composite;

public class ArtifactTextSection extends AbstractTextSection {

	public ArtifactTextSection(AbstractFormPage page, Composite parent) {
		super(page, parent);
	}

	public String getSectionText() {
		return "Description";
	}

	public String getSectionDescription() {
		return "Describe the selected artifact below";
	}

	public String getExtractorEspression() {
		return "desc";
	}

	public boolean isPrimary() {
		return false;
	}

	public boolean isSectionExpanded() {
		return true;
	}

	public int getDesiredHeight() {
		return 120;
	}
}


text:
@interface XSCircleView ()
@property (nonatomic, strong) UILabel *titleLabel;

@end

@implementation XSCircleView

- (void)drawRect:(CGRect)rect {
    if (self.lineWidth == 0) {
        self.lineWidth = 5;
    }
    CGFloat width = self.bounds.size.width;
    CGFloat height = self.bounds.size.height;

    self.clipsToBounds = YES;
    self.layer.cornerRadius = width / 2;

    UIBezierPath *currentPath = [UIBezierPath bezierPath];
    [_currentColor setStroke];
    [currentPath addArcWithCenter:CGPointMake(width / 2, height / 2) radius:self.bounds.size.width / 2 startAngle:0 endAngle:M_PI * _percent * 2 clockwise:YES];
    currentPath.lineWidth = self.lineWidth;
    [currentPath stroke];

    UIBezierPath *path = [UIBezierPath bezierPath];
    [_color setStroke];
    [path addArcWithCenter:CGPointMake(width / 2, height / 2) radius:self.bounds.size.width / 2 startAngle:M_PI * _percent * 2 endAngle: M_PI * 2 clockwise:YES];
    path.lineWidth = self.lineWidth;
    [path stroke];

}

- (void)setTitle:(NSString *)title {
    _title = title;
    self.titleLabel.text = _title;
}

- (void)setFont:(UIFont *)font {
    _font = font;
    self.titleLabel.font = _font;
}

- (UILabel *)titleLabel {
    if (_titleLabel == nil) {
        _titleLabel = [[UILabel alloc]init];
        _titleLabel.translatesAutoresizingMaskIntoConstraints = NO;
        _titleLabel.textAlignment = NSTextAlignmentCenter;
        [self addSubview:_titleLabel];
        [self addConstraints:[NSLayoutConstraint constraintsWithVisualFormat:@"V:|[_titleLabel]|"
                                                                         options:NSLayoutFormatAlignAllCenterY
                                                                         metrics:nil
                                                                           views:NSDictionaryOfVariableBindings(_titleLabel)]];
        [self addConstraints:[NSLayoutConstraint constraintsWithVisualFormat:@"H:|[_titleLabel]|"
                                                                     options:NSLayoutFormatAlignAllCenterX
                                                                     metrics:nil
                                                                       views:NSDictionaryOfVariableBindings(_titleLabel)]];
    }
    return _titleLabel;
}

- (void)setTextColor:(UIColor *)textColor {
    _textColor = textColor;
    self.titleLabel.textColor = _textColor;
}

@end


text:
Yii2 AdminLTE - Advanced App Template.
======================================

<p align= "center">[Theme - Skin-Blue-Light - Desktop]
-----------------------------------------------------------------

#### 01.- [Layout - Main]:

![Home Page Skin-Blue-light-Main](images/skin-blue-light/blue_light-main.png)

#### 02.- [Layout - About_Us]:

![Home Page Skin-Blue-light-About_Us](images/skin-blue-light/blue_light-about_us.png)

#### 03.- [Layout - Contact]:

![Home Page Skin-Blue-light-Contact](images/skin-blue-light/blue_light-contact.png)

#### 04.- [Layout - Signup]:

![Home Page Skin-Blue-light-Signup](images/skin-blue-light/blue_light-signup.png)

#### 05.- [Layout - Login]:

![Home Page Skin-Blue-light-Login](images/skin-blue-light/blue_light-login.png)

#### 06.- [Layout - Request_Password_Reset]:

![Home Page Skin-Blue-light-Request_Password_Reset](images/skin-blue-light/blue_light-request_password_reset.png)

#### 07.- [Layout - Panel_Admin-Close]:

![Home Page Skin-Blue-light-Panel_Admin-Close](images/skin-blue-light/blue_light-panel_admin-close.png)

#### 08.- [Layout - Panel_Admin-Open]:

![Home Page Skin-Blue-light-Panel_Admin-Open](images/skin-blue-light/blue_light-panel_admin-open.png)


text:
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
 * Version: MPL 1.1/GPL 2.0/LGPL 2.1
 *
 * The contents of this file are subject to the Mozilla Public License Version
 * 1.1 (the "License"); you may not use this file except in compliance with
 * the License. You may obtain a copy of the License at
 * http://www.mozilla.org/MPL/
 *
 * Software distributed under the License is distributed on an "AS IS" basis,
 * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
 * for the specific language governing rights and limitations under the
 * License.
 *
 * The Original Code is JavaScript Engine testing utilities.
 *
 * The Initial Developer of the Original Code is
 * Mozilla Foundation.
 * Portions created by the Initial Developer are Copyright (C) 2005
 * the Initial Developer. All Rights Reserved.
 *
 * Contributor(s): Jason Orendorff <jorendorff@mozilla.com>
 *
 * Alternatively, the contents of this file may be used under the terms of
 * either the GNU General Public License Version 2 or later (the "GPL"), or
 * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
 * in which case the provisions of the GPL or the LGPL are applicable instead
 * of those above. If you wish to allow use of your version of this file only
 * under the terms of either the GPL or the LGPL, and not to allow others to
 * use your version of this file under the terms of the MPL, indicate your
 * decision by deleting the provisions above and replace them with the notice
 * and other provisions required by the GPL or the LGPL. If you do not delete
 * the provisions above, a recipient may use your version of this file under
 * the terms of any one of the MPL, the GPL or the LGPL.
 *
 * ***** END LICENSE BLOCK ***** */

var gTestfile = 'regress-415721.js';
//-----------------------------------------------------------------------------
var BUGNUMBER = 415721;
var summary = 'jsatom.c double hashing re-validation logic is unsound';

printStatus (summary);

var VARS = 10000;
var TRIES = 100;

function atomizeStressTest() {
  var fn = "function f() {var ";
  for (var i = 0; i < VARS; i++)
    fn += '_f' + i + ', ';
  fn += 'q;}';

  function e() { eval(fn); }

  for (var i = 0; i < TRIES; i++) {
    scatter([e,e]);
    gc();
  }
}

var expect;
var actual;

expect = actual = 'No crash';
if (typeof scatter == 'undefined' || typeof gc == 'undefined') {
  print('Test skipped. scatter or gc not defined.');
  expect = actual = 'Test skipped.';
} else {
  atomizeStressTest();
}

reportCompare(expect, actual, summary);


text:
package filters

import (
	"net/http"
)

type FilterFunc func(http.ResponseWriter, *http.Request, *RequestFilterChain)

type RequestFilterChain struct {
	res     http.ResponseWriter
	req     *http.Request
	handler http.HandlerFunc
	filters []FilterFunc
}

func (chain *RequestFilterChain) next() {
	if len(chain.filters) > 0 {
		filter := chain.filters[0]
		chain.filters = chain.filters[1:]
		filter(chain.res, chain.req, chain)
	} else {
		chain.handler(chain.res, chain.req)
	}
}

func ApplyTo(fn http.HandlerFunc, filters ...FilterFunc) http.HandlerFunc {
	return func(res http.ResponseWriter, req *http.Request) {
		chain := RequestFilterChain{res, req, fn, filters[:]}
		chain.next()
	}
}


text:
/*!
 \file graph.h
 A simple graph implementation.
 */
#ifndef GRAPH_H
#define GRAPH_H

/*!
 * Structure that represents a set of edges in a graph.
 */
typedef struct Edges
{
  /*!
   * The maximum number of edges for a single vertex.
   */
  unsigned int maxedges;
  /*!
   * An array specifying the number of edges for each vertex.
   */
  unsigned int* numedges;
  /*!
   * An array specifying the target vertex for each edge.
   * This is a 2D array that is column-major mapped to a 1D array.
   * This means every edge for vertex i can be found at:
   * i + numvertices * n
   * where n can range from 0 to maxedges.
   */
  unsigned int* edgeTargets;
} Edges;

/*!
 * Structure that represents a set of vertices in a graph.
 */
typedef struct Vertices
{
  /*!
   * The total number of vertices.
   */
  unsigned int numvertices;
  /*!
   * An array specifying the x location of each vertex.
   */
  float* vertexXLocs;
  /*!
   * An array specifying the y location of each vertex.
   */
  float* vertexYLocs;
} Vertices;

/*!
 * Structure that represents a graph.
 */
typedef struct Graph
{
  /*!
   * The edges in the graph.
   */
  Edges* edges;
  /*!
   * The vertices in the graph.
   */
  Vertices* vertices;
} Graph;

/*!
 * Create a new Edges struct with place for the specified number of edges.
 */
Edges* newEdges(unsigned int num);

/*!
 * Allocates memory to save an amount of edges from the specified vertex.
 */
void graphSetEdgeSpaceForVertex(Graph* graph, unsigned int vertexId,
    unsigned int numedges);

/*!
 * Allocates memory to save an amount of edges for all vertices.
 */
void graphSetEdgeSpaceForAllVertices(Graph* graph);

/*!
 * Add an outgoing edge to a vertex. This edge is one-way.
 */
void graphAddEdgeToVertex(Graph* graph, unsigned int sourceVertexId,
    unsigned int targetVertexId);

/*!
 * Reallocate the memory for all edges to match the number of edges each vertex has.
 */
void graphShrinkEdgeSpaceToNumberOfEdges(Graph* graph);

/*!
 * Frees the memory allocated for the edges struct.
 */
void freeEdges(Edges* edges);

/*!
 * Create a new Vertices struct with place for the specified number of vertices.
 */
Vertices* newVertices(unsigned int num);

/*!
 * Frees the memory allocated for the edges struct.
 */
void freeVertices(Vertices* vertices);

/*!
 * Create a new Graph struct with place for the specified number of edges and vertices.
 */
Graph* newGraph(unsigned int numVertices);

/*!
 Print the details of the graph to stdout.
 \param[in] g The graph to print.
 */
void printGraph(Graph* g);

/*!
 * Free the memory allocated for the graph struct.
 */
void freeGraph(Graph* graph);

#endif


text:
@interface TMPostItemViewController : UIViewController <UINavigationControllerDelegate, UIImagePickerControllerDelegate>

@property (strong, nonatomic) UIImagePickerController *imagePicker;
@property (strong, nonatomic) UIImage *image;
@property (weak, nonatomic) IBOutlet UITextField *addressField;
@property (weak, nonatomic) IBOutlet UITextField *detailsField;
@property (weak, nonatomic) IBOutlet UITextField *firstTagField;
@property (weak, nonatomic) IBOutlet UITextField *secondTagField;
@property (weak, nonatomic) IBOutlet UITextField *thirdTagField;
@property (weak, nonatomic) IBOutlet UITextField *lengthField;
@property (weak, nonatomic) IBOutlet UITextField *widthField;
@property (weak, nonatomic) IBOutlet UITextField *heightField;

- (IBAction)cancel:(id)sender;
- (IBAction)postItem:(id)sender;

@end


text:
module Fastlane
  module Actions
    module SharedValues
      SIGH_PROFILE_PATH = :SIGH_PROFILE_PATH
      SIGH_PROFILE_PATHS = :SIGH_PROFILE_PATHS
      SIGH_UDID = :SIGH_UDID
    end

    class SighAction < Action
      def self.run(values)
        require 'sigh'
        require 'sigh/options'
        require 'sigh/manager'
        require 'credentials_manager/appfile_config'

        begin
          FastlaneCore::UpdateChecker.start_looking_for_update('sigh') unless Helper.is_test?

          Sigh.config = values # we already have the finished config

          path = Sigh::Manager.start

          Actions.lane_context[SharedValues::SIGH_PROFILE_PATH] = path # absolute path
          Actions.lane_context[SharedValues::SIGH_PROFILE_PATHS] ||= []
          Actions.lane_context[SharedValues::SIGH_PROFILE_PATHS] << path
          Actions.lane_context[SharedValues::SIGH_UDID] = ENV["SIGH_UDID"] if ENV["SIGH_UDID"] # The UDID of the new profile

          return ENV["SIGH_UDID"] # return the UDID of the new profile
        ensure
          FastlaneCore::UpdateChecker.show_update_status('sigh', Sigh::VERSION)
        end
      end

      def self.description
        "Generates a provisioning profile. Stores the profile in the current folder"
      end

      def self.author
        "KrauseFx"
      end

      def self.return_value
        "The UDID of the profile sigh just fetched/generated"
      end

      def self.available_options
        require 'sigh'
        require 'sigh/options'
        Sigh::Options.available_options
      end

      def self.is_supported?(platform)
        platform == :ios
      end
    end
  end
end


text:
<?php

namespace Gelembjuk\WebApp\Exceptions;

/*
* This class helps to process form submit errors. it includes a form field where error happened
*/

class FormException extends \Exception{
	protected $input;

	public function __construct($input, $message = '' , $number = 0) {
		parent::__construct($message,$number);
		$this->input = $input;
	}
	public function getInput() {
		return $this->input;
	}
}


text:
package com.springcryptoutils.certificate;

import com.springcryptoutils.Crypt;
import com.springcryptoutils.CryptException;
import org.junit.jupiter.api.DisplayName;
import org.junit.jupiter.api.Test;

import java.security.KeyStore;
import java.security.KeyStoreException;
import java.security.cert.Certificate;

import static org.junit.jupiter.api.Assertions.*;

class CertificateTest {

    @Test
    @DisplayName("loads a certificate")
    void certificate() throws KeyStoreException {
        KeyStore keystore = Crypt.keystore("classpath:/keystore.p12", "password", "PKCS12");
        assertNotNull(keystore);
        assertEquals("PKCS12", keystore.getType(), "type");
        assertEquals(2, keystore.size(), "size");
        Certificate certificate = Crypt.certificate(keystore, "test");
        assertNotNull(certificate);
        assertEquals("X.509", certificate.getType(), "type");
        assertNotNull(certificate.getPublicKey());
        assertEquals("RSA", certificate.getPublicKey().getAlgorithm(), "algorithm");
        assertEquals("X.509", certificate.getPublicKey().getFormat(), "format");
    }

    @Test
    @DisplayName("loading a non existing certificate should throw an error")
    void nonExistingKey() throws KeyStoreException {
        KeyStore keystore = Crypt.keystore("classpath:/keystore.p12", "password", "PKCS12");
        assertNotNull(keystore);
        assertEquals("PKCS12", keystore.getType(), "type");
        assertEquals(2, keystore.size(), "size");
        assertThrows(CryptException.class, () -> Crypt.certificate(keystore, "sgiao belo"));
    }

}


text:
from __future__ import absolute_import, division, print_function, unicode_literals

from amaasutils.logging_utils import DEFAULT_LOGGING
from amaasutils.random_utils import random_string
import datetime
from decimal import Decimal
import logging.config
import random
import requests_mock
import unittest

from amaascore.core.comment import Comment
from amaascore.transactions.cash_transaction import CashTransaction
from amaascore.transactions.transaction import Transaction
from amaascore.transactions.interface import TransactionsInterface
from amaascore.tools.generate_asset import generate_asset
from amaascore.tools.generate_book import generate_book
from amaascore.tools.generate_transaction import generate_transaction, generate_transactions,\
    generate_positions, generate_position, generate_cash_transaction

logging.config.dictConfig(DEFAULT_LOGGING)

class TransactionsInterfaceTest(unittest.TestCase):

    @classmethod
    def setUpClass(cls):
        cls.transactions_interface = TransactionsInterface()

    def setUp(self):
        self.longMessage = True  # Print complete error message on failure
        self.maxDiff = None  # View the complete diff when there is a mismatch in a test
        self.asset_manager_id = random.randint(1, 2**31-1)
        self.asset = generate_asset(asset_manager_id=self.asset_manager_id)
        self.asset_book = generate_book(asset_manager_id=self.asset_manager_id)
        self.counterparty_book = generate_book(asset_manager_id=self.asset_manager_id)
        self.transaction = generate_transaction(asset_manager_id=self.asset_manager_id, asset_id=self.asset.asset_id,
                                                asset_book_id=self.asset_book.book_id,
                                                counterparty_book_id=self.counterparty_book.book_id)
        self.transaction_id = self.transaction.transaction_id
        self.setup_cache()

    def tearDown(self):
        pass

    def create_transaction_asset(self):
        transaction_asset_fields = ['asset_manager_id', 'asset_id', 'asset_status', 'asset_class', 'asset_type',
                                    'fungible']
        asset_json = self.asset.to_json()
        transaction_asset_json = {attr: asset_json.get(attr) for attr in transaction_asset_fields}
        self.transactions_interface.upsert_transaction_asset(transaction_asset_json=transaction_asset_json)

    def setup_cache(self):
        self.create_transaction_asset()
        self.create_transaction_book(self.asset_book)
        self.create_transaction_book(self.counterparty_book)

    def create_transaction_book(self, book):
        transaction_book_fields = ['asset_manager_id', 'book_id', 'party_id', 'book_status']
        book_json = book.to_json()
        transaction_book_json = {attr: book_json.get(attr) for attr in transaction_book_fields}
        self.transactions_interface.upsert_transaction_book(transaction_book_json=transaction_book_json)

    def test_New(self):
        self.assertIsNone(self.transaction.created_time)
        transaction = self.transactions_interface.new(self.transaction)
        # TODO - this should be populated by the New call.
        #self.assertIsNotNone(transaction.created_time)
        self.assertEqual(transaction.transaction_id, self.transaction_id)

    def test_Amend(self):
        transaction = self.transactions_interface.new(self.transaction)
        self.assertEqual(transaction.version, 1)
        new_settlement_date = transaction.settlement_date + datetime.timedelta(days=1)
        transaction.settlement_date = new_settlement_date
        transaction = self.transactions_interface.amend(transaction)
        self.assertEqual(transaction.settlement_date, new_settlement_date)
        self.assertEqual(transaction.version, 2)

    def test_Partial(self):
        self.transactions_interface.new(self.transaction)
        price = Decimal('3.14')
        updates = {'price': price}
        transaction = self.transactions_interface.partial(asset_manager_id=self.asset_manager_id,
                                                          transaction_id=self.transaction_id,
                                                          updates=updates)
        self.assertEqual(transaction.version, 2)
        self.assertEqual(transaction.price, price)

    def test_Retrieve(self):
        self.transactions_interface.new(self.transaction)
        transaction = self.transactions_interface.retrieve(self.transaction.asset_manager_id,
                                                           self.transaction.transaction_id)
        self.assertEqual(type(transaction), Transaction)

    def test_Cancel(self):
        self.transactions_interface.new(self.transaction)
        self.transactions_interface.cancel(self.transaction.asset_manager_id, self.transaction.transaction_id)
        transaction = self.transactions_interface.retrieve(self.transaction.asset_manager_id,
                                                           self.transaction.transaction_id)
        self.assertEqual(transaction.transaction_id, self.transaction_id)
        self.assertEqual(transaction.transaction_status, 'Cancelled')

    @requests_mock.Mocker()
    def test_Search(self, mocker):
        # This test is somewhat fake - but the integration tests are for the bigger picture
        endpoint = self.transactions_interface.endpoint + '/transactions'
        asset_manager_ids = [self.asset_manager_id, self.asset_manager_id+1]
        transactions = generate_transactions(asset_manager_ids=asset_manager_ids)
        mocker.get(endpoint, json=[transaction.to_json() for transaction in transactions])
        all_transactions = self.transactions_interface.search()
        self.assertEqual(all_transactions, transactions)

    @requests_mock.Mocker()
    def test_TransactionsByAssetManager(self, mocker):
        # This test is somewhat fake - but the integration tests are for the bigger picture
        endpoint = '%s/transactions/%s' % (self.transactions_interface.endpoint, self.asset_manager_id)
        asset_manager_ids = [self.asset_manager_id]
        transactions = generate_transactions(asset_manager_ids=asset_manager_ids)
        mocker.get(endpoint, json=[transaction.to_json() for transaction in transactions])
        results = self.transactions_interface.transactions_by_asset_manager(asset_manager_id=self.asset_manager_id)
        self.assertEqual(results, transactions)

    @requests_mock.Mocker()
    def test_PositionSearch(self, mocker):
        # This test is somewhat fake - but the integration tests are for the bigger picture
        endpoint = '%s/positions' % self.transactions_interface.endpoint
        asset_manager_ids = [self.asset_manager_id, self.asset_manager_id+1]
        positions = generate_positions(asset_manager_ids=asset_manager_ids)
        mocker.get(endpoint, json=[position.to_json() for position in positions])
        all_positions = self.transactions_interface.position_search()
        self.assertEqual(all_positions, positions)

    @requests_mock.Mocker()
    def test_PositionsByBook(self, mocker):
        # This test is somewhat fake - but the integration tests are for the bigger picture
        book_id = self.asset_book.book_id
        endpoint = '%s/positions/%s/%s' % (self.transactions_interface.endpoint, self.asset_manager_id, book_id)
        positions = generate_positions(asset_manager_ids=[self.asset_manager_id], book_ids=[book_id])
        mocker.get(endpoint, json=[position.to_json() for position in positions])
        results = self.transactions_interface.positions_by_asset_manager_book(asset_manager_id=self.asset_manager_id,
                                                                              book_id=book_id)
        self.assertEqual(positions, results)

    @requests_mock.Mocker()
    def test_PositionsByAssetManager(self, mocker):
        # This test is somewhat fake - but the integration tests are for the bigger picture
        endpoint = '%s/positions/%s' % (self.transactions_interface.endpoint, self.asset_manager_id)
        positions = generate_positions(asset_manager_ids=[self.asset_manager_id])
        mocker.get(endpoint, json=[position.to_json() for position in positions])
        results = self.transactions_interface.positions_by_asset_manager(asset_manager_id=self.asset_manager_id)
        self.assertEqual(positions, results)

    @requests_mock.Mocker()
    def test_PositionsByAssetManagerWithBooks(self, mocker):
        # This test is somewhat fake - but the integration tests are for the bigger picture
        endpoint = '%s/positions/%s' % (self.transactions_interface.endpoint, self.asset_manager_id)
        positions = [generate_position(asset_manager_id=self.asset_manager_id, book_id='TEST')]
        mocker.get(endpoint, json=[position.to_json() for position in positions])
        results = self.transactions_interface.positions_by_asset_manager(asset_manager_id=self.asset_manager_id,
                                                                         book_ids=['TEST'])
        self.assertEqual(positions, results)

    def test_MultipleLink(self):
        transaction = self.transactions_interface.new(self.transaction)
        links = transaction.links.get('Multiple')
        self.assertEqual(len(links), 3)  # The test script inserts 3 links
        # Add a link
        random_id = random_string(8)
        transaction.add_link('Multiple', linked_transaction_id=random_id)
        transaction = self.transactions_interface.amend(transaction)
        self.assertEqual(len(transaction.links.get('Multiple')), 4)
        transaction.remove_link('Multiple', linked_transaction_id=random_id)
        transaction = self.transactions_interface.amend(transaction)
        self.assertEqual(len(transaction.links.get('Multiple')), 3)

    def test_ChildrenPopulated(self):
        transaction = self.transactions_interface.new(self.transaction)
        retrieved_transaction = self.transactions_interface.retrieve(asset_manager_id=self.asset_manager_id,
                                                                     transaction_id=self.transaction_id)
        self.assertGreater(len(transaction.charges), 0)
        self.assertGreater(len(transaction.codes), 0)
        self.assertGreater(len(transaction.comments), 0)
        self.assertGreater(len(transaction.links), 0)
        self.assertGreater(len(transaction.parties), 0)
        self.assertGreater(len(transaction.references), 0)
        self.assertEqual(transaction.charges, retrieved_transaction.charges)
        self.assertEqual(transaction.codes, retrieved_transaction.codes)
        self.assertEqual(transaction.comments, retrieved_transaction.comments)
        self.assertEqual(transaction.links, retrieved_transaction.links)
        self.assertEqual(transaction.parties, retrieved_transaction.parties)
        self.assertEqual(transaction.references, retrieved_transaction.references)

    def test_Unicode(self):
        unicode_comment = '日本語入力'
        self.transaction.comments['Unicode'] = Comment(comment_value=unicode_comment)
        transaction = self.transactions_interface.new(self.transaction)
        self.assertEqual(transaction.comments.get('Unicode').comment_value, unicode_comment)

    def test_Clear(self):
        self.transactions_interface.new(self.transaction)
        count = self.transactions_interface.clear(self.asset_manager_id)
        self.assertEqual(count['transaction_count'], 1)
        self.assertGreater(count['position_count'], 0)
        results = self.transactions_interface.search(asset_manager_ids=[self.asset_manager_id])
        self.assertEqual(len(results), 0)

    def test_CashTransaction(self):
        transaction = generate_cash_transaction(asset_manager_id=self.asset_manager_id,
                                                asset_id='JPY',
                                                asset_book_id=self.asset_book.book_id,
                                                counterparty_book_id=self.counterparty_book.book_id)
        self.transactions_interface.new(transaction)
        transaction = self.transactions_interface.retrieve(transaction.asset_manager_id,
                                                           transaction.transaction_id)
        self.assertEqual(type(transaction), CashTransaction)

if __name__ == '__main__':
    unittest.main()


text:
<?php

class dmCoreLayoutHelper
{
  protected
    $dispatcher,
    $serviceContainer,
    $baseWebPath,
    $isHtml4,
    $isHtml5;

  public function __construct(sfEventDispatcher $dispatcher, dmBaseServiceContainer $serviceContainer)
  {
    $this->dispatcher = $dispatcher;
    $this->serviceContainer = $serviceContainer;

    $this->initialize();
  }

  protected function initialize()
  {
    $this->isHtml4 = 4 == $this->getDocTypeOption('version', 4);
    $this->isHtml5 = 5 == $this->getDocTypeOption('version', 5);
  }

  public function renderHead()
  {
    return
    $this->renderHttpMetas().
    $this->renderMetas().
    $this->renderStylesheets().
    $this->renderFavicon().
    $this->renderIeHtml5Fix().
    $this->renderHeadJavascripts();
  }

  public function renderBodyTag($options = array())
  {
    return $this->getHelper()->open('body', dmString::toArray($options));
  }

  protected function getDocTypeOption($name, $default)
  {
    $value = dmArray::get(sfConfig::get('dm_html_doctype'), $name, $default);

    if ('version' === $name && 1 == $value)
    {
      $value = '1.0';
    }

    return $value;
  }

  protected function isHtml5()
  {
    return $this->isHtml5;
  }

  public function renderDoctype()
  {
    if ($this->isHtml5())
    {
      $doctype = '<!DOCTYPE html>';
    }
    else if ($this->isHtml4)
    {
      $doctype = '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">';
    }
    else
    {
      $doctype = sprintf(
        '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML %s%s//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1%s.dtd">',
        $this->getDocTypeOption('version', '1.0'),
        '1.1' == $this->getDocTypeOption('version', '1.0') ? ''  : ' '.ucfirst(strtolower($this->getDocTypeOption('compliance', 'transitional'))),
        '1.1' == $this->getDocTypeOption('version', '1.0') ? '1' : '-'.strtolower($this->getDocTypeOption('compliance', 'transitional'))
      );
    }

    return $doctype."\n";
  }

  public function renderHtmlTag()
  {
    if ($this->isHtml5() || $this->isHtml4)
    {
      return '<html>';
    }

    $culture = $this->serviceContainer->getParameter('user.culture');

    return sprintf(
      '<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="%s" >',
      $culture,
      '1.1' == $this->getDocTypeOption('version', '1.0') ? '' : "lang=\"$culture\""
    );
  }

  protected function getMetas()
  {
    return array(
      'title'       => $this->getService('response')->getTitle(),
      'language'    => $this->serviceContainer->getParameter('user.culture'),
    );
  }

  public function renderMetas()
  {
    /*
     * Allow listeners of dm.response.filter_metas event
     * to filter and modify the metas list
     */
    $metas = $this->dispatcher->filter(
      new sfEvent($this, 'dm.layout.filter_metas'),
      $this->getMetas()
    )->getReturnValue();

    $metasHtml = '';
    foreach( $metas as $key => $value)
    {
      $value = htmlentities($value, ENT_COMPAT, 'UTF-8');
      if ('title' === $key)
      {
        $metasHtml .= '<title>'.$value.'</title>'."\n";
      }
      else
      {
        $metasHtml .= '<meta name="'.$key.'" content="'.$value.'" />'."\n";
      }
    }

    return $metasHtml;
  }

  public function renderHttpMetas()
  {
    $httpMetas = $this->getService('response')->getHttpMetas();

    $html = '';

    foreach($httpMetas as $httpequiv => $value)
    {
      $html .= '<meta http-equiv="'.$httpequiv.'" content="'.$value.'" />'."\n";
    }

    return $html;
  }

  public function renderStylesheets()
  {
    /*
     * Allow listeners of dm.layout.filter_stylesheets event
     * to filter and modify the stylesheets list
     */
    $stylesheets = $this->dispatcher->filter(
      new sfEvent($this, 'dm.layout.filter_stylesheets'),
      $this->getService('response')->getStylesheets()
    )->getReturnValue();

    $relativeUrlRoot = dmArray::get($this->serviceContainer->getParameter('request.context'), 'relative_url_root');

    $html = '';
    foreach ($stylesheets as $file => $options)
    {
      $stylesheetTag = '<link rel="stylesheet" type="text/css" media="'.dmArray::get($options, 'media', 'all').'" href="'.$relativeUrlRoot.$file.'" />';

      if (isset($options['condition']))
      {
        $stylesheetTag = sprintf('<!--[if %s]>%s<![endif]-->', $options['condition'], $stylesheetTag);
      }

      $html .= $stylesheetTag."\n";
    }

    sfConfig::set('symfony.asset.stylesheets_included', true);

    return $html;
  }

  /**
   * JavaScript libs declared in dm_js_head_inclusion
   * are declared in the <head> section
   */
  public function renderHeadJavascripts()
  {
    $javascripts = $this->serviceContainer->getService('response')->getHeadJavascripts();
    if(empty($javascripts))
    {
      return '';
    }

    $relativeUrlRoot = dmArray::get($this->serviceContainer->getParameter('request.context'), 'relative_url_root');

    $html = '';
    foreach($javascripts as $file => $options)
    {
      $html .= '<script type="text/javascript" src="'.($file{0} === '/' ? $relativeUrlRoot.$file : $file).'"></script>';
    }

    return $html;
  }

  public function renderJavascripts()
  {
    /*
     * Allow listeners of dm.layout.filter_javascripts event
     * to filter and modify the javascripts list
     */
    $javascripts = $this->dispatcher->filter(
      new sfEvent($this, 'dm.layout.filter_javascripts'),
      $this->serviceContainer->getService('response')->getJavascripts()
    )->getReturnValue();

    sfConfig::set('symfony.asset.javascripts_included', true);

    $relativeUrlRoot = dmArray::get($this->serviceContainer->getParameter('request.context'), 'relative_url_root');

    $html = '';
    foreach ($javascripts as $file => $options)
    {
      $html .= '<script type="text/javascript" src="'.($file{0} === '/' ? $relativeUrlRoot.$file : $file).'"></script>';
    }

    return $html;
  }

  public function renderIeHtml5Fix()
  {
    if ($this->isHtml5())
    {
      return '<!--[if IE]><script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script><![endif]-->';
    }

    return '';
  }

  protected function getJavascriptConfig()
  {
    $requestContext = $this->serviceContainer->getParameter('request.context');

    return array_merge($this->getService('response')->getJavascriptConfig(), array(
      'relative_url_root'  => $requestContext['relative_url_root'],
      'dm_core_asset_root' => $requestContext['relative_url_root'].'/'.sfConfig::get('dm_core_asset').'/',
      'script_name'        => sfConfig::get('sf_no_script_name') ? trim($requestContext['relative_url_root'], '/').'/' : $requestContext['script_name'].'/',
      'debug'              => sfConfig::get('sf_debug') ? true : false,
      'culture'            => $this->serviceContainer->getParameter('user.culture'),
      'module'             => $this->serviceContainer->getParameter('controller.module'),
      'action'             => $this->serviceContainer->getParameter('controller.action'),
      'authenticated'      => $this->getService('user')->isAuthenticated()
    ));
  }

  public function renderJavascriptConfig()
  {
    return '<script type="text/javascript">var dm_configuration = '.json_encode($this->getJavascriptConfig()).';</script>';
  }

  protected function getFavicon()
  {
    foreach(array('ico', 'png', 'gif') as $extension)
    {
      if (file_exists(sfConfig::get('sf_web_dir').'/favicon.'.$extension))
      {
        return 'favicon.'.$extension;
      }
    }
  }

  public function renderFavicon()
  {
    $favicon = $this->getFavicon();

    if ($favicon)
    {
      return sprintf('<link rel="shortcut icon" href="%s/%s" type="%s" />',
        dmArray::get($this->serviceContainer->getParameter('request.context'), 'relative_url_root'),
        $favicon,
        'image/x-icon'
      )."\n";
    }

    return '';
  }

  protected function getHelper()
  {
    return $this->serviceContainer->getService('helper');
  }

  protected function getService($name, $class = null)
  {
    return $this->serviceContainer->getService($name, $class);
  }
}