text:
/**
 * Component to pick statvar for map.
 */

import _ from "lodash";
import React, { useContext, useEffect, useState } from "react";

import { DEFAULT_POPULATION_DCID } from "../../shared/constants";
import { getStatVarInfo } from "../../shared/stat_var";
import { StatVarHierarchyType } from "../../shared/types";
import {
  getEnclosedPlacesPromise,
  getSamplePlaces,
} from "../../utils/place_utils";
import { StatVarWidget } from "../shared/stat_var_widget";
import {
  Context,
  DateWrapper,
  DisplayOptionsWrapper,
  PlaceInfoWrapper,
  StatVarWrapper,
} from "./context";
import { DEFAULT_DISPLAY_OPTIONS, getMapPointPlaceType } from "./util";

interface StatVarChooserProps {
  openSvHierarchyModalCallback: () => void;
  openSvHierarchyModal: boolean;
}

export function StatVarChooser(props: StatVarChooserProps): JSX.Element {
  const { dateCtx, statVar, placeInfo, display } = useContext(Context);
  const [samplePlaces, setSamplePlaces] = useState([]);

  useEffect(() => {
    const enclosingPlaceDcid = placeInfo.value.enclosingPlace.dcid;
    const enclosedPlaceType = placeInfo.value.enclosedPlaceType;
    if (_.isEmpty(enclosingPlaceDcid) || _.isEmpty(enclosedPlaceType)) {
      setSamplePlaces([]);
      return;
    }
    getEnclosedPlacesPromise(enclosingPlaceDcid, enclosedPlaceType).then(
      (enclosedPlaces) => {
        const samplePlaces = getSamplePlaces(
          enclosingPlaceDcid,
          enclosedPlaceType,
          enclosedPlaces
        );
        setSamplePlaces(samplePlaces);
      }
    );
  }, [placeInfo.value.enclosingPlace, placeInfo.value.enclosedPlaceType]);

  useEffect(() => {
    const svWithInfo = _.isNull(statVar.value.info)
      ? []
      : Object.keys(statVar.value.info);
    const svDcids = [statVar.value.dcid, statVar.value.mapPointSv].filter(
      (svDcid) => !_.isEmpty(svDcid)
    );
    if (_.difference(svDcids, svWithInfo).length > 0) {
      getStatVarInfo(svDcids)
        .then((info) => {
          const svInfo = {};
          svDcids.forEach(
            (svDcid) => (svInfo[svDcid] = svDcid in info ? info[svDcid] : {})
          );
          statVar.setInfo(svInfo);
        })
        .catch(() => {
          const emptyInfo = {};
          svDcids.forEach((svDcid) => (emptyInfo[svDcid] = {}));
          statVar.setInfo(emptyInfo);
        });
    }
  }, [statVar.value]);

  const deselectSVs = (svList: string[]) => {
    if (!_.isEmpty(svList)) {
      // map tool can only have one stat var selected at a time so if a stat var
      // is deselected, just set the selected stat var to empty.
      selectStatVar(dateCtx, statVar, display, placeInfo, "");
    }
  };
  const selectedSVs = !_.isEmpty(statVar.value.dcid)
    ? { [statVar.value.dcid]: statVar.value.info }
    : {};
  return (
    <StatVarWidget
      openSvHierarchyModal={props.openSvHierarchyModal}
      openSvHierarchyModalCallback={props.openSvHierarchyModalCallback}
      collapsible={true}
      svHierarchyType={StatVarHierarchyType.MAP}
      sampleEntities={samplePlaces}
      deselectSVs={deselectSVs}
      selectedSVs={selectedSVs}
      selectSV={(svDcid) =>
        selectStatVar(dateCtx, statVar, display, placeInfo, svDcid)
      }
    />
  );
}

function selectStatVar(
  dateCtx: DateWrapper,
  statVar: StatVarWrapper,
  displayOptions: DisplayOptionsWrapper,
  placeInfo: PlaceInfoWrapper,
  dcid: string
): void {
  displayOptions.set(DEFAULT_DISPLAY_OPTIONS);
  placeInfo.setMapPointPlaceType(getMapPointPlaceType(dcid));
  statVar.set({
    dcid,
    denom: DEFAULT_POPULATION_DCID,
    info: null,
    perCapita: false,
    mapPointSv: "",
    metahash: "",
  });
  dateCtx.set("");
}


text:
package apps.linear.simulation;

import structures.linear.Queue;
import java.io.PrintWriter;

/**
 * This class implements a registration simulator, in which students queue up
 * at a registration window to register for classes. Each student is labeled with
 * the time of the student's arrival in the registration queue. The simulation
 * can be run in a sequence of slices, and the status can be observed at the end
 * of every slice.
 *
 * @author Sesh Venugopal
 *
 */
public class Simulator {

	/**
	 * Source that simulates student arrivals.
	 */
	StudentSource source;

	/**
	 * Registration window simulator.
	 */
	Register window;

	/**
	 * Queue of students, in which each student is labeled with the time of the student's arrival.
	 * The queue is maintained in a generic Queue instantiated with the Integer type.
	 */
	Queue<Integer> studentQ;

	/**
	 * The clock that keeps total simulation time.
	 */
	int clock;

	/**
	 * The clock that keeps time for current simulation slice.
	 */
	int intervalClock;

	/**
	 * Number of students who arrived to register since the start of the simulation.
	 */
	int numStudents;

	/**
	 * Number of students who arrived to register in the current simulation slice.
	 */
	/**
	 *
	 */
	int intervalNumStudents;

	/**
	 * Number of students who have been registered for the duration of the simulation.
	 */
	int registered;

	/**
	 * Number of students who registered in current slice of simulation.
	 */
	int intervalRegistered;

	/**
	 * Total time spent in queue by all students who registered since start of simulation.
	 */
	int waitTime;

	/**
	 * Time spent in queue by all students who registered in current slice of simulation.
	 */
	int intervalWaitTime;

	/**
	 * Arrival time of student who is currently being registered at the window.
	 */
	int activeArrivalTime;

	/**
	 * Initializes a new Simulator instance with an empty registration queue.
	 */
	public Simulator() {
		// create new registration queue object
		studentQ = new Queue<Integer>();
	}

	/**
	 * Primes this simulator with a probability of arrival of students, and a registration time.
	 *
	 * @param probOfArrival Probability of arrival of a student in the next time interval.
	 * @param timeToRegister Time required to register a student.
	 */
	public void init(float probOfArrival, int timeToRegister) {
		// create new student source and register objects
		source = new StudentSource(probOfArrival);
		window = new Register(timeToRegister);
		clock = 0;
		numStudents = 0;
		// clear out registration queue
		studentQ.clear();
		registered = 0;
		waitTime = 0;
	}

	/**
	 * Runs the simulation for a given time interval of interest, and then pauses
	 * the simulation for examination of status.
	 *
	 * @param howLong Time interval for which simulation should be run.
	 */
	public void run(int howLong) {
		intervalClock = 0;
		intervalNumStudents = 0;
		intervalWaitTime = 0;
		intervalRegistered = 0;

		while (intervalClock < howLong) {
			// iterate for specified time intervals
			// has a new student arrived?
			if (source.studentArrived()) {
				studentQ.enqueue(clock);
				intervalNumStudents++;
				numStudents++;
			}

			// if window is free, register the student at front of queue
			if (window.isFree()) {
				if (!studentQ.isEmpty()) {
					activeArrivalTime = studentQ.dequeue();
					intervalWaitTime += clock - activeArrivalTime;
					waitTime += clock - activeArrivalTime;
					registered++;
					intervalRegistered++;
					window.startUp();
				}
			}

			// step up the time
			clock++;
			intervalClock++;
			window.stepTime();
		}
	}

	/**
	 * Prints the status of the simulator including various statistics.
	 *
	 * @param pw PrintWriter used to print status.
	 */
	public void printStatus(PrintWriter pw) {
		pw.println();
		pw.print("                        ");
		pw.println(" Interval   Cumulative");
		pw.print("                        ");
		pw.println(" --------   ----------");
		pw.println();
		pw.println("   Students Arrived         " + intervalNumStudents +
				"           " + numStudents);
		pw.println("   Students Registered      " + intervalRegistered +
				"           " + registered);
		int intervalAverage=0, cumAverage=0;
		if (intervalNumStudents != 0) {
			// average waiting time for interval
			intervalAverage = intervalWaitTime / intervalRegistered;
		}

		if (numStudents != 0) {
			// cumulative average waiting time over all intervals
			cumAverage = waitTime / registered;
		}

		pw.println("   Average Wait Time        " + intervalAverage +
				"           " + cumAverage);
	}

	/**
	 * Prints a snapshot of the simulation showing students in the queue (if any), student
	 * at the registration window (if any), regisration clock, and simulation clock.
	 *
	 * @param pw PrintWriter used to print snapshot.
	 */
	public void printSnapshot(PrintWriter pw) {
		pw.println();
		pw.println("   -------------------------------");
		pw.print("   Registration Clock : " + window.getClock());
		pw.print("             ");
		pw.println("Simulation Clock: " + clock);
		pw.println();
		pw.println();

		pw.println("   WINDOW ");

		if (!window.isFree()) {
			int printTime = activeArrivalTime + 1;
			pw.print("  |   " + printTime + "  |   ");
		}

		// students waiting in line
		Integer arrivalTime = studentQ.first();
		while (arrivalTime != null) {
			int printTime = arrivalTime + 1;
			pw.print("  |   " + printTime + "  |   ");
			arrivalTime = studentQ.next();
		}
		pw.println();

		pw.println("   -------------------------------");
		pw.println();
	}
}

redpajama_set_name: RedPajamaGithub


text:
import {coerceBooleanProperty, BooleanInput} from '@angular/cdk/coercion';
import {
  AfterContentInit,
  ChangeDetectionStrategy,
  Component,
  ContentChild,
  ContentChildren,
  Directive,
  ElementRef,
  Optional,
  QueryList,
  ViewEncapsulation,
  OnChanges,
  OnDestroy,
  ChangeDetectorRef,
  Input,
  Inject,
} from '@angular/core';
import {
  CanDisable,
  CanDisableRipple,
  MatLine,
  setLines,
  mixinDisableRipple,
  mixinDisabled,
} from '@angular/material/core';
import {MAT_LIST, MAT_NAV_LIST} from '@angular/material/list';
import {Subject} from 'rxjs';
import {takeUntil} from 'rxjs/operators';

// Boilerplate for applying mixins to MatList.
/** @docs-private */
const _MatListBase = mixinDisabled(mixinDisableRipple(class {}));

// Boilerplate for applying mixins to MatListItem.
/** @docs-private */
const _MatListItemMixinBase = mixinDisableRipple(class {});

/**
 * @deprecated Use `MatNavList` from `@angular/material/list` instead. See https://material.angular.io/guide/mdc-migration for information about migrating.
 * @breaking-change 17.0.0
 */
