text:
"use strict";

var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard");

var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.default = exports.styles = void 0;

var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));

var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));

var React = _interopRequireWildcard(require("react"));

var _propTypes = _interopRequireDefault(require("prop-types"));

var _clsx = _interopRequireDefault(require("clsx"));

var _Collapse = _interopRequireDefault(require("../Collapse"));

var _withStyles = _interopRequireDefault(require("../styles/withStyles"));

var styles = function styles(theme) {
  return {
    /* Styles applied to the root element. */
    root: {
      marginTop: 8,
      marginLeft: 12,
      // half icon
      paddingLeft: 8 + 12,
      // margin + half icon
      paddingRight: 8,
      borderLeft: "1px solid ".concat(theme.palette.type === 'light' ? theme.palette.grey[400] : theme.palette.grey[600])
    },

    /* Styles applied to the root element if `last={true}` (controlled by `Step`). */
    last: {
      borderLeft: 'none'
    },

    /* Styles applied to the Transition component. */
    transition: {}
  };
};

exports.styles = styles;
var StepContent = /*#__PURE__*/React.forwardRef(function StepContent(props, ref) {
  var active = props.active,
      alternativeLabel = props.alternativeLabel,
      children = props.children,
      classes = props.classes,
      className = props.className,
      completed = props.completed,
      expanded = props.expanded,
      last = props.last,
      optional = props.optional,
      orientation = props.orientation,
      _props$TransitionComp = props.TransitionComponent,
      TransitionComponent = _props$TransitionComp === void 0 ? _Collapse.default : _props$TransitionComp,
      _props$transitionDura = props.transitionDuration,
      transitionDurationProp = _props$transitionDura === void 0 ? 'auto' : _props$transitionDura,
      TransitionProps = props.TransitionProps,
      other = (0, _objectWithoutProperties2.default)(props, ["active", "alternativeLabel", "children", "classes", "className", "completed", "expanded", "last", "optional", "orientation", "TransitionComponent", "transitionDuration", "TransitionProps"]);

  if (process.env.NODE_ENV !== 'production') {
    if (orientation !== 'vertical') {
      console.error('Material-UI: <StepContent /> is only designed for use with the vertical stepper.');
    }
  }

  var transitionDuration = transitionDurationProp;

  if (transitionDurationProp === 'auto' && !TransitionComponent.muiSupportAuto) {
    transitionDuration = undefined;
  }

  return /*#__PURE__*/React.createElement("div", (0, _extends2.default)({
    className: (0, _clsx.default)(classes.root, className, last && classes.last),
    ref: ref
  }, other), /*#__PURE__*/React.createElement(TransitionComponent, (0, _extends2.default)({
    in: active || expanded,
    className: classes.transition,
    timeout: transitionDuration,
    unmountOnExit: true
  }, TransitionProps), children));
});
process.env.NODE_ENV !== "production" ? StepContent.propTypes = {
  // ----------------------------- Warning --------------------------------
  // | These PropTypes are generated from the TypeScript type definitions |
  // |     To update them edit the d.ts file and run "yarn proptypes"     |
  // ----------------------------------------------------------------------

  /**
   * Step content.
   */
  children: _propTypes.default.node,

  /**
   * Override or extend the styles applied to the component.
   * See [CSS API](#css) below for more details.
   */
  classes: _propTypes.default.object,

  /**
   * @ignore
   */
  className: _propTypes.default.string,

  /**
   * The component used for the transition.
   * [Follow this guide](/components/transitions/#transitioncomponent-prop) to learn more about the requirements for this component.
   */
  TransitionComponent: _propTypes.default.elementType,

  /**
   * Adjust the duration of the content expand transition.
   * Passed as a prop to the transition component.
   *
   * Set to 'auto' to automatically calculate transition time based on height.
   */
  transitionDuration: _propTypes.default.oneOfType([_propTypes.default.oneOf(['auto']), _propTypes.default.number, _propTypes.default.shape({
    appear: _propTypes.default.number,
    enter: _propTypes.default.number,
    exit: _propTypes.default.number
  })]),

  /**
   * Props applied to the [`Transition`](http://reactcommunity.org/react-transition-group/transition#Transition-props) element.
   */
  TransitionProps: _propTypes.default.object
} : void 0;

var _default = (0, _withStyles.default)(styles, {
  name: 'MuiStepContent'
})(StepContent);

exports.default = _default;


text:
angular.module('tsteas')
  .factory('Utils', function() {
    return {

      invokeApp: function(request, success, fail) {
        console.log('--- invoking app with request');
        console.log(request);

        // invoke
        blackberry.invoke.invoke(
          request,
          // done
          function(data) {
            console.log('[success] data: ' + data);
            success(data);
          },
          // error
          function(e) {
            console.log('error', e);
            fail();
          }
        );

      }

    };
  });

redpajama_set_name: RedPajamaGithub


text:
package be.viaa.amqp;

import com.rabbitmq.client.Channel;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;

import com.google.gson.Gson;
import com.google.gson.JsonSyntaxException;

/**
 * Converts an AMQP JSON message to a POJO
 *
 * @author Hannes Lowette
 *
 * @param <T>
 */
public abstract class AmqpJsonConsumer<T> implements AmqpConsumer {

	/**
	 * static logger for this class
	 */
	private static final Logger logger = LogManager.getLogger(AmqpJsonConsumer.class);

	/**
	 * The gson instance to convert POJO to JSON
	 */
	private final Gson gson = new Gson();

	/**
	 * The type
	 */
	private final Class<T> type;

	/**
	 * @param type
	 */
	public AmqpJsonConsumer(Class<T> type) {
		this.type = type;
	}

	/* (non-Javadoc)
	 * @see be.viaa.amqp.AmqpConsumer#accept(be.viaa.amqp.AmqpService, java.lang.byte[])
	 */
	@Override
	public void accept(AmqpService service, byte[] data) throws Exception {
		logger.info("Message received: {}", new String(data));
		this.accept(service, gson.fromJson(new String(data), type));
	}

	/* (non-Javadoc)
	 * @see be.viaa.amqp.AmqpConsumer#success(be.viaa.amqp.AmqpService, java.lang.byte[])
	 */
	@Override
	public void success(AmqpService service, byte[] data, Channel channel) throws Exception {
		this.success(service, gson.fromJson(new String(data), type), channel);
	}

	/* (non-Javadoc)
	 * @see be.viaa.amqp.AmqpConsumer#exception(be.viaa.amqp.AmqpService, java.lang.Exception)
	 */
	@Override
	public void exception(AmqpService service, Exception exception, byte[] data, Channel channel) {
		try {
			exception(service, exception, gson.fromJson(new String(data), type), channel);
		} catch (JsonSyntaxException ex) {
			logger.error("Malformed JSON received: {}\n{}", ex.getMessage(), new String(data));
		}
	}

	/**
	 * Called when the JSON message has been parsed into a POJO
	 *
	 * @param service
	 * @param object
	 */
	protected abstract void accept(AmqpService service, T message) throws Exception;

	/**
	 * Called when the JSON message has been parsed into a POJO
	 *
	 * @param service
	 * @param object
	 */
	protected abstract void success(AmqpService service, T message, Channel channel) throws Exception;

	/**
	 * Called when the JSON message has been parsed into a POJO
	 *
	 * @param service
	 * @param object
	 */
	protected abstract void exception(AmqpService service, Exception exception, T message, Channel channel);

}


text:
class WXDLLIMPEXP_CORE wxMemoryDCImpl : public wxMSWDCImpl
{
public:
  wxMemoryDCImpl(wxMemoryDC* owner);
  wxMemoryDCImpl(wxMemoryDC* owner, wxBitmap& bitmap);
  wxMemoryDCImpl(wxMemoryDC* owner, wxDC* dc);
    // override some base class virtuals
  void DoDrawRectangle(wxCoord x, wxCoord y, wxCoord width, wxCoord height) override;
  void DoGetSize(int* width, int* height) const override;
  void DoSelect(const wxBitmap& bitmap) override;
  wxBitmap DoGetAsBitmap(const wxRect* subrect) const override
  {
    return subrect == NULL ? GetSelectedBitmap() : GetSelectedBitmap().GetSubBitmapOfHDC(*subrect, GetHDC());
  }
protected:
    // create DC compatible with the given one or screen if dc == NULL
  bool CreateCompatible(wxDC* dc);
    // initialize the newly created DC
  void Init();
  wxDECLARE_CLASS(wxMemoryDCImpl);
  wxDECLARE_NO_COPY_CLASS(wxMemoryDCImpl);
};
#endif
    // _WX_DCMEMORY_H_


text:
<template>

${title}

Activation data: ${activationData}

</template>


text:
@class ORViewController;

@interface ORAppDelegate : UIResponder <UIApplicationDelegate>

@property (strong, nonatomic) UIWindow *window;

@property (strong, nonatomic) ORViewController *viewController;

@end


text:
<TEMPLATE ID="pop_blue" FORMAT="WRAPPER">

