text:
package Sub::Name; # git description: v0.13-7-g79187d2
# ABSTRACT: (re)name a sub

#pod =pod
#pod
#pod =head1 SYNOPSIS
#pod
#pod     use Sub::Name;
#pod
#pod     subname $name, $subref;
#pod
#pod     $subref = subname foo => sub { ... };
#pod
#pod =head1 DESCRIPTION
#pod
#pod This module has only one function, which is also exported by default:
#pod
#pod =for stopwords subname
#pod
#pod =head2 subname NAME, CODEREF
#pod
#pod Assigns a new name to referenced sub.  If package specification is omitted in
#pod the name, then the current package is used.  The return value is the sub.
#pod
#pod The name is only used for informative routines (caller, Carp, etc).  You won't
#pod be able to actually invoke the sub by the given name.  To allow that, you need
#pod to do glob-assignment yourself.
#pod
#pod Note that for anonymous closures (subs that reference lexicals declared outside
#pod the sub itself) you can name each instance of the closure differently, which
#pod can be very useful for debugging.
#pod
#pod =head1 SEE ALSO
#pod
#pod =for :list
#pod * L<Sub::Identify> - for getting information about subs
#pod * L<Sub::Util> - set_subname is another implementation of C<subname>
#pod
#pod =for stopwords cPanel
#pod
#pod =head1 COPYRIGHT AND LICENSE
#pod
#pod This software is copyright (c) 2004, 2008 by Matthijs van Duin, all rights reserved;
#pod copyright (c) 2014 cPanel Inc., all rights reserved.
#pod
#pod This program is free software; you can redistribute it and/or modify
#pod it under the same terms as Perl itself.
#pod
#pod =cut

use 5.006;

use strict;
use warnings;

our $VERSION = '0.14';

use Exporter 5.57 'import';

our @EXPORT = qw(subname);
our @EXPORT_OK = @EXPORT;

use XSLoader;
XSLoader::load(
    __PACKAGE__,
    $VERSION,
);

1;

__END__

=pod

=encoding UTF-8

=head1 NAME

Sub::Name - (re)name a sub

=head1 VERSION

version 0.14

=head1 SYNOPSIS

    use Sub::Name;

    subname $name, $subref;

    $subref = subname foo => sub { ... };

=head1 DESCRIPTION

This module has only one function, which is also exported by default:

=for stopwords subname

=head2 subname NAME, CODEREF

Assigns a new name to referenced sub.  If package specification is omitted in
the name, then the current package is used.  The return value is the sub.

The name is only used for informative routines (caller, Carp, etc).  You won't
be able to actually invoke the sub by the given name.  To allow that, you need
to do glob-assignment yourself.

Note that for anonymous closures (subs that reference lexicals declared outside
the sub itself) you can name each instance of the closure differently, which
can be very useful for debugging.

=head1 SEE ALSO

=over 4

=item *

L<Sub::Identify> - for getting information about subs

=item *

L<Sub::Util> - set_subname is another implementation of C<subname>

=back

=for stopwords cPanel

=head1 AUTHOR

Matthijs van Duin <xmath@cpan.org>

=head1 CONTRIBUTORS

=for stopwords Karen Etheridge Florian Ragwitz Matthijs van Duin Reini Urban Dagfinn Ilmari Mannsåker gfx J.R. Mash

=over 4

=item *

Karen Etheridge <ether@cpan.org>

=item *

Florian Ragwitz <rafl@debian.org>

=item *

Matthijs van Duin <xmath-no-spam@nospam.cpan.org>

=item *

Reini Urban <rurban@cpanel.net>

=item *

Dagfinn Ilmari Mannsåker <ilmari@ilmari.org>

=item *

gfx <gfuji@cpan.org>

=item *

J.R. Mash <jmash.code@gmail.com>

=back

=head1 COPYRIGHT AND LICENSE

This software is copyright (c) 2004, 2008 by Matthijs van Duin, all rights reserved;
copyright (c) 2014 cPanel Inc., all rights reserved.

This program is free software; you can redistribute it and/or modify
it under the same terms as Perl itself.

=cut


text:
package kv_test

import (
	"context"
	"io"
	"testing"
	"time"

	"github.com/influxdata/influxdb/v2"
	"github.com/influxdata/influxdb/v2/kv"
	"go.uber.org/zap/zaptest"
)

type mockStore struct {
}

func (s mockStore) View(context.Context, func(kv.Tx) error) error {
	return nil
}

func (s mockStore) Update(context.Context, func(kv.Tx) error) error {
	return nil
}

func (s mockStore) Backup(ctx context.Context, w io.Writer) error {
	return nil
}

func TestNewService(t *testing.T) {
	s := kv.NewService(zaptest.NewLogger(t), mockStore{})

	if s.Config.SessionLength != influxdb.DefaultSessionLength {
		t.Errorf("Service session length should use default length when not set")
	}

	config := kv.ServiceConfig{
		SessionLength: time.Duration(time.Hour * 4),
	}

	s = kv.NewService(zaptest.NewLogger(t), mockStore{}, config)

	if s.Config != config {
		t.Errorf("Service config not set by constructor")
	}
}

redpajama_set_name: RedPajamaGithub


text:
#include <CQChartsRect.h>
#include <CQChartsUtil.h>
#include <CQPropertyView.h>
#include <CQStrParse.h>

CQUTIL_DEF_META_TYPE(CQChartsRect, toString, fromString)

int CQChartsRect::metaTypeId;

void
CQChartsRect::
registerMetaType()
{
  metaTypeId = CQUTIL_REGISTER_META(CQChartsRect);

  CQPropertyViewMgrInst->setUserName("CQChartsRect", "rectangle");
}

bool
CQChartsRect::
setValue(const QString &str, const Units &defUnits)
{
  Units units;
  BBox  bbox;

  if (! decodeString(str, units, bbox, defUnits))
    return false;

  units_ = units;
  bbox_  = bbox;

  return true;
}

CQChartsPosition
CQChartsRect::
center() const
{
  return Position(bbox_.getCenter(), units_);
}

CQChartsLength
CQChartsRect::
xRadius() const
{
  return Length(bbox_.getWidth()/2.0, units_);
}

CQChartsLength
CQChartsRect::
yRadius() const
{
  return Length(bbox_.getHeight()/2.0, units_);
}

QString
CQChartsRect::
toString() const
{
  if (isValid()) {
    auto ustr = CQChartsUnits::unitsString(units_);

    return QString("%1 %2 %3 %4 %5").
             arg(bbox_.getXMin()).arg(bbox_.getYMin()).
             arg(bbox_.getXMax()).arg(bbox_.getYMax()).arg(ustr);
  }
  else
    return QString();
}

bool
CQChartsRect::
decodeString(const QString &str, Units &units, BBox &bbox, const Units &defUnits)
{
  CQStrParse parse(str);

  if (! CQChartsUtil::parseBBox(parse, bbox, /*terminated*/false))
    return false;

  parse.skipSpace();

  if (! CQChartsUnits::decodeUnits(parse.getAt(), units, defUnits))
    return false;

  return true;
}


text:
elation.require(['elements.ui.item'], function() {
  elation.elements.define('ui.tab', class extends elation.elements.ui.item {
    init() {
      super.init();
      //this.tabname = this.args.name;
      this.defineAttributes({
        label: { type: 'string', set: this.updateLabel },
        count: { type: 'integer', default: 0, set: this.updateCount },
        selected: { type: 'boolean', default: false },
        tooltip: { type: 'string' }
      });
    }
    create() {
      elation.events.add(this, 'mouseover,mouseout,click', this);
    }
    hover() {
      this.addclass("state_hover");
      this.dispatchEvent({type: 'hover'});
    }
    unhover() {
      this.removeclass("state_hover");
      this.dispatchEvent({type: 'unhover'});
    }
    select() {
      this.selected = true;
      // FIXME - using the 'select' event causes issues if the tab contains an <input> or <textarea>, for now we throw both events but we should refactor code that uses 'select'
      this.dispatchEvent({type: 'select'});
      this.dispatchEvent({type: 'tabselect'});
      this.refreshChildren();
    }
    unselect() {
      this.selected = false;
      this.dispatchEvent({type: 'unselect'});
      this.dispatchEvent({type: 'tabunselect'});
    }
    mouseover(ev) {
      if (!this.disabled) {
        this.hover();
      }
    }
    mouseout(ev) {
      if (!this.disabled) {
        this.unhover();
      }
    }
    click(ev) {
      if (!this.disabled) {
        this.select();
      }
    }
    enable() {
      this.disabled = false;
    }
    disable() {
      this.disabled = true;
    }
    updateCount() {
      this.dispatchEvent({type: 'countchange', element: this, data: this.count});
    }
    updateLabel() {
      this.dispatchEvent({type: 'tablabelchange', element: this, data: this.label, bubbles: true});
    }
  });
});


text:
Bicluster Visualization
=========================


text:
'use strict';

describe('Controller: SwitchCtrl', function () {

  // load the controller's module
  beforeEach(module('flowsimUiApp'));

  var SwitchCtrl,
    scope;

  // Initialize the controller and a mock scope
  beforeEach(inject(function ($controller, $rootScope) {
    scope = $rootScope.$new();
    SwitchCtrl = $controller('SwitchCtrl', {
      $scope: scope
    });
  }));

  it('should attach a list of awesomeThings to the scope', function () {
  });
});


text:
require 'pi_piper'

# // The PING))) is triggered by a HIGH pulse of 2 or more microseconds.
# // Give a short LOW pulse beforehand to ensure a clean HIGH pulse:
# digitalWrite(triggerPin, LOW);
# delayMicroseconds(2);
# digitalWrite(triggerPin, HIGH);
# delayMicroseconds(5);
# digitalWrite(triggerPin, LOW);

# // The echo pin is used to read the signal from the PING))): a HIGH
# // pulse whose duration is the time (in microseconds) from the sending
# // of the ping to the reception of its echo off of an object.
# duration = utils::pulseIn(echoPin, HIGH, 100000L);

module PiPiper
  def wait_for_change(options, &block)
    pin = PiPiper::Pin.new(options)
    pin.wait_for_change
    if block.arity > 0
      block.call pin
    else
      pin.instance_exec &block
    end
  end

  def once_after(options, &block)
    options[:trigger] = options.delete(:goes) == :high ? :rising : :falling
    wait_for_change options, &block
  end
end

def distance(trigger_pin, echo_pin)
  puts "in distance"
  trigger_pin = PiPiper::Pin.new(pin: trigger_pin, direction: :out)
  trigger_pin.on
  sleep 0.00001
  trigger_pin.off

  ti, tf = 0, 0
  puts "waiting for high"
  PiPiper.once_after(pin: echo_pin, goes: :high) { ti = Time.now }
  puts "waiting for low"
  PiPiper.once_after(pin: echo_pin, goes: :low)  { tf = Time.now }
  puts "Distance: #{(tf - ti) * 34000 / 2} cm"
end

loop do
  puts "in loop"
  sleep 0.5
  distance 14, 15
end


text:
import angular from 'angular'
import uiRouter from 'angular-ui-router'

import Pages from 'src/pages'
import Components from 'src/components'
import Services from 'src/services'
import Directives from 'src/directives'

import configuration from './app.config'
import appComponent from './app.component'

angular.module('app', [
  uiRouter,
  Pages,
  Components,
  Services,
  Directives
])

.config(configuration)

.component('app', appComponent)


text:
#ifndef FBXFILESDK_FBXCORE_FBXCOLLECTION_KFBXCOLLECTION_H
#define FBXFILESDK_FBXCORE_FBXCOLLECTION_KFBXCOLLECTION_H

#include <fbxfilesdk/components/kbaselib/kaydaradef_h.h>
// FBX includes

#include <fbxfilesdk/kfbxplugins/kfbxobject.h>
#include <fbxfilesdk/kfbxplugins/kfbxsdkmanager.h>