@Component({
  selector: 'mat-nav-list',
  exportAs: 'matNavList',
  host: {
    'role': 'navigation',
    'class': 'mat-nav-list mat-list-base',
  },
  templateUrl: 'list.html',
  styleUrls: ['list.css'],
  inputs: ['disableRipple', 'disabled'],
  encapsulation: ViewEncapsulation.None,
  changeDetection: ChangeDetectionStrategy.OnPush,
  providers: [{provide: MAT_NAV_LIST, useExisting: MatLegacyNavList}],
})
export class MatLegacyNavList
  extends _MatListBase
  implements CanDisable, CanDisableRipple, OnChanges, OnDestroy
{
  /** Emits when the state of the list changes. */
  readonly _stateChanges = new Subject<void>();

  ngOnChanges() {
    this._stateChanges.next();
  }

  ngOnDestroy() {
    this._stateChanges.complete();
  }
}

/**
 * @deprecated Use `MatList` from `@angular/material/list` instead. See https://material.angular.io/guide/mdc-migration for information about migrating.
 * @breaking-change 17.0.0
 */
@Component({
  selector: 'mat-list, mat-action-list',
  exportAs: 'matList',
  templateUrl: 'list.html',
  host: {
    'class': 'mat-list mat-list-base',
  },
  styleUrls: ['list.css'],
  inputs: ['disableRipple', 'disabled'],
  encapsulation: ViewEncapsulation.None,
  changeDetection: ChangeDetectionStrategy.OnPush,
  providers: [{provide: MAT_LIST, useExisting: MatLegacyList}],
})
export class MatLegacyList
  extends _MatListBase
  implements CanDisable, CanDisableRipple, OnChanges, OnDestroy
{
  /** Emits when the state of the list changes. */
  readonly _stateChanges = new Subject<void>();

  constructor(private _elementRef: ElementRef<HTMLElement>) {
    super();

    if (this._getListType() === 'action-list') {
      _elementRef.nativeElement.classList.add('mat-action-list');
      _elementRef.nativeElement.setAttribute('role', 'group');
    }
  }

  _getListType(): 'list' | 'action-list' | null {
    const nodeName = this._elementRef.nativeElement.nodeName.toLowerCase();

    if (nodeName === 'mat-list') {
      return 'list';
    }

    if (nodeName === 'mat-action-list') {
      return 'action-list';
    }

    return null;
  }

  ngOnChanges() {
    this._stateChanges.next();
  }

  ngOnDestroy() {
    this._stateChanges.complete();
  }
}

/**
 * Directive whose purpose is to add the mat- CSS styling to this selector.
 * @docs-private
 * @deprecated Use `MatListAvatarCssMatStyler` from `@angular/material/list` instead. See https://material.angular.io/guide/mdc-migration for information about migrating.
 * @breaking-change 17.0.0
 */
@Directive({
  selector: '[mat-list-avatar], [matListAvatar]',
  host: {'class': 'mat-list-avatar'},
})
export class MatLegacyListAvatarCssMatStyler {}

/**
 * Directive whose purpose is to add the mat- CSS styling to this selector.
 * @docs-private
 * @deprecated Use `MatListIconCssMatStyler` from `@angular/material/list` instead. See https://material.angular.io/guide/mdc-migration for information about migrating.
 * @breaking-change 17.0.0
 */
@Directive({
  selector: '[mat-list-icon], [matListIcon]',
  host: {'class': 'mat-list-icon'},
})
export class MatLegacyListIconCssMatStyler {}

/**
 * Directive whose purpose is to add the mat- CSS styling to this selector.
 * @docs-private
 * @deprecated Use `MatListSubheaderCssMatStyler` from `@angular/material/list` instead. See https://material.angular.io/guide/mdc-migration for information about migrating.
 * @breaking-change 17.0.0
 */
@Directive({
  selector: '[mat-subheader], [matSubheader]',
  host: {'class': 'mat-subheader'},
})
export class MatLegacyListSubheaderCssMatStyler {}

/**
 * An item within a Material Design list.
 * @deprecated Use `MatListItem` from `@angular/material/list` instead. See https://material.angular.io/guide/mdc-migration for information about migrating.
 * @breaking-change 17.0.0
 */
@Component({
  selector: 'mat-list-item, a[mat-list-item], button[mat-list-item]',
  exportAs: 'matListItem',
  host: {
    'class': 'mat-list-item mat-focus-indicator',
    '[class.mat-list-item-disabled]': 'disabled',
    '[class.mat-list-item-with-avatar]': '_avatar || _icon',
  },
  inputs: ['disableRipple'],
  templateUrl: 'list-item.html',
  encapsulation: ViewEncapsulation.None,
  changeDetection: ChangeDetectionStrategy.OnPush,
})
export class MatLegacyListItem
  extends _MatListItemMixinBase
  implements AfterContentInit, CanDisableRipple, OnDestroy
{
  private _isInteractiveList: boolean = false;
  private _list?: MatLegacyNavList | MatLegacyList;
  private readonly _destroyed = new Subject<void>();

  @ContentChildren(MatLine, {descendants: true}) _lines: QueryList<MatLine>;
  @ContentChild(MatLegacyListAvatarCssMatStyler) _avatar: MatLegacyListAvatarCssMatStyler;
  @ContentChild(MatLegacyListIconCssMatStyler) _icon: MatLegacyListIconCssMatStyler;

  constructor(
    private _element: ElementRef<HTMLElement>,
    _changeDetectorRef: ChangeDetectorRef,
    @Optional() @Inject(MAT_NAV_LIST) navList?: MatLegacyNavList,
    @Optional() @Inject(MAT_LIST) list?: MatLegacyList,
  ) {
    super();
    this._isInteractiveList = !!(navList || (list && list._getListType() === 'action-list'));
    this._list = navList || list;

    // If no type attribute is specified for <button>, set it to "button".
    // If a type attribute is already specified, do nothing.
    const element = this._getHostElement();

    if (element.nodeName.toLowerCase() === 'button' && !element.hasAttribute('type')) {
      element.setAttribute('type', 'button');
    }

    if (this._list) {
      // React to changes in the state of the parent list since
      // some of the item's properties depend on it (e.g. `disableRipple`).
      this._list._stateChanges.pipe(takeUntil(this._destroyed)).subscribe(() => {
        _changeDetectorRef.markForCheck();
      });
    }
  }

  /** Whether the option is disabled. */
  @Input()
  get disabled(): boolean {
    return this._disabled || !!(this._list && this._list.disabled);
  }
  set disabled(value: BooleanInput) {
    this._disabled = coerceBooleanProperty(value);
  }
  private _disabled = false;

  ngAfterContentInit() {
    setLines(this._lines, this._element);
  }

  ngOnDestroy() {
    this._destroyed.next();
    this._destroyed.complete();
  }

  /** Whether this list item should show a ripple effect when clicked. */
  _isRippleDisabled() {
    return (
      !this._isInteractiveList || this.disableRipple || !!(this._list && this._list.disableRipple)
    );
  }

  /** Retrieves the DOM element of the component host. */
  _getHostElement(): HTMLElement {
    return this._element.nativeElement;
  }
}


text:
"""
Application: website

Contains the views for static websites. You should put static content
like the 'About' page here.
"""
from django.shortcuts import render

def home(request):
    """
    Default homepage for the django-vagrant-box project.
    Feel free to delete this view when it's no longer needed.
    """
    return render(request, 'index.html')


text:
package org.apache.activemq.artemis.core.server.files;

import java.io.File;
import java.io.IOException;
import java.nio.file.FileStore;
import java.nio.file.Files;
import java.util.HashSet;
import java.util.Set;
import java.util.concurrent.Executor;
import java.util.concurrent.ScheduledExecutorService;
import java.util.concurrent.TimeUnit;

import org.apache.activemq.artemis.core.io.IOCriticalErrorListener;
import org.apache.activemq.artemis.core.server.ActiveMQScheduledComponent;
import org.jboss.logging.Logger;

/**
 * This will keep a list of fileStores. It will make a comparison on all file stores registered. if any is over the limit,
 * all Callbacks will be called with over.
 *
 * For instance: if Large Messages folder is registered on a different folder and it's over capacity,
 * the whole system will be waiting it to be released.
 */
public class FileStoreMonitor extends ActiveMQScheduledComponent {

   private static final Logger logger = Logger.getLogger(FileStoreMonitor.class);

   private final Set<Callback> callbackList = new HashSet<>();
   private final Set<FileStore> stores = new HashSet<>();
   private double maxUsage;
   private final Object monitorLock = new Object();
   private final IOCriticalErrorListener ioCriticalErrorListener;

   public FileStoreMonitor(ScheduledExecutorService scheduledExecutorService,
                           Executor executor,
                           long checkPeriod,
                           TimeUnit timeUnit,
                           double maxUsage,
                           IOCriticalErrorListener ioCriticalErrorListener) {
      super(scheduledExecutorService, executor, checkPeriod, timeUnit, false);
      this.maxUsage = maxUsage;
      this.ioCriticalErrorListener = ioCriticalErrorListener;
   }

   public FileStoreMonitor addCallback(Callback callback) {
      synchronized (monitorLock) {
         callbackList.add(callback);
         return this;
      }
   }

   public FileStoreMonitor addStore(File file) throws IOException {
      synchronized (monitorLock) {
         // JDBC storage may return this as null, and we may need to ignore it
         if (file != null && file.exists()) {
            try {
               addStore(Files.getFileStore(file.toPath()));
            } catch (IOException e) {
               logger.error("Error getting file store for " + file.getAbsolutePath(), e);
               throw e;
            }
         }
         return this;
      }
   }

   public FileStoreMonitor addStore(FileStore store) {
      synchronized (monitorLock) {
         stores.add(store);
         return this;
      }
   }

   @Override
   public void run() {
      tick();
   }

   public void tick() {
      synchronized (monitorLock) {
         boolean over = false;

         FileStore lastStore = null;
         double usage = 0;

         for (FileStore store : stores) {
            try {
               lastStore = store;
               usage = calculateUsage(store);
               over = usage > maxUsage;
               if (over) {
                  break;
               }
            } catch (IOException ioe) {
               ioCriticalErrorListener.onIOException(ioe, "IO Error while calculating disk usage", null);
            } catch (Exception e) {
               logger.warn(e.getMessage(), e);
            }
         }

         for (Callback callback : callbackList) {
            callback.tick(lastStore, usage);

            if (over) {
               callback.over(lastStore, usage);
            } else {
               callback.under(lastStore, usage);
            }
         }
      }
   }

   public double getMaxUsage() {
      return maxUsage;
   }

   public FileStoreMonitor setMaxUsage(double maxUsage) {
      this.maxUsage = maxUsage;
      return this;
   }

