text:
package com.gemstone.gemfire.cache.query.internal;

/**
 * Interface for CqEvent. Offers methods to get information from
 * CqEvent.
 *
 * @author anil
 * @since 5.5
 */

import com.gemstone.gemfire.InvalidDeltaException;
import com.gemstone.gemfire.cache.Operation;
import com.gemstone.gemfire.cache.client.internal.QueueManager;
import com.gemstone.gemfire.cache.query.CqEvent;
import com.gemstone.gemfire.cache.query.CqQuery;
import com.gemstone.gemfire.internal.cache.EventID;
import com.gemstone.gemfire.internal.i18n.LocalizedStrings;

public class CqEventImpl implements CqEvent {

  private final CqQuery cQuery;
  private final Operation baseOp;
  private final Operation queryOp;
  private final Object newValue;
  private final Object key;
  private final byte[] delta;
  private Throwable throwable = null;
  private final QueueManager qManager;
  private final EventID eventId;

  CqEventImpl(CqQuery cQuery, Operation baseOp, Operation cqOp, Object key,
      Object value, byte[] deltaVal, QueueManager qManager, EventID eventId) {
    this.cQuery = cQuery;
    this.queryOp = cqOp;
    this.baseOp = baseOp;
    this.key = key;
    this.newValue = value;
    this.delta = deltaVal;
    // Handle Exception event.
    if (this.queryOp == null) {
      setException();
    }
    this.qManager = qManager;
    this.eventId = eventId;
  }

  public CqQuery getCq() {
    return this.cQuery;
  }

  /**
   * Get the operation on the base region that triggered this event.
   */
  public Operation getBaseOperation() {
    return this.baseOp;
  }

  /**
   * Get the the operation on the query results. Supported operations include
   * update, create, and destroy.
   */
  public Operation getQueryOperation() {
    return this.queryOp;
  }

  /**
   * Get the key relating to the event.
   * @return Object key.
   */
  public Object getKey() {
    return this.key;
  }

  /**
   * Get the old value that was modified.
   * If there is no old value because this is an insert, then
   * return null.
   */
  /*
  public Object getOldValue() {
    return this.oldValue;
  }
  */

  /**
   * Get the new value of the modification.
   *  If there is no new value because this is a delete, then
   *  return null.
   */
  public Object getNewValue() {
    if (this.newValue == null && this.delta != null) {
      throw new InvalidDeltaException();
    }
    return this.newValue;
  }

  /**
   * If an error occurred, return the Throwable, otherwise return null.
   * If an error occurred, then this event will be passed to the
   * onError method of the CqListener instead of the
   * onEvent method.
   */
  public Throwable getThrowable() {
    return this.throwable;
  }

  public byte[] getDeltaValue() {
    return this.delta;
  }

  /**
   * Checks if the Cq Event is for an exception. If so constructs the
   * exception.
   */
  public void setException() {
    // Needs to be changed.
    this.throwable = new Throwable(LocalizedStrings.CqEventImpl_EXCEPTION_OCCURED_WHILE_APPLYING_QUERY_ON_A_CACHE_EVENT.toLocalizedString());
  }

  public void setException(String exceptionText) {
    this.throwable = new Throwable(exceptionText);
  }

  public QueueManager getQueueManager() {
    return this.qManager;
  }

  public EventID getEventID() {
    return this.eventId;
  }

  @Override
  public String toString() {
    StringBuffer buffer = new StringBuffer();
    buffer.append("CqEvent [").append(
     "CqName=").append(this.cQuery.getName()).append(
     "; base operation=").append(this.baseOp).append(
     "; cq operation=").append(this.queryOp).append(
     "; key=").append(this.key).append(
     "; value=").append(this.newValue).append(
     "]");
    return buffer.toString();
  }
}


text:
package org.springframework.cloud.servicebroker.model.binding;

import java.util.HashMap;
import java.util.Map;
import java.util.Objects;

/**
 * Details of a response to a request to create a new service instance binding associated with a route.
 *
 *

 * Objects of this type are constructed by the service broker application, and used to build the response to the
 * platform.
 *
 * @author Scott Frederick
 * @see Open Service Broker API
 * 		specification
 */
public class GetServiceInstanceRouteBindingResponse extends GetServiceInstanceBindingResponse {

	private final String routeServiceUrl;

	/**
	 * Construct a new {@link GetServiceInstanceRouteBindingResponse}
	 */
	public GetServiceInstanceRouteBindingResponse() {
		this(new HashMap<>(), null);
	}

	/**
	 * Construct a new {@link GetServiceInstanceRouteBindingResponse}
	 *
	 * @param parameters the parameters
	 * @param routeServiceUrl the route service URL
	 */
	public GetServiceInstanceRouteBindingResponse(Map<String, Object> parameters, String routeServiceUrl) {
		super(parameters);
		this.routeServiceUrl = routeServiceUrl;
	}

	/**
	 * Get a URL to which the platform should proxy requests for the bound route.
	 *
	 * @return the route service URL
	 */
	public String getRouteServiceUrl() {
		return this.routeServiceUrl;
	}

	/**
	 * Create a builder that provides a fluent API for constructing a {@literal GetServiceInstanceRouteBindingResponse}.
	 *
	 * @return the builder
	 */
	public static GetServiceInstanceRouteBindingResponseBuilder builder() {
		return new GetServiceInstanceRouteBindingResponseBuilder();
	}

	@Override
	public final boolean equals(Object o) {
		if (this == o) {
			return true;
		}
		if (!(o instanceof GetServiceInstanceRouteBindingResponse)) {
			return false;
		}
		if (!super.equals(o)) {
			return false;
		}
		GetServiceInstanceRouteBindingResponse that = (GetServiceInstanceRouteBindingResponse) o;
		return Objects.equals(routeServiceUrl, that.routeServiceUrl);
	}

	@Override
	public final boolean canEqual(Object other) {
		return other instanceof GetServiceInstanceRouteBindingResponse;
	}

	@Override
	public final int hashCode() {
		return Objects.hash(super.hashCode(), routeServiceUrl);
	}

	@Override
	public String toString() {
		return super.toString() +
				"GetServiceInstanceRouteBindingResponse{" +
				"routeServiceUrl='" + routeServiceUrl + '\'' +
				'}';
	}

	/**
	 * Provides a fluent API for constructing a {@link GetServiceInstanceRouteBindingResponse}.
	 */
	public static final class GetServiceInstanceRouteBindingResponseBuilder {

		private String routeServiceUrl;

		private final Map<String, Object> parameters = new HashMap<>();

		private GetServiceInstanceRouteBindingResponseBuilder() {
		}

		/**
		 * Set a URL to which the platform should proxy requests for the bound route. Can be {@literal null}.
		 *
		 *

		 * This value will set the {@literal route_service_url} field in the body of the response to the platform
		 *
		 * @param routeServiceUrl the route service URL
		 * @return the builder
		 */
		public GetServiceInstanceRouteBindingResponseBuilder routeServiceUrl(String routeServiceUrl) {
			this.routeServiceUrl = routeServiceUrl;
			return this;
		}

		/**
		 * Add a set of parameters from the provided {@literal Map} to the request parameters as were provided by the
		 * platform at service binding creation.
		 *
		 *

		 * This value will set the {@literal parameters} field in the body of the response to the platform.
		 *
		 * @param parameters the parameters to add
		 * @return the builder
		 * @see #getParameters()
		 */
		public GetServiceInstanceRouteBindingResponseBuilder parameters(Map<String, Object> parameters) {
			this.parameters.putAll(parameters);
			return this;
		}

		/**
		 * Add a key/value pair to the request parameters as were provided in the request from the platform at service
		 * binding creation.
		 *
		 *

		 * This value will set the {@literal parameters} field in the body of the response to the platform.
		 *
		 * @param key the parameter key to add
		 * @param value the parameter value to add
		 * @return the builder
		 * @see #getParameters()
		 */
		public GetServiceInstanceRouteBindingResponseBuilder parameters(String key, Object value) {
			this.parameters.put(key, value);
			return this;
		}

