text:
package gov.nasa.arc.spife.core.plan.pear.view.wizard;

import gov.nasa.arc.spife.core.plan.pear.view.internal.Messages;
import gov.nasa.ensemble.common.ui.editor.lifecycle.EnsembleWizardPage;
import gov.nasa.ensemble.core.activityDictionary.ActivityDictionary;
import gov.nasa.ensemble.core.jscience.JSciencePackage;

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

import org.eclipse.emf.ecore.EDataType;
import org.eclipse.emf.ecore.EcorePackage;
import org.eclipse.jface.layout.GridDataFactory;
import org.eclipse.jface.layout.GridLayoutFactory;
import org.eclipse.swt.SWT;
import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.Combo;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Event;
import org.eclipse.swt.widgets.Group;
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Listener;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.ui.forms.events.ExpansionAdapter;
import org.eclipse.ui.forms.events.ExpansionEvent;
import org.eclipse.ui.forms.widgets.ExpandableComposite;

public class ProfileDataTypeWizardPage extends EnsembleWizardPage {

	public static final String CLAIM_MAX_VALUE = "1"; //$NON-NLS-1$

	private static final int DEFAULT_DIALOG_WIDTH = 500;
	private static final int DESCRIPTION_INDENT = 30;
	private static final int DEFAULT_LABEL_LENGTH = DEFAULT_DIALOG_WIDTH - DESCRIPTION_INDENT;

	private Map<String,EDataType> enumMap;
	private boolean isActivityResource;

	private Label claimDescriptionLabel;
	private Button claimButton; // Claim selection implies data type = Integer and max = 1.
	private Button booleanButton;
	private Button doubleButton;
	private Button integerButton;
	private GridDataFactory claimButtonGridDataFactory;
	private GridDataFactory claimDescriptionLabelGridDataFactory;

	private Button stringButton;
	private Button enumerationButton;
	private Combo enumerationCombo;
	private Button durationButton;
	private Button timeButton;

	private GridDataFactory advGridDataFactory;
	private Composite composite;
	private Group advancedComposite;
	private ExpandableComposite expComposite;
	private Composite[] radioComposites;

	public ProfileDataTypeWizardPage() {
		super("wizardPage"); //$NON-NLS-1$
		this.setTitle(Messages.ProfileDataTypeWizardPage_Title);
		setMessage(Messages.ProfileDataTypeWizardPage_Description);

		// Initialize the enum list values for the Defined Enumerations
		List<EDataType> list = ActivityDictionary.getInstance().getDefinitions(EDataType.class);
		enumMap = new HashMap<String, EDataType>();
		for(EDataType eenum: list) {
			enumMap.put(eenum.getName(), eenum);
		}
	}

	@Override
	public void createControl(Composite parent) {

		 composite = new Composite(parent, SWT.NONE);
		 GridLayoutFactory.fillDefaults().spacing(0, 10)
		 								 .applyTo(composite);

		 createDataTypes(composite);
		 createAdvancedContents(composite);

		 // Make sure all radio buttons are in the same group and react to each other
		 radioComposites = new Composite[] {composite, advancedComposite};

		 // Set the tab lists
		 composite.setTabList(new Control[]{claimButton,booleanButton,doubleButton,integerButton,expComposite,advancedComposite});
		 advancedComposite.setTabList(new Control[]{stringButton,enumerationButton,enumerationCombo,durationButton,timeButton});

		 setControl(composite);
	}

	private void createDataTypes(Composite composite) {

		 // Claim
		 claimButton = new Button(composite, SWT.RADIO);
		 claimButton.setText(Messages.ProfileDataTypeWizardPage_ClaimButton);
		 claimButton.addListener(SWT.Selection, radioGroupListener);
		 claimButtonGridDataFactory = GridDataFactory.fillDefaults().indent(0, 5);
		 claimButtonGridDataFactory.applyTo(claimButton);

		 claimDescriptionLabel = new Label(composite, SWT.WRAP);
		 claimDescriptionLabel.setText(Messages.ProfileDataTypeWizardPage_ClaimLabel_Description);
		 claimDescriptionLabelGridDataFactory = GridDataFactory.fillDefaults().indent(DESCRIPTION_INDENT, 0)
		 							   								.hint(DEFAULT_LABEL_LENGTH, SWT.DEFAULT)
		 							   								.grab(true, false);
		 claimDescriptionLabelGridDataFactory.applyTo(claimDescriptionLabel);

		 // Boolean
		 booleanButton = new Button(composite, SWT.RADIO);
		 booleanButton.setText(Messages.ProfileDataTypeWizardPage_BooleanButton);
		 booleanButton.setSelection(true);
		 booleanButton.addListener(SWT.Selection, radioGroupListener);
		 GridDataFactory.fillDefaults().indent(0, 5)
									   .applyTo(booleanButton);

		 final Label booleanDescriptionLabel = new Label(composite, SWT.WRAP);
		 booleanDescriptionLabel.setText(Messages.ProfileDataTypeWizardPage_BooleanLable_Message);
		 GridDataFactory.fillDefaults().indent(DESCRIPTION_INDENT, 0)
		 							   .hint(DEFAULT_LABEL_LENGTH, SWT.DEFAULT)
		 							   .grab(true, false)
		 							   .applyTo(booleanDescriptionLabel);

		 // Double
		 doubleButton = new Button(composite, SWT.RADIO);
		 doubleButton.setText(Messages.ProfileDataTypeWizardPage_DoubleButton);
		 doubleButton.addListener(SWT.Selection, radioGroupListener);
		 GridDataFactory.fillDefaults().indent(0, 5)
									   .applyTo(doubleButton);

		 final Label doubleDescriptionLabel = new Label(composite, SWT.WRAP);
		 doubleDescriptionLabel.setText(Messages.ProfileDataTypeWizardPage_DoubleLabel_Description);
		 GridDataFactory.fillDefaults().indent(DESCRIPTION_INDENT, 0)
		 							   .hint(DEFAULT_LABEL_LENGTH, SWT.DEFAULT)
		 							   .grab(true, false)
		 							   .applyTo(doubleDescriptionLabel);

		 // Integer
		 integerButton = new Button(composite, SWT.RADIO);
		 integerButton.setText(Messages.ProfileDataTypeWizardPage_IntegerButton);
		 integerButton.addListener(SWT.Selection, radioGroupListener);
		 GridDataFactory.fillDefaults().indent(0, 5)
									   .applyTo(integerButton);

		 final Label integerDescriptionLabel = new Label(composite, SWT.WRAP);
		 integerDescriptionLabel.setText(Messages.ProfileDataTypeWizardPage_IntegerLabel_Description);
		 GridDataFactory.fillDefaults().indent(DESCRIPTION_INDENT, 0)
		 							   .hint(DEFAULT_LABEL_LENGTH, SWT.DEFAULT)
		 							   .grab(true, false)
		 							   .applyTo(integerDescriptionLabel);
	}

	/**
	 * Upon expanding and hiding the advanced controls will adjust accordingly.
	 *
	 * @param e
	 */
	private void updateAdvancedArea(ExpansionEvent e) {

		// Set the visibility of the advanced section
		advancedComposite.setVisible(e.getState());
		// We want to exclude the advanced composite if it is not visible
		advGridDataFactory.exclude(!e.getState()).applyTo(advancedComposite);

		// Set Boolean selection when advanced is hidden
		if(!e.getState() && isAdvancedRadioSelected()) {
			clearSelections();
			booleanButton.setSelection(true);
		}

		// Resize and update layout
		refreshLayout();
	}

	/**
	 * The Advanced control section.
	 *
	 * @param composite
	 * @param label
	 * @param nColumns
	 */
	private void createAdvancedContents(Composite composite) {

		expComposite = new ExpandableComposite(composite, SWT.NONE,
								ExpandableComposite.TWISTIE | ExpandableComposite.CLIENT_INDENT | SWT.NO_FOCUS);
		expComposite.setText(Messages.ProfileDataTypeWizardPage_AdvancedTwistie);
		expComposite.setExpanded(false);
		expComposite.addExpansionListener(new ExpansionAdapter() {

			@Override
			public void expansionStateChanged(ExpansionEvent event) {

				// Update Advanced Components
				updateAdvancedArea(event);
			}
		});
		GridDataFactory.fillDefaults().grab(true, false)
									  .applyTo(expComposite);

		advancedComposite = new Group(composite, SWT.BORDER);
		advancedComposite.setVisible(false);
		GridLayoutFactory.fillDefaults().numColumns(2).margins(5, 5).applyTo(advancedComposite);
		advGridDataFactory = GridDataFactory.fillDefaults()
									  // exclude this because it is hidden by default and will mess up
									  // the wizard sizing.
									  .exclude(true)
									  .indent(SWT.DEFAULT, -10);
		advGridDataFactory.applyTo(advancedComposite);

		// String
		stringButton = new Button(advancedComposite, SWT.RADIO);
		stringButton.setText(Messages.ProfileDataTypeWizardPage_StringButton);
		stringButton.addListener(SWT.Selection, radioGroupListener);
		GridDataFactory.fillDefaults().indent(0, 5)
									  .span(2, 1)
									  .applyTo(stringButton);

		final Label stringDescriptionLabel = new Label(advancedComposite, SWT.WRAP);
		stringDescriptionLabel.setText(Messages.ProfileDataTypeWizardPage_StringLabel_Description);
		GridDataFactory.fillDefaults().indent(DESCRIPTION_INDENT, 0)
									  .span(2, 1)
									  .hint(DEFAULT_LABEL_LENGTH, SWT.DEFAULT)
									  .grab(true, false)
									  .applyTo(stringDescriptionLabel);

		// Defined Enumeration
		enumerationButton = new Button(advancedComposite, SWT.RADIO);
		enumerationButton.setText(Messages.ProfileDataTypeWizardPage_DefinedEnumerationButton);
		enumerationButton.addListener(SWT.Selection, radioGroupListener);
		GridDataFactory.fillDefaults().indent(0, 5)
									  .span(1, 1)
									  .applyTo(enumerationButton);

		enumerationCombo = new Combo(advancedComposite, SWT.READ_ONLY);
		enumerationCombo.addModifyListener(new DefaultModifyListener());
		enumerationCombo.setEnabled(false);
		GridDataFactory.swtDefaults().indent(15, 5)
									 .hint(250, SWT.DEFAULT)
		 							 .applyTo(enumerationCombo);
		String[] enums = enumMap.keySet().toArray(new String[0]);
		Arrays.sort(enums);
		enumerationCombo.setItems(enums);
		enumerationCombo.select(0);

		final Label definedEnumerationLabel = new Label(advancedComposite, SWT.WRAP);
		definedEnumerationLabel.setText(Messages.ProfileDataTypeWizardPage_DefinedEnumerationLabel_Description);
		GridDataFactory.fillDefaults().indent(DESCRIPTION_INDENT, 0)
									  .span(2, 1)
									  .hint(DEFAULT_LABEL_LENGTH, SWT.DEFAULT)
									  .grab(true, false)
									  .applyTo(definedEnumerationLabel);

		// Duration
		durationButton = new Button(advancedComposite, SWT.RADIO);
		durationButton.setText(Messages.ProfileDataTypeWizardPage_DurationButton);
		durationButton.addListener(SWT.Selection, radioGroupListener);
		GridDataFactory.fillDefaults().indent(0, 5)
									  .span(2, 1)
									  .applyTo(durationButton);

		final Label durationDescriptionLabel = new Label(advancedComposite, SWT.WRAP);
		durationDescriptionLabel.setText(Messages.ProfileDataTypeWizardPage_DurationButtonLabel_Description);
		GridDataFactory.fillDefaults().indent(DESCRIPTION_INDENT, 0)
									  .span(2, 1)
									  .hint(DEFAULT_LABEL_LENGTH, SWT.DEFAULT)
									  .grab(true, false)
									  .applyTo(durationDescriptionLabel);

		// Time
		timeButton = new Button(advancedComposite, SWT.RADIO);
		timeButton.setText(Messages.ProfileDataTypeWizardPage_TimeButton);
		timeButton.addListener(SWT.Selection, radioGroupListener);
		GridDataFactory.fillDefaults().indent(0, 5)
									  .span(2, 1)
									  .applyTo(stringButton);

		final Label timeDescriptionLabel = new Label(advancedComposite, SWT.WRAP);
		timeDescriptionLabel.setText(Messages.ProfileDataTypeWizardPage_TimeLabel_Description);
		GridDataFactory.fillDefaults().indent(DESCRIPTION_INDENT, 0)
									  .span(2, 1)
									  .hint(DEFAULT_LABEL_LENGTH, SWT.DEFAULT)
									  .grab(true, false)
									  .applyTo(timeDescriptionLabel);
	}

