text:
(function (global, factory) {
  typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('react'), require('react-dom'), require('@popperjs/core')) :
  typeof define === 'function' && define.amd ? define(['exports', 'react', 'react-dom', '@popperjs/core'], factory) :
  (global = global || self, factory(global.ReactPopper = {}, global.React, global.ReactDOM, global.Popper));
}(this, (function (exports, React, ReactDOM, core) { 'use strict';

  var ManagerReferenceNodeContext = React.createContext();
  var ManagerReferenceNodeSetterContext = React.createContext();
  function Manager(_ref) {
    var children = _ref.children;

    var _React$useState = React.useState(null),
        referenceNode = _React$useState[0],
        setReferenceNode = _React$useState[1];

    var hasUnmounted = React.useRef(false);
    React.useEffect(function () {
      return function () {
        hasUnmounted.current = true;
      };
    }, []);
    var handleSetReferenceNode = React.useCallback(function (node) {
      if (!hasUnmounted.current) {
        setReferenceNode(node);
      }
    }, []);
    return /*#__PURE__*/React.createElement(ManagerReferenceNodeContext.Provider, {
      value: referenceNode
    }, /*#__PURE__*/React.createElement(ManagerReferenceNodeSetterContext.Provider, {
      value: handleSetReferenceNode
    }, children));
  }

  /**
   * Takes an argument and if it's an array, returns the first item in the array,
   * otherwise returns the argument. Used for Preact compatibility.
   */
  var unwrapArray = function unwrapArray(arg) {
    return Array.isArray(arg) ? arg[0] : arg;
  };
  /**
   * Takes a maybe-undefined function and arbitrary args and invokes the function
   * only if it is defined.
   */

  var safeInvoke = function safeInvoke(fn) {
    if (typeof fn === 'function') {
      for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
        args[_key - 1] = arguments[_key];
      }

      return fn.apply(void 0, args);
    }
  };
  /**
   * Sets a ref using either a ref callback or a ref object
   */

  var setRef = function setRef(ref, node) {
    // if its a function call it
    if (typeof ref === 'function') {
      return safeInvoke(ref, node);
    } // otherwise we should treat it as a ref object
    else if (ref != null) {
        ref.current = node;
      }
  };
  /**
   * Simple ponyfill for Object.fromEntries
   */

  var fromEntries = function fromEntries(entries) {
    return entries.reduce(function (acc, _ref) {
      var key = _ref[0],
          value = _ref[1];
      acc[key] = value;
      return acc;
    }, {});
  };
  /**
   * Small wrapper around `useLayoutEffect` to get rid of the warning on SSR envs
   */

  var useIsomorphicLayoutEffect = typeof window !== 'undefined' && window.document && window.document.createElement ? React.useLayoutEffect : React.useEffect;

  /* global Map:readonly, Set:readonly, ArrayBuffer:readonly */

  var hasElementType = typeof Element !== 'undefined';
  var hasMap = typeof Map === 'function';
  var hasSet = typeof Set === 'function';
  var hasArrayBuffer = typeof ArrayBuffer === 'function';

  // Note: We **don't** need `envHasBigInt64Array` in fde es6/index.js

  function equal(a, b) {
    // START: fast-deep-equal es6/index.js 3.1.1
    if (a === b) return true;

    if (a && b && typeof a == 'object' && typeof b == 'object') {
      if (a.constructor !== b.constructor) return false;

      var length, i, keys;
      if (Array.isArray(a)) {
        length = a.length;
        if (length != b.length) return false;
        for (i = length; i-- !== 0;)
          if (!equal(a[i], b[i])) return false;
        return true;
      }

      // START: Modifications:
      // 1. Extra `has<Type> &&` helpers in initial condition allow es6 code
      //    to co-exist with es5.
      // 2. Replace `for of` with es5 compliant iteration using `for`.
      //    Basically, take:
      //
      //    ```js
      //    for (i of a.entries())
      //      if (!b.has(i[0])) return false;
      //    ```
      //
      //    ... and convert to:
      //
      //    ```js
      //    it = a.entries();
      //    while (!(i = it.next()).done)
      //      if (!b.has(i.value[0])) return false;
      //    ```
      //
      //    **Note**: `i` access switches to `i.value`.
      var it;
      if (hasMap && (a instanceof Map) && (b instanceof Map)) {
        if (a.size !== b.size) return false;
        it = a.entries();
        while (!(i = it.next()).done)
          if (!b.has(i.value[0])) return false;
        it = a.entries();
        while (!(i = it.next()).done)
          if (!equal(i.value[1], b.get(i.value[0]))) return false;
        return true;
      }

      if (hasSet && (a instanceof Set) && (b instanceof Set)) {
        if (a.size !== b.size) return false;
        it = a.entries();
        while (!(i = it.next()).done)
          if (!b.has(i.value[0])) return false;
        return true;
      }
      // END: Modifications

      if (hasArrayBuffer && ArrayBuffer.isView(a) && ArrayBuffer.isView(b)) {
        length = a.length;
        if (length != b.length) return false;
        for (i = length; i-- !== 0;)
          if (a[i] !== b[i]) return false;
        return true;
      }

      if (a.constructor === RegExp) return a.source === b.source && a.flags === b.flags;
      if (a.valueOf !== Object.prototype.valueOf) return a.valueOf() === b.valueOf();
      if (a.toString !== Object.prototype.toString) return a.toString() === b.toString();

      keys = Object.keys(a);
      length = keys.length;
      if (length !== Object.keys(b).length) return false;

      for (i = length; i-- !== 0;)
        if (!Object.prototype.hasOwnProperty.call(b, keys[i])) return false;
      // END: fast-deep-equal

      // START: react-fast-compare
      // custom handling for DOM elements
      if (hasElementType && a instanceof Element) return false;

      // custom handling for React
      for (i = length; i-- !== 0;) {
        if (keys[i] === '_owner' && a.$$typeof) {
          // React-specific: avoid traversing React elements' _owner.
          //  _owner contains circular references
          // and is not needed when comparing the actual elements (and not their owners)
          // .$$typeof and ._store on just reasonable markers of a react element
          continue;
        }

        // all other properties should be traversed as usual
        if (!equal(a[keys[i]], b[keys[i]])) return false;
      }
      // END: react-fast-compare

      // START: fast-deep-equal
      return true;
    }

    return a !== a && b !== b;
  }
  // end fast-deep-equal

  var reactFastCompare = function isEqual(a, b) {
    try {
      return equal(a, b);
    } catch (error) {
      if (((error.message || '').match(/stack|recursion/i))) {
        // warn on circular references, don't crash
        // browsers give this different errors name and messages:
        // chrome/safari: "RangeError", "Maximum call stack size exceeded"
        // firefox: "InternalError", too much recursion"
        // edge: "Error", "Out of stack space"
        console.warn('react-fast-compare cannot handle circular refs');
        return false;
      }
      // some other error. we should definitely know about these
      throw error;
    }
  };

  var EMPTY_MODIFIERS = [];
  var usePopper = function usePopper(referenceElement, popperElement, options) {
    if (options === void 0) {
      options = {};
    }

    var prevOptions = React.useRef(null);
    var optionsWithDefaults = {
      onFirstUpdate: options.onFirstUpdate,
      placement: options.placement || 'bottom',
      strategy: options.strategy || 'absolute',
      modifiers: options.modifiers || EMPTY_MODIFIERS
    };

    var _React$useState = React.useState({
      styles: {
        popper: {
          position: optionsWithDefaults.strategy,
          left: '0',
          top: '0'
        },
        arrow: {
          position: 'absolute'
        }
      },
      attributes: {}
    }),
        state = _React$useState[0],
        setState = _React$useState[1];

    var updateStateModifier = React.useMemo(function () {
      return {
        name: 'updateState',
        enabled: true,
        phase: 'write',
        fn: function fn(_ref) {
          var state = _ref.state;
          var elements = Object.keys(state.elements);
          ReactDOM.flushSync(function () {
            setState({
              styles: fromEntries(elements.map(function (element) {
                return [element, state.styles[element] || {}];
              })),
              attributes: fromEntries(elements.map(function (element) {
                return [element, state.attributes[element]];
              }))
            });
          });
        },
        requires: ['computeStyles']
      };
    }, []);
    var popperOptions = React.useMemo(function () {
      var newOptions = {
        onFirstUpdate: optionsWithDefaults.onFirstUpdate,
        placement: optionsWithDefaults.placement,
        strategy: optionsWithDefaults.strategy,
        modifiers: [].concat(optionsWithDefaults.modifiers, [updateStateModifier, {
          name: 'applyStyles',
          enabled: false
        }])
      };

      if (reactFastCompare(prevOptions.current, newOptions)) {
        return prevOptions.current || newOptions;
      } else {
        prevOptions.current = newOptions;
        return newOptions;
      }
    }, [optionsWithDefaults.onFirstUpdate, optionsWithDefaults.placement, optionsWithDefaults.strategy, optionsWithDefaults.modifiers, updateStateModifier]);
    var popperInstanceRef = React.useRef();
    useIsomorphicLayoutEffect(function () {
      if (popperInstanceRef.current) {
        popperInstanceRef.current.setOptions(popperOptions);
      }
    }, [popperOptions]);
    useIsomorphicLayoutEffect(function () {
      if (referenceElement == null || popperElement == null) {
        return;
      }

      var createPopper = options.createPopper || core.createPopper;
      var popperInstance = createPopper(referenceElement, popperElement, popperOptions);
      popperInstanceRef.current = popperInstance;
      return function () {
        popperInstance.destroy();
        popperInstanceRef.current = null;
      };
    }, [referenceElement, popperElement, options.createPopper]);
    return {
      state: popperInstanceRef.current ? popperInstanceRef.current.state : null,
      styles: state.styles,
      attributes: state.attributes,
      update: popperInstanceRef.current ? popperInstanceRef.current.update : null,
      forceUpdate: popperInstanceRef.current ? popperInstanceRef.current.forceUpdate : null
    };
  };

  var NOOP = function NOOP() {
    return void 0;
  };

  var NOOP_PROMISE = function NOOP_PROMISE() {
    return Promise.resolve(null);
  };

  var EMPTY_MODIFIERS$1 = [];
  function Popper(_ref) {
    var _ref$placement = _ref.placement,
        placement = _ref$placement === void 0 ? 'bottom' : _ref$placement,
        _ref$strategy = _ref.strategy,
        strategy = _ref$strategy === void 0 ? 'absolute' : _ref$strategy,
        _ref$modifiers = _ref.modifiers,
        modifiers = _ref$modifiers === void 0 ? EMPTY_MODIFIERS$1 : _ref$modifiers,
        referenceElement = _ref.referenceElement,
        onFirstUpdate = _ref.onFirstUpdate,
        innerRef = _ref.innerRef,
        children = _ref.children;
    var referenceNode = React.useContext(ManagerReferenceNodeContext);

    var _React$useState = React.useState(null),
        popperElement = _React$useState[0],
        setPopperElement = _React$useState[1];

    var _React$useState2 = React.useState(null),
        arrowElement = _React$useState2[0],
        setArrowElement = _React$useState2[1];

    React.useEffect(function () {
      setRef(innerRef, popperElement);
    }, [innerRef, popperElement]);
    var options = React.useMemo(function () {
      return {
        placement: placement,
        strategy: strategy,
        onFirstUpdate: onFirstUpdate,
        modifiers: [].concat(modifiers, [{
          name: 'arrow',
          enabled: arrowElement != null,
          options: {
            element: arrowElement
          }
        }])
      };
    }, [placement, strategy, onFirstUpdate, modifiers, arrowElement]);

    var _usePopper = usePopper(referenceElement || referenceNode, popperElement, options),
        state = _usePopper.state,
        styles = _usePopper.styles,
        forceUpdate = _usePopper.forceUpdate,
        update = _usePopper.update;

    var childrenProps = React.useMemo(function () {
      return {
        ref: setPopperElement,
        style: styles.popper,
        placement: state ? state.placement : placement,
        hasPopperEscaped: state && state.modifiersData.hide ? state.modifiersData.hide.hasPopperEscaped : null,
        isReferenceHidden: state && state.modifiersData.hide ? state.modifiersData.hide.isReferenceHidden : null,
        arrowProps: {
          style: styles.arrow,
          ref: setArrowElement
        },
        forceUpdate: forceUpdate || NOOP,
        update: update || NOOP_PROMISE
      };
    }, [setPopperElement, setArrowElement, placement, state, styles, update, forceUpdate]);
    return unwrapArray(children)(childrenProps);
  }

  /**
   * Copyright (c) 2014-present, Facebook, Inc.
   *
   * This source code is licensed under the MIT license found in the
   * LICENSE file in the root directory of this source tree.
   */

  var warning = function() {};

  {
    var printWarning = function printWarning(format, args) {
      var len = arguments.length;
      args = new Array(len > 1 ? len - 1 : 0);
      for (var key = 1; key < len; key++) {
        args[key - 1] = arguments[key];
      }
      var argIndex = 0;
      var message = 'Warning: ' +
        format.replace(/%s/g, function() {
          return args[argIndex++];
        });
      if (typeof console !== 'undefined') {
        console.error(message);
      }
      try {
        // --- Welcome to debugging React ---
        // This error was thrown as a convenience so that you can use this stack
        // to find the callsite that caused this warning to fire.
        throw new Error(message);
      } catch (x) {}
    };

    warning = function(condition, format, args) {
      var len = arguments.length;
      args = new Array(len > 2 ? len - 2 : 0);
      for (var key = 2; key < len; key++) {
        args[key - 2] = arguments[key];
      }
      if (format === undefined) {
        throw new Error(
            '`warning(condition, format, ...args)` requires a warning ' +
            'message argument'
        );
      }
      if (!condition) {
        printWarning.apply(null, [format].concat(args));
      }
    };
  }

  var warning_1 = warning;

  function Reference(_ref) {
    var children = _ref.children,
        innerRef = _ref.innerRef;
    var setReferenceNode = React.useContext(ManagerReferenceNodeSetterContext);
    var refHandler = React.useCallback(function (node) {
      setRef(innerRef, node);
      safeInvoke(setReferenceNode, node);
    }, [innerRef, setReferenceNode]); // ran on unmount
    // eslint-disable-next-line react-hooks/exhaustive-deps

    React.useEffect(function () {
      return function () {
        return setRef(innerRef, null);
      };
    }, []);
    React.useEffect(function () {
      warning_1(Boolean(setReferenceNode), '`Reference` should not be used outside of a `Manager` component.');
    }, [setReferenceNode]);
    return unwrapArray(children)({
      ref: refHandler
    });
  }

  exports.Manager = Manager;
  exports.Popper = Popper;
  exports.Reference = Reference;
  exports.usePopper = usePopper;

  Object.defineProperty(exports, '__esModule', { value: true });

})));