		/**
		 * Construct a {@link GetServiceInstanceRouteBindingResponse} from the provided values.
		 *
		 * @return the newly constructed {@literal GetServiceInstanceRouteBindingResponse}
		 */
		public GetServiceInstanceRouteBindingResponse build() {
			return new GetServiceInstanceRouteBindingResponse(parameters, routeServiceUrl);
		}

	}

}

redpajama_set_name: RedPajamaGithub


text:
layout: redirect
redirecturl: http://youtube.com/githubguides
redirectdelay: 3000
categories: none
---


text:
<?php

App::import('Helper', 'DebugKit.Toolbar');
App::import('Vendor', 'DebugKit.FireCake');

class FirePhpToolbarHelper extends ToolbarHelper {
/**
 * settings property
 *
 * @var array
 * @access public
 */
	var $settings = array('format' => 'firePHP', 'forceEnable' => false);
/**
 * send method
 *
 * @return void
 * @access protected
 */
	function _send() {
		$view =& ClassRegistry::getObject('view');
		$view->element('debug_toolbar', array('plugin' => 'debug_kit', 'disableTimer' => true));
	}
/**
 * makeNeatArray.
 *
 * wraps FireCake::dump() allowing panel elements to continue functioning
 *
 * @param string $values
 * @return void
 */
	function makeNeatArray($values) {
		FireCake::info($values);
	}
/**
 * Create a simple message
 *
 * @param string $label Label of message
 * @param string $message Message content
 * @return void
 */
	function message($label, $message) {
		FireCake::log($message, $label);
	}
/**
 * Generate a table with FireCake
 *
 * @param array $rows Rows to print
 * @param array $headers Headers for table
 * @param array $options Additional options and params
 * @return void
 */
	function table($rows, $headers, $options = array()) {
		$title = $headers[0];
		if (isset($options['title'])) {
			$title = $options['title'];
		}
		array_unshift($rows, $headers);
		FireCake::table($title, $rows);
	}
}
?>


text:
<?php

require_once('../libs/common.php');
require_once('../libs/operator.php');
require_once('../libs/chat.php');
require_once('../libs/userinfo.php');
require_once('../libs/pagination.php');

$operator = check_login();
loadsettings();

$page = array();

setlocale(LC_TIME, getstring("time.locale"));

$userid = "";
if (isset($_GET['userid'])) {
	$userid = verifyparam("userid", "/^.{0,63}$/", "");
}

function threads_by_userid($userid)
{
	global $mysqlprefix;
	if ($userid == "") {
		return null;
	}
	$link = connect();

	$query = sprintf("select unix_timestamp(dtmcreated) as created, unix_timestamp(dtmmodified) as modified, " .
					 " threadid, remote, agentName, userName " .
					 "from ${mysqlprefix}chatthread " .
					 "where userid='%s' order by created DESC", mysql_real_escape_string($userid, $link));

	$result = mysql_query($query, $link) or die(' Query failed: ' . mysql_error($link));

	$foundThreads = array();
	while ($thread = mysql_fetch_array($result, MYSQL_ASSOC)) {
		$foundThreads[] = $thread;
	}

	mysql_free_result($result);
	mysql_close($link);
	return $foundThreads;
}

$found = threads_by_userid($userid);

prepare_menu($operator);
setup_pagination($found, 6);
start_html_output();
require('../view/userhistory.php');
?>


text:
"use strict";

import {DefaultState} from "../constants/StateConstants";

const media = (state = DefaultState.media, action) => {
  let newState;
  switch (action.type) {
    case "CLEAR_VIDEO_TIME":
      newState = {...state};
      newState.newVideoTime = null;
      return newState;

    case "UPDATE_VIDEO_TIME":
      newState = {...state};
      newState.newVideoTime = action.payload.newTime;
      return newState;

    case "GET_IMAGE_NAMES":
      newState = {...state};
      newState.imageNames = action.payload.imageNames;
      return newState;

    case "UPDATE_CURRENT_IMAGES":
      newState = {...state};
      newState.currentImages = action.payload.newImages;
      return newState;

    default:
      return state;
  }
};

export default media;


text:
<?xml version="1.0" encoding="utf-8"?>
<menu xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto">
    <item
        android:id="@+id/share"
        android:icon="@drawable/ic_share_white_24dp"
        android:title="@string/menu_share"
        app:showAsAction="always" />
    <item
        android:id="@+id/roadmap"
        android:title="@string/map_type_normal" />
    <item
        android:id="@+id/satellite"
        android:title="@string/map_type_satellite" />
    <item
        android:id="@+id/hybrid"
        android:title="@string/map_type_hybrid" />

</menu>


text:
"""Simple wxpython frame for smart card application.

__author__ = "gemalto http://www.gemalto.com"
__date__ = "November 2006"
__version__ = "1.4.0"

Copyright 2001-2012 gemalto
Author: Jean-Daniel Aussel, mailto:jean-daniel.aussel@gemalto.com

This file is part of pyscard.

pyscard is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation; either version 2.1 of the License, or
(at your option) any later version.

pyscard is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License
along with pyscard; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
"""

import os.path
import wx
import smartcard.wx
import APDUTracerPanel
import CardAndReaderTreePanel
import ReaderToolbar

import smartcard
from smartcard.wx.SimpleSCardAppEventObserver import \
    SimpleSCardAppEventObserver

[
wxID_SIMPLESCARDAPP_FRAME,
] = map(lambda x: wx.NewId(), range(1))

class BlankPanel(wx.Panel, SimpleSCardAppEventObserver):
    '''A blank panel in case no panel is provided to SimpleSCardApp.'''

    def __init__(self, parent):
        wx.Panel.__init__(self, parent, -1)
        sizer = wx.GridSizer(1, 1)
        self.SetSizer(sizer)
        self.SetAutoLayout(True)