	protected boolean isAdvancedRadioSelected() {
		return stringButton.getSelection() || enumerationButton.getSelection()
				|| durationButton.getSelection() || timeButton.getSelection();
	}

	public boolean isClaimSelected() {
		return claimButton.getSelection();
	}

	public boolean isExternalCondition() {
		return booleanButton.getSelection();
	}

	/**
	 * This listener makes sure that all radios on the wizard page are grouped
	 * and reacts together, even though there are in separate Composites.
	 */
	private Listener radioGroupListener = new Listener() {
		@Override
		public void handleEvent(Event event) {
			// clear previous selections
			clearSelections();
			Button button = (Button) event.widget;
			button.setSelection(true);

			// Enable Enumeration combo if the radio button is selected
			enumerationCombo.setEnabled(button == enumerationButton);

			getWizard().getContainer().updateButtons();
		}
	};

	/**
	 * Clears any radio selection
	 */
	private void clearSelections() {
		for (int i = 0; i < radioComposites.length; i++) {
			Composite composite = radioComposites[i];
			Control[] children = composite.getChildren();
			for (int j = 0; j < children.length; j++) {
				Control child = children[j];
				if (child instanceof Button) {
					Button button = (Button) child;
					if ((button.getStyle() & SWT.RADIO) != 0)
						button.setSelection(false);
				}
			}
		}
	}

	/**
	 * Show the Claim option only if the Profile is an Activity Resource.
	 *
	 * @param isActivityResource
	 */
	public void setActivityResource(boolean isActivityResource) {

		this.isActivityResource = isActivityResource;

		if(claimButton != null) {
			claimButtonGridDataFactory.exclude(!isActivityResource).applyTo(claimButton);
			claimButton.setVisible(isActivityResource);
		}
		if(claimDescriptionLabel != null) {
			claimDescriptionLabelGridDataFactory.exclude(!isActivityResource).applyTo(claimDescriptionLabel);
			claimDescriptionLabel.setVisible(isActivityResource);
		}

		// If the claim button WAS selected and the claim option is NOW hidden
		// (since the user went back and set the profile to an External Condition data type),
		// we want to set the default selection to Boolean.
		if (!isActivityResource && claimButton.getSelection()) {
			claimButton.setSelection(false);
			// Set new default to Boolean
			booleanButton.setSelection(true);
		}

		// Resize and update layout
		refreshLayout();
	}

	/**
	 * Refresh and adjust the dialog and the controls.
	 */
	private void refreshLayout() {

		// Ask the receiver to lay out its controls
		composite.layout();

		// Adjust the wizard page to fit the visible controls
		Shell shell = getShell();
		shell.setSize(shell.computeSize(shell.getSize().x, SWT.DEFAULT));
	}

	public EDataType getDataType() {
		if(booleanButton.getSelection()) {
			return EcorePackage.Literals.EBOOLEAN_OBJECT;
		}
		else if(doubleButton.getSelection()) {
			return EcorePackage.Literals.EDOUBLE_OBJECT;
		}
		else if(integerButton.getSelection() || claimButton.getSelection()) {
			return EcorePackage.Literals.EINTEGER_OBJECT;
		}
		else if(stringButton.getSelection()) {
			return EcorePackage.Literals.ESTRING;
		}
		else if(enumerationButton.getSelection()) {
			String enumName = enumerationCombo.getText();
			return enumMap.get(enumName);
		}
		else if(durationButton.getSelection()) {
			return JSciencePackage.Literals.EDURATION;
		}
		else if(timeButton.getSelection()) {
			return EcorePackage.Literals.EDATE;
		}
		return null;
	}

	public String getDataTypeLiteral() {
		if(booleanButton.getSelection()) {
			return "boolean";
		}
		else if(doubleButton.getSelection()) {
			return "double";
		}
		else if(integerButton.getSelection() || claimButton.getSelection()) {
			return "integer";
		}
		else if(stringButton.getSelection()) {
			return "string";
		}
		else if(enumerationButton.getSelection()) {
			String enumName = enumerationCombo.getText();
			return enumName;
		}
		else if(durationButton.getSelection()) {
			return "duration";
		}
		else if(timeButton.getSelection()) {
			return "date";
		}
		return "";
	}

	public boolean canFinish() {
		return !isActivityResource
				|| (!doubleButton.getSelection() && !integerButton.getSelection()
						&& !durationButton.getSelection() && !timeButton.getSelection());
	}

	@Override
	public boolean canFlipToNextPage() {
		// Allows to flip to Max/Min page if the Profile is an Activity Resource
		// with datatype of Double/Integer/Duration/Time.
		return isActivityResource
				&& (doubleButton.getSelection() || integerButton.getSelection()
						|| durationButton.getSelection() || timeButton.getSelection());
	}
}


text:
<?php return [
    /*
    |--------------------------------------------------------------------------
    | Website Name
    |--------------------------------------------------------------------------
    |
    | This value is the name of your website. This value is used to Created
    | title for each page. It is also used in navigation bar. For personal
    | website, it should be set to your full name, (e.g. Rahul Kadyan).
    |
    */
    'siteName' => 'My Serene Website',

    /*
    |--------------------------------------------------------------------------
    | Website Description
    |--------------------------------------------------------------------------
    |
    | This value is the short description of your website. This value is
    | used to provide meta information to search engines or websites.
    | Try to keep it short (upto 200 characters) and simple.
    |
    */
    'siteDescription' => 'My space on the internet - another Sereno website.',

    /*
    |--------------------------------------------------------------------------
    | Github Pages
    |--------------------------------------------------------------------------
    |
    | Use Github Pages to publish your website for free.
    |
    */
    'github' => [
        /*
        |--------------------------------------------------------------------------
        | Repository
        |--------------------------------------------------------------------------
        |
        | The `repository` where the project is hosted.
        |
        */
        // 'repository' => 'git@github.com:user/repository.git',

        /*
        |--------------------------------------------------------------------------
        | Branch
        |--------------------------------------------------------------------------
        |
        | The `branch` value is used to publish your website on Github Pages.
        |
        | Possible values for `branch`:
        |   - master
        |     For your personal website.
        |     Name of the repository is `<your github username>.github.io`.
        |     Your default working branch should be 'dev' (anything but not master).
        |
        |   - gh-pages
        |     For project website.
        |     Your default working branch should be 'master' (anything but not gh-pages).
        */
        // 'branch' => 'gh-pages',

        /*
        |--------------------------------------------------------------------------
        | Git User
        |--------------------------------------------------------------------------
        |
        | Use this user to deploy built files.
        |
        */
        // 'user' => [
        //     'name' => '',
        //     'email' => '',
        // ],
    ],

    'sereno' => [
        'cache' => '_cache',

        'public' => 'public',
        /*
        |--------------------------------------------------------------------------
        | Website URL
        |--------------------------------------------------------------------------
        |
        | This URL is used by the Sereno to properly generate URLs when using
        | the building the website. You should set this to the root of your
        | website so that it is generates correct URLs for pages & assets.
        |
        */
        'url' => '/',

        /*
        |--------------------------------------------------------------------------
        | Commands
        |--------------------------------------------------------------------------
        |
        | Add commands to Sereno CLI.
        |
        */
        'commands' => [],

        /*
        |--------------------------------------------------------------------------
        | Extensions
        |--------------------------------------------------------------------------
        |
        | Extensions add functionalities to Sereno. `DefaultExtension` provides
        | all the features offered by Sereno.
        |
        */
        'extensions' => [],

        /*
        |--------------------------------------------------------------------------
        | Website Content Directories
        |--------------------------------------------------------------------------
        |
        | These directories would be searched recursively to generate your website.
        |
        */
        'directory' => [
            'content',
        ],

        /*
        |--------------------------------------------------------------------------
        | Views
        |--------------------------------------------------------------------------
        |
        | Override default views from themes.
        |
        */
        'views' => [
            'resources/views',
        ],

        /*
        |--------------------------------------------------------------------------
        | Special Files
        |--------------------------------------------------------------------------
        |
        | Preserve names of these files.
        |
        */
        'special_files' => [
            '404',
        ],

        /*
        |--------------------------------------------------------------------------
        | Ignored Files
        |--------------------------------------------------------------------------
        |
        | These files won't appear in your generated website.
        |
        */
        'ignore' => [],

        /*
        |--------------------------------------------------------------------------
        | Markdown Configuration for Website
        |--------------------------------------------------------------------------
        |
        | The `extends` value sets the parent blade component for the markdown
        | renderer. And `yields` value places the content in the designated
        | place on the parent blade component.
        |
        */
        'markdown' => [
            'extends' => 'markdown',
            'yields' => 'markdown-body',
        ],
    ],

    /*
    |--------------------------------------------------------------------------
    | Translation
    |--------------------------------------------------------------------------
    |
    |
    |
    */
    '_translator' => [
        'dir' => 'resources/lang',
        'locale' => 'en',
        'fallback_locale' => 'en',
    ],
];

redpajama_set_name: RedPajamaGithub


text:
<?php
/**
 * KodiPress Theme Customizer
 *
 * @package KodiPress
 */

/**
 * Add postMessage support for site title and description for the Theme Customizer.
 *
 * @param WP_Customize_Manager $wp_customize Theme Customizer object.
 */
function kodipress_customize_register( $wp_customize ) {
	$wp_customize->get_setting( 'blogname' )->transport         = 'postMessage';
	$wp_customize->get_setting( 'blogdescription' )->transport  = 'postMessage';
	$wp_customize->get_setting( 'header_textcolor' )->transport = 'postMessage';
}
add_action( 'customize_register', 'kodipress_customize_register' );

/**
 * Binds JS handlers to make Theme Customizer preview reload changes asynchronously.
 */
function kodipress_customize_preview_js() {
	wp_enqueue_script( 'kodipress_customizer', get_template_directory_uri() . '/js/customizer.js', array( 'customize-preview' ), '20130508', true );
}
add_action( 'customize_preview_init', 'kodipress_customize_preview_js' );


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

<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
<TITLE>
tot.dao.jdbc
</TITLE>

<META NAME="keywords" CONTENT="tot.dao.jdbc package">

<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../stylesheet.css" TITLE="Style">

tot.dao.jdbc

类

AdDaoImplJDBC

AdminDaoImplJDBC

AgencyDaoImplJDBC

AnswerDaoImplJDBC

AreaDaoImplJDBC

AreasDaoImplJDBC

ArticleDaoImplJDBC

AskDaoImplJDBC

CategoryDaoImplJDBC

CityDaoImplJDBC

CommenDaoImplJDBC

CongealMoneyDaoImplJDBC

DbImportDaoImplJDBC

DownloadCommenDaoImplJDBC

DownloadDaoImplJDBC

EbookCommenDaoImplJDBC

EbookDaoImplJDBC

EbookLabelDaoImplJDBC

EduCommenDaoImplJDBC

EduDownloadDaoImplJDBC

EduGradeDaoImplJDBC

EduSubjectDaoImplJDBC

EduVersionDaoImplJDBC

FetchDaoImplJDBC

FlinkDaoImplJDBC

FloorDaoImplJDBC

FloorLevelDaoImplJDBC

FloorNewsDaoImplJDBC

GatherDaoImplJdbc

GatherHisDaoImplJDBC

GuestbookDaoImplJDBC

HouseDaoImplJDBC

HxDaoImplJDBC

IndustryDaoImplJDBC

InfoTypeDaoImplJDBC

KeywordsDaoImplJDBC

LabelDaoImplJDBC

MemberDaoImplJDBC

NetOfficeDaoImplJDBC

PubServerDaoImplJDBC

RoleDaoImplJDBC

RoomTypeDaoImplJDBC

SecondhandDaoImplJDBC

SourceDaoImplJDBC

SpecialDaoImplJDBC

StarTeachDaoImplJDBC

StudentDaoImplJDBC

TeacherDaoImplJDBC

TemplateDaoImplJDBC

TotgbDaoImplJDBC

TransactionDaoImplJDBC

TutorNewsDaoImplJDBC

VideoCommenDaoImplJDBC

VideoDaoImplJDBC

VoteDaoImplJDBC