   protected double calculateUsage(FileStore store) throws IOException {
      return 1.0 - (double) store.getUsableSpace() / getTotalSpace(store);
   }

   private double getTotalSpace(FileStore store) throws IOException {
      double totalSpace = (double) store.getTotalSpace();
      if (totalSpace < 0) {
         totalSpace = Long.MAX_VALUE;
      }
      return totalSpace;
   }

   public interface Callback {

      void tick(FileStore store, double usage);

      void over(FileStore store, double usage);

      void under(FileStore store, double usage);
   }

}


text:
outputDir="cuffnorm_out_RNA-seq_Fractionation"
annotationGTF="/home/akimitsu/database/annotation_file/hg38/gencode.v24.basic.annotation.gtf"
sample1="/home/akimitsu/data/RNA-seq_Fractionation/RNA-seq_cyto/STAR_output_for_cufflinks_CytoRNASeq/STAR_accepted_hits_genome.bam"
sample2="/home/akimitsu/data/RNA-seq_Fractionation/RNA-seq_nuc/STAR_output_for_cufflinks_NucRNASeq/STAR_accepted_hits_genome.bam"
sample3="/home/akimitsu/data/RNA-seq_Fractionation/RNA-seq_total/STAR_output_for_cufflinks_TotalRNASeq/STAR_accepted_hits_genome.bam"

cuffnorm -p 8 -o ${outputDir} ${annotationGTF} ${sample1} ${sample2} ${sample3}


text:
#ifndef _PHYSICS_HH_
#define _PHYSICS_HH_

#include <string>

#include "gazebo/physics/PhysicsTypes.hh"
#include "gazebo/sdf/sdf.hh"

namespace gazebo
{
  /// \ingroup gazebo_physics
  /// \brief physics namespace
  namespace physics
  {
    /// \addtogroup gazebo_physics
    /// \{

    /// \brief Setup gazebo::SystemPlugin's and call gazebo::transport::init.
    bool load();

    /// \brief Finalize transport by calling gazebo::transport::fini.
    bool fini();

    /// \brief Create a world given a name.
    /// \param[in] _name Name of the world to create.
    /// \return Pointer to the new world.
    WorldPtr create_world(const std::string &_name ="");

    /// \brief Returns a pointer to a world by name.
    /// \param[in] _name Name of the world to get.
    /// \return Pointer to the world.
    WorldPtr get_world(const std::string &_name = "");

    /// \brief Load world from sdf::Element pointer.
    /// \param[in] _world Pointer to a world.
    /// \param[in] _sdf SDF values to load from.
    void load_world(WorldPtr _world, sdf::ElementPtr _sdf);

    /// \brief Init world given a pointer to it.
    /// \param[in] _world World to initialize.
    void init_world(WorldPtr _world);

    /// \brief Run world by calling World::Run() given a pointer to it.
    /// \param[in] _world World to run.
    void run_world(WorldPtr _world);

    /// \brief Stop world by calling World::Stop() given a pointer to it.
    /// \param[in] _world World to stop.
    void stop_world(WorldPtr _world);

    /// \brief Pause world by calling World::SetPaused.
    /// \param[in] _world World to pause or unpause.
    /// \param[in] _pause True to pause, False to unpause.
    void pause_world(WorldPtr _world, bool _pause);

    /// \brief load multiple worlds from single sdf::Element pointer
    /// \param[in] _sdf SDF values used to create worlds.
    void load_worlds(sdf::ElementPtr _sdf);

    /// \brief initialize multiple worlds stored in static variable
    /// gazebo::g_worlds
    void init_worlds();

    /// \brief run multiple worlds stored in static variable
    /// gazebo::g_worlds
    void run_worlds();

    /// \brief stop multiple worlds stored in static variable
    /// gazebo::g_worlds
    void stop_worlds();

    /// \brief pause multiple worlds stored in static variable
    /// gazebo::g_worlds
    /// \param[in] _pause True to pause, False to unpause.
    void pause_worlds(bool pause);

    /// \brief remove multiple worlds stored in static variable
    /// gazebo::g_worlds
    void remove_worlds();
    /// \}
  }
}
#endif


text:
{% extends "menu.html" %}

{% block content %}

Contrasenya canviada

S'ha canviat la contrasenya. Ara pots iniciar sessió.

Iniciar sessió
{% endblock content %}


text:
//
// Project: SOAPI
// http://soapics.codeplex.com
// http://stackapps.com/questions/386
//
// Copyright 2010, Sky Sanders
// Licensed under the GPL Version 2 license.
// http://soapics.codeplex.com/license
//
// Date: June 26 2010
// API ver 1.0 rev 2010.0709.04
//
using System;

namespace Salient.JsonClient.Converters
{
    ///
    ///
    public static class UnixDateTimeOffsetHelper
    {
        private const string InvalidUnixEpochErrorMessage = "Unix epoc starts January 1st, 1970";
        ///
        ///   Convert a long into a DateTimeOffset
        ///   Need to double check that UTC is not required
        ///
        public static DateTimeOffset FromUnixTime(this Int64 self)
        {
            var ret = new DateTimeOffset(1970, 1, 1, 0, 0, 0, TimeSpan.Zero);
            return ret.AddSeconds(self);
        }

        ///
        ///
        ///<param name="self"></param>
        ///<returns></returns>
        public static Int64 ToUnixTime(this DateTimeOffset self)
        {
            return self.ToUnixTime(true);
        }
        ///
        ///   Convert a DateTimeOffset into a long
        ///   Need to double check that UTC is not required
        ///
        public static Int64 ToUnixTime(this DateTimeOffset self,bool fixMinDate)
        {
            if (self == DateTimeOffset.MinValue)
            {
                return 0;
            }

            var epoc = new DateTimeOffset(1970, 1, 1, 0, 0, 0, TimeSpan.Zero);
            var delta = self - epoc;

            double seconds = delta.TotalSeconds;
            if (seconds < 0)
            {
                if (fixMinDate)
                {
                    seconds = 0;
                }
                else
                {
                    throw new ArgumentOutOfRangeException(InvalidUnixEpochErrorMessage);
                }
            }

            return (long)seconds;
        }
    }

    ///
    ///
    public static class UnixDateTimeHelper
    {
        private const string InvalidUnixEpochErrorMessage = "Unix epoc starts January 1st, 1970";
        ///
        ///   Convert a long into a DateTime
        ///   Need to double check that UTC is not required
        ///
        public static DateTime FromUnixTime(this Int64 self)
        {
            var ret = new DateTime(1970, 1, 1);
            return ret.AddSeconds(self);
        }

        ///
        ///   Convert a DateTime into a long
        ///   Need to double check that UTC is not required
        ///
        public static Int64 ToUnixTime(this DateTime self)
        {
            if (self == DateTime.MinValue)
            {
                return 0;
            }

            var epoc = new DateTime(1970, 1, 1);
            var delta = self - epoc;

            if (delta.TotalSeconds < 0) throw new ArgumentOutOfRangeException(InvalidUnixEpochErrorMessage);

            return (long)delta.TotalSeconds;
        }
    }
}


text:
package org.ethontos.phylontal.project.phylo;

public interface PMatrix<T extends CharStateType> {

    public PMatrixCell<T> makeCell(T value);

    public StateSet makeStateSet();

    void setUID(String id);

    void setName(String name);

    void addCharacter(String id, StateSet s);   //simply adds one column (character) to the end

    void addTaxon(String taxonID);

    void setCell(String charID, String taxonID, PMatrixCell<T> w);

}


text:
'use strict';

var headerExtractor = require('./headerExtractor');

module.exports = function (requestor) {
  return function* batchRequestor(requests, baseUrl, headers) {
    var results = {},
        resultsHeaders = {},
        requestsThunks = [],
        i = 0,
        name;

    for (name in requests) {
      requestsThunks[i] = requestor.get(baseUrl + requests[name], headers);
      results[name] = i;
      i++;
    }

    var resultsArray = yield requestsThunks, totalResults = 0;

    for (name in results) {
      results[name] = resultsArray[results[name]];
      if (!results[name]) {
        continue;
      }

      ++totalResults;

      resultsHeaders[name] = headerExtractor.extract(results[name].headers);
    }

    var responseHeaders = headerExtractor.compute(resultsHeaders, totalResults);

    return { body: results, headers: responseHeaders };
  };
};