#include <fbxfilesdk/kfbxevents/kfbxevents.h>

#include <fbxfilesdk/components/kbaselib/klib/kerror.h>

#include <fbxfilesdk/fbxfilesdk_nsbegin.h>

    class KFbxCriteria;

    /** This class contains objects.
      * \nosubgrouping
      * This class also provides access to global settings and take information.
      *
      */
    class KFBX_DLL KFbxCollection : public KFbxObject
    {
        KFBXOBJECT_DECLARE(KFbxCollection,KFbxObject);

        /**
        * \name Collection member management
        */
        //@{
        public:
            //! Delete all contained objects.
            virtual void    Clear();
            /** Add a member.
			  * \param pMember Object to be added.
			  */
            inline  void    AddMember(KFbxObject *pMember)      { ConnectSrcObject(pMember); }
            /** Remove a member.
			  * \param pMember Object to be removed.
			  */
            inline  void    RemoveMember(KFbxObject *pMember)   { DisconnectSrcObject(pMember); }
            /** Find a member.
			  * \param pfbxType Member type.
			  * \param pName Member name.
			  */
            template <class T> inline T *       FindMember(T const *pfbxType, const char *pName) { return FindSrcObject(pfbxType, pName); }
            /** Return the number of objects in the collection.
			  * \return The number of objects in the collection.
			  */
            inline int                          GetMemberCount () const { return GetSrcObjectCount(); }
            /** Return the number of objects of class T in the collection.
			  * \param pFBX_TYPE Member type.
			  * \return The number of objects of class T in the collection.
			  */
            template < class T > inline int     GetMemberCount (T const *pFBX_TYPE) const { return GetSrcObjectCount(T::ClassId); }
            /** Return the number of objects satisfying given criteria in the collection.
			  * \param pCriteria The given criteria
			  * \return The number of objects satisfying given criteria in the collection.
			  */
            int                                 GetMemberCount( KFbxCriteria pCriteria ) const;

            /** Return the index'th member of the collection.
			  * \param pIndex The member index.
			  * \return The index'th member of the collection.
			  */
            inline KFbxObject*                  GetMember (int pIndex=0) const                  { return GetSrcObject(pIndex); }
            /** Return the index'th member of class T in the collection.
			  * \param pFBX_TYPE Member type information.
			  * \param pIndex The member index.
			  * \return The index'th member of the collection.
			  */
            template < class T > inline T*      GetMember (T const *pFBX_TYPE, int pIndex=0) const  { return (T *)GetSrcObject(T::ClassId,pIndex); }

			/** Return the index'th member of the collection which satisfies given criteria.
			  * \param pCriteria The given criteria.
			  * \param pIndex The member index.
			  * \return The index'th member of the collection.
			  */
            KFbxObject*                         GetMember (KFbxCriteria pCriteria, int pIndex=0) const;
            /** Is an object part of the collection.
			  * \param pMember Whether pMember is part of the collection.
			  * \return \c True if is, \c false otherwise.
              */
            virtual bool    IsMember(KFbxObject *pMember) const;
        //@}

        /**
        * \name Selection managent
        */
        //@{
        public:
            /** Select/Unselect all contained objects.
			  * \param pSelection If \c true, all object are selected, otherwise all objects are unselected.
			  */
            virtual void    SetSelectedAll(bool pSelection);
            /** Select/Unselect objects.
			  * \param pObject
			  * \param pSelection If \c true, pObject are selected, otherwise pObject are unselected.
			  */
            virtual void    SetSelected(KFbxObject* pObject,bool pSelection);
            /** Get Select/Unselect .
			  * \param pObject Get whether pObject is selected or unselected.
			  */
            virtual bool    GetSelected(KFbxObject* pObject);
        //@}

    ///////////////////////////////////////////////////////////////////////////////
    //  WARNING!
    //  Anything beyond these lines may not be Collectioned accurately and is
    //  subject to change without notice.
    ///////////////////////////////////////////////////////////////////////////////
    #ifndef DOXYGEN_SHOULD_SKIP_THIS

        // Constructor / Destructor
        protected:
            virtual KFbxObject* Clone(KFbxObject* pContainer, KFbxObject::ECloneType pCloneType) const;
            KFbxCollection(KFbxSdkManager& pManager, char const* pName);
            ~KFbxCollection();
            virtual void Construct  (const KFbxCollection* pFrom);
            virtual void Destruct   (bool pRecursive, bool pDependents);

    #endif // #ifndef DOXYGEN_SHOULD_SKIP_THIS

    };

#include <fbxfilesdk/fbxfilesdk_nsend.h>

#endif // FBXFILESDK_FBXCORE_FBXCOLLECTION_KFBXCOLLECTION_H


text:
<!DOCTYPE html>

		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">

		<title>北京景韵装饰</title>
		<meta http-equiv="X-UA-Compatible" content="IE=Edge">
		<meta name="viewport" content="width=device-width, initial-scale=1">
		<meta name="keywords" content="">
		<meta name="description" content="">

		<link rel="icon" type="image/png" href="Image/logo.jpg">
		<link rel="stylesheet" type="text/css" href="./lib/bootstrap.css">
		<link rel="stylesheet" type="text/css" href="./lib/font-awesome.min.css">
		<link rel="stylesheet" href="./lib/animate.min.css">
		<link rel="stylesheet" href="./lib/templatemo-style.css">
		<link href="./lib/css.css" rel="stylesheet" type="text/css">
		<link href="./lib/banner.css" rel="stylesheet" type="text/css">

						<button class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">

						</button>

北京景韵装饰

首页

公司简介

组织结构

产品展示

联系我们

                    Image 01

北京景韵装饰

                    Image 02

十年品质

                    Image 03

百年服务

                        Image 04

值得信赖

公司简介

北京景韵建筑装饰有限公司

北京景韵建筑装饰有限公司成立于2007年,经过十年的发展,我公司已成为一家专业从事室内设计、室内装修等工作的公司。现今,我公司已具有一批专业从事室内设计、室内装修的人才队伍,成立至今,为上千家住宅、公司、酒店提供精装修工作,得到客户的广泛好评。

我公司以卓越的服务品质、专业安全的技术服务实力为不同的客户提供优质的服务。目前已在北京、江苏、山东、河北等多个省市开展工作。选择我们的理由:

节省开支:专业从事家庭、公司、酒店等精装修,模块清晰,流程规范,更有长达五年质保。

经验丰富:经过十年积累,我公司已形成一批专业从事室内设计、室内施工的队伍。

技术专业:我们的工程师不仅技术过硬,而且可以得到公司强大的支持,为您提供专业的服务。

阳光服务:以客户为上帝原则,直到您满意为止。

我们承诺:

承诺一:长达五年质保

承诺二:接到报修电话,迅速到达报修现场

承诺三:由于我们工程质量原因,免费维修并提供相应的补偿

组织结构

产品展示

联系我们

 市场部李经理

 :

 :874703091@qq.com

 :

 客服部刘经理

 :15052035985

:408383755@qq.com

                    	Copyright © 2017 北京景韵装饰


text:
package org.apache.jasper.compiler;

import java.io.File;
import java.util.HashMap;
import java.util.List;

import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;

import org.junit.Test;

import org.apache.catalina.startup.Tomcat;
import org.apache.catalina.startup.TomcatBaseTest;
import org.apache.tomcat.util.buf.ByteChunk;

/**
 * Tests are duplicated in {@link TestParserNoStrictWhitespace} with the strict
 * whitespace parsing disabled.
 */
public class TestParser extends TomcatBaseTest {

    @Test
    public void testBug48627() throws Exception {
        Tomcat tomcat = getTomcatInstance();

        File appDir =
            new File("test/webapp-3.0");
        // app dir is relative to server home
        tomcat.addWebapp(null, "/test", appDir.getAbsolutePath());

        tomcat.start();

        ByteChunk res = getUrl("http://localhost:" + getPort() +
                "/test/bug48nnn/bug48627.jsp");

        String result = res.toString();
        // Beware of the differences between escaping in JSP attributes and
        // in Java Strings
        assertEcho(result, "00-\\");
        assertEcho(result, "01-\\");
    }