text:
from __future__ import absolute_import
from __future__ import unicode_literals

from .file_utility import *
from .excel_helper import *
from .export_helper import *

redpajama_set_name: RedPajamaGithub


text:
<link href="css/bootstrap-wysihtml5/bootstrap3-wysihtml5.min.css" rel="stylesheet" type="text/css" />

        Text Editors
        Advanced form element

 Home

Forms

Editors

CK Editor Advanced and full of features

                        <button class="btn btn-info btn-sm" data-widget='collapse' data-toggle="tooltip" title="Collapse"></button>
                        <button class="btn btn-info btn-sm" data-widget='remove' data-toggle="tooltip" title="Remove"></button>

                    <form>
                        <textarea id="editor1" name="editor1" rows="10" cols="80">
                            This is my textarea to be replaced with CKEditor.
                        </textarea>
                    </form>

Bootstrap WYSIHTML5 Simple and fast

                        <button class="btn btn-default btn-sm" data-widget='collapse' data-toggle="tooltip" title="Collapse"></button>
                        <button class="btn btn-default btn-sm" data-widget='remove' data-toggle="tooltip" title="Remove"></button>

                    <form>
                        <textarea class="textarea" placeholder="Place some text here" style="width: 100%; height: 200px; font-size: 14px; line-height: 18px; border: 1px solid #dddddd; padding: 10px;"></textarea>
                    </form>


text:
package org.apache.storm.eventhubs.trident;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

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

import org.apache.storm.eventhubs.spout.EventData;
import org.apache.storm.eventhubs.spout.EventHubReceiverImpl;
import org.apache.storm.eventhubs.spout.EventHubSpoutConfig;
import org.apache.storm.eventhubs.spout.IEventHubReceiver;
import org.apache.storm.eventhubs.spout.IEventHubReceiverFactory;
import com.microsoft.eventhubs.client.Constants;

import org.apache.storm.trident.operation.TridentCollector;
import org.apache.storm.trident.spout.IOpaquePartitionedTridentSpout;
import org.apache.storm.trident.spout.IPartitionedTridentSpout;
import org.apache.storm.trident.topology.TransactionAttempt;

public class TransactionalTridentEventHubEmitter
    implements IPartitionedTridentSpout.Emitter<Partitions, Partition, Map> {
  private static final Logger logger = LoggerFactory.getLogger(TransactionalTridentEventHubEmitter.class);
  private final int batchSize;
  private final EventHubSpoutConfig spoutConfig;
  private Map<String, ITridentPartitionManager> pmMap;
  private ITridentPartitionManagerFactory pmFactory;
  private IEventHubReceiverFactory recvFactory;

  public TransactionalTridentEventHubEmitter(EventHubSpoutConfig spoutConfig) {
    //use batch size that matches the default credit size
    this(spoutConfig, spoutConfig.getReceiverCredits(), null, null);
  }

  public TransactionalTridentEventHubEmitter(final EventHubSpoutConfig spoutConfig,
      int batchSize,
      ITridentPartitionManagerFactory pmFactory,
      IEventHubReceiverFactory recvFactory) {
    this.spoutConfig = spoutConfig;
    this.batchSize = batchSize;
    this.pmFactory = pmFactory;
    this.recvFactory = recvFactory;
    pmMap = new HashMap<String, ITridentPartitionManager>();
    if(this.pmFactory == null) {
      this.pmFactory = new ITridentPartitionManagerFactory() {
        @Override
        public ITridentPartitionManager create(IEventHubReceiver receiver) {
          return new TridentPartitionManager(spoutConfig, receiver);
        }
      };
    }
    if(this.recvFactory == null) {
      this.recvFactory = new IEventHubReceiverFactory() {
        @Override
        public IEventHubReceiver create(EventHubSpoutConfig config,
            String partitionId) {
          return new EventHubReceiverImpl(config, partitionId);
        }
      };
    }
  }

  @Override
  public void close() {
    for(ITridentPartitionManager pm: pmMap.values()) {
      pm.close();
    }
  }

  /**
   * Check if partition manager for a given partiton is created
   * if not, create it.
   * @param partition
   */
  private ITridentPartitionManager getOrCreatePartitionManager(Partition partition) {
    ITridentPartitionManager pm;
    if(!pmMap.containsKey(partition.getId())) {
      IEventHubReceiver receiver = recvFactory.create(spoutConfig, partition.getId());
      pm = pmFactory.create(receiver);
      pmMap.put(partition.getId(), pm);
    }
    else {
      pm = pmMap.get(partition.getId());
    }
    return pm;
  }

  @Override
  public void emitPartitionBatch(TransactionAttempt attempt,
      TridentCollector collector, Partition partition, Map meta) {
    String offset = (String)meta.get("offset");
    int count = Integer.parseInt((String)meta.get("count"));
    logger.info("re-emit for partition " + partition.getId() + ", offset=" + offset + ", count=" + count);
    ITridentPartitionManager pm = getOrCreatePartitionManager(partition);
    List<EventData> listEvents = pm.receiveBatch(offset, count);
    if(listEvents.size() != count) {
      logger.error("failed to refetch eventhub messages, new count=" + listEvents.size());
      return;
    }

    for(EventData ed: listEvents) {
      List<Object> tuples =
          spoutConfig.getEventDataScheme().deserialize(ed.getMessage());
      collector.emit(tuples);
    }
  }

  @Override
  public Map emitPartitionBatchNew(TransactionAttempt attempt,
      TridentCollector collector, Partition partition, Map meta) {
    ITridentPartitionManager pm = getOrCreatePartitionManager(partition);
    String offset = Constants.DefaultStartingOffset;
    if(meta != null && meta.containsKey("nextOffset")) {
      offset = (String)meta.get("nextOffset");
    }
    //logger.info("emit for partition " + partition.getId() + ", offset=" + offset);
    String nextOffset = offset;

    List<EventData> listEvents = pm.receiveBatch(offset, batchSize);

    for(EventData ed: listEvents) {
      //update nextOffset;
      nextOffset = ed.getMessageId().getOffset();
      List<Object> tuples =
          spoutConfig.getEventDataScheme().deserialize(ed.getMessage());
      collector.emit(tuples);
    }
    //logger.info("emitted new batches: " + listEvents.size());

    Map newMeta = new HashMap();
    newMeta.put("offset", offset);
    newMeta.put("nextOffset", nextOffset);
    newMeta.put("count", ""+listEvents.size());
    return newMeta;
  }

  @Override
  public List<Partition> getOrderedPartitions(Partitions partitions) {
    return partitions.getPartitions();
  }

  @Override
  public void refreshPartitions(List<Partition> partitionList) {
    //partition info does not change in EventHub
    return;
  }

}


text:
/*
 * Mersenne twister random number generator.
 */

#ifndef __BASE_RANDOM_HH__
#define __BASE_RANDOM_HH__

#include <random>
#include <string>
#include <type_traits>

#include "base/compiler.hh"
#include "base/types.hh"
#include "sim/serialize.hh"

namespace gem5
{

class Checkpoint;

class Random : public Serializable
{

  public:

    /**
     * @ingroup api_base_utils
     */
    std::mt19937_64 gen;

    /**
     * @ingroup api_base_utils
     * @{
     */
    Random();
    Random(uint32_t s);
    /** @} */ // end of api_base_utils
    ~Random();