text:
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <title>W30726_text</title>
        <link rel="stylesheet" type="text/css" href="style.css" />

                «

    <p class="styleSans13.0000<enum PANGO_WEIGHT_NORMAL of type PangoWeight><enum PANGO_STYLE_NORMAL of type PangoStyle>">(
HALcéN RESOURCES

    <p class="styleSans11.0000<enum PANGO_WEIGHT_NORMAL of type PangoWeight><enum PANGO_STYLE_NORMAL of type PangoStyle>">McKenzie County, ND - attn. Emma Volz - E911 Addressing Coordinator

    <p class="styleSans11.0000<enum PANGO_WEIGHT_NORMAL of type PangoWeight><enum PANGO_STYLE_NORMAL of type PangoStyle>">Fort Berthold 151-94-27A-34-4H - Leviathan Fort Berthold 151-94-27A-34-5H - Leviathan Fort Berthold 151-94-27A-34-6H - Leviathan Fort Berthold 151-94-27A-34—7H - Leviathan Fort Berthold 151-94-27A-34-8H - Leviathan Fort Berthold 151-94—27A-34-9H - Leviathan Fort Berthold 151-94-26A-35-4H - Longs Fort Berthold 151-94-26A-35-5H - Longs Fort Berthold 151-94-26A-35-6H - Longs Fort Berthold 151-94—26A—35-7H - Longs Fort Berthold 151-94-26A-35-8H - Longs Fort Berthold 151-94-26A-35-9H - Longs Berg Trust Federal 4-26-35H — Berg Trust Berg Trust Federal 5-26-35H — Berg Trust Berg Trust Federal 6-26-35H — Berg Trust Berg Trust Federal 7-26-35H — Berg Trust
As required, addresses will be provided via Sundry Notice once they are obtained from the respective counties.

    <p class="styleSans11.0000<enum PANGO_WEIGHT_NORMAL of type PangoWeight><enum PANGO_STYLE_NORMAL of type PangoStyle>">If you have any questions or concerns please give me a call.

    <p class="styleSans7.0000<enum PANGO_WEIGHT_NORMAL of type PangoWeight><enum PANGO_STYLE_NORMAL of type PangoStyle>">

    <p class="styleSans53.0000<enum PANGO_WEIGHT_NORMAL of type PangoWeight><enum PANGO_STYLE_NORMAL of type PangoStyle>">Thanks,
Mark H. Johnson Petroleum Engineer HRC Operating, LLC
720.889.6025

    <p class="styleSans9.0000<enum PANGO_WEIGHT_NORMAL of type PangoWeight><enum PANGO_STYLE_NORMAL of type PangoStyle>">HRC Operating, LLC is a wholly-owned subsidiary of Halcén Resources Corporation

    <p class="styleSans7.0000<enum PANGO_WEIGHT_NORMAL of type PangoWeight><enum PANGO_STYLE_NORMAL of type PangoStyle>">DENVER OFFICE ' 1801 California Street, Suite 3500 ' Denver, CO 80202 ° (303) 297—2028 Phone ' (303) 29772196 Fax


text:
{% extends "base.html" %}

{% load staticfiles %}

{% block title %}{{ block.super }}Home{% endblock %}

{% block extra_head %}

{% endblock extra_head %}

{% block header %}

Hi, {% if request.user.is_authenticated %}{{ request.user.name }}{% else %}anonymous user{% endif %}.

    {% if request.user.is_anonymous %}

There are currently {{ pages|length }} public page{{ pages|pluralize }}.

    {% endif %}

{% endblock header %}

{% block content %}

  {% if request.user.is_authenticated %}

/ {{ request.user.name }} / + page

    {% for project in projects %}

{{ project.title }}

              {% if project in pages %}
              Public
              {% endif %}
              {% if not request.user == project.creator %}
              Reviewing
              {% endif %}

/{{ project.slug }} :: {{ project.last_updated }}

Author: {{ project.creator.name }}
            {% if project.reviewers.all %}
Reviewers: {% for reviewer in project.reviewers.all %}{{ reviewer.name }} {% endfor %}{% endif %}

              edit
              history

                {% if request.user = project.creator and project not in pages %}
                  Make public
                {% endif %}

            {% if request.user.is_staff %}

                    + Reviewer

                {% endif %}

            {% if request.user.is_staff %}

                <form action="/p/{{ project.slug }}/_allow/" method="post">
                  {% csrf_token %}
                  User name:
                  <input id="user_name" type="text" name="user_name" value="">

                      <input id="can_edit" type="checkbox" name="can_edit" class="form-check-input">
                      Can write.

                  <input type="submit" value="OK">
                </form>

            {% endif %}

    {% endfor %}
  {% else %}
    {% for project in pages %}
          {% if 'root' in project.title %}

{{ project.title }} {{ project.last_updated }}

          {% else %}
            {% if 'ant' in project.title %}

{{ project.title }} {{ project.last_updated }}

            {% else %}

{{ project.title }} {{ project.last_updated }}

            {% endif %}
          {% endif %}
    {% endfor %}
  {% endif %}

{% endblock content %}

{% block footer %}
{% endblock %}

{% block extra_script %}
{% endblock %}


text:
<resources>

    <style name="Widget.TextView.ListSeparator" parent="@android:style/Widget.TextView">
        <item name="android:layout_width">match_parent</item>
        <item name="android:layout_height">wrap_content</item>
        <item name="android:textStyle">bold</item>
        <item name="android:textSize">14sp</item>
        <item name="android:gravity">center_vertical</item>
    </style>

    <style name="PreferenceListHeader" parent="Widget.TextView.ListSeparator">
        <item name="android:textColor">@color/accent</item>
        <item name="android:textStyle">normal</item>
        <item name="android:textSize">18sp</item>
        <item name="android:paddingTop">6dp</item>
        <item name="android:paddingBottom">6dp</item>
    </style>

    <style name="PreferenceScreen" parent="android:Theme.NoTitleBar">
        <item name="android:listSeparatorTextViewStyle">@style/PreferenceListHeader</item>
    </style>

    <style name="OverflowMenu" parent="Widget.AppCompat.PopupMenu.Overflow">
        <!-- Required for pre-Lollipop. -->
        <item name="overlapAnchor">false</item>
    </style>

    <style name="AbStyle" parent="Widget.AppCompat.Toolbar">
        <item name="elevation">2dp</item>
        <item name="displayOptions">homeAsUp|showTitle</item>
        <item name="android:colorBackground">@color/Primary_Grey_300</item>
        <item name="android:textColorPrimary">@color/primary_dark_material_dark</item>
        <item name="android:layout_marginLeft">8dp</item>
        <item name="android:layout_marginTop">6dp</item>
        <!--showHome-->
    </style>

    <style name="MyCustomToolBarTheme" parent="ThemeOverlay.AppCompat.Light">
        <item name="windowActionModeOverlay">true</item>
        <item name="android:textColorPrimary">@color/icons</item>
        <item name="android:textColorSecondary">@color/icons</item>
        <item name="android:layout_marginLeft">0dp</item>
    </style>

    <style name="myToolbarNavigationButtonStyle" parent="@style/Widget.AppCompat.Toolbar.Button.Navigation">
        <item name="android:minWidth">0dp</item>
        <item name="android:padding">12dp</item>
        <item name="android:layout_marginRight">0dp</item>
        <item name="android:scaleType">centerInside</item>
    </style>

    <!-- Cards lib customization -->
    <style name="card_thumbnail_image">
        <item name="android:layout_width">@dimen/card_thumbnail_width_capstone</item>
        <item name="android:layout_height">@dimen/card_thumbnail_height_capstone</item>
        <item name="android:layout_gravity">center</item>
        <item name="android:gravity">center</item>
        <item name="android:scaleType">centerCrop</item>
    </style>

    <style name="card_thumbnail_outer_layout">
        <item name="android:layout_width">wrap_content</item>
        <item name="android:layout_height">wrap_content</item>
    </style>

    <style name="capstone_list_card" parent="list_card">
        <item name="android:paddingLeft">0dp</item>
        <item name="android:paddingRight">0dp</item>
        <item name="android:paddingBottom">0dp</item>
        <item name="android:paddingTop">0dp</item>
    </style>

    <style name="Now"/>

    <style name="Now.card_expand_inner_layout">
        <item name="android:paddingLeft">10dp</item>
        <item name="android:paddingRight">10dp</item>
        <item name="android:layout_width">match_parent</item>
        <item name="android:layout_height">32dp</item>
        <item name="android:gravity">center_vertical</item>
    </style>

    <style name="Now.card_expand_inner_layout.light_gray">
        <item name="android:background">#515254</item>
        <item name="android:textColor">#B3B2B2</item>
    </style>

    <style name="Now.card_expand_inner_layout.light_gray.bold">
        <item name="android:textStyle">bold</item>
    </style>

    <style name="Now.card_expand_inner_layout.dark">
        <item name="android:background">#4A4B4D</item>
        <item name="android:textColor">#FFF</item>
    </style>

    <style name="Now.card_expand_inner_layout.dark.bold" parent="@style/Now.card_expand_inner_layout.dark">
        <item name="android:textStyle">bold</item>
    </style>

    <style name="menu_labels_style">
        <item name="android:background">@drawable/fab_label_background</item>
        <item name="android:textColor">@color/icons</item>
    </style>

</resources>


text:
module PKGWizard
  class Command
    include ::Mixlib::CLI

    option :help,
      :short => "-h",
      :long => "--help",
      :description => "Show this message",
      :on => :tail,
      :boolean => true,
      :show_options => true,
      :exit => 0

    def self.registry
      @@registry ||= []
    end

    def run(argv)
      @@argv = argv
      if @@argv.include?('--version') or @@argv.include?('-v')
        puts "PKG Wizard Version #{PKGWizard::VERSION}"
        exit 0
      end
      cmd = argv.shift
      found = false
      @@registry.each do |c|
        if c[:name] == cmd
          c[:klass].perform
          found = true
        end
      end
      if not found
        puts
        puts "USAGE: #{File.basename($0)} command [options]"
        puts
        puts "Available Commands:"
        puts
        @@registry.each do |c|
          puts c[:name]
        end
        puts
      end
    end

  end
end


text:
<?php

namespace BetterReflection\Reflection;

use PhpParser\Node\Stmt\ClassMethod as MethodNode;

class ReflectionMethod extends ReflectionFunctionAbstract
{
    const IS_ABSTRACT = (1 << 0);
    const IS_FINAL = (1 << 1);
    const IS_PRIVATE = (1 << 2);
    const IS_PROTECTED = (1 << 3);
    const IS_PUBLIC = (1 << 4);
    const IS_STATIC = (1 << 5);

    /**
     * @var int
     */
    private $flags = 0;

    /**
     * @var ReflectionClass
     */
    private $declaringClass;

    /**
     * @param MethodNode $node
     * @param ReflectionClass $declaringClass
     * @return ReflectionMethod
     */
    public static function createFromNode(
        MethodNode $node,
        ReflectionClass $declaringClass
    ) {
        $method = new self($node);
        $method->declaringClass = $declaringClass;

        // Compat with core reflection means we should NOT pass namespace info
        // for ReflectionMethod
        $method->populateFunctionAbstract($node, $declaringClass->getLocatedSource(), null);

        $method->flags |= $node->isAbstract() ? self::IS_ABSTRACT : 0;
        $method->flags |= $node->isFinal() ? self::IS_FINAL : 0;
        $method->flags |= $node->isPrivate() ? self::IS_PRIVATE : 0;
        $method->flags |= $node->isProtected() ? self::IS_PROTECTED : 0;
        $method->flags |= $node->isPublic() ? self::IS_PUBLIC : 0;
        $method->flags |= $node->isStatic() ? self::IS_STATIC : 0;

        return $method;
    }

    /**
     * Find the prototype for this method, if it exists. If it does not exist
     * it will throw a MethodPrototypeNotFound exception.
     *
     * @return ReflectionMethod
     * @throws Exception\MethodPrototypeNotFound
     */
    public function getPrototype()
    {
        $i = $this->getDeclaringClass();

        while ($i) {
            foreach ($i->getImmediateInterfaces() as $interface) {
                if ($interface->hasMethod($this->getName())) {
                    return $interface->getMethod($this->getName());
                }
            }

            $i = $i->getParentClass();

            if (null === $i) {
                continue;
            }

            if ($i->hasMethod($this->getName()) && $i->getMethod($this->getName())->isAbstract()) {
                return $i->getMethod($this->getName());
            }
        }

        throw new Exception\MethodPrototypeNotFound(sprintf(
            'Method %s::%s does not have a prototype',
            $this->getDeclaringClass()->getName(),
            $this->getName()
        ));
    }

    /**
     * Get the core-reflection-compatible modifier values.
     *
     * @return int
     */
    public function getModifiers()
    {
        $val = 0;
        $val += $this->isStatic() ? \ReflectionMethod::IS_STATIC : 0;
        $val += $this->isPublic() ? \ReflectionMethod::IS_PUBLIC : 0;
        $val += $this->isProtected() ? \ReflectionMethod::IS_PROTECTED : 0;
        $val += $this->isPrivate() ? \ReflectionMethod::IS_PRIVATE : 0;
        $val += $this->isAbstract() ? \ReflectionMethod::IS_ABSTRACT : 0;
        $val += $this->isFinal() ? \ReflectionMethod::IS_FINAL : 0;
        return $val;
    }

    /**
     * Check to see if a flag is set on this method.
     *
     * @param int $flag
     * @return bool
     */
    private function flagsHas($flag)
    {
        return (bool)($this->flags & $flag);
    }

    /**
     * Is the method abstract.
     *
     * @return bool
     */
    public function isAbstract()
    {
        return $this->flagsHas(self::IS_ABSTRACT);
    }

    /**
     * Is the method final.
     *
     * @return bool
     */
    public function isFinal()
    {
        return $this->flagsHas(self::IS_FINAL);
    }

    /**
     * Is the method private visibility.
     *
     * @return bool
     */
    public function isPrivate()
    {
        return $this->flagsHas(self::IS_PRIVATE);
    }

    /**
     * Is the method protected visibility.
     *
     * @return bool
     */
    public function isProtected()
    {
        return $this->flagsHas(self::IS_PROTECTED);
    }

    /**
     * Is the method public visibility.
     *
     * @return bool
     */
    public function isPublic()
    {
        return $this->flagsHas(self::IS_PUBLIC);
    }

    /**
     * Is the method static.
     *
     * @return bool
     */
    public function isStatic()
    {
        return $this->flagsHas(self::IS_STATIC);
    }

    /**
     * Is the method a constructor.
     *
     * @return bool
     */
    public function isConstructor()
    {
        return $this->getName() === '__construct';
    }

    /**
     * Is the method a destructor.
     *
     * @return bool
     */
    public function isDestructor()
    {
        return $this->getName() === '__destruct';
    }

    /**
     * Get the class that declares this method.
     *
     * @return ReflectionClass
     */
    public function getDeclaringClass()
    {
        return $this->declaringClass;
    }
}


text:
package com.bk.enums;

/**
 * @author Andrei Petraru
 * Mar 16, 2013
 */
public enum Status {
	WANT_TO_READ("Want to Read"),
	READING("Currently Reading"),
	READ("Read");

    private String status;

    private Status(String status) {
        this.status= status;
    }

    @Override
    public String toString() {
        return status;
    }
}


text:
<!DOCTYPE html>

	<meta charset="utf-8" />
	<title>My Vue Activity</title>
	<meta name="viewport"
		content="user-scalable=no, initial-scale=1, maximum-scale=1, minimum-scale=1, width=device-width, viewport-fit=cover" />
	<link rel="prefetch" type="application/l10n" href="locale.ini" />
	<link rel="stylesheet" media="not screen and (device-width: 1200px) and (device-height: 900px)"
		href="lib/sugar-web/graphics/css/sugar-96dpi.css">
	<link rel="stylesheet" media="screen and (device-width: 1200px) and (device-height: 900px)"
		href="lib/sugar-web/graphics/css/sugar-200dpi.css">
	<link rel="stylesheet" href="css/activity.css">
	<link href="css/xocolor.css" rel="stylesheet" type="text/css">
	<link rel="stylesheet" href="css/bootstrap-tour-standalone.min.css">

		<sugar-toolbar ref="SugarToolbar">
			<sugar-toolitem id="activity-button"></sugar-toolitem>

			<sugar-toolitem id="network-button"
				title="Network"
				palette-file="sugar-web/graphics/presencepalette"
				palette-class="PresencePalette"
				palette-event="shared"
				v-on:shared="SugarPresence.onShared"
				v-if="SugarPresence"
			></sugar-toolitem>
			<sugar-toolitem splitbar></sugar-toolitem>
			<sugar-toolitem id="list-button"
				:disabled="currentView!=viewGrid"
				palette-file="js/palettes/templatepalette.js"
				palette-event="template"
				@template="onTemplateSelected"
				palette-class="TemplatePalette"
				v-bind:title="l10n.stringTemplates"
			></sugar-toolitem>
			<sugar-toolitem splitbar></sugar-toolitem>
			<sugar-toolitem id="playpause-button" @click="onPlayPause" v-bind:title="l10n.stringPause" :disabled="currentView!=viewGrid"></sugar-toolitem>
			<sugar-toolitem id="settings-button" @click="onSettingsClicked" v-bind:title="l10n.stringSettings"></sugar-toolitem>
			<sugar-toolitem id="speed-button"
				:disabled="currentView!=viewGrid"
				palette-file="js/palettes/speedpalette.js"
				palette-class="SpeedPalette"
				palette-event="speed"
				@speed="onSpeedChanged"
				v-bind:title="l10n.stringSpeed"
			></sugar-toolitem>
			<sugar-toolitem id="text-button"
				:disabled="currentView!=viewGrid"
				palette-file="js/palettes/textpalette.js"
				palette-class="TextPalette"
				palette-event="text"
				@text="onTextChanged"
				v-bind:title="l10n.stringText"
			></sugar-toolitem>
			<sugar-toolitem splitbar></sugar-toolitem>
			<sugar-toolitem id="zoom-button"
				:disabled="currentView!=viewGrid"
				palette-file="js/palettes/zoompalette.js"
				palette-class="ZoomPalette"
				palette-event="zoom"
				@zoom="onZoomChanged"
				v-bind:title="l10n.stringZoom"
			></sugar-toolitem>

			<sugar-toolitem id="stop-button" title="Stop" class="pull-right" v-on:click="onStop"></sugar-toolitem>
			<sugar-toolitem v-if="$refs.SugarToolbar ? !$refs.SugarToolbar.isHidden() : true" v-on:click="fullscreen" id="fullscreen-button" v-bind:title="l10n.stringFullscreen" class="pull-right"></sugar-toolitem>
			<sugar-toolitem v-else v-on:click="unfullscreen" id="unfullscreen-button" v-bind:title="l10n.stringUnfullscreen" class="pull-right"></sugar-toolitem>
			<sugar-toolitem id="help-button" title="Tutorial" class="pull-right" v-on:click="onHelp"></sugar-toolitem>
		</sugar-toolbar>

{{message}}

			<activity-icon v-for="(icon) in gridContent" :key="icon.id"
				v-bind:name="icon.name"
				v-bind:svg="icon.svg"
				v-bind:color="icon.color"
				v-bind:size="icon.size">
			</activity-icon>

{{l10n.stringDragIcons}}

				<button type="button" id="delete-icons-button" class="delete-button" @click="onDeleteIconClicked"></button>

					<activity-icon v-for="(icon) in detailContent.dropIcons" class="padded-icon"
						v-bind:id="icon.id"
						v-bind:name="icon.name"
						v-bind:svg="icon.svg"
						v-bind:color="icon.color"
						v-bind:size="icon.size">
					</activity-icon>

{{l10n.stringEmptyIcon}}

					<activity-icon v-for="(icon) in detailContent.dragIcons" class="padded-icon"
						v-bind:id="icon.id"
						v-bind:name="icon.name"
						v-bind:svg="icon.svg"
						v-bind:color="icon.color"
						v-bind:size="icon.size">
					</activity-icon>

{{l10n.stringDragColors}}

				<button type="button" id="delete-colors-button" class="delete-button" @click="onDeleteColorClicked"></button>

					<activity-icon v-for="(icon) in detailContent.dropColors" class="padded-icon"
						v-bind:id="icon.id"
						v-bind:name="icon.name"
						v-bind:svg="icon.svg"
						v-bind:color="icon.color"
						v-bind:size="icon.size">
					</activity-icon>

{{l10n.stringEmptyColor}}

					<activity-icon v-for="(icon) in detailContent.dragColors" class="padded-icon"
						v-bind:id="icon.id"
						v-bind:name="icon.name"
						v-bind:svg="icon.svg"
						v-bind:color="icon.color"
						v-bind:size="icon.size">
					</activity-icon>

		<sugar-localization ref="SugarL10n" v-on:localized="localized"></sugar-localization>
		<sugar-activity ref="SugarActivity"></sugar-activity>
		<sugar-journal ref="SugarJournal" v-on:journal-data-loaded="onJournalDataLoaded" v-on:journal-new-instance="onJournalNewInstance" v-on:journal-shared-instance="onJournalSharedInstance"></sugar-journal>
		<sugar-presence ref="SugarPresence" v-on:data-received="onNetworkDataReceived" v-on:user-changed="onNetworkUserChanged"></sugar-presence>
		<sugar-tutorial ref="SugarTutorial"></sugar-tutorial


text:
        Recipients for

    <waltz-loading-notification show="$ctrl.visibility.loading"
                                name="Loading">
    </waltz-loading-notification>

 10}">

            <waltz-entity-link entity-ref="recipientRef">
            </waltz-entity-link>