    @Test
    public void testBug48668a() throws Exception {
        Tomcat tomcat = getTomcatInstance();

        File appDir =
            new File("test/webapp-3.0");
        // app dir is relative to server home
        tomcat.addWebapp(null, "/test", appDir.getAbsolutePath());

        tomcat.start();

        ByteChunk res = getUrl("http://localhost:" + getPort() +
                "/test/bug48nnn/bug48668a.jsp");
        String result = res.toString();
        assertEcho(result, "00-Hello world
#{foo.bar}");
        assertEcho(result, "01-Hello world
${foo.bar}");
        assertEcho(result, "10-Hello ${'foo.bar}");
        assertEcho(result, "11-Hello ${'foo.bar}");
        assertEcho(result, "12-Hello #{'foo.bar}");
        assertEcho(result, "13-Hello #{'foo.bar}");
        assertEcho(result, "14-Hello ${'foo}");
        assertEcho(result, "15-Hello ${'foo}");
        assertEcho(result, "16-Hello #{'foo}");
        assertEcho(result, "17-Hello #{'foo}");
        assertEcho(result, "18-Hello ${'foo.bar}");
        assertEcho(result, "19-Hello ${'foo.bar}");
        assertEcho(result, "20-Hello #{'foo.bar}");
        assertEcho(result, "21-Hello #{'foo.bar}");
        assertEcho(result, "30-Hello ${'foo}");
        assertEcho(result, "31-Hello ${'foo}");
        assertEcho(result, "32-Hello #{'foo}");
        assertEcho(result, "33-Hello #{'foo}");
        assertEcho(result, "34-Hello ${'foo}");
        assertEcho(result, "35-Hello ${'foo}");
        assertEcho(result, "36-Hello #{'foo}");
        assertEcho(result, "37-Hello #{'foo}");
        assertEcho(result, "40-Hello ${'foo}");
        assertEcho(result, "41-Hello ${'foo}");
        assertEcho(result, "42-Hello #{'foo}");
        assertEcho(result, "43-Hello #{'foo}");
        assertEcho(result, "50-Hello ${'foo}");
        assertEcho(result, "51-Hello ${'foo}");
        assertEcho(result, "52-Hello #{'foo}");
        assertEcho(result, "53-Hello #{'foo}");
    }

    @Test
    public void testBug48668b() throws Exception {
        Tomcat tomcat = getTomcatInstance();

        File appDir = new File("test/webapp-3.0");
        // app dir is relative to server home
        tomcat.addWebapp(null, "/test", appDir.getAbsolutePath());

        tomcat.start();

        ByteChunk res = getUrl("http://localhost:" + getPort() +
                "/test/bug48nnn/bug48668b.jsp");
        String result = res.toString();
        assertEcho(result, "00-Hello world
#{foo.bar}");
        assertEcho(result, "01-Hello world
#{foo2");
    }

    @Test
    public void testBug49297NoSpaceStrict() throws Exception {
        Tomcat tomcat = getTomcatInstance();

        File appDir = new File("test/webapp-3.0");
        // app dir is relative to server home
        tomcat.addWebapp(null, "/test", appDir.getAbsolutePath());

        tomcat.start();

        int sc = getUrl("http://localhost:" + getPort() +
                "/test/bug49nnn/bug49297NoSpace.jsp", new ByteChunk(),
                new HashMap<String,List<String>>());

        assertEquals(500, sc);
    }

    @Test
    public void testBug49297DuplicateAttr() throws Exception {
        Tomcat tomcat = getTomcatInstance();

        File appDir = new File("test/webapp-3.0");
        // app dir is relative to server home
        tomcat.addWebapp(null, "/test", appDir.getAbsolutePath());

        tomcat.start();

        int sc = getUrl("http://localhost:" + getPort() +
                "/test/bug49nnn/bug49297DuplicateAttr.jsp", new ByteChunk(),
                new HashMap<String,List<String>>());

        assertEquals(500, sc);
    }

    @Test
    public void testBug49297MultipleImport1() throws Exception {

        Tomcat tomcat = getTomcatInstance();

        File appDir = new File("test/webapp-3.0");
        // app dir is relative to server home
        tomcat.addWebapp(null, "/test", appDir.getAbsolutePath());

        tomcat.start();

        ByteChunk res = new ByteChunk();
        int sc = getUrl("http://localhost:" + getPort() +
                "/test/bug49nnn/bug49297MultipleImport1.jsp", res,
                new HashMap<String,List<String>>());

        assertEquals(200, sc);
        assertEcho(res.toString(), "OK");
    }

    @Test
    public void testBug49297MultipleImport2() throws Exception {

        Tomcat tomcat = getTomcatInstance();

        File appDir = new File("test/webapp-3.0");
        // app dir is relative to server home
        tomcat.addWebapp(null, "/test", appDir.getAbsolutePath());

        tomcat.start();

        ByteChunk res = new ByteChunk();
        int sc = getUrl("http://localhost:" + getPort() +
                "/test/bug49nnn/bug49297MultipleImport2.jsp", res,
                new HashMap<String,List<String>>());

        assertEquals(200, sc);
        assertEcho(res.toString(), "OK");
    }

    @Test
    public void testBug49297MultiplePageEncoding1() throws Exception {

        Tomcat tomcat = getTomcatInstance();

        File appDir = new File("test/webapp-3.0");
        // app dir is relative to server home
        tomcat.addWebapp(null, "/test", appDir.getAbsolutePath());

        tomcat.start();

        ByteChunk res = new ByteChunk();
        int sc = getUrl("http://localhost:" + getPort() +
                "/test/bug49nnn/bug49297MultiplePageEncoding1.jsp", res,
                new HashMap<String,List<String>>());

        assertEquals(500, sc);
    }

    @Test
    public void testBug49297MultiplePageEncoding2() throws Exception {

        Tomcat tomcat = getTomcatInstance();

        File appDir = new File("test/webapp-3.0");
        // app dir is relative to server home
        tomcat.addWebapp(null, "/test", appDir.getAbsolutePath());

        tomcat.start();

        ByteChunk res = new ByteChunk();
        int sc = getUrl("http://localhost:" + getPort() +
                "/test/bug49nnn/bug49297MultiplePageEncoding2.jsp", res,
                new HashMap<String,List<String>>());

        assertEquals(500, sc);
    }

    @Test
    public void testBug49297MultiplePageEncoding3() throws Exception {

        Tomcat tomcat = getTomcatInstance();

        File appDir = new File("test/webapp-3.0");
        // app dir is relative to server home
        tomcat.addWebapp(null, "/test", appDir.getAbsolutePath());

        tomcat.start();

        ByteChunk res = new ByteChunk();
        int sc = getUrl("http://localhost:" + getPort() +
                "/test/bug49nnn/bug49297MultiplePageEncoding3.jsp", res,
                new HashMap<String,List<String>>());

        assertEquals(500, sc);
    }

    @Test
    public void testBug49297MultiplePageEncoding4() throws Exception {

        Tomcat tomcat = getTomcatInstance();

        File appDir = new File("test/webapp-3.0");
        // app dir is relative to server home
        tomcat.addWebapp(null, "/test", appDir.getAbsolutePath());

        tomcat.start();

        ByteChunk res = new ByteChunk();
        int sc = getUrl("http://localhost:" + getPort() +
                "/test/bug49nnn/bug49297MultiplePageEncoding4.jsp", res,
                new HashMap<String,List<String>>());

        assertEquals(500, sc);
    }

    @Test
    public void testBug49297Tag() throws Exception {

        Tomcat tomcat = getTomcatInstance();

        File appDir = new File("test/webapp-3.0");
        // app dir is relative to server home
        tomcat.addWebapp(null, "/test", appDir.getAbsolutePath());

        tomcat.start();

        ByteChunk res = new ByteChunk();
        int sc = getUrl("http://localhost:" + getPort() +
                "/test/bug49nnn/bug49297Tag.jsp", res,
                new HashMap<String,List<String>>());

        assertEquals(200, sc);
        assertEcho(res.toString(), "OK");
    }

    /** Assertion for text printed by tags:echo */
    private static void assertEcho(String result, String expected) {
        assertTrue(result.indexOf("
" + expected + "
") > 0);
    }
}


text:
package org.openid4java.discovery.html;

import org.openid4java.discovery.DiscoveryException;

/**
 * Html parser.
 *
 * @author Sutra Zhou
 * @since 0.9.4
 * @see #parseHtml(String, HtmlResult)
 */
public interface HtmlParser
{
    /**
     * Parses the HTML data and stores in the result the discovered openid
     * information.
     *
     * @param htmlData
     *            HTML data obtained from the URL identifier.
     * @param result
     *            The HTML result.
     * @throws DiscoveryException
     */
    void parseHtml(String htmlData, HtmlResult result) throws DiscoveryException;
}


text:
package sh.komet.gui.search.flwor;

import javafx.beans.property.SimpleObjectProperty;
import sh.isaac.MetaData;
import sh.isaac.api.component.concept.ConceptSpecification;
import sh.isaac.api.query.JoinProperty;
import sh.isaac.api.query.JoinSpecification;
import sh.isaac.api.query.LetItemKey;

/**
 *
 * @author kec
 */
public class JoinSpecificationObservable implements JoinSpecification {
    SimpleObjectProperty<ConceptSpecification> firstAssemblageProperty
            = new SimpleObjectProperty<>(this, MetaData.ASSEMBLAGE_1_TO_JOIN____SOLOR.toExternalString());

    SimpleObjectProperty<ConceptSpecification> secondAssemblageProperty
            = new SimpleObjectProperty<>(this, MetaData.ASSEMBLAGE_2_TO_JOIN____SOLOR.toExternalString());

    SimpleObjectProperty<JoinProperty> firstFieldProperty
            = new SimpleObjectProperty<>(this, MetaData.FIELD_1_TO_JOIN____SOLOR.toExternalString());

    SimpleObjectProperty<JoinProperty> secondFieldProperty
            = new SimpleObjectProperty<>(this, MetaData.FIELD_2_TO_JOIN____SOLOR.toExternalString());

    SimpleObjectProperty<LetItemKey> stampCoordinateKeyProperty
            = new SimpleObjectProperty<>(this, MetaData.FILTER_FOR_VIEW____SOLOR.toExternalString());

    public JoinSpecificationObservable() {
    }

    public JoinSpecificationObservable(ConceptSpecification firstAssemblage,
            JoinProperty firstField,
            ConceptSpecification secondAssemblage,
            JoinProperty secondField,
            LetItemKey stampCoordinateKey) {
        firstAssemblageProperty.set(firstAssemblage);
        secondAssemblageProperty.set(secondAssemblage);
        firstFieldProperty.set(firstField);
        secondFieldProperty.set(secondField);
        stampCoordinateKeyProperty.set(stampCoordinateKey);
    }

    public JoinSpecificationObservable(JoinSpecification joinSpec) {
        firstAssemblageProperty.set(joinSpec.getFirstAssemblage());
        firstAssemblageProperty.addListener((observable, oldValue, newValue) -> {
            joinSpec.setFirstAssemblage(newValue);
        });
        secondAssemblageProperty.set(joinSpec.getSecondAssemblage());
        secondAssemblageProperty.addListener((observable, oldValue, newValue) -> {
            joinSpec.setSecondAssemblage(newValue);
        });
        firstFieldProperty.set(joinSpec.getFirstField());
        firstFieldProperty.addListener((observable, oldValue, newValue) -> {
            joinSpec.setFirstField(newValue);
        });
        secondFieldProperty.set(joinSpec.getSecondField());
        secondFieldProperty.addListener((observable, oldValue, newValue) -> {
            joinSpec.setSecondField(newValue);
        });

        stampCoordinateKeyProperty.set(joinSpec.getStampFilterKey());
        stampCoordinateKeyProperty.addListener((observable, oldValue, newValue) -> {
            joinSpec.setStampCoordinateKey(newValue);
        });
    }

    @Override
    public ConceptSpecification getFirstAssemblage() {
        return firstAssemblageProperty.get();
    }

    @Override
    public void setFirstAssemblage(ConceptSpecification firstAssemblage) {
        firstAssemblageProperty.set(firstAssemblage);
    }

    @Override
    public ConceptSpecification getSecondAssemblage() {
        return secondAssemblageProperty.get();
    }

    @Override
    public JoinProperty getSecondField() {
        return secondFieldProperty.get();
    }

    @Override
    public JoinProperty getFirstField() {
        return firstFieldProperty.get();
    }

    @Override
    public void setSecondAssemblage(ConceptSpecification assemblageToJoin) {
        this.secondAssemblageProperty.set(assemblageToJoin);
    }

    @Override
    public void setSecondField(JoinProperty joinField) {
        this.secondFieldProperty.set(joinField);
    }

    @Override
    public void setFirstField(JoinProperty sourceField) {
        this.firstFieldProperty.set(sourceField);
    }

    public SimpleObjectProperty<ConceptSpecification> firstAssemblageProperty() {
        return firstAssemblageProperty;
    }

    public SimpleObjectProperty<ConceptSpecification> secondAssemblageProperty() {
        return secondAssemblageProperty;
    }

    public SimpleObjectProperty<JoinProperty> firstFieldProperty() {
        return firstFieldProperty;
    }

    public SimpleObjectProperty<JoinProperty> secondFieldProperty() {
        return secondFieldProperty;
    }

    public SimpleObjectProperty<LetItemKey> stampCoordinateKeyProperty() {
        return stampCoordinateKeyProperty;
    }

    @Override
    public LetItemKey getStampFilterKey() {
        return stampCoordinateKeyProperty.get();
    }

    @Override
    public void setStampCoordinateKey(LetItemKey stampCoordinateKey) {
        this.stampCoordinateKeyProperty.set(stampCoordinateKey);
    }

}


text:
<sign-up-form
    [errorMessage]="errorMessage"
    (signUp)="onSignUp($event)"></sign-up-form>


text:
namespace DTA
{
    using System;

    using Common;

    using System.Collections.Generic;

    using Fairweather.Service;
    using Common.Sage;

    public static class DTA_Fields
    {
        static DTA_Fields() { }

        /* values */
        const string
        SAME_POS = Ini_Main.SAME_POS;
        #region values
        const string PURCHASES_ONLY = Ini_Main.PURCHASES_ONLY;
        const string ANY_POS = Ini_Main.ANY_POS;
        const string ANY = Ini_Main.ANY;

        const string NUMBER = Ini_Main.NUMBER;
        const string ALL = Ini_Main.ALL;

        const string CASH = Ini_Main.CASH;
        const string SUPER = Ini_Main.SUPER;
        const string NONE = Ini_Main.NONE;
        const string QTY = Ini_Main.QTY;
        const string AMOUNT = Ini_Main.AMOUNT;

        const string NO = Ini_Main.NO;
        const string YES = Ini_Main.YES;

        const string NVAT = Ini_Main.NVAT;
        const string VAT = Ini_Main.VAT;
        const string BOTH = Ini_Main.BOTH;

        const string ONE_HUNDRED = "100";
        const string DATE_FORMAT = Ini_Main.DATE_FORMAT;

        //{[A-Z_]+}.*
        //\1 = DTA_Main.\1;
        const string DATE = Ini_Main.DATE;
        const string UNPOSTED = Ini_Main.UNPOSTED;
        const string ACCOUNT = Ini_Main.ACCOUNT;
        const string POSTED_BY = Ini_Main.POSTED_BY;

        const string TEXT = Ini_Main.TEXT;
        const string WINDOWS = Ini_Main.WINDOWS;
        const string BIXOLON = Ini_Main.BIXOLON;
        const string OPOS = Ini_Main.OPOS;

        const string COURIER = Data.COURIER;
        const string LUCIDA = Data.LUCIDA;
        const string DEFAULT = Ini_Main.DEFAULT;

        const string PROMPT = Ini_Main.PROMPT;
        const string FROM_DTA = Ini_Main.FROM_DTA;

        #endregion

        #region helper methods

        static string Date(DateTime date) {

            return date.ToString(DATE_FORMAT);
        }

        //public static string
        //Get_Default_Value(string field) {

        //    DTA_Field dta_field;
        //    bool ok = rd_fields.TryGetValue(field, out dta_field);

        //    if (!ok)
        //        true.tift<ApplicationException>("Invalid field: " + field);

        //    return dta_field.Default_Value;

        //}

        //public static bool
        //Try_Get_Default_Value(string field, out string value) {

        //    DTA_Field dta_field;

        //    bool ret = rd_fields.TryGetValue(field, out dta_field);

        //    if (ret)
        //        value = dta_field.Default_Value;
        //    else
        //        value = null;

        //    return ret;

        //}

        //internal static int
        //Set_Default_Values(IReadWrite<string, string> destination,
        //   bool overwrite,
        //   bool set_required) {

        //    int ret = 0;

        //    foreach (var kvp in rd_fields) {

        //        string field = kvp.Key;

        //        string def_val = kvp.Value.Default_Value;

        //        if (!set_required) {

        //            bool is_required = kvp.Value.Is_Required;

        //            if (is_required)
        //                continue;

        //        }

        //        if (overwrite ||
        //        !destination.Contains(field) ||
        //        destination[field].IsNullOrEmpty()) {

        //            destination[field] = def_val;
        //            ++ret;

        //        }

        //    }

        //    return ret;

        //}

        ///// <summary>
        ///// Returns all keys which were not present in the source.
        ///// </summary>
        //public static bool
        //Verify(IContains<string> source, out List<string> missing) {

        //    bool ret = true;
        //    missing = new List<string>();
        //    foreach (var field in rd_fields.Keys) {

        //        if (!source.Contains(field)) {
        //            missing.Add(field);
        //            ret = false;
        //        }

        //    }

        //    return ret;

        //}

        ///// <summary>
        /////
        ///// All NON REQUIRED keys not present in the source are filled with their default values.
        ///// All REQUIRED keys not present in the source or with the empty string as value are entered
        /////     in "missing"
        /////
        ///// All NON REQUIRED keys present in the source are left alone.
        ///// All REQUIRED keys with non-empty values are left alone.
        /////
        ///// </summary>
        //public static bool
        //Verify_And_Fill(IReadWrite<string, string> source, out List<string> missing) {

        //    bool ret = true;
        //    missing = new List<string>();

        //    foreach (var kvp in rd_fields) {

        //        var field = kvp.Key;
        //        var dta_field = kvp.Value;
        //        bool required = dta_field.Is_Required;

        //        if (!required) {
        //            if (source.Contains(field))
        //                continue;
        //            else
        //                source[field] = dta_field.Default_Value;
        //        }

        //        if (source.Contains(field) &&
        //        !source[field].IsNullOrEmpty())
        //            continue;

        //        missing.Add(field);
        //        ret = false;

        //    }

        //    return ret;

        //}

        //public static Dictionary<string, DTA_Field> Fields {
        //    get {
        //        return new Dictionary<string, DTA_Field>(rd_fields);
        //    }
        //}

        //public static DTA_Field? Field(string field) {

        //    DTA_Field ret;
        //    if (!rd_fields.TryGetValue(field, out ret))
        //        return null;

        //    return ret;
        //}
        #endregion

        /* Definitions */

        /*       SES - General        */

        public static readonly Ini_Field MODULE_1 = new Ini_Field("MODULE_1_ENABLED");
        public static readonly Ini_Field MODULE_2 = new Ini_Field("MODULE_2_ENABLED");
        public static readonly Ini_Field MODULE_3 = new Ini_Field("MODULE_3_ENABLED");

        /*       Transactions entry screens        */

        public static readonly Ini_Field
        TE_default_bank_receipts = new Ini_Field("DEFAULT_BANK_RECEIPTS", "1200"),
        TE_default_bank_payments = new Ini_Field("DEFAULT_BANK_PAYMENTS", "1200"),
        TE_jx_against_debtors_creditors_ctrl = new Ini_Field("JX_AGAINST_DEBTORS_CREDITORS_CTRL", NO),
        TE_sales_ref_check = new Ini_Field("SALES_REF_CHECK", Ini_Main.ONDEMAND),
        TE_purchase_ref_check = new Ini_Field("PURCHASE_REF_CHECK", Ini_Main.AUTO),
        TE_max_details_history_length = new Ini_Field(cst_max_details_history_length, "100"),
        TE_posted_report = new Ini_Field("POSTED_REPORT", YES)
        ;

        /*       Supplier Payments / Customer Receipts screens        */

        public static readonly Ini_Field
        ESF_purchase_discount_details = new Ini_Field("PURCHASE_DISCOUNT_DETAILS", "Purchase Discount"),
        #region
 ESF_purchase_receipt_details = new Ini_Field("PURCHASE_RECEIPT_DETAILS", "Purchase Receipt"),
        ESF_sales_discount_details = new Ini_Field("SALES_DISCOUNT_DETAILS", "Sales Discount"),
        ESF_sales_receipt_details = new Ini_Field("SALES_RECEIPT_DETAILS", "Sales Receipt"),
        ESF_post_remittance_by_number = new Ini_Field("POST_REMITTANCE_BY_NUMBER", NO);
        #endregion

        /*       Point of Sales screen        */

        public static readonly Ini_Field
        POS_end_of_day_security = new Ini_Field("END_OF_DAY_SECURITY", CASH),
        POS_confirm_invoice = new Ini_Field(cst_confirm_invoice, YES),
        POS_confirm_receipt = new Ini_Field(cst_confirm_receipt, YES),
        POS_confirm_payment = new Ini_Field(cst_confirm_payment, YES),
        POS_price_reverse_calculate = new Ini_Field(cst_price_reverse_calculate, YES),
        #region
 POS_avg_cost_calculation_mode = new Ini_Field("AVERAGE_COST_CALCULATION_MODE", PURCHASES_ONLY),
        POS_start_maximized = new Ini_Field(cst_start_maximized, YES),
        POS_pos_id = new Ini_Field(cst_pos_id, "1"),
        POS_z_ser_number = new Ini_Field(cst_z_ser_number, "0"),
        POS_last_date_eos_ran = new Ini_Field(cst_last_date_eos_ran, Date(DateTime.MinValue)),

        POS_select_customer_before_data_entry = new Ini_Field(cst_select_customer_before_data_entry, NO),
        POS_launch_with_duplicates = new Ini_Field(cst_launch_with_duplicates, NO),
        POS_restrict_access_to = new Ini_Field("RESTRICT_ACCESS_TO", ""),

        POS_allow_credit_note_refunds = new Ini_Field(cst_allow_credit_note_refunds, NO),
            //POS_allow_sale_of_duplicate_items = new Ini_Field(cst_allow_sale_of_duplicate_items,  NO),
        POS_allow_surcharge = new Ini_Field(cst_allow_surcharge, NONE),
        POS_allow_zero_priced_items = new Ini_Field(cst_allow_zero_priced_items, NO),
        POS_date_editable = new Ini_Field(cst_date_editable, SUPER),

        POS_search_name = new Ini_Field(cst_search_name, YES),
        POS_search_address = new Ini_Field(cst_search_address, YES),
        POS_search_phone = new Ini_Field(cst_search_phone, YES),
        POS_search_email = new Ini_Field(cst_search_email, NO),
        POS_search_contact = new Ini_Field(cst_search_contact, NO),
        POS_search_country = new Ini_Field(cst_search_country, NO),
        POS_search_case_sensitive = new Ini_Field(cst_search_case_sensitive, NO),

        /*       Weight and price barcodes        */

        POS_use_weight_barcodes = new Ini_Field(cst_use_weight_barcodes, NO),
        POS_use_price_barcodes = new Ini_Field(cst_use_price_barcodes, NO),

        POS_price_prefix_start = new Ini_Field(cst_price_prefix_start, "0"),
        POS_weight_prefix_start = new Ini_Field(cst_weight_prefix_start, "0"),

        // Caution - Modifying these default PW barcode settings
            // by hand may cause the BarcodeStructureDialog to malfunction.
            // Let the users set them up themselves.
        POS_price_prefix = new Ini_Field(cst_price_prefix, "PRC"),
        POS_weight_prefix = new Ini_Field(cst_weight_prefix, "WGT"),

        POS_price_barcode_length = new Ini_Field(cst_price_barcode_length, "13"),
        POS_weight_barcode_length = new Ini_Field(cst_weight_barcode_length, "13"),

        POS_price_code_start = new Ini_Field(cst_price_code_start, "7"),
        POS_weight_code_start = new Ini_Field(cst_weight_code_start, "7"),

        POS_price_code_length = new Ini_Field(cst_price_code_length, "5"),
        POS_weight_code_length = new Ini_Field(cst_weight_code_length, "5"),

        POS_price_product_start = new Ini_Field(cst_price_product_start, "3"),
        POS_weight_product_start = new Ini_Field(cst_weight_product_start, "3"),

        POS_price_product_length = new Ini_Field(cst_price_product_length, "4"),
        POS_weight_product_length = new Ini_Field(cst_weight_product_length, "4"),

        POS_weight_decimals = new Ini_Field(cst_weight_decimals, "3"),

        /*       Barcodes        */

        POS_barcode1 = new Ini_Field(cst_barcode1, Sage_Fields.StockRecord.Barcode_Fields[0].Name),
        POS_barcode2 = new Ini_Field(cst_barcode2, Sage_Fields.StockRecord.Barcode_Fields[1].Name),
        POS_barcode3 = new Ini_Field(cst_barcode3, Sage_Fields.StockRecord.Barcode_Fields[2].Name),

        POS_use_barcode1 = new Ini_Field(cst_use_barcode1, YES),
        POS_use_barcode2 = new Ini_Field(cst_use_barcode2, NO),
        POS_use_barcode3 = new Ini_Field(cst_use_barcode3, NO),

        POS_cash_payments_expense_account_locked = new Ini_Field(cst_cash_payments_expense_account_locked, YES),
        POS_receipts_account_locked = new Ini_Field(cst_receipts_account_locked, NO),

        POS_def_payments_account = new Ini_Field(cst_def_payments_account, "9999"),
        POS_def_sales_bank = new Ini_Field(cst_def_sales_bank, "1200"),
        POS_def_cash_account = new Ini_Field(cst_def_cash_account, "CASH"),

        POS_lines_cancellation_allowed_to = new Ini_Field(cst_lines_cancellation_allowed_to, CASH),
        POS_invoice_cancellation_allowed_to = new Ini_Field(cst_invoice_cancellation_allowed_to, CASH),
        POS_qty_decrease_allowed_to = new Ini_Field(cst_qty_decrease_allowed_to, CASH),

        POS_discount_distribution_mode = new Ini_Field(cst_discount_distribution_mode, QTY),
        POS_display_prices_with = new Ini_Field(cst_display_prices_with, VAT),

        POS_max_line_disc_perc_cashier = new Ini_Field(cst_max_line_disc_perc_cashier, ONE_HUNDRED),
        POS_max_line_disc_perc_super = new Ini_Field(cst_max_line_disc_perc_super, ONE_HUNDRED),
        POS_max_total_disc_perc_cashier = new Ini_Field(cst_max_total_disc_perc_cashier, ONE_HUNDRED),
        POS_max_total_disc_perc_super = new Ini_Field(cst_max_total_disc_perc_super, ONE_HUNDRED),
        POS_max_rounding_discount_amount = new Ini_Field(cst_max_rounding_discount_amount, "10.00"),

        POS_printout_count_sale = new Ini_Field(cst_printout_count_sale, "3"),
        POS_printout_count_receipt = new Ini_Field(cst_printout_count_receipt, "3"),
        POS_printout_count_eos = new Ini_Field(cst_printout_count_eos, "1"),

        POS_super_pass = new Ini_Field(cst_super_pass, "123321"),

        POS_calculate_days_documents_scanning = new Ini_Field(cst_calculate_days_documents_scanning, DATE),
        POS_calculate_unposted_balance_scanning = new Ini_Field(cst_calculate_unposted_balance_scanning, UNPOSTED),

        POS_no_payment_for_transactions = new Ini_Field(cst_no_payment_for_transactions, NO),
        POS_select_cash_account_automatically = new Ini_Field(cst_select_cash_account_automatically, YES),
        POS_cache_customer_accounts = new Ini_Field(cst_cache_customer_accounts, NO),

        POS_printing_provider = new Ini_Field(cst_printing_provider, TEXT),

        POS_printing_txt_open_dir = new Ini_Field(cst_printing_txt_open_dir, YES),
        POS_printing_txt_open_file = new Ini_Field(cst_printing_txt_open_file, NO),
        POS_printing_txt_print_tags = new Ini_Field(cst_printing_txt_print_tags, NO),

        POS_printing_gdi_print_dialog = new Ini_Field(cst_printing_gdi_print_dialog, YES),
        POS_printing_gdi_page_setup = new Ini_Field(cst_printing_gdi_page_setup, YES),
        POS_printing_gdi_preview = new Ini_Field(cst_printing_gdi_preview, YES),

        POS_printing_gdi_printer = new Ini_Field(cst_printing_gdi_printer, DEFAULT),

        POS_printing_gdi_font_face = new Ini_Field(cst_printing_gdi_font_face, COURIER),
        POS_printing_gdi_font_size = new Ini_Field(cst_printing_gdi_font_size, "8"),
        POS_printing_gdi_page_width = new Ini_Field(cst_printing_gdi_page_width, "80"),
        POS_printing_gdi_dpi = new Ini_Field(cst_printing_gdi_dpi, "96"),

        POS_printing_opos_image_dpi = new Ini_Field("OPOS_IMAGE_DPI", "96"),
        POS_printing_opos_keep_open = new Ini_Field("OPOS_KEEP_OPEN", YES),
        POS_printing_opos_cut_paper_perc = new Ini_Field(cst_printing_opos_cut_paper_perc, "90"),
        POS_printing_opos_hiq_letters = new Ini_Field(cst_printing_opos_hiq_letters, NO),
        POS_printing_opos_logical_name = new Ini_Field(cst_printing_opos_logical_name, NONE),
            // "MICROSOFT POSPRINTER SIMULATOR"),

        POS_calculate_unposted = new Ini_Field(cst_calculate_unposted, NO),

        POS_document_editing_permissions = new Ini_Field(cst_document_editing_permissions, NONE),
        POS_document_viewing_permissions = new Ini_Field(cst_document_viewing_permissions, ANY),

        POS_view_product_details = new Ini_Field(cst_view_product_details, CASH),

        POS_auto_sales_history_display = new Ini_Field(cst_auto_sales_history_display, NONE),
        POS_auto_calculate_unposted_stock = new Ini_Field(cst_auto_calculate_unposted_stock, YES);

        #endregion

        /*       SES Quick Search Form        */

        public static readonly Ini_Field
        QSF_bank_sort = new Ini_Field("QSF_BANK_SORT"),
        QSF_customer_sort = new Ini_Field("QSF_CUSTOMER_SORT"),
        QSF_supplier_sort = new Ini_Field("QSF_SUPPLIER_SORT");

        /*       Interface Tools        */
        [Obsolete]
        public static readonly Ini_Field

        IT_records_module = new Ini_Field("RECORDS_MODULE"),
        IT_trans_module = new Ini_Field("TRANSACTIONS_MODULE"),
        IT_docs_module = new Ini_Field("DOCUMENTS_MODULE");

        public static readonly Ini_Field
        // FIELDS COMMON ACROSS MODULES

        IT_current_period = new Ini_Field("CURRENT_PERIOD"),
        IT_output_success_csv = new Ini_Field("OUTPUT_SUCCESS_CSV", YES),
        IT_check_bank_audit_type = new Ini_Field("CHECK_BANK_AUDIT_TYPE", YES),
        IT_change_bank_audit_type = new Ini_Field("CHANGE_BANK_AUDIT_TYPE", NO),
        IT_group_transactions_sales = new Ini_Field("GROUP_TRANSACTIONS_SALES", YES),
        IT_group_transactions_purchase = new Ini_Field("GROUP_TRANSACTIONS_PURCHASE", YES),
        IT_invoice_numbering_auto = new Ini_Field("DOCUMENTS_AUTO_NUMBERING", YES),
        IT_invoice_items_relative_grouping = new Ini_Field("ITEMS_RELATIVE_GROUPING", YES),

        // IT_sageusr_path = new Ini_Field("sageusr_path"), // USR_FILE_PATH
            // IT_serial_number = new Ini_Field("serial_number"), // PIN, i think
            // IT_sdo_activation_key = new Ini_Field("sdo_activation_key"), // let's quietly ditch these two
            // IT_sdo_serial_number = new Ini_Field("sdo_serial_number"),
            /*       company        */

        //IT_sage_username = new Ini_Field("sage_user_name"), // USERNAME
            //IT_sage_password = new Ini_Field("sage_password"),  // PASSWORD
            //IT_company_path = new Ini_Field("company_path"),    // COMPANY_PATH
            //IT_company_name = new Ini_Field("company_name"),    // COMPANY_NAME

        // FIELDS SPECIFIC TO A MODULE

        IT_dynamic_import_file_layout = new Ini_Field("DYNAMIC_IMPORT_FILE_LAYOUT", YES),
        IT_new_account_auto_date_entry = new Ini_Field("NEW_ACCOUNT_AUTO_DATE_ENTRY", YES),
        IT_blank_fields_overwrite = new Ini_Field("BLANK_FIELDS_OVERWRITE", NO),
        IT_use_mappings = new Ini_Field("USE_MAPPINGS", NO),
        IT_use_defaults = new Ini_Field("USE_DEFAULTS", YES)

        // static string def_exchange_rate = "0000000000";//"1111111111";
            // static string def_reval = "0000000000";//"1111111111";

        ;

        /* static string def_report = "1111111111";
        static string def_dynamic = "1111111111";
        static string def_auto_date = "1111111111";
        static string def_overwrite = "0000000000";
        static string def_group_sales = "1111111111";
        static string def_group_purchase = "1111111111";
        static string def_defaults = "1111111111";
        static string def_mappings = "0000000000";

        // ************************************************
        /*       FIELDS COMMON TO AT LEAST 2 APPS        */
        // ************************************************

        /*       Company Specific        */

        public static readonly Ini_Field COMPANY_PATH = new Ini_Field("COMPANY_PATH");
        // the company name as it was during registration
        public static readonly Ini_Field COMPANY_NAME = new Ini_Field("COMPANY_NAME");
        public static readonly Ini_Field COMPANY_NUMBER = new Ini_Field("COMPANY_NUMBER");
        public static readonly Ini_Field USERNAME = new Ini_Field("USERNAME");
        public static readonly Ini_Field PASSWORD = new Ini_Field("PASSWORD");
        public static readonly Ini_Field USR_FILE_PATH = new Ini_Field("PATH");

        /*       Program-wide        */

        public static readonly Ini_Field CREDENTIALS_SOURCE = new Ini_Field("CREDENTIALS_SOURCE");
        public static readonly Ini_Field ACTIVATION_KEY = new Ini_Field("ACTIVATION_KEY");
        public static readonly Ini_Field PIN = new Ini_Field("PIN");
        public static readonly Ini_Field DEFAULT_COMPANY = new Ini_Field("DEFAULT_COMPANY");

        public static readonly Ini_Field DEBUG = new Ini_Field("DEBUG");
        public static readonly Ini_Field VERSION = new Ini_Field("VERSION");

        public static readonly Ini_Field MAX_COMPANIES = new Ini_Field("MAX_COMPANIES");
        public static readonly Ini_Field NUMBER_OF_COMPANIES = new Ini_Field("NUMBER_OF_COMPANIES");

        public static readonly Ini_Field ONLY_DEFAULT_COMPANY = new Ini_Field("ONLY_DEFAULT_COMPANY", NO);

        public static readonly Ini_Field ALLOW_REMOVING_USERS = new Ini_Field("ALLOW_REMOVING_USERS", NO);

        // {\d} = new Ini_Field("
        // \1 = new Ini_Field(Global.Get_Tech_Support_Key(\1), "
        public static readonly Ini_Field
        TECH_1 = new Ini_Field(Data.Get_Tech_Support_Key(1), "InfoTrends Ltd"),
        TECH_2 = new Ini_Field(Data.Get_Tech_Support_Key(2), "16, Zenas Kanther Street"),
        TECH_3 = new Ini_Field(Data.Get_Tech_Support_Key(3), "1065 Nicosia, Cyprus"),
        TECH_4 = new Ini_Field(Data.Get_Tech_Support_Key(4), "Mail Address:"),
        TECH_5 = new Ini_Field(Data.Get_Tech_Support_Key(5), "P.O. Box 27778"),
        TECH_6 = new Ini_Field(Data.Get_Tech_Support_Key(6), "2433 Nicosia, Cyprus"),
        TECH_7 = new Ini_Field(Data.Get_Tech_Support_Key(7), "Tel: +357 99 677133"),
        TECH_8 = new Ini_Field(Data.Get_Tech_Support_Key(8), "Fax: +357 22 666033");

        /* field name constants (why???) */
        public const string
        #region
 cst_confirm_invoice = "CONFIRM_INVOICE",
        cst_confirm_receipt = "CONFIRM_RECEIPT",
        cst_confirm_payment = "CONFIRM_PAYMENT",
        cst_max_details_history_length = "MAX_DETAILS_HISTORY_LENGTH",

        cst_auto_calculate_unposted_stock = "AUTO_CALCULATE_UNPOSTED_STOCK_BALANCE",

        // NONE, DATE, NUMBER, ALL !!! NOT ANY
        cst_auto_sales_history_display = "AUTO_SALES_HISTORY_DISPLAY",

        cst_view_product_details = "VIEW_PRODUCT_DETAILS",

        cst_document_viewing_permissions = "DOCUMENT_VIEWING_PERMISSIONS",

        cst_document_editing_permissions = "DOCUMENT_EDITING_PERMISSIONS",

        cst_calculate_unposted = "AUTO_CALCULATE_UNPOSTED_BALANCE",

        cst_printing_opos_hiq_letters = "OPOS_PRINTING_HI_QUALITY_LETTERS",
        cst_printing_opos_logical_name = "OPOS_PRINTING_LOGICAL_NAME",
        cst_printing_opos_cut_paper_perc = "OPOS_PAPER_CUT_PERC",

        cst_printing_gdi_dpi = "GDI_PRINTER_RESOLUTION",
        cst_printing_gdi_printer = "GDI_PRINTING_PRINTER",
        cst_printing_gdi_preview = "GDI_PRINTING_SHOW_PREVIEW",
        cst_printing_gdi_page_setup = "GDI_PRINTING_SHOW_PAGE_SETUP",
        cst_printing_gdi_print_dialog = "GDI_PRINTING_SHOW_PRINT_DIALOG",
        cst_printing_gdi_font_face = "GDI_PRINTING_FONT_FACE",
        cst_printing_gdi_font_size = "GDI_PRINTING_FONT_SIZE",
        cst_printing_gdi_page_width = "GDI_PRINTING_PAGE_WIDTH",

        cst_printing_txt_print_tags = "TXT_PRINTING_PRINT_TAGS",
        cst_printing_txt_open_file = "TXT_PRINTING_OPEN_FILE",
        cst_printing_txt_open_dir = "TXT_PRINTING_OPEN_DIR",

        cst_printing_provider = "PRINTING_PROVIDER",

        cst_price_reverse_calculate = "PRICE_BARCODE_REVERSE_CALCULATE_QTY",

        cst_price_prefix_start = "PRICE_PREFIX_START",
        cst_weight_prefix_start = "WEIGHT_PREFIX_START",

        cst_price_barcode_length = "PRICE_BARCODE_LENGTH",
        cst_weight_barcode_length = "WEIGHT_BARCODE_LENGTH",

        cst_weight_decimals = "WEIGHT_DECIMALS",

        cst_weight_code_length = "WEIGHT_CODE_LENGTH",
        cst_price_code_length = "PRICE_CODE_LENGTH",

        cst_weight_code_start = "WEIGHT_CODE_START",
        cst_price_code_start = "PRICE_CODE_START",

        cst_weight_prefix = "WEIGHT_PREFIX",
        cst_price_prefix = "PRICE_PREFIX",

        cst_price_product_length = "PRICE_PRODUCT_LENGTH",
        cst_weight_product_length = "WEIGHT_PRODUCT_LENGTH",

        cst_price_product_start = "PRICE_PRODUCT_START",
        cst_weight_product_start = "WEIGHT_PRODUCT_START",

        cst_use_price_barcodes = "USE_PRICE_BARCODES",
        cst_use_weight_barcodes = "USE_WEIGHT_BARCODES",

        cst_start_maximized = "START_MAXIMIZED",

        cst_cash_payments_expense_account_locked = "CASH_PAYMENTS_EXPENSE_ACCOUNT_LOCKED",

        cst_receipts_account_locked = "RECEIPTS_EXPENSE_ACCOUNT_LOCKED",

        cst_z_ser_number = "Z_SER_NUMBER",

        /// <summary> dd/MM/yyyy </summary>
        cst_last_date_eos_ran = "LAST_DATE_EOS_RAN",

        cst_launch_with_duplicates = "LAUNCH_WITH_DUPLICATES",

        // Cash/Super/None
        cst_date_editable = "DATE_EDITABLE",

        cst_select_customer_before_data_entry = "SELECT_CUSTOMER_BEFORE_DATA_ENTRY",

        cst_search_address = "SEARCH_ADDRESS",
        cst_search_phone = "SEARCH_PHONE",
        cst_search_email = "SEARCH_EMAIL",
        cst_search_contact = "SEARCH_CONTACT",
        cst_search_name = "SEARCH_NAME",
        cst_search_country = "SEARCH_COUNTRY",
        cst_search_case_sensitive = "SEARCH_CASE_SENSITIVE",

        cst_def_cash_account = "DEF_CASH_ACCOUNT",
        cst_def_sales_bank = "DEF_SALES_BANK",
        cst_def_payments_account = "DEF_CASH_PAYMENTS_EXPENSE_ACCOUNT",

        cst_allow_credit_note_refunds = "ALLOW_CREDIT_NOTE_REFUNDS",
        cst_allow_surcharge = "ALLOW_SURCHARGE",

        cst_allow_zero_priced_items = "ALLOW_ZERO_PRICED_ITEMS",

        cst_barcode1 = "BARCODE1",
        cst_barcode2 = "BARCODE2",
        cst_barcode3 = "BARCODE3",

        cst_use_barcode1 = "USE_BARCODE1",
        cst_use_barcode2 = "USE_BARCODE2",
        cst_use_barcode3 = "USE_BARCODE3",

        // QTY or TOTAL
        cst_discount_distribution_mode = "DISCOUNT_DISTRIBUTION_MODE",
            // VAT or NVAT
        cst_display_prices_with = "DISPLAY_PRICES_WITH",

        cst_invoice_cancellation_allowed_to = "INVOICE_CANCELLATION_ALLOWED_TO",
        cst_lines_cancellation_allowed_to = "LINES_CANCELLATION_ALLOWED_TO",

        cst_max_line_disc_perc_cashier = "MAX_LINE_DISC_PERC_CASHIER",
        cst_max_line_disc_perc_super = "MAX_LINE_DISC_PERC_SUPER",
        cst_max_rounding_discount_amount = "MAX_ROUNDING_DISCOUNT_AMOUNT",
        cst_max_total_disc_perc_cashier = "MAX_TOTAL_DISC_PERC_CASHIER",
        cst_max_total_disc_perc_super = "MAX_TOTAL_DISC_PERC_SUPER",

        cst_num_digits_in_prefix = "NUM_DIGITS_IN_PREFIX",

        cst_pos_id = "POS_NUMBER",
        cst_printout_count_sale = "PRINTOUT_COUNT_SALE",
        cst_printout_count_receipt = "PRINTOUT_COUNT_RECEIPT",
        cst_printout_count_eos = "PRINTOUT_COUNT_EOS",

        cst_qty_decrease_allowed_to = "QTY_DECREASE_ALLOWED_TO",

        cst_super_pass = "SUPER_PASS",

        cst_select_cash_account_automatically = "SELECT_CASH_ACCOUNT_AUTOMATICALLY",
        cst_cache_customer_accounts = "CACHE_CUSTOMER_ACCOUNTS",
        cst_no_payment_for_transactions = "NO_PAYMENT_FOR_TRANSACTIONS",

        // ACCOUNT or UNPOSTED
        cst_calculate_unposted_balance_scanning = "CALCULATE_UNPOSTED_BALANCE_SCANNING",

        // POSTED_BY or DATE
        cst_calculate_days_documents_scanning = "CALCULATE_DAYS_DOCUMENTS_SCANNING";

        [Obsolete]
        public const string
        cst_allow_sale_of_duplicate_items = "ALLOW_SALE_OF_DUPLICATE_ITEMS",

        cst_rounding_discounts_allowed_to = "ROUNDING_DISCOUNTS_ALLOWED_TO",

        cst_line_discounts_allowed_to = "LINE_DISCOUNTS_ALLOWED_TO",

        cst_total_discounts_allowed_to = "TOTAL_DISCOUNTS_ALLOWED_TO";

        #endregion

        /*       Indices        */
        // KEEP AT THE BOTTOM!

        public static readonly Set<Ini_Field>
        Tech_Support = new Set<Ini_Field>
        {
            TECH_1 ,
            #region
            TECH_2 ,
            TECH_3 ,
            TECH_4 ,
            TECH_5 ,
            TECH_6 ,
            TECH_7 ,
            TECH_8 ,
            #endregion
        },

        General_Settings = new Set<Ini_Field>
        {
            ACTIVATION_KEY,
            #region
            PIN,
            DEFAULT_COMPANY,

            MODULE_1,
            MODULE_2,
            MODULE_3,

            USR_FILE_PATH,
            VERSION,
            NUMBER_OF_COMPANIES,
            ONLY_DEFAULT_COMPANY,
            ALLOW_REMOVING_USERS,
            //{COMPANY_PATH, Required},
            //{COMPANY_NAME, Required},
            //{COMPANY_NUMBER, Required},

            //{SESDTA, Required},

            //{USERNAME, Required},
            //{PASSWORD, Required},
            #endregion
        },

        POS_Fields = new Set<Ini_Field>
        {
            POS_end_of_day_security,
            POS_price_reverse_calculate,
            #region
            POS_restrict_access_to,
            POS_avg_cost_calculation_mode,
            POS_start_maximized,
            POS_pos_id ,
            POS_z_ser_number,
            POS_last_date_eos_ran,

            POS_select_customer_before_data_entry,
            POS_launch_with_duplicates,

            POS_allow_credit_note_refunds,
            //POS_allow_sale_of_duplicate_items,
            POS_allow_surcharge,
            POS_allow_zero_priced_items,
            POS_date_editable,

            POS_search_name,
            POS_search_address,
            POS_search_phone,
            POS_search_email,
            POS_search_contact,
            POS_search_country,
            POS_search_case_sensitive,

            /*       Weight and price barcodes        */

            POS_use_weight_barcodes ,
            POS_use_price_barcodes ,

            POS_price_prefix_start,
            POS_weight_prefix_start,

            // Caution - Modifying these default PW barcode settings
            // by hand may cause the BarcodeStructureDialog to malfunction.
            // Let the users set them up themselves.
            POS_price_prefix,
            POS_weight_prefix,

            POS_price_barcode_length,
            POS_weight_barcode_length,

            POS_price_code_start,
            POS_weight_code_start,

            POS_price_code_length,
            POS_weight_code_length,

            POS_price_product_start ,
            POS_weight_product_start ,

            POS_price_product_length,
            POS_weight_product_length,

            POS_weight_decimals,

            /*       Barcodes        */

            POS_barcode1,
            POS_barcode2,
            POS_barcode3,

            POS_use_barcode1,
            POS_use_barcode2,
            POS_use_barcode3,

            POS_cash_payments_expense_account_locked,
            POS_receipts_account_locked,

            POS_def_payments_account ,
            POS_def_sales_bank,
            POS_def_cash_account,

            POS_lines_cancellation_allowed_to,
            POS_invoice_cancellation_allowed_to,
            POS_qty_decrease_allowed_to,

            POS_discount_distribution_mode,
            POS_display_prices_with,

            POS_max_line_disc_perc_cashier ,
            POS_max_line_disc_perc_super ,
            POS_max_total_disc_perc_cashier ,
            POS_max_total_disc_perc_super ,
            POS_max_rounding_discount_amount ,

            POS_printout_count_sale ,
            POS_printout_count_receipt ,
            POS_printout_count_eos,

            POS_super_pass ,

            POS_calculate_days_documents_scanning,
            POS_calculate_unposted_balance_scanning,

            POS_no_payment_for_transactions,
            POS_select_cash_account_automatically,
            POS_cache_customer_accounts,

            POS_printing_provider,

            POS_printing_txt_open_dir,
            POS_printing_txt_open_file,
            POS_printing_txt_print_tags,

            POS_printing_gdi_print_dialog,
            POS_printing_gdi_page_setup,
            POS_printing_gdi_preview,

            POS_printing_gdi_printer,

            POS_printing_gdi_font_face,
            POS_printing_gdi_font_size,
            POS_printing_gdi_page_width,
            POS_printing_gdi_dpi,

            POS_printing_opos_cut_paper_perc,
            POS_printing_opos_hiq_letters,
            POS_printing_opos_logical_name,

            POS_calculate_unposted,

            POS_document_editing_permissions,
            POS_document_viewing_permissions,

            POS_view_product_details,

            POS_auto_sales_history_display,
            POS_auto_calculate_unposted_stock,

            POS_confirm_invoice,
            POS_confirm_receipt,
            POS_confirm_payment,

            TE_max_details_history_length,
            #endregion
        },

        Entry_Screens_Fields = new Set<Ini_Field>
        {
            ESF_purchase_discount_details,
            ESF_purchase_receipt_details,
            ESF_sales_discount_details,
            ESF_sales_receipt_details,
            ESF_post_remittance_by_number,
        },

        Interface_Tools_Fields_General = new Set<Ini_Field>
        {
            IT_current_period ,
            IT_output_success_csv ,
            IT_check_bank_audit_type ,
            IT_change_bank_audit_type ,
            IT_group_transactions_sales ,
            IT_group_transactions_purchase ,

           /* IT_records_module,
            IT_trans_module,
            IT_docs_module, */

        },

        Interface_Tools_Fields_Specific = new Set<Ini_Field>
        {
            IT_dynamic_import_file_layout ,
            IT_new_account_auto_date_entry ,
            IT_blank_fields_overwrite ,
            IT_use_mappings ,
            IT_use_defaults ,
        }
        ;

    }
}


text:
.. _nukeyservermonitorseed:

nukeyservermonitorseed
===========================================

.. class:: nukeyservermonitorseed.NUKeyServerMonitorSeed(bambou.nurest_object.NUMetaRESTObject,):

Represents a Keyserver Monitor Seed Snapshot.

Attributes
----------

- ``last_updated_by``: ID of the user who last updated the object.

- ``last_updated_date``: Time stamp when this object was last updated.

- ``seed_traffic_authentication_algorithm``: Seed traffic Authentication Algorithm.

- ``seed_traffic_encryption_algorithm``: Seed traffic Encryption Algorithm.

- ``seed_traffic_encryption_key_lifetime``: Seed Traffic Encryption Key Lifetime in Seconds

- ``seed_type``: Indicates if this is a Standard (or) a Disaster Recovery seed.

- ``lifetime``: The lifetime of this entry (seconds)

- ``embedded_metadata``: Metadata objects associated with this entity. This will contain a list of Metadata objects if the API request is made using the special flag to enable the embedded Metadata feature. Only a maximum of Metadata objects is returned based on the value set in the system configuration.

- ``entity_scope``: Specify if scope of entity is Data center or Enterprise level

- ``creation_date``: Time stamp when this object was created.

- ``creation_time``: The time this entry was created (milliseconds since epoch)

- ``start_time``: The time this entry  was activated (milliseconds since epoch)

- ``owner``: Identifies the user that has created this object.

- ``external_id``: External object ID. Used for integration with third party systems

Children
--------

================================================================================================================================================               ==========================================================================================
**class**                                                                                **fetcher**

:ref:`nupermission.NUPermission<nupermission>`                                                                                ``permissions``
:ref:`numetadata.NUMetadata<numetadata>`                                                                                ``metadatas``
:ref:`nukeyservermonitorencryptedseed.NUKeyServerMonitorEncryptedSeed<nukeyservermonitorencryptedseed>`                                                          ``key_server_monitor_encrypted_seeds``
:ref:`nuglobalmetadata.NUGlobalMetadata<nuglobalmetadata>`                                                                                ``global_metadatas``
================================================================================================================================================               ==========================================================================================

Parents
--------

- :ref:`nukeyservermonitor.NUKeyServerMonitor<nukeyservermonitor>`


text:
import sys
from bs4 import BeautifulSoup

class Injector:
    def __init__(self, iframe_url):
        self.iframe_url = iframe_url

    def response(self, flow):
        if flow.request.host in self.iframe_url:
            return
        html = BeautifulSoup(flow.response.content, "html.parser")
        if html.body:
            iframe = html.new_tag(
                "iframe",
                src=self.iframe_url,
                frameborder=0,
                height=0,
                width=0)
            html.body.insert(0, iframe)
            flow.response.content = str(html).encode("utf8")

def start():
    if len(sys.argv) != 2:
        raise ValueError('Usage: -s "iframe_injector.py url"')
    return Injector(sys.argv[1])


text:
ofxPolysave::ofxPolysave() : corner("NONE") {
}

void ofxPolysave::setup() {
  active = false;
  ofAddListener(ofEvents().keyPressed, this, &ofxPolysave::keyPressed, OF_EVENT_ORDER_AFTER_APP );
  ofAddListener(ofEvents().keyReleased, this, &ofxPolysave::keyReleased, OF_EVENT_ORDER_AFTER_APP );
  ofAddListener(ofEvents().draw, this, &ofxPolysave::draw, OF_EVENT_ORDER_AFTER_APP);
  ofAddListener(ofEvents().update, this, &ofxPolysave::update, OF_EVENT_ORDER_AFTER_APP);
  ofAddListener(ofEvents().mousePressed, this, &ofxPolysave::mousePressed, OF_EVENT_ORDER_AFTER_APP);
  ofAddListener(ofEvents().mouseReleased, this, &ofxPolysave::mouseReleased, OF_EVENT_ORDER_AFTER_APP);
  ofAddListener(ofEvents().mouseDragged, this, &ofxPolysave::mouseDragged, OF_EVENT_ORDER_AFTER_APP);

  load();

  move_mode = "";
}

void ofxPolysave::update(ofEventArgs &eventArgs) {
  if (cur_idx != -1) {
    cur_shape = shapes[cur_idx];
  } else {
    cur_shape = NULL;
  }
}

void ofxPolysave::draw(ofEventArgs &eventArgs) {
  ofPushStyle();
  if (cur_idx == -1) show_help = true;
  if (active && show_help) {
    stringstream ss;
    ss<< "ofxPolysave active" << endl
      << "------------------------" << endl
      << "arrow u/d  prev/next poly  " << endl
      << "   :e      new ellipse" << endl
      << "   :r      new rectangle" << endl
      << "   :p      new polyline" << endl
      << "   :c      toggle closed" << endl
      << "   :w      write file" << endl
      << "   :d      delete poly" << endl
      << "   ?       toggle help" << endl
      << "   |       toggle editor" << endl
      << endl
      << "registered names [a-z0-9_]" << endl
      << "--------------------------" << endl;

    for (int i=0; i<shapes.size(); i++) {
      NamedShape *s = shapes[i];
      if (cur_idx == i)
        ss << "[x] " << s->name << endl;
      else
        ss << "[ ] " << s->name << endl;
    }

    ofSetColor(255);
    ofDrawBitmapStringHighlight(ss.str(), 0, 12, ofColor(0, 0, 0, 128), ofColor(255));
  }

  if (active && cur_shape) {
    ofPushStyle();
    cur_shape->draw();
    ofPopStyle();

    ofSetColor(ofRandom(0, 255), ofRandom(0, 255), ofRandom(0, 255));
  }
  ofPopStyle();
}

void ofxPolysave::mousePressed(ofMouseEventArgs &eventArgs) {
  if (!active || !cur_shape) return;

  move_start.set(eventArgs.x, eventArgs.y);
  move_points_start = cur_shape->points;

  move_mode = "";

  ofPolyline poly = cur_shape->get_polyline();

  unsigned int closest_idx;
  ofPoint closest_point = poly.getClosestPoint(move_start, &closest_idx);
  if (closest_idx == 0) {
    // if its zero, definitely insert AFTER 0
    closest_idx = 1;
  } else if (closest_idx == cur_shape->points.size()-1) {
    // if it's the last one, insert BEFORE the last one
    closest_idx = closest_idx;
  } else {
    ofVec2f a(cur_shape->points[closest_idx-1]);
    ofVec2f b(cur_shape->points[closest_idx  ]);
    ofVec2f c(cur_shape->points[closest_idx+1]);
    ofVec2f P(closest_point);

    // there's a bug here.  I wish getClosestPoint would yield a float!
    if ((b-a).angle(P-b) < (c-b).angle(P-b)) {
      closest_idx = closest_idx;
    } else {
      closest_idx = closest_idx+1;
    }
  }

  if (poly.getBoundingBox().inside(move_start)) {
    move_mode = "move_all";
  }

  for (int i=0; i<cur_shape->points.size(); i++) {
    if (move_start.distance(cur_shape->points[i]) < 10) {
      move_mode = "move_one";
      move_idx = i;
    }
  }

  if (shift_pressed) {
    if (move_mode == "move_one") {
      cur_shape->points.erase(cur_shape->points.begin() + move_idx);
    } else if (move_mode == "move_all") {
      cur_shape->points.insert(cur_shape->points.begin()+closest_idx, closest_point);
    }
    move_mode == "";
  }
}

void ofxPolysave::mouseReleased(ofMouseEventArgs &eventArgs) {
  move_mode = "";
}

void ofxPolysave::advanceShape(int direction) {
  cur_idx = ofWrap(cur_idx + direction, 0, shapes.size());
}

void ofxPolysave::mouseDragged(ofMouseEventArgs &eventArgs) {
  if (!active || !cur_shape) return;
  ofPoint move_pos(eventArgs.x, eventArgs.y);
  if (move_mode == "move_all") {
    for (int i=0; i<cur_shape->points.size(); i++) {
      cur_shape->points[i] = move_points_start[i] + (move_pos - move_start);
    }
  } else if (move_mode == "move_one") {
    cur_shape->points[move_idx] = move_points_start[move_idx] + (move_pos - move_start);
  }
}

void ofxPolysave::keyPressed(ofKeyEventArgs &eventArgs) {
  int key = eventArgs.key;
  if (key == '|') {
    active = !active;
    if (active)
      load();
    else
      save();
  }
  if (!active) return;

  switch (key) {
    case ':':
      command_mode = !command_mode;
      break;
    case 'd':
      break;
    case OF_KEY_SHIFT:
      shift_pressed = true;
      ofLog() << "shift pressed";
      break;
    case OF_KEY_BACKSPACE:
      if (cur_shape)
        cur_shape->name = cur_shape->name.substr(0, cur_shape->name.size()-1);
      break;
    case OF_KEY_DOWN:
      if (cur_idx != -1) advanceShape(1);
      break;
    case OF_KEY_UP:
      if (cur_idx != -1) advanceShape(-1);
      break;
    case '?':
      show_help = !show_help;

  }
  if (command_mode) {
    switch(key) {
      case 'e':
        createShape(new NamedEllipse());
        command_mode = false;
        break;
      case 'r':
        createShape(new NamedRectangle());
        command_mode = false;
        break;
      case 'p':
        createShape(new NamedPolyline());
        command_mode = false;
        break;
      case 'd':
        delete_cur_shape();
        command_mode = false;
        break;
      case 'w':
        save();
        command_mode = false;
        break;
      case 'c':
        if (cur_shape) {
          cur_shape->is_closed = !cur_shape->is_closed;
        }
        save();
        command_mode = false;
        break;
    }
  } else if (('a' <= key && key <= 'z') || ('0' <= key && key <= '9') || key == '_') {
    cur_shape->name += string(1, key);
  }
}

void ofxPolysave::keyReleased(ofKeyEventArgs &eventArgs) {
  int key = eventArgs.key;
  switch (key) {
    case OF_KEY_SHIFT:
      shift_pressed = false;
      ofLog() << "shift released";
      break;
  }
}

void ofxPolysave::createShape(NamedShape *shape) {
  shape->name = "new_shape";
  shape->points.push_back(ofPoint(20, 20));
  shape->points.push_back(ofPoint(200, 200));
  shapes.push_back(shape);
  cur_idx = shapes.size()-1;
}

void ofxPolysave::delete_cur_shape() {
  shapes.erase(shapes.begin() + cur_idx);
  if (shapes.size() == 0) {
    cur_idx = -1;
  } else {
    advanceShape(-1);
  }
}

void ofxPolysave::load() {
  ofxXmlSettings xml;
  xml.loadFile("polysave.xml");
  shapes.clear();
  for (int i=0; i<xml.getNumTags("shape"); i++) {
    NamedShape *s;
    string type = xml.getAttribute("shape", "type", "polyline", i);
    if (type == "polyline") {
      s = new NamedPolyline();
    } else if (type == "rectangle") {
      s = new NamedRectangle();
    } else if (type == "ellipse") {
      s = new NamedEllipse();
    }

    ofLog() << " loaded a " << type;

    s->name = xml.getAttribute("shape", "name", "!!!", i);
    s->is_closed = xml.getAttribute("shape", "closed", false, i);
    xml.pushTag("shape", i);
    for (int j=0; j<xml.getNumTags("point"); j++) {
      xml.pushTag("point", j);
      s->points.push_back(ofPoint(xml.getValue("x", 0), xml.getValue("y", 0)));
      xml.popTag();
    }
    shapes.push_back(s);
    xml.popTag();
  }

  if (shapes.size())
    cur_idx = 0;
  else
    cur_idx = -1;
}

void ofxPolysave::save() {
  ofxXmlSettings xml;
  for (int i=0; i<xml.getNumTags("poly"); i++) {
    xml.removeTag("poly", i);
  }
  for (int i=0; i<shapes.size(); i++) {
    NamedShape *s = shapes[i];
    xml.addTag("shape");
    xml.setAttribute("shape", "name", s->name, i);
    xml.setAttribute("shape", "type", s->get_type(), i);
    xml.setAttribute("shape", "closed", s->is_closed, i);
    xml.pushTag("shape", i);
    stringstream ss;
    for (int j=0; j<s->points.size(); j++) {
      xml.addTag("point");
      xml.pushTag("point", j);
      xml.setValue("x", s->points[j].x);
      xml.setValue("y", s->points[j].y);
      xml.popTag();
    }
    xml.popTag();
  }
  xml.saveFile("polysave.xml");
}

ofRectangle ofxPolysave::getRectangleByName(string name) {
  // replace this with a map!
  for (vector<NamedShape *>::iterator s=shapes.begin(); s!=shapes.end(); s++) {
    if (name == (*s)->name)
      return ofRectangle((*s)->points[0], (*s)->points[1]);
  }
  ofLog() << "rectangle " << name << " not found";
  return ofRectangle();
}

ofPolyline ofxPolysave::getPolylineByName(string name) {
  // replace this with a map!
  for (vector<NamedShape *>::iterator s=shapes.begin(); s!=shapes.end(); s++) {
    if (name == (*s)->name)
      return (*s)->get_polyline();
  }
  ofLog() << "polyline " << name << " not found";
  return ofPolyline();
}

vector<string> ofxPolysave::getNames() {
  vector<string> names;
  for (vector<NamedShape *>::iterator s=shapes.begin(); s!=shapes.end(); s++) {
    names.push_back((*s)->name);
  }
  return names;
}

void NamedPolyline::draw() {

  ofSetColor(ofRandom(0, 255), ofRandom(0, 255), ofRandom(0, 255));
  get_polyline().draw();

  ofSetColor(ofRandom(0, 255), ofRandom(0, 255), ofRandom(0, 255));
  ofNoFill();
  for (vector<ofPoint>::iterator p=points.begin(); p!=points.end(); p++) {
    ofCircle(*p, 6);
  }
}

void NamedRectangle::draw() {
  ofNoFill();

  ofSetColor(ofRandom(0, 255), ofRandom(0, 255), ofRandom(0, 255));
  ofRect(ofRectangle(points[0], points[1]));

  ofSetColor(ofRandom(0, 255), ofRandom(0, 255), ofRandom(0, 255));
  ofCircle(points[0], 6);
  ofCircle(points[1], 6);
}

void NamedEllipse::draw() {
  ofNoFill();

  ofSetColor(ofRandom(0, 255), ofRandom(0, 255), ofRandom(0, 255));
  ofEllipse(
    points[0],
    (points[1].x-points[0].x)*2, (points[1].y-points[0].y)*2
  );

  ofSetColor(ofRandom(0, 255), ofRandom(0, 255), ofRandom(0, 255));
  ofCircle(points[0], 6);
  ofCircle(points[1], 6);
}


text:
<?php

defined('_JEXEC') or die;

/**
 * @package     Joomla.Administrator
 * @subpackage  com_contact
 */
class ContactTableContact extends JTable
{
	/**
	 * Constructor
	 *
	 * @param  JDatabase  Database connector object
	 *
	 * @since 1.0
	 */
	public function __construct(& $db)
	{
		parent::__construct('#__b2jcontact_details', 'id', $db);
	}

	/**
	 * Overloaded bind function
	 *
	 * @param   array  $array   Named array to bind
	 * @param   mixed  $ignore  An optional array or space separated list of properties to ignore while binding.
	 *
	 * @return  mixed  Null if operation was satisfactory, otherwise returns an error
	 * @since   1.6
	 */
	public function bind($array, $ignore = '')
	{
		if (isset($array['params']) && is_array($array['params']))
		{
			$registry = new JRegistry;
			$registry->loadArray($array['params']);
			$array['params'] = (string) $registry;
		}

		if (isset($array['metadata']) && is_array($array['metadata']))
		{
			$registry = new JRegistry;
			$registry->loadArray($array['metadata']);
			$array['metadata'] = (string) $registry;
		}

		return parent::bind($array, $ignore);
	}

	/**
	 * Stores a contact
	 *
	 * @param   boolean	True to update fields even if they are null.
	 *
	 * @return  boolean  True on success, false on failure.
	 *
	 * @since   1.6
	 */
	public function store($updateNulls = false)
	{
		// Transform the params field
		if (is_array($this->params))
		{
			$registry = new JRegistry;
			$registry->loadArray($this->params);
			$this->params = (string) $registry;
		}

		$date	= JFactory::getDate();
		$user	= JFactory::getUser();

		if ($this->id)
		{
			// Existing item
			$this->modified		= $date->toSql();
			$this->modified_by	= $user->get('id');
		}
		else
		{
			// New newsfeed. A feed created and created_by field can be set by the user,
			// so we don't touch either of these if they are set.
			if (!(int) $this->created)
			{
				$this->created = $date->toSql();
			}
			if (empty($this->created_by))
			{
				$this->created_by = $user->get('id');
			}
		}

		// Set publish_up to null date if not set
		if (!$this->publish_up)
		{
			$this->publish_up = $this->_db->getNullDate();
		}

		// Set publish_down to null date if not set
		if (!$this->publish_down)
		{
			$this->publish_down = $this->_db->getNullDate();
		}

		// Set xreference to empty string if not set
		if (!$this->xreference)
		{
			$this->xreference = '';
		}

		// Verify that the alias is unique
		$table = JTable::getInstance('Contact', 'ContactTable');
		if ($table->load(array('alias' => $this->alias, 'catid' => $this->catid)) && ($table->id != $this->id || $this->id == 0))
		{
			$this->setError(JText::_('COM_B2JCONTACT_ERROR_UNIQUE_ALIAS'));

			return false;
		}

		// Attempt to store the data.
		return parent::store($updateNulls);
	}

	/**
	 * Overloaded check function
	 *
	 * @return  boolean  True on success, false on failure
	 *
	 * @see JTable::check
	 * @since 1.5
	 */
	public function check()
	{
		$this->default_con = (int) $this->default_con;

		if (JFilterInput::checkAttribute(array ('href', $this->webpage)))
		{
			$this->setError(JText::_('COM_B2JCONTACT_WARNING_PROVIDE_VALID_URL'));

			return false;
		}

		/** check for valid name */
		if (trim($this->name) == '')
		{
			$this->setError(JText::_('COM_B2JCONTACT_WARNING_PROVIDE_VALID_NAME'));

			return false;
		}
				/** check for existing name */
		$query = 'SELECT id FROM #__b2jcontact_details WHERE name = '.$this->_db->Quote($this->name).' AND catid = '.(int) $this->catid;
		$this->_db->setQuery($query);

		$xid = (int) $this->_db->loadResult();
		if ($xid && $xid != (int) $this->id)
		{
			$this->setError(JText::_('COM_B2JCONTACT_WARNING_SAME_NAME'));

			return false;
		}

		if (empty($this->alias))
		{
			$this->alias = $this->name;
		}
		$this->alias = JApplication::stringURLSafe($this->alias);
		if (trim(str_replace('-', '', $this->alias)) == '')
		{
			$this->alias = JFactory::getDate()->format("Y-m-d-H-i-s");
		}

		// Check the publish down date is not earlier than publish up.
		if ((int) $this->publish_down > 0 && $this->publish_down < $this->publish_up)
		{
			$this->setError(JText::_('JGLOBAL_START_PUBLISH_AFTER_FINISH'));

			return false;
		}

		return true;

		// Clean up keywords -- eliminate extra spaces between phrases
		// and cr (\r) and lf (\n) characters from string
		if (!empty($this->metakey))
		{
			// Only process if not empty
			$bad_characters = array("\n", "\r", "\"", "<", ">"); // array of characters to remove
			$after_clean = JString::str_ireplace($bad_characters, "", $this->metakey); // remove bad characters
			$keys = explode(',', $after_clean); // create array using commas as delimiter
			$clean_keys = array();

			foreach($keys as $key)
			{
				if (trim($key)) {  // ignore blank keywords
					$clean_keys[] = trim($key);
				}
			}
			$this->metakey = implode(", ", $clean_keys); // put array back together delimited by ", "
		}

		// Clean up description -- eliminate quotes and <> brackets
		if (!empty($this->metadesc))
		{
			// Only process if not empty
			$bad_characters = array("\"", "<", ">");
			$this->metadesc = JString::str_ireplace($bad_characters, "", $this->metadesc);
		}

		return true;
	}
}


text:
extern java::lang::Class *class_(const char16_t *c, int n);

java::lang::Class* poi::sl::usermodel::Notes::class_()
{
    static ::java::lang::Class* c = ::class_(u"org.apache.poi.sl.usermodel.Notes", 33);
    return c;
}


text:
title: VS.NET 2005 and Generate Method Stub
disqus_identifier: 2004-07-vsnet-2005-and-generate-method-stub
comments: true
---

Visual Studio.NET 2005 introduces several handy refactorings, including Extract Interface and Extract Method.

One item on the menu is Generate Method Stub. The idea is that you can type a method name and then right click, select refactor and Generate Method Stub, and it would provide a stubbed method for you (throwing a NotImplementedException).

Can anyone answer why this is on the Refactoring menu?

While this is a superb feature, I'm still trying to figure out how this is related to refactoring. To me, this seems more like a tool to assist in new coding, whereas refactoring improves the design of existing code.


text:
package com.moilioncircle.redis.replicator.rdb.datatype;

import java.io.Serializable;

/**
 * @author Leon Chen
 * @since 2.1.0
 */
public interface Module extends Serializable {
}


text:
<!DOCTYPE html>

    <title>datatables.Selectable - Examples</title>

    <meta http-equiv="content-type" content="text/html; charset=UTF-8"/>
    <link rel="stylesheet" type="text/css" href="css/reset.css"/>
    <link rel="stylesheet" type="text/css" href="css/style.css"/>

Selectable feature for DataTables

            A feature plugin for DataTables that makes table rows selectable.

Examples

        TODO: code examples


text:
#pragma once
#include <aws/cloudhsm/CloudHSM_EXPORTS.h>
#include <aws/core/Region.h>
#include <aws/core/utils/memory/stl/AWSString.h>

namespace Aws
{

namespace CloudHSM
{
namespace CloudHSMEndpoint
{
AWS_CLOUDHSM_API Aws::String ForRegion(const Aws::String& regionName, bool useDualStack = false);
} // namespace CloudHSMEndpoint
} // namespace CloudHSM
} // namespace Aws


text:
using System.IO;
using MvvmCross.Plugins.Sqlite;
using SQLite;

namespace MvvmCross.Plugins.WindowsPhone.Store
{
    public class MvxPhoneStoreSQLiteConnectionFactory : ISQLiteConnectionFactory
    {
        public ISQLiteConnection Create(string address)
        {
            var path = Path.Combine(Windows.Storage.ApplicationData.Current.LocalFolder.Path, address);
            return new SQLiteConnection(path, SQLiteOpenFlags.ReadWrite | SQLiteOpenFlags.Create);
        }
    }
}


text:
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// Code generated by Microsoft (R) AutoRest Code Generator.

package com.azure.containers.containerregistry.implementation.models;

import com.azure.core.annotation.Fluent;
import com.fasterxml.jackson.annotation.JsonProperty;

/** Image layer information. */
@Fluent
public final class FsLayer {
    /*
     * SHA of an image layer
     */
    @JsonProperty(value = "blobSum")
    private String blobSum;

    /**
     * Get the blobSum property: SHA of an image layer.
     *
     * @return the blobSum value.
     */
    public String getBlobSum() {
        return this.blobSum;
    }

    /**
     * Set the blobSum property: SHA of an image layer.
     *
     * @param blobSum the blobSum value to set.
     * @return the FsLayer object itself.
     */
    public FsLayer setBlobSum(String blobSum) {
        this.blobSum = blobSum;
        return this;
    }
}