class TreeAndUserPanelPanel(wx.Panel):
    '''The panel that contains the Card/Reader TreeCtrl
    and the user provided Panel.'''

    def __init__(self, parent, apppanelclass, appstyle):
        """
        Constructor. Creates the panel with two panels:
            the left-hand panel is holding the smartcard and/or reader tree
            the right-hand panel is holding the application dialog

        apppanelclass: the class of the panel to instantiate in the
                    SimpleSCardAppFrame
        appstyle: a combination of the following styles (bitwise or |)
                  TR_SMARTCARD: display a smartcard tree panel
                  TR_READER: display a reader tree panel
                  TB_SMARTCARD: display a smartcard toolbar
                  TB_SMARTCARD: display a reader toolbar
                  default is TR_DEFAULT = TR_SMARTCARD
        """
        wx.Panel.__init__(self, parent, -1)

        self.parent = parent
        self.selectedcard = None

        boxsizer = wx.BoxSizer(wx.HORIZONTAL)

        # create user dialog
        if None != apppanelclass:
            self.dialogpanel = apppanelclass(self)
        else:
            self.dialogpanel = BlankPanel(self)

        # create card/reader tree control
        if appstyle & smartcard.wx.SimpleSCardApp.TR_SMARTCARD or \
           appstyle & smartcard.wx.SimpleSCardApp.TR_READER:
            self.readertreepanel = \
                CardAndReaderTreePanel.CardAndReaderTreePanel(
                    self, appstyle, self.dialogpanel)
            boxsizer.Add(self.readertreepanel, 1, wx.EXPAND | wx.ALL, 5)

        boxsizer.Add(self.dialogpanel, 2, wx.EXPAND | wx.ALL)

        if appstyle & smartcard.wx.SimpleSCardApp.TR_READER:
            self.Bind(
                wx.EVT_TREE_ITEM_ACTIVATED,
                self.OnActivateReader,
                self.readertreepanel.readertreectrl)
            self.Bind(
                wx.EVT_TREE_SEL_CHANGED,
                self.OnSelectReader,
                self.readertreepanel.readertreectrl)
            self.Bind(
                wx.EVT_TREE_ITEM_RIGHT_CLICK,
                self.OnReaderRightClick,
                self.readertreepanel.readertreectrl)
            self.Bind(
                wx.EVT_TREE_ITEM_COLLAPSED,
                self.OnItemCollapsed,
                self.readertreepanel.readertreectrl)

        if appstyle & smartcard.wx.SimpleSCardApp.TR_SMARTCARD:
            self.Bind(
                wx.EVT_TREE_ITEM_ACTIVATED,
                self.OnActivateCard,
                self.readertreepanel.cardtreectrl)
            self.Bind(
                wx.EVT_TREE_SEL_CHANGED,
                self.OnSelectCard,
                self.readertreepanel.cardtreectrl)
            self.Bind(
                wx.EVT_TREE_ITEM_RIGHT_CLICK,
                self.OnCardRightClick,
                self.readertreepanel.cardtreectrl)

        self.SetSizer(boxsizer)
        self.SetAutoLayout(True)

    def ActivateCard(self, card):
        """Activate a card."""
        if not hasattr(card, 'connection'):
            card.connection = card.createConnection()
            if None != self.parent.apdutracerpanel:
                card.connection.addObserver(self.parent.apdutracerpanel)
            card.connection.connect()
        self.dialogpanel.OnActivateCard(card)

    def DeactivateCard(self, card):
        """Deactivate a card."""
        if hasattr(card, 'connection'):
            card.connection.disconnect()
            if None != self.parent.apdutracerpanel:
                card.connection.deleteObserver(self.parent.apdutracerpanel)
            delattr(card, 'connection')
        self.dialogpanel.OnDeactivateCard(card)

    def OnActivateCard(self, event):
        """Called when the user activates a card in the tree."""
        item = event.GetItem()
        if item:
            itemdata = self.readertreepanel.cardtreectrl.GetItemPyData(item)
            if isinstance(itemdata, smartcard.Card.Card):
                self.ActivateCard(itemdata)
            else:
                self.dialogpanel.OnDeselectCard(itemdata)

    def OnActivateReader(self, event):
        """Called when the user activates a reader in the tree."""
        item = event.GetItem()
        if item:
            itemdata = self.readertreepanel.readertreectrl.GetItemPyData(item)
            if isinstance(itemdata, smartcard.Card.Card):
                self.ActivateCard(itemdata)
            elif isinstance(itemdata, smartcard.reader.Reader.Reader):
                self.dialogpanel.OnActivateReader(itemdata)
        event.Skip()

    def OnItemCollapsed(self, event):
        item = event.GetItem()
        self.readertreepanel.readertreectrl.Expand(item)

    def OnCardRightClick(self, event):
        """Called when user right-clicks a node in the card tree control."""
        item = event.GetItem()
        if item:
            itemdata = self.readertreepanel.cardtreectrl.GetItemPyData(item)
            if isinstance(itemdata, smartcard.Card.Card):
                self.selectedcard = itemdata
                if not hasattr(self, "connectID"):
                    self.connectID = wx.NewId()
                    self.disconnectID = wx.NewId()

                    self.Bind(wx.EVT_MENU, self.OnConnect, id=self.connectID)
                    self.Bind(
                        wx.EVT_MENU, self.OnDisconnect, id=self.disconnectID)

                menu = wx.Menu()
                if not hasattr(self.selectedcard, 'connection'):
                    menu.Append(self.connectID, "Connect")
                else:
                    menu.Append(self.disconnectID, "Disconnect")
                self.PopupMenu(menu)
                menu.Destroy()

    def OnReaderRightClick(self, event):
        """Called when user right-clicks a node in the reader tree control."""
        item = event.GetItem()
        if item:
            itemdata = self.readertreepanel.readertreectrl.GetItemPyData(item)
            if isinstance(itemdata, smartcard.Card.Card):
                self.selectedcard = itemdata
                if not hasattr(self, "connectID"):
                    self.connectID = wx.NewId()
                    self.disconnectID = wx.NewId()

                    self.Bind(wx.EVT_MENU, self.OnConnect, id=self.connectID)
                    self.Bind(
                        wx.EVT_MENU, self.OnDisconnect, id=self.disconnectID)

                menu = wx.Menu()
                if not hasattr(self.selectedcard, 'connection'):
                    menu.Append(self.connectID, "Connect")
                else:
                    menu.Append(self.disconnectID, "Disconnect")
                self.PopupMenu(menu)
                menu.Destroy()

    def OnConnect(self, event):
        if isinstance(self.selectedcard, smartcard.Card.Card):
            self.ActivateCard(self.selectedcard)

    def OnDisconnect(self, event):
        if isinstance(self.selectedcard, smartcard.Card.Card):
            self.DeactivateCard(self.selectedcard)

    def OnSelectCard(self, event):
        """Called when the user selects a card in the tree."""
        item = event.GetItem()
        if item:
            itemdata = self.readertreepanel.cardtreectrl.GetItemPyData(item)
            if isinstance(itemdata, smartcard.Card.Card):
                self.dialogpanel.OnSelectCard(itemdata)
            else:
                self.dialogpanel.OnDeselectCard(itemdata)

    def OnSelectReader(self, event):
        """Called when the user selects a reader in the tree."""
        item = event.GetItem()
        if item:
            itemdata = self.readertreepanel.readertreectrl.GetItemPyData(item)
            if isinstance(itemdata, smartcard.Card.Card):
                self.dialogpanel.OnSelectCard(itemdata)
            elif isinstance(itemdata, smartcard.reader.Reader.Reader):
                self.dialogpanel.OnSelectReader(itemdata)
            else:
                self.dialogpanel.OnDeselectCard(itemdata)

class SimpleSCardAppFrame(wx.Frame):
    """The main frame of the simple smartcard application."""

    def __init__(self,
                  appname,
                  apppanelclass,
                  appstyle,
                  appicon,
                  pos=(-1, -1),
                  size=(-1, -1),
               ):
        """
        Constructor. Creates the frame with two panels:
            the left-hand panel is holding the smartcard and/or reader tree
            the right-hand panel is holding the application dialog

        appname: name of the application
        apppanelclass: the class of the panel to instantiate in the
                       SimpleSCardAppFrame
        appstyle: a combination of the following styles (bitwise or |)
                  TR_SMARTCARD: display a smartcard tree panel
                  TR_READER: display a reader tree panel
                  TB_SMARTCARD: display a smartcard toolbar
                  TB_SMARTCARD: display a reader toolbar
                  PANEL_APDUTRACER: display an APDU tracer panel
                  default is TR_DEFAULT = TR_SMARTCARD
        pos: the application position as a (x,y) tupple; default is (-1,-1)
        size: the application window size as a (x,y) tuple; default is (-1,-1)
        style: the frame wx.Frame style
        """
        wx.Frame.__init__(self,
                           None,
                          wxID_SIMPLESCARDAPP_FRAME,
                          appname,
                          pos=pos,
                          size=size,
                          style=wx.DEFAULT_FRAME_STYLE)

        if appicon:
            _icon = wx.Icon(appicon, wx.BITMAP_TYPE_ICO)
            self.SetIcon(_icon)
        elif os.path.exists(smartcard.wx.ICO_SMARTCARD):
            _icon = wx.Icon(smartcard.wx.ICO_SMARTCARD, wx.BITMAP_TYPE_ICO)
            self.SetIcon(_icon)

        boxsizer = wx.BoxSizer(wx.VERTICAL)
        self.treeuserpanel = TreeAndUserPanelPanel(
            self, apppanelclass, appstyle)
        boxsizer.Add(self.treeuserpanel, 3, wx.EXPAND | wx.ALL)

        # create a toolbar if required
        if appstyle & smartcard.wx.SimpleSCardApp.TB_SMARTCARD:
            self.toolbar = ReaderToolbar.ReaderToolbar(self)
            self.SetToolBar(self.toolbar)
        else:
            self.toolbar = None

        # create an apdu tracer console if required
        if appstyle & smartcard.wx.SimpleSCardApp.PANEL_APDUTRACER:
            self.apdutracerpanel = APDUTracerPanel.APDUTracerPanel(self)
            boxsizer.Add(self.apdutracerpanel, 1, wx.EXPAND | wx.ALL)
        else:
            self.apdutracerpanel = None

        self.SetSizer(boxsizer)
        self.SetAutoLayout(True)

        self.Bind(wx.EVT_CLOSE, self.OnCloseFrame)
        if appstyle & smartcard.wx.SimpleSCardApp.TB_SMARTCARD:
            self.Bind(
                wx.EVT_COMBOBOX,
                self.OnReaderComboBox,
                self.toolbar.readercombobox)

    def OnCloseFrame(self, evt):
        """Called when frame is closed, i.e. on wx.EVT_CLOSE"""
        evt.Skip()

    def OnExit(self, evt):
        """Called when frame application exits."""
        self.Close(True)
        evt.Skip()

    def OnReaderComboBox(self, event):
        """Called when the user activates a reader in the toolbar combo box."""
        cb = event.GetEventObject()
        reader = cb.GetClientData(cb.GetSelection())
        if isinstance(reader, smartcard.reader.Reader.Reader):
            self.treeuserpanel.dialogpanel.OnActivateReader(reader)