text:
package lifecycle

import (
	"fmt"
	"strings"
	"testing"

	"k8s.io/kubernetes/pkg/admission"
	kapi "k8s.io/kubernetes/pkg/api"
	"k8s.io/kubernetes/pkg/api/unversioned"
	"k8s.io/kubernetes/pkg/client/cache"
	clientsetfake "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/fake"
	"k8s.io/kubernetes/pkg/client/unversioned/testclient"
	"k8s.io/kubernetes/pkg/genericapiserver"
	kubeletclient "k8s.io/kubernetes/pkg/kubelet/client"
	"k8s.io/kubernetes/pkg/runtime"
	etcdstorage "k8s.io/kubernetes/pkg/storage/etcd"
	"k8s.io/kubernetes/pkg/util/sets"

	buildapi "github.com/openshift/origin/pkg/build/api"
	"github.com/openshift/origin/pkg/cmd/server/origin"
	projectcache "github.com/openshift/origin/pkg/project/cache"
	"github.com/openshift/origin/pkg/util/restoptions"

	// install all APIs
	_ "github.com/openshift/origin/pkg/api/install"
)

type UnknownObject struct {
	unversioned.TypeMeta
}

func (obj *UnknownObject) GetObjectKind() unversioned.ObjectKind { return &obj.TypeMeta }

// TestIgnoreThatWhichCannotBeKnown verifies that the plug-in does not reject objects that are unknown to RESTMapper
func TestIgnoreThatWhichCannotBeKnown(t *testing.T) {
	handler := &lifecycle{}
	unknown := &UnknownObject{}

	err := handler.Admit(admission.NewAttributesRecord(unknown, kapi.Kind("kind").WithVersion("version"), "namespace", "name", kapi.Resource("resource").WithVersion("version"), "subresource", "CREATE", nil))
	if err != nil {
		t.Errorf("Admission control should not error if it finds an object it knows nothing about %v", err)
	}
}

