var common = require('../common');
var MultipartParserStub = GENTLY.stub('./multipart_parser', 'MultipartParser'),
    QuerystringParserStub = GENTLY.stub('./querystring_parser', 'QuerystringParser'),
    EventEmitterStub = GENTLY.stub('events', 'EventEmitter'),
    StreamStub = GENTLY.stub('stream', 'Stream'),
    FileStub = GENTLY.stub('./file');

var formidable = require(common.lib + '/index'),
    IncomingForm = formidable.IncomingForm,
    events = require('events'),
    fs = require('fs'),
    path = require('path'),
    Buffer = require('buffer').Buffer,
    fixtures = require(TEST_FIXTURES + '/multipart'),
    form,
    gently;

function test(test) {
  gently = new Gently();
  gently.expect(EventEmitterStub, 'call');
  form = new IncomingForm();
  test();
  gently.verify(test.name);
}

test(function constructor() {
  assert.strictEqual(form.error, null);
  assert.strictEqual(form.ended, false);
  assert.strictEqual(form.type, null);
  assert.strictEqual(form.headers, null);
  assert.strictEqual(form.keepExtensions, false);
  assert.strictEqual(form.uploadDir, '/tmp');
  assert.strictEqual(form.encoding, 'utf-8');
  assert.strictEqual(form.bytesReceived, null);
  assert.strictEqual(form.bytesExpected, null);
  assert.strictEqual(form.maxFieldsSize, 2 * 1024 * 1024);
  assert.strictEqual(form._parser, null);
  assert.strictEqual(form._flushing, 0);
  assert.strictEqual(form._fieldsSize, 0);
  assert.ok(form instanceof EventEmitterStub);
  assert.equal(form.constructor.name, 'IncomingForm');

  (function testSimpleConstructor() {
    gently.expect(EventEmitterStub, 'call');
    var form = IncomingForm();
    assert.ok(form instanceof IncomingForm);
  })();

  (function testSimpleConstructorShortcut() {
    gently.expect(EventEmitterStub, 'call');
    var form = formidable();
    assert.ok(form instanceof IncomingForm);
  })();
});

test(function parse() {
  var REQ = {headers: {}}
    , emit = {};

  gently.expect(form, 'writeHeaders', function(headers) {
    assert.strictEqual(headers, REQ.headers);
  });

  var events = ['error', 'aborted', 'data', 'end'];
  gently.expect(REQ, 'on', events.length, function(event, fn) {
    assert.equal(event, events.shift());
    emit[event] = fn;
    return this;
  });

  form.parse(REQ);

  (function testPause() {
    gently.expect(REQ, 'pause');
    assert.strictEqual(form.pause(), true);
  })();

  (function testPauseCriticalException() {
    form.ended = false;

    var ERR = new Error('dasdsa');
    gently.expect(REQ, 'pause', function() {
      throw ERR;
    });

    gently.expect(form, '_error', function(err) {
      assert.strictEqual(err, ERR);
    });

    assert.strictEqual(form.pause(), false);
  })();

  (function testPauseHarmlessException() {
    form.ended = true;

    var ERR = new Error('dasdsa');
    gently.expect(REQ, 'pause', function() {
      throw ERR;
    });

    assert.strictEqual(form.pause(), false);
  })();

  (function testResume() {
    gently.expect(REQ, 'resume');
    assert.strictEqual(form.resume(), true);
  })();

  (function testResumeCriticalException() {
    form.ended = false;

    var ERR = new Error('dasdsa');
    gently.expect(REQ, 'resume', function() {
      throw ERR;
    });

    gently.expect(form, '_error', function(err) {
      assert.strictEqual(err, ERR);
    });

    assert.strictEqual(form.resume(), false);
  })();

  (function testResumeHarmlessException() {
    form.ended = true;

    var ERR = new Error('dasdsa');
    gently.expect(REQ, 'resume', function() {
      throw ERR;
    });

    assert.strictEqual(form.resume(), false);
  })();

  (function testEmitError() {
    var ERR = new Error('something bad happened');
    gently.expect(form, '_error',function(err) {
      assert.strictEqual(err, ERR);
    });
    emit.error(ERR);
  })();

  (function testEmitAborted() {
    gently.expect(form, 'emit',function(event) {
      assert.equal(event, 'aborted');
    });

    emit.aborted();
  })();

  (function testEmitData() {
    var BUFFER = [1, 2, 3];
    gently.expect(form, 'write', function(buffer) {
      assert.strictEqual(buffer, BUFFER);
    });
    emit.data(BUFFER);
  })();

  (function testEmitEnd() {
    form._parser = {};

    (function testWithError() {
      var ERR = new Error('haha');
      gently.expect(form._parser, 'end', function() {
        return ERR;
      });

      gently.expect(form, '_error', function(err) {
        assert.strictEqual(err, ERR);
      });

      emit.end();
    })();

    (function testWithoutError() {
      gently.expect(form._parser, 'end');
      emit.end();
    })();

    (function testAfterError() {
      form.error = true;
      emit.end();
    })();
  })();

  (function testWithCallback() {
    gently.expect(EventEmitterStub, 'call');
    var form = new IncomingForm(),
        REQ = {headers: {}},
        parseCalled = 0;

    gently.expect(form, 'writeHeaders');
    gently.expect(REQ, 'on', 4, function() {
      return this;
    });

    gently.expect(form, 'on', 4, function(event, fn) {
      if (event == 'field') {
        fn('field1', 'foo');
        fn('field1', 'bar');
        fn('field2', 'nice');
      }

      if (event == 'file') {
        fn('file1', '1');
        fn('file1', '2');
        fn('file2', '3');
      }

      if (event == 'end') {
        fn();
      }
      return this;
    });

    form.parse(REQ, gently.expect(function parseCbOk(err, fields, files) {
      assert.deepEqual(fields, {field1: 'bar', field2: 'nice'});
      assert.deepEqual(files, {file1: '2', file2: '3'});
    }));

    gently.expect(form, 'writeHeaders');
    gently.expect(REQ, 'on', 4, function() {
      return this;
    });

    var ERR = new Error('test');
    gently.expect(form, 'on', 3, function(event, fn) {
      if (event == 'field') {
        fn('foo', 'bar');
      }

      if (event == 'error') {
        fn(ERR);
        gently.expect(form, 'on');
      }
      return this;
    });

    form.parse(REQ, gently.expect(function parseCbErr(err, fields, files) {
      assert.strictEqual(err, ERR);
      assert.deepEqual(fields, {foo: 'bar'});
    }));
  })();
});

test(function pause() {
  assert.strictEqual(form.pause(), false);
});

test(function resume() {
  assert.strictEqual(form.resume(), false);
});

test(function writeHeaders() {
  var HEADERS = {};
  gently.expect(form, '_parseContentLength');
  gently.expect(form, '_parseContentType');

  form.writeHeaders(HEADERS);
  assert.strictEqual(form.headers, HEADERS);
});

test(function write() {
  var parser = {},
      BUFFER = [1, 2, 3];

  form._parser = parser;
  form.bytesExpected = 523423;

  (function testBasic() {
    gently.expect(form, 'emit', function(event, bytesReceived, bytesExpected) {
      assert.equal(event, 'progress');
      assert.equal(bytesReceived, BUFFER.length);
      assert.equal(bytesExpected, form.bytesExpected);
    });

    gently.expect(parser, 'write', function(buffer) {
      assert.strictEqual(buffer, BUFFER);
      return buffer.length;
    });

    assert.equal(form.write(BUFFER), BUFFER.length);
    assert.equal(form.bytesReceived, BUFFER.length);
  })();

  (function testParserError() {
    gently.expect(form, 'emit');

    gently.expect(parser, 'write', function(buffer) {
      assert.strictEqual(buffer, BUFFER);
      return buffer.length - 1;
    });

    gently.expect(form, '_error', function(err) {
      assert.ok(err.message.match(/parser error/i));
    });

    assert.equal(form.write(BUFFER), BUFFER.length - 1);
    assert.equal(form.bytesReceived, BUFFER.length + BUFFER.length);
  })();

  (function testUninitialized() {
    delete form._parser;

    gently.expect(form, '_error', function(err) {
      assert.ok(err.message.match(/unintialized parser/i));
    });
    form.write(BUFFER);
  })();
});

test(function parseContentType() {
  var HEADERS = {};

  form.headers = {'content-type': 'application/x-www-form-urlencoded'};
  gently.expect(form, '_initUrlencoded');
  form._parseContentType();

  // accept anything that has 'urlencoded' in it
  form.headers = {'content-type': 'broken-client/urlencoded-stupid'};
  gently.expect(form, '_initUrlencoded');
  form._parseContentType();

  var BOUNDARY = '---------------------------57814261102167618332366269';
  form.headers = {'content-type': 'multipart/form-data; boundary='+BOUNDARY};

  gently.expect(form, '_initMultipart', function(boundary) {
    assert.equal(boundary, BOUNDARY);
  });
  form._parseContentType();

  (function testQuotedBoundary() {
    form.headers = {'content-type': 'multipart/form-data; boundary="' + BOUNDARY + '"'};

    gently.expect(form, '_initMultipart', function(boundary) {
      assert.equal(boundary, BOUNDARY);
    });
    form._parseContentType();
  })();

  (function testNoBoundary() {
    form.headers = {'content-type': 'multipart/form-data'};

    gently.expect(form, '_error', function(err) {
      assert.ok(err.message.match(/no multipart boundary/i));
    });
    form._parseContentType();
  })();

  (function testNoContentType() {
    form.headers = {};

    gently.expect(form, '_error', function(err) {
      assert.ok(err.message.match(/no content-type/i));
    });
    form._parseContentType();
  })();

  (function testUnknownContentType() {
    form.headers = {'content-type': 'invalid'};

    gently.expect(form, '_error', function(err) {
      assert.ok(err.message.match(/unknown content-type/i));
    });
    form._parseContentType();
  })();
});

test(function parseContentLength() {
  var HEADERS = {};

  form.headers = {};
  form._parseContentLength();
  assert.strictEqual(form.bytesReceived, null);
  assert.strictEqual(form.bytesExpected, null);

  form.headers['content-length'] = '8';
  gently.expect(form, 'emit', function(event, bytesReceived, bytesExpected) {
    assert.equal(event, 'progress');
    assert.equal(bytesReceived, 0);
    assert.equal(bytesExpected, 8);
  });
  form._parseContentLength();
  assert.strictEqual(form.bytesReceived, 0);
  assert.strictEqual(form.bytesExpected, 8);

  // JS can be evil, lets make sure we are not
  form.headers['content-length'] = '08';
  gently.expect(form, 'emit', function(event, bytesReceived, bytesExpected) {
    assert.equal(event, 'progress');
    assert.equal(bytesReceived, 0);
    assert.equal(bytesExpected, 8);
  });
  form._parseContentLength();
  assert.strictEqual(form.bytesExpected, 8);
});