text:
require 'simplecov'
require 'simplecov-rcov'

SimpleCov.formatter = SimpleCov::Formatter::MultiFormatter[
  SimpleCov::Formatter::HTMLFormatter,
  SimpleCov::Formatter::RcovFormatter,
]

SimpleCov.start do
  add_filter 'test'
end

require "codeclimate-test-reporter"
CodeClimate::TestReporter.start

require 'minitest/autorun'
require 'minitest/unit'
require 'digest/sha2'

$:.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
$:.unshift(File.dirname(__FILE__))
require 'encryptor'


text:
<title>
I'm for making sure racists can't attack people
</title>

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<?php include "../../legacy-includes/Script.htmlf" ?>

<?php include "../../legacy-includes/TopLogo.htmlf" ?>

<?php include "../../legacy-includes/TopAd.htmlf" ?>

<?php include "../../legacy-includes/LeftButtons.htmlf" ?>

<?php include "../../legacy-includes/BodyInsert.htmlf" ?>

I'm for making sure racists can't attack people

November 9, 2001 | Page 4

Dear Socialist Worker,

A few days after the September 11 attacks, a cartoon ran in the Daily Californian, the student newspaper at the University of California-Berkeley, that showed two turbaned Arab men carrying flight manuals in hell.

Antiwar and antiracist students demanded an apology from the editors of the newspaper, but the editor-in-chief refused, calling it "freedom of speech." Recently, an article appeared in the Oakland Tribune that praised the Daily Cal's "strong stand" and denounced the antiracist protesters as "neo-fascists."

Fascism is about censorship of the most brutal kind, since it consists of physically eliminating political opponents. But it's also about the promotion of ideas about racial and cultural superiority.

It's dishonest to portray students who are fighting against racism and war as "fascists." The Oakland Tribune should pay more attention to its own columnists. On the paper's opinion pages, Kathleen Parker recently wrote, "There is such a thing as moral and cultural superiority, and we [the Western world] are it."

This war and the justification for it are racist to the core. Racist cartoons like the one in the Daily Cal give courage and justification for anti-Arab and anti-Muslim racists who attack--and even murder--people.

I'm for making sure that doesn't happen, and so are Berkeley students. They haven't waited to get a confirmation that this cartoon has indirectly promoted racism. They've acted.

In France, where I come from, a large number of people have recognized that freedom of speech and hatred don't mix.

Frank Laporte, Oakland, Calif.

<?php include "../../legacy-includes/BottomNavLinks.htmlf" ?>

<?php include "../../legacy-includes/RightAdFolder.htmlf" ?>


text:
.aui-toggler-content-collapsed {
	display: none;
}

.aui-toggler-content-wrapper {
	overflow: hidden;
}


text:
package datum

import (
	"fmt"
	"strings"
	"testing"

	"github.com/pachyderm/pachyderm/v2/src/client"
	"github.com/pachyderm/pachyderm/v2/src/internal/require"
	tu "github.com/pachyderm/pachyderm/v2/src/internal/testutil"
)

func benchmarkIterators(j int, b *testing.B) {
	c := tu.GetPachClient(b)
	defer require.NoError(b, c.DeleteAll())

	b.ResetTimer()
	for n := 0; n < b.N; n++ {
		dataRepo := tu.UniqueString("TestIteratorPFS_data")
		require.NoError(b, c.CreateRepo(dataRepo))

		// put files in structured in a way so that there are many ways to glob it
		commit, err := c.StartCommit(dataRepo, "master")
		require.NoError(b, err)
		for i := 0; i < 100*j; i++ {
			require.NoError(b, c.PutFile(commit, fmt.Sprintf("foo%v", i), strings.NewReader("bar")))
		}
		require.NoError(b, c.FinishCommit(dataRepo, commit.Branch.Name, commit.ID))

		// make one with zero datums for testing edge cases
		in0 := client.NewPFSInput(dataRepo, "!(**)")
		in0.Pfs.Commit = commit.ID
		pfs0, err := NewIterator(c, in0)
		require.NoError(b, err)

		in1 := client.NewPFSInput(dataRepo, "/foo?1*")
		in1.Pfs.Commit = commit.ID
		pfs1, err := NewIterator(c, in1)
		require.NoError(b, err)

		in2 := client.NewPFSInput(dataRepo, "/foo*2")
		in2.Pfs.Commit = commit.ID
		pfs2, err := NewIterator(c, in2)
		require.NoError(b, err)

		validateDI(b, pfs0)
		validateDI(b, pfs1)
		validateDI(b, pfs2)

		b.Run("union", func(b *testing.B) {
			in3 := client.NewUnionInput(in1, in2)
			union1, err := NewIterator(c, in3)
			require.NoError(b, err)
			validateDI(b, union1)
		})

		b.Run("cross", func(b *testing.B) {
			in4 := client.NewCrossInput(in1, in2)
			cross1, err := NewIterator(c, in4)
			require.NoError(b, err)
			validateDI(b, cross1)
		})

		// TODO: Implement for V2.
		//b.Run("join", func(b *testing.B) {
		//	in8 := client.NewPFSInputOpts("", dataRepo, "", "/foo(?)(?)*", "$1$2", "", false, false)
		//	in8.Pfs.Commit = commit.ID
		//	in9 := client.NewPFSInputOpts("", dataRepo, "", "/foo(?)(?)*", "$2$1", "", false, false)
		//	in9.Pfs.Commit = commit.ID
		//	join1, err := newJoinIterator(c, []*pps.Input{in8, in9})
		//	require.NoError(b, err)
		//	validateDI(b, join1)
		//})

		//b.Run("group", func(b *testing.B) {
		//	in10 := client.NewPFSInputOpts("", dataRepo, "", "/foo(?)(?)*", "", "$2", false, false)
		//	in10.Pfs.Commit = commit.ID
		//	group1, err := newGroupIterator(c, []*pps.Input{in10})
		//	require.NoError(b, err)
		//	validateDI(b, group1)
		//})

		b.Run("iterated", func(b *testing.B) {
			in3 := client.NewUnionInput(in1, in2)
			in4 := client.NewCrossInput(in1, in2)

			in5 := client.NewCrossInput(in3, in4)
			cross2, err := NewIterator(c, in5)
			require.NoError(b, err)

			// cross with a zero datum input should also be zero
			in6 := client.NewCrossInput(in3, in0, in2, in4)
			cross3, err := NewIterator(c, in6)
			require.NoError(b, err)

			// zero cross inside a cross should also be zero
			in7 := client.NewCrossInput(in6, in1)
			cross4, err := NewIterator(c, in7)
			require.NoError(b, err)

			validateDI(b, cross2)
			validateDI(b, cross3)
			validateDI(b, cross4)

		})
	}
}