// TestAdmissionExists verifies you cannot create Origin content if namespace is not known
func TestAdmissionExists(t *testing.T) {
	mockClient := &testclient.Fake{}
	mockClient.AddReactor("*", "*", func(action testclient.Action) (handled bool, ret runtime.Object, err error) {
		return true, &kapi.Namespace{}, fmt.Errorf("DOES NOT EXIST")
	})

	cache := projectcache.NewFake(mockClient.Namespaces(), projectcache.NewCacheStore(cache.MetaNamespaceKeyFunc), "")

	mockClientset := clientsetfake.NewSimpleClientset()
	handler := &lifecycle{client: mockClientset}
	handler.SetProjectCache(cache)
	build := &buildapi.Build{
		ObjectMeta: kapi.ObjectMeta{Name: "buildid"},
		Spec: buildapi.BuildSpec{
			CommonSpec: buildapi.CommonSpec{
				Source: buildapi.BuildSource{
					Git: &buildapi.GitBuildSource{
						URI: "http://github.com/my/repository",
					},
					ContextDir: "context",
				},
				Strategy: buildapi.BuildStrategy{
					DockerStrategy: &buildapi.DockerBuildStrategy{},
				},
				Output: buildapi.BuildOutput{
					To: &kapi.ObjectReference{
						Kind: "DockerImage",
						Name: "repository/data",
					},
				},
			},
		},
		Status: buildapi.BuildStatus{
			Phase: buildapi.BuildPhaseNew,
		},
	}
	err := handler.Admit(admission.NewAttributesRecord(build, kapi.Kind("Build").WithVersion("version"), "namespace", "name", kapi.Resource("builds").WithVersion("version"), "", "CREATE", nil))
	if err == nil {
		t.Errorf("Expected an error because namespace does not exist")
	}
}

// TestAdmissionLifecycle verifies you cannot create Origin content if namespace is terminating
func TestAdmissionLifecycle(t *testing.T) {
	namespaceObj := &kapi.Namespace{
		ObjectMeta: kapi.ObjectMeta{
			Name:      "test",
			Namespace: "",
		},
		Status: kapi.NamespaceStatus{
			Phase: kapi.NamespaceActive,
		},
	}
	store := projectcache.NewCacheStore(cache.IndexFuncToKeyFuncAdapter(cache.MetaNamespaceIndexFunc))
	store.Add(namespaceObj)
	mockClient := &testclient.Fake{}
	cache := projectcache.NewFake(mockClient.Namespaces(), store, "")

	mockClientset := clientsetfake.NewSimpleClientset(namespaceObj)
	handler := &lifecycle{client: mockClientset}
	handler.SetProjectCache(cache)
	build := &buildapi.Build{
		ObjectMeta: kapi.ObjectMeta{Name: "buildid", Namespace: "other"},
		Spec: buildapi.BuildSpec{
			CommonSpec: buildapi.CommonSpec{
				Source: buildapi.BuildSource{
					Git: &buildapi.GitBuildSource{
						URI: "http://github.com/my/repository",
					},
					ContextDir: "context",
				},
				Strategy: buildapi.BuildStrategy{
					DockerStrategy: &buildapi.DockerBuildStrategy{},
				},
				Output: buildapi.BuildOutput{
					To: &kapi.ObjectReference{
						Kind: "DockerImage",
						Name: "repository/data",
					},
				},
			},
		},
		Status: buildapi.BuildStatus{
			Phase: buildapi.BuildPhaseNew,
		},
	}
	err := handler.Admit(admission.NewAttributesRecord(build, kapi.Kind("Build").WithVersion("version"), build.Namespace, "name", kapi.Resource("builds").WithVersion("version"), "", "CREATE", nil))
	if err != nil {
		t.Errorf("Unexpected error returned from admission handler: %v", err)
	}

	// change namespace state to terminating
	namespaceObj.Status.Phase = kapi.NamespaceTerminating
	store.Add(namespaceObj)

	// verify create operations in the namespace cause an error
	err = handler.Admit(admission.NewAttributesRecord(build, kapi.Kind("Build").WithVersion("version"), build.Namespace, "name", kapi.Resource("builds").WithVersion("version"), "", "CREATE", nil))
	if err == nil {
		t.Errorf("Expected error rejecting creates in a namespace when it is terminating")
	}

	// verify update operations in the namespace can proceed
	err = handler.Admit(admission.NewAttributesRecord(build, kapi.Kind("Build").WithVersion("version"), build.Namespace, "name", kapi.Resource("builds").WithVersion("version"), "", "UPDATE", nil))
	if err != nil {
		t.Errorf("Unexpected error returned from admission handler: %v", err)
	}

	// verify delete operations in the namespace can proceed
	err = handler.Admit(admission.NewAttributesRecord(nil, kapi.Kind("Build").WithVersion("version"), build.Namespace, "name", kapi.Resource("builds").WithVersion("version"), "", "DELETE", nil))
	if err != nil {
		t.Errorf("Unexpected error returned from admission handler: %v", err)
	}

}

// TestCreatesAllowedDuringNamespaceDeletion checks to make sure that the resources in the whitelist are allowed
func TestCreatesAllowedDuringNamespaceDeletion(t *testing.T) {
	etcdHelper := etcdstorage.NewEtcdStorage(nil, kapi.Codecs.LegacyCodec(), "", false, genericapiserver.DefaultDeserializationCacheSize)

	config := &origin.MasterConfig{
		KubeletClientConfig: &kubeletclient.KubeletClientConfig{},
		RESTOptionsGetter:   restoptions.NewSimpleGetter(etcdHelper),
		EtcdHelper:          etcdHelper,
	}
	storageMap := config.GetRestStorage()
	resources := sets.String{}

	for resource := range storageMap {
		resources.Insert(strings.ToLower(resource))
	}

	for resource := range recommendedCreatableResources {
		if !resources.Has(resource) {
			t.Errorf("recommendedCreatableResources has resource %v, but that resource isn't registered.", resource)
		}
	}
}

func TestSAR(t *testing.T) {
	store := projectcache.NewCacheStore(cache.IndexFuncToKeyFuncAdapter(cache.MetaNamespaceIndexFunc))
	mockClient := &testclient.Fake{}
	mockClient.AddReactor("get", "namespaces", func(action testclient.Action) (handled bool, ret runtime.Object, err error) {
		return true, nil, fmt.Errorf("shouldn't get here")
	})
	cache := projectcache.NewFake(mockClient.Namespaces(), store, "")

	mockClientset := clientsetfake.NewSimpleClientset()
	handler := &lifecycle{client: mockClientset}
	handler.SetProjectCache(cache)

	tests := map[string]struct {
		kind     string
		resource string
	}{
		"subject access review": {
			kind:     "SubjectAccessReview",
			resource: "subjectaccessreviews",
		},
		"local subject access review": {
			kind:     "LocalSubjectAccessReview",
			resource: "localsubjectaccessreviews",
		},
	}

	for k, v := range tests {
		err := handler.Admit(admission.NewAttributesRecord(nil, kapi.Kind(v.kind).WithVersion("version"), "foo", "name", kapi.Resource(v.resource).WithVersion("version"), "", "CREATE", nil))
		if err != nil {
			t.Errorf("Unexpected error for %s returned from admission handler: %v", k, err)
		}
	}
}


text:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:orientation="vertical"
    android:layout_width="match_parent"
    android:layout_height="match_parent">

    <com.tech4fun.jesse.news.pager.NoScrollViewPager
        android:id="@+id/vp_content"
        android:layout_weight="1"
        android:layout_width="match_parent"
        android:layout_height="0dp"/>

    <RadioGroup
        android:id="@+id/rg_main"
        android:background="@drawable/bottom_tab_bg"
        android:orientation="horizontal"
        android:layout_width="match_parent"
        android:layout_height="wrap_content">

        <RadioButton
            android:id="@+id/rb_home"
            android:drawableTop="@drawable/rb_home_drawable_selector"
            android:gravity="center"
            android:text="@string/home"
            style="@style/bottom_tag_style"/>

        <RadioButton
            android:id="@+id/rb_newscenter"
            android:drawableTop="@drawable/rb_newscenter_drawable_selector"
            android:gravity="center"
            android:text="@string/newscenter"
            style="@style/bottom_tag_style"/>

        <RadioButton
            android:id="@+id/rb_smartservice"
            android:drawableTop="@drawable/rb_smartservice_drawable_selector"
            android:gravity="center"
            android:text="@string/smartservice"
            style="@style/bottom_tag_style"/>

        <RadioButton
            android:id="@+id/rb_shoppingcart"
            android:drawableTop="@drawable/rb_shoppingcart_drawable_selector"
            android:gravity="center"
            android:text="@string/shoppingcart"
            style="@style/bottom_tag_style"/>

        <RadioButton
            android:id="@+id/rb_setting"
            android:drawableTop="@drawable/rb_setting_drawable_selector"
            android:gravity="center"
            android:text="@string/setting"
            style="@style/bottom_tag_style"/>

    </RadioGroup>
</LinearLayout>


text:
import numpy as np
import pytest
from numpy.testing import assert_array_equal

from landlab.field.graph_field import FieldDataset

def test_init():
    ds = FieldDataset("node")
    assert ds.size is None
    assert ds.fixed_size is True
    assert list(ds) == []
    assert len(ds) == 0

def test_init_with_size():
    ds = FieldDataset("node", size=1)
    assert ds.size == 1
    with pytest.raises(ValueError):
        FieldDataset("node", size=1.1)
    with pytest.raises(ValueError):
        FieldDataset("node", size=-1)

def test_init_fixed_size():
    assert FieldDataset("node", fixed_size=True).fixed_size is True
    assert FieldDataset("node", fixed_size=1).fixed_size is True
    assert FieldDataset("node", fixed_size=False).fixed_size is False
    assert FieldDataset("node", fixed_size=0).fixed_size is False
    assert FieldDataset("node", fixed_size="true").fixed_size is True
    assert FieldDataset("node", fixed_size="false").fixed_size is True

def test_size_setter():
    ds = FieldDataset("node", fixed_size=True)
    assert ds.size is None

    ds.size = 3
    assert ds.size == 3
    with pytest.raises(ValueError):
        ds.size = 4
    ds.size = 3

    ds.fixed_size = False
    ds.size = 4
    assert ds.size == 4

    with pytest.raises(ValueError):
        ds.size = 1.1
    with pytest.raises(ValueError):
        ds.size = -1

def test_add_field():
    ds = FieldDataset("node")
    assert ds.size is None
    ds.set_value("air_temperature", [0, 0, 0])
    assert ds.size == 3
    assert_array_equal(ds["air_temperature"], (0, 0, 0))
    assert len(ds) == 1
    assert list(ds) == ["air_temperature"]

def test_field_maintains_reference():
    ds = FieldDataset("node")
    array = np.arange(3)
    ds.set_value("air_temperature", array)
    assert ds["air_temperature"] is array

def test_setitem():
    ds = FieldDataset("node")
    assert ds.size is None
    ds["air_temperature"] = [0, 0, 0]
    assert ds.size == 3
    assert_array_equal(ds["air_temperature"], (0, 0, 0))
    assert len(ds) == 1
    assert list(ds) == ["air_temperature"]