test(function _initMultipart() {
  var BOUNDARY = '123',
      PARSER;

  gently.expect(MultipartParserStub, 'new', function() {
    PARSER = this;
  });

  gently.expect(MultipartParserStub.prototype, 'initWithBoundary', function(boundary) {
    assert.equal(boundary, BOUNDARY);
  });

  form._initMultipart(BOUNDARY);
  assert.equal(form.type, 'multipart');
  assert.strictEqual(form._parser, PARSER);

  (function testRegularField() {
    var PART;
    gently.expect(StreamStub, 'new', function() {
      PART = this;
    });

    gently.expect(form, 'onPart', function(part) {
      assert.strictEqual(part, PART);
      assert.deepEqual
        ( part.headers
        , { 'content-disposition': 'form-data; name="field1"'
          , 'foo': 'bar'
          }
        );
      assert.equal(part.name, 'field1');

      var strings = ['hello', ' world'];
      gently.expect(part, 'emit', 2, function(event, b) {
          assert.equal(event, 'data');
          assert.equal(b.toString(), strings.shift());
      });

      gently.expect(part, 'emit', function(event, b) {
          assert.equal(event, 'end');
      });
    });

    PARSER.onPartBegin();
    PARSER.onHeaderField(new Buffer('content-disposition'), 0, 10);
    PARSER.onHeaderField(new Buffer('content-disposition'), 10, 19);
    PARSER.onHeaderValue(new Buffer('form-data; name="field1"'), 0, 14);
    PARSER.onHeaderValue(new Buffer('form-data; name="field1"'), 14, 24);
    PARSER.onHeaderEnd();
    PARSER.onHeaderField(new Buffer('foo'), 0, 3);
    PARSER.onHeaderValue(new Buffer('bar'), 0, 3);
    PARSER.onHeaderEnd();
    PARSER.onHeadersEnd();
    PARSER.onPartData(new Buffer('hello world'), 0, 5);
    PARSER.onPartData(new Buffer('hello world'), 5, 11);
    PARSER.onPartEnd();
  })();

  (function testFileField() {
    var PART;
    gently.expect(StreamStub, 'new', function() {
      PART = this;
    });

    gently.expect(form, 'onPart', function(part) {
      assert.deepEqual
        ( part.headers
        , { 'content-disposition': 'form-data; name="field2"; filename="C:\\Documents and Settings\\IE\\Must\\Die\\Sun"et.jpg"'
          , 'content-type': 'text/plain'
          }
        );
      assert.equal(part.name, 'field2');
      assert.equal(part.filename, 'Sun"et.jpg');
      assert.equal(part.mime, 'text/plain');

      gently.expect(part, 'emit', function(event, b) {
        assert.equal(event, 'data');
        assert.equal(b.toString(), '... contents of file1.txt ...');
      });

      gently.expect(part, 'emit', function(event, b) {
          assert.equal(event, 'end');
      });
    });

    PARSER.onPartBegin();
    PARSER.onHeaderField(new Buffer('content-disposition'), 0, 19);
    PARSER.onHeaderValue(new Buffer('form-data; name="field2"; filename="C:\\Documents and Settings\\IE\\Must\\Die\\Sun"et.jpg"'), 0, 85);
    PARSER.onHeaderEnd();
    PARSER.onHeaderField(new Buffer('Content-Type'), 0, 12);
    PARSER.onHeaderValue(new Buffer('text/plain'), 0, 10);
    PARSER.onHeaderEnd();
    PARSER.onHeadersEnd();
    PARSER.onPartData(new Buffer('... contents of file1.txt ...'), 0, 29);
    PARSER.onPartEnd();
  })();

  (function testEnd() {
    gently.expect(form, '_maybeEnd');
    PARSER.onEnd();
    assert.ok(form.ended);
  })();
});

test(function _fileName() {
  // TODO
  return;
});

test(function _initUrlencoded() {
  var PARSER;

  gently.expect(QuerystringParserStub, 'new', function() {
    PARSER = this;
  });

  form._initUrlencoded();
  assert.equal(form.type, 'urlencoded');
  assert.strictEqual(form._parser, PARSER);

  (function testOnField() {
    var KEY = 'KEY', VAL = 'VAL';
    gently.expect(form, 'emit', function(field, key, val) {
      assert.equal(field, 'field');
      assert.equal(key, KEY);
      assert.equal(val, VAL);
    });

    PARSER.onField(KEY, VAL);
  })();

  (function testOnEnd() {
    gently.expect(form, '_maybeEnd');

    PARSER.onEnd();
    assert.equal(form.ended, true);
  })();
});

test(function _error() {
  var ERR = new Error('bla');

  gently.expect(form, 'pause');
  gently.expect(form, 'emit', function(event, err) {
    assert.equal(event, 'error');
    assert.strictEqual(err, ERR);
  });

  form._error(ERR);
  assert.strictEqual(form.error, ERR);

  // make sure _error only does its thing once
  form._error(ERR);
});

test(function onPart() {
  var PART = {};
  gently.expect(form, 'handlePart', function(part) {
    assert.strictEqual(part, PART);
  });

  form.onPart(PART);
});

test(function handlePart() {
  (function testUtf8Field() {
    var PART = new events.EventEmitter();
    PART.name = 'my_field';

    gently.expect(form, 'emit', function(event, field, value) {
      assert.equal(event, 'field');
      assert.equal(field, 'my_field');
      assert.equal(value, 'hello world: €');
    });

    form.handlePart(PART);
    PART.emit('data', new Buffer('hello'));
    PART.emit('data', new Buffer(' world: '));
    PART.emit('data', new Buffer([0xE2]));
    PART.emit('data', new Buffer([0x82, 0xAC]));
    PART.emit('end');
  })();

  (function testBinaryField() {
    var PART = new events.EventEmitter();
    PART.name = 'my_field2';

    gently.expect(form, 'emit', function(event, field, value) {
      assert.equal(event, 'field');
      assert.equal(field, 'my_field2');
      assert.equal(value, 'hello world: '+new Buffer([0xE2, 0x82, 0xAC]).toString('binary'));
    });

    form.encoding = 'binary';
    form.handlePart(PART);
    PART.emit('data', new Buffer('hello'));
    PART.emit('data', new Buffer(' world: '));
    PART.emit('data', new Buffer([0xE2]));
    PART.emit('data', new Buffer([0x82, 0xAC]));
    PART.emit('end');
  })();

  (function testFieldSize() {
    form.maxFieldsSize = 8;
    var PART = new events.EventEmitter();
    PART.name = 'my_field';

    gently.expect(form, '_error', function(err) {
      assert.equal(err.message, 'maxFieldsSize exceeded, received 9 bytes of field data');
    });

    form.handlePart(PART);
    form._fieldsSize = 1;
    PART.emit('data', new Buffer(7));
    PART.emit('data', new Buffer(1));
  })();

  (function testFilePart() {
    var PART = new events.EventEmitter(),
        FILE = new events.EventEmitter(),
        PATH = '/foo/bar';

    PART.name = 'my_file';
    PART.filename = 'sweet.txt';
    PART.mime = 'sweet.txt';

    gently.expect(form, '_uploadPath', function(filename) {
      assert.equal(filename, PART.filename);
      return PATH;
    });

    gently.expect(FileStub, 'new', function(properties) {
      assert.equal(properties.path, PATH);
      assert.equal(properties.name, PART.filename);
      assert.equal(properties.type, PART.mime);
      FILE = this;

      gently.expect(form, 'emit', function (event, field, file) {
        assert.equal(event, 'fileBegin');
        assert.strictEqual(field, PART.name);
        assert.strictEqual(file, FILE);
      });

      gently.expect(FILE, 'open');
    });

    form.handlePart(PART);
    assert.equal(form._flushing, 1);

    var BUFFER;
    gently.expect(form, 'pause');
    gently.expect(FILE, 'write', function(buffer, cb) {
      assert.strictEqual(buffer, BUFFER);
      gently.expect(form, 'resume');
      // @todo handle cb(new Err)
      cb();
    });

    PART.emit('data', BUFFER = new Buffer('test'));

    gently.expect(FILE, 'end', function(cb) {
      gently.expect(form, 'emit', function(event, field, file) {
        assert.equal(event, 'file');
        assert.strictEqual(file, FILE);
      });

      gently.expect(form, '_maybeEnd');

      cb();
      assert.equal(form._flushing, 0);
    });

    PART.emit('end');
  })();
});

test(function _uploadPath() {
  (function testUniqueId() {
    var UUID_A, UUID_B;
    gently.expect(GENTLY.hijacked.path, 'join', function(uploadDir, uuid) {
      assert.equal(uploadDir, form.uploadDir);
      UUID_A = uuid;
    });
    form._uploadPath();

    gently.expect(GENTLY.hijacked.path, 'join', function(uploadDir, uuid) {
      UUID_B = uuid;
    });
    form._uploadPath();

    assert.notEqual(UUID_A, UUID_B);
  })();

  (function testFileExtension() {
    form.keepExtensions = true;
    var FILENAME = 'foo.jpg',
        EXT = '.bar';

    gently.expect(GENTLY.hijacked.path, 'extname', function(filename) {
      assert.equal(filename, FILENAME);
      gently.restore(path, 'extname');

      return EXT;
    });

    gently.expect(GENTLY.hijacked.path, 'join', function(uploadDir, name) {
      assert.equal(path.extname(name), EXT);
    });
    form._uploadPath(FILENAME);
  })();
});

test(function _maybeEnd() {
  gently.expect(form, 'emit', 0);
  form._maybeEnd();

  form.ended = true;
  form._flushing = 1;
  form._maybeEnd();

  gently.expect(form, 'emit', function(event) {
    assert.equal(event, 'end');
  });

  form.ended = true;
  form._flushing = 0;
  form._maybeEnd();
});


package com.baidu.vis.javacv_android_video_grabber;

import android.content.Context;
import android.support.test.InstrumentationRegistry;
import android.support.test.runner.AndroidJUnit4;

import org.junit.Test;
import org.junit.runner.RunWith;

import static org.junit.Assert.*;

/**
 * Instrumented test, which will execute on an Android device.
 *
 * @see Testing documentation
 */
@RunWith(AndroidJUnit4.class)
public class ExampleInstrumentedTest {
    @Test
    public void useAppContext() throws Exception {
        // Context of the app under test.
        Context appContext = InstrumentationRegistry.getTargetContext();

        assertEquals("com.baidu.vis.javacv_android_video_grabber", appContext.getPackageName());
    }
}


import 'package:flutter/material.dart';

class LoginPage extends StatefulWidget {
  final String title;
  const LoginPage({Key key, this.title = "Login"}) : super(key: key);