text:
class AliFemtoVertexAnalysis : public AliFemtoSimpleAnalysis {
public:
  AliFemtoVertexAnalysis(unsigned int bins=10, double min=-100., double max=+100.);
  AliFemtoVertexAnalysis(const AliFemtoVertexAnalysis& OriginalAnalysis);  /// copy constructor
  AliFemtoVertexAnalysis& operator=(const AliFemtoVertexAnalysis& OriginalAnalysis);
  virtual void ProcessEvent(const AliFemtoEvent* ProcessThisEvent);
  virtual ~AliFemtoVertexAnalysis();

  virtual AliFemtoString Report();     ///< returns reports of all cuts applied and correlation functions being done
  virtual unsigned int Overflow();
  virtual unsigned int Underflow();

protected:
  double fVertexZ[2];       ///< min/max z-vertex position allowed to be processed
  unsigned int fVertexBins; ///< number of mixing bins in z-vertex in EventMixing Buffer
  unsigned int fOverFlow;   ///< number of events encountered which had too large z-vertex
  unsigned int fUnderFlow;  ///< number of events encountered which had too small z-vertex

#ifdef __ROOT__
  /// \cond CLASSIMP
  ClassDef(AliFemtoVertexAnalysis, 0);
  /// \endcond
#endif
};

inline unsigned int AliFemtoVertexAnalysis::Overflow()
{
  return fOverFlow;
}
inline unsigned int AliFemtoVertexAnalysis::Underflow()
{
  return fOverFlow;
}

#endif


text:
flask-paginate
==============

Paginate support for flask framework (study from will_paginate).
Use bootstrap for css framework
It requires Python2.6+ as string.format syntax.

If you want to show pagination-info
("Total 100 posts, displaying 20 - 30")
above the pagination links,
please add below lines to your css file::

.. sourcecode:: css

    .pagination-page-info {
        padding: .6em;
        padding-left: 0;
        width: 40em;
        margin: .5em;
        margin-left: 0;
        font-size: 12px;
    }
    .pagination-page-info b {
        color: black;
        background: #6aa6ed;
        padding-left: 2px;
        padding: .1em .25em;
        font-size: 150%;
    }

Full documention: <http://pythonhosted.org/Flask-paginate/>

Run example:

    $cd example
    $python sql.py
    $python sql.py init_db
    $python sql.py fill_data
    $cp app.cfg.example app.cfg
    $echo edit app.cfg
    $python app.py

Open <http://localhost:5000> to see the example page.

![demo](/example/demo.png "demo")


text:
# Hangup Class

The Hangup verb is used to hangup current call.

## Inheritance Hierarchy
System.Object
  Bandwidth.Net.Xml.Verbs.Hangup

**Namespace:** Bandwidth.Net.Xml.Verbs
**Assembly:** Bandwidth.Net (in Bandwidth.Net.dll) Version: 3.0.3

## Syntax

**C#**

``` C#
public class Hangup : IVerb
```

The Hangup type exposes the following members.

## Constructors

	Name	Description

![Public method](media/pubmethod.gif "Public method")	Hangup
Initializes a new instance of the Hangup class

Back to Top

## See Also

#### Reference
Bandwidth.Net.Xml.Verbs Namespace

#### Other Resources
http://ap.bandwidth.com/docs/xml/hangup/


text:
"""Playback from a set of simple tunes via MIDI.

MIDI output circuit:

https://www.midi.org/articles/midi-electrical-specifications

1. 5V (3.3V) connected to MIDI output socket pin 4 via 220 (35) ohm resistor
2. GND connected to MIDI output socket pin 2
3. UART2 TX pin connected to MIDI output socket pin 5 via 220 (10) ohm resistor

Switch buttons:

4. A push button between pin PC0 and GND
5. A push button between pin PC1 and GND

"""

from pyb import delay, LED, Pin, Switch, UART
from midi.midiout import MidiOut
from tunes import TUNES

TUNENAMES = ['DADADADUM', 'ENTERTAINER', 'PRELUDE', 'ODE', 'NYAN', 'RINGTONE',
    'FUNK', 'BLUES', 'BIRTHDAY', 'WEDDING', 'FUNERAL', 'PUNCHLINE', 'PYTHON',
    'BADDY', 'CHASE', 'WAWAWAWAA', 'JUMP_UP', 'JUMP_DOWN', 'POWER_UP',
    'POWER_DOWN']

PROGRAMS = [
    0,   # Acoustic Grand Piano
    49,  # String Esemble
    25,  # Acoustic Guitar
    35,  # Picked Electric Bass
    10,  # Glockenspiel
]

NOTES = {
    'c': 0,
    'd': 2,
    'e': 4,
    'f': 5,
    'g': 7,
    'a': 9,
    'b': 11,
}

BLINK_DELAY = 200

def play(midi, notes, led, bpm=120):
    duration = octave = 4
    mpt = 60000 / bpm / 4

    try:
        for note in notes:
            try:
                note, duration = note.split(':')
                duration = int(duration)
            except:
                pass

            try:
                octave = int(note[-1])
                note = note[:-1]
            except (ValueError, IndexError):
                pass

            note = note.lower()
            midinote = NOTES.get(note[0])

            if midinote is not None:
                if note.endswith('#'):
                    midinote += 1
                elif len(note) > 1 and note.endswith('b'):
                    midinote -= 1

                midinote = max(0, min(127, midinote + 12 * octave))
                midi.note_on(midinote, 96)
                led.on()

            delay(int(duration * mpt))

            if midinote is not None:
                midi.note_off(midinote)
                led.off()

        # make sure led and last note is turned off
        if midinote is not None:
            led.off()
            midi.note_off(midinote)
    except Exception:
        # Send all sound off to prevent hanging notes
        midi.control_change(0x78, 0)

def main():
    # Initialize UART for MIDI
    uart = UART(2, baudrate=31250)
    midi = MidiOut(uart)
    button1 = Switch()
    button2 = Pin('PC0', Pin.IN, Pin.PULL_UP)
    button3 = Pin('PC1', Pin.IN, Pin.PULL_UP)
    led1 = LED(1)
    led2 = LED(2)
    led3 = LED(3)
    tune = program = 0

    # send a PROGRAM CHANGE to set instrument to #0 (Grand Piano)
    midi.program_change(program)

    while True:
        if button1():
            # When button 1 is pressed, play the current tune
            play(midi, TUNES[TUNENAMES[tune]], led1)
            led1.off()
        if not button2():
            # When button 2 is pressed, select the next of the tunes
            led2.on()
            tune = (tune+1) % len(TUNENAMES)
            delay(BLINK_DELAY)
            led2.off()
        if not button3():
            # When button 3 is pressed, change to next program (instrument)
            led3.on()
            program = (program+1) % len(PROGRAMS)
            midi.program_change(PROGRAMS[program])
            delay(BLINK_DELAY)
            led3.off()

        delay(200)


text:
/**
 * http://usejsdoc.org/
 */
var Hero = require('../models/Hero.js');

function heroServices() {

	var self = this;

	/**
	 * @method save
	 * @param req
	 * @param callback
	 * @description
	 * inserts documents into DB.
	 */
	function save(req, callback) {
		// create a hero object from Hero model
		var hero = new Hero(req.body);
		// save method to insert data in DB
		hero.save(function(err) {
			if(err) {
				callback(err, 'send');
			} else {
				callback({message: 'saved succesfully'}, 'json');
			}
		});
	}

	/**
	 * @method query
	 * @param req
	 * @param callback
	 * @description
	 * gets all documents from DB.
	 */
	function query(req, callback) {
		Hero.find(function(err, heroes) {
			if(err) {
				callback(err, 'send');
			} else {
				callback(heroes, 'json');
			}
		});
	}

	/**
	 * @method update
	 * @param req
	 * @param callback
	 * @description
	 * updates a document into DB.
	 */
	function update(req, callback) {
		// get updated Hero model object
		var updateHero = new Hero(req.body);
		// Convert the Model instance to a simple object using Model's 'toObject' function
		var upsertData = updateHero.toObject();
		// delete _id from the simple object before updating
		delete upsertData._id;

		Hero.update({_id: req.params.id}, upsertData, {upsert: true}, function(err) {
			if(err) {
				callback(err, 'send');
			} else {
				callback({message: 'updated succesfully'}, 'json');
			}
		});
	}

	/**
	 * @method queryOne
	 * @param req
	 * @param callback
	 * @description
	 * gets only single document from DB.
	 */
	function queryOne(heroId, callback) {
		Hero.findById(heroId, function(err, heroes) {
			if(err) {
				callback(err, 'send');
			} else {
				callback(heroes, 'json');
			}
		});
	}

	/**
	 * @method powers
	 * @param req
	 * @param callback
	 * @description
	 * gets all powers related to a super hero from DB.
	 */
	function powers(heroId, callback) {
		queryOne(heroId, callback);
	}

	return {
		save: save,
		query: query,
		queryOne: queryOne,
		update: update,
		powers: powers
	};
}

module.exports = heroServices();


text:
#ifndef _CALLBACKNATIVE_H
#define _CALLBACKNATIVE_H

#include "AboutObjHost.h"
#include "BusErrorHost.h"
#include "InterfaceDescriptionNative.h"
#include "MessageHost.h"
#include "NativeObject.h"
#include "PluginData.h"
#include "ProxyBusObjectHost.h"
#include "SessionOptsHost.h"
#include "SocketFdHost.h"
#include <alljoyn/Session.h>
#include <vector>

class CallbackNative : public NativeObject {
  public:
    CallbackNative(Plugin& plugin, NPObject* objectValue);
    virtual ~CallbackNative();

    void onCallback(QStatus status);
    void onCallback(QStatus status, bool b);
    void onCallback(QStatus status, qcc::String& s);
    void onCallback(QStatus status, uint32_t u);
    void onCallback(QStatus status, ajn::SessionId id, SessionOptsHost& opts);
    void onCallback(QStatus status, ajn::SessionPort port);
    void onCallback(QStatus status, MessageHost& message, const ajn::MsgArg* args, size_t numArgs);
    void onCallback(QStatus status, AboutObjHost& aboutObj);
    void onCallback(QStatus status, ProxyBusObjectHost& proxyBusObject);
    void onCallback(QStatus status, SocketFdHost& socketFd);
    void onCallback(QStatus status, InterfaceDescriptionNative* interfaceDescription);
    void onCallback(QStatus status, InterfaceDescriptionNative** interfaceDescription, size_t numInterfaces);
    void onCallback(QStatus status, std::vector<ProxyBusObjectHost>& children);
    void onCallback(BusErrorHost& busError);

    static void DispatchCallback(Plugin& plugin, CallbackNative* callbackNative, QStatus status);
    static void DispatchCallback(Plugin& plugin, CallbackNative* callbackNative, QStatus status, bool b);
    static void DispatchCallback(Plugin& plugin, CallbackNative* callbackNative, QStatus status, qcc::String& s);
    static void DispatchCallback(Plugin& plugin, CallbackNative* callbackNative, QStatus status, uint32_t u);
    static void DispatchCallback(Plugin& plugin, CallbackNative* callbackNative, QStatus status, ajn::SessionPort port);
    static void DispatchCallback(Plugin& plugin, CallbackNative* callbackNative, QStatus status, AboutObjHost& aboutObj);
    static void DispatchCallback(Plugin& plugin, CallbackNative* callbackNative, QStatus status, ProxyBusObjectHost& proxyBusObject);
    static void DispatchCallback(Plugin& plugin, CallbackNative* callbackNative, QStatus status, SocketFdHost& socketFd);
    static void DispatchCallback(Plugin& plugin, CallbackNative* callbackNative, QStatus status, InterfaceDescriptionNative* interfaceDescription);
    static void DispatchCallback(Plugin& plugin, CallbackNative* callbackNative, QStatus status, InterfaceDescriptionNative** interfaceDescription, size_t numInterfaces);
    static void DispatchCallback(Plugin& plugin, CallbackNative* callbackNative, QStatus status, std::vector<ProxyBusObjectHost>& children);

  private:
    static void _StatusCallbackCB(PluginData::CallbackContext* ctx);
    static void _BoolCallbackCB(PluginData::CallbackContext* ctx);
    static void _StringCallbackCB(PluginData::CallbackContext* ctx);
    static void _UnsignedLongCallbackCB(PluginData::CallbackContext* ctx);
    static void _BindSessionPortCallbackCB(PluginData::CallbackContext* ctx);
    static void _GetAboutObjectCallbackCB(PluginData::CallbackContext* ctx);
    static void _GetProxyBusObjectCallbackCB(PluginData::CallbackContext* ctx);
    static void _GetSessionFdCallbackCB(PluginData::CallbackContext* ctx);
    static void _GetInterfaceCallbackCB(PluginData::CallbackContext* ctx);
    static void _GetInterfacesCallbackCB(PluginData::CallbackContext* ctx);
    static void _GetChildrenCallbackCB(PluginData::CallbackContext* ctx);
};