func BenchmarkDI1(b *testing.B)  { benchmarkIterators(1, b) }
func BenchmarkDI2(b *testing.B)  { benchmarkIterators(2, b) }
func BenchmarkDI4(b *testing.B)  { benchmarkIterators(4, b) }
func BenchmarkDI8(b *testing.B)  { benchmarkIterators(8, b) }
func BenchmarkDI16(b *testing.B) { benchmarkIterators(16, b) }
func BenchmarkDI32(b *testing.B) { benchmarkIterators(32, b) }


text:
package org.onosproject.net.intent.impl;

import com.google.common.collect.Sets;
import org.onosproject.net.DeviceId;
import org.onosproject.net.flow.FlowRule;
import org.onosproject.net.flow.FlowRuleOperations;
import org.onosproject.net.flow.FlowRuleOperationsContext;
import org.onosproject.net.flow.FlowRuleService;
import org.onosproject.net.flowobjective.FlowObjectiveService;
import org.onosproject.net.flowobjective.Objective;
import org.onosproject.net.flowobjective.ObjectiveContext;
import org.onosproject.net.flowobjective.ObjectiveError;
import org.onosproject.net.intent.FlowObjectiveIntent;
import org.onosproject.net.intent.FlowRuleIntent;
import org.onosproject.net.intent.Intent;
import org.onosproject.net.intent.IntentData;
import org.onosproject.net.intent.IntentStore;
import org.slf4j.Logger;

import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
import java.util.Optional;
import java.util.Set;
import java.util.function.Consumer;
import java.util.stream.Collectors;

import static com.google.common.base.Preconditions.checkState;
import static org.onosproject.net.intent.IntentState.*;
import static org.slf4j.LoggerFactory.getLogger;

/**
 * Auxiliary entity responsible for installing the intents into the environment.
 */
class IntentInstaller {

    private static final Logger log = getLogger(IntentManager.class);

    private IntentStore store;
    private ObjectiveTrackerService trackerService;
    private FlowRuleService flowRuleService;
    private FlowObjectiveService flowObjectiveService;

    private enum Direction {
        ADD,
        REMOVE
    }

    /**
     * Initializes the installer with references to required services.
     *
     * @param intentStore          intent store
     * @param trackerService       objective tracking service
     * @param flowRuleService      flow rule service
     * @param flowObjectiveService flow objective service
     */
    void init(IntentStore intentStore, ObjectiveTrackerService trackerService,
              FlowRuleService flowRuleService, FlowObjectiveService flowObjectiveService) {
        this.store = intentStore;
        this.trackerService = trackerService;
        this.flowRuleService = flowRuleService;
        this.flowObjectiveService = flowObjectiveService;
    }

    // FIXME: Refactor to accept both FlowObjectiveIntent and FlowRuleIntents
    // FIXME: Intent Manager should have never become dependent on a specific intent type(s).
    // This will be addressed in intent domains work; not now.

    /**
     * Applies the specified intent updates to the environment by uninstalling
     * and installing the intents and updating the store references appropriately.
     *
     * @param toUninstall optional intent to uninstall
     * @param toInstall   optional intent to install
     */
    void apply(Optional<IntentData> toUninstall, Optional<IntentData> toInstall) {
        // Hook for handling success
        Consumer<OperationContext> successConsumer = (ctx) -> {
            if (toInstall.isPresent()) {
                IntentData installData = toInstall.get();
                log.debug("Completed installing: {}", installData.key());
                installData.setState(INSTALLED);
                store.write(installData);
            } else if (toUninstall.isPresent()) {
                IntentData uninstallData = toUninstall.get();
                log.debug("Completed withdrawing: {}", uninstallData.key());
                switch (uninstallData.request()) {
                    case INSTALL_REQ:
                        uninstallData.setState(FAILED);
                        break;
                    case WITHDRAW_REQ:
                    default: //TODO "default" case should not happen
                        uninstallData.setState(WITHDRAWN);
                        break;
                }
                store.write(uninstallData);
            }
        };

        // Hook for handling errors
        Consumer<OperationContext> errorConsumer = (ctx) -> {
            // if toInstall was cause of error, then recompile (manage/increment counter, when exceeded -> CORRUPT)
            if (toInstall.isPresent()) {
                IntentData installData = toInstall.get();
                log.warn("Failed installation: {} {} on {}",
                         installData.key(), installData.intent(), ctx.error());
                installData.setState(CORRUPT);
                installData.incrementErrorCount();
                store.write(installData);
            }
            // if toUninstall was cause of error, then CORRUPT (another job will clean this up)
            if (toUninstall.isPresent()) {
                IntentData uninstallData = toUninstall.get();
                log.warn("Failed withdrawal: {} {} on {}",
                         uninstallData.key(), uninstallData.intent(), ctx.error());
                uninstallData.setState(CORRUPT);
                uninstallData.incrementErrorCount();
                store.write(uninstallData);
            }
        };

        // Create a context for tracking the backing operations for applying
        // the intents to the environment.
        OperationContext context = createContext(toUninstall, toInstall);

        context.prepare(toUninstall, toInstall, successConsumer, errorConsumer);
        context.apply();
    }

    // ------ Utilities to support FlowRule vs. FlowObjective behavior -------

    // Creates the context appropriate for tracking operations of the
    // the specified intents.
    private OperationContext createContext(Optional<IntentData> toUninstall,
                                           Optional<IntentData> toInstall) {
        if (isInstallable(toUninstall, toInstall, FlowRuleIntent.class)) {
            return new FlowRuleOperationContext();
        }
        if (isInstallable(toUninstall, toInstall, FlowObjectiveIntent.class)) {
            return new FlowObjectiveOperationContext();
        }
        return new ErrorContext();
    }

    private boolean isInstallable(Optional<IntentData> toUninstall, Optional<IntentData> toInstall,
                                  Class<? extends Intent> intentClass) {
        boolean notBothNull = false;
        if (toInstall.isPresent()) {
            notBothNull = true;
            if (!toInstall.get().installables().stream()
                    .allMatch(i -> intentClass.isAssignableFrom(i.getClass()))) {
                return false;
            }
        }
        if (toUninstall.isPresent()) {
            notBothNull = true;
            if (!toUninstall.get().installables().stream()
                    .allMatch(i -> intentClass.isAssignableFrom(i.getClass()))) {
                return false;
            }
        }
        return notBothNull;
    }

    // Base context for applying and tracking operations related to installable intents.
    private abstract class OperationContext {
        protected Optional<IntentData> toUninstall;
        protected Optional<IntentData> toInstall;
        protected Consumer<OperationContext> successConsumer;
        protected Consumer<OperationContext> errorConsumer;

        abstract void apply();

        abstract Object error();

        abstract void prepareIntents(List<Intent> intentsToApply, Direction direction);

        void prepare(Optional<IntentData> toUninstall, Optional<IntentData> toInstall,
                     Consumer<OperationContext> successConsumer,
                     Consumer<OperationContext> errorConsumer) {
            this.toUninstall = toUninstall;
            this.toInstall = toInstall;
            this.successConsumer = successConsumer;
            this.errorConsumer = errorConsumer;
            prepareIntentData(toUninstall, Direction.REMOVE);
            prepareIntentData(toInstall, Direction.ADD);
        }

        /**
         * Applies the specified intent data, if present, to the network using the
         * specified context.
         *
         * @param intentData optional intent data; no-op if not present
         * @param direction  indicates adding or removal
         */
        private void prepareIntentData(Optional<IntentData> intentData, Direction direction) {
            if (!intentData.isPresent()) {
                return;
            }

            IntentData data = intentData.get();
            List<Intent> intentsToApply = data.installables();
            checkState(intentsToApply.stream().allMatch(this::isSupported),
                       "Unsupported installable intents detected");

            if (direction == Direction.ADD) {
                trackerService.addTrackedResources(data.key(), data.intent().resources());
                intentsToApply.forEach(installable ->
                                               trackerService.addTrackedResources(data.key(),
                                                                                installable.resources()));
            } else {
                trackerService.removeTrackedResources(data.key(), data.intent().resources());
                intentsToApply.forEach(installable ->
                                               trackerService.removeTrackedResources(data.intent().key(),
                                                                                installable.resources()));
            }

            prepareIntents(intentsToApply, direction);
        }