    void init(uint32_t s);

    /**
     * Use the SFINAE idiom to choose an implementation based on
     * whether the type is integral or floating point.
     *
     * @ingroup api_base_utils
     */
    template <typename T>
    typename std::enable_if_t<std::is_integral_v<T>, T>
    random()
    {
        // [0, max_value] for integer types
        std::uniform_int_distribution<T> dist;
        return dist(gen);
    }

    /**
     * @ingroup api_base_utils
     */
    template <typename T>
    typename std::enable_if_t<std::is_floating_point_v<T>, T>
    random()
    {
        // [0, 1) for real types
        std::uniform_real_distribution<T> dist;
        return dist(gen);
    }
    /**
     * @ingroup api_base_utils
     */
    template <typename T>
    typename std::enable_if_t<std::is_integral_v<T>, T>
    random(T min, T max)
    {
        std::uniform_int_distribution<T> dist(min, max);
        return dist(gen);
    }

    void serialize(CheckpointOut &cp) const override;
    void unserialize(CheckpointIn &cp) override;
};

/**
 * @ingroup api_base_utils
 */
extern Random random_mt;

} // namespace gem5

#endif // __BASE_RANDOM_HH__


text:
package fr.accman.app.controller;

import android.view.View;
import fr.accman.app.model.Account;
import fr.accman.app.model.Entry;

/**
 * Created by nanosvir on 24 Nov 15.
 */
public class AddEntry implements View.OnClickListener {
    private final Callback callback;
    Account currentAccount;

    public AddEntry(Account currentAccount, AddEntry.Callback callback) {
        this.currentAccount = currentAccount;
        this.callback = callback;
    }

    @Override
    public void onClick(View view) {
        currentAccount.getCategories().get(0).addEntryAndSave(Entry.newEntry("10"));
        this.callback.addEntryCallback();
    }

    public interface Callback {
        void addEntryCallback();
    }
}


text:
<link rel="stylesheet" type="text/css" href="style/liste-des-projets.css"/>

Mes projets

		<button class="add">Ajouter</button><?php include('php_functions/template-liste-projets.php');
DisplayListProjects('encadrant'); ?>

Erreur !
{{errorSpotted[1]}}


text:
#ifndef FRAMEWORK_BULLET_GVR_UTILS_H
#define FRAMEWORK_BULLET_GVR_UTILS_H

#include "../physics_common.h"

#include "objects/components/sphere_collider.h"
#include "objects/components/box_collider.h"
#include "objects/components/mesh_collider.h"

#include <BulletCollision/CollisionShapes/btSphereShape.h>
#include <BulletCollision/CollisionShapes/btBoxShape.h>
#include <BulletCollision/CollisionShapes/btConvexHullShape.h>
#include <BulletDynamics/Dynamics/btRigidBody.h>

namespace gvr {
    btCollisionShape *convertCollider2CollisionShape(Collider *collider);

    btCollisionShape *convertSphereCollider2CollisionShape(SphereCollider *collider);

    btCollisionShape *convertBoxCollider2CollisionShape(BoxCollider *collider);

    btCollisionShape *convertMeshCollider2CollisionShape(MeshCollider *collider);

    btConvexHullShape *createConvexHullShapeFromMesh(Mesh *mesh);

    btTransform convertTransform2btTransform(const Transform *t);

    void convertBtTransform2Transform(btTransform bulletTransform, Transform *transform);

    inline btVector3 Common2Bullet(PhysicsVec3 const &pv) {
        return btVector3(pv.x, pv.y, pv.z);
    }

    inline btQuaternion Common2Bullet(PhysicsQuat const &quat) {
        return btQuaternion(quat.x, quat.y, quat.z, quat.w);
    }
}

#endif //FRAMEWORK_BULLET_GVR_UTILS_H


text:
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <script src="https://cdn.rawgit.com/RubyLouvre/anu/master/dist/React.js"></script>
    <title>anu fiber</title>
</head>
<body>
    <div id="app">
    </div>
    <script>
        var Component = React.Component
        var h = React.createElement
        var render = React.render
        var createClass = React.createClass
        var dotStyle = {
            position: 'absolute',
            background: '#61dafb',
            font: 'normal 15px sans-serif',
            textAlign: 'center',
            cursor: 'pointer',
        };
        var containerStyle = {
            position: 'absolute',
            transformOrigin: '0 0',
            left: '50%',
            top: '50%',
            width: '10px',
            height: '10px',
            background: '#eee',
        };
        var targetSize = 25;
        var Dot = createClass({
            state: { hover: false },
            getInitialState: function() {
                return { hover: false }
            },
            enter: function() {
                this.setState({
                    hover: true
                });
            },
            leave: function() {
                this.setState({
                    hover: false
                });
            },
            render: function() {
                var props = this.props;
                var s = props.size * 1.3;
                var style = Object.assign({}, dotStyle, {
                    width: s + 'px',
                    height: s + 'px',
                    left: props.x + 'px',
                    top: props.y + 'px',
                    borderRadius: s / 2 + 'px',
                    lineHeight: s + 'px',
                    background: this.state.hover ? '#ff0' : dotStyle.background
                })
                var _this2 = this
                return h(
                    'div',
                    {
                        style: style,
                        onMouseEnter: function onMouseEnter() {
                            return _this2.enter();
                        },
                        onMouseLeave: function onMouseLeave() {
                            return _this2.leave();
                        }
                    },
                    this.state.hover ? '*' + props.text + '*' : props.text
                );
            }
        })
        function SierpinskiTriangle(props) {
            var x = props.x;
            var y = props.y;
            var s = props.s;
            var children = props.children;
            if (s <= targetSize) {
                return h(Dot, {
                    x: x - targetSize / 2,
                    y: y - targetSize / 2,
                    size: targetSize,
                    text: children
                });
                //return r;
            }
            var newSize = s / 2;
            var slowDown = true;
            if (slowDown) {
                // var e = performance.now() + 0.8;
                // while (performance.now() < e) {
                //     // Artificially long execution time.
                // }
            }
            s /= 2;
            return h("div", null,
                h(
                    SierpinskiTriangle,
                    { x: x, y: y - s / 2, s: s },
                    children
                ),
                h(
                    SierpinskiTriangle,
                    { x: x - s, y: y + s / 2, s: s },
                    children
                ),
                h(
                    SierpinskiTriangle,
                    { x: x + s, y: y + s / 2, s: s },
                    children
                )
            );
        }
        SierpinskiTriangle.shouldComponentUpdate = function(oldProps, newProps) {
            var o = oldProps;
            var n = newProps;
            return !(
                o.x === n.x &&
                o.y === n.y &&
                o.s === n.s &&
                o.children === n.children
            );
        };
        var ExampleApplication = createClass({
            state: { seconds: 0 },
            getInitialState: function() {
                return { seconds: 0 };
                // this.tick = this.tick.bind(this);
            },
            componentDidMount: function() {
                // this.intervalID = setInterval(this.tick, 1000);
                this.intervalID = setInterval(() => {
                    requestAnimationFrame(this.tick)
                }, 1000);
            },
            tick: function() {
                //ReactDOMFiber.unstable_deferredUpdates(
                    this.setState(function(state) {return ({ seconds: (state.seconds % 10) + 1 })})
                //);
            },
            componentWillUnmount: function() {
                clearInterval(this.intervalID);
            },
            render: function() {
                var seconds = this.state.seconds;
                var elapsed = this.props.elapsed;
                var t = (elapsed / 1000) % 10;
                var scale = 1 + (t > 5 ? 10 - t : t) / 10;
                var transform = 'scaleX(' + (scale / 2.1) + ') scaleY(0.7) translateZ(0.1px)';
                return (
                    h("div", { style: Object.assign({}, containerStyle, { transform: transform }) },
                        h("div", null,
                            h(SierpinskiTriangle, { x: 0, y: 0, s: 1000 },
                                this.state.seconds
                            )
                        )
                    )
                );
            }
        })
        var start = new Date().getTime();
        var vdom
        var root = document.getElementById('app')

        var App = createClass({
            state: {
                elapsed: new Date().getTime() - start
            },
            getInitialState: function() {
                return {
                    elapsed: new Date().getTime() - start
                }
                // this.update = this.update.bind(this)
            },
            update: function() {
                this.setState({
                    elapsed: new Date().getTime() - start
                })
                requestAnimationFrame(this.update)
            },
            componentDidMount: function() {
                requestAnimationFrame(this.update)
            },
            render: function() {
                return h(ExampleApplication, {elapsed: this.state.elapsed})
            }
        })
        function update() {
            render(
                h(App),
                root
            );
            requestAnimationFrame(update);
        }
        requestAnimationFrame(update);
    </script>
</body>
</html>


text:
<?php
/**
 * Load Elegant Themes Core.
 *
 * @package Core
 */

// Stop here if the Core was already loaded.
if ( defined( 'ET_CORE' ) ) {
	return;
}

define( 'ET_CORE', true );

if ( ! function_exists( 'et_core_setup' ) ) :
/**
 * Setup Core.
 *
 * @since 1.0.0
 *
 * @param string $url Url used to load the Core assets.
 *
 * @return bool Always return true.
 */
function et_core_setup( $url ) {
	if ( ! defined( 'ET_CORE_PATH' ) ) {
		define( 'ET_CORE_PATH', trailingslashit( dirname( __FILE__ ) ) );
	}

	if ( ! defined( 'ET_CORE_URL' ) ) {
		define( 'ET_CORE_URL', trailingslashit( $url ) . 'core/' );
	}

	if ( ! defined( 'ET_CORE_TEXTDOMAIN' ) ) {
		define( 'ET_CORE_TEXTDOMAIN', 'et-core' );
	}

	load_theme_textdomain( 'et-core', ET_CORE_PATH . 'languages/' );

	require_once( ET_CORE_PATH . 'components.php' );
	require_once( ET_CORE_PATH . 'functions.php' );
	require_once( ET_CORE_PATH . 'updates_init.php' );

	if ( is_admin() ) {
		require_once( ET_CORE_PATH . 'admin/includes/assets.php' );

		add_action( 'admin_enqueue_scripts', 'et_core_load_main_styles' );
	}
}
endif;

if ( ! function_exists( 'et_core_load_main_styles' ) ) :
function et_core_load_main_styles( $hook ) {
	if ( ! in_array( $hook, array( 'post.php', 'post-new.php' ) ) ) {
		return;
	}

	wp_enqueue_style( 'et-core-admin' );
}
endif;


text:
import warnings

import numpy as np
from packaging.version import parse as parse_version

from ..utils import derived_from

_np_version = parse_version(np.__version__)
_numpy_120 = _np_version >= parse_version("1.20.0")
_numpy_121 = _np_version >= parse_version("1.21.0")
_numpy_122 = _np_version >= parse_version("1.22.0")