#endif // _CALLBACKNATIVE_H


text:
package memorymanager.controller.addresses;

import api.model.QuantumMemoryAddress;

/**
 * @author Artur Vasilov
 */
public class GlobalQubitAddress {

    private long globalId;

    private QuantumMemoryAddress quantumMemoryAddress;

    public GlobalQubitAddress(long globalId, QuantumMemoryAddress quantumMemoryAddress) {
        this.globalId = globalId;
        this.quantumMemoryAddress = quantumMemoryAddress;
    }

    public long getGlobalId() {
        return globalId;
    }

    public QuantumMemoryAddress getQuantumMemoryAddress() {
        return quantumMemoryAddress;
    }
}


text:
#ifndef __ZMQ_ERR_HPP_INCLUDED__
#define __ZMQ_ERR_HPP_INCLUDED__

#include <assert.h>
#include <errno.h>
#include <string.h>
#include <stdlib.h>
#include <stdio.h>

#include "platform.hpp"
#include "likely.hpp"

#ifdef ZMQ_HAVE_WINDOWS
#include "windows.hpp"
#else
#include <netdb.h>
#endif

#ifdef ZMQ_HAVE_WINDOWS

namespace zmq
{

    const char *wsa_error ();
    void win_error (char *buffer_, size_t buffer_size_);
    void wsa_error_to_errno ();

}

//  Provides convenient way to check WSA-style errors on Windows.
#define wsa_assert(x) \
    do {\
        if (unlikely (!(x))) {\
            const char *errstr = zmq::wsa_error ();\
            if (errstr != NULL) {\
                fprintf (stderr, "Assertion failed: %s (%s:%d)\n", errstr, \
                    __FILE__, __LINE__);\
                abort ();\
            }\
        }\
    } while (false)

// Provides convenient way to check GetLastError-style errors on Windows.
#define win_assert(x) \
    do {\
        if (unlikely (!(x))) {\
            char errstr [256];\
            zmq::win_error (errstr, 256);\
            fprintf (stderr, "Assertion failed: %s (%s:%d)\n", errstr, \
                __FILE__, __LINE__);\
            abort ();\
        }\
    } while (false)

#endif

//  This macro works in exactly the same way as the normal assert. It is used
//  in its stead because standard assert on Win32 in broken - it prints nothing
//  when used within the scope of JNI library.
#define zmq_assert(x) \
    do {\
        if (unlikely (!(x))) {\
            fprintf (stderr, "Assertion failed: %s (%s:%d)\n", #x, \
                __FILE__, __LINE__);\
            abort ();\
        }\
    } while (false)