        private boolean isSupported(Intent intent) {
            return intent instanceof FlowRuleIntent || intent instanceof FlowObjectiveIntent;
        }
    }

    // Context for applying and tracking operations related to flow rule intent.
    private class FlowRuleOperationContext extends OperationContext {
        FlowRuleOperations.Builder builder = FlowRuleOperations.builder();
        FlowRuleOperationsContext flowRuleOperationsContext;

        void apply() {
            flowRuleOperationsContext = new FlowRuleOperationsContext() {
                @Override
                public void onSuccess(FlowRuleOperations ops) {
                    successConsumer.accept(FlowRuleOperationContext.this);
                }

                @Override
                public void onError(FlowRuleOperations ops) {
                    errorConsumer.accept(FlowRuleOperationContext.this);
                }
            };
            FlowRuleOperations operations = builder.build(flowRuleOperationsContext);

            if (log.isTraceEnabled()) {
                log.trace("applying intent {} -> {} with {} rules: {}",
                          toUninstall.map(x -> x.key().toString()).orElse("<empty>"),
                          toInstall.map(x -> x.key().toString()).orElse("<empty>"),
                          operations.stages().stream().mapToLong(Set::size).sum(),
                          operations.stages());
            }

            flowRuleService.apply(operations);
        }

        @Override
        public void prepareIntents(List<Intent> intentsToApply, Direction direction) {
            // FIXME do FlowRuleIntents have stages??? Can we do uninstall work in parallel? I think so.
            builder.newStage();

            List<Collection<FlowRule>> stages = intentsToApply.stream()
                    .map(x -> (FlowRuleIntent) x)
                    .map(FlowRuleIntent::flowRules)
                    .collect(Collectors.toList());

            for (Collection<FlowRule> rules : stages) {
                if (direction == Direction.ADD) {
                    rules.forEach(builder::add);
                } else {
                    rules.forEach(builder::remove);
                }
            }

        }

        @Override
        public Object error() {
            return flowRuleOperationsContext;
        }
    }

    // Context for applying and tracking operations related to flow objective intents.
    private class FlowObjectiveOperationContext extends OperationContext {
        List<FlowObjectiveInstallationContext> contexts;
        final Set<ObjectiveContext> pendingContexts = Sets.newHashSet();
        final Set<ObjectiveContext> errorContexts = Sets.newConcurrentHashSet();

        @Override
        public void prepareIntents(List<Intent> intentsToApply, Direction direction) {
            contexts = intentsToApply.stream()
                    .flatMap(x -> buildObjectiveContexts((FlowObjectiveIntent) x, direction).stream())
                    .collect(Collectors.toList());
        }

        // Builds the specified objective in the appropriate direction
        private List<FlowObjectiveInstallationContext> buildObjectiveContexts(FlowObjectiveIntent intent,
                                                                              Direction direction) {
            int size = intent.objectives().size();
            List<FlowObjectiveInstallationContext> contexts = new ArrayList<>(size);
            for (int i = 0; i < size; i++) {
                DeviceId deviceId = intent.devices().get(i);
                Objective.Builder builder = intent.objectives().get(i).copy();
                FlowObjectiveInstallationContext context = new FlowObjectiveInstallationContext();

                final Objective objective;
                switch (direction) {
                    case ADD:
                        objective = builder.add(context);
                        break;
                    case REMOVE:
                        objective = builder.remove(context);
                        break;
                    default:
                        throw new UnsupportedOperationException("Unsupported direction " + direction);
                }
                context.setObjective(objective, deviceId);
                contexts.add(context);
            }
            return contexts;
        }

        @Override
        void apply() {
            contexts.forEach(objectiveContext -> {
                pendingContexts.add(objectiveContext);
                flowObjectiveService.apply(objectiveContext.deviceId,
                                           objectiveContext.objective);
            });
        }

        @Override
        public Object error() {
            return errorContexts;
        }

        private class FlowObjectiveInstallationContext implements ObjectiveContext {
            Objective objective;
            DeviceId deviceId;

            void setObjective(Objective objective, DeviceId deviceId) {
                this.objective = objective;
                this.deviceId = deviceId;
            }

            @Override
            public void onSuccess(Objective objective) {
                finish();
            }

            @Override
            public void onError(Objective objective, ObjectiveError error) {
                errorContexts.add(this);
                finish();
            }

            private void finish() {
                synchronized (pendingContexts) {
                    pendingContexts.remove(this);
                    if (pendingContexts.isEmpty()) {
                        if (errorContexts.isEmpty()) {
                            successConsumer.accept(FlowObjectiveOperationContext.this);
                        } else {
                            errorConsumer.accept(FlowObjectiveOperationContext.this);
                        }
                    }
                }
            }

            @Override
            public String toString() {
                return String.format("(%s, %s)", deviceId, objective);
            }
        }
    }

    private class ErrorContext extends OperationContext {
        @Override
        void apply() {
            throw new UnsupportedOperationException("Unsupported installable intent");
        }

        @Override
        Object error() {
            return null;
        }

        @Override
        void prepareIntents(List<Intent> intentsToApply, Direction direction) {
        }
    }
}


text:
var __extends = this.__extends || function (d, b) {
    for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
    function __() { this.constructor = d; }
    __.prototype = b.prototype;
    d.prototype = new __();
};
var Q = require('q');
Q.longStackSupport = true;

////////////////////////////
// Events
var EventProvider = (function () {
    function EventProvider(name) {
        this.name = name;
        this.eventHandlers = {};
    }
    EventProvider.prototype.handle = function (eventHandler) {
        this.eventHandlers[this.name] = eventHandler;
    };

    EventProvider.prototype.emit = function (event) {
        for (var i in this.eventHandlers) {
            this.eventHandlers[i](event);
        }
    };
    return EventProvider;
})();
exports.EventProvider = EventProvider;

///////////////////////
// Event Handler
// Handelt Events (HanldingLogic) und löst neue Events aus
var EventHandler = (function (_super) {
    __extends(EventHandler, _super);
    function EventHandler(name, eventProvider, handlingLogic) {
        var _this = this;
        _super.call(this, name);

        // als handler für ein command registieren
        eventProvider.handle(function (params) {
            // was passieren soll, wenn das Event ausgelöst wurde
            handlingLogic(params); // die Business Logik für das Event ausführen
            _this.emit(params); // das Event an die hanlder (z.B. Projections) senden, die sich für das Event interessiern
        });
    }
    return EventHandler;
})(EventProvider);
exports.EventHandler = EventHandler;

////////////////
///// Event Store
var StoredEventProvider = (function (_super) {
    __extends(StoredEventProvider, _super);
    function StoredEventProvider(name, collectionName, db) {
        _super.call(this, name);

        this.collection = db.collection(collectionName);
    }
    StoredEventProvider.prototype.emit = function (event) {
        Q.ninvoke(this.collection, 'insert', event); // save Event to db
        _super.prototype.emit.call(this, event);
    };
    return StoredEventProvider;
})(EventProvider);
exports.StoredEventProvider = StoredEventProvider;

////////////////
///// Commands
// Ein Command mit Parametern T
var Command = (function (_super) {
    __extends(Command, _super);
    function Command(name) {
        _super.call(this, name);
    }
    return Command;
})(EventProvider);
exports.Command = Command;

var MongoProjection = (function () {
    function MongoProjection(name, db, projector) {
        this.name = name;
        this.collection = db.collection(name);

        var self = this;
        var collection = {
            execute: function (mongoCmd) {
                var parms = [];
                for (var _i = 0; _i < (arguments.length - 1); _i++) {
                    parms[_i] = arguments[_i + 1];
                }
                return Q.npost(self.collection, mongoCmd, parms);
            },
            insert: function (params) {
                return Q.ninvoke(self.collection, 'insert', params);
            }
        };

        projector(collection);
    }
    MongoProjection.prototype.query = function (params) {
        return Q.ninvoke(this.collection.find(params), 'toArray').then(function (docs) {
            return docs;
        });
    };
    return MongoProjection;
})();
exports.MongoProjection = MongoProjection;