def test_add_fields():
    ds = FieldDataset("node", fixed_size=True)
    ds.set_value("air_temperature", [0, 0, 0])
    ds.set_value("ground_temperature", [1, 1, 1])
    assert_array_equal(ds["air_temperature"], (0, 0, 0))
    assert_array_equal(ds["ground_temperature"], (1, 1, 1))
    assert len(ds) == 2
    assert sorted(ds) == ["air_temperature", "ground_temperature"]

def test_add_fields_fixed_size():
    ds = FieldDataset("node", fixed_size=True)
    ds.set_value("air_temperature", [0, 0, 0])
    with pytest.raises(ValueError):
        ds.set_value("ground_temperature", [1, 1, 1, 1])

def test_add_fields_adjustable_size():
    ds = FieldDataset("node", fixed_size=False)
    ds.set_value("air_temperature", [0, 0, 0])
    assert ds.size == 3
    ds.set_value("air_temperature", [1, 1, 1, 1])
    assert ds.size == 4
    with pytest.raises(ValueError):
        ds.set_value("ground_temperature", [1, 1, 1])

def test_add_fields_fixed_size_setter():
    ds = FieldDataset("node", fixed_size=False)
    ds.set_value("air_temperature", [0, 0, 0])
    ds.set_value("air_temperature", [1, 1, 1, 1])
    ds.fixed_size = True
    with pytest.raises(ValueError):
        ds.set_value("air_temperature", [1, 1, 1])
    assert ds.size == 4
    ds.fixed_size = False
    ds.set_value("air_temperature", [1, 1, 1])
    assert ds.size == 3

def test_pop():
    ds = FieldDataset("node")
    ds.set_value("air_temperature", [0, 0, 0])
    ds.set_value("ground_temperature", [1, 1, 1])
    assert sorted(ds) == ["air_temperature", "ground_temperature"]

    assert_array_equal(ds.pop("ground_temperature"), [1, 1, 1])
    assert sorted(ds) == ["air_temperature"]

    assert_array_equal(ds.pop("air_temperature"), [0, 0, 0])
    assert sorted(ds) == []

    with pytest.raises(KeyError):
        ds.pop("air_temperature")

def test_contains():
    ds = FieldDataset("node")
    ds.set_value("air_temperature", [0, 0, 0])
    assert "air_temperature" in ds
    assert "ground_temperature" not in ds
    assert "node" not in ds

def test_scalars():
    ds = FieldDataset("node")
    ds["air_temperature"] = 2
    assert ds["air_temperature"] == 2
    assert ds.size == 1

    ds["ground_temperature"] = [0]
    assert ds["ground_temperature"] == [0]

def test_size_is_one():
    ds = FieldDataset("grid")
    ds.size = 1
    ds["air_temperature"] = [1, 2, 3]
    assert_array_equal(ds["air_temperature"], [[1, 2, 3]])
    ds["ground_temperature"] = [0, 0, 0, 0, 0]
    assert_array_equal(ds["ground_temperature"], [[0, 0, 0, 0, 0]])
    ds["gravity"] = 9.81
    assert ds["gravity"] == pytest.approx(9.81)

def test_reshaping_arrays():
    ds = FieldDataset("links", size=3, fixed_size=True)
    ds["air_temperature"] = [1.0, 2.0, 3.0]
    assert_array_equal(ds["air_temperature"], [1.0, 2.0, 3.0])

    assert ds.size == 3
    ds["nodes"] = [[0, 0], [0, 0], [0, 0]]
    assert_array_equal(ds["nodes"], [[0, 0], [0, 0], [0, 0]])

    ds["nodes"] = [1, 2, 3, 4, 5, 6]
    assert_array_equal(ds["nodes"], [[1, 2], [3, 4], [5, 6]])

    with pytest.raises(ValueError):
        ds["nodes"] = [1, 2, 3, 4, 5, 6, 7]


text:
goog.module('goog.dom.AbstractRangeTest');
goog.setTestOnly();

const AbstractRange = goog.require('goog.dom.AbstractRange');
const Const = goog.require('goog.string.Const');
const Range = goog.require('goog.dom.Range');
const TagName = goog.require('goog.dom.TagName');
const TrustedResourceUrl = goog.require('goog.html.TrustedResourceUrl');
const dom = goog.require('goog.dom');
const safe = goog.require('goog.dom.safe');
const testSuite = goog.require('goog.testing.testSuite');

testSuite({

  testCorrectDocument() {
    const aFrame = createTestFrame();
    document.body.appendChild(aFrame);
    const bFrame = createTestFrame();
    document.body.appendChild(bFrame);
    try {
      const a = aFrame.contentWindow;
      const b = bFrame.contentWindow;
      a.document.body.setAttribute('contenteditable', true);
      a.document.body.textContent = 'asdf';
      b.document.body.setAttribute('contenteditable', true);
      b.document.body.textContent = 'asdf';

      a.document.body.focus();
      let selection = AbstractRange.getBrowserSelectionForWindow(a);
      assertNotNull('Selection must not be null', selection);
      /** @suppress {checkTypes} suppression added to enable type checking */
      let range = Range.createFromBrowserSelection(selection);
      assertEquals(
          'getBrowserSelectionForWindow must return selection in the ' +
              'correct document',
          a.document, range.getDocument());

      // This is intended to trip up Internet Explorer --
      // see http://b/2048934
      b.document.body.focus();
      selection = /** @type {?{rangeCount: number}} */ (
          AbstractRange.getBrowserSelectionForWindow(a));
      // Some (non-IE) browsers keep a separate selection state for each
      // document in the same browser window. That's fine, as long as the
      // selection object requested from the window object is correctly
      // associated with that window's document.
      if (selection != null && selection.rangeCount != 0) {
        range = Range.createFromBrowserSelection(selection);
        assertEquals(
            'getBrowserSelectionForWindow must return selection in ' +
                'the correct document',
            a.document, range.getDocument());
      } else {
        assertTrue(selection == null || selection.rangeCount == 0);
      }
    } finally {
      dom.removeNode(aFrame);
      dom.removeNode(bFrame);
    }
  },

  testSelectionIsControlRange() {
    const frame = createTestFrame();
    document.body.appendChild(frame);
    try {
      const c = frame.contentWindow;
      c.document.body.setAttribute('contenteditable', true);
      c.document.body.appendChild(c.document.createElement('img'));

      // Only IE supports control ranges
      if (c.document.body.createControlRange) {
        const controlRange = c.document.body.createControlRange();
        controlRange.add(dom.getElementsByTagName(TagName.IMG, c.document)[0]);
        controlRange.select();
        const selection = AbstractRange.getBrowserSelectionForWindow(c);
        assertNotNull('Selection must not be null', selection);
      }
    } finally {
      dom.removeNode(frame);
    }
  },
});

/**
 * @return {!HTMLIFrameElement}
 */
function createTestFrame() {
  const frame = dom.createDom(TagName.IFRAME);
  safe.setIframeSrc(
      frame, TrustedResourceUrl.fromConstant(Const.from('about:blank')));
  return frame;
}


text:
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.

#nullable disable

using System;
using System.Linq;
using Microsoft.CodeAnalysis.CSharp.Symbols;
using Microsoft.CodeAnalysis.CSharp.Test.Utilities;
using Microsoft.CodeAnalysis.Test.Utilities;
using Roslyn.Test.Utilities;
using Xunit;

namespace Microsoft.CodeAnalysis.CSharp.UnitTests
{
    public class AttributeTests_RefSafetyRules : CSharpTestBase
    {
        [Fact]
        public void ExplicitAttribute_FromSource()
        {
            var source =
@"public class A
{
    public static ref T F<T>(out T t) => throw null;
}";

            var comp = CreateCompilation(new[] { source, RefSafetyRulesAttributeDefinition }, parseOptions: TestOptions.Regular10);
            CompileAndVerify(comp, symbolValidator: m => AssertRefSafetyRulesAttribute(m, includesAttributeDefinition: true, includesAttributeUse: false, publicDefinition: true));

            comp = CreateCompilation(new[] { source, RefSafetyRulesAttributeDefinition });
            CompileAndVerify(comp, symbolValidator: m => AssertRefSafetyRulesAttribute(m, includesAttributeDefinition: true, includesAttributeUse: true, publicDefinition: true));
        }

        [Theory]
        [CombinatorialData]
        public void ExplicitAttribute_FromMetadata(bool useCompilationReference)
        {
            var comp = CreateCompilation(RefSafetyRulesAttributeDefinition, parseOptions: TestOptions.Regular10);
            CompileAndVerify(comp, symbolValidator: m => AssertRefSafetyRulesAttribute(m, includesAttributeDefinition: true, includesAttributeUse: false, publicDefinition: true));
            var ref1 = AsReference(comp, useCompilationReference);

            var source =
@"public class A
{
    public static ref T F<T>(out T t) => throw null;
}";

            comp = CreateCompilation(source, references: new[] { ref1 }, parseOptions: TestOptions.Regular10);
            CompileAndVerify(comp, symbolValidator: m => AssertRefSafetyRulesAttribute(m, includesAttributeDefinition: false, includesAttributeUse: false, publicDefinition: true));

            comp = CreateCompilation(source, references: new[] { ref1 });
            CompileAndVerify(comp, symbolValidator: m => AssertRefSafetyRulesAttribute(m, includesAttributeDefinition: false, includesAttributeUse: true, publicDefinition: true));
        }

        [Fact]
        public void ExplicitAttribute_MissingConstructor()
        {
            var source1 =
@"namespace System.Runtime.CompilerServices
{
    public sealed class RefSafetyRulesAttribute : Attribute { }
}";
            var source2 =
@"public class A
{
    public static ref T F<T>(out T t) => throw null;
}";

            var comp = CreateCompilation(new[] { source1, source2 }, parseOptions: TestOptions.Regular10);
            comp.VerifyEmitDiagnostics();

            comp = CreateCompilation(new[] { source1, source2 });
            comp.VerifyEmitDiagnostics(
                // error CS0656: Missing compiler required member 'System.Runtime.CompilerServices.RefSafetyRulesAttribute..ctor'
                Diagnostic(ErrorCode.ERR_MissingPredefinedMember).WithArguments("System.Runtime.CompilerServices.RefSafetyRulesAttribute", ".ctor").WithLocation(1, 1));
        }

        [Theory]
        [CombinatorialData]
        public void ExplicitAttribute_ReferencedInSource(
            [CombinatorialValues(LanguageVersion.CSharp10, LanguageVersion.CSharp11)] LanguageVersion languageVersion,
            bool useCompilationReference)
        {
            var comp = CreateCompilation(RefSafetyRulesAttributeDefinition);
            comp.VerifyDiagnostics();
            var ref1 = AsReference(comp, useCompilationReference);

            var source =
@"using System.Runtime.CompilerServices;
[assembly: RefSafetyRules(11)]
[module: RefSafetyRules(11)]
";

            comp = CreateCompilation(source, references: new[] { ref1 }, parseOptions: TestOptions.Regular.WithLanguageVersion(languageVersion));
            comp.VerifyDiagnostics(
                // (3,10): error CS8335: Do not use 'System.Runtime.CompilerServices.RefSafetyRulesAttribute'. This is reserved for compiler usage.
                // [module: RefSafetyRules(11)]
                Diagnostic(ErrorCode.ERR_ExplicitReservedAttr, "RefSafetyRules(11)").WithArguments("System.Runtime.CompilerServices.RefSafetyRulesAttribute").WithLocation(3, 10));
        }