  @override
  _LoginPageState createState() => _LoginPageState();
}

class _LoginPageState extends State<LoginPage> {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text(widget.title),
      ),
      body: Column(
        children: <Widget>[],
      ),
    );
  }
}


/// @ref ext_scalar_constants
/// @file glm/ext/scalar_constants.hpp
///
/// @defgroup ext_scalar_constants GLM_EXT_scalar_constants
/// @ingroup ext
///
/// Provides a list of constants and precomputed useful values.
///
/// Include <glm/ext/scalar_constants.hpp> to use the features of this extension.

#pragma once

// Dependencies
#include "../detail/setup.hpp"

#if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
#	pragma message("GLM: GLM_EXT_scalar_constants extension included")
#endif

namespace glm
{
	/// @addtogroup ext_scalar_constants
	/// @{

	/// Return the epsilon constant for floating point types.
	template<typename genType>
	GLM_FUNC_DECL GLM_CONSTEXPR genType epsilon();

	/// Return the pi constant for floating point types.
	template<typename genType>
	GLM_FUNC_DECL GLM_CONSTEXPR genType pi();

	/// Return the value of cos(1 / 2) for floating point types.
	template<typename genType>
	GLM_FUNC_DECL GLM_CONSTEXPR genType cos_one_over_two();

	/// @}
} //namespace glm

#include "scalar_constants.inl"


#include "hw/amhw_hc32f07x_rcc.h"
#include "ametal.h"
#include "am_hc32f07x.h"
#include "am_delay.h"
#include "am_types.h"
#include "am_clk.h"
#include "am_usb.h"
#include "am_gpio.h"
#include "am_usbd.h"
#include "am_usbd_cdc_vcom.h"
#include "am_hc32f07x_usbd_cdc_vcom.h"
#include "am_hc32f07x_usbd.h"

#define VIRTUAL_COM_PORT_SIZ_DEVICE_DESC        18
#define VIRTUAL_COM_PORT_SIZ_CONFIG_DESC        67
#define VIRTUAL_COM_PORT_SIZ_STRING_LANGID      4
#define VIRTUAL_COM_PORT_SIZ_STRING_VENDOR      38
#define VIRTUAL_COM_PORT_SIZ_STRING_PRODUCT     60
#define VIRTUAL_COM_PORT_SIZ_STRING_SERIAL      26

/* USB Standard Device Descriptor */
static const uint8_t Virtual_Com_Port_DeviceDescriptor[] =
  {
    0x12,   /* bLength */
    AM_USB_DESC_TYPE_DEVICE,     /* bDescriptorType */
    0x10,
    0x01,   /* bcdUSB = 2.00 */
    0x02,   /* bDeviceClass: CDC */
    0x00,   /* bDeviceSubClass */
    0x00,   /* bDeviceProtocol */
    0x40,   /* bMaxPacketSize0 */
    0x81,
    0x2F,   /* idVendor = 0x2F81 */
    0x09,
    0x72,   /* idProduct = 0x7209 */
    0x00,
    0x02,   /* bcdDevice = 2.00 */
    1,              /* Index of string descriptor describing manufacturer */
    2,              /* Index of string descriptor describing product */
    3,              /* Index of string descriptor describing the device's serial number */
    0x01    /* bNumConfigurations */
  };

static uint8_t Virtual_Com_Port_ConfigDescriptor[] =
  {
    /*Configuation Descriptor*/
    AM_USB_DESC_LENGTH_CONFIGURE,   /* bLength: Configuation Descriptor size */
    AM_USB_DESC_TYPE_CONFIGURE,      /* bDescriptorType: Configuration */
    VIRTUAL_COM_PORT_SIZ_CONFIG_DESC,       /* wTotalLength:no of returned bytes */
    0x00,
    0x02,   /* bNumInterfaces: 2 interface */
    0x01,   /* bConfigurationValue: Configuration value */
    0x00,   /* iConfiguration: Index of string descriptor describing the configuration */
    0xC0,   /* bmAttributes: self powered */
    0x32,   /* MaxPower 0 mA */
    /*Interface Descriptor*/
    0x09,   /* bLength: Interface Descriptor size */
    AM_USB_DESC_TYPE_INTERFACE,  /* bDescriptorType: Interface */
    /* Interface descriptor type */
    0x00,   /* bInterfaceNumber: Number of Interface */
    0x00,   /* bAlternateSetting: Alternate setting */
    0x01,   /* bNumEndpoints: One endpoints used */
    0x02,   /* bInterfaceClass: Communication Interface Class */
    0x02,   /* bInterfaceSubClass: Abstract Control Model */
    0x01,   /* bInterfaceProtocol: Common AT commands */
    0x00,   /* iInterface: */
    /*Header Functional Descriptor*/
    0x05,   /* bLength: Endpoint Descriptor size */
    0x24,   /* bDescriptorType: CS_INTERFACE */
    0x00,   /* bDescriptorSubtype: Header Func Desc */
    0x10,   /* bcdCDC: spec release number */
    0x01,
    /*Call Managment Functional Descriptor*/
    0x05,   /* bFunctionLength */
    0x24,   /* bDescriptorType: CS_INTERFACE */
    0x01,   /* bDescriptorSubtype: Call Management Func Desc */
    0x00,   /* bmCapabilities: D0+D1 */
    0x00,   /* bDataInterface: 1 */
    /*ACM Functional Descriptor*/
    0x04,   /* bFunctionLength */
    0x24,   /* bDescriptorType: CS_INTERFACE */
    0x02,   /* bDescriptorSubtype: Abstract Control Management desc */
    0x02,   /* bmCapabilities */
    /*Union Functional Descriptor*/
    0x05,   /* bFunctionLength */
    0x24,   /* bDescriptorType: CS_INTERFACE */
    0x06,   /* bDescriptorSubtype: Union func desc */
    0x00,   /* bMasterInterface: Communication class interface */
    0x01,   /* bSlaveInterface0: Data Class Interface */
    /*Endpoint 2 Descriptor*/
    0x07,   /* bLength: Endpoint Descriptor size */
    AM_USB_DESC_TYPE_ENDPOINT,   /* bDescriptorType: Endpoint */
    0x83,   /* bEndpointAddress: (IN2) */
    0x03
		,   /* bmAttributes: Interrupt */
    0x40,   /* wMaxPacketSize: 64*/
    0x00,
    0xFF,   /* bInterval: */
    /*Data class interface descriptor*/
    0x09,   /* bLength: Endpoint Descriptor size */
    AM_USB_DESC_TYPE_INTERFACE,  /* bDescriptorType: */
    0x01,   /* bInterfaceNumber: Number of Interface */
    0x00,   /* bAlternateSetting: Alternate setting */
    0x02,   /* bNumEndpoints: Two endpoints used */
    0x0A,   /* bInterfaceClass: CDC */
    0x00,   /* bInterfaceSubClass: */
    0x00,   /* bInterfaceProtocol: */
    0x00,   /* iInterface: */
    /*Endpoint 3 Descriptor*/
    0x07,   /* bLength: Endpoint Descriptor size */
    AM_USB_DESC_TYPE_ENDPOINT,   /* bDescriptorType: Endpoint */
    0x02,   /* bEndpointAddress: (OUT3) */
    0x02,   /* bmAttributes: Bulk */
    0x40,             /* wMaxPacketSize: 64*/
    0x00,
    0x00,   /* bInterval: ignore for Bulk transfer */
    /*Endpoint 1 Descriptor*/
    0x07,   /* bLength: Endpoint Descriptor size */
    AM_USB_DESC_TYPE_ENDPOINT,   /* bDescriptorType: Endpoint */
    0x81,   /* bEndpointAddress: (IN1) */
    0x02,   /* bmAttributes: Bulk */
    0x40,             /* wMaxPacketSize: 64*/
    0x00,
    0x00    /* bInterval */
  };

/* USB String Descriptors */
static const uint8_t Virtual_Com_Port_StringLangID[VIRTUAL_COM_PORT_SIZ_STRING_LANGID] =
  {
    VIRTUAL_COM_PORT_SIZ_STRING_LANGID,
    AM_USB_DESC_TYPE_STRING,
    0x09,
    0x04 /* LangID = 0x0409: U.S. English */
  };

static const uint8_t Virtual_Com_Port_StringVendor[VIRTUAL_COM_PORT_SIZ_STRING_VENDOR] =
  {
    VIRTUAL_COM_PORT_SIZ_STRING_VENDOR,     /* Size of Vendor string */
    AM_USB_DESC_TYPE_STRING,             /* bDescriptorType*/
    /* Manufacturer: "MindMotion" */

    'M', 0,
    'i', 0,
    'n', 0,
    'd', 0,
    'M', 0,
    'o', 0,
    't', 0,
    'i', 0,
    'o', 0,
    'n', 0,

  };

static const uint8_t Virtual_Com_Port_StringProduct[VIRTUAL_COM_PORT_SIZ_STRING_PRODUCT] =
  {
    VIRTUAL_COM_PORT_SIZ_STRING_PRODUCT,          /* bLength */
    AM_USB_DESC_TYPE_STRING,        /* bDescriptorType */
    /* Product name: ""MindMotion  Virtual COM Port" */

    'M', 0,
    'y', 0,
    ' ', 0,
    'V', 0,
    'i', 0,
    'r', 0,
    't', 0,
    'u', 0,
    'a', 0,
    'l', 0,
    ' ', 0,
    'C', 0,
    'O', 0,
    'M', 0,
    ' ', 0,
    'P', 0,
    'o', 0,
    'r', 0,
    't', 0,
    ' ', 0,
    ' ', 0

  };

static const uint8_t Virtual_Com_Port_StringSerial[VIRTUAL_COM_PORT_SIZ_STRING_SERIAL] =
  {
    VIRTUAL_COM_PORT_SIZ_STRING_SERIAL,           /* bLength */
    AM_USB_DESC_TYPE_STRING,                   /* bDescriptorType */

    'Z', 0,
    'M', 0,
    'F', 0,
    '1', 0,
    '5', 0,
    '9', 0,
     0,  0,
  };

/******************************************************************************
 * 各描述符信息
 *****************************************************************************/