# Taken from scikit-learn:
# https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/utils/fixes.py#L84
try:
    with warnings.catch_warnings():
        if (
            not np.allclose(
                np.divide(0.4, 1, casting="unsafe"),
                np.divide(0.4, 1, casting="unsafe", dtype=float),
            )
            or not np.allclose(np.divide(1, 0.5, dtype="i8"), 2)
            or not np.allclose(np.divide(0.4, 1), 0.4)
        ):
            raise TypeError(
                "Divide not working with dtype: "
                "https://github.com/numpy/numpy/issues/3484"
            )
        divide = np.divide
        ma_divide = np.ma.divide

except TypeError:
    # Divide with dtype doesn't work on Python 3
    def divide(x1, x2, out=None, dtype=None):
        """Implementation of numpy.divide that works with dtype kwarg.

        Temporary compatibility fix for a bug in numpy's version. See
        https://github.com/numpy/numpy/issues/3484 for the relevant issue."""
        x = np.divide(x1, x2, out)
        if dtype is not None:
            x = x.astype(dtype)
        return x

    ma_divide = np.ma.core._DomainedBinaryOperation(
        divide, np.ma.core._DomainSafeDivide(), 0, 1
    )

class _Recurser:
    """
    Utility class for recursing over nested iterables
    """

    # This was copied almost verbatim from numpy.core.shape_base._Recurser
    # See numpy license at https://github.com/numpy/numpy/blob/master/LICENSE.txt
    # or NUMPY_LICENSE.txt within this directory

    def __init__(self, recurse_if):
        self.recurse_if = recurse_if

    def map_reduce(
        self,
        x,
        f_map=lambda x, **kwargs: x,
        f_reduce=lambda x, **kwargs: x,
        f_kwargs=lambda **kwargs: kwargs,
        **kwargs,
    ):
        """
        Iterate over the nested list, applying:
        * ``f_map`` (T -> U) to items
        * ``f_reduce`` (Iterable[U] -> U) to mapped items

        For instance, ``map_reduce([[1, 2], 3, 4])`` is::

            f_reduce([
              f_reduce([
                f_map(1),
                f_map(2)
              ]),
              f_map(3),
              f_map(4)
            ]])

        State can be passed down through the calls with `f_kwargs`,
        to iterables of mapped items. When kwargs are passed, as in
        ``map_reduce([[1, 2], 3, 4], **kw)``, this becomes::

            kw1 = f_kwargs(**kw)
            kw2 = f_kwargs(**kw1)
            f_reduce([
              f_reduce([
                f_map(1), **kw2)
                f_map(2,  **kw2)
              ],      **kw1),
              f_map(3, **kw1),
              f_map(4, **kw1)
            ]],     **kw)
        """

        def f(x, **kwargs):
            if not self.recurse_if(x):
                return f_map(x, **kwargs)
            else:
                next_kwargs = f_kwargs(**kwargs)
                return f_reduce((f(xi, **next_kwargs) for xi in x), **kwargs)

        return f(x, **kwargs)

    def walk(self, x, index=()):
        """
        Iterate over x, yielding (index, value, entering), where

        * ``index``: a tuple of indices up to this point
        * ``value``: equal to ``x[index[0]][...][index[-1]]``. On the first iteration, is
                     ``x`` itself
        * ``entering``: bool. The result of ``recurse_if(value)``
        """
        do_recurse = self.recurse_if(x)
        yield index, x, do_recurse

        if not do_recurse:
            return
        for i, xi in enumerate(x):
            # yield from ...
            yield from self.walk(xi, index + (i,))

# Implementation taken directly from numpy:
# https://github.com/numpy/numpy/blob/d9b1e32cb8ef90d6b4a47853241db2a28146a57d/numpy/core/numeric.py#L1336-L1405
@derived_from(np)
def moveaxis(a, source, destination):
    source = np.core.numeric.normalize_axis_tuple(source, a.ndim, "source")
    destination = np.core.numeric.normalize_axis_tuple(
        destination, a.ndim, "destination"
    )
    if len(source) != len(destination):
        raise ValueError(
            "`source` and `destination` arguments must have "
            "the same number of elements"
        )

    order = [n for n in range(a.ndim) if n not in source]

    for dest, src in sorted(zip(destination, source)):
        order.insert(dest, src)

    result = a.transpose(order)
    return result

# Implementation adapted directly from numpy:
# https://github.com/numpy/numpy/blob/v1.17.0/numpy/core/numeric.py#L1107-L1204
def rollaxis(a, axis, start=0):
    n = a.ndim
    axis = np.core.numeric.normalize_axis_index(axis, n)
    if start < 0:
        start += n
    msg = "'%s' arg requires %d <= %s < %d, but %d was passed in"
    if not (0 <= start < n + 1):
        raise ValueError(msg % ("start", -n, "start", n + 1, start))
    if axis < start:
        # it's been removed
        start -= 1
    if axis == start:
        return a[...]
    axes = list(range(0, n))
    axes.remove(axis)
    axes.insert(start, axis)
    return a.transpose(axes)

if _numpy_120:
    sliding_window_view = np.lib.stride_tricks.sliding_window_view
else:
    # copied from numpy.lib.stride_tricks
    # https://github.com/numpy/numpy/blob/0721406ede8b983b8689d8b70556499fc2aea28a/numpy/lib/stride_tricks.py#L122-L336
    def sliding_window_view(
        x, window_shape, axis=None, *, subok=False, writeable=False
    ):
        """
        Create a sliding window view into the array with the given window shape.
        Also known as rolling or moving window, the window slides across all
        dimensions of the array and extracts subsets of the array at all window
        positions.

        .. versionadded:: 1.20.0
        Parameters
        ----------
        x : array_like
            Array to create the sliding window view from.
        window_shape : int or tuple of int
            Size of window over each axis that takes part in the sliding window.
            If `axis` is not present, must have same length as the number of input
            array dimensions. Single integers `i` are treated as if they were the
            tuple `(i,)`.
        axis : int or tuple of int, optional
            Axis or axes along which the sliding window is applied.
            By default, the sliding window is applied to all axes and
            `window_shape[i]` will refer to axis `i` of `x`.
            If `axis` is given as a `tuple of int`, `window_shape[i]` will refer to
            the axis `axis[i]` of `x`.
            Single integers `i` are treated as if they were the tuple `(i,)`.
        subok : bool, optional
            If True, sub-classes will be passed-through, otherwise the returned
            array will be forced to be a base-class array (default).
        writeable : bool, optional
            When true, allow writing to the returned view. The default is false,
            as this should be used with caution: the returned view contains the
            same memory location multiple times, so writing to one location will
            cause others to change.
        Returns
        -------
        view : ndarray
            Sliding window view of the array. The sliding window dimensions are
            inserted at the end, and the original dimensions are trimmed as
            required by the size of the sliding window.
            That is, ``view.shape = x_shape_trimmed + window_shape``, where
            ``x_shape_trimmed`` is ``x.shape`` with every entry reduced by one less
            than the corresponding window size.
        """
        from numpy.core.numeric import normalize_axis_tuple

        window_shape = (
            tuple(window_shape) if np.iterable(window_shape) else (window_shape,)
        )
        # first convert input to array, possibly keeping subclass
        x = np.array(x, copy=False, subok=subok)

        window_shape_array = np.array(window_shape)
        if np.any(window_shape_array < 0):
            raise ValueError("`window_shape` cannot contain negative values")

        if axis is None:
            axis = tuple(range(x.ndim))
            if len(window_shape) != len(axis):
                raise ValueError(
                    f"Since axis is `None`, must provide "
                    f"window_shape for all dimensions of `x`; "
                    f"got {len(window_shape)} window_shape elements "
                    f"and `x.ndim` is {x.ndim}."
                )
        else:
            axis = normalize_axis_tuple(axis, x.ndim, allow_duplicate=True)
            if len(window_shape) != len(axis):
                raise ValueError(
                    f"Must provide matching length window_shape and "
                    f"axis; got {len(window_shape)} window_shape "
                    f"elements and {len(axis)} axes elements."
                )

        out_strides = x.strides + tuple(x.strides[ax] for ax in axis)

        # note: same axis can be windowed repeatedly
        x_shape_trimmed = list(x.shape)
        for ax, dim in zip(axis, window_shape):
            if x_shape_trimmed[ax] < dim:
                raise ValueError("window shape cannot be larger than input array shape")
            x_shape_trimmed[ax] -= dim - 1
        out_shape = tuple(x_shape_trimmed) + window_shape
        return np.lib.stride_tricks.as_strided(
            x, strides=out_strides, shape=out_shape, subok=subok, writeable=writeable
        )

# kwarg is renamed in numpy 1.22.0
def percentile(a, q, method="linear"):
    if _numpy_122:
        return np.percentile(a, q, method=method)
    else:
        return np.percentile(a, q, interpolation=method)


text:
using ZippyNet.Interfaces;

namespace ZippyNet.Html.Link
{
    /// <summary>
    /// Ссылка  вызыващая  обработчик  и не  имеющая  возможности  копирования  адреса  ссылки
    /// </summary>
    public class ClickLink : AbstractLink, IClickListener,   IRequestable
    {
        private object  click = null;
        private bool isajax = false;
        public ClickLink(string id, Click callee = null,bool ajax= false)
            : base(id)
        {
            if(callee != null) this.onClick(callee,ajax);
        }

        protected override void RenderImpl()
        {
            base.RenderImpl();
            if (this.click == null || this.disabled)
            {
                this.setAttribute("href", "");
                this.setAttribute("onclick", "");
                return;
            }
             this.setAttribute("href", "javascript:void(0);");

         if (!this.isajax)
            {
                var url = this.owner.getURLNode() + "::" + this.id;
                this.setAttribute("onclick", "if(beforeZippy('" + this.id + "') ==false) return false;window.location='" + url + "';event.returnValue=false; return false;");

            }
            else
            {
                var url = this.owner.getURLNode() + "::" + this.id + "&ajax=true";
                this.setAttribute("onclick", "if(beforeZippy('" + this.id + "') ==false) return false;getUpdate('"+url+"');event.returnValue=false; return false;");

            }

        }

        /// <see>IRequestable</see>
        public   void RequestHandle()
        {

            OnEvent();

        }

        /// <see>IClickListener</see>
        public void onClick(Click callee, bool ajax = false)
        {
            this.click = callee;
            this.isajax = ajax;
        }
        private void OnEvent()
        {
            if (this.click == null || this.visible == false || this.disabled == true) return;

                ((Click)click)(this);

        }
    }

}


text:
<!DOCTYPE html>

    <meta charset="utf-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />

    <title>Takó Kornél -</title>
    <meta name="description" content="" />

    <meta name="HandheldFriendly" content="True" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />

    <link rel="shortcut icon" href="https://neomobil.github.io/favicon.ico">

    <link rel="stylesheet" type="text/css" href="//neomobil.github.io/themes/casper/assets/css/screen.css?v=1507055102518" />
    <link rel="stylesheet" type="text/css" href="//fonts.googleapis.com/css?family=Merriweather:300,700,700italic,300italic|Open+Sans:700,400" />

    <link rel="canonical" href="https://neomobil.github.io/https://neomobil.github.io/author/neomobil/" />
    <meta name="referrer" content="origin" />

    <meta property="og:site_name" content="" />
    <meta property="og:type" content="profile" />
    <meta property="og:title" content="Takó Kornél -" />
    <meta property="og:url" content="https://neomobil.github.io/https://neomobil.github.io/author/neomobil/" />
    <meta name="twitter:card" content="summary" />
    <meta name="twitter:title" content="Takó Kornél -" />
    <meta name="twitter:url" content="https://neomobil.github.io/https://neomobil.github.io/author/neomobil/" />

    <meta name="generator" content="HubPress" />
    <link rel="alternate" type="application/rss+xml" title="" href="https://neomobil.github.io/rss/" />
    <link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.10.0/styles/atom-one-dark.min.css">