<ELEMENT ID="CPUMBVR" SUB="LINK_VISITED_TEXT_COLOR" TYPE="READONLY" LOAD="THEME::LINK_VISITED_TEXT_COLOR" RAW="1"></ELEMENT>
<ELEMENT ID="CPUMBVS" SUB="TABLE_HEADING_FONT_SIZE" TYPE="READONLY" LOAD="THEME::TABLE_HEADING_FONT_SIZE" RAW="1"></ELEMENT>
<ELEMENT ID="CPUMBVT" SUB="DISCLAIMER_FONT_SIZE" TYPE="READONLY" LOAD="THEME::DISCLAIMER_FONT_SIZE" RAW="1"></ELEMENT>
<ELEMENT ID="CPUMBVU" SUB="CONTENT_BACKGROUND_COLOR" TYPE="READONLY" LOAD="THEME::CONTENT_BACKGROUND_COLOR" RAW="1"></ELEMENT>
<ELEMENT ID="CPUMBVV" SUB="TABLE_LISTING_BACKGROUND_COLOR" TYPE="READONLY" LOAD="THEME::TABLE_LISTING_BACKGROUND_COLOR" RAW="1"></ELEMENT>
<ELEMENT ID="CPUMBVW" SUB="CONTENT_TEXT_COLOR" TYPE="READONLY" LOAD="THEME::CONTENT_TEXT_COLOR" RAW="1"></ELEMENT>
<ELEMENT ID="CPUMBVX" SUB="TABLE_LISTING_FONT_SIZE" TYPE="READONLY" LOAD="THEME::TABLE_LISTING_FONT_SIZE" RAW="1"></ELEMENT>
<ELEMENT ID="CPUMBVY" SUB="TABLE_LISTING_TEXT_COLOR" TYPE="READONLY" LOAD="THEME::TABLE_LISTING_TEXT_COLOR" RAW="1"></ELEMENT>
<ELEMENT ID="CPUMBVZ" SUB="TABLE_LISTING_FONT_FACE" TYPE="READONLY" LOAD="THEME::TABLE_LISTING_FONT_FACE" RAW="1"></ELEMENT>
<ELEMENT ID="CPUMBWA" SUB="CONTENT_FONT_FACE" TYPE="READONLY" LOAD="THEME::CONTENT_FONT_FACE" RAW="1"></ELEMENT>
<ELEMENT ID="CPUMBWB" SUB="NAME" TYPE="READONLY" LOAD="THEME::NAME" RAW="1"></ELEMENT>
<ELEMENT ID="CPUMBWC" SUB="DISCLAIMER_FONT_FACE" TYPE="READONLY" LOAD="THEME::DISCLAIMER_FONT_FACE" RAW="1"></ELEMENT>
<ELEMENT ID="CPUMBWD" SUB="PRETTY_NAME" TYPE="READONLY" LOAD="THEME::PRETTY_NAME" RAW="1"></ELEMENT>
<ELEMENT ID="CPUMBWE" SUB="TABLE_HEADING_BACKGROUND_COLOR" TYPE="READONLY" LOAD="THEME::TABLE_HEADING_BACKGROUND_COLOR" RAW="1"></ELEMENT>
<ELEMENT ID="CPUMBWF" SUB="TABLE_LISTING_BACKGROUND_COLOR_ALTERNATE" TYPE="READONLY" LOAD="THEME::TABLE_LISTING_BACKGROUND_COLOR_ALTERNATE" RAW="1"></ELEMENT>
<ELEMENT ID="CPUMBWG" SUB="LINK_ACTIVE_TEXT_COLOR" TYPE="READONLY" LOAD="THEME::LINK_ACTIVE_TEXT_COLOR" RAW="1"></ELEMENT>
<ELEMENT ID="CPUMBWH" SUB="CONTENT_FONT_SIZE" TYPE="READONLY" LOAD="THEME::CONTENT_FONT_SIZE" RAW="1"></ELEMENT>
<ELEMENT ID="CPUMBWI" SUB="ALERT_COLOR" TYPE="READONLY" LOAD="THEME::ALERT_COLOR" RAW="1"></ELEMENT>
<ELEMENT ID="CPUMBWJ" SUB="DISCLAIMER_BACKGROUND_COLOR" TYPE="READONLY" LOAD="THEME::DISCLAIMER_BACKGROUND_COLOR" RAW="1"></ELEMENT>
<ELEMENT ID="CPUMBWK" SUB="TABLE_HEADING_FONT_FACE" TYPE="READONLY" LOAD="THEME::TABLE_HEADING_FONT_FACE" RAW="1"></ELEMENT>
<ELEMENT ID="CPUMBWL" SUB="TABLE_HEADING_TEXT_COLOR" TYPE="READONLY" LOAD="THEME::TABLE_HEADING_TEXT_COLOR" RAW="1"></ELEMENT>
<ELEMENT ID="CPUMBWM" SUB="DISCLAIMER_TEXT_COLOR" TYPE="READONLY" LOAD="THEME::DISCLAIMER_TEXT_COLOR" RAW="1"></ELEMENT>
<ELEMENT ID="CPUMBWN" SUB="LINK_TEXT_COLOR" TYPE="READONLY" LOAD="THEME::LINK_TEXT_COLOR" RAW="1"></ELEMENT>
<ELEMENT ID="CPUMBWO" SUB="HOMECATEGORY_URL" TYPE="READONLY" LOAD="URL::HOMECATEGORY_URL" RAW="1"></ELEMENT>
<ELEMENT ID="CPUMBWP" SUB="WRAPPER_URL" TYPE="READONLY" LOAD="URL::WRAPPER_URL" RAW="1"></ELEMENT>
<ELEMENT ID="CPUMBWQ" SUB="CART_URL" TYPE="READONLY" LOAD="URL::CART_URL" RAW="1"></ELEMENT>
<ELEMENT ID="CPUMBWR" SUB="SUBSCRIBE_URL" TYPE="READONLY" LOAD="URL::SUBSCRIBE_URL" RAW="1"></ELEMENT>
<ELEMENT ID="CPUMBWS" SUB="FEEDBACK_URL" TYPE="READONLY" LOAD="URL::FEEDBACK_URL" RAW="1"></ELEMENT>
<ELEMENT ID="CPUMBWT" SUB="LOGOUT_FUNCTION_URL" TYPE="READONLY" LOAD="URL::LOGOUT_FUNCTION_URL" RAW="1"></ELEMENT>
<ELEMENT ID="CPUMBWU" SUB="SHIPQUOTE_URL" TYPE="READONLY" LOAD="URL::SHIPQUOTE_URL" RAW="1"></ELEMENT>
<ELEMENT ID="CPUMBWV" SUB="PRIVACY_URL" TYPE="READONLY" LOAD="URL::PRIVACY_URL" RAW="1"></ELEMENT>
<ELEMENT ID="CPUMBWW" SUB="SITEBUTTON_URL" TYPE="READONLY" LOAD="URL::SITEBUTTON_URL" RAW="1"></ELEMENT>
<ELEMENT ID="CPUMBWX" SUB="HOMEPAGE_URL" TYPE="READONLY" LOAD="URL::HOMEPAGE_URL" RAW="1"></ELEMENT>
<ELEMENT ID="CPUMBWY" SUB="COUNTER_URL" TYPE="READONLY" LOAD="URL::COUNTER_URL" RAW="1"></ELEMENT>
<ELEMENT ID="CPUMBWZ" SUB="RETURNS_URL" TYPE="READONLY" LOAD="URL::RETURNS_URL" RAW="1"></ELEMENT>
<ELEMENT ID="CPUMBXA" SUB="PASSWORD_URL" TYPE="READONLY" LOAD="URL::PASSWORD_URL" RAW="1"></ELEMENT>
<ELEMENT ID="CPUMBXB" SUB="UPDATE_PAYMENT_URL" TYPE="READONLY" LOAD="URL::UPDATE_PAYMENT_URL" RAW="1"></ELEMENT>
<ELEMENT ID="CPUMBXC" SUB="FORGOT_URL" TYPE="READONLY" LOAD="URL::FORGOT_URL" RAW="1"></ELEMENT>
<ELEMENT ID="CPUMBXD" SUB="NAVBUTTON_URL" TYPE="READONLY" LOAD="URL::NAVBUTTON_URL" RAW="1"></ELEMENT>
<ELEMENT ID="CPUMBXE" SUB="CONTACT_URL" TYPE="READONLY" LOAD="URL::CONTACT_URL" RAW="1"></ELEMENT>
<ELEMENT ID="CPUMBXF" SUB="LOGOUT_URL" TYPE="READONLY" LOAD="URL::LOGOUT_URL" RAW="1"></ELEMENT>
<ELEMENT ID="CPUMBXG" SUB="GALLERY_URL" TYPE="READONLY" LOAD="URL::GALLERY_URL" RAW="1"></ELEMENT>
<ELEMENT ID="CPUMBXH" SUB="REMOVE_URL" TYPE="READONLY" LOAD="URL::REMOVE_URL" RAW="1"></ELEMENT>
<ELEMENT ID="CPUMBXI" SUB="HOME_URL" TYPE="READONLY" LOAD="URL::HOME_URL" RAW="1"></ELEMENT>
<ELEMENT ID="CPUMBXJ" SUB="ABOUT_ZOOVY_URL" TYPE="READONLY" LOAD="URL::ABOUT_ZOOVY_URL" RAW="1"></ELEMENT>
<ELEMENT ID="CPUMBXK" SUB="NEWS_URL" TYPE="READONLY" LOAD="URL::NEWS_URL" RAW="1"></ELEMENT>
<ELEMENT ID="CPUMBXL" SUB="SECURE_URL" TYPE="READONLY" LOAD="URL::SECURE_URL" RAW="1"></ELEMENT>
<ELEMENT ID="CPUMBXM" SUB="ABOUT_URL" TYPE="READONLY" LOAD="URL::ABOUT_URL" RAW="1"></ELEMENT>
<ELEMENT ID="CPUMBXN" SUB="USERBUTTON_URL" TYPE="READONLY" LOAD="URL::USERBUTTON_URL" RAW="1"></ELEMENT>
<ELEMENT ID="CPUMBXO" SUB="CLOSED_URL" TYPE="READONLY" LOAD="URL::CLOSED_URL" RAW="1"></ELEMENT>
<ELEMENT ID="CPUMBXP" SUB="FASTORDER_URL" TYPE="READONLY" LOAD="URL::FASTORDER_URL" RAW="1"></ELEMENT>
<ELEMENT ID="CPUMBXQ" SUB="MAIL_FORM_URL" TYPE="READONLY" LOAD="URL::MAIL_FORM_URL" RAW="1"></ELEMENT>
<ELEMENT ID="CPUMBXR" SUB="GRAPHICS_URL" TYPE="READONLY" LOAD="URL::GRAPHICS_URL" RAW="1"></ELEMENT>
<ELEMENT ID="CPUMBXS" SUB="IMAGE_URL" TYPE="READONLY" LOAD="URL::IMAGE_URL" RAW="1"></ELEMENT>
<ELEMENT ID="CPUMBXT" SUB="CONTACTUS_URL" TYPE="READONLY" LOAD="URL::CONTACTUS_URL" RAW="1"></ELEMENT>
<ELEMENT ID="CPUMBXU" SUB="DYNAMIC_URL" TYPE="READONLY" LOAD="URL::DYNAMIC_URL" RAW="1"></ELEMENT>
<ELEMENT ID="CPUMBXV" SUB="NONSECURE_URL" TYPE="READONLY" LOAD="URL::NONSECURE_URL" RAW="1"></ELEMENT>
<ELEMENT ID="CPUMBXW" SUB="CONTACT_US_URL" TYPE="READONLY" LOAD="URL::CONTACT_US_URL" RAW="1"></ELEMENT>
<ELEMENT ID="CPUMBXX" SUB="SEARCH_URL" TYPE="READONLY" LOAD="URL::SEARCH_URL" RAW="1"></ELEMENT>
<ELEMENT ID="CPUMBXY" SUB="ABOUTUS_URL" TYPE="READONLY" LOAD="URL::ABOUTUS_URL" RAW="1"></ELEMENT>
<ELEMENT ID="CPUMBXZ" SUB="CUSTOMER_MAIN_URL" TYPE="READONLY" LOAD="URL::CUSTOMER_MAIN_URL" RAW="1"></ELEMENT>
<ELEMENT ID="CPUMBYA" SUB="MERCHANT_LOGIN_URL" TYPE="READONLY" LOAD="URL::MERCHANT_LOGIN_URL" RAW="1"></ELEMENT>
<ELEMENT ID="CPUMBYB" SUB="CATEGORY_URL" TYPE="READONLY" LOAD="URL::CATEGORY_URL" RAW="1"></ELEMENT>
<ELEMENT ID="CPUMBYC" SUB="ADULT_URL" TYPE="READONLY" LOAD="URL::ADULT_URL" RAW="1"></ELEMENT>
<ELEMENT ID="CPUMBYD" SUB="CLAIM_URL" TYPE="READONLY" LOAD="URL::CLAIM_URL" RAW="1"></ELEMENT>
<ELEMENT ID="CPUMBYE" SUB="CLAIM_MULTI_URL" TYPE="READONLY" LOAD="URL::CLAIM_MULTI_URL" RAW="1"></ELEMENT>
<ELEMENT ID="CPUMBYF" SUB="ABOUT_US_URL" TYPE="READONLY" LOAD="URL::ABOUT_US_URL" RAW="1"></ELEMENT>
<ELEMENT ID="CPUMBYG" SUB="RESULTS_URL" TYPE="READONLY" LOAD="URL::RESULTS_URL" RAW="1"></ELEMENT>
<ELEMENT ID="CPUMBYH" SUB="PRODUCT_URL" TYPE="READONLY" LOAD="URL::PRODUCT_URL" RAW="1"></ELEMENT>
<ELEMENT ID="CPUMBYI" SUB="CONTINUE_URL" TYPE="READONLY" LOAD="URL::CONTINUE_URL" RAW="1"></ELEMENT>
<ELEMENT ID="CPUMBYJ" SUB="REDIR_URL" TYPE="READONLY" LOAD="URL::REDIR_URL" RAW="1"></ELEMENT>
<ELEMENT ID="CPUMBYK" SUB="KILL_COOKIES_URL" TYPE="READONLY" LOAD="URL::KILL_COOKIES_URL" RAW="1"></ELEMENT>
<ELEMENT ID="CPUMBYL" SUB="LOGIN_URL" TYPE="READONLY" LOAD="URL::LOGIN_URL" RAW="1"></ELEMENT>
<ELEMENT ID="CPUMBYM" SUB="CHECKOUT_URL" TYPE="READONLY" LOAD="URL::CHECKOUT_URL" RAW="1"></ELEMENT>
<ELEMENT ID="CPUMBYN" SUB="ORDER_STATUS_URL" TYPE="READONLY" LOAD="URL::ORDER_STATUS_URL" RAW="1"></ELEMENT>
<ELEMENT ID="CPUMBYO" SUB="NO_COOKIES_URL" TYPE="READONLY" LOAD="URL::NO_COOKIES_URL" RAW="1"></ELEMENT>
<ELEMENT ID="CPUMBYP" SUB="PAYPAL_URL" TYPE="READONLY" LOAD="URL::PAYPAL_URL" RAW="1"></ELEMENT>
<ELEMENT ID="CPUMBYQ" SUB="CANCEL_ORDER_URL" TYPE="READONLY" LOAD="URL::CANCEL_ORDER_URL" RAW="1"></ELEMENT>
<ELEMENT ID="CPUMBYR" SUB="MAIL_CONFIG_URL" TYPE="READONLY" LOAD="URL::MAIL_CONFIG_URL" RAW="1"></ELEMENT>
<ELEMENT ID="CPUMBYS" SUB="DISABLED_URL" TYPE="READONLY" LOAD="URL::DISABLED_URL" RAW="1"></ELEMENT>
<ELEMENT ID="CPUMBYT" TYPE="OUTPUT"><![CDATA[<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
]]>
</ELEMENT>
<ELEMENT ID="CPUMBYU" COLORS="128" TYPE="CONFIG" CATEGORIES="32768" TITLE="Popup - Blue" CREATED="0" PROPERTIES="0" OCREATED="20030520" SUBTYPE="P"><CSS><![CDATA[.zbody {  background-color: #FFFFFF; }
.zborder {  border: 1px solid #CCCCCC; }
.zbox {  border: 1px solid #CCCCCC; }
.zbox_body {  background-color: #FFFFFF; color: #000000; font-family: Arial, Helvetica; font-size: 11pt; }
.zbox_head {  background-color: #CCCCCC; color: #000000; font-family: Arial, Helvetica; font-size: 11pt; }
.zcolor {  background-color: #cccccc; color: #000000; }
.zcolor_contrast {  background-color: #4c4c4c; color: #7f7f7f; }
.zcolor_dark {  background-color: #8c8c8c; color: #000000; }
.zcolor_light {  background-color: #ffffff; color: #404040; }
.zform_button {  background-color: #ffffff; border: 1px solid #8c8c8c; color: #8c8c8c; font-family: Arial, Helvetica; font-size: 8pt; }
.zform_select {  background-color: #FFFFFF; border: 1px solid #8c8c8c; color: #000000; font-family: Arial, Helvetica; font-size: 8pt; }
.zform_textarea {  background-color: #FFFFFF; border: 1px solid #8c8c8c; color: #000000; font-family: Arial, Helvetica; font-size: 8pt; }
.zform_textbox {  background-color: #FFFFFF; border: 1px solid #8c8c8c; color: #000000; font-family: Arial, Helvetica; font-size: 8pt; }
.zhint {  color: #000000; font-family: Arial, Helvetica; font-size: 8pt; }
.zlink {  color: #000066; }
.zsmall {  color: #000000; font-family: Arial, Helvetica; font-size: 8pt; }
.ztab0 {  background-color: #ffffff; color: #404040; font-family: Arial, Helvetica; font-size: 9pt; }
.ztab1 {  background-color: #FFFFFF; color: #000000; font-family: Arial, Helvetica; font-size: 9pt; font-weight: bold; }
.ztabbody {  background-color: #CCCCCC; color: #000000; font-family: Arial, Helvetica; font-size: 8pt; }
.ztable_head {  background-color: #CCCCCC; color: #000000; font-family: Arial, Helvetica; font-size: 11pt; }
.ztable_row {  color: #000000; font-family: Arial, Helvetica; font-size: 11pt; }
.ztable_row0 {  background-color: #FFFFFF; color: #000000; font-family: Arial, Helvetica; font-size: 11pt; }
.ztable_row1 {  background-color: #EEEEEE; color: #000000; font-family: Arial, Helvetica; font-size: 11pt; }
.ztable_row_small {  color: #000000; font-family: Arial, Helvetica; font-size: 8pt; }
.ztable_row_title {  color: #000000; font-family: Arial, Helvetica; font-size: 13pt; font-weight: bold; }
.ztitle {  color: #000000; font-family: Arial, Helvetica; font-size: 12pt; font-weight: bold; }
.ztitle2 {  color: #000000; font-family: Arial, Helvetica; font-size: 11pt; font-weight: bold; }
.ztxt {  color: #000000; font-family: Arial, Helvetica; font-size: 11pt; }
.zwarn {  color: #FF0000; font-weight: bold; }
]]></CSS>
<THEME><![CDATA[alert_color=FF0000&content_background_color=FFFFFF&content_font_face=Arial%2c+Helvetica&content_font_size=3&content_text_color=000000&disclaimer_background_color=FFFFFF&disclaimer_font_face=Arial%2c+Helvetica&disclaimer_font_size=1&disclaimer_text_color=000000&link_active_text_color=000066&link_text_color=000066&link_visited_text_color=000066&name=&pretty_name=&table_heading_background_color=CCCCCC&table_heading_font_face=Arial%2c+Helvetica&table_heading_font_size=3&table_heading_text_color=000000&table_listing_background_color=FFFFFF&table_listing_background_color_alternate=EEEEEE&table_listing_font_face=Arial%2c+Helvetica&table_listing_font_size=3&table_listing_text_color=000000]]></THEME>
<THEME_OLD><![CDATA[disclaimer_text_color=000000&content_font_face=Arial%2c+Helvetica&table_listing_background_color_alternate=EEEEEE&table_heading_text_color=000000&pretty_name=Default&link_visited_text_color=000000&content_background_color=FFFFFF&table_heading_background_color=CCCCCC&link_text_color=000066&link_active_text_color=000033&table_listing_font_face=Arial%2c+Helvetica&content_text_color=000000&content_font_size=3&disclaimer_font_face=Arial%2c+Helvetica&name=default&table_listing_background_color=FFFFFF&disclaimer_background_color=999999&alert_color=FF0000&disclaimer_font_size=1&table_listing_text_color=000000&table_heading_font_face=Arial%2c+Helvetica&table_heading_font_size=3&table_listing_font_size=3]]></THEME_OLD>
<SITEBUTTONS><![CDATA[forward=l2_corporateblu|gif|53|24&add_to_cart=l2_corporateblu|gif|71|24&back=l2_corporateblu|gif|56|24&default=l2_corporateblu|gif|68|24&add_to_site=l2_corporateblu|gif|122|32&checkout=l2_corporateblu|gif|60|24&continue_shopping=l2_corporateblu|gif|114|24&update_cart=l2_corporateblu|gif|74|24&cancel=l2_corporateblu|gif|47|24]]></SITEBUTTONS>
</ELEMENT>
<ELEMENT ID="CPUMBYV" TYPE="OUTPUT"><![CDATA[

]]>
</ELEMENT>
<ELEMENT ID="CPUMBYW" TYPE="HEAD"></ELEMENT>
<ELEMENT ID="CPUMBYX" TYPE="OUTPUT"><![CDATA[

		]]>
</ELEMENT>
<ELEMENT HEIGHT="65" ID="CPUMBYY" WIDTH="220" TYPE="LOGO" BGCOLOR="FFFFFF"></ELEMENT>
<ELEMENT ID="CPUMBYZ" TYPE="OUTPUT"><![CDATA[

 ]]>
</ELEMENT>
<ELEMENT ID="CPUMBZA" TYPE="TITLE"></ELEMENT>
<ELEMENT ID="CPUMBZB" TYPE="OUTPUT"><![CDATA[

]]>
</ELEMENT>
<ELEMENT ID="CPUMBZC" TYPE="BODY"></ELEMENT>
<ELEMENT ID="CPUMBZD" TYPE="OUTPUT"><![CDATA[

]]>
</ELEMENT>

</TEMPLATE>


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"/>
<meta name="generator" content="Doxygen 1.8.6"/>
<title>OpenNI 1.5.8: xn::ModuleCodec Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>

<link href="doxygen.css" rel="stylesheet" type="text/css" />

OpenNI 1.5.8

Main Page

Related Pages

Modules

Namespaces

Classes

Files

Class List

Class Index

Class Hierarchy

Class Members

xn

ModuleCodec

Public Member Functions |
List of all members

xn::ModuleCodec Class Referenceabstract

#include <XnModuleCppInterface.h>

Inheritance diagram for xn::ModuleCodec:

<map name="xn_1_1_module_codec_inherit__map" id="xn_1_1_module_codec_inherit__map">
<area shape="rect" id="node2" href="classxn_1_1_module_production_node.html" title="xn::ModuleProductionNode" alt="" coords="5,5,179,32"/></map>
[legend]

Public Member Functions

virtual 	~ModuleCodec ()

virtual XnCodecID 	GetCodecID () const =0

virtual XnStatus 	Init (const ProductionNode &node)=0

virtual XnStatus 	CompressData (const void *pSrc, XnUInt32 nSrcSize, void *pDst, XnUInt32 nDstSize, XnUInt *pnBytesWritten) const =0

virtual XnStatus 	DecompressData (const void *pSrc, XnUInt32 nSrcSize, void *pDst, XnUInt32 nDstSize, XnUInt *pnBytesWritten) const =0

 Public Member Functions inherited from xn::ModuleProductionNode

virtual 	~ModuleProductionNode ()

virtual XnBool 	IsCapabilitySupported (const XnChar *)

virtual XnStatus 	SetIntProperty (const XnChar *, XnUInt64)

virtual XnStatus 	SetRealProperty (const XnChar *, XnDouble)

virtual XnStatus 	SetStringProperty (const XnChar *, const XnChar *)

virtual XnStatus 	SetGeneralProperty (const XnChar *, XnUInt32, const void *)

virtual XnStatus 	GetIntProperty (const XnChar *, XnUInt64 &) const

virtual XnStatus 	GetRealProperty (const XnChar *, XnDouble &) const

virtual XnStatus 	GetStringProperty (const XnChar *, XnChar *, XnUInt32) const

virtual XnStatus 	GetGeneralProperty (const XnChar *, XnUInt32, void *) const

virtual

ModuleExtendedSerializationInterface * 	GetExtendedSerializationInterface ()

virtual ModuleLockAwareInterface * 	GetLockAwareInterface ()

virtual ModuleErrorStateInterface * 	GetErrorStateInterface ()

virtual ModuleGeneralIntInterface * 	GetGeneralIntInterface (const XnChar *)

Constructor & Destructor Documentation

          virtual xn::ModuleCodec::~ModuleCodec
          (
          	)

inlinevirtual

Member Function Documentation

          virtual XnStatus xn::ModuleCodec::CompressData
          (
          const void *
          pSrc,

          XnUInt32
          nSrcSize,

          void *
          pDst,

          XnUInt32
          nDstSize,

          XnUInt *
          pnBytesWritten

          )
          	 const

pure virtual

          virtual XnStatus xn::ModuleCodec::DecompressData
          (
          const void *
          pSrc,

          XnUInt32
          nSrcSize,

          void *
          pDst,

          XnUInt32
          nDstSize,

          XnUInt *
          pnBytesWritten

          )
          	 const

pure virtual

          virtual XnCodecID xn::ModuleCodec::GetCodecID
          (
          	)
           const

pure virtual

          virtual XnStatus xn::ModuleCodec::Init
          (
          const ProductionNode &
          node	)

pure virtual

The documentation for this class was generated from the following file:

XnModuleCppInterface.h

<address class="footer">
Generated on Thu Jun 11 2015 12:31:40 for OpenNI 1.5.8 by

 1.8.6
</address>


text:
layout: post
title: New Challenge Page
---
<!-- preview_img -->
The new Page for the Swiss Cyber Storm 2015 Conference is online!

Stay tuned for more information about this years conference and watch out for news about the European Cyber Security Challenge final which is co-located with it!

This page is proudly generated with [Jekyll](http://jekyllrb.com/) and
[rochandra's Type Theme](https://github.com/rohanchandra/type-theme/).


text:
'use strict';

const fs = require('fs-extra');
const path = require('path');

/**
 * A collection of icons built up from a source directory of .svg assets
 * @typedef {Map<string, Icon>} Registry
 */

/**
 * An icon is defined by a unique name in "<name>.svg" that can have an optional
 * namespace and has multiple assets that detail the assets available in a
 * source directory of .svg assets
 * @typedef {object} Icon
 * @property {string} id
 * @property {Array<string>} namespace
 * @property {Array<Asset>} assets
 */

/**
 * An asset for an icon that details its size and filepath information
 * @typedef {object} Asset
 * @property {(number|('glyph'))} size
 * @property {string} filepath
 */

/**
 * Create a registry of icons from the assets found within the given directory
 * @param {string} directory
 * @returns {Registry}
 */
async function create(directory) {
  const registry = new Map();
  const queue = await getFilepathsFromDirectory(directory);

  // Our queue is built up with filepaths that we need to process. Each
  // filepath can either be a directory or an asset corresponding to an icon.
  while (queue.length > 0) {
    const filepath = queue.shift();
    const stats = await fs.stat(filepath);

    // If we encounter a directory, then we append all of the filepaths we've
    // found to the queue to be processed
    if (await stats.isDirectory()) {
      const filepaths = await getFilepathsFromDirectory(filepath);
      queue.push(...filepaths);
      continue;
    }

    // When we have an asset for an icon, we need to build up information about
    // it and correctly assign, or update, the entry for this icon in the
    // registry.

    // We want to build up an array of the relative path from the SVG folder to
    // the asset that we've found. This relative path may contain size or
    // namespace information.
    const directories = path
      .relative(directory, path.dirname(filepath))
      .split(path.sep)
      .filter(Boolean);

    // Our namespace is generated from every directory that is not a size
    const namespace = directories.filter((directory) => isNaN(directory));
    const asset = {
      id: path.basename(filepath, '.svg'),
      filepath,
      namespace,
    };

    // Our size folder is generated from the first directory that is a number
    const sizeFolderName = directories.find((directory) => !isNaN(directory));
    if (sizeFolderName) {
      asset.size = parseInt(sizeFolderName, 10);
    } else {
      asset.size = 'glyph';
    }

    if (!registry.has(asset.id)) {
      registry.set(asset.id, {
        id: asset.id,
        namespace: asset.namespace,
        assets: [],
      });
    }

    const entry = registry.get(asset.id);

    // We have an invariant that all icons in a source SVG folder must have a
    // unique name even if they are under different namespaces.
    if (hash(entry.id, entry.namespace) !== hash(asset.id, asset.namespace)) {
      const expected = entry.namespace.join(', ');
      const actual = asset.namespace.join(', ');
      throw new Error(
        `Found namespace mismatch with asset ${asset.id}. Expected ` +
          `[${expected}] but received [${actual}]. This likely means that ` +
          `there is a duplicate asset in the source SVG folder`
      );
    }

    entry.assets.push({
      filepath: asset.filepath,
      size: asset.size,
    });
  }

  return registry;
}

/**
 * Generate a hash with the basename and namespace of an asset to compare if two
 * assets in the registry are equivalent
 * @param {string} basename
 * @param {Array<string>} [namespace]
 * @returns {string}
 */
function hash(basename, namespace = []) {
  return [...namespace, basename].join('/');
}

const denylist = new Set(['.DS_Store']);

/**
 * Get all the filepaths from the given directory that are not contained in a
 * denylist.
 * @param {string} directory
 * @returns {Array<string>}
 */
async function getFilepathsFromDirectory(directory) {
  const files = await fs.readdir(directory);
  return files
    .filter((name) => {
      return !denylist.has(name);
    })
    .map((filename) => {
      return path.join(directory, filename);
    });
}

module.exports = {
  create,
};


text:
package eu.ydp.empiria.player.client.controller.flow;

import com.google.inject.Inject;
import com.google.inject.Singleton;
import eu.ydp.empiria.player.client.controller.communication.*;
import eu.ydp.empiria.player.client.controller.flow.processing.commands.FlowCommandsListener;
import eu.ydp.empiria.player.client.controller.flow.processing.events.ActivityProcessingEvent;
import eu.ydp.empiria.player.client.controller.flow.processing.events.FlowProcessingEvent;
import eu.ydp.empiria.player.client.controller.flow.processing.events.FlowProcessingEventType;
import eu.ydp.empiria.player.client.gin.factory.PageScopeFactory;
import eu.ydp.empiria.player.client.module.containers.group.GroupIdentifier;
import eu.ydp.empiria.player.client.util.config.OptionsReader;
import eu.ydp.empiria.player.client.util.events.external.ExternalEventDispatcher;
import eu.ydp.empiria.player.client.util.events.external.PageChangedEvent;
import eu.ydp.empiria.player.client.util.events.internal.bus.EventsBus;
import eu.ydp.empiria.player.client.util.events.internal.page.PageEvent;
import eu.ydp.empiria.player.client.util.events.internal.page.PageEventTypes;
import eu.ydp.empiria.player.client.util.events.internal.player.PlayerEvent;
import eu.ydp.empiria.player.client.util.events.internal.player.PlayerEventHandler;
import eu.ydp.empiria.player.client.util.events.internal.player.PlayerEventTypes;

@Singleton
public class MainFlowProcessor implements FlowCommandsListener, FlowDataSupplier, PlayerEventHandler {

    @Inject
    public MainFlowProcessor(EventsBus eventsBus, ExternalEventDispatcher externalEventDispatcher, PageScopeFactory pageScopeFactory) {
        this.eventsBus = eventsBus;
        this.externalEventDispatcher = externalEventDispatcher;
        this.pageScopeFactory = pageScopeFactory;
        // flowExecutionEventsListener = feel;
        flowOptions = OptionsReader.getFlowOptions();
        displayOptions = new DisplayOptions();
        isCheck = false;
        isShowAnswers = false;
        isInitalized = false;
    }

    // private final FlowProcessingEventsListener flowExecutionEventsListener;
    // // NOPMD
    private ItemParametersSocket itemParametersSocket; // NOPMD
    private final EventsBus eventsBus;
    private final ExternalEventDispatcher externalEventDispatcher;
    private final PageScopeFactory pageScopeFactory;
    private int currentPageIndex;
    private PageType currentPageType;
    private int itemsCount;
    private FlowOptions flowOptions;
    private DisplayOptions displayOptions;
    private boolean isCheck;
    private boolean isShowAnswers;
    private boolean isLock;
    private boolean isInitalized;

    public void init(int _itemsCount) {
        eventsBus.addHandler(PlayerEvent.getType(PlayerEventTypes.PAGE_VIEW_LOADED), this);
        itemsCount = _itemsCount;
        currentPageIndex = 0;
        if (flowOptions.showToC) {
            currentPageType = PageType.TOC;
        } else {
            currentPageType = PageType.TEST;
        }
    }

    public void initFlow() {
        if (!isInitalized) {
            isInitalized = true;
            doFlow();
        }
    }

    public void deinitFlow() {
        isInitalized = false;
    }

    private void doFlow() {
        if (isInitalized) {
            eventsBus.fireEvent(new PlayerEvent(PlayerEventTypes.LOAD_PAGE_VIEW, currentPageIndex, this));
        }
    }

    @Override
    public void onPlayerEvent(PlayerEvent event) {
        if (event.getType() == PlayerEventTypes.PAGE_VIEW_LOADED) {
            if (isInitalized) {
                eventsBus.fireEvent(new PlayerEvent(PlayerEventTypes.PAGE_CHANGE, currentPageIndex, this));
                eventsBus.fireEvent(new PlayerEvent(PlayerEventTypes.PAGE_LOADED, new FlowProcessingEvent(FlowProcessingEventType.PAGE_LOADED), this));
                externalEventDispatcher.dispatch(new PageChangedEvent(currentPageIndex));
            }
        }
    }

    public void setFlowOptions(FlowOptions options) {
        flowOptions = options;
        if (currentPageType == PageType.TOC && !flowOptions.showToC) {
            currentPageType = PageType.TEST;
            currentPageIndex = 0;
        } else if (currentPageType == PageType.SUMMARY && !flowOptions.showSummary) {
            currentPageType = PageType.TEST;
            currentPageIndex = 0;
        }
    }

    @Override
    public FlowOptions getFlowOptions() {
        return flowOptions;
    }

    public void setDisplayOptions(DisplayOptions options) {
        displayOptions = options;
    }

    public DisplayOptions getDisplayOptions() {
        return displayOptions;
    }

    @Override
    public void gotoPage(int index) {
        if (flowOptions.itemsDisplayMode == PageItemsDisplayMode.ALL) {
            if (index == 0) {
                onPageChange();
                currentPageType = PageType.TEST;
                currentPageIndex = index;
                doFlow();
            }
        } else if (flowOptions.itemsDisplayMode == PageItemsDisplayMode.ONE) {
            if (index >= 0 && index < itemsCount) {// NOPMD
                onPageChange();
                currentPageType = PageType.TEST;
                currentPageIndex = index;
                doFlow();
            }
        }

    }

    @Override
    public void gotoSummary() {
        if (currentPageType != PageType.SUMMARY && flowOptions.showSummary) {
            onPageChange();
            flowOptions.activityMode = ActivityMode.NORMAL;
            // displayOptions.setPreviewMode(false);
            currentPageType = PageType.SUMMARY;
            currentPageIndex = 0;
            doFlow();
        }

    }

    @Override
    public void gotoToc() {
        if (currentPageType != PageType.TOC && flowOptions.showToC) {
            onPageChange();
            currentPageType = PageType.TOC;
            currentPageIndex = 0;
            doFlow();
        }

    }

    @Override
    public void gotoTest() {
        if (currentPageType != PageType.TEST && itemsCount > 0) {
            onPageChange();
            gotoPage(0);
        }
    }

    @Override
    public void nextPage() {
        if (currentPageType == PageType.TOC) {
            if (0 < itemsCount) {
                gotoPage(0);
            }
        } else if (currentPageType == PageType.TEST) {
            if (flowOptions.itemsDisplayMode == PageItemsDisplayMode.ONE) {// NOPMD
                if (currentPageIndex + 1 >= 0 && currentPageIndex + 1 < itemsCount) {// NOPMD
                    gotoPage(currentPageIndex + 1);
                }
            }
        }

    }

    @Override
    public void previousPage() {
        if (currentPageType == PageType.TEST) {
            if (flowOptions.itemsDisplayMode == PageItemsDisplayMode.ONE) {// NOPMD
                if (currentPageIndex - 1 >= 0 && currentPageIndex - 1 < itemsCount) {
                    gotoPage(currentPageIndex - 1);
                } else if (currentPageIndex == 0) {
                    gotoToc();
                }
            }
        }

    }

    @Override
    public void gotoFirstPage() {
        if (flowOptions.itemsDisplayMode == PageItemsDisplayMode.ALL) {
            if (0 < itemsCount) {// NOPMD
                gotoPage(0);
            }
        } else if (flowOptions.itemsDisplayMode == PageItemsDisplayMode.ONE) {
            if (0 < itemsCount) {// NOPMD
                gotoPage(0);
            }
        }
    }

    @Override
    public void gotoLastPage() {
        if (flowOptions.itemsDisplayMode == PageItemsDisplayMode.ALL) {
            if (0 < itemsCount) {// NOPMD
                gotoPage(0);
            }
        } else if (flowOptions.itemsDisplayMode == PageItemsDisplayMode.ONE) {
            if (itemsCount > 0) {// NOPMD
                gotoPage(itemsCount - 1);
            }
        }

    }

    @Override
    public void checkPage() {
        if (!isCheck) {
            if (isShowAnswers) {
                continuePage();
            }
            isCheck = true;
            eventsBus.fireEvent(new PageEvent(PageEventTypes.CHECK, new FlowProcessingEvent(FlowProcessingEventType.CHECK), this), pageScopeFactory.getCurrentPageScope());
        }
    }

    @Override
    public void showAnswersPage() {
        if (!isShowAnswers) {
            if (isCheck) {
                continuePage();
            }
            isShowAnswers = true;
            eventsBus.fireEvent(new PageEvent(PageEventTypes.SHOW_ANSWERS, new FlowProcessingEvent(FlowProcessingEventType.SHOW_ANSWERS), this),
                    pageScopeFactory.getCurrentPageScope());
        }

    }

    @Override
    public void continuePage() {
        if (isCheck || isShowAnswers) {
            isCheck = false;
            isShowAnswers = false;
            eventsBus
                    .fireEvent(new PageEvent(PageEventTypes.CONTINUE, new FlowProcessingEvent(FlowProcessingEventType.CONTINUE), this), pageScopeFactory.getCurrentPageScope());
        }

    }

    @Override
    public void lockPage() {
        if (!isLock) {
            isLock = true;
            eventsBus.fireEvent(new PageEvent(PageEventTypes.LOCK, new FlowProcessingEvent(FlowProcessingEventType.LOCK), this), pageScopeFactory.getCurrentPageScope());
        }
    }

    @Override
    public void unlockPage() {
        if (isLock) {
            isLock = false;
            eventsBus.fireEvent(new PageEvent(PageEventTypes.UNLOCK, new FlowProcessingEvent(FlowProcessingEventType.UNLOCK), this), pageScopeFactory.getCurrentPageScope());
        }
    }

    @Override
    public void resetPage() {
        isCheck = false;
        isShowAnswers = false;
        eventsBus.fireEvent(new PageEvent(PageEventTypes.RESET, new FlowProcessingEvent(FlowProcessingEventType.RESET), this), pageScopeFactory.getCurrentPageScope());
    }

    @Override
    public void checkGroup(GroupIdentifier groupId) {
        eventsBus.fireEvent(new PageEvent(PageEventTypes.CHECK, new ActivityProcessingEvent(FlowProcessingEventType.CHECK, groupId), this),
                pageScopeFactory.getCurrentPageScope());
    }

    @Override
    public void showAnswersGroup(GroupIdentifier groupId) {
        eventsBus.fireEvent(new PageEvent(PageEventTypes.SHOW_ANSWERS, new ActivityProcessingEvent(FlowProcessingEventType.SHOW_ANSWERS, groupId), this),
                pageScopeFactory.getCurrentPageScope());
    }

    @Override
    public void continueGroup(GroupIdentifier groupId) {
        eventsBus.fireEvent(new PageEvent(PageEventTypes.CONTINUE, new ActivityProcessingEvent(FlowProcessingEventType.CONTINUE, groupId), this),
                pageScopeFactory.getCurrentPageScope());
    }

    @Override
    public void resetGroup(GroupIdentifier groupId) {
        eventsBus.fireEvent(new PageEvent(PageEventTypes.RESET, new ActivityProcessingEvent(FlowProcessingEventType.RESET, groupId), this),
                pageScopeFactory.getCurrentPageScope());
    }

    @Override
    public void lockGroup(GroupIdentifier groupId) {
        eventsBus.fireEvent(new PageEvent(PageEventTypes.LOCK, new ActivityProcessingEvent(FlowProcessingEventType.LOCK, groupId), this),
                pageScopeFactory.getCurrentPageScope());
    }

    @Override
    public void unlockGroup(GroupIdentifier groupId) {
        eventsBus.fireEvent(new PageEvent(PageEventTypes.UNLOCK, new ActivityProcessingEvent(FlowProcessingEventType.UNLOCK, groupId), this),
                pageScopeFactory.getCurrentPageScope());
    }

    @Override
    public void previewPage(int index) {
        onPageChange();
        flowOptions.activityMode = ActivityMode.CHECK;
        gotoPage(index);
    }

    public void onPageChange() {
        eventsBus.fireEvent(new PlayerEvent(PlayerEventTypes.PAGE_UNLOADED));
        eventsBus.fireEvent(new PlayerEvent(PlayerEventTypes.PAGE_CHANGING, new FlowProcessingEvent(FlowProcessingEventType.PAGE_CHANGING), this));
        isCheck = false;
        isShowAnswers = false;
        isLock = false;
    }

    @Override
    public boolean getFlowFlagCheck() {// NOPMD
        return isCheck;
    }

    @Override
    public boolean getFlowFlagShowAnswers() {// NOPMD
        return isShowAnswers;
    }

    @Override
    public boolean getFlowFlagLock() {// NOPMD
        return isLock;
    }

    public PageReference getPageReference() {
        int[] currentPageItemsIndices = null; // NOPMD
        if (flowOptions.itemsDisplayMode == PageItemsDisplayMode.ONE) {
            currentPageItemsIndices = new int[1];
            currentPageItemsIndices[0] = currentPageIndex;
        } else if (flowOptions.itemsDisplayMode == PageItemsDisplayMode.ALL) {
            currentPageItemsIndices = new int[itemsCount];
            for (int i = 0; i < itemsCount; i++) {
                currentPageItemsIndices[i] = i;
            }
        }
        return new PageReference(currentPageType, currentPageItemsIndices, flowOptions, displayOptions);
    }

    public PageType getPageType() {
        return currentPageType;
    }

    @Override
    public ActivityMode getActivityMode() {
        return flowOptions.activityMode;
    }

    @Override
    public int getCurrentPageIndex() {
        return currentPageIndex;
    }

    @Override
    public int getPageCount() {
        return itemsCount;
    }

    @Override
    public PageType getCurrentPageType() {
        return currentPageType;
    }

    public ItemParameters getItemParamters() {
        return (itemParametersSocket == null) ? new ItemParameters() : itemParametersSocket.getItemParameters();
    }

}


text:
@implementation LJBaseModel

-(void)encodeWithCoder:(NSCoder *)aCoder{

    [self yy_modelEncodeWithCoder:aCoder];

}

-(id)initWithCoder:(NSCoder *)aDecoder{

    self = [super init];
    return [self yy_modelInitWithCoder:aDecoder];

}

-(id)copyWithZone:(NSZone *)zone{

    return [self yy_modelCopy];

}
-(NSUInteger)hash{

    return [self yy_modelHash];

}

-(BOOL)isEqual:(id)object{

    return [self yy_modelIsEqual:object];

}
//避开关键字
+ (NSDictionary *)modelCustomPropertyMapper {
    return @{@"Id" : @"id",
             @"Description" : @"description",
             };
}

@end

@implementation LSDrawModel

@end

@implementation LSPointModel

@end

@implementation LSBrushModel

@end

@implementation LSActionModel

@end

@implementation LSDrawPackage

@end

@implementation LSDrawFile

@end


text:
package org.apache.camel.component.mongodb3;

import java.util.concurrent.CountDownLatch;

import com.mongodb.CursorType;
import com.mongodb.MongoCursorNotFoundException;
import com.mongodb.client.MongoCollection;
import com.mongodb.client.MongoCursor;

import org.apache.camel.Exchange;
import org.bson.Document;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import static com.mongodb.client.model.Filters.gt;
import static org.apache.camel.component.mongodb3.MongoDbConstants.MONGO_ID;

public class MongoDbTailingProcess implements Runnable {

    private static final Logger LOG = LoggerFactory.getLogger(MongoDbTailingProcess.class);
    private static final String CAPPED_KEY = "capped";

    public volatile boolean keepRunning = true;
    public volatile boolean stopped; // = false
    private volatile CountDownLatch stoppedLatch;

    private final MongoCollection<Document> dbCol;
    private final MongoDbEndpoint endpoint;
    private final MongoDbTailableCursorConsumer consumer;

    // create local, final copies of these variables for increased performance
    private final long cursorRegenerationDelay;
    private final boolean cursorRegenerationDelayEnabled;

    private MongoCursor<Document> cursor;
    private MongoDbTailTrackingManager tailTracking;

    public MongoDbTailingProcess(MongoDbEndpoint endpoint, MongoDbTailableCursorConsumer consumer, MongoDbTailTrackingManager tailTrack) {
        this.endpoint = endpoint;
        this.consumer = consumer;
        this.dbCol = endpoint.getMongoCollection();
        this.tailTracking = tailTrack;
        this.cursorRegenerationDelay = endpoint.getCursorRegenerationDelay();
        this.cursorRegenerationDelayEnabled = !(this.cursorRegenerationDelay == 0);
    }

    public MongoCursor<Document> getCursor() {
        return cursor;
    }

    /**
     * Initialise the tailing process, the cursor and if persistent tail
     * tracking is enabled, recover the cursor from the persisted point. As part
     * of the initialisation process, the component will validate that the
     * collection we are targeting is 'capped'.
     *
     * @throws Exception
     */
    public void initializeProcess() throws Exception {
        if (LOG.isInfoEnabled()) {
            LOG.info("Starting MongoDB Tailable Cursor consumer, binding to collection: {}", "db: " + endpoint.getMongoDatabase() + ", col: " + endpoint.getCollection());
        }

        if (!isCollectionCapped()) {
            throw new CamelMongoDbException("Tailable cursors are only compatible with capped collections, and collection " + endpoint.getCollection() + " is not capped");
        }
        try {
            // recover the last value from the store if it exists
            tailTracking.recoverFromStore();
            cursor = initializeCursor();
        } catch (Exception e) {
            throw new CamelMongoDbException("Exception occurred while initializing tailable cursor", e);
        }

        if (cursor == null) {
            throw new CamelMongoDbException("Tailable cursor was not initialized, or cursor returned is dead on arrival");
        }

    }

    private Boolean isCollectionCapped() {
        return endpoint.getMongoDatabase().runCommand(createCollStatsCommand()).getBoolean(CAPPED_KEY);
    }

    private Document createCollStatsCommand() {
        return new Document("collStats", endpoint.getCollection());
    }

    /**
     * The heart of the tailing process.
     */
    @Override
    public void run() {
        stoppedLatch = new CountDownLatch(1);
        while (keepRunning) {
            doRun();
            // if the previous call didn't return because we have stopped
            // running, then regenerate the cursor
            if (keepRunning) {
                cursor.close();
                if (LOG.isDebugEnabled()) {
                    LOG.debug("Regenerating cursor with lastVal: {}, waiting {}ms first", tailTracking.lastVal, cursorRegenerationDelay);
                }

                if (cursorRegenerationDelayEnabled) {
                    try {
                        Thread.sleep(cursorRegenerationDelay);
                    } catch (InterruptedException e) {
                        // ignore
                    }
                }

                cursor = initializeCursor();
            }
        }

        stopped = true;
        stoppedLatch.countDown();
    }

    protected void stop() throws Exception {
        if (LOG.isInfoEnabled()) {
            LOG.info("Stopping MongoDB Tailable Cursor consumer, bound to collection: {}", "db: " + endpoint.getDatabase() + ", col: " + endpoint.getCollection());
        }
        keepRunning = false;
        // close the cursor if it's open, so if it is blocked on hasNext() it
        // will return immediately
        if (cursor != null) {
            cursor.close();
        }
        awaitStopped();
        if (LOG.isInfoEnabled()) {
            LOG.info("Stopped MongoDB Tailable Cursor consumer, bound to collection: {}", "db: " + endpoint.getDatabase() + ", col: " + endpoint.getCollection());
        }
    }

    /**
     * The heart of the tailing process.
     */
    private void doRun() {
        // while the cursor has more values, keepRunning is true and the
        // cursorId is not 0, which symbolizes that the cursor is dead
        try {
            while (cursor.hasNext() && keepRunning) { // cursor.getCursorId() !=
                                                      // 0 &&
                Document dbObj = cursor.next();
                Exchange exchange = endpoint.createMongoDbExchange(dbObj);
                try {
                    if (LOG.isTraceEnabled()) {
                        LOG.trace("Sending exchange: {}, ObjectId: {}", exchange, dbObj.get(MONGO_ID));
                    }
                    consumer.getProcessor().process(exchange);
                } catch (Exception e) {
                    // do nothing
                }
                tailTracking.setLastVal(dbObj);
            }
        } catch (MongoCursorNotFoundException e) {
            // we only log the warning if we are not stopping, otherwise it is
            // expected because the stop() method kills the cursor just in case
            // it is blocked
            // waiting for more data to arrive
            if (keepRunning) {
                LOG.debug("Cursor not found exception from MongoDB, will regenerate cursor. This is normal behaviour with tailable cursors.", e);
            }
        }

        // the loop finished, persist the lastValue just in case we are shutting
        // down
        // TODO: perhaps add a functionality to persist every N records
        tailTracking.persistToStore();
    }

    // no arguments, will ask DB what the last updated Id was (checking
    // persistent storage)
    private MongoCursor<Document> initializeCursor() {
        Object lastVal = tailTracking.lastVal;
        // lastVal can be null if we are initializing and there is no
        // persistence enabled
        MongoCursor<Document> answer;
        if (lastVal == null) {
            answer = dbCol.find().cursorType(CursorType.TailableAwait).iterator();
        } else {
            try (MongoCursor<Document> iterator = dbCol.find(gt(tailTracking.getIncreasingFieldName(), lastVal)).cursorType(CursorType.TailableAwait).iterator();) {
                answer = iterator;
            }
        }
        return answer;
    }

    private void awaitStopped() throws InterruptedException {
        if (!stopped) {
            LOG.info("Going to wait for stopping");
            stoppedLatch.await();
        }
    }

}


text:
[![travis](https://travis-ci.org/svroat/baiji.png)](https://travis-ci.org/svroat/baiji)

## Installation

1. Download dependencies(if neccesary)
> $ doas pkg_add curl libxml2

2. Compile
> $ make && make test

## Usage
\- Simple search \-
> $ ./baiji "git"

\- Search on Piratebay \-
> $ ./baiji -e ptb "Bitcoin for dummies"

\- Print list of engines supported (shortcuts) \-
> $ ./baiji -l

\- Search on Bing (3 pages) \-
> $ ./baiji -e bng -n "Theo de Raadt"


text:
#ifndef __CONFIGS_MOTEINO_MEGA_SRC_MOTEINO_MEGA_H
#define __CONFIGS_MOTEINO_MEGA_SRC_MOTEINO_MEGA_H

/****************************************************************************
 * Included Files
 ****************************************************************************/

#include <nuttx/config.h>

/****************************************************************************
 * Pre-Processor Definitions
 ****************************************************************************/
/* Configuration ************************************************************/

/****************************************************************************
 * Public Types
 ****************************************************************************/

#ifndef __ASSEMBLY__

/****************************************************************************
 * Inline Functions
 ****************************************************************************/

/****************************************************************************
 * Public Function Prototypes
 ****************************************************************************/

#ifdef __cplusplus
#define EXTERN extern "C"
extern "C"
{
#else
#define EXTERN extern
#endif

/************************************************************************************
 * Name: atmega_spiinitialize
 *
 * Description:
 *   Called to configure SPI chip select GPIO pins for the Amber Web Server.
 *
 ************************************************************************************/

#if defined(CONFIG_AVR_SPI1) || defined(CONFIG_AVR_SPI2)
void weak_function atmega_spiinitialize(void);
#endif

/************************************************************************************
 * Name: atmega_ledinit
 *
 * Description:
 *   Configure on-board LEDs if LED support has been selected.
 *
 ************************************************************************************/

#ifdef CONFIG_ARCH_LEDS
void atmega_ledinit(void);
#endif

#undef EXTERN
#ifdef __cplusplus
}
#endif

#endif /* __ASSEMBLY__ */
#endif /* __CONFIGS_MOTEINO_MEGA_SRC_MOTEINO_MEGA_H */


text:
import TaskQueue = require('task-worklet');

interface Fetcher {
  name: 'fetch';
  (input: RequestInfo, init?: RequestInit): Promise<Response>;
}

const unsafe = new TaskQueue();                                       // $ExpectType TaskQueue
const withEmptyOptions = new TaskQueue({});                           // $ExpectType TaskQueue
const withValidOptions = new TaskQueue({ size: 2 });                  // $ExpectType TaskQueue

const queue = new TaskQueue();                                        // $ExpectType TaskQueue
queue.addModule('/fetcher-worklet.js');                               // $ExpectType Promise<void>
const task = queue.postTask('fetch', 'https://example.com');          // $ExpectType Task

async () => {
  await task.result.then(result => {
    result;                                                           // $ExpectType any
  });
  const id = task.id;                                                 // $ExpectType number
  const state = task.state;                                           // $ExpectType State
};

new TaskQueue({ size: 1, excessProperty: true });                     // $ExpectError
queue.postTask<Fetcher>('incorrect-task-name');                       // $ExpectError


text:
<?php

namespace Hubzero\Plugin;

use Hubzero\Events\Dispatcher;
use Hubzero\Events\DispatcherInterface;
use Hubzero\Events\LoaderInterface;
use Hubzero\Config\Registry;
use Exception;
use stdClass;
use User;
use Lang;
use App;

/**
 * Plugin loader
 *
 * Inspired, in part, by Joomla's JPluginHelper class
 */
class Loader implements LoaderInterface
{
	/**
	 * A persistent cache of the loaded plugins.
	 *
	 * @var  array
	 */
	protected static $plugins = null;

	/**
	 * Get the event name.
	 *
	 * @return  string  The event name.
	 */
	public function getName()
	{
		return 'plugins';
	}

	/**
	 * Get the plugin data of a specific type if no specific plugin is specified
	 * otherwise only the specific plugin data is returned.
	 *
	 * @param   string  $type    The plugin type, relates to the sub-directory in the plugins directory.
	 * @param   string  $plugin  The plugin name.
	 * @return  mixed   An array of plugin data objects, or a plugin data object.
	 */
	public function loadListeners($type)
	{
		$results = array();
		$plugins = (array) $this->byType($type);

		foreach ($plugins as $p)
		{
			if ($result = $this->init($p))
			{
				$results[] = $result;
			}
		}

		return $results;
	}

	/**
	 * Get the params for a specific plugin
	 *
	 * @param   string  $type    The plugin type, relates to the sub-directory in the plugins directory.
	 * @param   string  $plugin  The plugin name.
	 * @return  object
	 */
	public function params($type, $plugin)
	{
		$result = $this->byType($type, $plugin);

		if (!$result || empty($result))
		{
			$result = new stdClass;
			$result->params = '';
		}

		if (is_string($result->params))
		{
			$result->params = new Registry($result->params);
		}

		return $result->params;
	}

	/**
	 * Get the plugin data of a specific type if no specific plugin is specified
	 * otherwise only the specific plugin data is returned.
	 *
	 * @param   string  $type    The plugin type, relates to the sub-directory in the plugins directory.
	 * @param   string  $plugin  The plugin name.
	 * @return  mixed   An array of plugin data objects, or a plugin data object.
	 */
	public function byType($type, $plugin = null)
	{
		$result = array();

		foreach ($this->all() as $p)
		{
			// Is this the right plugin?
			if ($p->type == $type)
			{
				if ($plugin)
				{
					if ($p->name == $plugin)
					{
						$result = $p;
						break;
					}
				}
				else
				{
					$result[] = $p;
				}
			}
		}

		return $result;
	}

	/**
	 * Checks if a plugin is enabled.
	 *
	 * @param   string   $type    The plugin type, relates to the sub-directory in the plugins directory.
	 * @param   string   $plugin  The plugin name.
	 * @return  boolean
	 */
	public function isEnabled($type, $plugin = null)
	{
		$result = $this->byType($type, $plugin);

		return (!empty($result));
	}

	/**
	 * Checks if a plugin is enabled.
	 *
	 * @param   string  $type    The plugin type, relates to the sub-directory in the plugins directory.
	 * @param   string  $plugin  The plugin name.
	 * @return  string
	 */
	public function path($type, $plugin = null)
	{
		static $paths = array();

		if (!isset($paths[$type . $plugin]))
		{
			$paths[$type . $plugin] = '';

			$p = DS . 'plugins' . DS . $type . ($plugin ? DS . $plugin : '');

			foreach (array(PATH_APP, PATH_CORE) as $base)
			{
				if (is_dir($base . $p))
				{
					$paths[$type . $plugin] = $base . $p;
					break;
				}
			}
		}

		return $paths[$type . $plugin];
	}

	/**
	 * Loads all the plugin files for a particular type if no specific plugin is specified
	 * otherwise only the specific plugin is loaded.
	 *
	 * @param   string   $type        The plugin type, relates to the sub-directory in the plugins directory.
	 * @param   string   $plugin      The plugin name.
	 * @param   boolean  $autocreate  Autocreate the plugin.
	 * @param   object   $dispatcher  Optionally allows the plugin to use a different dispatcher.
	 * @return  boolean  True on success.
	 */
	public function import($type, $plugin = null, $autocreate = true, $dispatcher = null)
	{
		static $loaded = array();

		// check for the default args, if so we can optimise cheaply
		$defaults = false;
		if (is_null($plugin) && $autocreate == true && is_null($dispatcher))
		{
			$defaults = true;
		}

		if (!isset($loaded[$type]) || !$defaults)
		{
			$results = null;

			// Makes sure we have an event dispatcher
			if (!($dispatcher instanceof DispatcherInterface))
			{
				$dispatcher = App::get('dispatcher');
			}

			// Get the specified plugin(s).
			foreach ($this->all() as $plug)
			{
				if ($plug->type == $type && ($plugin === null || $plug->name == $plugin))
				{
					if ($p = $this->init($plug, $autocreate)) //, $dispatcher))
					{
						$dispatcher->addListener($p);
					}
					$results = true;
				}
			}

			// Bail out early if we're not using default args
			if (!$defaults)
			{
				return $results;
			}
			$loaded[$type] = $results;
		}

		return $loaded[$type];
	}

	/**
	 * Loads the plugin file.
	 *
	 * @param   object   $plugin  The plugin data.
	 * @return  boolean  True on success.
	 */
	protected function init(&$plugin, $autocreate = true, $dispatcher = null)
	{
		$plugin->type = preg_replace('/[^A-Z0-9_\.-]/i', '', $plugin->type);
		$plugin->name = preg_replace('/[^A-Z0-9_\.-]/i', '', $plugin->name);

		$classNameL = 'plg' . $plugin->type . $plugin->name;
		$classNameN = 'Plugins\\' . ucfirst($plugin->type) . '\\' . ucfirst($plugin->name);

		// If the class exists, the file was already loaded
		if (!class_exists($classNameL) && !class_exists($classNameN))
		{
			$path = $this->path($plugin->type, $plugin->name) . DS . $plugin->name . '.php';

			if (file_exists($path))
			{
				require_once $path;

				if ($autocreate)
				{
					foreach (array($classNameL, $classNameN) as $className)
					{
						if (!class_exists($className))
						{
							continue;
						}

						// Makes sure we have an event dispatcher
						if (!($dispatcher instanceof DispatcherInterface))
						{
							$dispatcher = new Dispatcher();
						}

						// Instantiate and register the plugin.
						return new $className($dispatcher, (array) $plugin);
					}
				}
			}
		}

		return null;
	}

	/**
	 * Loads the published plugins.
	 *
	 * @return  array  An array of published plugins
	 */
	public function all()
	{
		if (self::$plugins !== null)
		{
			return self::$plugins;
		}

		if (!App::has('cache.store') || !($cache = App::get('cache.store')))
		{
			$cache = new \Hubzero\Cache\Storage\None();
		}

		$levels = implode(',', User::getAuthorisedViewLevels());

		if (!(self::$plugins = $cache->get('com_plugins.' . $levels)))
		{
			$db = App::get('db');

			$query = $db->getQuery()
				->select('folder', 'type')
				->select('element', 'name')
				->select('protected')
				->select('params')
				->from('#__extensions')
				->where('enabled', '>=', 1)
				->whereEquals('type', 'plugin')
				->where('state', '>=', 0)
				->whereIn('access', User::getAuthorisedViewLevels())
				->order('ordering', 'asc');

			self::$plugins = $db->setQuery($query->toString())->loadObjectList();

			if ($error = $db->getErrorMsg())
			{
				throw new Exception($error, 500);
			}

			$cache->put('com_plugins.' . $levels, self::$plugins, App::get('config')->get('cachetime', 15));
		}

		return self::$plugins;
	}

	/**
	 * Loads the language file for a plugin
	 *
	 * @param   string   $extension  Plugin name
	 * @param   string   $basePath   Path to load from
	 * @return  boolean
	 */
	public function language($extension, $basePath = PATH_CORE)
	{
		return App::get('language')->load(strtolower($extension), $basePath);
	}
}


text:
package com.adobe.internal.fxg.dom.strokes;

import java.util.ArrayList;
import java.util.List;

import static com.adobe.fxg.FXGConstants.*;
import com.adobe.fxg.FXGException;
import com.adobe.fxg.dom.FXGNode;
import com.adobe.fxg.util.FXGLog;
import com.adobe.fxg.util.FXGLogger;
import com.adobe.internal.fxg.dom.DOMParserHelper;
import com.adobe.internal.fxg.dom.GradientEntryNode;
import com.adobe.internal.fxg.dom.ScalableGradientNode;
import com.adobe.internal.fxg.dom.transforms.MatrixNode;
import com.adobe.internal.fxg.dom.types.InterpolationMethod;
import com.adobe.internal.fxg.dom.types.SpreadMethod;

/**
 * The Class LinearGradientStrokeNode.
 */
public class LinearGradientStrokeNode extends AbstractStrokeNode implements ScalableGradientNode
{
    //--------------------------------------------------------------------------
    //
    // Attributes
    //
    //--------------------------------------------------------------------------

    /** The horizontal distance to translate the gradient. Default to NaN. */
    public double x = Double.NaN;

    /** The vertical distance to translate the gradient. Default to NaN. */
    public double y = Double.NaN;

    /** The horizontal distance of the unrotated gradient (that will be
     * compared to the target's width to calculate a scale ratio). */
    public double scaleX = Double.NaN;

    /** The vertical distance of the unrotated gradient (that will be
     * compared to the target's width to calculate a scale ratio). */
    private static final double scaleY = Double.NaN;

    /** The clockwise rotation angle in degrees. */
    public double rotation = 0.0;

    /** Indicate how to fill pixels outside the gradient vector.
     * Defaults to pad. */
    public SpreadMethod spreadMethod = SpreadMethod.PAD;

    /** Indicate how to interpolate between entries of the gradient.
     * Defaults to rgb. */
    public InterpolationMethod interpolationMethod = InterpolationMethod.RGB;

    private boolean translateSet;
    private boolean scaleSet;
    private boolean rotationSet;

    //--------------------------------------------------------------------------
    //
    // Children
    //
    //--------------------------------------------------------------------------

    /** A pre-calculated matrix. */
    public MatrixNode matrix;

    /** A list of gradient entry nodes. */
    public List<GradientEntryNode> entries;

    //--------------------------------------------------------------------------
    //
    // ScalableGradientNode Implementation
    //
    //--------------------------------------------------------------------------

    /**
     * {@inheritDoc}
     */
    public double getX()
    {
        return x;
    }

    /**
     * {@inheritDoc}
     */
    public double getY()
    {
        return y;
    }

    /**
     * {@inheritDoc}
     */
    public double getScaleX()
    {
         return scaleX;
    }

    /**
     * scaleY is irrelevant to linear gradient stroke. Return value as NaN.
     * @return NaN
     */
    public double getScaleY()
    {
        return scaleY;
    }

    /**
     * {@inheritDoc}
     */
    public double getRotation()
    {
        return rotation;
    }

    /**
     * {@inheritDoc}
     */
    public MatrixNode getMatrixNode()
    {
        return matrix;
    }

    /**
     * {@inheritDoc}
     */
    public boolean isLinear()
    {
        return true;
    }

    //--------------------------------------------------------------------------
    //
    // FXGNode Implementation
    //
    //--------------------------------------------------------------------------

    /**
     * Adds an FXG child node to this node. Supported child nodes:
     * <matrix>, <GradientEntry>. Cannot add a child matrix node if
     * the discreet transform properties have been set. If there have been
     * 15 child GradientEntryNode node added, this child node will be
     * ignored and a message is logged.
     *
     * @param child a FXG node
     *
     * @throws FXGException if the child is not supported by this node.
     * @see com.adobe.internal.fxg.dom.AbstractFXGNode#addChild(com.adobe.fxg.dom.FXGNode)
     */
    @Override
    public void addChild(FXGNode child)
    {
        if (child instanceof MatrixNode)
        {
            if (translateSet || scaleSet || rotationSet)
            	//Exception:Cannot supply a matrix child if transformation
                //attributes were provided.
                throw new FXGException(child.getStartLine(), child.getStartColumn(), "InvalidChildMatrixNode");

            matrix = (MatrixNode)child;
        }
        else if (child instanceof GradientEntryNode)
        {
            if (entries == null)
            {
                entries = new ArrayList<GradientEntryNode>(4);
            }
            else if (entries.size() >= GRADIENT_ENTRIES_MAX_INCLUSIVE)
            {
                //Log warning:A LinearGradientStroke cannot define more than 15
                // GradientEntry elements - extra elements ignored.
                FXGLog.getLogger().log(FXGLogger.WARN, "InvalidLinearGradientStrokeNumElements", null, getDocumentName(), startLine, startColumn);
                return;
            }

            entries.add((GradientEntryNode)child);
        }
        else
        {
            super.addChild(child);
        }
    }

    /**
     * Gets the node name.
     *
     * @return The unqualified name of a LinearGradientStroke node, without tag
     * markup.
     */
    public String getNodeName()
    {
        return FXG_LINEARGRADIENTSTROKE_ELEMENT;
    }

    /**
     * Set a attribute to this linear gradient stroke node. Delegates to the
     * parent class to process attributes that are not in the list below.
     *
Stroke attributes include:
     *

     *
x (Number): The horizontal translation of the gradient
     * transform that defines the horizontal center of the gradient.

     *
y (Number): The horizontal translation of the gradient
     * transform that defines the horizontal center of the gradient.

     *
rotation (Number): The rotation of the gradient transform.

     *
scaleX (Number): The horizontal scale of the gradient
     * transform that defines the width of the (unrotated) gradient.

     *
scaleY (Number): The vertical scale of the gradient transform
     * that defines the width of the (unrotated) gradient.

     *
spreadMethod (String): [pad, reflect, repeat]. How to choose
     * the fill of pixels outside the gradient vector. Defaults to pad.

     *
interpolationMethod (String): [rgb, linearRGB): How to
     * interpolate between entries of the gradient. Defaults to rgb.

     *

     *

     *
     * @param name - the unqualified attribute name.
     * @param value - the attribute value.
     *
     * @throws FXGException if a value is out of the valid range.
     * @see com.adobe.internal.fxg.dom.strokes.AbstractStrokeNode#setAttribute(java.lang.String, java.lang.String)
     */
    @Override
    public void setAttribute(String name, String value)
    {
        if (FXG_X_ATTRIBUTE.equals(name))
        {
            x = DOMParserHelper.parseDouble(this, value, name);
            translateSet = true;
        }
        else if (FXG_Y_ATTRIBUTE.equals(name))
        {
            y = DOMParserHelper.parseDouble(this, value, name);
            translateSet = true;
        }
        else if (FXG_ROTATION_ATTRIBUTE.equals(name))
        {
            rotation = DOMParserHelper.parseDouble(this, value, name);
            rotationSet = true;
        }
        else if (FXG_SCALEX_ATTRIBUTE.equals(name))
        {
            scaleX = DOMParserHelper.parseDouble(this, value, name);
            scaleSet = true;
        }
        else if (FXG_SPREADMETHOD_ATTRIBUTE.equals(name))
        {
            spreadMethod = DOMParserHelper.parseSpreadMethod(this, value, name, spreadMethod);
        }
        else if (FXG_INTERPOLATIONMETHOD_ATTRIBUTE.equals(name))
        {
            interpolationMethod = DOMParserHelper.parseInterpolationMethod(this, value, name, interpolationMethod);
        }
        else
        {
            super.setAttribute(name, value);
        }
    }
}


text:
// ----------------------------------------------------------------------------------
//
// Copyright Microsoft Corporation
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
// http://www.apache.org/licenses/LICENSE-2.0
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// ----------------------------------------------------------------------------------

using System;
using System.Management.Automation;
using Microsoft.WindowsAzure.Commands.ServiceManagement.Model;

namespace Microsoft.WindowsAzure.Commands.ServiceManagement.IaaS
{
    [Cmdlet(
        VerbsCommon.Set,
        AzureOSDiskConfigurationNoun,
        DefaultParameterSetName = UpdateAzureVMImageParamSet),
    OutputType(
        typeof(VirtualMachineImageDiskConfigSet))]
    public class SetAzureVMImageOSDiskConfig : PSCmdlet
    {
        protected const string AzureOSDiskConfigurationNoun = "AzureVMImageOSDiskConfig";
        protected const string UpdateAzureVMImageParamSet = "UpdateAzureVMImageParamSet";
        protected const string AddAzureVMImageParamSet = "AddAzureVMImageParamSet";
        protected const string GeneralizedStr = "Generalized";
        protected const string SpecializedStr = "Specialized";

        [Parameter(
            Position = 0,
            Mandatory = true,
            ValueFromPipeline = true,
            ValueFromPipelineByPropertyName = true,
            HelpMessage = "Disk Configuration Set")]
        [ValidateNotNullOrEmpty]
        public VirtualMachineImageDiskConfigSet DiskConfig { get; set; }

        [Parameter(
            Position = 1,
            ValueFromPipelineByPropertyName = true,
            HelpMessage = "Controls the platform caching behavior of the OS disk blob for read efficiency.")]
        [ValidateNotNullOrEmpty]
        [ValidateSet("ReadOnly", "ReadWrite", IgnoreCase = true)]
        public string HostCaching { get; set; }

        [Parameter(
            ParameterSetName = AddAzureVMImageParamSet,
            Mandatory = true,
            Position = 2,
            ValueFromPipelineByPropertyName = true,
            HelpMessage = "The media link.")]
        [ValidateNotNullOrEmpty]
        public Uri MediaLink { get; set; }

        [Parameter(
            ParameterSetName = AddAzureVMImageParamSet,
            Mandatory = true,
            Position = 3,
            ValueFromPipelineByPropertyName = true,
            HelpMessage = "The OS state.")]
        [ValidateNotNullOrEmpty]
        [ValidateSet(GeneralizedStr, SpecializedStr, IgnoreCase = true)]
        public string OSState { get; set; }

        [Parameter(
            ParameterSetName = AddAzureVMImageParamSet,
            Mandatory = true,
            Position = 4,
            ValueFromPipelineByPropertyName = true,
            HelpMessage = "The OS type.")]
        [ValidateNotNullOrEmpty]
        [ValidateSet("Windows", "Linux", IgnoreCase = true)]
        public string OS { get; set; }

        protected override void ProcessRecord()
        {
            ServiceManagementProfile.Initialize();

            if (DiskConfig.OSDiskConfiguration == null)
            {
                DiskConfig.OSDiskConfiguration = new OSDiskConfiguration();
            }

            DiskConfig.OSDiskConfiguration.HostCaching = this.HostCaching;
            DiskConfig.OSDiskConfiguration.MediaLink = this.MediaLink;
            DiskConfig.OSDiskConfiguration.OS = this.OS;
            DiskConfig.OSDiskConfiguration.OSState = this.OSState;

            WriteObject(DiskConfig);
        }
    }
}


text:
from __future__ import absolute_import

from django.contrib.auth.models import User
from django.contrib.sessions.models import Session

from .utils import wait_for

class AuthenticationTestMixin:

    login_url = "/accounts/login/"
    login_username_field = "username"
    login_password_field = "password"
    login_button = "login"

    @wait_for
    def should_be_logged_in_as(self, username):
        """ See if this user is logged in.  """
        user = User.objects.get(username=username)
        for session in Session.objects.all():
            if str(user.id) == session.get_decoded().get('_auth_user_id'):
                return True
        self.fail("User '{}' is not logged in.".format(username))

    def login(self, username, password, next_url=None):

        # grab the login page
        if next_url:
            self.get_page("{}?next={}".format(self.login_url, next_url))
        else:
            self.get_page(self.login_url)

        self.set_input(self.login_username_field, username)
        self.set_input(self.login_password_field, password)
        self.click_button(self.login_button)
        self.should_be_logged_in_as(username)

    def create_users(self):
        """ Create an admin/admin and user/user test users. """
        self.admin = User.objects.create_superuser(
            'admin', 'admin@example.com', 'admin')
        self.user = User.objects.create_user(
            'user', 'user@example.com', 'user')


text:
@import Foundation;

@interface ErrorLogger : NSObject

+(void)ERRORDEBUG: (NSString*)message;
+(NSString*)GetLogs;
+(void)CleanLogFile;

@end


text:
<?php

namespace MageTest\MagentoExtension\Page;

use SensioLabs\Behat\PageObjectExtension\PageObject\Page;

class Dashboard extends Page
{
    protected $path = '/admin/dashboard/index/key/{secretKey}/';

    public function getMainController()
    {
        // @todo get it from the path
        return 'dashboard';
    }

    public function getModuleName()
    {
        // @todo get it from the path
        return 'index';
    }
}


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

package com.azure.resourcemanager.compute.fluent.models;

import com.azure.core.annotation.Fluent;
import com.azure.resourcemanager.compute.models.ArchitectureTypes;
import com.azure.resourcemanager.compute.models.AutomaticOSUpgradeProperties;
import com.azure.resourcemanager.compute.models.DataDiskImage;
import com.azure.resourcemanager.compute.models.DisallowedConfiguration;
import com.azure.resourcemanager.compute.models.ExtendedLocation;
import com.azure.resourcemanager.compute.models.HyperVGenerationTypes;
import com.azure.resourcemanager.compute.models.OSDiskImage;
import com.azure.resourcemanager.compute.models.PurchasePlan;
import com.azure.resourcemanager.compute.models.VirtualMachineImageFeature;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.List;
import java.util.Map;

/** Describes a Virtual Machine Image. */
@Fluent
public final class VirtualMachineImageInner extends VirtualMachineImageResourceInner {
    /*
     * Describes the properties of a Virtual Machine Image.
     */
    @JsonProperty(value = "properties")
    private VirtualMachineImageProperties innerProperties;

    /** Creates an instance of VirtualMachineImageInner class. */
    public VirtualMachineImageInner() {
    }

    /**
     * Get the innerProperties property: Describes the properties of a Virtual Machine Image.
     *
     * @return the innerProperties value.
     */
    private VirtualMachineImageProperties innerProperties() {
        return this.innerProperties;
    }

    /** {@inheritDoc} */
    @Override
    public VirtualMachineImageInner withName(String name) {
        super.withName(name);
        return this;
    }

    /** {@inheritDoc} */
    @Override
    public VirtualMachineImageInner withLocation(String location) {
        super.withLocation(location);
        return this;
    }

    /** {@inheritDoc} */
    @Override
    public VirtualMachineImageInner withTags(Map<String, String> tags) {
        super.withTags(tags);
        return this;
    }

    /** {@inheritDoc} */
    @Override
    public VirtualMachineImageInner withExtendedLocation(ExtendedLocation extendedLocation) {
        super.withExtendedLocation(extendedLocation);
        return this;
    }

    /** {@inheritDoc} */
    @Override
    public VirtualMachineImageInner withId(String id) {
        super.withId(id);
        return this;
    }

    /**
     * Get the plan property: Used for establishing the purchase context of any 3rd Party artifact through MarketPlace.
     *
     * @return the plan value.
     */
    public PurchasePlan plan() {
        return this.innerProperties() == null ? null : this.innerProperties().plan();
    }

    /**
     * Set the plan property: Used for establishing the purchase context of any 3rd Party artifact through MarketPlace.
     *
     * @param plan the plan value to set.
     * @return the VirtualMachineImageInner object itself.
     */
    public VirtualMachineImageInner withPlan(PurchasePlan plan) {
        if (this.innerProperties() == null) {
            this.innerProperties = new VirtualMachineImageProperties();
        }
        this.innerProperties().withPlan(plan);
        return this;
    }

    /**
     * Get the osDiskImage property: Contains the os disk image information.
     *
     * @return the osDiskImage value.
     */
    public OSDiskImage osDiskImage() {
        return this.innerProperties() == null ? null : this.innerProperties().osDiskImage();
    }

    /**
     * Set the osDiskImage property: Contains the os disk image information.
     *
     * @param osDiskImage the osDiskImage value to set.
     * @return the VirtualMachineImageInner object itself.
     */
    public VirtualMachineImageInner withOsDiskImage(OSDiskImage osDiskImage) {
        if (this.innerProperties() == null) {
            this.innerProperties = new VirtualMachineImageProperties();
        }
        this.innerProperties().withOsDiskImage(osDiskImage);
        return this;
    }

    /**
     * Get the dataDiskImages property: The dataDiskImages property.
     *
     * @return the dataDiskImages value.
     */
    public List<DataDiskImage> dataDiskImages() {
        return this.innerProperties() == null ? null : this.innerProperties().dataDiskImages();
    }

    /**
     * Set the dataDiskImages property: The dataDiskImages property.
     *
     * @param dataDiskImages the dataDiskImages value to set.
     * @return the VirtualMachineImageInner object itself.
     */
    public VirtualMachineImageInner withDataDiskImages(List<DataDiskImage> dataDiskImages) {
        if (this.innerProperties() == null) {
            this.innerProperties = new VirtualMachineImageProperties();
        }
        this.innerProperties().withDataDiskImages(dataDiskImages);
        return this;
    }

    /**
     * Get the automaticOSUpgradeProperties property: Describes automatic OS upgrade properties on the image.
     *
     * @return the automaticOSUpgradeProperties value.
     */
    public AutomaticOSUpgradeProperties automaticOSUpgradeProperties() {
        return this.innerProperties() == null ? null : this.innerProperties().automaticOSUpgradeProperties();
    }

    /**
     * Set the automaticOSUpgradeProperties property: Describes automatic OS upgrade properties on the image.
     *
     * @param automaticOSUpgradeProperties the automaticOSUpgradeProperties value to set.
     * @return the VirtualMachineImageInner object itself.
     */
    public VirtualMachineImageInner withAutomaticOSUpgradeProperties(
        AutomaticOSUpgradeProperties automaticOSUpgradeProperties) {
        if (this.innerProperties() == null) {
            this.innerProperties = new VirtualMachineImageProperties();
        }
        this.innerProperties().withAutomaticOSUpgradeProperties(automaticOSUpgradeProperties);
        return this;
    }

    /**
     * Get the hyperVGeneration property: Specifies the HyperVGeneration Type.
     *
     * @return the hyperVGeneration value.
     */
    public HyperVGenerationTypes hyperVGeneration() {
        return this.innerProperties() == null ? null : this.innerProperties().hyperVGeneration();
    }

    /**
     * Set the hyperVGeneration property: Specifies the HyperVGeneration Type.
     *
     * @param hyperVGeneration the hyperVGeneration value to set.
     * @return the VirtualMachineImageInner object itself.
     */
    public VirtualMachineImageInner withHyperVGeneration(HyperVGenerationTypes hyperVGeneration) {
        if (this.innerProperties() == null) {
            this.innerProperties = new VirtualMachineImageProperties();
        }
        this.innerProperties().withHyperVGeneration(hyperVGeneration);
        return this;
    }

    /**
     * Get the disallowed property: Specifies disallowed configuration for the VirtualMachine created from the image.
     *
     * @return the disallowed value.
     */
    public DisallowedConfiguration disallowed() {
        return this.innerProperties() == null ? null : this.innerProperties().disallowed();
    }

    /**
     * Set the disallowed property: Specifies disallowed configuration for the VirtualMachine created from the image.
     *
     * @param disallowed the disallowed value to set.
     * @return the VirtualMachineImageInner object itself.
     */
    public VirtualMachineImageInner withDisallowed(DisallowedConfiguration disallowed) {
        if (this.innerProperties() == null) {
            this.innerProperties = new VirtualMachineImageProperties();
        }
        this.innerProperties().withDisallowed(disallowed);
        return this;
    }

    /**
     * Get the features property: The features property.
     *
     * @return the features value.
     */
    public List<VirtualMachineImageFeature> features() {
        return this.innerProperties() == null ? null : this.innerProperties().features();
    }

    /**
     * Set the features property: The features property.
     *
     * @param features the features value to set.
     * @return the VirtualMachineImageInner object itself.
     */
    public VirtualMachineImageInner withFeatures(List<VirtualMachineImageFeature> features) {
        if (this.innerProperties() == null) {
            this.innerProperties = new VirtualMachineImageProperties();
        }
        this.innerProperties().withFeatures(features);
        return this;
    }

    /**
     * Get the architecture property: Specifies the Architecture Type.
     *
     * @return the architecture value.
     */
    public ArchitectureTypes architecture() {
        return this.innerProperties() == null ? null : this.innerProperties().architecture();
    }

    /**
     * Set the architecture property: Specifies the Architecture Type.
     *
     * @param architecture the architecture value to set.
     * @return the VirtualMachineImageInner object itself.
     */
    public VirtualMachineImageInner withArchitecture(ArchitectureTypes architecture) {
        if (this.innerProperties() == null) {
            this.innerProperties = new VirtualMachineImageProperties();
        }
        this.innerProperties().withArchitecture(architecture);
        return this;
    }

    /**
     * Validates the instance.
     *
     * @throws IllegalArgumentException thrown if the instance is not valid.
     */
    @Override
    public void validate() {
        super.validate();
        if (innerProperties() != null) {
            innerProperties().validate();
        }
    }
}


text:
<?php echo Form::open(array("class"=>"form-horizontal")); ?>

	<fieldset>

                <?php echo Form::label('Name', 'name', array('class'=>'control-label')); ?>

                    <?php echo Form::input('name', Input::post('name', isset($projecttaskname) ? $projecttaskname->name : ''), array('class' => 'col-md-4 form-control', 'placeholder'=>'Name')); ?>

                <?php
                    echo Html::anchor('admin/projecttasknames', ' « All Tasks', array('class' => 'btn btn-default')) . ' ';

                    if (isset($projecttaskname))
                    {
                        echo Html::anchor('admin/projecttasknames/view/'.$projecttaskname->id, ' « View Task', array('class' => 'btn btn-default')) . ' ';
                    }

                    echo Form::submit('submit', 'Save', array('class' => 'btn btn-primary'));
                ?>

	</fieldset>
<?php echo Form::close(); ?>


text:
This is a colection of demos from DevNexus 2013 for my talk "Consuming Rest services with Android"

Slides at : <http://www.rvl.io/secondsun/restful-webservices-on-android/>


text:
<?php

namespace Api\User\Mail;

use Illuminate\Bus\Queueable;
use Illuminate\Mail\Mailable;
use Illuminate\Queue\SerializesModels;
use Illuminate\Contracts\Queue\ShouldQueue;

class DomainNew extends Mailable
{
    use Queueable, SerializesModels;

    public $user;

    /**
     * Create a new message instance.
     *
     * @return void
     */
    public function __construct($user)
    {
        $this->user = $user;
        //
    }

    /**
     * Build the message.
     *
     * @return $this
     */
    public function build()
    {
        $body = $this->markdown('emails.domain.new')
            ->subject(config('app.name') . ': ' . __('A new domain is created :domain', ['domain' => $this->user->domain->domain_name]))
            ->with([
                'user' => $this->user,
            ]);

        return $body;
    }
}


text:
<?xml version="1.0" encoding="UTF-8"?>
<api xmlns="http://ws.apache.org/ns/synapse"
     name="StockQuoteAPI"
     context="/stockquote">
   <resource methods="POST GET" uri-template="/test">
      <inSequence>
         <log level="full"/>
         <send>
            <endpoint>
               <address uri="http://localhost:9000/services/SimpleStockQuoteService"/>
            </endpoint>
         </send>
      </inSequence>
      <outSequence>
         <send/>
      </outSequence>
      <faultSequence>
         <log level="custom">
            <property name="Fault Sequence" value="fault Sequence Hit"/>
         </log>
      </faultSequence>
   </resource>
   <resource methods="POST GET" uri-template="/jsontest">
      <inSequence>
         <payloadFactory media-type="xml">
            <format>
               <m:getQuote xmlns:m="http://services.samples">
                  <m:request>
                     <m:symbol>$1</m:symbol>
                  </m:request>
               </m:getQuote>
            </format>
            <args>
               <arg evaluator="json" expression="$.symbol"/>
            </args>
         </payloadFactory>
         <header name="Action" value="urn:getQuote"/>
         <send>
            <endpoint>
               <address uri="http://localhost:9000/services/SimpleStockQuoteService"
                        format="soap11"/>
            </endpoint>
         </send>
      </inSequence>
      <outSequence>
         <send/>
      </outSequence>
      <faultSequence>
         <log level="custom">
            <property name="Fault Sequence" value="Fault Sequence Hit"/>
         </log>
      </faultSequence>
   </resource>
</api>


text:
equality
===

Demonstration of a zero-error, O(1) information complexity algorithm for equality found in Interactive Information Complexity [[Braverman11](http://eccc.hpi-web.de/report/2011/123/)].

# The Algorithm

A basic outline of the procedure is as follows:

1. Alice and Bob have private bit strings x and y, respectively.
2. A non-singular n-by-n matrix A over the finite field F_2 is randomly sampled (with public randomness).
3. For each row A_i in A:
    1. Alice sends A_i • x to Bob.
    2. If A_i • x != A_i • y, Bob returns `False`.
4. Bob returns `True`.

At termination, we have two possible outcomes:

- If A_i • x != A_i • y for any i, then x != y.
- If A_i • x == A_i • y for all i, then Ax = Ay. Further, as A is non-singular, this implies that x = y.

# Running

To run, initiate the test suite with `python equality.py`. Both known-equal strings and known-unequal strings will be tested.

Alternatively, to see the bitstrings in question, run with verbosity: `python equality.py -v`.

# Appendix

The proof of the procedure's O(1) information complexity can be found in the [linked paper](http://eccc.hpi-web.de/report/2011/123/) mentioned above.


text:
/**
 * @namespace Phaser.GameObjects.Text.Types
 */


text:
var express = require('express');
var ntlm    = require('express-ntlm');

module.exports = function create (port) {
    var app = express();

    app.use(ntlm());

    app.all('*', function (req, res) {
        res.end('
' + JSON.stringify(req.ntlm) + '
');
    });

    return app.listen(port);
};


text:
\hypertarget{structg__executor}{\section{g\-\_\-executor Struct Reference}
\label{structg__executor}\index{g\-\_\-executor@{g\-\_\-executor}}
}

The \hyperlink{structg__executor}{g\-\_\-executor} struct represents pointers to functions that are needed to operate with computation kernels of a certain type.

{\ttfamily \#include $<$Grape\-F\-S.\-h$>$}

\subsection*{Public Attributes}
\begin{DoxyCompactItemize}
\item
\hyperlink{class_grape_f_s_1_1_computation_kernel}{Grape\-F\-S\-::\-Computation\-Kernel} $\ast$($\ast$ \hyperlink{structg__executor_a0a9c5fd0a761cfd9729a5d4db4a2ea78}{create} )(\hyperlink{class_grape_f_s_1_1_directory}{Grape\-F\-S\-::\-Directory} $\ast$parent)
\item
void($\ast$ \hyperlink{structg__executor_a4c1d083a960870fd4fb9e7cc62ce7161}{destroy} )(\hyperlink{class_grape_f_s_1_1_computation_kernel}{Grape\-F\-S\-::\-Computation\-Kernel} $\ast$)
\item
void($\ast$ \hyperlink{structg__executor_a5f3d99d66926aaa02c972e4f5a297d74}{deinit} )()
\end{DoxyCompactItemize}

\subsection{Detailed Description}
The \hyperlink{structg__executor}{g\-\_\-executor} struct represents pointers to functions that are needed to operate with computation kernels of a certain type.

This struct holds pointers to {\itshape create} or {\itshape destroy} a created computation kernel. Computation kernels that have been created this way can be associated with directory nodes. Additionally, a {\itshape deinit} pointer is hold that deinitializes this executor, after this no {\itshape create} or {\itshape destroy} should be called anymore.

\subsection{Member Data Documentation}
\hypertarget{structg__executor_a0a9c5fd0a761cfd9729a5d4db4a2ea78}{\index{g\-\_\-executor@{g\-\_\-executor}!create@{create}}
\index{create@{create}!g_executor@{g\-\_\-executor}}
\subsubsection[{create}]{\setlength{\rightskip}{0pt plus 5cm}{\bf Grape\-F\-S\-::\-Computation\-Kernel}$\ast$($\ast$ g\-\_\-executor\-::create)({\bf Grape\-F\-S\-::\-Directory} $\ast$parent)}}\label{structg__executor_a0a9c5fd0a761cfd9729a5d4db4a2ea78}
\hypertarget{structg__executor_a5f3d99d66926aaa02c972e4f5a297d74}{\index{g\-\_\-executor@{g\-\_\-executor}!deinit@{deinit}}
\index{deinit@{deinit}!g_executor@{g\-\_\-executor}}
\subsubsection[{deinit}]{\setlength{\rightskip}{0pt plus 5cm}void($\ast$ g\-\_\-executor\-::deinit)()}}\label{structg__executor_a5f3d99d66926aaa02c972e4f5a297d74}
\hypertarget{structg__executor_a4c1d083a960870fd4fb9e7cc62ce7161}{\index{g\-\_\-executor@{g\-\_\-executor}!destroy@{destroy}}
\index{destroy@{destroy}!g_executor@{g\-\_\-executor}}
\subsubsection[{destroy}]{\setlength{\rightskip}{0pt plus 5cm}void($\ast$ g\-\_\-executor\-::destroy)({\bf Grape\-F\-S\-::\-Computation\-Kernel} $\ast$)}}\label{structg__executor_a4c1d083a960870fd4fb9e7cc62ce7161}

The documentation for this struct was generated from the following file\-:\begin{DoxyCompactItemize}
\item
Code/\-Grape\-F\-S/\hyperlink{_grape_f_s_8h}{Grape\-F\-S.\-h}\end{DoxyCompactItemize}


text:
from pyqrllib.pyqrllib import hstr2bin

from qrl.core.AddressState import AddressState

def parse_hexblob(blob: str) -> bytes:
    """
    Binary conversions from hexstring are handled by bytes(hstr2bin()).
    :param blob:
    :return:
    """
    return bytes(hstr2bin(blob))

def parse_qaddress(qaddress: str) -> bytes:
    """
    Converts from a Qaddress to an Address.
    qaddress: 'Q' + hexstring representation of an XMSS tree's address
    address: binary representation, the Q is ignored when transforming from qaddress.
    :param qaddress:
    :return:
    """
    try:
        qaddress = parse_hexblob(qaddress[1:])
        if not AddressState.address_is_valid(qaddress):
            raise ValueError("Invalid Addresss ", qaddress)
    except Exception as e:
        raise ValueError("Failed To Decode Address", e)

    return qaddress