static const am_usbd_descriptor_t __g_am_usbd_vcom_descriptor[] = {
    /* 设备描述符 */
    {
        (AM_USB_DESC_TYPE_DEVICE << 8) | (0x00),
        sizeof(Virtual_Com_Port_DeviceDescriptor),
        Virtual_Com_Port_DeviceDescriptor
    },

    /* 配置描述符及其下级描述符 */
    {
        (AM_USB_DESC_TYPE_CONFIGURE << 8) | (0x00),
        sizeof(Virtual_Com_Port_ConfigDescriptor),
        Virtual_Com_Port_ConfigDescriptor
    },

    /* 字符串描述符0，描述语言id */
    {
        (AM_USB_DESC_TYPE_STRING << 8) | (0x00),
        sizeof(Virtual_Com_Port_StringLangID),
        Virtual_Com_Port_StringLangID
    },

    /* 字符串描述符1，描述厂商 */
    {
        (AM_USB_DESC_TYPE_STRING << 8) | 0x01,
        sizeof(Virtual_Com_Port_StringVendor),
        Virtual_Com_Port_StringVendor
    },

    /* 字符串描述符2，描述产品 */
    {
        (AM_USB_DESC_TYPE_STRING << 8) | 0x02,
        sizeof(Virtual_Com_Port_StringProduct),
        Virtual_Com_Port_StringProduct
    },

    /* 字符串描述符3，描述设备 */
    {
        (AM_USB_DESC_TYPE_STRING << 8) | 0x03,
        sizeof(Virtual_Com_Port_StringSerial),
        Virtual_Com_Port_StringSerial
    },
};

/**
 * \brief 平台初始化
 */
static void __am_usbd_vcom_init (void) {

    /* 使能时钟 */
    amhw_hc32f07x_rcc_set_start(0x5A5A);
    amhw_hc32f07x_rcc_set_start(0xA5A5);
    amhw_hc32f07x_rcc_usbclk_adjust_set (AMHW_HC32F07X_USBCLK_ADJUST_PLL);
    am_clk_enable(CLK_USB);
}

/**
 * \brief 平台去初始化
 */
static void __am_usbd_vcom_deinit (void) {
    am_clk_disable(CLK_USB);
    amhw_hc32f07x_rcc_peripheral_disable (AMHW_HC32F07X_RCC_USB);       /* 禁能USB时钟 */                             /* 禁能USB时钟 */
}

static const am_usbd_devinfo_t __g_usbd_info = {
        __g_am_usbd_vcom_descriptor,                                                         /* 描述符地址 */
        sizeof(__g_am_usbd_vcom_descriptor) / sizeof(__g_am_usbd_vcom_descriptor[0]),     /* 描述符个数 */
};

/**< \brief 定义USB设备信息 */
static const am_hc32f07x_usbd_devinfo_t  __g_hc32f07x_usbd_vcom_info = {
    HC32F07X_USB_BASE,                           /* 寄存器基地址 */
    INUM_USB,                                  /* 中断号 */
    __am_usbd_vcom_init,              /**< \brief 平台初始化 */
    __am_usbd_vcom_deinit,            /**< \brief 平台去初始化 */
    &__g_usbd_info,
};

static uint8_t __buffer_out[64 + 1] = {0};

const am_usbd_cdc_vcom_info_t __g_usbd_vcom_info = {
    3,
    1,
    2,
    __buffer_out,
};

am_hc32f07x_usbd_dev_t  __g_hc32f07x_dev;
am_usbd_cdc_vcom_t    __g_vcom_dev;

/** \brief usb_vcom实例初始化，获得usb_vcom标准服务句柄 */
am_usbd_cdc_vcom_handle am_hc32f07x_usbd_vcom_inst_init (void)
{
    return am_hc32f07x_usbd_cdc_vcom_init(&__g_vcom_dev,
                                 &__g_usbd_vcom_info,
                                  am_hc32f07x_usbd_init(&__g_hc32f07x_dev, &__g_hc32f07x_usbd_vcom_info));
}

/** \brief usb_printer解初始化，获得usb_printer标准服务句柄 */
void am_hc32f07x_usbd_vcom_inst_deinit (void)
{
	am_hc32f07x_usbd_cdc_vcom_deinit(&__g_vcom_dev);
}

/* end of file */


/*
 * Copyright 2004-2014 H2 Group. Multiple-Licensed under the MPL 2.0,
 * and the EPL 1.0 (http://h2database.com/html/license.html).
 * Initial Developer: H2 Group
 */
/**
 * Database constraints such as check constraints, unique constraints, and referential constraints.
 */
package org.lealone.db.constraint;


#! /your/favourite/path/to/ruby
# -*- mode: ruby; coding: utf-8; indent-tabs-mode: nil; ruby-indent-level: 2 -*-
# -*- frozen_string_literal: true; -*-
# -*- warn_indent: true; -*-
#
# Copyright (c) 2017 Urabe, Shyouhei.  All rights reserved.
#
# This file is  a part of the programming language  Ruby.  Permission is hereby
# granted, to  either redistribute and/or  modify this file, provided  that the
# conditions  mentioned in  the file  COPYING are  met.  Consult  the file  for
# details.

require_relative '../helpers/c_escape.rb'

class RubyVM::CExpr
  include RubyVM::CEscape

  attr_reader :__FILE__, :__LINE__, :expr

  def initialize opts = {}
    @__FILE__  = opts[:location][0]
    @__LINE__  = opts[:location][1]
    @expr      = opts[:expr]
  end

  # blank, in sense of C program.
  RE = %r'\A{\g<s>*}\z|\A(?<s>\s|/[*][^*]*[*]+([^*/][^*]*[*]+)*/)*\z'
  if RUBY_VERSION > '2.4' then
    def blank?
      RE.match? @expr
    end
  else
    def blank?
      RE =~ @expr
    end
  end

  def inspect
    sprintf "#<%s:%d %s>", @__FILE__, @__LINE__, @expr
  end
end


<!DOCTYPE html >

          <meta http-equiv="X-UA-Compatible" content="IE=edge" />
          <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
          <title></title>
          <meta name="description" content="" />
          <meta name="keywords" content="" />
          <meta http-equiv="content-type" content="text/html; charset=UTF-8" />

      <link href="../../lib/index.css" media="screen" type="text/css" rel="stylesheet" />
      <link href="../../lib/template.css" media="screen" type="text/css" rel="stylesheet" />
      <link href="../../lib/diagrams.css" media="screen" type="text/css" rel="stylesheet" id="diagrams-css" />

        < Back

            <input autocapitalize="none" placeholder="Search" id="index-input" type="text" accesskey="/" />
            
            

Packages

        

        package

        root

Definition Classes

root

        

        package

        provingground

This is work towards automated theorem proving based on learning, using
homotopy type theory (HoTT) as foundations and natural language processing.

This is work towards automated theorem proving based on learning, using
homotopy type theory (HoTT) as foundations and natural language processing.

The implementation of homotopy type theory is split into:

the object HoTT with terms, types, functions and dependent functions, pairs etc

the package induction with general inductive types and recursion/induction on these.

The learning package has the code for learning.

Scala code, including the spire library, is integrated with homotopy type theory
in the scalahott package

We have implemented a functor based approach to translation in the translation
package, used for nlp as well as serialization and parsing.

The library package is contains basic structures implemented in HoTT.

Definition Classes

root

        

        package

        learning

Definition Classes

provingground

        

        object

        FiniteDistributionLearner

A combinator for learning systems with state finite distributions on vertices.

A combinator for learning systems with state finite distributions on vertices.
Systems are built from components labeled by elements of a set M.
The state also has weights for these components.
The components are built from: moves (partial functions), partial combinations and islands.

Definition Classes

learning

                        Atom

                        CombinationFn

                        Evaluate

                        ExtendM

                        MoveFn

                        NewVertex

                        NormalizeFD

                        ProjectV

                        PtwiseProd

                        Sample

c

provingground.learning.FiniteDistributionLearner

NewVertex

        

        case class

        NewVertex[V](v: V) extends AdjDiffbleFunction[(Double, FiniteDistribution[V]), FiniteDistribution[V]] with Product with Serializable

Add a new vertex, mainly for lambdas

            Linear Supertypes

Serializable, Serializable, Product, Equals, AdjDiffbleFunction[(Double, FiniteDistribution[V]), FiniteDistribution[V]], AnyRef, Any

                  Type Hierarchy

<svg class="class-diagram" id="graph1" viewBox="0.00 0.00 549.50 118.00" height="118pt" width="550pt" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns="http://www.w3.org/2000/svg"><g transform="scale(1 1) rotate(0) translate(4 114)" class="graph" id="page0,1_graph0"><polygon points="-4,4 -4,-114 545.5,-114 545.5,4 -4,4" stroke="transparent" fill="#ffffff"></polygon><g class="cluster" id="clust1"></g><g class="cluster" id="clust2"></g><g class="node this class" id="graph1_0"><g id="a_this class|graph1_0"><path d="M434.6667,-49C434.6667,-49 349.3333,-49 349.3333,-49 345.1667,-49 341,-44.8333 341,-40.6667 341,-40.6667 341,-32.3333 341,-32.3333 341,-28.1667 345.1667,-24 349.3333,-24 349.3333,-24 434.6667,-24 434.6667,-24 438.8333,-24 443,-28.1667 443,-32.3333 443,-32.3333 443,-40.6667 443,-40.6667 443,-44.8333 438.8333,-49 434.6667,-49" stroke="#418565" fill="#418565"></path><image xlink:href="../../lib/class_diagram.png" y="-43.5" x="351" preserveAspectRatio="xMinYMin meet" height="15px" width="15px"></image><text fill="#ffffff" font-size="8.00" font-family="Source Code Pro" y="-34.1" x="372" text-anchor="start">NewVertex[V]</text></g></g><g class="node trait" id="graph1_1"><g id="a_trait|graph1_1"><path d="M327.6667,-110C327.6667,-110 8.3333,-110 8.3333,-110 4.1667,-110 0,-105.8333 0,-101.6667 0,-101.6667 0,-93.3333 0,-93.3333 0,-89.1667 4.1667,-85 8.3333,-85 8.3333,-85 327.6667,-85 327.6667,-85 331.8333,-85 336,-89.1667 336,-93.3333 336,-93.3333 336,-101.6667 336,-101.6667 336,-105.8333 331.8333,-110 327.6667,-110" stroke="#2e6d82" fill="#2e6d82"></path><image xlink:href="../../lib/trait_diagram.png" y="-104.5" x="10" preserveAspectRatio="xMinYMin meet" height="15px" width="15px"></image><text fill="#ffffff" font-size="8.00" font-family="Source Code Pro" y="-95.1" x="31" text-anchor="start">AdjDiffbleFunction[(Double, FiniteDistribution[V]), FiniteDistribution[V]]</text></g></g><g class="edge inheritance" id="graph1_1_0"><g id="a_inheritance|graph1_1_0"><path d="M221.0775,-83.0459C259.0451,-72.7065 309.6433,-58.9275 345.9185,-49.049" stroke="#d4d4d4" fill="none"></path><polygon points="220.2516,-80.7315 214.1413,-84.9347 221.5392,-85.4593 220.2516,-80.7315" stroke="#d4d4d4" fill="none"></polygon></g></g><g class="node trait" id="graph1_2"><g id="a_trait|graph1_2"><path d="M422.1667,-110C422.1667,-110 361.8333,-110 361.8333,-110 357.6667,-110 353.5,-105.8333 353.5,-101.6667 353.5,-101.6667 353.5,-93.3333 353.5,-93.3333 353.5,-89.1667 357.6667,-85 361.8333,-85 361.8333,-85 422.1667,-85 422.1667,-85 426.3333,-85 430.5,-89.1667 430.5,-93.3333 430.5,-93.3333 430.5,-101.6667 430.5,-101.6667 430.5,-105.8333 426.3333,-110 422.1667,-110" stroke="#2e6d82" fill="#2e6d82"></path><image xlink:href="../../lib/trait_diagram.png" y="-104.5" x="364" preserveAspectRatio="xMinYMin meet" height="15px" width="15px"></image><text fill="#ffffff" font-size="8.00" font-family="Source Code Pro" y="-95.1" x="385" text-anchor="start">Product</text></g></g><g class="edge inheritance" id="graph1_2_0"><g id="a_inheritance|graph1_2_0"><path d="M392,-77.7386C392,-68.3393 392,-57.3803 392,-49.123" stroke="#d4d4d4" fill="none"></path><polygon points="389.5501,-77.8607 392,-84.8608 394.4501,-77.8608 389.5501,-77.8607" stroke="#d4d4d4" fill="none"></polygon></g></g><g class="node trait" id="graph1_3"><g id="a_trait|graph1_3"><path d="M533.1667,-110C533.1667,-110 456.8333,-110 456.8333,-110 452.6667,-110 448.5,-105.8333 448.5,-101.6667 448.5,-101.6667 448.5,-93.3333 448.5,-93.3333 448.5,-89.1667 452.6667,-85 456.8333,-85 456.8333,-85 533.1667,-85 533.1667,-85 537.3333,-85 541.5,-89.1667 541.5,-93.3333 541.5,-93.3333 541.5,-101.6667 541.5,-101.6667 541.5,-105.8333 537.3333,-110 533.1667,-110" stroke="#2e6d82" fill="#2e6d82"></path><image xlink:href="../../lib/trait_diagram.png" y="-104.5" x="459" preserveAspectRatio="xMinYMin meet" height="15px" width="15px"></image><text fill="#ffffff" font-size="8.00" font-family="Source Code Pro" y="-95.1" x="480" text-anchor="start">Serializable</text></g></g><g class="edge inheritance" id="graph1_3_0"><g id="a_inheritance|graph1_3_0"><path d="M467.6144,-81.2814C450.6006,-71.2052 429.0515,-58.4431 413.3143,-49.123" stroke="#d4d4d4" fill="none"></path><polygon points="466.3869,-83.4017 473.6583,-84.8608 468.8838,-79.1856 466.3869,-83.4017" stroke="#d4d4d4" fill="none"></polygon></g></g></g></svg>

                  <button id="diagram-zoom-out" class="diagram-btn"></button>
                  <button id="diagram-zoom-in" class="diagram-btn"></button>
                  <button title="Toggle full-screen" id="diagram-fs" class="diagram-btn to-full"></button>

          

            <input id="mbrsel-input" placeholder="Filter all members" type="text" accesskey="/" />

          

            Ordering