Takó Kornél

             1 post

        Page 1 of 1

Authenticate Woocommerce Webhook signature in Laravel 5.5

Most of the questions about Woocommerce Webhooks signature in Stackoverflow are going about "How to decrypt Woocommerce Webhook signature" or something similar. I’ve found »

            Takó Kornél
             on Laravel 5, Woocommeerce, webhooks
            <time class="post-date" datetime="2017-10-03">03 October 2017</time>

        Page 1 of 1

 © 2017

Proudly published with HubPress


text:
/// Unit mesh collision detection
/// Provides various functions for collision detection

#include "vegastrike.h"
#include "beam.h"

#include "bolt.h"
#include "gfx/mesh.h"
#include "unit_collide.h"
#include "physics.h"

#include "collide2/CSopcodecollider.h"
#include "collide2/csgeom2/optransfrm.h"
#include "collide2/basecollider.h"

#include "hashtable.h"

#include <string>
#include "vs_globals.h"
#include "configxml.h"
#include "collide.h"
static bool operator==( const Collidable &a, const Collidable &b )
{
    return memcmp( &a, &b, sizeof (Collidable) ) == 0;
}

void Unit::RemoveFromSystem()
{
    for (unsigned int locind = 0; locind < NUM_COLLIDE_MAPS; ++locind)
        if ( !is_null( this->location[locind] ) ) {
            if (activeStarSystem == NULL) {
                printf( "NONFATAL NULL activeStarSystem detected...please fix\n" );
                activeStarSystem = _Universe->activeStarSystem();
            }
            static bool collidemap_sanity_check =
                XMLSupport::parse_bool( vs_config->getVariable( "physics", "collidemap_sanity_check", "false" ) );
            if (collidemap_sanity_check) {
                if (0) {
                    CollideMap::iterator i;
                    CollideMap::iterator j = activeStarSystem->collidemap[locind]->begin();

                    bool found = false;
                    for (i = activeStarSystem->collidemap[locind]->begin();
                         i != activeStarSystem->collidemap[locind]->end(); ++i) {
                        if (i == this->location[locind]) {
                            printf( "hussah %d\n", *i == *this->location[locind] );
                            found = true;
                        }
                        if (**i < **j) {
                            printf( "(%f %f %f) and (%f %f %f) %f < %f %d!!!",
                                   (**i).GetPosition().i,
                                   (**i).GetPosition().j,
                                   (**i).GetPosition().k,
                                   (**j).GetPosition().i,
                                   (**j).GetPosition().j,
                                   (**j).GetPosition().k,
                                   (**i).GetPosition().MagnitudeSquared(),
                                   (**j).GetPosition().MagnitudeSquared(),
                                   (**i).GetPosition().MagnitudeSquared()
                                   < (**j).GetPosition().MagnitudeSquared() );
                        }
                        j = i;
                    }
                    printf( "fin %d %d ", *(int*) &i, found );
                    activeStarSystem->collidemap[locind]->checkSet();
                    assert( 0 );
                }
            }
            activeStarSystem->collidemap[locind]->erase( this->location[locind] );
            set_null( this->location[locind] );
        }
    for (int j = 0; j < GetNumMounts(); ++j)
        if (mounts[j].type->type == weapon_info::BEAM)
            if (mounts[j].ref.gun)
                mounts[j].ref.gun->RemoveFromSystem( true );
    activeStarSystem = NULL;
}

void Unit::UpdateCollideQueue( StarSystem *ss, CollideMap::iterator hint[NUM_COLLIDE_MAPS] )
{
    if (activeStarSystem == NULL)
        activeStarSystem = ss;

    else
        assert( activeStarSystem == ss );
    for (unsigned int locind = 0; locind < NUM_COLLIDE_MAPS; ++locind)
        if ( is_null( location[locind] ) ) {
            assert( !isSubUnit() );
            if ( !isSubUnit() )
                location[locind] = ss->collidemap[locind]->insert( Collidable( this ), hint[locind] );
        }
}

void Unit::CollideAll()
{
    static bool noUnitCollisions = XMLSupport::parse_bool( vs_config->getVariable( "physics", "no_unit_collisions", "false" ) );
    if (isSubUnit() || killed || noUnitCollisions)
        return;
    for (unsigned int locind = 0; locind < NUM_COLLIDE_MAPS; ++locind)
        if ( is_null( this->location[locind] ) )
            this->location[locind] = this->getStarSystem()->collidemap[locind]->insert( Collidable( this ) );
    CollideMap *cm = this->getStarSystem()->collidemap[Unit::UNIT_BOLT];
    cm->CheckCollisions( this, *this->location[Unit::UNIT_BOLT] );
}

Vector Vabs( const Vector &in )
{
    return Vector( in.i >= 0 ? in.i : -in.i,
                   in.j >= 0 ? in.j : -in.j,
                   in.k >= 0 ? in.k : -in.k );
}

//Slated for removal 0.5
Matrix WarpMatrixForCollisions( Unit *un, const Matrix &ctm )
{
    if ( un->GetWarpVelocity().MagnitudeSquared()*SIMULATION_ATOM*SIMULATION_ATOM < un->rSize()*un->rSize() ) {
        return ctm;
    } else {
        Matrix k( ctm );
        const Vector v( Vector( 1, 1, 1 )+Vabs( ctm.getR()*ctm.getR().Dot( un->GetWarpVelocity().Scale(
                                                                              100*SIMULATION_ATOM/un->rSize() ) ) ) );
        k.r[0] *= v.i;
        k.r[1] *= v.j;
        k.r[2] *= v.k;

        k.r[3] *= v.i;
        k.r[4] *= v.j;
        k.r[5] *= v.k;

        k.r[6] *= v.i;
        k.r[7] *= v.j;
        k.r[8] *= v.k;
        return k;
    }
}

//do each of these bubbled subunits collide with the other unit?
bool Unit::Inside( const QVector &target, const float radius, Vector &normal, float &dist )
{
    if ( !querySphere( target, radius ) )
        return false;
    normal = ( target-Position() ).Cast();
    ::Normalize( normal );
    //if its' in the sphre, that's enough
    if(isPlanet() )
        return true;
    return false;
}

bool Unit::InsideCollideTree( Unit *smaller,
                              QVector &bigpos,
                              Vector &bigNormal,
                              QVector &smallpos,
                              Vector &smallNormal,
                              bool bigasteroid,
                              bool smallasteroid )
{
    if (smaller->colTrees == NULL || this->colTrees == NULL)
        return false;
    if (hull < 0) return false;
    if (smaller->colTrees->usingColTree() == false || this->colTrees->usingColTree() == false)
        return false;
    csOPCODECollider::ResetCollisionPairs();
    Unit *bigger = this;

    csReversibleTransform bigtransform( bigger->cumulative_transformation_matrix );
    csReversibleTransform smalltransform( smaller->cumulative_transformation_matrix );
    smalltransform.SetO2TTranslation( csVector3( smaller->cumulative_transformation_matrix.p
                                                 -bigger->cumulative_transformation_matrix.p ) );
    bigtransform.SetO2TTranslation( csVector3( 0, 0, 0 ) );
    //we're only gonna lerp the positions for speed here... gahh!

    // Check for shield collisions here prior to checking for mesh on mesh or ray collisions below.
    csOPCODECollider *tmpCol = smaller->colTrees->colTree( smaller, bigger->GetWarpVelocity() );
    if ( tmpCol
        && ( tmpCol->Collide( *bigger->colTrees->colTree( bigger,
                                                         smaller->GetWarpVelocity() ), &smalltransform, &bigtransform ) ) ) {
        csCollisionPair *mycollide = csOPCODECollider::GetCollisions();
        unsigned int     numHits   = csOPCODECollider::GetCollisionPairCount();
        if (numHits) {
            smallpos.Set( (mycollide[0].a1.x+mycollide[0].b1.x+mycollide[0].c1.x)/3.0f,
                         (mycollide[0].a1.y+mycollide[0].b1.y+mycollide[0].c1.y)/3.0f,
                         (mycollide[0].a1.z+mycollide[0].b1.z+mycollide[0].c1.z)/3.0f );
            smallpos = Transform( smaller->cumulative_transformation_matrix, smallpos );
            bigpos.Set( (mycollide[0].a2.x+mycollide[0].b2.x+mycollide[0].c2.x)/3.0f,
                       (mycollide[0].a2.y+mycollide[0].b2.y+mycollide[0].c2.y)/3.0f,
                       (mycollide[0].a2.z+mycollide[0].b2.z+mycollide[0].c2.z)/3.0f );
            bigpos = Transform( bigger->cumulative_transformation_matrix, bigpos );
            csVector3 sn, bn;
            sn.Cross( mycollide[0].b1-mycollide[0].a1, mycollide[0].c1-mycollide[0].a1 );
            bn.Cross( mycollide[0].b2-mycollide[0].a2, mycollide[0].c2-mycollide[0].a2 );
            sn.Normalize();
            bn.Normalize();
            smallNormal.Set( sn.x, sn.y, sn.z );
            bigNormal.Set( bn.x, bn.y, bn.z );
            smallNormal = TransformNormal( smaller->cumulative_transformation_matrix, smallNormal );
            bigNormal   = TransformNormal( bigger->cumulative_transformation_matrix, bigNormal );
            return true;
        }
    }
    un_iter i;
    static float rsizelim = XMLSupport::parse_float( vs_config->getVariable( "physics", "smallest_subunit_to_collide", ".2" ) );
    clsptr  bigtype = bigasteroid ? ASTEROIDPTR : bigger->isUnit();
    clsptr  smalltype     = smallasteroid ? ASTEROIDPTR : smaller->isUnit();
    if ( bigger->SubUnits.empty() == false
        && (bigger->graphicOptions.RecurseIntoSubUnitsOnCollision == true || bigtype == ASTEROIDPTR) ) {
        i = bigger->getSubUnits();
        float rad = smaller->rSize();
        for (Unit *un; (un = *i); ++i) {
            float subrad = un->rSize();
            if ( (bigtype != ASTEROIDPTR) && (subrad/bigger->rSize() < rsizelim) ) {
                break;
            }
            if ( ( un->Position()-smaller->Position() ).Magnitude() <= subrad+rad ) {
                if ( ( un->InsideCollideTree( smaller, bigpos, bigNormal, smallpos, smallNormal, bigtype == ASTEROIDPTR,
                                              smalltype == ASTEROIDPTR ) ) )
                    return true;
            }
        }
    }
    if ( smaller->SubUnits.empty() == false
        && (smaller->graphicOptions.RecurseIntoSubUnitsOnCollision == true || smalltype == ASTEROIDPTR) ) {
        i = smaller->getSubUnits();
        float rad = bigger->rSize();
        for (Unit *un; (un = *i); ++i) {
            float subrad = un->rSize();
            if ( (smalltype != ASTEROIDPTR) && (subrad/smaller->rSize() < rsizelim) )
                break;
            if ( ( un->Position()-bigger->Position() ).Magnitude() <= subrad+rad ) {
                if ( ( bigger->InsideCollideTree( un, bigpos, bigNormal, smallpos, smallNormal, bigtype == ASTEROIDPTR,
                                                  smalltype == ASTEROIDPTR ) ) )
                    return true;
            }
        }
    }
    //FIXME
    //doesn't check all i*j options of subunits vs subunits
    return false;
}