/////////////////////////////
// Context
var Context = (function () {
    function Context(name, db) {
        this.name = name;
        this.db = db;
    }
    Context.prototype.createCommand = function (cmdName) {
        return new StoredEventProvider(cmdName, this.name + 'Events', this.db);
    };

    Context.prototype.createDomainEvent = function (name, eventProvider, handlingLogic) {
        return new EventHandler(name, eventProvider, handlingLogic);
    };
    return Context;
})();
exports.Context = Context;
//# sourceMappingURL=cqrs2.js.map


text:
class SoundBank;
class AudioSource;

class AudioEvent {

public:

	AudioEvent();
	~AudioEvent();
	void UnLoad();

	void Load(JSON_File* file, SoundBank* p,int id);
	std::string name;
	uint id = 0;
	bool in_3D = false;
	void UIDraw(AudioSource* parent);

	AkPlayingID playing_id = 0L;
	AkCallbackFunc event_call_back = nullptr;
	SoundBank* parent = nullptr;

};

#endif


text:
package iteruint8

import (
	"fmt"
)

type internalBadTypeComplainer struct{
	actualType string
}

func (receiver internalBadTypeComplainer) Error() string {
	return fmt.Sprintf("Bad Type: %q", receiver.actualType)
}

func (internalBadTypeComplainer) BadTypeComplainer() {
	// Nothing here.
}


text:
import _extends from "@babel/runtime/helpers/extends";
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";

let _ = t => t,
    _t,
    _t2,
    _t3;

const _excluded = ["children", "indicator", "indicatorPosition"];
import React, { forwardRef } from 'react';
import styled, { css } from 'styled-components';
import { shouldForwardProp } from '@looker/design-tokens';
import { focusVisibleCSSWrapper } from '../utils';
import { AccordionLabel } from './AccordionLabel';
const Accordion2DisclosureInternal = forwardRef((_ref, ref) => {
  let {
    children,
    indicator,
    indicatorPosition
  } = _ref,
      props = _objectWithoutProperties(_ref, _excluded);

  return React.createElement("div", _extends({
    ref: ref
  }, props), indicatorPosition === 'left' && indicator, React.createElement(AccordionLabel, null, children), indicatorPosition !== 'left' && indicator);
});
Accordion2DisclosureInternal.displayName = 'Accordion2DisclosureInternal';
const labelTypographyDefaults = css(_t || (_t = _`
  font-weight: ${0};
  text-align: left;
`), ({
  theme
}) => theme.fontWeights.semiBold);
export const Accordion2Disclosure = styled(Accordion2DisclosureInternal).withConfig({
  shouldForwardProp: prop => ['indicator', 'indicatorPosition'].includes(prop) ? true : shouldForwardProp(prop),
  displayName: "Accordion2Disclosure",
  componentId: "sc-n100ke-0"
})(_t2 || (_t2 = _`
  align-items: center;
  color: ${0};
  cursor: pointer;
  display: flex;
  outline: none;
  position: relative;
  width: 100%;

  ${0}

  &[disabled] {
    color: ${0};
    cursor: not-allowed;
  }

  ${0}
`), ({
  theme
}) => theme.colors.text5, labelTypographyDefaults, ({
  theme
}) => theme.colors.text1, focusVisibleCSSWrapper(({
  theme
}) => css(_t3 || (_t3 = _`
      box-shadow: inset 0 0 0 2px ${0};
    `), theme.colors.keyFocus)));
//# sourceMappingURL=Accordion2Disclosure.js.map


text:
using System;
using System.Collections.Generic;
using System.Text;
using com.lover.astd.common.logic;
using com.lover.astd.common.model.attack;

namespace com.lover.astd.common.logicexe.temp
{
    public class JuedouExe : TempExeBase, ITempExe, IExecute
    {
        private bool _finished = false;
        private int _juedou = 0;
        //private List<string> _juedou_blacklist = new List<string>();

        public JuedouExe()
        {
            _name = ConfigStrings.S_Temp;
            _readable = ConfigStrings.SR_Temp;
        }

        private void loadBlackList()
        {
            logInfo("加载决斗黑名单");
            //_juedou_blacklist.Clear();
            //Dictionary<string, string> config = _otherConf.getConfig(ConfigStrings.S_Attack);
            //if (config.ContainsKey(ConfigStrings.black_list))
            //{
            //    string[] list = config[ConfigStrings.black_list].Split(new char[] { ';' }, StringSplitOptions.RemoveEmptyEntries);
            //    if (list != null && list.Length > 0)
            //    {
            //        foreach (string item in list)
            //        {
            //            _juedou_blacklist.Add(item);
            //            logInfo(item);
            //        }
            //    }
            //}
            foreach (string item in _otherConf.BlackList)
            {
                logInfo(item);
            }
        }

        //private void saveBlackList()
        //{
        //    StringBuilder sb = new StringBuilder();
        //    foreach (string item in _juedou_blacklist)
        //    {
        //        if (sb.Length > 0)
        //        {
        //            sb.Append(";");
        //        }
        //        sb.Append(item);
        //    }
        //    _otherConf.setConfig(ConfigStrings.S_Attack, ConfigStrings.black_list, sb.ToString());
        //    _otherConf.saveSettings();
        //}

        public override void init_data()
        {
            base.init_data();
            loadBlackList();
        }

        private void pk(PkInfo pkInfo)
        {
            Dictionary<string, string> config = _conf.getConfig(ConfigStrings.S_Attack);
            bool use_token = config.ContainsKey(ConfigStrings.use_token) && config[ConfigStrings.use_token].ToLower().Equals("true");
            BattleMgr battleManager = _factory.getBattleManager();
            MiscMgr miscManager = _factory.getMiscManager();
            if (use_token)
            {
                battleManager.useToken(_proto, _logger, _user, 10000);
            }
            int run_times = 100;
            bool find_spy = false;
            do
            {
                run_times--;
                _factory.getTroopManager().makeSureForce(_proto, _logger, 0.5);
                int worldevent;
                int seniorslaves;
                battleManager.attackPlayer(_proto, _logger, _user, pkInfo.areaId, pkInfo.scopeid, pkInfo.cityid, out worldevent, out seniorslaves);
                if (seniorslaves == 1)
                {
                    miscManager.getSeniorJailInfo(_proto, _logger);
                }
                if (worldevent == 2)
                {
                    miscManager.handleTradeFriend(_proto, _logger, _user);
                }
                else if (worldevent == 1)
                {
                    find_spy = true;
                }
                pkInfo = battleManager.getPkInfo(_proto, _logger);
            }
            while ((pkInfo.result < 0 || pkInfo.stage == 1) && run_times > 0);
            if (pkInfo.result >= 0 && pkInfo.stage == 2 && pkInfo.pkresult == 1)
            {
                logInfo(string.Format("决斗胜利, 获得战绩+{0}, 宝石+{1}", pkInfo.score, pkInfo.baoshi));
            }
            if (find_spy)
            {
                battleManager.AttackSpy(_proto, _logger, _user);
            }
        }