Alphabetic

By Inheritance

                  Inherited

NewVertex

Serializable

Serializable

Product

Equals

AdjDiffbleFunction

AnyRef

Any

                  Implicitly

by any2stringadd

by StringFormat

by Ensuring

by ArrowAssoc

Hide All

Show All

              Visibility

Public

All

Instance Constructors

        

        new

        NewVertex(v: V)

Value Members

        

        final
        def

        !=(arg0: Any): Boolean

Definition Classes

AnyRef → Any

        

        final
        def

        ##(): Int

Definition Classes

AnyRef → Any

        

        def

        **:(that: ((Double, FiniteDistribution[V])) ⇒ FiniteDistribution[V]): ((Double, FiniteDistribution[V])) ⇒ (Double, FiniteDistribution[V])

post-compose by the gradient of this, for instance for a feedback.

post-compose by the gradient of this, for instance for a feedback.

Definition Classes

AdjDiffbleFunction

        

        def

        *:[C](that: ⇒ AdjDiffbleFunction[FiniteDistribution[V], C]): AdjDiffbleFunction[(Double, FiniteDistribution[V]), C]

Composition f *: g is f(g(_))

Composition f *: g is f(g(_))

Definition Classes

AdjDiffbleFunction

        

        def

        +(other: String): String

Implicit

            This member is added by an implicit conversion from NewVertex[V] to
            any2stringadd[NewVertex[V]] performed by method any2stringadd in scala.Predef.

Definition Classes

any2stringadd

        

        def

        ->[B](y: B): (NewVertex[V], B)

Implicit

            This member is added by an implicit conversion from NewVertex[V] to
            ArrowAssoc[NewVertex[V]] performed by method ArrowAssoc in scala.Predef.

Definition Classes

ArrowAssoc

Annotations

                @inline()

        

        final
        def

        ==(arg0: Any): Boolean

Definition Classes

AnyRef → Any

        

        def

        ^:(that: (FiniteDistribution[V]) ⇒ FiniteDistribution[V]): ((Double, FiniteDistribution[V])) ⇒ (Double, FiniteDistribution[V])

Conjugate that by this.

Conjugate that by this.

Definition Classes

AdjDiffbleFunction

        

        val

        adjDer: ((Double, FiniteDistribution[V])) ⇒ (FiniteDistribution[V]) ⇒ (Double, FiniteDistribution[V])

Definition Classes

NewVertex → AdjDiffbleFunction

        

        def

        andthen[C](that: ⇒ AdjDiffbleFunction[FiniteDistribution[V], C]): AdjDiffbleFunction[(Double, FiniteDistribution[V]), C]

Definition Classes

AdjDiffbleFunction

        

        def

        apply(a: (Double, FiniteDistribution[V])): FiniteDistribution[V]

Definition Classes

AdjDiffbleFunction

        

        final
        def

        asInstanceOf[T0]: T0

Definition Classes

Any

        

        def

        clone(): AnyRef

Attributes

protected[lang]

Definition Classes

AnyRef

Annotations

                @throws(

      ...
    )

                @native()

        

        def

        ensuring(cond: (NewVertex[V]) ⇒ Boolean, msg: ⇒ Any): NewVertex[V]

Implicit

            This member is added by an implicit conversion from NewVertex[V] to
            Ensuring[NewVertex[V]] performed by method Ensuring in scala.Predef.

Definition Classes

Ensuring

        

        def

        ensuring(cond: (NewVertex[V]) ⇒ Boolean): NewVertex[V]

Implicit

            This member is added by an implicit conversion from NewVertex[V] to
            Ensuring[NewVertex[V]] performed by method Ensuring in scala.Predef.

Definition Classes

Ensuring

        

        def

        ensuring(cond: Boolean, msg: ⇒ Any): NewVertex[V]

Implicit

            This member is added by an implicit conversion from NewVertex[V] to
            Ensuring[NewVertex[V]] performed by method Ensuring in scala.Predef.

Definition Classes

Ensuring

        

        def

        ensuring(cond: Boolean): NewVertex[V]

Implicit

            This member is added by an implicit conversion from NewVertex[V] to
            Ensuring[NewVertex[V]] performed by method Ensuring in scala.Predef.

Definition Classes

Ensuring

        

        final
        def

        eq(arg0: AnyRef): Boolean

Definition Classes

AnyRef

        

        def

        finalize(): Unit

Attributes

protected[lang]

Definition Classes

AnyRef

Annotations

                @throws(

      classOf[java.lang.Throwable]
    )

        

        def

        formatted(fmtstr: String): String

Implicit

            This member is added by an implicit conversion from NewVertex[V] to
            StringFormat[NewVertex[V]] performed by method StringFormat in scala.Predef.

Definition Classes

StringFormat

Annotations

                @inline()

        

        val

        func: ((Double, FiniteDistribution[V])) ⇒ FiniteDistribution[V]

Definition Classes

NewVertex → AdjDiffbleFunction

        

        final
        def

        getClass(): Class[_]

Definition Classes

AnyRef → Any

Annotations

                @native()

        

        final
        def

        isInstanceOf[T0]: Boolean

Definition Classes

Any

        

        final
        def

        ne(arg0: AnyRef): Boolean

Definition Classes

AnyRef

        

        final
        def

        notify(): Unit

Definition Classes

AnyRef

Annotations

                @native()

        

        final
        def

        notifyAll(): Unit

Definition Classes

AnyRef

Annotations

                @native()

        

        def

        oplus[C, D](that: AdjDiffbleFunction[C, D]): Oplus[(Double, FiniteDistribution[V]), FiniteDistribution[V], C, D]

Definition Classes

AdjDiffbleFunction

        

        final
        def

        synchronized[T0](arg0: ⇒ T0): T0

Definition Classes

AnyRef

        

        val

        v: V

        

        final
        def

        wait(): Unit

Definition Classes

AnyRef

Annotations

                @throws(

      ...
    )

        

        final
        def

        wait(arg0: Long, arg1: Int): Unit

Definition Classes

AnyRef

Annotations

                @throws(

      ...
    )

        

        final
        def

        wait(arg0: Long): Unit

Definition Classes

AnyRef

Annotations

                @throws(

      ...
    )

                @native()

        

        def

        →[B](y: B): (NewVertex[V], B)

Implicit

            This member is added by an implicit conversion from NewVertex[V] to
            ArrowAssoc[NewVertex[V]] performed by method ArrowAssoc in scala.Predef.

Definition Classes

ArrowAssoc

Inherited from Serializable

Inherited from Serializable

Inherited from Product

Inherited from Equals

Inherited from AdjDiffbleFunction[(Double, FiniteDistribution[V]), FiniteDistribution[V]]

Inherited from AnyRef

Inherited from Any

Inherited by implicit conversion any2stringadd from
                NewVertex[V] to any2stringadd[NewVertex[V]]

Inherited by implicit conversion StringFormat from
                NewVertex[V] to StringFormat[NewVertex[V]]

Inherited by implicit conversion Ensuring from
                NewVertex[V] to Ensuring[NewVertex[V]]

Inherited by implicit conversion ArrowAssoc from
                NewVertex[V] to ArrowAssoc[NewVertex[V]]

Ungrouped