inline float mysqr( float a )
{
    return a*a;
}

bool Unit::Collide( Unit *target )
{
    //now first OF ALL make sure they're within bubbles of each other...
    if ( ( Position()-target->Position() ).MagnitudeSquared() > mysqr( radial_size+target->radial_size ) )
        return false;
    clsptr targetisUnit = target->isUnit();
    clsptr thisisUnit   = this->isUnit();
    static float NEBULA_SPACE_DRAG = XMLSupport::parse_float( vs_config->getVariable( "physics", "nebula_space_drag", "0.01" ) );
    if (targetisUnit == NEBULAPTR)
        //why? why not?
        this->Velocity *= (1-NEBULA_SPACE_DRAG);
    if ( target == this
        || ( (targetisUnit != NEBULAPTR
              && thisisUnit != NEBULAPTR)
            && ( owner == target || target->owner == this
                || (owner != NULL
                    && target->owner == owner) ) )
        || (Network != NULL && _Universe->isPlayerStarship( target ) == NULL && _Universe->isPlayerStarship( this ) == NULL) )
        return false;
    if (targetisUnit == ASTEROIDPTR && thisisUnit == ASTEROIDPTR)
        return false;
    std::multimap< Unit*, Unit* > *last_collisions = &_Universe->activeStarSystem()->last_collisions;
    last_collisions->insert( std::pair< Unit*, Unit* > ( this, target ) );
    //unit v unit? use point sampling?
    if ( ( this->DockedOrDocking()&(DOCKED_INSIDE|DOCKED) ) || ( target->DockedOrDocking()&(DOCKED_INSIDE|DOCKED) ) )
        return false;
    //now do some serious checks
    Unit *bigger;
    Unit *smaller;
    if (radial_size < target->radial_size) {
        bigger  = target;
        smaller = this;
    } else {
        bigger  = this;
        smaller = target;
    }
    bool usecoltree = (this->colTrees && target->colTrees)
                      ? this->colTrees->colTree( this, Vector( 0, 0, 0 ) ) && target->colTrees->colTree( this, Vector( 0, 0, 0 ) )
                      : false;
    if (usecoltree) {
        QVector bigpos, smallpos;
        Vector  bigNormal, smallNormal;
        if ( bigger->InsideCollideTree( smaller, bigpos, bigNormal, smallpos, smallNormal ) ) {
            if ( !bigger->isDocked( smaller ) && !smaller->isDocked( bigger ) )
                bigger->reactToCollision( smaller, bigpos, bigNormal, smallpos, smallNormal, 10 );
            else return false;
        } else {return false; }
    } else {
        Vector normal( -1, -1, -1 );
        float  dist = 0.0;
        if ( bigger->Inside( smaller->Position(), smaller->rSize(), normal, dist ) ) {
            if ( !bigger->isDocked( smaller ) && !smaller->isDocked( bigger ) )
                bigger->reactToCollision( smaller, bigger->Position(), normal, smaller->Position(), -normal, dist );
            else return false;
        } else {
            return(false);
        }

    }
    return true;
}

float globQueryShell( QVector st, QVector dir, float radius )
{
    float temp1 = radius;
    float a, b, c;
    c  = st.Dot( st );
    c  = c-temp1*temp1;
    b  = 2.0f*( dir.Dot( st ) );
    a  = dir.Dot( dir );
    //b^2-4ac
    c  = b*b-4.0f*a*c;
    if (c < 0 || a == 0)
        return 0.0f;
    a *= 2.0f;

    float tmp = ( -b+sqrt( c ) )/a;
    c  = ( -b-sqrt( c ) )/a;
    if (tmp > 0 && tmp <= 1)
        return (c > 0 && c < tmp) ? c : tmp;
    else if (c > 0 && c <= 1)
        return c;
    return 0.0f;
}

float globQuerySphere( QVector start, QVector end, QVector pos, float radius )
{
    QVector st = start-pos;
    if (st.MagnitudeSquared() < radius*radius)
        return 1.0e-6f;
    return globQueryShell( st, end-start, radius );
}

/*
    * This is our ray / bolt collision routine for now.
    * Basically, this is called on a ship unit to see if any ray or bolt given by some simple vectors collide with it
    *  We should probably first check against shields and then against the colTree to see if we hit the shields first
    *  Not sure yet if that would work though...  more importantly, we might have to modify end in here in order
    *  to tell calling code that the bolt should stop at a given point.
*/
Unit* Unit::rayCollide( const QVector &start, const QVector &end, Vector &norm, float &distance)
{
    Unit *tmp;
    float rad = this->rSize();
    if ( ( !SubUnits.empty() ) && graphicOptions.RecurseIntoSubUnitsOnCollision )
        if ( ( tmp = *SubUnits.fastIterator() ) )
            rad += tmp->rSize();
    if ( !globQuerySphere( start, end, cumulative_transformation_matrix.p, rad ) )
        return NULL;
    if (graphicOptions.RecurseIntoSubUnitsOnCollision) {
        if ( !SubUnits.empty() ) {
            un_fiter i( SubUnits.fastIterator() );
            for (Unit *un; (un = *i); ++i)
                if ( ( tmp = un->rayCollide( start, end, norm, distance) ) != 0 )
                    return tmp;
        }
    }
    QVector  st( InvTransform( cumulative_transformation_matrix, start ) );
    QVector  ed( InvTransform( cumulative_transformation_matrix, end ) );
    static bool sphere_test = XMLSupport::parse_bool( vs_config->getVariable( "physics", "sphere_collision", "true" ) );
    distance = querySphereNoRecurse( start, end );
    if (distance > 0.0f || (this->colTrees&&this->colTrees->colTree( this, this->GetWarpVelocity() )&&!sphere_test)) {
        Vector coord;
        /* Set up points and ray to send to ray collider. */
        Opcode::Point rayOrigin(st.i,st.j,st.k);
        Opcode::Point rayDirection(ed.i,ed.j,ed.k);
        Opcode::Ray boltbeam(rayOrigin,rayDirection);
        if(this->colTrees){
            // Retrieve the correct scale'd collider from the unit's collide tree.
            csOPCODECollider *tmpCol  = this->colTrees->colTree( this, this->GetWarpVelocity() );
            QVector del(end-start);
            //Normalize(del);
            norm = ((start+del*distance)-Position()).Cast();
            Normalize(norm);
            //RAY COLLIDE does not yet set normal, use that of the sphere center to current loc
            if (tmpCol==NULL) {

                return this;
            }
            if(tmpCol->rayCollide(boltbeam,norm,distance)){
                // compute real distance
                distance = (end-start).Magnitude() * distance;

                // NOTE:   Here is where we need to retrieve the point on the ray that we collided with the mesh, and set it to end, create the normal and set distance
                VSFileSystem::vs_dprintf(3,"Beam collide with %p, distance %f\n",this,distance);
                return(this);
            }
        } else {//no col trees = a sphere
            // compute real distance
            distance = (end-start).Magnitude() * distance;

            VSFileSystem::vs_dprintf(3,"Beam collide with %p, distance %f\n",this,distance);
            return(this);
        }
    } else {
        return (NULL);
    }
    return(NULL);
}

bool Unit::querySphere( const QVector &pnt, float err ) const
{
    int    i;
    const Matrix *tmpo = &cumulative_transformation_matrix;

    Vector TargetPoint( tmpo->getP() );
#ifdef VARIABLE_LENGTH_PQR
    //adjust the ship radius by the scale of local coordinates
    double SizeScaleFactor = sqrt( TargetPoint.Dot( TargetPoint ) );
#endif
    if ( nummesh() < 1 && isPlanet() ) {
        TargetPoint = (tmpo->p-pnt).Cast();
        if (TargetPoint.Dot( TargetPoint )
            < err*err
            +radial_size*radial_size
#ifdef VARIABLE_LENGTH_PQR
            *SizeScaleFactor*SizeScaleFactor
#endif
            +
#ifdef VARIABLE_LENGTH_PQR
            SizeScaleFactor*
#endif
            2.0f*err*radial_size
           )
            return true;
    } else {
        for (i = 0; i < nummesh(); i++) {
            TargetPoint = (Transform( *tmpo, meshdata[i]->Position().Cast() )-pnt).Cast();
            if (TargetPoint.Dot( TargetPoint )
                < err*err
                +meshdata[i]->rSize()*meshdata[i]->rSize()
#ifdef VARIABLE_LENGTH_PQR
                *SizeScaleFactor*SizeScaleFactor
#endif
                +
#ifdef VARIABLE_LENGTH_PQR
                SizeScaleFactor*
#endif
                2.0f*err*meshdata[i]->rSize()
               )
                return true;
        }
    }
    if (graphicOptions.RecurseIntoSubUnitsOnCollision) {
        if ( !SubUnits.empty() ) {
            un_fkiter i = SubUnits.constFastIterator();
            for (const Unit *un; (un = *i); ++i)
                if ( (un)->querySphere( pnt, err ) )
                    return true;
        }
    }
    return false;
}

float Unit::querySphere( const QVector &start, const QVector &end, float min_radius ) const
{
    if ( !SubUnits.empty() ) {
        un_fkiter i = SubUnits.constFastIterator();
        for (const Unit *un; (un = *i); ++i) {
            float tmp;
            if ( ( tmp = un->querySphere( start, end, min_radius ) ) != 0 )
                return tmp;
        }
    }
    return querySphereNoRecurse( start, end, min_radius );
}