        public override long execute()
        {
            Dictionary<string, string> config = _conf.getConfig(ConfigStrings.S_Attack);
            int min_level = 0;
            int max_level = 0;
            if (config.ContainsKey(ConfigStrings.level_min))
            {
                int.TryParse(config[ConfigStrings.level_min], out min_level);
            }
            //if (config.ContainsKey(ConfigStrings.level_max))
            //{
            //    int.TryParse(config[ConfigStrings.level_max], out max_level);
            //}
            max_level = this._user.Level;
            BattleMgr battleManager = _factory.getBattleManager();
            battleManager.getNewAreaInfo(_proto, _logger, _user);
            _juedou = _user._attack_daojuFlag;
            if (_juedou > 0)
            {
                AreaInfo areaInfo = battleManager.getNearCapital(_user);
                if (areaInfo == null)
                {
                    logInfo("不在敌国首都外, 不能进行决斗");
                    _finished = true;
                }
                else if (_user._arrest_state == 100)
                {
                    battleManager.escapeFromJail(_proto, _logger);
                    _user._arrest_state = 0;
                    _finished = true;
                }
                else if (_user._arrest_state > 10)
                {
                    _finished = true;
                }
                //else if (_user._attack_cityHp <= 80)
                //{
                //    logInfo("城防低于80, 不能进行决斗");
                //    _finished = true;
                //}
                else
                {
                    if (battleManager.handleDaoju(_proto, _logger, _user, areaInfo.areaid, 2, min_level, max_level, _otherConf.BlackList) == 0)
                    {
                        if (battleManager.handleDaoju(_proto, _logger, _user, areaInfo.areaid, 1, min_level, max_level, _otherConf.BlackList) == 0)
                        {
                            PkInfo pkInfo = battleManager.getPkInfo(_proto, _logger);
                            if (pkInfo.result < 0)
                            {
                                _finished = true;
                            }
                            else if (pkInfo.stage == 1)
                            {
                                if (pkInfo.fang_maxcityhp < 350)
                                {
                                    logInfo(string.Format("{0}最大城防低于350, 加入黑名单", pkInfo.fang_name));
                                    //_juedou_blacklist.Add(pkInfo.fang_name);
                                    //saveBlackList();
                                    _otherConf.addBlackList(pkInfo.fang_name);
                                }
                                pk(pkInfo);
                            }
                        }
                        else
                        {
                            logInfo("使用决斗战旗出错");
                            _finished = true;
                        }
                    }
                    else
                    {
                        logInfo("使用诱敌锦囊出错");
                        _finished = true;
                    }
                }
            }
            return immediate();
        }

        public bool isFinished()
        {
            return _finished || _user._attack_daojuFlag == 0;
        }

        public void setTarget(Dictionary<string, string> conf)
        {

        }

        public string getStatus()
        {
            return string.Format("决斗战旗: {0}", _juedou);
        }
    }
}


text:
package com.dyj.db.bean;

import java.io.Serializable;

import com.j256.ormlite.field.DatabaseField;

public class Rw implements Serializable{
	/**
	 *
	 */
	private static final long serialVersionUID = -5683263669918171030L;
	@DatabaseField(id=true)
	private String Rw_dm;
	@DatabaseField(defaultValue="")
	private String Cjd_bh;
	@DatabaseField(defaultValue="")
	private String Fbr_name;
	@DatabaseField(defaultValue="")
	private String Fbr_mc;
	@DatabaseField(defaultValue="")
	private String Fbr_tel;
	@DatabaseField(defaultValue="")
	private String Rw_lx;
	@DatabaseField(defaultValue="")
	private String Gzqk;
	@DatabaseField
	private int Cjsj;
	@DatabaseField
	private int Tjsj;
	@DatabaseField(defaultValue="")
	private String Fbr_dm;
	@DatabaseField
	private int Rwzt_dm;
	@DatabaseField(defaultValue="")
	private String Rwzt_mc;

	@DatabaseField(defaultValue="")
	private String Yhbh;
	@DatabaseField(defaultValue="")
	private String Yhmc;
	@DatabaseField(defaultValue="")
	private String Gddw;
	@DatabaseField(defaultValue="")
	private String Azdz;
	@DatabaseField(defaultValue="")
	private String Zddz;
	@DatabaseField(defaultValue="")
	private String Zcbh;
	@DatabaseField(defaultValue="")
	private String Htrl;
	@DatabaseField(defaultValue="")
	private String Dbzch;
	@DatabaseField(defaultValue="")
	private String Lxr;
	@DatabaseField(defaultValue="")
	private String Dh;
	@DatabaseField(defaultValue="")
	private String Dh1;
	@DatabaseField(defaultValue="")
	private String Zbmklx;
	@DatabaseField(defaultValue="")
	private String Cjb_jd;
	@DatabaseField(defaultValue="")
	private String Cjd_wd;
	@DatabaseField(defaultValue="")
	private String wcqx;
	public String getWcqx() {
		return wcqx;
	}

	public void setWcqx(String wcqx) {
		this.wcqx = wcqx;
	}

	public static long getSerialversionuid() {
		return serialVersionUID;
	}

	public String getRw_dm() {
		return Rw_dm;
	}

	public void setRw_dm(String rw_dm) {
		Rw_dm = rw_dm;
	}

	public String getCjd_bh() {
		return Cjd_bh;
	}

	public void setCjd_bh(String cjd_bh) {
		Cjd_bh = cjd_bh;
	}

	public String getFbr_name() {
		return Fbr_name;
	}

	public void setFbr_name(String fbr_name) {
		Fbr_name = fbr_name;
	}

	public String getFbr_mc() {
		return Fbr_mc;
	}

	public void setFbr_mc(String fbr_mc) {
		Fbr_mc = fbr_mc;
	}

	public String getFbr_tel() {
		return Fbr_tel;
	}

	public void setFbr_tel(String fbr_tel) {
		Fbr_tel = fbr_tel;
	}

	public String getRw_lx() {
		return Rw_lx;
	}

	public void setRw_lx(String rw_lx) {
		Rw_lx = rw_lx;
	}

	public String getGzqk() {
		return Gzqk;
	}

	public void setGzqk(String gzqk) {
		Gzqk = gzqk;
	}

	public int getCjsj() {
		return Cjsj;
	}

	public void setCjsj(int cjsj) {
		Cjsj = cjsj;
	}

	public int getTjsj() {
		return Tjsj;
	}

	public void setTjsj(int tjsj) {
		Tjsj = tjsj;
	}

	public String getFbr_dm() {
		return Fbr_dm;
	}

	public void setFbr_dm(String fbr_dm) {
		Fbr_dm = fbr_dm;
	}

	public int getRwzt_dm() {
		return Rwzt_dm;
	}

	public void setRwzt_dm(int rwzt_dm) {
		Rwzt_dm = rwzt_dm;
	}

	public String getRwzt_mc() {
		return Rwzt_mc;
	}

	public void setRwzt_mc(String rwzt_mc) {
		Rwzt_mc = rwzt_mc;
	}

	public String getYhbh() {
		return Yhbh;
	}

	public void setYhbh(String yhbh) {
		Yhbh = yhbh;
	}

	public String getYhmc() {
		return Yhmc;
	}

	public void setYhmc(String yhmc) {
		Yhmc = yhmc;
	}

	public String getGddw() {
		return Gddw;
	}

	public void setGddw(String gddw) {
		Gddw = gddw;
	}

	public String getAzdz() {
		return Azdz;
	}

	public void setAzdz(String azdz) {
		Azdz = azdz;
	}

	public String getZddz() {
		return Zddz;
	}

	public void setZddz(String zddz) {
		Zddz = zddz;
	}

	public String getZcbh() {
		return Zcbh;
	}

	public void setZcbh(String zcbh) {
		Zcbh = zcbh;
	}

	public String getHtrl() {
		return Htrl;
	}

	public void setHtrl(String htrl) {
		Htrl = htrl;
	}

	public String getDbzch() {
		return Dbzch;
	}

	public void setDbzch(String dbzch) {
		Dbzch = dbzch;
	}

	public String getLxr() {
		return Lxr;
	}

	public void setLxr(String lxr) {
		Lxr = lxr;
	}

	public String getDh() {
		return Dh;
	}

	public void setDh(String dh) {
		Dh = dh;
	}

	public String getDh1() {
		return Dh1;
	}

	public void setDh1(String dh1) {
		Dh1 = dh1;
	}

	public String getZbmklx() {
		return Zbmklx;
	}

	public void setZbmklx(String zbmklx) {
		Zbmklx = zbmklx;
	}

	public String getCjb_jd() {
		return Cjb_jd;
	}

	public void setCjb_jd(String cjb_jd) {
		Cjb_jd = cjb_jd;
	}

	public String getCjd_wd() {
		return Cjd_wd;
	}

	public void setCjd_wd(String cjd_wd) {
		Cjd_wd = cjd_wd;
	}

}