<?xml version="1.0" encoding="UTF-8"?>
<Scheme
   LastUpgradeVersion = "0510"
   version = "1.3">
   <BuildAction
      parallelizeBuildables = "YES"
      buildImplicitDependencies = "YES">
      <BuildActionEntries>
         <BuildActionEntry
            buildForTesting = "YES"
            buildForRunning = "YES"
            buildForProfiling = "YES"
            buildForArchiving = "YES"
            buildForAnalyzing = "YES">
            <BuildableReference
               BuildableIdentifier = "primary"
               BlueprintIdentifier = "2333140918909194000ECFEA"
               BuildableName = "MyLocations.app"
               BlueprintName = "MyLocations"
               ReferencedContainer = "container:MyLocations.xcodeproj">
            </BuildableReference>
         </BuildActionEntry>
      </BuildActionEntries>
   </BuildAction>
   <TestAction
      selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
      selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
      shouldUseLaunchSchemeArgsEnv = "YES"
      buildConfiguration = "Debug">
      <Testables>
         <TestableReference
            skipped = "NO">
            <BuildableReference
               BuildableIdentifier = "primary"
               BlueprintIdentifier = "2333142D18909195000ECFEA"
               BuildableName = "MyLocationsTests.xctest"
               BlueprintName = "MyLocationsTests"
               ReferencedContainer = "container:MyLocations.xcodeproj">
            </BuildableReference>
         </TestableReference>
      </Testables>
      <MacroExpansion>
         <BuildableReference
            BuildableIdentifier = "primary"
            BlueprintIdentifier = "2333140918909194000ECFEA"
            BuildableName = "MyLocations.app"
            BlueprintName = "MyLocations"
            ReferencedContainer = "container:MyLocations.xcodeproj">
         </BuildableReference>
      </MacroExpansion>
   </TestAction>
   <LaunchAction
      selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
      selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
      launchStyle = "0"
      useCustomWorkingDirectory = "NO"
      buildConfiguration = "Debug"
      ignoresPersistentStateOnLaunch = "NO"
      debugDocumentVersioning = "YES"
      allowLocationSimulation = "YES">
      <BuildableProductRunnable>
         <BuildableReference
            BuildableIdentifier = "primary"
            BlueprintIdentifier = "2333140918909194000ECFEA"
            BuildableName = "MyLocations.app"
            BlueprintName = "MyLocations"
            ReferencedContainer = "container:MyLocations.xcodeproj">
         </BuildableReference>
      </BuildableProductRunnable>
      <AdditionalOptions>
      </AdditionalOptions>
   </LaunchAction>
   <ProfileAction
      shouldUseLaunchSchemeArgsEnv = "YES"
      savedToolIdentifier = ""
      useCustomWorkingDirectory = "NO"
      buildConfiguration = "Release"
      debugDocumentVersioning = "YES">
      <BuildableProductRunnable>
         <BuildableReference
            BuildableIdentifier = "primary"
            BlueprintIdentifier = "2333140918909194000ECFEA"
            BuildableName = "MyLocations.app"
            BlueprintName = "MyLocations"
            ReferencedContainer = "container:MyLocations.xcodeproj">
         </BuildableReference>
      </BuildableProductRunnable>
   </ProfileAction>
   <AnalyzeAction
      buildConfiguration = "Debug">
   </AnalyzeAction>
   <ArchiveAction
      buildConfiguration = "Release"
      revealArchiveInOrganizer = "YES">
   </ArchiveAction>
</Scheme>


<?xml version="1.0" encoding="utf-8"?>
<abapGit version="v1.0.0" serializer="LCL_OBJECT_CLAS" serializer_version="v1.0.0">
 <asx:abap xmlns:asx="http://www.sap.com/abapxml" version="1.0">
  <asx:values>
   <VSEOCLASS>
    <CLSNAME>ZCL_AOC_CHECK_31</CLSNAME>
    <LANGU>E</LANGU>
    <DESCRIPT>Extended Program Check, Filterable</DESCRIPT>
    <STATE>1</STATE>
    <CLSCCINCL>X</CLSCCINCL>
    <FIXPT>X</FIXPT>
    <UNICODE>X</UNICODE>
    <RSTAT>P</RSTAT>
    <WITH_UNIT_TESTS>X</WITH_UNIT_TESTS>
   </VSEOCLASS>
   <TPOOL>
    <item>
     <ID>I</ID>
     <KEY>M01</KEY>
     <ENTRY>&1</ENTRY>
     <LENGTH>12</LENGTH>
    </item>
   </TPOOL>
   <LINES>
    <TLINE>
     <TDFORMAT>*</TDFORMAT>
     <TDLINE>abapOpenChecks</TDLINE>
    </TLINE>
    <TLINE>
     <TDFORMAT>*</TDFORMAT>
     <TDLINE>https://github.com/larshp/abapOpenChecks</TDLINE>
    </TLINE>
    <TLINE>
     <TDFORMAT>*</TDFORMAT>
     <TDLINE>MIT License</TDLINE>
    </TLINE>
   </LINES>
  </asx:values>
 </asx:abap>
</abapGit>


/*
**==============================================================================
**
** Copyright (c) Microsoft Corporation. All rights reserved. See file LICENSE
** for license information.
**
**==============================================================================
*/

/* @migen@ */
#include <MI.h>
#include "X_Halves_Class_Provider.h"

MI_BEGIN_NAMESPACE

X_SmallNumber_Class FillNumberByKey(
    Uint64 key);

X_Halves_Class_Provider::X_Halves_Class_Provider(
        Module* module) :
    m_Module(module)
{
}

X_Halves_Class_Provider::~X_Halves_Class_Provider()
{
}

void X_Halves_Class_Provider::EnumerateInstances(
    Context&  context,
    const String& nameSpace,
    const PropertySet& propertySet,
    bool keysOnly,
    const MI_Filter* filter)
{
    context.Post(MI_RESULT_NOT_SUPPORTED);
}

void X_Halves_Class_Provider::GetInstance(
    Context&  context,
    const String& nameSpace,
    const X_Halves_Class& instance_ref,
    const PropertySet& propertySet)
{
    context.Post(MI_RESULT_NOT_SUPPORTED);
}

void X_Halves_Class_Provider::CreateInstance(
    Context&  context,
    const String& nameSpace,
    const X_Halves_Class& new_instance)
{
    context.Post(MI_RESULT_NOT_SUPPORTED);
}

void X_Halves_Class_Provider::ModifyInstance(
    Context&  context,
    const String& nameSpace,
    const X_Halves_Class& new_instance,
    const PropertySet& propertySet)
{
    context.Post(MI_RESULT_NOT_SUPPORTED);
}

void X_Halves_Class_Provider::DeleteInstance(
    Context&  context,
    const String& nameSpace,
    const X_Halves_Class& instance_ref)
{
    context.Post(MI_RESULT_NOT_SUPPORTED);
}

void X_Halves_Class_Provider::AssociatorInstances(
    Context&  context,
    const String& nameSpace,
    const MI_Instance* instanceName,
    const String& resultClass,
    const String& role,
    const String& resultRole,
    const PropertySet& propertySet,
    bool keysOnly,
        const MI_Filter* filter)
{
    if (!X_SmallNumber_IsA(instanceName))
    {
        context.Post(MI_RESULT_FAILED);
        return ;
    }

    X_SmallNumber_Class number((const X_SmallNumber*)instanceName,true);

    if (!number.Number().exists)
    {   // key is missing
        context.Post(MI_RESULT_FAILED);
        return ;
    }

    Uint64 num = number.Number().value;

    // check if we have smaller half
    if (num % 2 == 0 &&
        (role.GetSize() == 0 || role == MI_T("number")) &&          // check role
        (resultRole.GetSize() == 0 || resultRole == MI_T("half"))   // check result role
        )
    {
        context.Post(FillNumberByKey(num / 2));
    }

    // check if we have bigger half
    if (num * 2 < 10000 &&
        (role.GetSize() == 0 || role == MI_T("half")) &&          // check role
        (resultRole.GetSize() == 0 || resultRole == MI_T("number"))   // check result role
        )
    {
        context.Post(FillNumberByKey(num * 2));
    }

   context.Post(MI_RESULT_OK);
}

void X_Halves_Class_Provider::ReferenceInstances(
    Context&  context,
    const String& nameSpace,
    const MI_Instance* instanceName,
    const String& role,
    const PropertySet& propertySet,
    bool keysOnly,
    const MI_Filter* filter)
{
    context.Post(MI_RESULT_NOT_SUPPORTED);
}

MI_END_NAMESPACE
MI_BEGIN_NAMESPACE
void X_Halves_Class_Provider::Load(
        Context& context)
{
    context.Post(MI_RESULT_OK);
}

void X_Halves_Class_Provider::Unload(
        Context& context)
{
    context.Post(MI_RESULT_OK);
}

MI_END_NAMESPACE


"""setuptools.command.egg_info

Create a distribution's .egg-info directory and contents"""

from distutils.filelist import FileList as _FileList
from distutils.errors import DistutilsInternalError
from distutils.util import convert_path
from distutils import log
import distutils.errors
import distutils.filelist
import os
import re
import sys
import io
import warnings
import time
import collections

from setuptools.extern import six
from setuptools.extern.six.moves import map

from setuptools import Command
from setuptools.command.sdist import sdist
from setuptools.command.sdist import walk_revctrl
from setuptools.command.setopt import edit_config
from setuptools.command import bdist_egg
from pkg_resources import (
    parse_requirements, safe_name, parse_version,
    safe_version, yield_lines, EntryPoint, iter_entry_points, to_filename)
import setuptools.unicode_utils as unicode_utils
from setuptools.glob import glob

from pkg_resources.extern import packaging

def translate_pattern(glob):
    """
    Translate a file path glob like '*.txt' in to a regular expression.
    This differs from fnmatch.translate which allows wildcards to match
    directory separators. It also knows about '**/' which matches any number of
    directories.
    """
    pat = ''

    # This will split on '/' within [character classes]. This is deliberate.
    chunks = glob.split(os.path.sep)

    sep = re.escape(os.sep)
    valid_char = '[^%s]' % (sep,)

    for c, chunk in enumerate(chunks):
        last_chunk = c == len(chunks) - 1

        # Chunks that are a literal ** are globstars. They match anything.
        if chunk == '**':
            if last_chunk:
                # Match anything if this is the last component
                pat += '.*'
            else:
                # Match '(name/)*'
                pat += '(?:%s+%s)*' % (valid_char, sep)
            continue  # Break here as the whole path component has been handled

        # Find any special characters in the remainder
        i = 0
        chunk_len = len(chunk)
        while i < chunk_len:
            char = chunk[i]
            if char == '*':
                # Match any number of name characters
                pat += valid_char + '*'
            elif char == '?':
                # Match a name character
                pat += valid_char
            elif char == '[':
                # Character class
                inner_i = i + 1
                # Skip initial !/] chars
                if inner_i < chunk_len and chunk[inner_i] == '!':
                    inner_i = inner_i + 1
                if inner_i < chunk_len and chunk[inner_i] == ']':
                    inner_i = inner_i + 1

                # Loop till the closing ] is found
                while inner_i < chunk_len and chunk[inner_i] != ']':
                    inner_i = inner_i + 1

                if inner_i >= chunk_len:
                    # Got to the end of the string without finding a closing ]
                    # Do not treat this as a matching group, but as a literal [
                    pat += re.escape(char)
                else:
                    # Grab the insides of the [brackets]
                    inner = chunk[i + 1:inner_i]
                    char_class = ''

                    # Class negation
                    if inner[0] == '!':
                        char_class = '^'
                        inner = inner[1:]

                    char_class += re.escape(inner)
                    pat += '[%s]' % (char_class,)

                    # Skip to the end ]
                    i = inner_i
            else:
                pat += re.escape(char)
            i += 1

        # Join each chunk with the dir separator
        if not last_chunk:
            pat += sep

    pat += r'\Z'
    return re.compile(pat, flags=re.MULTILINE|re.DOTALL)