//does not check inside sphere
float Unit::querySphereNoRecurse( const QVector &start, const QVector &end, float min_radius ) const
{
    int    i;
    double tmp;
    for (i = 0; i < nummesh(); i++) {
        if ( ( meshdata[i]->Position().Magnitude() > this->rSize() ) || ( meshdata[i]->rSize() > 30+this->rSize() ) )
            continue;
        if (isUnit() == PLANETPTR && i > 0)
            break;
        double  a, b, c;
        QVector st  = start-Transform( cumulative_transformation_matrix, meshdata[i]->Position().Cast() );

        QVector dir = end-start;         //now start and end are based on mesh's position
        c = st.Dot( st );
        double temp1 = ( min_radius+meshdata[i]->rSize() );
        //if (st.MagnitudeSquared()<temp1*temp1) //UNCOMMENT if you want inside sphere to count...otherwise...
        //return 1.0e-6;
        if (min_radius != -FLT_MAX)
            c = c-temp1*temp1;
        else
            c = temp1;
#ifdef VARIABLE_LENGTH_PQR
        c *= SizeScaleFactor*SizeScaleFactor;
#endif
        b  = 2.0f*( dir.Dot( st ) );
        a  = dir.Dot( dir );
        //b^2-4ac
        if (min_radius != -FLT_MAX)
            c = b*b-4.0f*a*c;
        else
            c = FLT_MAX;
        if (c < 0 || a == 0)
            continue;
        a  *= 2.0f;

        tmp = ( -b+sqrt( c ) )/a;
        c   = ( -b-sqrt( c ) )/a;
        if (tmp > 0 && tmp <= 1)
            return (c > 0 && c < tmp) ? c : tmp;
        else if (c > 0 && c <= 1)
            return c;
    }
    return 0.0f;
}


text:
typedef struct SimpleContentWindow SimpleContentWindow;
struct SimpleContentWindow {
        int32_t unknown[0];
};


text:
/*global angular,describe,it,expect,inject,module,beforeEach,afterEach*/
(function () {
  'use strict';

  describe('settingsService', function () {
    var settingsService,
      $httpBackend,
      responseMockOpts = {succeed: true},
      testData = {
        isTrue: true,
        isFalse: false,
        versions: {one: 1, two: 2},
        deep: {nest: { foo: 'bar' } },
        isNull: null
      };

    beforeEach(module('hz.api'));
    beforeEach(inject(function (_$httpBackend_, _settingsService_) {
      responseMockOpts.succeed = true;
      settingsService = _settingsService_;
      $httpBackend = _$httpBackend_;
      $httpBackend.whenGET('/api/settings/').respond(
        function () {
          return responseMockOpts.succeed ?
            [200, testData, {}] : [500, 'Fail', {}];
        });
      $httpBackend.expectGET('/api/settings/');
    }));

    afterEach(function () {
      $httpBackend.verifyNoOutstandingExpectation();
      $httpBackend.verifyNoOutstandingRequest();
    });

    describe('getSettings', function () {

      it('should return all settings', function () {
        settingsService.getSettings().then(
          function (actual) {
            expect(actual).toEqual(testData);
          }
        );
        $httpBackend.flush();
      });

      it('should fail when error response', function () {
        responseMockOpts.succeed = false;
        settingsService.getSettings().then(
          function (actual) {
            fail('Should not have succeeded: ' + angular.toJson(actual));
          },
          function (actual) {
            expect(actual).toBeDefined();
          }
        );
        $httpBackend.flush();
      });

    });

    describe('getSetting', function () {

      it('nested deep object is found', function () {
        settingsService.getSetting('deep.nest.foo')
          .then(function (actual) {
            expect(actual).toEqual('bar');
          });
        $httpBackend.flush();
      });

      it("is undefined when doesn't exist", function () {
        settingsService.getSetting('will.not.exist')
          .then(function (actual) {
            expect(actual).toBeUndefined();
          });
        $httpBackend.flush();
      });

      it("default is returned when doesn't exist", function () {
        var actual;
        settingsService.getSetting('will.not.exist', 'hello')
          .then(function (actual) {
            expect(actual).toEqual('hello');
          });
        $httpBackend.flush();
      });

      it('should return true', function () {
        settingsService.getSetting('isTrue')
          .then(function (actual) {
            expect(actual).toEqual(true);
          });
        $httpBackend.flush();
      });

      it('should fail when error response', function () {
        responseMockOpts.succeed = false;
        settingsService.getSetting('isTrue').then(
          function (actual) {
            fail('Should not have succeeded: ' + angular.toJson(actual));
          },
          function (actual) {
            expect(actual).toBeDefined();
          }
        );
        $httpBackend.flush();
      });

    });

    describe('ifEnabled', function () {

      var expectedResult = {};

      var enabled = function () {
        expectedResult.enabled = true;
      };

      var notEnabled = function () {
        expectedResult.enabled = false;
      };

      beforeEach(inject(function () {
        expectedResult = {enabled: null};
      }));

      function meetsExpectations(expected) {
        $httpBackend.flush();
        expect(expectedResult.enabled).toBe(expected);
      }

      it('should fail when error response', function () {
        responseMockOpts.succeed = false;
        settingsService.ifEnabled('isTrue').then(
          function (actual) {
            fail('Should not have succeeded: ' + angular.toJson(actual));
          },
          function (actual) {
            expect(actual).toBeDefined();
          }
        );
        $httpBackend.flush();
      });

      it('boolean is enabled when true', function () {
        settingsService.ifEnabled('isTrue').then(enabled, notEnabled);
        meetsExpectations(true);
      });

      it('boolean is enabled when true expected', function () {
        settingsService.ifEnabled('isTrue', true).then(enabled, notEnabled);
        meetsExpectations(true);
      });

      it('boolean is not enabled when false expected', function () {
        settingsService.ifEnabled('isTrue', false).then(enabled, notEnabled);
        meetsExpectations(false);
      });

      it('boolean is not enabled when false', function () {
        settingsService.ifEnabled('isFalse').then(enabled, notEnabled);
        meetsExpectations(false);
      });

      it('boolean is enabled when false expected', function () {
        settingsService.ifEnabled('isFalse', false).then(enabled, notEnabled);
        meetsExpectations(true);
      });

      it('nested object is enabled when expected', function () {
        settingsService.ifEnabled('versions.one', 1).then(enabled, notEnabled);
        meetsExpectations(true);
      });

      it('nested object is not enabled', function () {
        settingsService.ifEnabled('versions.two', 1).then(enabled, notEnabled);
        meetsExpectations(false);
      });

      it('nested object is not enabled when not found', function () {
        settingsService.ifEnabled('no-exist.two', 1).then(enabled, notEnabled);
        meetsExpectations(false);
      });

      it('nested deep object is enabled when expected', function () {
        settingsService.ifEnabled('deep.nest.foo', 'bar').then(enabled, notEnabled);
        meetsExpectations(true);
      });

      it('nested deep object is not enabled when not expected', function () {
        settingsService.ifEnabled('deep.nest.foo', 'wrong').then(enabled, notEnabled);
        meetsExpectations(false);
      });

      it('null is not enabled', function () {
        settingsService.ifEnabled('isNull').then(enabled, notEnabled);
        meetsExpectations(false);
      });

      it('null is enabled when expected', function () {
        settingsService.ifEnabled('isNull', null).then(enabled, notEnabled);
        meetsExpectations(true);
      });

      it('true is enabled when not found and true default', function () {
        settingsService.ifEnabled('nonExistent', true, true).then(enabled, notEnabled);
        meetsExpectations(true);
      });

      it('true is not enabled when not found and false default', function () {
        settingsService.ifEnabled('nonExistent', true, false).then(enabled, notEnabled);
        meetsExpectations(false);
      });

      it('true is not enabled when not found and no default', function () {
        settingsService.ifEnabled('nonExistent', true).then(enabled, notEnabled);
        meetsExpectations(false);
      });

      it('false is enabled when not found and expected w/ default', function () {
        settingsService.ifEnabled('nonExistent', false, false).then(enabled, notEnabled);
        meetsExpectations(true);
      });

      it('bar is enabled when expected not found and bar default', function () {
        settingsService.ifEnabled('nonExistent', 'bar', 'bar').then(enabled, notEnabled);
        meetsExpectations(true);
      });

      it('bar is not enabled when expected not found and not default', function () {
        settingsService.ifEnabled('nonExistent', 'bar', 'foo').then(enabled, notEnabled);
        meetsExpectations(false);
      });
    });

  });

})();


text:
// EndMenuViewer.java

package de.htwg.battleship.aview.tui.views;

import de.htwg.battleship.aview.tui.Viewer;

/**
 * EndMenuViewer provides a menu after a game has won by a player.
 *
 * @author Moritz Sauter (SauterMoritz@gmx.de)
 * @version 1.00
 * @since 2014-12-29
 */
public class EndMenuViewer extends Viewer {

    @Override
    public final String getString() {
        return "1. Start a new Game\n" +
               "2. Options\n" +
               "3. End Game\n" +
               "\t--->\t";
    }
}


text:
:mod:`asphalt.core.router`
==========================

.. automodule:: asphalt.core.router
    :members:


text:
//
// このファイルは、JavaTM Architecture for XML Binding(JAXB) Reference Implementation、v2.2.8-b130911.1802によって生成されました
// http://java.sun.com/xml/jaxbを参照してください
// ソース・スキーマの再コンパイル時にこのファイルの変更は失われます。
// 生成日: 2015.08.14 時間 10:22:22 PM JST
//

package com.eitax.recall.amazon.xsd;

import java.math.BigInteger;
import java.util.ArrayList;
import java.util.List;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlSchemaType;
import javax.xml.bind.annotation.XmlType;

/**
 *
CartAddRequest complex typeのJavaクラス。
 *
 *
次のスキーマ・フラグメントは、このクラス内に含まれる予期されるコンテンツを指定します。
 *
 *

 * <complexType name="CartAddRequest">
 *   <complexContent>
 *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
 *       <sequence>
 *         <element name="CartId" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
 *         <element name="HMAC" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
 *         <element name="MergeCart" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
 *         <element name="Items" minOccurs="0">
 *           <complexType>
 *             <complexContent>
 *               <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
 *                 <sequence>
 *                   <element name="Item" maxOccurs="unbounded" minOccurs="0">
 *                     <complexType>
 *                       <complexContent>
 *                         <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
 *                           <sequence>
 *                             <element name="ASIN" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
 *                             <element name="OfferListingId" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
 *                             <element name="Quantity" type="{http://www.w3.org/2001/XMLSchema}positiveInteger" minOccurs="0"/>
 *                             <element name="AssociateTag" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
 *                             <element name="ListItemId" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
 *                           </sequence>
 *                         </restriction>
 *                       </complexContent>
 *                     </complexType>
 *                   </element>
 *                 </sequence>
 *               </restriction>
 *             </complexContent>
 *           </complexType>
 *         </element>
 *         <element name="ResponseGroup" type="{http://www.w3.org/2001/XMLSchema}string" maxOccurs="unbounded" minOccurs="0"/>
 *       </sequence>
 *     </restriction>
 *   </complexContent>
 * </complexType>
 *

 *
 *
 */
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "CartAddRequest", propOrder = {
    "cartId",
    "hmac",
    "mergeCart",
    "items",
    "responseGroup"
})
public class CartAddRequest {

    @XmlElement(name = "CartId")
    protected String cartId;
    @XmlElement(name = "HMAC")
    protected String hmac;
    @XmlElement(name = "MergeCart")
    protected String mergeCart;
    @XmlElement(name = "Items")
    protected CartAddRequest.Items items;
    @XmlElement(name = "ResponseGroup")
    protected List<String> responseGroup;

    /**
     * cartIdプロパティの値を取得します。
     *
     * @return
     *     possible object is
     *     {@link String }
     *
     */
    public String getCartId() {
        return cartId;
    }