        [WorkItem(63692, "https://github.com/dotnet/roslyn/issues/63692")]
        [Theory]
        [InlineData("", false)]
        [InlineData("[assembly: System.Reflection.AssemblyDescriptionAttribute(null)] [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(string))]", false)]
        [InlineData("using System;", false)]
        [InlineData("using S = System.String;", false)]
        [InlineData("namespace N { namespace M { } }", false)]
        [InlineData("interface I { }", true)]
        [InlineData("namespace N { namespace M { interface I { } } }", true)]
        [InlineData("interface I { T F<T>(); }", true)]
        [InlineData("interface I { ref T F<T>(); }", true)]
        [InlineData("interface I { void F<T>(T t); }", true)]
        [InlineData("interface I { void F<T>(ref T t); }", true)]
        [InlineData("interface I { void F<T>(in T t); }", true)]
        [InlineData("interface I { void F<T>(out T t); }", true)]
        [InlineData("interface I { ref int P { get; } }", true)]
        [InlineData("class C { }", true)]
        [InlineData("struct S { }", true)]
        [InlineData("ref struct R { }", true)]
        [InlineData("delegate void D();", true)]
        [InlineData("enum E { }", true)]
        public void EmitAttribute_01(string source, bool expectedIncludesAttributeUse)
        {
            var comp = CreateCompilation(source, parseOptions: TestOptions.Regular10);
            CompileAndVerify(comp, symbolValidator: m => AssertRefSafetyRulesAttribute(m, includesAttributeDefinition: false, includesAttributeUse: false, publicDefinition: false));

            comp = CreateCompilation(source);
            CompileAndVerify(comp, symbolValidator: m => AssertRefSafetyRulesAttribute(m, includesAttributeDefinition: expectedIncludesAttributeUse, includesAttributeUse: expectedIncludesAttributeUse, publicDefinition: false));
        }

        [WorkItem(63692, "https://github.com/dotnet/roslyn/issues/63692")]
        [Theory]
        [InlineData("class B { I F() => default; }")]
        [InlineData("class B { A F() => default; }")]
        [InlineData("class B { S F() => default; }")]
        [InlineData("class B { R F() => default; }")]
        [InlineData("class B { void F(I i) { } }")]
        [InlineData("class B { void F(A a) { } }")]
        [InlineData("class B { void F(S s) { } }")]
        [InlineData("class B { void F(R r) { } }")]
        [InlineData("class B { R P => default; }")]
        [InlineData("class B { R P { set { } } }")]
        public void EmitAttribute_02(string source)
        {
            var sourceA =
@"public interface I { }
public class A { }
public struct S { }
public ref struct R { }
";
            var refA = CreateCompilation(sourceA, parseOptions: TestOptions.Regular10).EmitToImageReference();

            var comp = CreateCompilation(source, references: new[] { refA }, parseOptions: TestOptions.Regular10);
            CompileAndVerify(comp, verify: Verification.Skipped, symbolValidator: m => AssertRefSafetyRulesAttribute(m, includesAttributeDefinition: false, includesAttributeUse: false, publicDefinition: false));

            comp = CreateCompilation(source, references: new[] { refA });
            CompileAndVerify(comp, verify: Verification.Skipped, symbolValidator: m => AssertRefSafetyRulesAttribute(m, includesAttributeDefinition: true, includesAttributeUse: true, publicDefinition: false));
        }

        [Theory]
        [CombinatorialData]
        public void EmitAttribute_TypeForwardedTo(
            [CombinatorialValues(LanguageVersion.CSharp10, LanguageVersion.CSharp11)] LanguageVersion languageVersionA,
            [CombinatorialValues(LanguageVersion.CSharp10, LanguageVersion.CSharp11)] LanguageVersion languageVersionB,
            bool useCompilationReference)
        {
            var sourceA =
@"public class A { }
";
            var comp = CreateCompilation(sourceA, parseOptions: TestOptions.Regular.WithLanguageVersion(languageVersionA));
            var refA = AsReference(comp, useCompilationReference);
            bool useUpdatedEscapeRulesA = languageVersionA == LanguageVersion.CSharp11;
            Assert.Equal(useUpdatedEscapeRulesA, comp.SourceModule.UseUpdatedEscapeRules);
            CompileAndVerify(comp, symbolValidator: m => AssertRefSafetyRulesAttribute(m, includesAttributeDefinition: useUpdatedEscapeRulesA, includesAttributeUse: useUpdatedEscapeRulesA, publicDefinition: false));

            var sourceB =
@"using System.Runtime.CompilerServices;
[assembly: TypeForwardedTo(typeof(A))]
";
            comp = CreateCompilation(sourceB, references: new[] { refA }, parseOptions: TestOptions.Regular.WithLanguageVersion(languageVersionB));
            Assert.Equal(languageVersionB == LanguageVersion.CSharp11, comp.SourceModule.UseUpdatedEscapeRules);
            CompileAndVerify(comp, symbolValidator: m => AssertRefSafetyRulesAttribute(m, includesAttributeDefinition: false, includesAttributeUse: false, publicDefinition: false));
        }

        [Fact]
        public void AttributeField()
        {
            var sourceA =
@"using System;
using System.Linq;
using System.Reflection;
public class A
{
    public static void GetAttributeValue(out int value)
    {
        var module = typeof(A).Assembly.Modules.First();
        var attribute = module.GetCustomAttributes(false).Single(a => a.GetType().Name == ""RefSafetyRulesAttribute"");
        var field = attribute.GetType().GetField(""Version"");
        value = (int)field.GetValue(attribute);
    }
}";
            var refA = CreateCompilation(sourceA).EmitToImageReference();

            var sourceB =
@"using System;
class B : A
{
    static void Main()
    {
        GetAttributeValue(out int value);
        Console.WriteLine(value);
    }
}";
            CompileAndVerify(sourceB, references: new[] { refA }, expectedOutput: "11");
        }

        private static void AssertRefSafetyRulesAttribute(ModuleSymbol module, bool includesAttributeDefinition, bool includesAttributeUse, bool publicDefinition)
        {
            const string attributeName = "System.Runtime.CompilerServices.RefSafetyRulesAttribute";
            var type = (NamedTypeSymbol)module.GlobalNamespace.GetMember(attributeName);
            var attribute = module.GetAttributes().SingleOrDefault();
            if (includesAttributeDefinition)
            {
                Assert.NotNull(type);
            }
            else
            {
                Assert.Null(type);
                if (includesAttributeUse)
                {
                    type = attribute.AttributeClass;
                }
            }
            if (type is { })
            {
                Assert.Equal(publicDefinition ? Accessibility.Public : Accessibility.Internal, type.DeclaredAccessibility);
            }
            if (includesAttributeUse)
            {
                Assert.Equal(type, attribute.AttributeClass);
            }
            else
            {
                Assert.Null(attribute);
            }
        }
    }
}


text:
package com.google.gdata.data.gtt;

import com.google.gdata.util.common.xml.XmlNamespace;
import com.google.gdata.data.ExtensionDescription;
import com.google.gdata.data.ExtensionPoint;
import com.google.gdata.data.ExtensionProfile;
import com.google.gdata.data.Link;

import java.util.List;

/**
 * Describes a glossaries element.
 *
 *
 */
@ExtensionDescription.Default(
    nsAlias = GttNamespace.GTT_ALIAS,
    nsUri = GttNamespace.GTT,
    localName = GlossariesElement.XML_NAME)
public class GlossariesElement extends ExtensionPoint {

  /** XML element name */
  static final String XML_NAME = "glossary";

  /**
   * Default mutable constructor.
   */
  public GlossariesElement() {
    super();
  }

  @Override
  public void declareExtensions(ExtensionProfile extProfile) {
    if (extProfile.isDeclared(GlossariesElement.class)) {
      return;
    }
    extProfile.declare(GlossariesElement.class,
        new ExtensionDescription(Link.class, new XmlNamespace("atom",
        "http://www.w3.org/2005/Atom"), "link", true, true, false));
  }

  /**
   * Returns the glossary entry links.
   *
   * @return glossary entry links
   */
  public List<Link> getLinks() {
    return getRepeatingExtension(Link.class);
  }

  /**
   * Adds a new glossary entry link.
   *
   * @param link glossary entry link
   */
  public void addLink(Link link) {
    getLinks().add(link);
  }

  /**
   * Returns whether it has the glossary entry links.
   *
   * @return whether it has the glossary entry links
   */
  public boolean hasLinks() {
    return hasRepeatingExtension(Link.class);
  }

  @Override
  protected void validate() {
  }

  /**
   * Returns the extension description, specifying whether it is required, and
   * whether it is repeatable.
   *
   * @param required   whether it is required
   * @param repeatable whether it is repeatable
   * @return extension description
   */
  public static ExtensionDescription getDefaultDescription(boolean required,
      boolean repeatable) {
    ExtensionDescription desc =
        ExtensionDescription.getDefaultDescription(GlossariesElement.class);
    desc.setRequired(required);
    desc.setRepeatable(repeatable);
    return desc;
  }

  @Override
  public String toString() {
    return "{GlossariesElement}";
  }

}


text:
<form class="slHumanDateInput" data-ng-submit="onReturn()">
    <input placeholder="e.g.: friday at 9 am"
           data-wb-focus="wbFocus"
           data-ng-model="dateHuman">

            Date is not understood.

</form>


text:
<?xml version="1.0" encoding="utf-8"?>
<resources>
    <!--
    <style name="AppTheme" parent="android:Theme.Material.Light">
    </style>
    <style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar"></style>

    <style name="AppTheme.Base" parent="Theme.AppCompat.Light.DarkActionBar">

        <item name="colorPrimary">@color/colorPrimary</item>

        <item name="colorPrimaryDark">@color/colorPrimaryDark</item>

        <item name="colorAccent">@color/colorAccent</item>

    </style>
    -->

    <style name="MyMaterialTheme" parent="MyMaterialTheme.Base">
        <item name="android:windowContentTransitions">true</item>
        <item name="android:windowAllowEnterTransitionOverlap">true</item>
        <item name="android:windowAllowReturnTransitionOverlap">true</item>
        <item name="android:windowSharedElementEnterTransition">@android:transition/move</item>
        <item name="android:windowSharedElementExitTransition">@android:transition/move</item>
    </style>
</resources>