class egg_info(Command):
    description = "create a distribution's .egg-info directory"

    user_options = [
        ('egg-base=', 'e', "directory containing .egg-info directories"
                           " (default: top of the source tree)"),
        ('tag-date', 'd', "Add date stamp (e.g. 20050528) to version number"),
        ('tag-build=', 'b', "Specify explicit tag to add to version number"),
        ('no-date', 'D', "Don't include date stamp [default]"),
    ]

    boolean_options = ['tag-date']
    negative_opt = {
        'no-date': 'tag-date',
    }

    def initialize_options(self):
        self.egg_name = None
        self.egg_version = None
        self.egg_base = None
        self.egg_info = None
        self.tag_build = None
        self.tag_date = 0
        self.broken_egg_info = False
        self.vtags = None

    ####################################
    # allow the 'tag_svn_revision' to be detected and
    # set, supporting sdists built on older Setuptools.
    @property
    def tag_svn_revision(self):
        pass

    @tag_svn_revision.setter
    def tag_svn_revision(self, value):
        pass
    ####################################

    def save_version_info(self, filename):
        """
        Materialize the value of date into the
        build tag. Install build keys in a deterministic order
        to avoid arbitrary reordering on subsequent builds.
        """
        # python 2.6 compatibility
        odict = getattr(collections, 'OrderedDict', dict)
        egg_info = odict()
        # follow the order these keys would have been added
        # when PYTHONHASHSEED=0
        egg_info['tag_build'] = self.tags()
        egg_info['tag_date'] = 0
        edit_config(filename, dict(egg_info=egg_info))

    def finalize_options(self):
        self.egg_name = safe_name(self.distribution.get_name())
        self.vtags = self.tags()
        self.egg_version = self.tagged_version()

        parsed_version = parse_version(self.egg_version)

        try:
            is_version = isinstance(parsed_version, packaging.version.Version)
            spec = (
                "%s==%s" if is_version else "%s===%s"
            )
            list(
                parse_requirements(spec % (self.egg_name, self.egg_version))
            )
        except ValueError:
            raise distutils.errors.DistutilsOptionError(
                "Invalid distribution name or version syntax: %s-%s" %
                (self.egg_name, self.egg_version)
            )

        if self.egg_base is None:
            dirs = self.distribution.package_dir
            self.egg_base = (dirs or {}).get('', os.curdir)

        self.ensure_dirname('egg_base')
        self.egg_info = to_filename(self.egg_name) + '.egg-info'
        if self.egg_base != os.curdir:
            self.egg_info = os.path.join(self.egg_base, self.egg_info)
        if '-' in self.egg_name:
            self.check_broken_egg_info()

        # Set package version for the benefit of dumber commands
        # (e.g. sdist, bdist_wininst, etc.)
        #
        self.distribution.metadata.version = self.egg_version

        # If we bootstrapped around the lack of a PKG-INFO, as might be the
        # case in a fresh checkout, make sure that any special tags get added
        # to the version info
        #
        pd = self.distribution._patched_dist
        if pd is not None and pd.key == self.egg_name.lower():
            pd._version = self.egg_version
            pd._parsed_version = parse_version(self.egg_version)
            self.distribution._patched_dist = None

    def write_or_delete_file(self, what, filename, data, force=False):
        """Write `data` to `filename` or delete if empty

        If `data` is non-empty, this routine is the same as ``write_file()``.
        If `data` is empty but not ``None``, this is the same as calling
        ``delete_file(filename)`.  If `data` is ``None``, then this is a no-op
        unless `filename` exists, in which case a warning is issued about the
        orphaned file (if `force` is false), or deleted (if `force` is true).
        """
        if data:
            self.write_file(what, filename, data)
        elif os.path.exists(filename):
            if data is None and not force:
                log.warn(
                    "%s not set in setup(), but %s exists", what, filename
                )
                return
            else:
                self.delete_file(filename)

    def write_file(self, what, filename, data):
        """Write `data` to `filename` (if not a dry run) after announcing it

        `what` is used in a log message to identify what is being written
        to the file.
        """
        log.info("writing %s to %s", what, filename)
        if six.PY3:
            data = data.encode("utf-8")
        if not self.dry_run:
            f = open(filename, 'wb')
            f.write(data)
            f.close()

    def delete_file(self, filename):
        """Delete `filename` (if not a dry run) after announcing it"""
        log.info("deleting %s", filename)
        if not self.dry_run:
            os.unlink(filename)

    def tagged_version(self):
        version = self.distribution.get_version()
        # egg_info may be called more than once for a distribution,
        # in which case the version string already contains all tags.
        if self.vtags and version.endswith(self.vtags):
            return safe_version(version)
        return safe_version(version + self.vtags)

    def run(self):
        self.mkpath(self.egg_info)
        installer = self.distribution.fetch_build_egg
        for ep in iter_entry_points('egg_info.writers'):
            ep.require(installer=installer)
            writer = ep.resolve()
            writer(self, ep.name, os.path.join(self.egg_info, ep.name))

        # Get rid of native_libs.txt if it was put there by older bdist_egg
        nl = os.path.join(self.egg_info, "native_libs.txt")
        if os.path.exists(nl):
            self.delete_file(nl)

        self.find_sources()

    def tags(self):
        version = ''
        if self.tag_build:
            version += self.tag_build
        if self.tag_date:
            version += time.strftime("-%Y%m%d")
        return version

    def find_sources(self):
        """Generate SOURCES.txt manifest file"""
        manifest_filename = os.path.join(self.egg_info, "SOURCES.txt")
        mm = manifest_maker(self.distribution)
        mm.manifest = manifest_filename
        mm.run()
        self.filelist = mm.filelist

    def check_broken_egg_info(self):
        bei = self.egg_name + '.egg-info'
        if self.egg_base != os.curdir:
            bei = os.path.join(self.egg_base, bei)
        if os.path.exists(bei):
            log.warn(
                "-" * 78 + '\n'
                "Note: Your current .egg-info directory has a '-' in its name;"
                '\nthis will not work correctly with "setup.py develop".\n\n'
                'Please rename %s to %s to correct this problem.\n' + '-' * 78,
                bei, self.egg_info
            )
            self.broken_egg_info = self.egg_info
            self.egg_info = bei  # make it work for now

class FileList(_FileList):
    # Implementations of the various MANIFEST.in commands

    def process_template_line(self, line):
        # Parse the line: split it up, make sure the right number of words
        # is there, and return the relevant words.  'action' is always
        # defined: it's the first word of the line.  Which of the other
        # three are defined depends on the action; it'll be either
        # patterns, (dir and patterns), or (dir_pattern).
        (action, patterns, dir, dir_pattern) = self._parse_template_line(line)

        # OK, now we know that the action is valid and we have the
        # right number of words on the line for that action -- so we
        # can proceed with minimal error-checking.
        if action == 'include':
            self.debug_print("include " + ' '.join(patterns))
            for pattern in patterns:
                if not self.include(pattern):
                    log.warn("warning: no files found matching '%s'", pattern)

        elif action == 'exclude':
            self.debug_print("exclude " + ' '.join(patterns))
            for pattern in patterns:
                if not self.exclude(pattern):
                    log.warn(("warning: no previously-included files "
                              "found matching '%s'"), pattern)

        elif action == 'global-include':
            self.debug_print("global-include " + ' '.join(patterns))
            for pattern in patterns:
                if not self.global_include(pattern):
                    log.warn(("warning: no files found matching '%s' "
                              "anywhere in distribution"), pattern)

        elif action == 'global-exclude':
            self.debug_print("global-exclude " + ' '.join(patterns))
            for pattern in patterns:
                if not self.global_exclude(pattern):
                    log.warn(("warning: no previously-included files matching "
                              "'%s' found anywhere in distribution"),
                             pattern)

        elif action == 'recursive-include':
            self.debug_print("recursive-include %s %s" %
                             (dir, ' '.join(patterns)))
            for pattern in patterns:
                if not self.recursive_include(dir, pattern):
                    log.warn(("warning: no files found matching '%s' "
                              "under directory '%s'"),
                             pattern, dir)

        elif action == 'recursive-exclude':
            self.debug_print("recursive-exclude %s %s" %
                             (dir, ' '.join(patterns)))
            for pattern in patterns:
                if not self.recursive_exclude(dir, pattern):
                    log.warn(("warning: no previously-included files matching "
                              "'%s' found under directory '%s'"),
                             pattern, dir)

        elif action == 'graft':
            self.debug_print("graft " + dir_pattern)
            if not self.graft(dir_pattern):
                log.warn("warning: no directories found matching '%s'",
                         dir_pattern)

        elif action == 'prune':
            self.debug_print("prune " + dir_pattern)
            if not self.prune(dir_pattern):
                log.warn(("no previously-included directories found "
                          "matching '%s'"), dir_pattern)

        else:
            raise DistutilsInternalError(
                "this cannot happen: invalid action '%s'" % action)

    def _remove_files(self, predicate):
        """
        Remove all files from the file list that match the predicate.
        Return True if any matching files were removed
        """
        found = False
        for i in range(len(self.files) - 1, -1, -1):
            if predicate(self.files[i]):
                self.debug_print(" removing " + self.files[i])
                del self.files[i]
                found = True
        return found

    def include(self, pattern):
        """Include files that match 'pattern'."""
        found = [f for f in glob(pattern) if not os.path.isdir(f)]
        self.extend(found)
        return bool(found)

    def exclude(self, pattern):
        """Exclude files that match 'pattern'."""
        match = translate_pattern(pattern)
        return self._remove_files(match.match)

    def recursive_include(self, dir, pattern):
        """
        Include all files anywhere in 'dir/' that match the pattern.
        """
        full_pattern = os.path.join(dir, '**', pattern)
        found = [f for f in glob(full_pattern, recursive=True)
                 if not os.path.isdir(f)]
        self.extend(found)
        return bool(found)

    def recursive_exclude(self, dir, pattern):
        """
        Exclude any file anywhere in 'dir/' that match the pattern.
        """
        match = translate_pattern(os.path.join(dir, '**', pattern))
        return self._remove_files(match.match)

    def graft(self, dir):
        """Include all files from 'dir/'."""
        found = [
            item
            for match_dir in glob(dir)
            for item in distutils.filelist.findall(match_dir)
        ]
        self.extend(found)
        return bool(found)

    def prune(self, dir):
        """Filter out files from 'dir/'."""
        match = translate_pattern(os.path.join(dir, '**'))
        return self._remove_files(match.match)

    def global_include(self, pattern):
        """
        Include all files anywhere in the current directory that match the
        pattern. This is very inefficient on large file trees.
        """
        if self.allfiles is None:
            self.findall()
        match = translate_pattern(os.path.join('**', pattern))
        found = [f for f in self.allfiles if match.match(f)]
        self.extend(found)
        return bool(found)

    def global_exclude(self, pattern):
        """
        Exclude all files anywhere that match the pattern.
        """
        match = translate_pattern(os.path.join('**', pattern))
        return self._remove_files(match.match)

    def append(self, item):
        if item.endswith('\r'):  # Fix older sdists built on Windows
            item = item[:-1]
        path = convert_path(item)

        if self._safe_path(path):
            self.files.append(path)

    def extend(self, paths):
        self.files.extend(filter(self._safe_path, paths))

    def _repair(self):
        """
        Replace self.files with only safe paths

        Because some owners of FileList manipulate the underlying
        ``files`` attribute directly, this method must be called to
        repair those paths.
        """
        self.files = list(filter(self._safe_path, self.files))

    def _safe_path(self, path):
        enc_warn = "'%s' not %s encodable -- skipping"

        # To avoid accidental trans-codings errors, first to unicode
        u_path = unicode_utils.filesys_decode(path)
        if u_path is None:
            log.warn("'%s' in unexpected encoding -- skipping" % path)
            return False

        # Must ensure utf-8 encodability
        utf8_path = unicode_utils.try_encode(u_path, "utf-8")
        if utf8_path is None:
            log.warn(enc_warn, path, 'utf-8')
            return False

        try:
            # accept is either way checks out
            if os.path.exists(u_path) or os.path.exists(utf8_path):
                return True
        # this will catch any encode errors decoding u_path
        except UnicodeEncodeError:
            log.warn(enc_warn, path, sys.getfilesystemencoding())