    /**
     * cartIdプロパティの値を設定します。
     *
     * @param value
     *     allowed object is
     *     {@link String }
     *
     */
    public void setCartId(String value) {
        this.cartId = value;
    }

    /**
     * hmacプロパティの値を取得します。
     *
     * @return
     *     possible object is
     *     {@link String }
     *
     */
    public String getHMAC() {
        return hmac;
    }

    /**
     * hmacプロパティの値を設定します。
     *
     * @param value
     *     allowed object is
     *     {@link String }
     *
     */
    public void setHMAC(String value) {
        this.hmac = value;
    }

    /**
     * mergeCartプロパティの値を取得します。
     *
     * @return
     *     possible object is
     *     {@link String }
     *
     */
    public String getMergeCart() {
        return mergeCart;
    }

    /**
     * mergeCartプロパティの値を設定します。
     *
     * @param value
     *     allowed object is
     *     {@link String }
     *
     */
    public void setMergeCart(String value) {
        this.mergeCart = value;
    }

    /**
     * itemsプロパティの値を取得します。
     *
     * @return
     *     possible object is
     *     {@link CartAddRequest.Items }
     *
     */
    public CartAddRequest.Items getItems() {
        return items;
    }

    /**
     * itemsプロパティの値を設定します。
     *
     * @param value
     *     allowed object is
     *     {@link CartAddRequest.Items }
     *
     */
    public void setItems(CartAddRequest.Items value) {
        this.items = value;
    }

    /**
     * Gets the value of the responseGroup property.
     *
     *

     * This accessor method returns a reference to the live list,
     * not a snapshot. Therefore any modification you make to the
     * returned list will be present inside the JAXB object.
     * This is why there is not a set method for the responseGroup property.
     *
     *

     * For example, to add a new item, do as follows:
     *

     *    getResponseGroup().add(newItem);
     *

     *
     *
     *

     * Objects of the following type(s) are allowed in the list
     * {@link String }
     *
     *
     */
    public List<String> getResponseGroup() {
        if (responseGroup == null) {
            responseGroup = new ArrayList<String>();
        }
        return this.responseGroup;
    }

    /**
     *
anonymous complex typeのJavaクラス。
     *
     *
次のスキーマ・フラグメントは、このクラス内に含まれる予期されるコンテンツを指定します。
     *
     *

     * <complexType>
     *   <complexContent>
     *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
     *       <sequence>
     *         <element name="Item" maxOccurs="unbounded" minOccurs="0">
     *           <complexType>
     *             <complexContent>
     *               <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
     *                 <sequence>
     *                   <element name="ASIN" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
     *                   <element name="OfferListingId" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
     *                   <element name="Quantity" type="{http://www.w3.org/2001/XMLSchema}positiveInteger" minOccurs="0"/>
     *                   <element name="AssociateTag" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
     *                   <element name="ListItemId" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
     *                 </sequence>
     *               </restriction>
     *             </complexContent>
     *           </complexType>
     *         </element>
     *       </sequence>
     *     </restriction>
     *   </complexContent>
     * </complexType>
     *

     *
     *
     */
    @XmlAccessorType(XmlAccessType.FIELD)
    @XmlType(name = "", propOrder = {
        "item"
    })
    public static class Items {

        @XmlElement(name = "Item")
        protected List<CartAddRequest.Items.Item> item;

        /**
         * Gets the value of the item property.
         *
         *

         * This accessor method returns a reference to the live list,
         * not a snapshot. Therefore any modification you make to the
         * returned list will be present inside the JAXB object.
         * This is why there is not a set method for the item property.
         *
         *

         * For example, to add a new item, do as follows:
         *

         *    getItem().add(newItem);
         *

         *
         *
         *

         * Objects of the following type(s) are allowed in the list
         * {@link CartAddRequest.Items.Item }
         *
         *
         */
        public List<CartAddRequest.Items.Item> getItem() {
            if (item == null) {
                item = new ArrayList<CartAddRequest.Items.Item>();
            }
            return this.item;
        }

        /**
         *
anonymous complex typeのJavaクラス。
         *
         *
次のスキーマ・フラグメントは、このクラス内に含まれる予期されるコンテンツを指定します。
         *
         *

         * <complexType>
         *   <complexContent>
         *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
         *       <sequence>
         *         <element name="ASIN" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
         *         <element name="OfferListingId" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
         *         <element name="Quantity" type="{http://www.w3.org/2001/XMLSchema}positiveInteger" minOccurs="0"/>
         *         <element name="AssociateTag" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
         *         <element name="ListItemId" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
         *       </sequence>
         *     </restriction>
         *   </complexContent>
         * </complexType>
         *

         *
         *
         */
        @XmlAccessorType(XmlAccessType.FIELD)
        @XmlType(name = "", propOrder = {
            "asin",
            "offerListingId",
            "quantity",
            "associateTag",
            "listItemId"
        })
        public static class Item {

            @XmlElement(name = "ASIN")
            protected String asin;
            @XmlElement(name = "OfferListingId")
            protected String offerListingId;
            @XmlElement(name = "Quantity")
            @XmlSchemaType(name = "positiveInteger")
            protected BigInteger quantity;
            @XmlElement(name = "AssociateTag")
            protected String associateTag;
            @XmlElement(name = "ListItemId")
            protected String listItemId;

            /**
             * asinプロパティの値を取得します。
             *
             * @return
             *     possible object is
             *     {@link String }
             *
             */
            public String getASIN() {
                return asin;
            }

            /**
             * asinプロパティの値を設定します。
             *
             * @param value
             *     allowed object is
             *     {@link String }
             *
             */
            public void setASIN(String value) {
                this.asin = value;
            }

            /**
             * offerListingIdプロパティの値を取得します。
             *
             * @return
             *     possible object is
             *     {@link String }
             *
             */
            public String getOfferListingId() {
                return offerListingId;
            }

            /**
             * offerListingIdプロパティの値を設定します。
             *
             * @param value
             *     allowed object is
             *     {@link String }
             *
             */
            public void setOfferListingId(String value) {
                this.offerListingId = value;
            }

            /**
             * quantityプロパティの値を取得します。
             *
             * @return
             *     possible object is
             *     {@link BigInteger }
             *
             */
            public BigInteger getQuantity() {
                return quantity;
            }

            /**
             * quantityプロパティの値を設定します。
             *
             * @param value
             *     allowed object is
             *     {@link BigInteger }
             *
             */
            public void setQuantity(BigInteger value) {
                this.quantity = value;
            }

            /**
             * associateTagプロパティの値を取得します。
             *
             * @return
             *     possible object is
             *     {@link String }
             *
             */
            public String getAssociateTag() {
                return associateTag;
            }

            /**
             * associateTagプロパティの値を設定します。
             *
             * @param value
             *     allowed object is
             *     {@link String }
             *
             */
            public void setAssociateTag(String value) {
                this.associateTag = value;
            }

            /**
             * listItemIdプロパティの値を取得します。
             *
             * @return
             *     possible object is
             *     {@link String }
             *
             */
            public String getListItemId() {
                return listItemId;
            }

            /**
             * listItemIdプロパティの値を設定します。
             *
             * @param value
             *     allowed object is
             *     {@link String }
             *
             */
            public void setListItemId(String value) {
                this.listItemId = value;
            }

        }

    }

}


text:
import errno
import os
import re
import unittest
import uuid

from Pegasus.db import connection
from Pegasus.db.admin.admin_loader import *
from Pegasus.db.schema import *

class TestConnection(unittest.TestCase):
    def test_non_existent_url(self):
        dburi = "jdbc:mysql://localhost/unknown-db"
        self.assertRaises(connection.ConnectionError, connection.connect, dburi)

        dburi = "jdbc:mysql://root@localhost/unknown-db"
        self.assertRaises(connection.ConnectionError, connection.connect, dburi)

        dburi = "jdbc:mysql://localhost:1111/unknown-db"
        self.assertRaises(connection.ConnectionError, connection.connect, dburi)

        dburi = "sqlite:test-url.db"
        self.assertRaises(connection.ConnectionError, connection.connect, dburi)

        dburi = "test.db"
        self.assertRaises(connection.ConnectionError, connection.connect, dburi)

        dburi = "jdbc:invalid://localhost/testdb"
        self.assertRaises(connection.ConnectionError, connection.connect, dburi)

    def test_jdbc_sqlite(self):
        filename = str(uuid.uuid4())
        _silentremove(filename)
        dburi = "jdbc:sqlite:%s" % filename
        db = connection.connect(dburi, create=True, verbose=False)
        self.assertEqual(get_version(db), CURRENT_DB_VERSION)
        db.close()
        _remove(filename)

        filename = "/tmp/" + str(uuid.uuid4())
        _silentremove(filename)
        dburi = "jdbc:sqlite:%s" % filename
        db = connection.connect(dburi, create=True, verbose=False)
        self.assertEqual(get_version(db), CURRENT_DB_VERSION)
        db.close()
        _remove(filename)

        dburi = "jdbc:sqlite:/%s" % filename
        db = connection.connect(dburi, create=True, verbose=False)
        self.assertEqual(get_version(db), CURRENT_DB_VERSION)
        db.close()
        _remove(filename)

    def test_connection_by_uri(self):
        filename = str(uuid.uuid4())
        _silentremove(filename)
        dburi = "sqlite:///%s" % filename
        db = connection.connect(
            dburi, echo=False, schema_check=True, create=True, verbose=False
        )
        db.close()
        _remove(filename)

def _silentremove(filename):
    try:
        os.remove(filename)
    except OSError as e:
        if e.errno != errno.ENOENT:  # errno.ENOENT = no such file or directory
            raise  # re-raise exception if a different error occured

def _remove(filename):
    for f in os.listdir("."):
        if re.search(filename + ".*", f):
            os.remove(f)
    _silentremove(filename)

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


text:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<title>gameplay: Main Page</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="custom.css" rel="stylesheet" type="text/css" />
<link href="search/search.css" rel="stylesheet" type="text/css"/>

overview
wiki
api reference
forums
download

gameplay

Theme

Style

Classes |
Public Member Functions |
List of all members

gameplay::Theme::Style Class Reference

#include <ThemeStyle.h>

Public Member Functions

Theme * 	getTheme () const

Detailed Description

Defines the style of a control.

A style can have padding and margin values, as well as overlays for each of the control's states.

 Each overlay in turn can reference other theme classes to determine the border, background, cursor, and image settings to use for a particular state, as well as color and font settings, etcetera.

Member Function Documentation

◆ getTheme()

          Theme * gameplay::Theme::Style::getTheme
          (
          	)
           const

Get the theme this style belongs to.

Returns

The theme this style belongs to.

<address class="footer">
Generated on Wed May 18 2022 18:44:29 for gameplay by  1.9.4
</address>


text:
ACCEPTED

#### According to
Index Fungorum

#### Published in
Die Gattung Phlegmacium (Schleimköpfe). Die Pilze Mitteleuropas 4 310 (1960)

#### Original name
Cortinarius guttatus Rob. Henry

### Remarks
null