//  Provides convenient way to check for errno-style errors.
#define errno_assert(x) \
    do {\
        if (unlikely (!(x))) {\
            perror (NULL);\
            fprintf (stderr, "%s (%s:%d)\n", #x, __FILE__, __LINE__);\
            abort ();\
        }\
    } while (false)

// Provides convenient way to check for POSIX errors.
#define posix_assert(x) \
    do {\
        if (unlikely (x)) {\
            fprintf (stderr, "%s (%s:%d)\n", strerror (x), __FILE__, __LINE__);\
            abort ();\
        }\
    } while (false)

// Provides convenient way to check for errors from getaddrinfo.
#define gai_assert(x) \
    do {\
        if (unlikely (x)) {\
            const char *errstr = gai_strerror (x);\
            fprintf (stderr, "%s (%s:%d)\n", errstr, __FILE__, __LINE__);\
            abort ();\
        }\
    } while (false)

#endif

#define zmq_not_implemented() \
    do {\
        fprintf (stderr, "Hic sunt leones (%s:%d)\n", __FILE__, __LINE__);\
        abort ();\
    } while (false)


text:
const $ = require('jquery');

let volCapSortOrder = true;
const darkTheme = document.documentElement.classList.contains('cmce-dark');

function sortTable(table, col, reverse) {
  const tb = table.tBodies[0];
  const reverser = -((+reverse) || -1);
  let tr = Array.prototype.slice.call(tb.rows, 0);
  let i;

  tr = tr.sort((a, b) => {
    let aVal = parseFloat(a.cells[col].textContent.trim());
    let bVal = parseFloat(b.cells[col].textContent.trim());

    aVal = isNaN(aVal) ? 0 : aVal;
    bVal = isNaN(bVal) ? 0 : bVal;

    return reverser * (aVal - bVal);
  });

  for (i = 0; i < tr.length; i += 1) {
    tb.appendChild(tr[i]);
  }

  volCapSortOrder = !volCapSortOrder;
}

/**
 * Adds the new header to the table.
 * @param {*}
 * @param {*}
 */
function addNewHeader($table, $currencyHeader, columnOffset) {
  const $neighbor = $currencyHeader.children[$currencyHeader.childElementCount - columnOffset];
  const $newColumnHeader = $neighbor.cloneNode(true);

  $newColumnHeader.className = 'sortable text-right sorting';
  $newColumnHeader.attributes['aria-label'].value = 'Vol / Cap';
  $newColumnHeader.id = 'th-vol-cap';
  $newColumnHeader.innerHTML = 'Volume / Cap';
  $newColumnHeader.addEventListener('click', () => {
    sortTable($table, $currencyHeader.childElementCount - columnOffset - 1, volCapSortOrder);
  });

  $currencyHeader.insertBefore($newColumnHeader, $neighbor);
}

function addNewColumn($row, columnOffset) {
  const VOL_CAP_MAX = 20;
  const $neighbor = $row.children[$row.childElementCount - columnOffset];
  const cap = parseFloat($row.querySelector('.market-cap').attributes['data-usd'].value);
  const vol = parseFloat($row.querySelector('a[class="volume"]').attributes['data-usd'].value);
  const volToCap = (((vol / cap) * 100).toFixed(2));
  const volToCapStr = isNaN(volToCap) ? '?' : `${volToCap}%`;
  let colorRatio;
  let alpha;

  if (darkTheme) {
    colorRatio = 100 - ((Math.min(volToCap, VOL_CAP_MAX) / VOL_CAP_MAX) * 45);
    alpha = 0.8;
  } else {
    colorRatio = (Math.min(volToCap, VOL_CAP_MAX) / VOL_CAP_MAX) * 45;
    alpha = 1;
  }

  const colorVal = `hsla(140, 100%, ${colorRatio}%, ${alpha})`;

  const $newColumnCell = document.createElement('td');
  $newColumnCell.className = 'no-wrap text-right';
  $newColumnCell.innerHTML = volToCapStr;
  $newColumnCell.style.color = colorVal;
  $newColumnCell.style.width = '112px';
  $row.insertBefore($newColumnCell, $neighbor);
}

function makeRowClickable($row) {
  const coinRowId = `${$row.getAttribute('id')}_rowDetail`;
  const iframeId = `${$row.getAttribute('id')}_rowIframe`;
  const numCols = $row.getElementsByTagName('td').length;
  const href = $row.getElementsByTagName('a')[0].href;
  $row.addEventListener('click', (e) => {
    if (e.target.classList.contains('btn') || (e.target.getAttribute('alt') === 'More')) {
      return;
    }

    const row = document.getElementById(coinRowId);
    if (row) {
      const iframe = document.getElementById(iframeId);
      if (iframe.style.display === 'none') {
        $(iframe).slideDown('slow');
      } else {
        $(iframe).slideUp('slow');
      }
    } else {
      const newRow = document.createElement('tr');
      $row.parentNode.insertBefore(newRow, $row.nextSibling);
      newRow.id = coinRowId;
      newRow.classList.add('detail-view');

      const newEl = newRow.insertCell(0);
      newEl.colSpan = numCols;
      newEl.style.position = 'relative';

      const iframe = document.createElement('iframe');
      iframe.id = iframeId;
      iframe.src = href;

      const curtain = document.createElement('div');
      curtain.className = 'detail-curtain';
      curtain.textContent = 'Loading Chart...';

      newEl.appendChild(curtain);
      newEl.appendChild(iframe);
      $(iframe).hide();
      $(iframe).slideDown('slow');

      // Arbitrary curtain timeout to allow page to load first...
      // There's probably a better way to do this.
      setTimeout(() => {
        $(curtain).fadeOut('slow');
      }, 2500);
    }
  }, false);
}

function updateMainTable($table, $currencyHeader, $currencyRows, columnOffset) {
  addNewHeader($table, $currencyHeader, columnOffset);
  for (let i = 0; i < $currencyRows.length; i += 1) {
    addNewColumn($currencyRows[i], columnOffset);
    makeRowClickable($currencyRows[i]);
  }
}

module.exports = {
  updateMainTable,
};


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/html; charset=utf-8" />
	<title> Aspectro Autista </title>
	<link rel="shortcut icon" type="image/x-icon" href="../imagens/simbolo.jpg"/>
	<link rel="shortcut icon" type="image/gif" href="../imagens/simbolo.jpg"/>
	<link rel="stylesheet" type="text/css" href="../scripts/style.css"/>

HOME

AUTISMO

História

Caracteríscas

Tratamento

DEPOIMENTOS

VENCEDORES

REPORTAGEM

Alysson Moutri

Mais Você

 Sites de Autismo

 APAE

 AMA

 ESTOUAUTISTA

 AUTISMO

 Tratamentos

Os tratamentos do autismo para o Transtorno do Espectro Autista geralmente são programas intensos e abrangente que envolve a criança, a família e os profissionais, sendo indicado começar o mais cedo possível. Os programas de intervenção para os principais sintomas abordam as questões sociais, de comunicação e cognitivas centrais do autismo. Os objetivos do programa para o tratamentos do autismosão traçados de acordo com as dificuldades e habilidades da criança, sendo levada em conta a fase de desenvolvimento em que se apresenta. Geralmente a intervenção comportamental, a terapia fonoaudiológica, ocupacional e psicopedagógica fazem parte do programa para os tratamentos do autismo.

             Leia toda matéria

            Se você quiser saber mais sobre o autismo.
         Baixe a apostila

Principais métodos de intervenção para os tratamentos do autismo:
Análise do Comportamento Aplicada (ABA): técnica utilizada nos tratamentos do autismo para diminuir os comportamentos problemáticos relacionados ao autismo. O alvo é a ampliação e aquisição de comportamentos inexistentes no repertório; diminuição de comportamentos em excesso e que são inadaptativos, visando a construção de um repertório comportamental que se sustente em diferentes ambientes, com diferentes pessoas, gerando inclusão social, escolar e profissional para o autista.

TEACCH – Treinamento e Ensino de Crianças com Autismo e Outras Dificuldades de Comunicação Relacionadas: oferece estratégias cognitivas e comportamentais nos tratamentos do autismo que auxiliam os professores a intervir na capacidade de aquisição de habilidade do aluno. O método fornece técnicas de organização, estruturação, repetições e treinamento, considerando pré-requisitos importantes para a alfabetização. O ambiente físico e social é organizado com a utilização de recursos visuais, para que a criança possa prever e compreender as atividades diárias com mais facilidade e ter reações apropriadas. Os programas de TEACCH são geralmente dados em uma sala de aula, mas também podem ser feitos em casa e são usados em conjunto com aqueles destinados à sala de aula. Os pais trabalham com os profissionais como co-terapeutas para que as técnicas possam ter continuidade em casa. É usado por psicólogos, professores de educação especial, fonoaudiólogos e profissionais devidamente treinados.
Sistema de Comunicação por Troca de Figuras (PECS – Picture Exchange Communication System): é um sistema de ensino que permite à criança com pouca ou nenhuma habilidade verbal comunicar-se usando figuras. O PECS pode ser usado em casa, na sala de aula ou em vários outros ambientes. Um terapeuta, professor, pai ou mãe ajuda a criança a construir vocabulário e articular os desejos, observações ou sentimentos usando as imagens sistematicamente.

Terapia fonoaudiológica: abrange uma série de técnicas e trata de uma gama de desafios para crianças com autismo. Por exemplo, alguns indivíduos não conseguem falar. Outros parecem adorar falar. Mas ambos podem ter dificuldade na compreensão da informação ou dificuldade de comunicar-se. Ostratamentos do autismo fonoaudiológico para crianças com autismo visa coordenar a mecânica da fala com o significado e valor social da linguagem. Dependendo da aptidão verbal do indivíduo, o objetivo pode ser o domínio da língua falada ou pode ser o aprendizado de sinais e gestos para se comunicar. Em cada caso, o objetivo é ajudar a pessoa a aprender a comunicar-se de forma útil e funcional.
Terapia Ocupacional (TO): trabalha conjuntamente habilidades cognitivas, físicas e motoras. O objetivo é ajudar a pessoa a se tornar funcional e independente. Para uma criança com autismo, o foco pode ser as habilidades de brincar e aprender, assim como habilidades básicas para atividades de vida diária (ex: saber se vestir, se alimentar, se arrumar e usar o banheiro de forma independente e melhorar as habilidades sociais, motoras finas e de percepção visual).

Fisioterapia: concentra-se em qualquer problema do movimento que cause limitações funcionais. Crianças com autismo muitas vezes têm dificuldades motoras, tais como dificuldades para sentar, andar, correr e pular. A fisioterapia também pode tratar a falta de tônus muscular, equilíbrio e coordenação.

Acompanhamento psicopedagógico: busca desenvolver recursos para a aprendizagem, instrumentalizando com técnicas que o facilitem a aprender, investindo no potencial (habilidades) encontrado

      webdesigner

      KellStan aspectroautista@hotmail.com


text:
SYNONYM

#### According to
Index Fungorum

#### Published in
null

#### Original name
Agaricus squarrosus var. muelleri Fr., 1821

### Remarks
null


text:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace HttpGrabLibrary
{
	interface ConsoleWriterInterface
	{
		void Write(string message);
		void SetStatus(bool value);
	}
}


text:
describe('State', () => {
  describe('when `modelClass` is defined on the class', () => {
    var FooModel;
    var fooState;

    beforeEach(() => {
      FooModel = Bb.Model.extend();
      var FooState = Mn.State.extend({
        modelClass: FooModel
      });
      fooState = new FooState();
    });

    it('should use `modelClass` for underlying model', () => {
      expect(fooState.getModel()).to.be.instanceof(FooModel);
    });
  });

  describe('when `defaultState` is defined on the class', () => {
    var fooState;

    beforeEach(() => {
      var FooState = Mn.State.extend({
        defaultState: {
          foo: 1
        }
      });
      fooState = new FooState();
    });

    it('should reflect default state', () => {
      expect(fooState.get('foo')).to.equal(1);
    });
  });

  describe('when initialized with `initialState`', () => {
    var fooState;

    beforeEach(() => {
      fooState = new Mn.State({
        initialState: {
          foo: 1
        }
      });
    });

    it('should reflect initial state', () => {
      expect(fooState.attributes).to.deep.equal({ foo: 1 });
    });
  });

  describe('when `defaultState` and `initialState` are both supplied', () => {
    var fooState;
    var initialState;

    beforeEach(() => {
      var FooState = Mn.State.extend({
        defaultState: {
          foo: 1,
          bar: 2
        }
      });
      fooState = new FooState({
        initialState: {
          bar: -2,
          baz: 3
        }
      });
      initialState = fooState.getInitialState();
    });

    it('initial state should reflect both defaultState and initialState', () => {
      expect(fooState.attributes).to.deep.equal({
        foo: 1,
        bar: -2,
        baz: 3
      });
    });

    it('`getInitialState()` should reflect both defaultState and initialState', () => {
      expect(initialState).to.deep.equal({
        foo: 1,
        bar: -2,
        baz: 3
      });
    });

    describe('when changing a value and then resetting', () => {
      var newInitialState;

      beforeEach(() => {
        fooState.set('baz', -3);
        fooState.reset();
        newInitialState = fooState.getInitialState();
      });

      it('`getInitialState()` should return the initial state', () => {
        expect(newInitialState).to.deep.equal(initialState);
      });
    });

    describe('when resetting with an attribute override', () => {
      var updatedState;
      var newInitialState;

      beforeEach(() => {
        updatedState = _.extend(fooState.getInitialState(), { foo: -1 });
        fooState.reset({ foo: -1 });
        newInitialState = fooState.getInitialState();
      });

      it('`getInitialState()` should return the initial state', () => {
        expect(newInitialState).to.deep.equal(initialState);
      });

      it('should reflect the overriden attribute', () => {
        expect(fooState.attributes).to.deep.equal(updatedState);
      });
    });
  });

  describe('when initialized with `component`', () => {
    var fooState;

    beforeEach(() => {
      var eventedObj = _.extend({}, Bb.Events);
      var FooState = Mn.State.extend({
        componentEvents: {
          'do:foo': 'onDoFoo'
        },
        onDoFoo: stub()
      });
      spy(FooState.prototype, 'destroy');
      fooState = new FooState({
        component: eventedObj
      });
      eventedObj.trigger('do:foo', 1, 2, 3);
      eventedObj.trigger('destroy');
    });

    it('should call event handlers on `component` events', () => {
      expect(fooState.onDoFoo)
        .to.have.been.calledOnce
        .and.to.have.been.calledWith(1, 2, 3)
        .and.to.have.been.calledOn(fooState);
    });

    it('should destroy when `component` emits "destroy"', () => {
      expect(fooState.destroy)
        .to.have.been.calledOnce
        .and.to.have.been.calledOn(fooState);
    });
  });

  describe('when initialized with `component` and the component is unbound', () => {
    var fooState;

    beforeEach(() => {
      var eventedObj = _.extend({}, Bb.Events);
      var FooState = Mn.State.extend({
        componentEvents: {
          'do:foo': 'onDoFoo'
        },
        onDoFoo: stub()
      });
      spy(FooState.prototype, 'destroy');
      fooState = new FooState({
        component: eventedObj
      });
      fooState.unbindComponent(eventedObj);
      eventedObj.trigger('do:foo', 1, 2, 3);
      eventedObj.trigger('destroy');
    });

    it('should not call event handlers on `component` events', () => {
      expect(fooState.onDoFoo).to.not.have.been.called;
    });

    it('should not destroy when `component` emits "destroy"', () => {
      expect(fooState.destroy).to.not.have.been.called;
    });
  });

  describe('when initialized with `component` and `preventDestroy: false', () => {
    var fooState;

    beforeEach(() => {
      var eventedObj = _.extend({}, Bb.Events);
      spy(Mn.State.prototype, 'destroy');
      fooState = new Mn.State({
        component:      eventedObj,
        preventDestroy: true
      });
      eventedObj.trigger('destroy');
    });

    it('should not destroy when `component` emits "destroy"', () => {
      expect(fooState.destroy).to.not.have.been.called;
    });
  });

  describe('when binding a component', () => {
    var fooState;

    beforeEach(() => {
      var eventedObj = _.extend({}, Bb.Events);
      spy(Mn.State.prototype, 'destroy');
      fooState = new Mn.State();
      fooState.bindComponent(eventedObj);
      eventedObj.trigger('destroy');
    });

    it('should destroy when `component` emits "destroy"', () => {
      expect(fooState.destroy)
        .to.have.been.calledOnce
        .and.to.have.been.calledOn(fooState);
    });
  });

  describe('when setting a value', () => {
    var fooState;

    beforeEach(() => {
      fooState = new Mn.State();
      fooState.set('foo', 1);
    });

    it('should reflect the set value', () => {
      expect(fooState.get('foo')).to.equal(1);
    });

    describe('when setting a new value', () => {
      beforeEach(() => {
        fooState.set('foo', 2);
      });

      it('should reflect the change in `changedAttributes()`', () => {
        expect(fooState.changedAttributes()).to.deep.equal({ foo: 2 });
      });

      it('should reflect the change in `previousAttributes()`', () => {
        expect(fooState.previousAttributes()).to.deep.equal({ foo: 1 });
      });

      it('should reflect the change in `previous()`', () => {
        expect(fooState.previous('foo')).to.equal(1);
      });

      it('should reflect the change in `hasAnyChanged()`', () => {
        expect(fooState.hasAnyChanged('foo')).to.equal(true);
      });
    });
  });

  describe('when updating attributes proxy property', () => {
    var fooState;
    var fooStateAttributes = { foo: 'bar' };

    beforeEach(() => {
      fooState = new Mn.State();
      fooState.attributes = fooStateAttributes;
    });

    it('model should reflect change', () => {
      expect(fooState.getModel().attributes).to.deep.equal(fooStateAttributes);
    });
  });

  describe('when updating model attributes property', () => {
    var fooState;
    var fooStateAttributes = { foo: 'bar' };

    beforeEach(() => {
      fooState = new Mn.State();
      fooState.getModel().attributes = fooStateAttributes;
    });

    it('attributes proxy should reflect change', () => {
      expect(fooState.attributes).to.deep.equal(fooStateAttributes);
    });
  });

  describe('when syncing with another entity', () => {
    var fooState;
    var barModel;

    beforeEach(() => {
      barModel = new Bb.Model({ foo: 1 });
      var FooState = Mn.State.extend({
        barModelEvents: {
          'change:foo': 'onChangeFoo'
        },
        initialize(options={}) {
          this.syncEntityEvents(options.barModel, this.barModelEvents);
        },
        onChangeFoo: stub()
      });
      fooState = new FooState({ barModel });
    });

    it('entity change handler should be called', () => {
      expect(fooState.onChangeFoo)
        .to.have.been.calledOnce
        .and.to.have.been.calledWith(barModel, 1)
        .and.to.have.been.calledOn(fooState);
    });

    describe('when synced attribute changes', () => {
      beforeEach(() => {
        barModel.set('foo', 2);
      });

      it('entity change handler should be called again', () => {
        expect(fooState.onChangeFoo)
          .to.have.been.calledTwice
          .and.to.have.been.calledWith(barModel, 2)
          .and.to.have.been.calledOn(fooState);
      });
    });
  });

  describe('when underlying model emits events', () => {
    var fooState;
    var changeHandler;
    var customHandler;

    beforeEach(() => {
      fooState = new Mn.State();
      var fooModel = fooState.getModel();
      changeHandler = stub();
      customHandler = stub();
      fooState.on('change:foo', changeHandler);
      fooState.on('custom', customHandler);
      fooModel.set('foo', 1);
      fooModel.trigger('custom', 1, 2, 3);
    });

    it('should proxy standard model events, substituting State instance for Model argument', () => {
      expect(changeHandler)
        .to.have.been.calledOnce
        .and.to.have.been.calledWith(fooState, 1);
    });

    it('should proxy custom model events', () => {
      expect(customHandler)
        .to.have.been.calledOnce
        .and.to.have.been.calledWith(1, 2, 3);
    });
  });

  describe('when calling toJSON', () => {
    var fooState;
    var modelJson;
    var stateJson;

    beforeEach(() => {
      fooState = new Mn.State({
        initialState: {
          foo: 1,
          bar: 2
        }
      });

      modelJson = fooState.getModel().toJSON();
      stateJson = fooState.toJSON();
    });

    it('should equal result of underlying model toJSON()', () => {
      expect(stateJson).to.deep.equal(modelJson);
    });
  });
});


text:
package org.kie.workbench.common.stunner.core.rule.annotation;

import java.lang.annotation.ElementType;
import java.lang.annotation.Inherited;
import java.lang.annotation.Repeatable;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

/**
 * Annotation for specifying a containment rule.
 * It's only allowed to use on Definition Sets
 */
@Inherited
@Target(ElementType.TYPE)
@Retention(RetentionPolicy.RUNTIME)
@Repeatable(AllowedOccurrences.class)
public @interface Occurrences {

    String role();

    long min() default 0;

    long max() default -1;
}


text:
module ResquePoll
  class Engine < ::Rails::Engine
    isolate_namespace ResquePoll
  end
end


text:
package solidstack.javac;

import java.io.CharArrayWriter;
import java.io.File;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.Reader;
import java.io.Writer;
import java.net.URI;
import java.net.URISyntaxException;
import java.net.URL;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Enumeration;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
import java.util.Set;
import java.util.zip.ZipEntry;
import java.util.zip.ZipFile;

import javax.lang.model.element.Modifier;
import javax.lang.model.element.NestingKind;
import javax.tools.FileObject;
import javax.tools.ForwardingJavaFileManager;
import javax.tools.JavaCompiler;
import javax.tools.JavaCompiler.CompilationTask;
import javax.tools.JavaFileManager;
import javax.tools.JavaFileObject;
import javax.tools.JavaFileObject.Kind;
import javax.tools.SimpleJavaFileObject;
import javax.tools.StandardLocation;
import javax.tools.ToolProvider;

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

import solidstack.io.ByteMatrixInputStream;
import solidstack.io.ByteMatrixOutputStream;
import solidstack.lang.Assert;
import solidstack.lang.DynamicClassLoader;
import solidstack.lang.SystemException;

// Inspired by: https://github.com/OpenHFT/Java-Runtime-Compiler
public class CompilerClassLoader extends DynamicClassLoader
{
	static final Logger logger = LoggerFactory.getLogger( CompilerClassLoader.class );

	static private JavaCompiler compiler = ToolProvider.getSystemJavaCompiler();
	static private JavaFileManager standardFileManager = compiler.getStandardFileManager( null, null, null );

	private CustomFileManager fileManager = new CustomFileManager( standardFileManager );

	public CompilerClassLoader( ClassLoader parent )
	{
		super( parent );
	}

	public Class<?> compile( String className, CharSequence source )
	{
		SourceFile javaFile = new SourceFile( className, source );

		this.fileManager.start();

		Writer out = new CharArrayWriter();
		CompilationTask task = compiler.getTask( out, this.fileManager, null, null, null, Arrays.asList( javaFile ) );
		if( !task.call() )
			throw new CompilationFailedException( out.toString() );

		List<ClassFile> classes = this.fileManager.end();
		for( ClassFile classFile : classes )
			defineClass( classFile.getName(), classFile.getBytes() );

		try
		{
			return loadClass( className );
		}
		catch( ClassNotFoundException e )
		{
			throw new SystemException( e );
		}
	}

	static class CustomFileManager extends ForwardingJavaFileManager<JavaFileManager>
	{
		private final Map<String, JavaFileObject> classFiles = new HashMap<String, JavaFileObject>();
		private final List<ClassFile> newClasses = new ArrayList<ClassFile>();

		protected CustomFileManager( JavaFileManager fileManager )
		{
			super( fileManager );
			logger.debug( "JavaFileManager: {}", fileManager.getClass() );
		}

		public void start()
		{
			this.newClasses.clear();
		}

		public List<ClassFile> end()
		{
			return this.newClasses;
		}

		@Override
		public ClassLoader getClassLoader( Location location )
		{
			ClassLoader result = super.getClassLoader( location );
			logger.debug( "getClassLoader({}) -> {}", location, result );
			return result;
		}

		@Override
		public JavaFileObject getJavaFileForOutput( Location location, String className, Kind kind, FileObject sibling )
		{
			ClassFile result = new ClassFile( className );
			this.classFiles.put( className, result );
			this.newClasses.add( result );
			logger.debug( "getJavaFileForOutput {} {} {} {} -> {}", location, className, kind, sibling, result );
			return result;
		}

		@Override
		public Iterable<JavaFileObject> list( Location location, String packageName, Set<Kind> kinds, boolean recurse )
				throws IOException
		{
			Iterable<JavaFileObject> result;

			if( location == StandardLocation.CLASS_PATH && kinds.contains( Kind.CLASS ) )
			{
				Assert.isFalse( recurse );

				List<JavaFileObject> classes = new ArrayList<JavaFileObject>();
				packageName = packageName + ".";
				for( Entry<String, JavaFileObject> entry : this.classFiles.entrySet() )
					if( entry.getKey().startsWith( packageName ) ) // TODO What about child packages?
						classes.add( entry.getValue() );

				if( !classes.isEmpty() )
					result = new ClassIterable( super.list( location, packageName, kinds, recurse ).iterator(), classes );
				else
					try
					{
						ClassLoader loader = Thread.currentThread().getContextClassLoader();
						String pn = packageName;
						if( pn.endsWith( "." ) )
							pn = pn.substring( 0, pn.length() - 1 );
						pn = pn.replace( '.', '/' );
						logger.debug( pn );
						Enumeration<URL> urls = loader.getResources( pn );
						while( urls.hasMoreElements() ) {
							URL url = urls.nextElement();
							logger.debug( "Resource: {}", url.toString() );
							if( "file".equals( url.getProtocol() ) )
							{
								File folder = new File( url.toURI() );
								File[] files = folder.listFiles();
								for( File file : files )
									if( file.isFile() && file.getName().endsWith( ".class" ) )
										classes.add( new ClassPathFile( url.toURI() ) );
							}
							else if( "jar".equals( url.getProtocol() ) || "zip".equals( url.getProtocol() ) )
							{
								logger.debug( "Protocol: {}", url.getProtocol() );
								String path = url.toString();
								logger.debug( "Path: {}", path );
								int i = path.indexOf( '!' );
								logger.debug( "i: {}", i );
								if( i < 0 )
									throw new IllegalArgumentException( "Expecting a !" );
								path = path.substring( 4, i );
								logger.debug( "path: {}", path );
								URI uri = new URI( path );
								if( uri.getScheme() == null || uri.getScheme().length() == 1 )
									uri = new URI( "file:///" + path ); // TODO Hostname?
								logger.debug( "Nested resource: {}", uri.toString() );
								if( "file".equals( uri.getScheme() ) )
								{
									ZipFile zip = new ZipFile( new File( uri ) );
									try
									{
										Enumeration<? extends ZipEntry> entries = zip.entries();
										pn = pn + "/";
										while( entries.hasMoreElements() )
										{
											ZipEntry entry = entries.nextElement();
											if( !entry.isDirectory() )
												//												logger.debug( "ZipEntry: {}", entry.getName() );
												if( entry.getName().startsWith( pn ) )
												{
													String uri3 = url.getProtocol() + ":" + uri.toString() + "!" + entry.getName();
													if( uri3.startsWith( "zip:file:///" ) )
														uri3 = "jar:file:/" + uri3.substring( 12 );
//													classes.add( new InputStreamFile( uri3, zip.getInputStream( entry ) ) );
												}
										}
									}
									finally
									{
										zip.close();
									}
								}
								else
									throw new UnsupportedOperationException( "Unsupported scheme: " + uri.getScheme() );
							}
							else
								throw new UnsupportedOperationException( "Unsupported protocol: " + url.getProtocol() );
						}
//						if( !classes.isEmpty() )
							result = new ClassIterable( super.list( location, packageName, kinds, recurse ).iterator(), classes );
//						else
//							result = super.list( location, packageName, kinds, recurse );
					}
					catch( URISyntaxException e )
					{
						throw new IOException( e );
					}
			}
			else
				result = super.list( location, packageName, kinds, recurse );

			logger.debug( "list({}, {}, {}, {}) -> {}", location, packageName, kinds, recurse, result );

			return result;
		}

		@Override
		public String inferBinaryName( Location location, JavaFileObject file )
		{
			if( file instanceof ClassFile )
				return ( (ClassFile)file ).getName();
			if( file instanceof ClassPathFile )
				return ( (ClassPathFile)file ).getName();
			if( file instanceof InputStreamFile )
				return ( (InputStreamFile)file ).getName();
			return super.inferBinaryName( location, file );
		}

//		@Override
//		public ClassLoader getClassLoader( Location location )
//		{
//			ClassLoader result = super.getClassLoader( location );
//			log.debug( "getClassLoader {} -> {}", location, result );
//			return result;
//		}
//
//		@Override
//		public boolean isSameFile( FileObject a, FileObject b )
//		{
//			boolean result = super.isSameFile( a, b );
//			log.debug( "isSameFile {} {} -> {}", a, b, result );
//			return result;
//		}
//
//		@Override
//		public boolean handleOption( String current, Iterator<String> remaining )
//		{
//			boolean result = super.handleOption( current, remaining );
//			log.debug( "handleOption {} {} -> {}", current, remaining, result );
//			return result;
//		}
//
//		@Override
//		public boolean hasLocation( Location location )
//		{
//			boolean result = super.hasLocation( location );
//			log.debug( "hasLocation {} -> {}", location, result );
//			return result;
//		}
//
//		@Override
//		public int isSupportedOption( String option )
//		{
//			int result = super.isSupportedOption( option );
//			log.debug( "isSupportedOption {} -> {}", option, result );
//			return result;
//		}
//
//		@Override
//		public JavaFileObject getJavaFileForInput( Location location, String className, Kind kind ) throws IOException
//		{
//			JavaFileObject result = super.getJavaFileForInput( location, className, kind );
//			log.debug( "getJavaFileForInput {} {} {} -> {}", location, className, kind, result );
//			return result;
//		}
//
//		@Override
//		public FileObject getFileForInput( Location location, String packageName, String relativeName )
//				throws IOException
//		{
//			FileObject result = super.getFileForInput( location, packageName, relativeName );
//			log.debug( "getFileForInput {} {} {} -> {}", location, packageName, relativeName, result );
//			return result;
//		}
//
//		@Override
//		public FileObject getFileForOutput( Location location, String packageName, String relativeName,
//				FileObject sibling ) throws IOException
//		{
//			FileObject result = super.getFileForOutput( location, packageName, relativeName, sibling );
//			log.debug( "getFileForOutput {} {} {} {} -> {}", location, packageName, relativeName, sibling, result );
//			return result;
//		}
//
//		@Override
//		public void flush() throws IOException
//		{
//			log.debug( "flush" );
//			super.flush();
//		}
//
//		@Override
//		public void close() throws IOException
//		{
//			log.debug( "close" );
//			super.close();
//		}
	}

	static class SourceFile extends SimpleJavaFileObject
	{
		private CharSequence contents = null;

		public SourceFile( String className, CharSequence contents )
		{
			super( URI.create( "string:///" + className.replace( '.', '/' ) + Kind.SOURCE.extension ), Kind.SOURCE );
			this.contents = contents;
		}

//		@Override
//		public String toString()
//		{
//			return "SourceFile[" + getName() + "]";
//		}

		@Override
		public CharSequence getCharContent( boolean ignoreEncodingErrors )
		{
			return this.contents;
		}
	}

	static class ClassFile extends SimpleJavaFileObject
	{
		private ByteMatrixOutputStream bytes = new ByteMatrixOutputStream( 1024 );

		public ClassFile( String className )
		{
			super( URI.create( className ), Kind.CLASS );
		}

		@Override
		public OutputStream openOutputStream()
		{
			return this.bytes;
		}

//		@Override
//		public String toString()
//		{
//			return "ClassFile[" + getName() + "]";
//		}

		@Override
		public InputStream openInputStream() throws IOException
		{
			return new ByteMatrixInputStream( this.bytes.toByteMatrix() );
		}

		public byte[] getBytes()
		{
			return this.bytes.toByteArray();
		}
	}

	static class ClassPathFile extends SimpleJavaFileObject
	{
		private URI uri;

		public ClassPathFile( URI uri )
		{
			super( uri, Kind.CLASS );
			this.uri = uri;
		}

//		@Override
//		public String toString()
//		{
//			return "ClassPathFile[" + getName() + "]";
//		}

		@Override
		public OutputStream openOutputStream()
		{
			throw new UnsupportedOperationException();
		}

		@Override
		public InputStream openInputStream() throws IOException
		{
			throw new UnsupportedOperationException();
			//return this.uri.toURL().openStream();
		}

		public byte[] getBytes()
		{
			throw new UnsupportedOperationException();
		}
	}

	static class InputStreamFile implements JavaFileObject
	{
		private InputStream in;
		private String name;

		public InputStreamFile( String name, InputStream in )
		{
			this.in = in;
			this.name = name;
		}

		@Override
		public String getName()
		{
			return this.name;
		}

		@Override
		public String toString()
		{
			return "InputStreamFile[" + getName() + "]";
		}

		@Override
		public OutputStream openOutputStream()
		{
			throw new UnsupportedOperationException();
		}

		@Override
		public InputStream openInputStream() throws IOException
		{
			throw new UnsupportedOperationException();
//			return this.in;
		}

		@Override
		public URI toUri()
		{
			throw new UnsupportedOperationException();
		}

		@Override
		public Reader openReader( boolean ignoreEncodingErrors ) throws IOException
		{
			throw new UnsupportedOperationException();
		}

		@Override
		public CharSequence getCharContent( boolean ignoreEncodingErrors ) throws IOException
		{
			throw new UnsupportedOperationException();
		}

		@Override
		public Writer openWriter() throws IOException
		{
			throw new UnsupportedOperationException();
		}

		@Override
		public long getLastModified()
		{
			throw new UnsupportedOperationException();
		}

		@Override
		public boolean delete()
		{
			throw new UnsupportedOperationException();
		}

		@Override
		public Kind getKind()
		{
			return Kind.CLASS;
		}

		@Override
		public boolean isNameCompatible( String simpleName, Kind kind )
		{
			throw new UnsupportedOperationException();
		}

		@Override
		public NestingKind getNestingKind()
		{
			throw new UnsupportedOperationException();
		}

		@Override
		public Modifier getAccessLevel()
		{
			throw new UnsupportedOperationException();
		}
	}

	static class ClassIterable implements Iterable<JavaFileObject>
	{
		Iterator<JavaFileObject> parent;
		List<JavaFileObject> myclasses;

		ClassIterable( Iterator<JavaFileObject> parent, List<JavaFileObject> myclasses )
		{
			this.parent = parent;
			this.myclasses = myclasses;
		}

		@Override
		public Iterator<JavaFileObject> iterator()
		{
			return new Iterator<JavaFileObject>()
			{
				private Iterator<JavaFileObject> iterator = ClassIterable.this.myclasses.iterator();

				@Override
				public boolean hasNext()
				{
					return ClassIterable.this.parent.hasNext() || this.iterator.hasNext();
				}

				@Override
				public JavaFileObject next()
				{
					if( ClassIterable.this.parent.hasNext() )
						return ClassIterable.this.parent.next();
					return this.iterator.next();
				}

				@Override
				public void remove()
				{
					throw new UnsupportedOperationException();
				}
			};
		}

		@Override
		public String toString()
		{
			StringBuilder result = new StringBuilder();
			boolean first = true;
			for( JavaFileObject javaFileObject : this.myclasses )
			{
				if( first )
					first = false;
				else
					result.append( ',' );
				result.append( javaFileObject.toString() );
			}

			return result.toString();
		}
	}
}


text:
package br.com.maisbarato;

import android.view.View;
import android.widget.AdapterView;
import android.widget.AdapterView.OnItemSelectedListener;
import android.widget.EditText;
import android.widget.TextView;

public class SpinnerItemSelectedCervejaGarrafaListener implements OnItemSelectedListener {
	private EditText pesoEspecifico;
	private TextView textView;
	public SpinnerItemSelectedCervejaGarrafaListener(EditText peso , TextView textView){
		super();
		this.pesoEspecifico = peso;
		this.textView = textView;
	}

	@Override
	public void onItemSelected(AdapterView<?> arg0, View arg1, int arg2,
			long arg3) {
		//Toast.makeText(arg0.getContext(),
		//		"item selecionado foi: "+arg0.getItemAtPosition(arg2).toString(),
		//		Toast.LENGTH_LONG).show();
		switch(arg2){
			case 0:
				pesoEspecifico.setVisibility(EditText.INVISIBLE);
				textView.setVisibility(TextView.INVISIBLE);
				break;
			case 1:
				pesoEspecifico.setVisibility(EditText.INVISIBLE);
				textView.setVisibility(TextView.INVISIBLE);
				break;
			case 2:
				pesoEspecifico.setVisibility(EditText.INVISIBLE);
				textView.setVisibility(TextView.INVISIBLE);
				break;
			case 3:
				pesoEspecifico.setVisibility(EditText.INVISIBLE);
				textView.setVisibility(TextView.INVISIBLE);
				break;
			case 4:
				pesoEspecifico.setVisibility(EditText.INVISIBLE);
				textView.setVisibility(TextView.INVISIBLE);
				break;
			case 5:
				pesoEspecifico.setVisibility(EditText.INVISIBLE);
				textView.setVisibility(TextView.INVISIBLE);
				break;
			case 6:
				pesoEspecifico.setVisibility(EditText.VISIBLE);
				textView.setVisibility(TextView.VISIBLE);
				break;
		}
	}

	@Override
	public void onNothingSelected(AdapterView<?> arg0) {
		// TODO Auto-generated method stub

	}

}


text:
package cakesolutions

package logging

import akka.actor.Actor
import akka.actor.ActorLogging

/**
 * Trait to add specialised logging to Actors
 */
trait Logging extends Actor with ActorLogging with ExceptionLogging {

  /**
   * We log when the actor has started
   */
  override def preStart() = {
    log.info(s"${getClass.getSimpleName} started")
    super.preStart()
  }

  /**
   * We log when the actor restarts
   *
   * @param cause the exception that has caused this restart
   * @param msg   (optional) the message that this actor was processing when it restarted
   */
  override def preRestart(cause: Throwable, msg: Option[Any]) = {
    log.info(s"${getClass.getSimpleName} restarting whilst handling ${msg.map(_.getClass.getSimpleName)} - reason: ${exceptionString(cause)}")
    log.debug(s"${getClass.getSimpleName} restarting whilst handling $msg - reason: ${exceptionString(cause)}")
    super.preRestart(cause, msg)
  }

  /**
   * We log when the actor stops
   */
  override def postStop() = {
    log.info(s"${getClass.getSimpleName} stopping")
    super.postStop()
  }

}


text:
<?php
namespace Payum\Paypal\ExpressCheckout\Nvp\Tests\Action\Api;

use Payum\Core\Action\ActionInterface;
use Payum\Core\ApiAwareInterface;
use Payum\Paypal\ExpressCheckout\Nvp\Action\Api\CreateBillingAgreementAction;
use Payum\Paypal\ExpressCheckout\Nvp\Request\Api\CreateBillingAgreement;

class CreateBillingAgreementActionTest extends \PHPUnit_Framework_TestCase
{
    /**
     * @test
     */
    public function shouldImplementActionInterface()
    {
        $rc = new \ReflectionClass(CreateBillingAgreementAction::class);

        $this->assertTrue($rc->implementsInterface(ActionInterface::class));
    }

    /**
     * @test
     */
    public function shouldImplementApoAwareInterface()
    {
        $rc = new \ReflectionClass(CreateBillingAgreementAction::class);

        $this->assertTrue($rc->implementsInterface(ApiAwareInterface::class));
    }

    /**
     * @test
     */
    public function couldBeConstructedWithoutAnyArguments()
    {
        new CreateBillingAgreementAction();
    }

    /**
     * @test
     */
    public function shouldSupportCreateBillingAgreementRequestAndArrayAccessAsModel()
    {
        $action = new CreateBillingAgreementAction();

        $this->assertTrue($action->supports(new CreateBillingAgreement($this->getMock('ArrayAccess'))));
    }

    /**
     * @test
     */
    public function shouldNotSupportAnythingNotCreateBillingAgreementRequest()
    {
        $action = new CreateBillingAgreementAction();

        $this->assertFalse($action->supports(new \stdClass()));
    }

    /**
     * @test
     *
     * @expectedException \Payum\Core\Exception\RequestNotSupportedException
     */
    public function throwIfNotSupportedRequestGivenAsArgumentForExecute()
    {
        $action = new CreateBillingAgreementAction();

        $action->execute(new \stdClass());
    }

    /**
     * @test
     *
     * @expectedException \Payum\Core\Exception\LogicException
     * @expectedExceptionMessage TOKEN must be set. Have you run SetExpressCheckoutAction?
     */
    public function throwIfTokenNotSetInModel()
    {
        $action = new CreateBillingAgreementAction();

        $action->execute(new CreateBillingAgreement(array()));
    }

    /**
     * @test
     */
    public function shouldCallApiCreateBillingAgreementMethodWithExpectedRequiredArguments()
    {
        $testCase = $this;

        $apiMock = $this->createApiMock();
        $apiMock
            ->expects($this->once())
            ->method('createBillingAgreement')
            ->will($this->returnCallback(function (array $fields) use ($testCase) {
                $testCase->assertArrayHasKey('TOKEN', $fields);
                $testCase->assertEquals('theToken', $fields['TOKEN']);

                return array();
            }))
        ;

        $action = new CreateBillingAgreementAction();
        $action->setApi($apiMock);

        $request = new CreateBillingAgreement(array(
            'TOKEN' => 'theToken',
        ));

        $action->execute($request);
    }

    /**
     * @test
     */
    public function shouldCallApiCreateBillingMethodAndUpdateModelFromResponseOnSuccess()
    {
        $apiMock = $this->createApiMock();
        $apiMock
            ->expects($this->once())
            ->method('createBillingAgreement')
            ->will($this->returnCallback(function () {
                return array(
                    'FIRSTNAME' => 'theFirstname',
                    'EMAIL' => 'the@example.com',
                );
            }))
        ;

        $action = new CreateBillingAgreementAction();
        $action->setApi($apiMock);

        $request = new CreateBillingAgreement(array(
            'TOKEN' => 'aToken',
        ));

        $action->execute($request);

        $model = $request->getModel();

        $this->assertArrayHasKey('FIRSTNAME', $model);
        $this->assertEquals('theFirstname', $model['FIRSTNAME']);

        $this->assertArrayHasKey('EMAIL', $model);
        $this->assertEquals('the@example.com', $model['EMAIL']);
    }

    /**
     * @return \PHPUnit_Framework_MockObject_MockObject|\Payum\Paypal\ExpressCheckout\Nvp\Api
     */
    protected function createApiMock()
    {
        return $this->getMock('Payum\Paypal\ExpressCheckout\Nvp\Api', array(), array(), '', false);
    }
}


text:
class Coreutils < Formula
  desc "GNU File, Shell, and Text utilities"
  homepage "https://www.gnu.org/software/coreutils"
  url "https://ftp.gnu.org/gnu/coreutils/coreutils-8.31.tar.xz"
  mirror "https://ftpmirror.gnu.org/coreutils/coreutils-8.31.tar.xz"
  sha256 "ff7a9c918edce6b4f4b2725e3f9b37b0c4d193531cac49a48b56c4d0d3a9e9fd"

  bottle do
    sha256 "f11898e59abf1c9ea9807ab15c7cdfc930bbfe1df14e432e5d2a89f11c405445" => :mojave
    sha256 "8ceacbb21daeeb2c526d28789fe8d703d437bb72a382a7c3a3c024901f17cae6" => :high_sierra
    sha256 "3451c10504ed3cc49893e84e6f3e09a0457cd28eb953482489548dfb593d098f" => :sierra
  end

  head do
    url "https://git.savannah.gnu.org/git/coreutils.git"

    depends_on "autoconf" => :build
    depends_on "automake" => :build
    depends_on "bison" => :build
    depends_on "gettext" => :build
    depends_on "texinfo" => :build
    depends_on "wget" => :build
    depends_on "xz" => :build
  end

  conflicts_with "aardvark_shell_utils", :because => "both install `realpath` binaries"
  conflicts_with "b2sum", :because => "both install `b2sum` binaries"
  conflicts_with "ganglia", :because => "both install `gstat` binaries"
  conflicts_with "gegl", :because => "both install `gcut` binaries"
  conflicts_with "idutils", :because => "both install `gid` and `gid.1`"
  conflicts_with "md5sha1sum", :because => "both install `md5sum` and `sha1sum` binaries"
  conflicts_with "truncate", :because => "both install `truncate` binaries"

  def install
    system "./bootstrap" if build.head?

    args = %W[
      --prefix=#{prefix}
      --program-prefix=g
      --without-gmp
    ]
    system "./configure", *args
    system "make", "install"

    # Symlink all commands into libexec/gnubin without the 'g' prefix
    coreutils_filenames(bin).each do |cmd|
      (libexec/"gnubin").install_symlink bin/"g#{cmd}" => cmd
    end
    # Symlink all man(1) pages into libexec/gnuman without the 'g' prefix
    coreutils_filenames(man1).each do |cmd|
      (libexec/"gnuman"/"man1").install_symlink man1/"g#{cmd}" => cmd
    end
    libexec.install_symlink "gnuman" => "man"

    # Symlink non-conflicting binaries
    no_conflict = %w[
      b2sum base32 chcon hostid md5sum nproc numfmt pinky ptx realpath runcon
      sha1sum sha224sum sha256sum sha384sum sha512sum shred shuf stdbuf tac timeout truncate
    ]
    no_conflict.each do |cmd|
      bin.install_symlink "g#{cmd}" => cmd
      man1.install_symlink "g#{cmd}.1" => "#{cmd}.1"
    end
  end

  def caveats; <<~EOS
    Commands also provided by macOS have been installed with the prefix "g".
    If you need to use these commands with their normal names, you
    can add a "gnubin" directory to your PATH from your bashrc like:
      PATH="#{opt_libexec}/gnubin:$PATH"
  EOS
  end

  def coreutils_filenames(dir)
    filenames = []
    dir.find do |path|
      next if path.directory? || path.basename.to_s == ".DS_Store"

      filenames << path.basename.to_s.sub(/^g/, "")
    end
    filenames.sort
  end

  test do
    (testpath/"test").write("test")
    (testpath/"test.sha1").write("a94a8fe5ccb19ba61c4c0873d391e987982fbbd3 test")
    system bin/"gsha1sum", "-c", "test.sha1"
    system bin/"gln", "-f", "test", "test.sha1"
  end
end


text:
protobuf-j2me is a *very small* Java implementation of [Google Protocol Buffers](https://developers.google.com/protocol-buffers/).

Although initially intended for Java 2 Micro Edition (J2ME) runtime environment, both runtime and generated code are fully compatible with *Java 2 Standard Edition* (J2SE and J2EE) as well as *Android 1.5+*.

# Why another Java implementation?

Short answer: needed a very small library compatible with J2ME environment.

Google's official protobuf support for Java generates code which is incompatible with J2ME environment. For example, generated code uses generics which is not compatible with J2ME platform. Besides, although Google's official protobuf compiler for Java already provides a lite version, both runtime and generated code are still fairly big for J2ME standards.

### protobuf 2.4.1 (Google Official) vs protobuf-j2me

| Feature                | protobuf | protobuf (lite-runtime) | protobuf-j2me |
|------------------------|----------|--------------|---------------|
| *Runtime library size* |   420KB  |     77KB     |     22KB      |
| *Generated code size*  |   100%   |     73%      |     26%       |
| *Enumerations*         |   Yes    |     Yes      |     Yes (int constant)       |
| *Unknown fields*       |   Yes    |     Yes      |      Yes       |
| *Immutability*         |   Yes    |     Yes      |      No       |
| *Groups (Deprecated)*  |   Yes    |     Yes      |      No       |
| *Reflection*           |   Yes    |      No      |      No       |
| *Descriptors*          |   Yes    |      No      |      No       |

Finally protobuf-j2me compiler can be used as a [protobuf plugin](https://developers.google.com/protocol-buffers/docs/reference/other#plugins) or as a standalone binary.

# One-minute Introduction

Sample from [Protobuf Documentation Page](https://developers.google.com/protocol-buffers/docs/reference/java-generated):
```protobuf
message Person {
  required int32 id = 1;
  required string name = 2;
  optional string email = 3;
}
```

Compile:
```shell
protoc --proto_path=. sample.proto --j2me_out=.
```

Sample code:
```java
Person person = new Person();
person.setId(1);
person.setName("foo");
person.setEmail("bar@gmail.com");
```

See also [User Documentation](../../wiki/User-documentation).


text:
from collections import namedtuple

Colour = namedtuple( "Colour", "r, g, b, a" )


text:
package retry

import (
	"context"
	"fmt"
	"time"

	"github.com/aws/aws-sdk-go-v2/aws/ratelimit"
)

// BackoffDelayer provides the interface for determining the delay to before
// another request attempt, that previously failed.
type BackoffDelayer interface {
	BackoffDelay(attempt int, err error) (time.Duration, error)
}

// BackoffDelayerFunc provides a wrapper around a function to determine the
// backoff delay of an attempt retry.
type BackoffDelayerFunc func(int, error) (time.Duration, error)

// BackoffDelay returns the delay before attempt to retry a request.
func (fn BackoffDelayerFunc) BackoffDelay(attempt int, err error) (time.Duration, error) {
	return fn(attempt, err)
}

const (
	// DefaultMaxAttempts is the maximum of attempts for an API request
	DefaultMaxAttempts int = 3

	// DefaultMaxBackoff is the maximum back off delay between attempts
	DefaultMaxBackoff time.Duration = 20 * time.Second
)

// Default retry token quota values.
const (
	DefaultRetryRateTokens  uint = 500
	DefaultRetryCost        uint = 5
	DefaultRetryTimeoutCost uint = 10
	DefaultNoRetryIncrement uint = 1
)

// DefaultRetryableHTTPStatusCodes is the default set of HTTP status codes the SDK
// should consider as retryable errors.
var DefaultRetryableHTTPStatusCodes = map[int]struct{}{
	500: {},
	502: {},
	503: {},
	504: {},
}

// DefaultRetryableErrorCodes provides the set of API error codes that should
// be retried.
var DefaultRetryableErrorCodes = map[string]struct{}{
	"RequestTimeout":          {},
	"RequestTimeoutException": {},
}

// DefaultThrottleErrorCodes provides the set of API error codes that are
// considered throttle errors.
var DefaultThrottleErrorCodes = map[string]struct{}{
	"Throttling":                             {},
	"ThrottlingException":                    {},
	"ThrottledException":                     {},
	"RequestThrottledException":              {},
	"TooManyRequestsException":               {},
	"ProvisionedThroughputExceededException": {},
	"TransactionInProgressException":         {},
	"RequestLimitExceeded":                   {},
	"BandwidthLimitExceeded":                 {},
	"LimitExceededException":                 {},
	"RequestThrottled":                       {},
	"SlowDown":                               {},
	"PriorRequestNotComplete":                {},
	"EC2ThrottledException":                  {},
}

// DefaultRetryables provides the set of retryable checks that are used by
// default.
var DefaultRetryables = []IsErrorRetryable{
	NoRetryCanceledError{},
	RetryableError{},
	RetryableConnectionError{},
	RetryableHTTPStatusCode{
		Codes: DefaultRetryableHTTPStatusCodes,
	},
	RetryableErrorCode{
		Codes: DefaultRetryableErrorCodes,
	},
	RetryableErrorCode{
		Codes: DefaultThrottleErrorCodes,
	},
}

// DefaultTimeouts provides the set of timeout checks that are used by default.
var DefaultTimeouts = []IsErrorTimeout{
	TimeouterError{},
}

// StandardOptions provides the functional options for configuring the standard
// retryable, and delay behavior.
type StandardOptions struct {
	// Maximum number of attempts that should be made.
	MaxAttempts int

	// MaxBackoff duration between retried attempts.
	MaxBackoff time.Duration

	// Provides the backoff strategy the retryer will use to determine the
	// delay between retry attempts.
	Backoff BackoffDelayer

	// Set of strategies to determine if the attempt should be retried based on
	// the error response received.
	//
	// It is safe to append to this list in NewStandard's functional options.
	Retryables []IsErrorRetryable

	// Set of strategies to determine if the attempt failed due to a timeout
	// error.
	//
	// It is safe to append to this list in NewStandard's functional options.
	Timeouts []IsErrorTimeout

	// Provides the rate limiting strategy for rate limiting attempt retries
	// across all attempts the retryer is being used with.
	RateLimiter RateLimiter

	// The cost to deduct from the RateLimiter's token bucket per retry.
	RetryCost uint

	// The cost to deduct from the RateLimiter's token bucket per retry caused
	// by timeout error.
	RetryTimeoutCost uint

	// The cost to payback to the RateLimiter's token bucket for successful
	// attempts.
	NoRetryIncrement uint
}

// RateLimiter provides the interface for limiting the rate of attempt retries
// allowed by the retryer.
type RateLimiter interface {
	GetToken(ctx context.Context, cost uint) (releaseToken func() error, err error)
	AddTokens(uint) error
}

// Standard is the standard retry pattern for the SDK. It uses a set of
// retryable checks to determine of the failed attempt should be retried, and
// what retry delay should be used.
type Standard struct {
	options StandardOptions

	timeout   IsErrorTimeout
	retryable IsErrorRetryable
	backoff   BackoffDelayer
}

// NewStandard initializes a standard retry behavior with defaults that can be
// overridden via functional options.
func NewStandard(fnOpts ...func(*StandardOptions)) *Standard {
	o := StandardOptions{
		MaxAttempts: DefaultMaxAttempts,
		MaxBackoff:  DefaultMaxBackoff,
		Retryables:  append([]IsErrorRetryable{}, DefaultRetryables...),
		Timeouts:    append([]IsErrorTimeout{}, DefaultTimeouts...),

		RateLimiter:      ratelimit.NewTokenRateLimit(DefaultRetryRateTokens),
		RetryCost:        DefaultRetryCost,
		RetryTimeoutCost: DefaultRetryTimeoutCost,
		NoRetryIncrement: DefaultNoRetryIncrement,
	}
	for _, fn := range fnOpts {
		fn(&o)
	}
	if o.MaxAttempts <= 0 {
		o.MaxAttempts = DefaultMaxAttempts
	}

	backoff := o.Backoff
	if backoff == nil {
		backoff = NewExponentialJitterBackoff(o.MaxBackoff)
	}

	return &Standard{
		options:   o,
		backoff:   backoff,
		retryable: IsErrorRetryables(o.Retryables),
		timeout:   IsErrorTimeouts(o.Timeouts),
	}
}

// MaxAttempts returns the maximum number of attempts that can be made for a
// request before failing.
func (s *Standard) MaxAttempts() int {
	return s.options.MaxAttempts
}

// IsErrorRetryable returns if the error is can be retried or not. Should not
// consider the number of attempts made.
func (s *Standard) IsErrorRetryable(err error) bool {
	return s.retryable.IsErrorRetryable(err).Bool()
}

// RetryDelay returns the delay to use before another request attempt is made.
func (s *Standard) RetryDelay(attempt int, err error) (time.Duration, error) {
	return s.backoff.BackoffDelay(attempt, err)
}

// GetAttemptToken returns the token to be released after then attempt completes.
// The release token will add NoRetryIncrement to the RateLimiter token pool if
// the attempt was successful. If the attempt failed, nothing will be done.
func (s *Standard) GetAttemptToken(context.Context) (func(error) error, error) {
	return s.GetInitialToken(), nil
}

// GetInitialToken returns a token for adding the NoRetryIncrement to the
// RateLimiter token if the attempt completed successfully without error.
//
// InitialToken applies to result of the each attempt, including the first.
// Whereas the RetryToken applies to the result of subsequent attempts.
//
// Deprecated: use GetAttemptToken instead.
func (s *Standard) GetInitialToken() func(error) error {
	return releaseToken(s.noRetryIncrement).release
}

func (s *Standard) noRetryIncrement() error {
	return s.options.RateLimiter.AddTokens(s.options.NoRetryIncrement)
}

// GetRetryToken attempts to deduct the retry cost from the retry token pool.
// Returning the token release function, or error.
func (s *Standard) GetRetryToken(ctx context.Context, opErr error) (func(error) error, error) {
	cost := s.options.RetryCost

	if s.timeout.IsErrorTimeout(opErr).Bool() {
		cost = s.options.RetryTimeoutCost
	}

	fn, err := s.options.RateLimiter.GetToken(ctx, cost)
	if err != nil {
		return nil, fmt.Errorf("failed to get rate limit token, %w", err)
	}

	return releaseToken(fn).release, nil
}

func nopRelease(error) error { return nil }

type releaseToken func() error

func (f releaseToken) release(err error) error {
	if err != nil {
		return nil
	}

	return f()
}


text:
package org.apache.camel.component.spring.security.config;

import org.apache.camel.component.spring.security.SpringSecurityAuthorizationPolicy;
import org.apache.camel.spi.Policy;
import org.junit.After;
import org.junit.Assert;
import org.junit.Before;
import org.junit.Test;
import org.springframework.context.support.AbstractXmlApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class SpringSecurityAuthorizationPolicyConfigTest extends Assert {

    private AbstractXmlApplicationContext context;

    @Before
    public void setUp() {
        context =
            new ClassPathXmlApplicationContext(new String[] {"/org/apache/camel/component/spring/security/config/SpringSecurityAuthorizationPolicy.xml"});
    }

    @After
    public void tearDown() {
        if (context != null) {
            context.close();
        }

    }

    @Test
    public void testAuthorizationPolicy() {

        SpringSecurityAuthorizationPolicy adminPolicy = (SpringSecurityAuthorizationPolicy) context.getBean("admin");
        assertNotNull("We should get admin policy", adminPolicy);
        assertNotNull("The accessDecisionManager should not be null", adminPolicy.getAccessDecisionManager());
        assertNotNull("The authenticationManager should not be null", adminPolicy.getAuthenticationManager());
        assertNotNull("The springSecurityAccessPolicy should not be null", adminPolicy.getSpringSecurityAccessPolicy());

        SpringSecurityAuthorizationPolicy userPolicy = (SpringSecurityAuthorizationPolicy) context.getBean("user");
        assertNotNull("We should get user policy", userPolicy);
        assertNotNull("The accessDecisionManager should not be null", userPolicy.getAccessDecisionManager());
        assertNotNull("The authenticationManager should not be null", userPolicy.getAuthenticationManager());
        assertNotNull("The springSecurityAccessPolicy should not be null", userPolicy.getSpringSecurityAccessPolicy());

        assertEquals("user policy and admin policy should have same accessDecisionManager", adminPolicy.getAccessDecisionManager(), userPolicy.getAccessDecisionManager());
        assertEquals("user policy and admin policy should have same authenticationManager", adminPolicy.getAuthenticationManager(), userPolicy.getAuthenticationManager());
    }

}