class manifest_maker(sdist):
    template = "MANIFEST.in"

    def initialize_options(self):
        self.use_defaults = 1
        self.prune = 1
        self.manifest_only = 1
        self.force_manifest = 1

    def finalize_options(self):
        pass

    def run(self):
        self.filelist = FileList()
        if not os.path.exists(self.manifest):
            self.write_manifest()  # it must exist so it'll get in the list
        self.add_defaults()
        if os.path.exists(self.template):
            self.read_template()
        self.prune_file_list()
        self.filelist.sort()
        self.filelist.remove_duplicates()
        self.write_manifest()

    def _manifest_normalize(self, path):
        path = unicode_utils.filesys_decode(path)
        return path.replace(os.sep, '/')

    def write_manifest(self):
        """
        Write the file list in 'self.filelist' to the manifest file
        named by 'self.manifest'.
        """
        self.filelist._repair()

        # Now _repairs should encodability, but not unicode
        files = [self._manifest_normalize(f) for f in self.filelist.files]
        msg = "writing manifest file '%s'" % self.manifest
        self.execute(write_file, (self.manifest, files), msg)

    def warn(self, msg):
        if not self._should_suppress_warning(msg):
            sdist.warn(self, msg)

    @staticmethod
    def _should_suppress_warning(msg):
        """
        suppress missing-file warnings from sdist
        """
        return re.match(r"standard file .*not found", msg)

    def add_defaults(self):
        sdist.add_defaults(self)
        self.filelist.append(self.template)
        self.filelist.append(self.manifest)
        rcfiles = list(walk_revctrl())
        if rcfiles:
            self.filelist.extend(rcfiles)
        elif os.path.exists(self.manifest):
            self.read_manifest()
        ei_cmd = self.get_finalized_command('egg_info')
        self.filelist.graft(ei_cmd.egg_info)

    def prune_file_list(self):
        build = self.get_finalized_command('build')
        base_dir = self.distribution.get_fullname()
        self.filelist.prune(build.build_base)
        self.filelist.prune(base_dir)
        sep = re.escape(os.sep)
        self.filelist.exclude_pattern(r'(^|' + sep + r')(RCS|CVS|\.svn)' + sep,
                                      is_regex=1)

def write_file(filename, contents):
    """Create a file with the specified name and write 'contents' (a
    sequence of strings without line terminators) to it.
    """
    contents = "\n".join(contents)

    # assuming the contents has been vetted for utf-8 encoding
    contents = contents.encode("utf-8")

    with open(filename, "wb") as f:  # always write POSIX-style manifest
        f.write(contents)

def write_pkg_info(cmd, basename, filename):
    log.info("writing %s", filename)
    if not cmd.dry_run:
        metadata = cmd.distribution.metadata
        metadata.version, oldver = cmd.egg_version, metadata.version
        metadata.name, oldname = cmd.egg_name, metadata.name
        metadata.long_description_content_type = getattr(
            cmd.distribution,
            'long_description_content_type'
        )
        try:
            # write unescaped data to PKG-INFO, so older pkg_resources
            # can still parse it
            metadata.write_pkg_info(cmd.egg_info)
        finally:
            metadata.name, metadata.version = oldname, oldver

        safe = getattr(cmd.distribution, 'zip_safe', None)

        bdist_egg.write_safety_flag(cmd.egg_info, safe)

def warn_depends_obsolete(cmd, basename, filename):
    if os.path.exists(filename):
        log.warn(
            "WARNING: 'depends.txt' is not used by setuptools 0.6!\n"
            "Use the install_requires/extras_require setup() args instead."
        )

def _write_requirements(stream, reqs):
    lines = yield_lines(reqs or ())
    append_cr = lambda line: line + '\n'
    lines = map(append_cr, lines)
    stream.writelines(lines)

def write_requirements(cmd, basename, filename):
    dist = cmd.distribution
    data = six.StringIO()
    _write_requirements(data, dist.install_requires)
    extras_require = dist.extras_require or {}
    for extra in sorted(extras_require):
        data.write('\n[{extra}]\n'.format(**vars()))
        _write_requirements(data, extras_require[extra])
    cmd.write_or_delete_file("requirements", filename, data.getvalue())

def write_setup_requirements(cmd, basename, filename):
    data = StringIO()
    _write_requirements(data, cmd.distribution.setup_requires)
    cmd.write_or_delete_file("setup-requirements", filename, data.getvalue())

def write_toplevel_names(cmd, basename, filename):
    pkgs = dict.fromkeys(
        [
            k.split('.', 1)[0]
            for k in cmd.distribution.iter_distribution_names()
        ]
    )
    cmd.write_file("top-level names", filename, '\n'.join(sorted(pkgs)) + '\n')

def overwrite_arg(cmd, basename, filename):
    write_arg(cmd, basename, filename, True)

def write_arg(cmd, basename, filename, force=False):
    argname = os.path.splitext(basename)[0]
    value = getattr(cmd.distribution, argname, None)
    if value is not None:
        value = '\n'.join(value) + '\n'
    cmd.write_or_delete_file(argname, filename, value, force)

def write_entries(cmd, basename, filename):
    ep = cmd.distribution.entry_points

    if isinstance(ep, six.string_types) or ep is None:
        data = ep
    elif ep is not None:
        data = []
        for section, contents in sorted(ep.items()):
            if not isinstance(contents, six.string_types):
                contents = EntryPoint.parse_group(section, contents)
                contents = '\n'.join(sorted(map(str, contents.values())))
            data.append('[%s]\n%s\n\n' % (section, contents))
        data = ''.join(data)

    cmd.write_or_delete_file('entry points', filename, data, True)

def get_pkg_info_revision():
    """
    Get a -r### off of PKG-INFO Version in case this is an sdist of
    a subversion revision.
    """
    warnings.warn("get_pkg_info_revision is deprecated.", DeprecationWarning)
    if os.path.exists('PKG-INFO'):
        with io.open('PKG-INFO') as f:
            for line in f:
                match = re.match(r"Version:.*-r(\d+)\s*$", line)
                if match:
                    return int(match.group(1))
    return 0


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

<title>Uses of Class org.deidentifier.arx.risk.RiskModelSampleSummary.RiskSummary</title>
<meta name="date" content="2019-11-17">
<link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style">

JavaScript is disabled on your browser.

Skip navigation links

Overview

Package

Class

Use

Tree

Deprecated

Index

Help

Prev

Next

Frames

No Frames

All Classes

Uses of Class
org.deidentifier.arx.risk.RiskModelSampleSummary.RiskSummary

Packages that use RiskModelSampleSummary.RiskSummary

Package
Description

org.deidentifier.arx.risk

This package provides methods for risk analyses

Uses of RiskModelSampleSummary.RiskSummary in org.deidentifier.arx.risk

Subclasses of RiskModelSampleSummary.RiskSummary in org.deidentifier.arx.risk

Modifier and Type
Class and Description

static class
RiskModelSampleSummary.JournalistRisk

Journalist risk

static class
RiskModelSampleSummary.ProsecutorRisk

Prosecutor risk

Skip navigation links

Overview

Package

Class

Use

Tree

Deprecated

Index

Help

Prev

Next

Frames

No Frames

All Classes


/*
To customize the look and feel of Ionic, you can override the variables
in ionic's _variables.scss file.

For example, you might change some of the default colors:

$light:                           #fff !default;
$stable:                          #f8f8f8 !default;
$positive:                        #387ef5 !default;
$calm:                            #11c1f3 !default;
$balanced:                        #33cd5f !default;
$energized:                       #ffc900 !default;
$assertive:                       #ef473a !default;
$royal:                           #886aea !default;
$dark:                            #444 !default;
*/

// The path for our ionicons font files, relative to the built CSS in www/css
$ionicons-font-path: "../lib/ionic/fonts" !default;

// Include all of Ionic
@import "www/lib/ionic/scss/ionic";


Module: A

Defined in:

(stdin)

Foo collapse

      #foo_attr

Returns the value of attribute foo_attr.

      Foo
      collapse

      .bar

      #foo

      Bar
      collapse

      #baz

      Class Method Summary
      collapse

      .baz

Instance Attribute Details

    #foo_attr

    Returns the value of attribute foo_attr.

3
4
5

# File '(stdin)', line 3

def foo_attr
  @foo_attr
end

Class Method Details

    .bar

5

# File '(stdin)', line 5

def self.bar; end

    .baz

12

# File '(stdin)', line 12

def self.baz; end

Instance Method Details

    #baz

8

# File '(stdin)', line 8

def baz; end

    #foo

4

# File '(stdin)', line 4

def foo; end


import AFRAME from 'aframe';
import 'aframe-particle-system-component';